diff --git a/N3OW/events/activities/coronation_activity/coronation_events.txt b/N3OW/events/activities/coronation_activity/coronation_events.txt new file mode 100644 index 00000000..7fc0bc96 --- /dev/null +++ b/N3OW/events/activities/coronation_activity/coronation_events.txt @@ -0,0 +1,5172 @@ +namespace = coronation_events + +##################################### +# Coronation - Systemic Events # +# coronation_events - 0000-9999 # +##################################### + +scripted_effect sworn_oath_effect = { + scope:activity = { + custom_tooltip = coronation_tt_positive_medium + change_variable = { + name = activity_special_type_progression + add = 10 + } + } +} + +scripted_effect warlike_oath_effect = { + scope:activity = { + every_attending_character = { + custom = warlike_character_opinion + limit = { + is_vassal_of = scope:host + OR = { + has_vassal_stance = glory_hound + has_vassal_stance = belligerent + } + } + add_opinion = { + modifier = respect_opinion + target = scope:host + opinion = 15 + } + } + } +} + +# Phase Controller +coronation_events.0050 = { + type = activity_event + hidden = yes + + trigger = { + involved_activity ?= { + NOT = { has_current_phase = coronation_phase_feast } + OR = { + is_current_phase_active = no + has_variable = ceremony_complete + } + } + } + + immediate = { + if = { + limit = { + involved_activity ?= { + NOT = { + any_in_list = { + variable = coronation_list_busy + OR = { + is_alive = yes + involved_activity ?= root.involved_activity + } + } + } + } + } + involved_activity ?= { + progress_activity_phase_after = { days = 1 } + } + } + else = { + trigger_event = { + id = coronation_events.0050 + weeks = 1 + } + } + } +} + +# Oath Event +coronation_events.0100 = { + type = activity_event + title = coronation_events.0100.t + desc = { + desc = coronation_events.0100.desc.opening + triggered_desc = { + trigger = { + scope:previous_ruler ?= { + is_close_family_of = root + } + } + desc = coronation_events.0100.desc.previous_ruler_close_family + } + triggered_desc = { + trigger = { + scope:previous_ruler ?= { + NOT = { is_close_family_of = root } + is_lowborn = yes + } + } + desc = coronation_events.0100.desc.previous_ruler_not_family_no_house + } + triggered_desc = { + trigger = { + scope:previous_ruler ?= { + NOT = { is_close_family_of = root } + } + } + desc = coronation_events.0100.desc.previous_ruler_not_family + } + triggered_desc = { + trigger = { + NOT = { exists = scope:previous_ruler } + } + desc = coronation_events.0100.desc.first_ruler + } + desc = coronation_events.0100.desc.outro + } + center_portrait = { + character = root + animation = storyteller + } + theme = coronation_activity + override_background = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + coronation_living_officiator_trigger = yes + } + } + reference = temple + } + override_background = { + trigger = { + NOT = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + coronation_living_officiator_trigger = yes + } + } + + } + reference = throne_room + } + + immediate = { + # For MP + coronation_busy_effect = yes + + save_scope_as = root_scope + coronation_set_oath_alternatives_effect = yes + primary_title.previous_holder ?= { + save_scope_as = previous_ruler + } + ### Special Checks + if = { + limit = { + any_in_list = { + list = chosen_oaths + this = flag:learning_oath_1 + } + } + if = { # University exists + limit = { + any_realm_county = { + title_province = { has_university_building_trigger = yes } + } + } + set_variable = { + name = learning_oath_1_university_exists + value = 1 + } + } + save_scope_value_as = { + name = learning_oath_temp_cost + value = oath_university_gold_value + } + save_scope_value_as = { + name = learning_oath_temp_development + value = oath_university_development_value + } + } + + if = { + limit = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + struggle:iberian_struggle = { save_scope_as = involved_struggle } + } + else_if = { + limit = { + any_character_struggle = { is_struggle_type = persian_struggle } + } + struggle:persian_struggle = { save_scope_as = involved_struggle } + } + } + + ## Diplomacy + # Alliances + option = { + name = coronation_events.0100.alliances + flavor = coronation_events.0100.alliances_flavor + reason = alliance_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:diplomacy_oath_1 + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = diplomacy_oath_1 + TIME = 7300 + } + } + + ai_chance = { + base = 0 + } + } + + # Children + option = { + name = coronation_events.0100.children + flavor = coronation_events.0100.children_flavor + reason = children_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:diplomacy_oath_2 + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = diplomacy_oath_2 + TIME = 10950 + } + } + + ai_chance = { + base = 10 + } + } + + ## Martial + # Reconquest + option = { + name = coronation_events.0100.reconquest + flavor = coronation_events.0100.reconquest_flavor + reason = reconquest_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:martial_oath_1 + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = martial_oath_1 + TIME = 7300 + } + set_variable = { + name = oath_reconquest_title + value = primary_title + } + create_character_memory = { + type = reconquest_oath_memory + } + } + # Vassals who approve + warlike_oath_effect = yes + # Threatened rulers who disapprove + scope:activity = { + every_attending_character = { + custom = coronation_events.0100.reconquest_opinion + limit = { + any_directly_owned_province = { + barony = { + target_is_de_jure_liege_or_above = scope:host.primary_title + } + } + NOR = { + target_is_liege_or_above = scope:host + this = scope:host + } + } + add_opinion = { + modifier = threatened_opinion + target = root + opinion = -20 + } + } + } + + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + # Conquest + option = { + name = coronation_events.0100.conquest + flavor = coronation_events.0100.conquest_flavor + reason = conquest_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:martial_oath_2 + } + } + sworn_oath_effect = yes + + scope:host = { + if = { + limit = { + is_ai = yes + } + add_character_modifier = { + modifier = oath_warlike_ai_modifier + years = 20 + } + } + coronation_chosen_oath_setup_effect = { + VAR = martial_oath_2 + TIME = 7300 + } + set_variable = { + name = oath_conquest_size + value = oath_conquest_value_1 + } + create_character_memory = { + type = conquest_oath_memory + } + } + # Vassals who approve + warlike_oath_effect = yes + # Threatened rulers who disapprove + scope:activity = { + every_attending_character = { + custom = coronation_events.0100.conquest_opinion + limit = { + any_held_title = { + is_neighbor_to_realm = root + } + NOR = { + target_is_liege_or_above = scope:host + this = scope:host + } + } + add_opinion = { + modifier = threatened_opinion + target = root + opinion = -20 + } + } + } + + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + ## Stewardship + # Peace + option = { + name = coronation_events.0100.peace + flavor = coronation_events.0100.peace_flavor + reason = peace_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:stewardship_oath_1 + } + } + sworn_oath_effect = yes + + scope:host = { + if = { + limit = { + is_ai = yes + } + add_character_modifier = { + modifier = oath_peaceful_ai_modifier + years = 20 + } + } + coronation_chosen_oath_setup_effect = { + VAR = stewardship_oath_1 + TIME = 18250 + } + + } + + ai_chance = { + base = 10 + } + } + + # Buildings + option = { + name = coronation_events.0100.buildings + flavor = coronation_events.0100.buildings_flavor + reason = build_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:stewardship_oath_2 + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = stewardship_oath_2 + TIME = 7300 + } + set_variable = { + name = stewardship_oath_2_buildings + value = 0 + } + } + + ai_chance = { + base = 10 + modifier = { + add = 20 + ai_has_economical_boom_personality = yes + } + modifier = { + factor = 0 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + ## Intrigue + + ## Learning + # University + option = { + name = coronation_events.0100.university + flavor = coronation_events.0100.university_flavor + reason = university_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:learning_oath_1 + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = learning_oath_1 + TIME = 18250 + } + set_variable = { + name = learning_oath_cost + value = scope:learning_oath_temp_cost + } + } + + ai_chance = { + base = 0 + } + } + + # De jure rights + + option = { + name = coronation_events.0100.purge_pretenders + flavor = coronation_events.0100.purge_pretenders_flavor + reason = purge_pretenders_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:purge_pretenders_oath + } + } + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = purge_pretenders_oath + TIME = 7300 + } + set_variable = { + name = purge_pretenders_target_title + value = primary_title + } + } + + ai_chance = { + base = 0 + } + } + + # End the Struggle + option = { + name = coronation_events.0100.end_the_struggle + flavor = coronation_events.0100.end_the_struggle_flavor + reason = end_the_struggle_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:end_the_struggle_oath + } + } + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = end_the_struggle_oath + TIME = 18250 + } + if = { + limit = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + set_variable = { + name = end_the_struggle_oath_type_var + value = flag:iberian_struggle + } + } + else_if = { + limit = { + any_character_struggle = { is_struggle_type = persian_struggle } + } + set_variable = { + name = end_the_struggle_oath_type_var + value = flag:persian_struggle + } + + } + } + + ai_chance = { + base = 0 + } + } + + # Greatest Hunter + option = { + name = coronation_events.0100.greatest_hunter + flavor = coronation_events.0100.greatest_hunter_flavor + reason = greatest_hunter_oath + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:greatest_hunter_oath + } + } + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = greatest_hunter_oath + TIME = 14600 + } + set_variable = { + name = greatest_hunter_oath_r_counter + value = 0 + } + set_variable = { + name = greatest_hunter_oath_l_counter + value = 0 + } + } + + ai_chance = { + base = 0 + modifier = { + add = 10 + has_trait = lifestyle_hunter + } + modifier = { + add = 10 + ai_energy > 0 + } + } + } + + # Heir Preparation + option = { + name = coronation_events.0100.heir_preparation + flavor = coronation_events.0100.heir_preparation_flavor + reason = heir_preparation_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:heir_preparation_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = heir_preparation_oath + TIME = 14600 + } + } + + ai_chance = { + base = 0 + } + } + + # Install Claimants + option = { + name = coronation_events.0100.install_claimants + flavor = coronation_events.0100.install_claimants_flavor + reason = install_claimants_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:install_claimants_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = install_claimants_oath + TIME = 7300 + } + set_variable = { + name = install_claimants_oath_counter + value = 0 + } + } + + ai_chance = { + base = 0 + } + } + + # Mend the Fracture + option = { + name = coronation_events.0100.mend_the_fracture + flavor = coronation_events.0100.mend_the_fracture_flavor + reason = mend_the_fracture_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:mend_the_fracture_oath + } + } + sworn_oath_effect = yes + + random_sub_realm_county = { + limit = { + culture != root.culture + culture = { + cultural_acceptance = { + target = root.culture + value <= 20 + } + any_culture_county = { + count >= 6 + holder = { + target_is_liege_or_above = root + } + } + any_culture_county = { + percent >= 0.6 + holder = { + target_is_liege_or_above = root + } + } + } + } + culture = { + save_scope_as = target_culture + } + } + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = mend_the_fracture_oath + TIME = 7300 + } + set_variable = { + name = mend_the_fracture_oath_target_culture + value = scope:target_culture + } + } + + ai_chance = { + base = 0 + } + } + + # Provide for the Warriors + option = { + name = coronation_events.0100.provide_for_the_warriors + flavor = coronation_events.0100.provide_for_the_warriors_flavor + reason = provide_for_the_warriors_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:provide_for_the_warriors_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = provide_for_the_warriors_oath + TIME = 7300 + } + } + + ai_chance = { + base = 10 + modifier = { + add = 20 + ai_has_economical_boom_personality = yes + } + modifier = { + factor = 0 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + # Provide for the Faithful + option = { + name = coronation_events.0100.provide_for_the_faithful + flavor = coronation_events.0100.provide_for_the_faithful_flavor + reason = provide_for_the_faithful_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:provide_for_the_faithful_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = provide_for_the_faithful_oath + TIME = 7300 + } + } + + ai_chance = { + base = 10 + modifier = { + add = 20 + ai_has_economical_boom_personality = yes + } + modifier = { + factor = 0 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + # Provide for the Poor + + option = { + name = coronation_events.0100.provide_for_the_poor + flavor = coronation_events.0100.provide_for_the_poor_flavor + reason = provide_for_the_poor_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:provide_for_the_poor_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = provide_for_the_poor_oath + TIME = 7300 + } + } + + ai_chance = { + base = 10 + modifier = { + add = 20 + ai_has_economical_boom_personality = yes + } + modifier = { + factor = 0 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + # Repent + + option = { + name = coronation_events.0100.repent + flavor = coronation_events.0100.repent_flavor + reason = repent_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:repent_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = repent_oath + TIME = 7300 + } + set_variable = { + name = repent_oath_pilgrimage_counter + value = 0 + } + } + + ai_chance = { + base = 0 + } + } + + # Opt-out, where you don't take an oath + option = { + name = coronation_events.0100.opt_out + scope:host = { + add_character_flag = { + flag = coronation_no_oath + days = 40 + } + } + ai_chance = { + base = 1 + } + } + + after = { + # For MP + coronation_ready_effect = yes + + scope:activity = { + every_attending_character = { + limit = { + NOT = { this = root } + } + trigger_event = coronation_events.0110 + } + } + # Cleanup of variable checks + remove_variable = learning_oath_1_university_exists + + if = { + limit = { + has_multiple_players = yes + scope:activity = { + any_attending_character = { + NOT = { this = scope:host } + is_ai = no + } + } + } + scope:activity = { + progress_activity_phase_after = { weeks = 8 } + set_variable = ceremony_complete + } + trigger_event = { + id = coronation_events.0050 + weeks = 1 + } + } + else = { + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + } +} + +# Oath - Attendee Followup Event +coronation_events.0110 = { + type = activity_event + title = coronation_events.0110.t + desc = { + desc = coronation_events.0110.desc.intro + first_valid = { + # Diplomacy + triggered_desc = { + trigger = { + scope:activity = { + has_variable = diplomacy_oath_1 + } + } + desc = coronation_events.0110.desc.diplomacy_oath_1 + } + # Martial + triggered_desc = { + trigger = { + scope:activity = { + has_variable = martial_oath_1 + } + } + desc = coronation_events.0110.desc.martial_oath_1 + } + triggered_desc = { + trigger = { + scope:activity = { + has_variable = martial_oath_2 + } + } + desc = coronation_events.0110.desc.martial_oath_2 + } + # Stewardship + triggered_desc = { + trigger = { + scope:activity = { + has_variable = stewardship_oath_1 + } + } + desc = coronation_events.0110.desc.stewardship_oath_1 + } + triggered_desc = { + trigger = { + scope:activity = { + has_variable = stewardship_oath_2 + } + } + desc = coronation_events.0110.desc.stewardship_oath_2 + } + # Intrigue + # Learning + triggered_desc = { + trigger = { + scope:activity = { + has_variable = learning_oath_1 + } + } + desc = coronation_events.0110.desc.learning_oath_1 + } + # De Jure Rights + triggered_desc = { + trigger = { + scope:activity = { + has_variable = purge_pretenders_oath + } + } + desc = coronation_events.0110.desc.purge_pretenders_oath + } + # End the Struggle + triggered_desc = { + trigger = { + scope:activity = { + has_variable = end_the_struggle_oath + } + } + desc = coronation_events.0110.desc.end_the_struggle_oath + } + # Greatest Hunter + triggered_desc = { + trigger = { + scope:activity = { + has_variable = greatest_hunter_oath + } + } + desc = coronation_events.0110.desc.greatest_hunter_oath + } + # Heir Preparation + triggered_desc = { + trigger = { + scope:activity = { + has_variable = heir_preparation_oath + } + } + desc = coronation_events.0110.desc.heir_preparation_oath + } + # Install Claimants + triggered_desc = { + trigger = { + scope:activity = { + has_variable = install_claimants_oath + } + } + desc = coronation_events.0110.desc.install_claimants_oath + } + # Mend the Fracture + triggered_desc = { + trigger = { + scope:activity = { + has_variable = mend_the_fracture_oath + } + } + desc = coronation_events.0110.desc.mend_the_fracture_oath + } + # Provide for the Warriors + triggered_desc = { + trigger = { + scope:activity = { + has_variable = provide_for_the_warriors_oath + } + } + desc = coronation_events.0110.desc.provide_for_the_warriors_oath + } + # Provide for the Faithful + triggered_desc = { + trigger = { + scope:activity = { + has_variable = provide_for_the_faithful_oath + } + } + desc = coronation_events.0110.desc.provide_for_the_faithful_oath + } + # Provide for the Poor + triggered_desc = { + trigger = { + scope:activity = { + has_variable = provide_for_the_poor_oath + } + } + desc = coronation_events.0110.desc.provide_for_the_poor_oath + } + # Repent + triggered_desc = { + trigger = { + scope:activity = { + has_variable = repent_oath + } + } + desc = coronation_events.0110.desc.repent_oath + } + + # Other + desc = coronation_events.0110.desc.fallback + } + desc = coronation_events.0110.desc.outro + } + center_portrait = { + character = scope:activity.activity_host + animation = storyteller + } + theme = coronation_activity + override_background = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + coronation_living_officiator_trigger = yes + } + } + reference = temple + } + override_background = { + trigger = { + NOT = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + coronation_living_officiator_trigger = yes + } + } + + } + reference = throne_room + } + + immediate = { + # For MP + coronation_busy_effect = yes + } + + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + has_character_flag = coronation_no_oath + } + } + desc = coronation_events.0110.no_oath + } + desc = coronation_events.0110.regular + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Oath Failure Event +coronation_events.0150 = { + type = character_event + title = coronation_events.0150.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = honest + } + desc = coronation_events.0150.desc_honest + } + triggered_desc = { + trigger = { + has_trait = deceitful + } + desc = coronation_events.0150.desc_deceitful + } + desc = coronation_events.0150.desc + } + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = honest + } + animation = grief + } + triggered_animation = { + trigger = { + has_trait = deceitful + } + animation = dismissal + } + animation = disapproval + } + theme = coronation + + trigger = { + highest_held_title_tier >= tier_kingdom + calc_true_if = { + amount > 0 + AND = { + has_variable = diplomacy_oath_1 + NOT = { has_variable = diplomacy_oath_1_timer } + } + AND = { + has_variable = diplomacy_oath_2 + NOT = { has_variable = diplomacy_oath_2_timer } + } + AND = { + has_variable = martial_oath_1 + NOT = { has_variable = martial_oath_1_timer } + } + AND = { + has_variable = martial_oath_2 + NOT = { has_variable = martial_oath_2_timer } + } + AND = { + has_variable = stewardship_oath_1 + NOT = { has_variable = stewardship_oath_1_timer } + } + AND = { + has_variable = stewardship_oath_2 + NOT = { has_variable = stewardship_oath_2_timer } + } + AND = { + has_variable = learning_oath_1 + NOT = { has_variable = learning_oath_1_timer } + } + AND = { + has_variable = purge_pretenders_oath + NOT = { has_variable = purge_pretenders_oath_timer } + } + AND = { + has_variable = end_the_struggle_oath + NOT = { has_variable = end_the_struggle_oath_timer } + } + AND = { + has_variable = greatest_hunter_oath + NOT = { has_variable = greatest_hunter_oath_timer } + } + AND = { + has_variable = heir_preparation_oath + NOT = { has_variable = heir_preparation_oath_timer } + } + AND = { + has_variable = install_claimants_oath + NOT = { has_variable = install_claimants_oath_timer } + } + AND = { + has_variable = mend_the_fracture_oath + NOT = { has_variable = mend_the_fracture_oath_timer } + } + AND = { + has_variable = provide_for_the_warriors_oath + NOT = { has_variable = provide_for_the_warriors_oath_timer } + } + AND = { + has_variable = provide_for_the_faithful_oath + NOT = { has_variable = provide_for_the_faithful_oath_timer } + } + AND = { + has_variable = provide_for_the_poor_oath + NOT = { has_variable = provide_for_the_poor_oath_timer } + } + AND = { + has_variable = repent_oath + NOT = { has_variable = repent_oath_timer } + } + } + } + + immediate = { + # Diplomacy + coronation_oath_remove_variable_on_failure_effect = { + VAR = diplomacy_oath_1 + } + coronation_oath_remove_variable_on_failure_effect = { + VAR = diplomacy_oath_2 + } + # Martial + coronation_oath_remove_variable_on_failure_effect = { + VAR = martial_oath_1 + } + coronation_oath_remove_variable_on_failure_effect = { + VAR = martial_oath_2 + } + # Stewardship + coronation_oath_remove_variable_on_failure_effect = { + VAR = stewardship_oath_1 + } + coronation_oath_remove_variable_on_failure_effect = { + VAR = stewardship_oath_2 + } + # Intrigue + # Learning + coronation_oath_remove_variable_on_failure_effect = { + VAR = learning_oath_1 + } + + # Purge Pretenders + coronation_oath_remove_variable_on_failure_effect = { + VAR = purge_pretenders_oath + } + + #End the Struggle + coronation_oath_remove_variable_on_failure_effect = { + VAR = end_the_struggle_oath + } + + # Greatest Hunter + coronation_oath_remove_variable_on_failure_effect = { + VAR = greatest_hunter_oath + } + # Heir Preparation + coronation_oath_remove_variable_on_failure_effect = { + VAR = heir_preparation_oath + } + # Install Claimants + coronation_oath_remove_variable_on_failure_effect = { + VAR = install_claimants_oath + } + # Mend the Fracture + coronation_oath_remove_variable_on_failure_effect = { + VAR = mend_the_fracture_oath + } + # Provide for the Warriors + coronation_oath_remove_variable_on_failure_effect = { + VAR = provide_for_the_warriors_oath + } + # Provide for the Faithful + coronation_oath_remove_variable_on_failure_effect = { + VAR = provide_for_the_faithful_oath + } + # Provide for the Poor + coronation_oath_remove_variable_on_failure_effect = { + VAR = provide_for_the_poor_oath + } + # Repent + coronation_oath_remove_variable_on_failure_effect = { + VAR = repent_oath + } + + coronation_broken_oath_punishment_effect = yes + } + + option = { + name = { + trigger = { + always = yes + } + text = coronation_events.0150.a + } + name = { + trigger = { + has_trait = deceitful + } + text = coronation_events.0150.a_deceitful + } + name = { + trigger = { + has_trait = honest + } + text = coronation_events.0150.a_honest + } + + add_prestige = { + value = { + value = -20 + multiply = scope:scale_of_oath_failure_scope + min = -10000 + max = -100 + } + } + + add_legitimacy = { + value = { + value = -10 + multiply = scope:scale_of_oath_failure_scope + min = -2000 + max = -50 + } + } + + if = { + limit = { + is_ai = no + } + set_nickname_effect = { NICKNAME = nick_the_oathbreaker } + } + else = { + random = { + chance = 5 + set_nickname_effect = { NICKNAME = nick_the_oathbreaker } + } + } + + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + } +} + +# Oath Success Event +coronation_events.0175 = { + type = character_event + title = coronation_events.0175.t + desc = coronation_events.0175.desc + left_portrait = { + character = root + triggered_animation = { + trigger = { + drinks_alcohol_trigger = yes + } + animation = toast_goblet + } + triggered_animation = { + trigger = { + drinks_alcohol_trigger = no + } + animation = happiness + } + } + theme = coronation + + override_effect_2d = { + reference = legend_glow + } + + immediate = { + switch = { + trigger = scope:find_oath + flag:diplomacy_oath_1 = { + coronation_oath_reward_effect = { VARIABLE = diplomacy_oath_1 } + } + flag:diplomacy_oath_2 = { + coronation_oath_reward_effect = { VARIABLE = diplomacy_oath_2 } + } + flag:martial_oath_1 = { + coronation_oath_reward_effect = { VARIABLE = martial_oath_1 } + } + flag:martial_oath_2 = { + coronation_oath_reward_effect = { VARIABLE = martial_oath_2 } + } + flag:stewardship_oath_1 = { + coronation_oath_reward_effect = { VARIABLE = stewardship_oath_1 } + } + flag:stewardship_oath_2 = { + coronation_oath_reward_effect = { VARIABLE = stewardship_oath_2 } + } + flag:learning_oath_1 = { + coronation_oath_reward_effect = { VARIABLE = learning_oath_1 } + } + flag:purge_pretenders_oath = { + coronation_oath_reward_effect = { VARIABLE = purge_pretenders_oath } + } + flag:end_the_struggle_oath = { + coronation_oath_reward_effect = { VARIABLE = end_the_struggle_oath } + } + flag:greatest_hunter_oath = { + coronation_oath_reward_effect = { VARIABLE = greatest_hunter_oath } + } + flag:heir_preparation_oath = { + coronation_oath_reward_effect = { VARIABLE = heir_preparation_oath } + } + flag:install_claimants_oath = { + coronation_oath_reward_effect = { VARIABLE = install_claimants_oath } + } + flag:mend_the_fracture_oath = { + coronation_oath_reward_effect = { VARIABLE = mend_the_fracture_oath } + } + flag:provide_for_the_warriors_oath = { + coronation_oath_reward_effect = { VARIABLE = provide_for_the_warriors_oath } + } + flag:provide_for_the_faithful_oath = { + coronation_oath_reward_effect = { VARIABLE = provide_for_the_faithful_oath } + } + flag:provide_for_the_poor_oath = { + coronation_oath_reward_effect = { VARIABLE = provide_for_the_poor_oath } + } + flag:repent_oath = { + coronation_oath_reward_effect = { VARIABLE = repent_oath } + } + } + } + + option = { + name = coronation_events.0175.a + stress_impact = { base = medium_stress_loss } + + if = { + limit = { + has_variable = oath_reconquest_title + } + remove_variable = oath_reconquest_title + } + } +} + +scripted_trigger coronation_events_0200_available_chaplain_trigger = { + basic_is_available_ai = yes + is_travelling = no + NOR = { + exists = involved_activity + has_character_flag = planning_an_activity + } +} + +# Start of Prelude Phase +coronation_events.0200 = { + type = activity_event + title = coronation_events.0200.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:activity.activity_host = root + } + desc = coronation_events.0200.desc.host + } + triggered_desc = { + trigger = { + scope:activity.activity_host != root + } + desc = coronation_events.0200.desc.guest + } + } + } + left_portrait = { + character = scope:attendee + animation = standing_horse + camera = camera_event_standing_with_horse_left_angled_in + } + center_portrait = { + character = scope:activity.activity_host + triggered_animation = { + trigger = { + OR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_meritocratic + government_has_flag = government_is_japan_administrative + } + } + animation = emperor + } + animation = storyteller + camera = camera_event_center_moved_left + } + right_portrait = { + character = scope:other_guest + triggered_animation = { + trigger = { + scope:host = { + coronation_host_east_asian_admin_or_mandala_trigger = yes + } + is_merit_based_official = yes + } + animation = gongshou_with_hu + } + triggered_animation = { + trigger = { + scope:host = { + coronation_host_east_asian_admin_or_mandala_trigger = yes + } + } + animation = throne_room_bow_2 + } + animation = throne_room_applaud_1 + camera = camera_event_right_to_the_right + } + override_background = { + trigger = { + involved_activity.activity_location.culture ?= { has_building_gfx = southeast_asian_building_gfx } + } + reference = ep2_holy_site_indian + } + override_background = { + trigger = { + OR = { + involved_activity.activity_location.culture ?= { has_graphical_western_culture_group_trigger = yes } + involved_activity.activity_location = { steppe_building_gfx_use_western_trigger = yes } + #Do not want generic courtyard calling up Constantinople for this one + location.county = title:c_byzantion + } + NOT = { + scope:activity.activity_location.county.title_province ?= { + has_holding_type = tribal_holding + } + } + } + reference = bp2_courtyard + } + override_background = { + reference = courtyard + } + theme = coronation + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + activity_host = { save_scope_as = host } + + if = { + limit = { + NOT = { + root = scope:host + } + } + root = { save_scope_as = attendee } + } + else = { + random_attending_character = { + limit = { + NOR = { + this = scope:host + is_courtier_of = scope:host + } + } + alternative_limit = { + NOT = { + this = scope:host + } + } + save_scope_as = attendee + } + } + random_attending_character = { + limit = { + NOR = { + this = scope:host + this = scope:attendee + is_in_guest_subset = { + name = detractor + } + is_spouse_of = scope:host + } + OR = { + AND = { + is_courtier_of = scope:host + NOT = { + has_relation_rival = scope:host + } + } + + is_in_guest_subset = { + name = supporter + } + } + } + alternative_limit = { + NOR = { + this = scope:host + this = scope:attendee + } + } + save_scope_as = other_guest + } + } + if = { + limit = { + this = scope:host + } + scope:activity = { + coronation_update_supporters_detractors_effect = yes + } + } + } + + option = { + name = coronation_events.0200.a + trigger = { + scope:activity.activity_host = root + } + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + any_attending_character = { + this = scope:host.faith.religious_head + is_alive = yes + is_imprisoned = no + + } + } + } + coronation_proper_artifact_crown_trigger = yes + OR = { + cp:councillor_court_chaplain.involved_activity ?= root.involved_activity + involved_activity = { + any_attending_character = { + government_has_flag = government_is_theocracy + } + } + #Can be forcibly added + cp:councillor_court_chaplain ?= { + coronation_events_0200_available_chaplain_trigger = yes + } + } + } + trigger_event = coronation_events.0300 + } + else_if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + any_attending_character = { + this = scope:host.faith.religious_head + is_alive = yes + is_imprisoned = no + } + } + } + involved_activity = { + set_variable = { + name = officiator + value = scope:host.faith.religious_head + } + scope:host.faith.religious_head = { + add_character_flag = { + flag = coronation_officiator + years = 2 + } + } + } + } + } + + option = { + name = coronation_events.0200.b + trigger = { + scope:activity.activity_host != root + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +scripted_trigger coronation_events_0205_audience = { + NOR = { + this = scope:host + this = root + trigger_if = { + limit = { + exists = scope:activity.special_guest:priest + } + this = scope:activity.special_guest:priest + } + is_spouse_of = scope:host + is_close_family_of = scope:host + is_diarch_of_target = scope:host + } +} + +# Start of Ceremony Phase +coronation_events.0205 = { + type = activity_event + title = coronation_events.0205.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + involved_activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.0205.meager + } + desc = coronation_events.0205.great + } + first_valid = { + triggered_desc = { + trigger = { + location.barony = title:b_constantinople + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + desc = coronation_events.0205.hagia_sophia + } + triggered_desc = { + trigger = { + location.barony = title:b_paris + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + OR = { + primary_title = title:k_france + primary_title = title:e_france + culture = { + OR = { + this = culture:french + any_parent_culture_or_above = { + this = culture:french + } + } + } + location.culture = { + OR = { + this = culture:french + any_parent_culture_or_above = { + this = culture:french + } + } + } + } + } + desc = coronation_events.0205.saint_denis + } + triggered_desc = { + trigger = { + current_year > 1000 + location.barony = title:b_krakow + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + desc = coronation_events.0205.wawel + } + triggered_desc = { + trigger = { + location.barony = title:b_vaticano + faith = faith:catholic + scope:host.faith = faith:catholic + } + desc = coronation_events.0205.st_peters + } + triggered_desc = { + trigger = { + current_year >= 950 + location.barony = title:b_london + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + desc = coronation_events.0205.westminster + } + triggered_desc = { + trigger = { + location.barony = title:b_reims + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + desc = coronation_events.0205.reims + } + triggered_desc = { + trigger = { + location.barony = title:b_aachen + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + NOT = { + government_has_flag = government_is_nomadic + } + } + desc = coronation_events.0205.aachen + } + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + desc = coronation_events.0205.east_admin_location + } + desc = coronation_events.0205.temple + } + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + desc = coronation_events.0205.east_admin_description + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.0205.silence + } + desc = coronation_events.0205.cheers + } + first_valid = { + triggered_desc = { + trigger = { + scope:activity.activity_host = root + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + desc = coronation_events.0205.desc.host_east_asian + } + triggered_desc = { + trigger = { + scope:activity.activity_host = root + } + desc = coronation_events.0205.desc.host + + } + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + desc = coronation_events.0205.desc.guest_east_asian + } + triggered_desc = { + trigger = { + involved_activity.activity_host != root + } + desc = coronation_events.0205.desc.guest + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.0205.desc.low_magnificence_east_asian + } + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + scope:activity.var:activity_special_type_progression < 75 + } + desc = coronation_events.0205.desc.medium_magnificence_east_asian + } + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + scope:activity.var:activity_special_type_progression < 75 + } + desc = coronation_events.0205.desc.high_magnificence_east_asian + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.0205.desc.low_magnificence + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 75 + } + desc = coronation_events.0205.desc.medium_magnificence + } + desc = coronation_events.0205.desc.high_magnificence + } + } + left_portrait = { + triggered_animation = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + animation = throne_room_bow_2 + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + animation = rage + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + animation = throne_room_cheer_1 + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + } + animation = personality_content + } + character = scope:audience_1 + camera = camera_event_left_away_3_4 + hide_info = yes + } + center_portrait = { + character = involved_activity.activity_host + triggered_animation = { + trigger = { + OR = { + scope:activity.var:activity_special_type_progression < 25 + scope:host = { + coronation_host_east_asian_admin_or_mandala_trigger = yes + } + scope:host = { + government_has_flag = government_is_steppe_admin + } + } + } + animation = jockey_walk + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + } + animation = jockey_wave + } + camera = camera_event_horse_left_centered + } + right_portrait = { + triggered_animation = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + animation = throne_room_bow_2 + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + animation = war_defender + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + animation = throne_room_cheer_2 + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + } + animation = throne_room_cheer_1 + } + character = scope:audience_2 + camera = camera_event_far_right_very_right + hide_info = yes + } + theme = coronation + + #East Asian exterior holy sites + override_background = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + scope:activity.activity_location ?= { + OR = { + culture ?= { has_graphical_east_asia_culture_group_trigger = yes } + steppe_building_gfx_use_east_asian_trigger = yes + culture ?= { has_graphical_india_culture_group_trigger = yes } + steppe_building_gfx_use_indian_trigger = yes + } + } + } + reference = holy_site_generic + } + #Cool gates + override_background = { + trigger = { + location = { + NOR = { + has_holding_type = tribal_holding + has_holding_type = herder_holding + has_holding_type = nomad_holding + culture = { has_building_gfx = southeast_asian_building_gfx } + } + OR = { + geographical_region = mediteranean_coast + geographical_region = world_asia_minor + culture = { has_graphical_mediterranean_culture_group_trigger = yes } + steppe_building_gfx_use_mediterranean_trigger = yes + geographical_region = graphical_mena + geographical_region = graphical_india + culture ?= { has_building_gfx = iranian_building_gfx } + culture ?= { has_building_gfx = indian_building_gfx } + AND = { + geographical_region = world_europe_west_iberia + faith ?= { religion = religion:islam_religion } + } + steppe_building_gfx_use_indian_trigger = yes + AND = { + steppe_building_gfx_use_mena_trigger = yes + NOT = { + root = { government_has_flag = government_is_tribal } + geographical_region = world_steppe + } + } + } + } + } + reference = ep3_city_gate + } + #Nomadic market doesn't look great - and east asian admins should use courtyard + override_background = { + trigger = { + OR = { + location.county.holder = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + } + reference = courtyard + } + #Put some SEA in there + override_background = { + trigger = { + location.culture = { has_building_gfx = southeast_asian_building_gfx } + } + reference = tgp_village_sea + } + override_background = { + reference = market + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + exists = scope:rain_day + } + reference = rain + } + + immediate = { + # For MP + coronation_busy_effect = yes + random_rain_snow_chance_effect = yes + involved_activity = { + activity_host = { + save_scope_as = host + save_scope_as = value_target + } + activity_location = { save_scope_as = location } + #Guards for orderly east asian ceremonies in the palace + if = { + limit = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + create_character = { + template = mercenary + location = scope:location + culture = scope:host.culture + faith = scope:host.faith + gender_female_chance = scope_value_target_soldier_female_chance + save_scope_as = audience_1 + } + create_character = { + template = mercenary + location = scope:location + culture = scope:host.culture + faith = scope:host.faith + gender_female_chance = scope_value_target_soldier_female_chance + save_scope_as = audience_2 + } + } + else = { + create_character = { + template = generic_peasant_character_no_rags + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = audience_1 + } + create_character = { + template = generic_peasant_character_no_rags + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = audience_2 + } + } + + } + play_coronation_ceremony_music_effect = yes + scope:host = { + if = { + limit = { + root = { is_ai = no } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + OR = { + has_trait = conqueror + has_trait = greatest_of_khans + has_lifestyle = martial_lifestyle + } + } + add_character_flag = { + flag = need_military_outfit + days = 30 + } + } + } + if = { + limit = { + this = scope:host + } + coronation_ceremony_magnificence_effect = yes + } + if = { + limit = { + this = scope:host + } + scope:activity = { + coronation_update_supporters_detractors_effect = yes + } + } + } + #normal host entrance + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.0205.a_low_magnificence_east_admin + } + triggered_desc = { + trigger = { + OR = { + scope:activity.var:activity_special_type_progression < 25 + AND = { + scope:activity.var:activity_special_type_progression < 75 + OR = { + has_trait = shy + has_trait = paranoid + has_trait = craven + } + } + } + } + desc = coronation_events.0205.a_low_magnificence + } + triggered_desc = { + trigger = { + OR = { + scope:activity.var:activity_special_type_progression >= 75 + has_trait = arrogant + has_trait = trusting + has_trait = ambitious + has_trait = gregarious + has_trait = trusting + } + NOR = { + has_trait = humble + has_trait = content + has_trait = depressed + } + } + desc = coronation_events.0205.a_high_magnificence + } + desc = coronation_events.0205.a + } + } + } + trigger = { + this = scope:host + NOR = { + has_disfiguring_physical_attribute_trigger = yes + has_trait = infirm + health <= dying_health + has_regal_presence_trait_trigger = yes + } + } + coronation_ceremony_county_effect = yes + if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + stress_impact = { + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + } + + #You are physically not great to look at and that kind of ruins the ceremony... + option = { + trigger = { + this = scope:host + OR = { + has_disfiguring_physical_attribute_trigger = yes + has_trait = infirm + health <= dying_health + } + } + name = coronation_events.0205.b + flavor = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:activity = { + OR = { + has_activity_option = { + category = ceremony_size + option = coronation_large_ceremony + } + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_lavish + } + } + } + has_activity_intent = coronation_impress_attendees + } + } + desc = coronation_events.0205.b_improved + } + triggered_desc = { + trigger = { + OR = { + has_trait = infirm + health <= dying_health + } + } + desc = coronation_events.0205.b_flavor_infirm + } + } + } + coronation_ceremony_county_effect = yes + + + if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + stress_impact = { + base = miniscule_stress_impact_gain + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 75 + } + stress_impact = { + base = miniscule_stress_impact_gain + } + } + } + + #You are a glorious sight + option = { + name = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + text = coronation_events.0205.c_low_magnificence_east_admin + } + name = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + NOT = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + } + text = coronation_events.0205.c_low_magnificence + } + name = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + } + text = coronation_events.0205.c + } + trigger = { + this = scope:host + has_regal_presence_trait_trigger = yes + NOR = { + has_disfiguring_physical_attribute_trigger = yes + has_trait = infirm + health <= dying_health + } + } + add_prestige = minor_prestige_gain + coronation_ceremony_county_effect = yes + if = { + limit = { + scope:activity.var:activity_special_type_progression >= 25 + } + stress_impact = { + arrogant = minor_stress_impact_loss + } + } + } + + option = { + name = coronation_events.0205.d + trigger = { + this != scope:host + } + } + + option = { # Magnificence is disastrous, pay gold to fix it + name = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + text = coronation_events.0205.e_east_admin + } + name = { + trigger = { + NOT = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + } + text = coronation_events.0205.e + } + trigger = { + this = scope:host + scope:activity.var:activity_special_type_progression < 25 + } + flavor = coronation_events.0205.e.tt + #AI often have worse coronations because they don't save up beforehand + if = { + limit = { + is_ai = no + } + remove_short_term_gold = massive_gold_value + } + else = { + remove_short_term_gold = major_gold_value + } + + custom_tooltip = coronation_tt_positive_massive + scope:activity = { activity_special_type_progression_massive = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_massive + CHAR = root + } + hidden_effect = { + involved_activity = { + every_attending_character = { + limit = { this != root } + send_interface_toast = { + title = coronation_events.0205.e.toast + left_icon = scope:host + custom_tooltip = coronation_tt_positive_massive # No effect, just the tooltip + } + } + } + } + ai_chance = { + base = 1 + modifier = { + short_term_gold <= massive_gold_value + factor = 0 + } + } + } + + option = { # Magnificence is disastrous, get stressed to try and fix it + name = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + text = coronation_events.0205.f_east_admin + } + name = { + trigger = { + NOT = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + } + text = coronation_events.0205.f + } + trigger = { + this = scope:host + scope:activity.var:activity_special_type_progression < 25 + } + flavor = coronation_events.0205.f.tt + duel = { + skills = { diplomacy learning } + value = decent_skill_rating + 65 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.0205.f.success + send_interface_toast = { + title = coronation_events.0205.f.success + left_icon = root + custom_tooltip = coronation_tt_positive_massive + scope:activity = { activity_special_type_progression_massive = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_massive + CHAR = root + } + } + hidden_effect = { + involved_activity = { + every_attending_character = { + limit = { this != root } + send_interface_toast = { + title = coronation_events.0205.f.toast + left_icon = scope:host + custom_tooltip = coronation_tt_positive_massive # No effect, just the tooltip + } + } + } + } + } + 35 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.0205.f.failure + send_interface_toast = { + title = coronation_events.0205.f.failure + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + if = { + limit = { is_ai = no } + stress_impact = { + base = massive_stress_impact_gain + } + } + else = { + stress_impact = { + base = major_stress_impact_gain + } + } + ai_chance = { + base = 0 + modifier = { + OR = { + diplomacy >= high_skill_rating + learning >= high_skill_rating + } + add = 1 + } + modifier = { + OR = { + ai_energy >= high_positive_ai_value + ai_sociability >= high_positive_ai_value + AND = { + ai_energy >= low_positive_ai_value + ai_sociability >= low_positive_ai_value + } + } + add = 0.1 + } + modifier = { + has_a_bad_stress_coping_trait_trigger = no + stress_level = 0 + NOR = { + diplomacy < low_skill_rating + learning < low_skill_rating + } + add = 0.25 + } + modifier = { + stress <= 15 + has_a_bad_stress_coping_trait_trigger = no + stress_level = 0 + NOR = { + diplomacy <= low_skill_rating + learning <= low_skill_rating + } + add = 0.25 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + + scope:audience_1 = { + silent_disappearance_effect = yes + } + scope:audience_2 = { + silent_disappearance_effect = yes + } + #Ask for clergy/nobility approval event + if = { + limit = { + root = scope:host + #God-Kings and the Mandate of Heaven-adjacent skip the assents + scope:host = { + NOR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_meritocratic + government_has_flag = government_is_mandala + government_is_japanese_trigger = yes + } + } + } + trigger_event = { + id = coronation_events.6120 + days = 3 + } + } + #God-Kings and the Mandate of Heaven-adjacent skip the assents - Host + else_if = { + limit = { + root = scope:host + scope:host = { + coronation_host_east_asian_admin_or_mandala_trigger = yes + } + } + #artifact blessing + trigger_event = { + id = coronation_events.6110 + days = 12 + } + } + #God-Kings and the Mandate of Heaven-adjacent skip the assents - Guest + else_if = { + limit = { + scope:host = { + OR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_meritocratic + government_has_flag = government_is_mandala + government_is_japanese_trigger = yes + } + } + } + #Anointment event + trigger_event = { + id = coronation_events.6130 + days = 9 + } + } + #Guest + else = { + trigger_event = { + id = coronation_events.6123 + days = 6 + } + } + } +} + +# Start of Feast Phase +coronation_events.0210 = { + type = activity_event + title = coronation_events.0210.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:activity.activity_host = root + } + desc = coronation_events.0210.desc.host + } + triggered_desc = { + trigger = { + scope:activity.activity_host != root + } + desc = coronation_events.0210.desc.guest + } + } + } + left_portrait = { + character = scope:attendee + triggered_animation = { + trigger = { + drinks_alcohol_trigger = yes + } + animation = drink_goblet + } + triggered_animation = { + trigger = { + NOR = { + AND = { + is_ai = no + is_in_guest_subset = { name = detractor } + } + involved_activity = { + is_target_in_variable_list = { + name = major_detractor + target = scope:attendee + } + } + has_activity_intent = coronation_disrupt_loyalists + } + } + animation = personality_content + } + animation = eyeroll + camera = camera_event_left_to_the_left + } + center_portrait = { + character = scope:activity.activity_host + animation = toast_goblet + camera = camera_event_center_pointing_slighty_left + } + right_portrait = { + character = scope:musician + animation = instrument_active + camera = camera_event_far_right_very_right + hide_info = yes + } + theme = coronation + override_background = { + reference = feast + } + + immediate = { + # For MP + coronation_busy_effect = yes + involved_activity = { + activity_host = { save_scope_as = host } + if = { + limit = { + NOT = { root = scope:host } + } + root = { save_scope_as = attendee } + } + else = { + random_attending_character = { + limit = { + NOR = { + this = scope:host + is_courtier_of = scope:host + } + } + save_scope_as = attendee + } + } + } + create_character = { + template = bard_template + dynasty = none + location = root.location + gender_female_chance = root_faith_dominant_gender_female_chance + save_scope_as = musician + } + if = { + limit = { + this = scope:host + } + scope:activity = { + coronation_update_supporters_detractors_effect = yes + } + } + } + + option = { + name = coronation_events.0210.a + trigger = { + scope:activity.activity_host = root + } + stress_impact = { + base = miniscule_stress_impact_loss + gluttonous = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + } + } + + option = { + name = coronation_events.0210.b + trigger = { + scope:activity.activity_host != root + } + stress_impact = { + gluttonous = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + } + } + + after = { + # For MP + coronation_ready_effect = yes + scope:musician = { + silent_disappearance_effect = yes + } + } +} + +scripted_effect coronation_events_0300_theocratic_candidate_effect = { + +} + +# Choosing an officiator +coronation_events.0300 = { + type = activity_event + title = coronation_events.0300.t + desc = coronation_events.0300.desc + left_portrait = { + character = scope:animation_1 + animation = personality_zealous + } + center_portrait = { + character = scope:animation_3 + animation = wedding_priest + } + right_portrait = { + character = scope:animation_2 + animation = chaplain + } + theme = coronation_activity + + trigger = { + NOT = { + involved_activity = { + has_variable = officiator + var:officiator ?= { + is_alive = yes + involved_activity ?= root.involved_activity + } + } + } + OR = { + cp:councillor_court_chaplain.involved_activity ?= involved_activity + involved_activity = { + any_attending_character = { + government_has_flag = government_is_theocracy + } + } + #Can be forcibly added to activity + cp:councillor_court_chaplain = { + coronation_events_0200_available_chaplain_trigger = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + if = { + limit = { + OR = { + cp:councillor_court_chaplain.involved_activity ?= involved_activity + cp:councillor_court_chaplain = { + coronation_events_0200_available_chaplain_trigger = yes + } + } + } + cp:councillor_court_chaplain = { + save_scope_as = chaplain + save_scope_as = animation_1 + } + #Forcibly add to activity if they ain't there + if = { + limit = { + NOT = { + exists = cp:councillor_court_chaplain.involved_activity + cp:councillor_court_chaplain.involved_activity = involved_activity + } + } + hidden_effect = { + cp:councillor_court_chaplain = { + set_location = root.location + add_to_activity_without_travel = root.involved_activity + } + } + } + } + + involved_activity = { + ordered_attending_character = { + limit = { + faith = root.faith + NOT = { scope:chaplain ?= this } + government_has_flag = government_is_theocracy + } + save_scope_as = alternative_1 + if = { + limit = { + NOT = { exists = scope:animation_1 } + } + save_scope_as = animation_1 + } + else = { + save_scope_as = animation_2 + } + } + ordered_attending_character = { + limit = { + faith = root.faith + NOR = { scope:alternative_1 ?= this scope:chaplain ?= this} + government_has_flag = government_is_theocracy + } + save_scope_as = alternative_2 + if = { + limit = { + NOT = { exists = scope:animation_1 } + } + save_scope_as = animation_1 + } + else = { + save_scope_as = animation_3 + } + } + } + } + + # Court Chaplain + option = { + name = coronation_events.0300.a + trigger = { + exists = scope:chaplain + } + involved_activity = { + set_variable = { + name = officiator + value = scope:chaplain + } + } + scope:chaplain = { + if = { + limit = { + this = faith.religious_head + } + root = { add_piety = medium_piety_gain } + } + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + if = { + limit = { + root = { highest_held_title_tier >= tier_empire } + } + add_piety = major_piety_gain + add_prestige = major_prestige_gain + } + else = { + add_piety = medium_piety_gain + add_prestige = medium_prestige_gain + } + } + + custom_tooltip = coronation_events_0300_a_tooltip + + ai_chance = { + base = 100 + modifier = { + add = 100 + scope:chaplain = { + is_vassal_of = root + } + } + } + } + + # Relevant character - 1 + option = { + name = coronation_events.0300.b + trigger = { + exists = scope:alternative_1 + } + involved_activity = { + set_variable = { + name = officiator + value = scope:alternative_1 + } + } + scope:alternative_1 = { + if = { + limit = { + this = faith.religious_head + } + root = { add_piety = medium_piety_gain } + } + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + if = { + limit = { + root = { highest_held_title_tier >= tier_empire } + } + add_piety = major_piety_gain + add_prestige = major_prestige_gain + } + else = { + add_piety = medium_piety_gain + add_prestige = medium_prestige_gain + } + } + + custom_tooltip = coronation_events_0300_b_tooltip + + ai_chance = { + base = 10 + modifier = { + add = 20 + scope:alternative_1 = { + is_vassal_of = root + } + } + } + } + + # Relevant character - 2 + option = { + name = coronation_events.0300.c + trigger = { + exists = scope:alternative_2 + } + involved_activity = { + set_variable = { + name = officiator + value = scope:alternative_2 + } + } + scope:alternative_2 = { + if = { + limit = { + this = faith.religious_head + } + root = { add_piety = medium_piety_gain } + } + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + if = { + limit = { + root = { highest_held_title_tier >= tier_empire } + } + add_piety = major_piety_gain + add_prestige = major_prestige_gain + } + else = { + add_piety = medium_piety_gain + add_prestige = medium_prestige_gain + } + } + + custom_tooltip = coronation_events_0300_c_tooltip + + ai_chance = { + base = 10 + modifier = { + add = 20 + scope:alternative_2 = { + is_vassal_of = root + } + } + } + } + + # Myself + option = { + name = coronation_events.0300.d + + custom_tooltip = coronation_events_0300_d_tooltip + #No effect if you are head of faith + if = { + limit = { + NAND = { + exists = faith.religious_head + this = faith.religious_head + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + custom_tooltip = coronation_events_0300_d_tooltip_effect_hof + } + else = { + custom_tooltip = coronation_events_0300_d_tooltip_effect + } + } + + + ai_chance = { + base = 0 + modifier = { + has_trait = cynical + add = 20 + } + modifier = { + has_trait = ambitious + add = 20 + } + modifier = { + has_trait = paranoid + add = 20 + } + modifier = { + has_trait = arrogant + add = 20 + } + modifier = { + culture = { has_cultural_pillar = heritage_iberian } + scope:chaplain ?= { + opinion = { + target = root + value >= 0 + } + } + add = 200 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + + involved_activity = { + var:officiator ?= { + add_character_flag = { + flag = coronation_officiator + years = 2 + } + } + } + } +} + +#Death of the Officiator +coronation_events.0301 = { + type = activity_event + title = coronation_events.0301.t + + desc = coronation_events.0301.desc + + theme = coronation_activity + + left_portrait = { + character = root + animation = personality_zealous + } + + center_portrait = { + character = scope:first_candidate + animation = wedding_priest + } + right_portrait = { + trigger = { + exists = scope:second_candidate + } + character = scope:second_candidate + animation = prayer + } + + lower_left_portrait = { + character = scope:dead_officiator + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + var:officiator ?= { + save_scope_as = dead_officiator + } + } + + if = { + limit = { + cp:councillor_court_chaplain ?= { + NOT = { this = scope:dead_officiator } + } + } + cp:councillor_court_chaplain = { + save_scope_as = first_candidate + } + } + else = { + create_character = { + template = virtuous_priest_character_template + location = scope:activity.activity_location + culture = scope:activity.activity_location.culture + faith = root.faith + save_scope_as = first_candidate + } + } + + scope:first_candidate = { + if = { + limit = { + NOT = { location = scope:activity.activity_location } + } + set_location = scope:activity.activity_location + } + if = { + limit = { + NOT = { involved_activity = root.involved_activity } + } + add_to_activity = root.involved_activity + } + } + if = { + limit = { + faith.religious_head = { #when in Rome + location.county = root.location.county + NOT = { + this = scope:first_candidate + } + } + + } + faith.religious_head = { + save_scope_as = second_candidate + } + } + else = { + involved_activity = { + ordered_attending_character = { + order_by = piety_level + limit = { + faith = root.faith + government_has_flag = government_is_theocracy + NOT = { this = scope:dead_officiator this = scope:first_candidate } + } + save_scope_as = second_candidate + } + } + } + save_scope_as = new_officiator #error suppresion + } + + option = { + name = coronation_events.0301.a + + custom_tooltip = coronation_events.0301.a.tooltip + + trigger = { + trigger_if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + is_ai = no + } + piety_level >= 4 + } + NAND = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + scope:second_candidate ?= root.faith.religious_head + } + } + + show_as_unavailable = { + NAND = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + scope:second_candidate ?= root.faith.religious_head + } + } + + scope:first_candidate = { + add_character_flag = { + flag = coronation_officiator + years = 2 + } + } + involved_activity = { + set_variable = { + name = officiator + value = scope:first_candidate + } + } + + ai_chance = { + base = 100 + } + } + + option = { + name = coronation_events.0301.b + + trigger = { + exists = scope:second_candidate + trigger_if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + NOT = { + scope:second_candidate = root.faith.religious_head #Whomst to prevent a new pope from blessing you + } + + } + scope:second_candidate.piety_level >= 4 + } + } + + show_as_unavailable = { + exists = scope:second_candidate + } + + custom_tooltip = coronation_events.0301.b.tooltip + + scope:second_candidate = { + add_character_flag = { + flag = coronation_officiator + years = 2 + } + } + involved_activity = { + set_variable = { + name = officiator + value = scope:second_candidate + } + } + } + + option = { + name = coronation_events.0301.c + + trigger = { + has_ce1_dlc_trigger = yes + } + custom_tooltip = coronation_events.0301.c.tooltip + custom_tooltip = coronation_events.0301.c.tooltip_second + custom_tooltip = coronation_events.0301.c.tooltip_third + + set_variable = { + name = dead_officiator_funeral + value = scope:dead_officiator + } + + + ai_chance = { + base = 0 + } + + add_character_flag = { + flag = cancelled_coronation + years = 1 + } + } + + option = { + name = coronation_events.0301.d + + custom_tooltip = coronation_events.0301.d.tooltip + + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + piety_level <= 3 + is_ai = no + NOT = { + scope:second_candidate ?= root.faith.religious_head + } + } + + add_piety_level = -1 + custom_tooltip = coronation_tt_negative_major + scope:activity = { activity_special_type_progression_negative_major = yes } + scope:first_candidate = { + add_character_flag = { + flag = coronation_officiator + years = 2 + } + } + involved_activity = { + set_variable = { + name = officiator + value = scope:first_candidate + } + } + } + + option = { + name = coronation_events.0301.e + + custom_tooltip = coronation_events.0301.e.tooltip + custom_tooltip = coronation_events.0301.e.tooltip_second + + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + is_ai = no + has_ce1_dlc_trigger = no + piety_level <= 3 + } + + add_character_flag = { + flag = cancelled_coronation + years = 1 + } + } + + + after = { + # For MP + coronation_ready_effect = yes + + scope:first_candidate = { + if = { + limit = { + NOR = { + has_character_flag = coronation_officiator + root.cp:councillor_court_chaplain = this + } + } + silent_disappearance_effect = yes + } + } + } + +} + +coronation_events.0302 = { + scope = none + hidden = yes + + immediate = { + if = { + limit = { + has_ach_dlc_trigger = yes + } + every_kingdom = { + holder ?= { + if = { + limit = { + is_independent_ruler = yes + is_alive = yes + coronation_trigger = yes + NOT = { + coronation_has_proper_artifact_trigger = yes + } + } + coronation_create_artifact_game_start_effect = yes + } + } + } + every_empire = { + holder ?= { + if = { + limit = { + is_independent_ruler = yes + is_alive = yes + coronation_trigger = yes + NOT = { + coronation_has_proper_artifact_trigger = yes + } + } + coronation_create_artifact_game_start_effect = yes + } + } + } + every_hegemony = { + holder ?= { + if = { + limit = { + is_independent_ruler = yes + is_alive = yes + coronation_trigger = yes + NOT = { + coronation_has_proper_artifact_trigger = yes + } + } + coronation_create_artifact_game_start_effect = yes + } + } + } + } + } +} + + +coronation_events.0310 = { + type = activity_event + title = coronation_events.0310.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:high_magnificence + } + desc = coronation_events.0310.desc.high_magnificence + } + triggered_desc = { + trigger = { + exists = scope:mid_magnificence + } + desc = coronation_events.0310.desc.mid_magnificence + } + triggered_desc = { + trigger = { + exists = scope:low_magnificence + } + desc = coronation_events.0310.desc.low_magnificence + } + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:impress_attendees + } + desc = coronation_events.0310.desc.impress_attendees + } + triggered_desc = { + trigger = { + exists = scope:weaken_detractors + } + desc = coronation_events.0310.desc.weaken_detractors + } + triggered_desc = { + trigger = { + exists = scope:embrace_supporters + } + desc = coronation_events.0310.desc.embrace_supporters + } + triggered_desc = { + trigger = { + exists = scope:exalt_crown + } + desc = coronation_events.0310.desc.exalt_crown + } + } + } + + theme = coronation_activity + + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:low_magnificence + } + animation = worry + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + } + animation = ecstasy + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + } + animation = personality_cynical + } + camera = camera_event_very_left + } + + override_effect_2d = { + trigger = { + exists = scope:high_magnificence + } + reference = legend_glow + } + + override_effect_2d = { + trigger = { + exists = scope:low_magnificence + } + reference = flies + } + + center_portrait = { + character = scope:first_char + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:impress_attendees + } + animation = dismissal + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:impress_attendees + } + animation = admiration + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:impress_attendees + } + animation = drink + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:weaken_detractors + } + animation = eyeroll + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:weaken_detractors + } + animation = fear + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:weaken_detractors + } + animation = shock + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:embrace_supporters + } + animation = eyeroll + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:embrace_supporters + } + animation = happiness + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:embrace_supporters + } + animation = personality_content + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:exalt_crown + } + animation = eyeroll + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:exalt_crown + } + animation = hero_flex + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:exalt_crown + } + animation = personality_rational + } + camera = camera_event_center_pointing_left + } + right_portrait = { + character = scope:second_char + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:impress_attendees + } + animation = personality_callous + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:impress_attendees + } + animation = personality_compassionate + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:impress_attendees + } + animation = reception_bride_right + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:weaken_detractors + } + animation = map_disgust + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:weaken_detractors + } + animation = personality_coward + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:weaken_detractors + } + animation = sadness + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:embrace_supporters + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:embrace_supporters + } + animation = obsequious_bow + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:embrace_supporters + } + animation = interested + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:exalt_crown + } + animation = personality_callous + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:exalt_crown + } + animation = personality_greedy + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:exalt_crown + } + animation = spymaster + } + } + + trigger = { + trigger_if = { + limit = { + has_activity_intent = coronation_impress_attendees + } + var:host_intent_start ?= flag:coronation_impress_attendees + } + trigger_else_if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + var:host_intent_start ?= flag:coronation_weaken_detractors + } + trigger_else_if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + var:host_intent_start ?= flag:coronation_embrace_supporters + } + trigger_else_if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + var:host_intent_start ?= flag:coronation_exalt_crown + } + trigger_else = { + always = no + } + } + + on_trigger_fail = { + trigger_event = coronation_events.0311 + } + + immediate = { + add_character_flag = no_coronation_events + # For MP + coronation_busy_effect = yes + + save_scope_as = host + custom_tooltip = happened_because_intent_tt + if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + save_scope_as = low_magnificence + set_variable = { + name = reward_tier + value = 1 + } + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression >= 75 + } + save_scope_as = high_magnificence + set_variable = { + name = reward_tier + value = 3 + } + } + else = { + save_scope_as = mid_magnificence + set_variable = { + name = reward_tier + value = 2 + } + } + set_variable = { + name = reward_tier_plus_one + value = { + add = var:reward_tier + add = 1 + } + } + set_variable = { + name = reward_tier_plus_two + value = { + add = var:reward_tier + add = 2 + } + } + switch = { + trigger = has_activity_intent + coronation_impress_attendees = { + save_scope_as = impress_attendees + scope:activity = { + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = prev + } + } + } + save_scope_as = first_char + } + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = prev + } + } + } + save_scope_as = second_char + } + } + } + coronation_weaken_detractors = { + save_scope_as = weaken_detractors + scope:activity = { + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = prev + } + } + } + save_scope_as = first_char + } + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = prev + } + } + NOT = { + this = scope:first_char + } + } + save_scope_as = second_char + } + } + } + coronation_embrace_supporters = { + save_scope_as = embrace_supporters + scope:activity = { + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = prev + } + } + } + save_scope_as = first_char + } + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = prev + } + } + NOT = { + this = scope:first_char + } + } + save_scope_as = second_char + } + } + } + coronation_exalt_crown = { + save_scope_as = exalt_crown + scope:activity = { + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = prev + } + } + } + save_scope_as = first_char + } + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = prev + } + } + NOT = { + this = scope:first_char + } + } + save_scope_as = second_char + } + } + } + } + if = { + limit = { + NOT = { exists = scope:first_char } + } + scope:activity = { + random_attending_character = { + limit = { + exists = scope:second_char + NOR = { + this = scope:second_char + this = root + } + } + save_scope_as = first_char + } + } + } + if = { + limit = { + NOT = { exists = scope:second_char } + } + scope:activity = { + random_attending_character = { + limit = { + exists = scope:first_char + NOR = { + this = scope:first_char + this = root + } + } + save_scope_as = second_char + } + } + } + } + + option = { #impress_attendees cultural acceptance + name = coronation_events.0310.a + trigger = { + exists = scope:impress_attendees + scope:activity = { + any_attending_character = { count >= 3 culture != scope:activity.activity_host.culture } + } + } + custom_tooltip = coronation_events.0310.a.reward.tooltip + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = stewardship + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.a.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.a.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.a.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:cultural_acceptance + } + } + + option = { #impress_attendees opinion gain + name = coronation_events.0310.b + trigger = { + exists = scope:impress_attendees + } + custom_tooltip = coronation_events.0310.b.reward.tooltip + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = diplomacy + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.b.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.b.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.b.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:opinion_gain + } + } + + option = { #impress_attendees legitimacy and prestige gain + name = coronation_events.0310.c + custom_tooltip = coronation_events.0310.c.reward.tooltip + trigger = { + exists = scope:impress_attendees + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = intrigue + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.c.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.c.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.c.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:legitimacy_and_prestige_gain + } + } + + option = { #weaken_detractors prevents detractors from joining new factions for x years + name = coronation_events.0310.d + trigger = { + exists = scope:weaken_detractors + } + custom_tooltip = coronation_events.0310.d.reward.tooltip + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = diplomacy + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.d.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.d.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.d.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:prevent_faction_joining + } + } + + option = { #weaken_detractors detractors more easily imprisoned + name = coronation_events.0310.e + custom_tooltip = coronation_events.0310.e.reward.tooltip + trigger = { + exists = scope:weaken_detractors + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = intrigue + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.e.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.e.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.e.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:easier_imprisonment + } + + } + + option = { #weaken_detractors stress 'em + name = coronation_events.0310.f + custom_tooltip = coronation_events.0310.f.reward.tooltip + trigger = { + exists = scope:weaken_detractors + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = learning + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.f.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.f.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.f.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:stress + } + } + + option = { #embrace_supporters supporter vassals get modifier that makes them better at being councillors + name = coronation_events.0310.g + custom_tooltip = coronation_events.0310.g.reward.tooltip + trigger = { + exists = scope:embrace_supporters + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = learning + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.g.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.g.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.g.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:better_councillors + } + } + + option = { #embrace_supporters supporter vassals get development boost to their realms + name = coronation_events.0310.h + custom_tooltip = coronation_events.0310.h.reward.tooltip + trigger = { + exists = scope:embrace_supporters + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = stewardship + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.h.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.h.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.h.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:vassal_development_boost + } + } + + option = { #embrace_supporters supporter vassals get defensive bonuses to their realms + name = coronation_events.0310.i + custom_tooltip = coronation_events.0310.i.reward.tooltip + trigger = { + exists = scope:embrace_supporters + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = martial + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.i.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.i.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.i.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:vassal_defensive_boost + } + } + + option = { #exalt_crown artifact boost + name = coronation_events.0310.j + custom_tooltip = coronation_events.0310.j.reward.tooltip + trigger = { + exists = scope:exalt_crown + any_character_artifact = { + count >= 3 + exists = this + } + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = learning + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.j.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.j.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.j.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:artifact_boost + } + } + + option = { #exalt_crown domain boost development + name = coronation_events.0310.k + custom_tooltip = coronation_events.0310.k.reward.tooltip + trigger = { + exists = scope:exalt_crown + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = stewardship + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.k.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.k.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.k.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:host_development_boost + } + } + + option = { #exalt_crown domain boost defense + name = coronation_events.0310.l + custom_tooltip = coronation_host_defense_boost_reward_tt + trigger = { + exists = scope:exalt_crown + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = martial + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.l.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.l.success + } + change_variable = { + name = reward_tier + add = 1 + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.l.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:host_defense_boost + } + } + + after = { + # For MP + coronation_ready_effect = yes + + trigger_event = coronation_events.0311 + } +} + +coronation_events.0311 = { #Host ending event + type = activity_event + title = coronation_events.0311.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + trigger_if = { + limit = { + OR = { + exists = scope:high_magnificence + exists = scope:low_magnificence + exists = scope:mid_magnificence + } + } + exists = scope:high_magnificence + } + trigger_else = { + scope:activity.var:activity_special_type_progression >= 75 + } + } + desc = coronation_events.0311.desc.high_magnificence + } + triggered_desc = { + trigger = { + trigger_if = { + limit = { + OR = { + exists = scope:high_magnificence + exists = scope:low_magnificence + exists = scope:mid_magnificence + } + } + exists = scope:mid_magnificence + } + trigger_else = { + scope:activity.var:activity_special_type_progression >= 25 + } + } + desc = coronation_events.0311.desc.mid_magnificence + } + desc = coronation_events.0311.desc.low_magnificence + } + } + + theme = coronation_activity + + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:low_magnificence + } + animation = shame + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + } + animation = happiness + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + } + animation = personality_honorable + } + } + + override_effect_2d = { + trigger = { + exists = scope:high_magnificence + } + reference = legend_glow + } + + override_effect_2d = { + trigger = { + exists = scope:low_magnificence + } + reference = flies + } + + immediate = { + coronation_completed_log_entry_effect = yes + if = { + limit = { + has_variable = host_intent_start + } + scope:activity = { ach_host_intent_rewards_effect = yes } + } + } + + option = { + name = coronation_events.0311.a + } + after = { + #We trigger the guest goodbye event here to make sure the guest player is notified about the host intent reward + scope:activity = { + every_attending_character = { + limit = { + is_ai = no + NOT = { this = scope:activity.activity_host } + } + trigger_event = coronation_events.0312 + } + } + #reward variable cleanup + remove_variable = reward_tier + remove_variable = reward_tier_plus_one + remove_variable = reward_tier_plus_two + remove_variable = host_had_intent_reward + } +} + +coronation_events.0312 = { #Guest ending event + type = activity_event + title = coronation_events.0312.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:high_magnificence + } + desc = coronation_events.0310.desc.high_magnificence + } + triggered_desc = { + trigger = { + exists = scope:mid_magnificence + } + desc = coronation_events.0310.desc.mid_magnificence + } + triggered_desc = { + trigger = { + exists = scope:low_magnificence + } + desc = coronation_events.0310.desc.low_magnificence + } + } + } + + theme = coronation_activity + + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:low_magnificence + } + animation = eyeroll + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + } + animation = admiration + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + } + animation = personality_forgiving + } + } + + right_portrait = { + character = scope:activity.activity_host + triggered_animation = { + trigger = { + exists = scope:low_magnificence + } + animation = shame + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + } + animation = happiness + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + } + animation = frontend_right_idle + } + } + + override_effect_2d = { + trigger = { + scope:province = { + exists = scope:high_magnificence + } + } + reference = legend_glow + } + + override_effect_2d = { + trigger = { + scope:province = { + exists = scope:low_magnificence + } + } + reference = flies + } + + immediate = { + create_character_memory = { + type = witnessed_a_coronation_memory + participants = { + host = scope:activity.activity_host + } + } + if = { + limit = { + OR = { + scope:first_reward_target ?= this + scope:second_reward_target ?= this + scope:third_reward_target ?= this + scope:fourth_reward_target ?= this + scope:fifth_reward_target ?= this + scope:first_reward_target ?= culture + scope:second_reward_target ?= culture + scope:third_reward_target ?= culture + scope:fourth_reward_target ?= culture + scope:fifth_reward_target ?= culture + } + } + switch = { + trigger = scope:activity.activity_host.var:host_had_intent_reward + flag:cultural_acceptance = { + custom_tooltip = coronation_events.0312.cultural_acceptance + } + flag:better_councillors = { + custom_tooltip = coronation_events.0312.better_councillors + } + flag:vassal_development_boost = { + custom_tooltip = coronation_events.0312.vassal_development_boost + } + flag:vassal_defensive_boost = { + custom_tooltip = coronation_events.0312.vassal_defensive_boost + } + } + } + show_as_tooltip = { + coronation_completed_log_entry_effect = yes + ach_host_intent_rewards_tooltip_effect = yes + } + } + + option = { + name = coronation_events.0312.a + } +} + +coronation_events.0400 = { # HoF supports anointment + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = coronation_events.0400.desc + sender = scope:recipient + + option = { + name = coronation_events.0400.a + if = { + limit = { + is_ai = yes + } + #AI should attempt to hold their coronation RIGHT NOW + ai_attempt_to_host_activity = activity_coronation + debug_log = "AI attempted to host a coronation" + debug_log_scopes = yes + } + } +} diff --git a/N3OW/events/activities/coronation_activity/coronation_events_1.txt b/N3OW/events/activities/coronation_activity/coronation_events_1.txt new file mode 100644 index 00000000..431b2343 --- /dev/null +++ b/N3OW/events/activities/coronation_activity/coronation_events_1.txt @@ -0,0 +1,10383 @@ +namespace = coronation_events + +##################################### +# Coronation - Flavour Events # +# coronation_events - 1000-1999 # +##################################### + +# Bard disses you at your coronation +coronation_events.1000 = { + type = activity_event + title = coronation_events.1000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = has_rival + } + desc = coronation_events.1000.rival.desc + } + triggered_desc = { + trigger = { + has_character_flag = low_county_opinion + } + desc = coronation_events.1000.low_county_opinion.desc + } + triggered_desc = { + trigger = { + has_character_flag = tyrant + } + desc = coronation_events.1000.tyrant.desc + } + desc = coronation_events.1000.desc_fallback + } + } + right_portrait = { + trigger = { exists = scope:rival } + character = scope:rival + animation = schadenfreude + } + center_portrait = { + character = scope:bard + animation = instrument_active + } + left_portrait = { + character = root + animation = boredom + } + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + OR = { + scope:activity = { + any_attending_character = { + has_relation_rival = root + NOT = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + } + } + scope:activity.activity_location.county = { + county_opinion < 0 + } + tyranny >= 20 + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + grab_appropriate_bard_effect = yes + if = { + limit = { + scope:activity = { + any_attending_character = { + has_relation_rival = root + } + } + } + scope:activity = { + random_attending_character = { + limit = { + has_relation_rival = root + NOT = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + } + save_scope_as = rival + } + } + add_character_flag = { + flag = has_rival + } + } + if = { + limit = { + scope:activity.activity_location.county = { + county_opinion < 0 + } + } + add_character_flag = { + flag = low_county_opinion + } + } + if = { + limit = { + tyranny > 20 + } + add_character_flag = { + flag = tyrant + } + } + } + + # bribe + option = { + name = coronation_events.1000.bribe + pay_short_term_gold = { + target = scope:bard + gold = activity_minor_gold_value + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + stress_impact = { + base = minor_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_gold < activity_minor_gold_value + } + } + } + } + + # diplo duel rap battle + option = { + name = coronation_events.1000.epic_rap_battle + trigger = { + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + has_trait = gregarious + has_trait = eccentric + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 50 + } + diplomacy > 18 + has_trait = lifestyle_reveler + } + + } + duel = { + skill = diplomacy + target = scope:bard + # the bard gets destroyed by you + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1000.epic_rap_battle.tt.success + send_interface_toast = { + title = coronation_events.1000.epic_rap_battle.tt.success + left_icon = scope:bard + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + } + } + # the bard destroys you + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1000.epic_rap_battle.tt.failure + send_interface_toast = { + title = coronation_events.1000.epic_rap_battle.tt.failure + left_icon = scope:bard + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + diplomacy < 15 + } + modifier = { + factor = 0 + has_trait = shy + } + } + } + + # remove the bard by force + option = { + name = coronation_events.1000.guards + if = { + limit = { + scope:bard = { + is_ai = yes + } + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:bard + IMPRISONER = root + } + } + + add_dread = medium_dread_gain + stress_impact = { + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = humble + } + } + ai_value_modifier = { + ai_vengefulness = 50 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + + if = { + limit = { + has_character_flag = low_county_opinion + } + remove_character_flag = low_county_opinion + } + if = { + limit = { + has_character_flag = has_rival + } + remove_character_flag = has_rival + } + if = { + limit = { + has_character_flag = tyrant + } + remove_character_flag = tyrant + } + } +} + +# Crown has disappeared! +coronation_events.1002 = { + type = activity_event + title = coronation_events.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:rival + } + desc = coronation_events.1002.rival.desc + } + desc = coronation_events.1002.desc + } + } + left_portrait = { + trigger = { exists = scope:rival } + character = scope:rival + animation = schadenfreude + } + + right_portrait = { + character = scope:helper + animation = worry + } + + center_portrait = { + character = root + animation = survey + camera = camera_event_left + } + theme = coronation_activity + cooldown = { years = 5 } + override_background = { + reference = sitting_room + } + + trigger = { + scope:activity = { + any_guest_subset = { + name = supporter + } + } + OR = { + stewardship < 9 + scope:activity = { + any_attending_character = { + has_relation_rival = root + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + root.involved_activity = { save_scope_as = activity } + scope:activity = { + random_attending_character = { + limit = { + has_relation_rival = root + } + save_scope_as = rival + } + + random_guest_subset = { + name = supporter + save_scope_as = helper + } + } + } + + # organize the mess + option = { + name = coronation_events.1002.find + trigger = { + stewardship >= high_skill_rating + } + + add_stewardship_lifestyle_xp = medium_lifestyle_xp + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + intrigue > stewardship + } + } + } + + # counterfeit the missing thing + option = { + name = coronation_events.1002.counterfeit + trigger = { + intrigue >= high_skill_rating + } + + add_intrigue_lifestyle_xp = medium_lifestyle_xp + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + stewardship > intrigue + } + } + } + + # lash the servants + option = { + name = coronation_events.1002.hold + trigger = { + NOT = { + exists = scope:rival + } + } + + add_dread = minor_dread_gain + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + stress_impact = { + compassionate = minor_stress_impact_gain + wrathful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 0 + modifier = { + factor = 50 + OR = { + AND = { + intrigue < 10 + stewardship < 12 + } + OR = { + has_trait = sadistic + has_trait = wrathful + } + } + } + } + } + + # Well you... + option = { + name = coronation_events.1002.accuse + flavor = coronation_events.1002.accuse.flavor + trigger = { + exists = scope:rival + } + + scope:rival = { + increase_wounds_no_death_effect = { REASON = fight } + } + if = { + limit = { + OR = { + scope:rival = { is_ai = yes } + AND = { + scope:rival = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_nemesis_effect = { + REASON = rival_crown_stolen + CHARACTER = scope:rival + OPINION = 0 + } + } + + stress_impact = { + wrathful = minor_stress_impact_loss + calm = minor_stress_impact_gain + } + + ai_chance = { + base = 0 + modifier = { + factor = 50 + has_trait = wrathful + } + ai_value_modifier = { + ai_vengefulness = 50 + } + } + } + + # you got a friend in me + option = { + name = coronation_events.1002.friend + trigger = { + scope:helper ?= { + intrigue >= 12 + } + } + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + if = { + limit = { + reverse_opinion = { + target = scope:helper + value >= 30 + } + OR = { + scope:helper = { is_ai = yes } + AND = { + scope:helper = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_help_with_crown + CHARACTER = scope:helper + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:helper + modifier = friendliness_opinion + opinion = 25 + } + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:helper } + + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = gregarious + } + ai_value_modifier = { + ai_vengefulness = -50 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Guest overhears some pretty secret conversation (feast shared event) +coronation_events.1004 = { + type = activity_event + title = coronation_events.1004.t + desc = coronation_events.1004.desc + right_portrait = { + character = scope:spy + camera = camera_event_right + animation = war_over_tie + } + + center_portrait = { + character = scope:confidant + camera = camera_event_right + animation = flirtation_left + } + + left_portrait = { + character = root + animation = worry + camera = camera_event_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + is_ruler = yes + scope:activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + any_secret = { + is_known_by = root + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity.activity_host ?= { save_scope_as = host } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + any_secret = { + is_known_by = root + } + } + save_scope_as = confidant + } + } + + random_known_secret = { + limit = { + secret_owner = scope:confidant + is_known_by = root + } + + save_scope_as = secret_to_reveal + } + + create_character = { + template = intrigue_court_position_holder_template + location = root.location + faith = scope:activity.activity_location.faith + culture = scope:activity.activity_location.culture + gender_female_chance = 50 + save_scope_as = spy + } + scope:spy = { + add_to_activity_without_travel = scope:activity + } + } + + # bribe the spy + option = { + name = coronation_events.1004.bribe + trigger = { + short_term_gold >= activity_minor_gold_value + NOT = { intrigue >= high_skill_rating } + } + pay_short_term_gold = { + target = scope:spy + gold = activity_minor_gold_value + } + if = { + limit = { + reverse_opinion = { + target = scope:confidant + value > 30 + } + OR = { + scope:confidant = { is_ai = yes } + AND = { + scope:confidant = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_kept_secret + CHARACTER = scope:confidant + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:confidant + modifier = trust_opinion + opinion = 25 + } + } + if = { + limit = { + this = scope:host + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:confidant } + } + + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_gold < activity_minor_gold_value + } + } + } + } + + # wow, cool. Come work for me. + option = { + name = coronation_events.1004.recruit + trigger = { + intrigue >= high_skill_rating + } + add_courtier = scope:spy + scope:secret_to_reveal = { + reveal_to = scope:spy + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 50 + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + # not so fast, you little rat! + option = { + name = coronation_events.1004.intimidation + duel = { + skills = { intrigue prowess } + target = scope:spy + # the spy cowers + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1004.intimidation.tt.success + send_interface_toast = { + title = coronation_events.1004.intimidation.tt.success + left_icon = scope:spy + add_dread = minor_dread_gain + if = { + limit = { + reverse_opinion = { + target = scope:confidant + value > 30 + } + OR = { + scope:confidant = { is_ai = yes } + AND = { + scope:confidant = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_kept_secret + CHARACTER = scope:confidant + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:confidant + modifier = trust_opinion + opinion = 25 + } + } + if = { + limit = { + this = scope:host + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:confidant } + } + } + } + # the spy scoffs + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1004.intimidation.tt.failure + send_interface_toast = { + title = coronation_events.1004.intimidation.tt.failure + left_icon = scope:spy + scope:secret_to_reveal = { + expose_secret = scope:spy + } + } + } + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + intrigue < 15 + prowess < 15 + } + } + } + } + + # call the guards + option = { + name = coronation_events.1004.guards + trigger = { + this = scope:host + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:spy + IMPRISONER = root + } + + scope:secret_to_reveal = { + reveal_to = scope:spy + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 50 + } + } + } + + # opt-out + option = { + name = coronation_events.1004.opt-out + trigger = { + this != scope:host + } + + scope:secret_to_reveal = { + expose_secret = scope:spy + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + scope:secret_to_reveal.secret_owner = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + if = { + limit = { + is_ai = yes + } + scope:spy ?= { + if = { + limit = { + NOT = { + is_courtier_of = root + is_imprisoned_by = root + } + } + silent_disappearance_effect = yes + } + } + } + } +} + +# two guests arguing to see who goes in first +coronation_events.1007 = { + type = activity_event + title = coronation_events.1007.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.1007.desc + } + desc = coronation_events.1007.guest.desc + } + } + left_portrait = { + character = scope:host + camera = camera_event_chariot_very_left_hippodrome + animation = schadenfreude + } + + center_portrait = { + character = scope:first_guest + scripted_animation = { + triggered_animation = { + trigger = { + OR = { + scope:first_guest = { number_of_commander_traits >= 1 } + scope:first_guest = { is_knight = yes } + } + } + animation = marshal_random_weapon + } + animation = disapproval + } + } + + right_portrait = { + character = scope:second_guest + animation = interested + } + theme = coronation_activity + + override_background = { + trigger = { + #Don't want Constantinople background for depth perspective chars + location.county = title:c_byzantion + } + reference = bp2_courtyard + } + + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + OR = { + is_of_major_interest_trigger = { CHARACTER = scope:activity.activity_host } + is_of_minor_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + NOR = { + this = root + this = scope:activity.activity_host + } + count >= 2 + } + } + trigger_if = { + limit = { + NOT = { + this = scope:activity.activity_host + } + } + OR = { + is_of_major_interest_trigger = { CHARACTER = scope:activity.activity_host } + is_of_minor_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity.activity_host ?= { save_scope_as = host } + + if = { + limit = { + this = scope:host + } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + } + is_of_major_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + alternative_limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + } + is_of_minor_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + save_scope_as = first_guest + } + } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + this = scope:first_guest + } + is_of_major_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + alternative_limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + this = scope:first_guest + } + is_of_minor_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + save_scope_as = second_guest + } + } + } + else = { + save_scope_as = first_guest + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + this = scope:first_guest + } + is_of_major_interest_trigger = { CHARACTER = involved_activity.activity_host } + } + alternative_limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + this = scope:first_guest + } + is_of_minor_interest_trigger = { CHARACTER = involved_activity.activity_host } + } + save_scope_as = second_guest + } + } + } + } + + # guest option: be the bigger person + option = { + trigger = { + root = scope:first_guest + } + name = coronation_events.1007.bigger + + add_piety = minor_piety_gain + + stress_impact = { + arbitrary = minor_stress_impact_gain + impatient = minor_stress_impact_gain + cynical = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -50 + } + } + } + + # guest option: demand to go first + option = { + trigger = { + root = scope:first_guest + } + name = coronation_events.1007.demand + if = { + limit = { + OR = { + scope:second_guest = { is_ai = yes } + AND = { + scope:second_guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_rival_effect = { + REASON = rival_demanded_to_go_first + CHARACTER = scope:second_guest + OPINION = 0 + } + } + + stress_impact = { + patient = minor_stress_impact_gain + temperate = minor_stress_impact_gain + content = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 50 + } + } + } + + # host option: diplo solution + option = { + trigger = { + root = scope:host + diplomacy >= high_skill_rating + } + show_as_unavailable = { + diplomacy < high_skill_rating + root = scope:host + } + name = coronation_events.1007.appease + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + scope:first_guest = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + scope:second_guest = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + stress_impact = { + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = diplomacy + } + modifier = { + add = -20 + OR = { + has_trait = impatient + has_trait = callous + has_trait = lazy + } + } + } + } + + # host option: choose first guest + option = { + trigger = { + root = scope:host + } + name = coronation_events.1007.first_guest + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:first_guest + } + } + add_hook = { + type = favor_hook + target = scope:first_guest + } + } + reverse_add_opinion = { + target = scope:first_guest + modifier = grateful_opinion + opinion = 25 + } + if = { + limit = { + this = scope:host + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:first_guest } + } + + + stress_impact = { + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:first_guest + multiplier = 0.5 + } + modifier = { + scope:second_guest.current_military_strength > scope:first_guest.current_military_strength + add = -50 + } + } + } + + # host option: choose second guest + option = { + trigger = { + root = scope:host + } + name = coronation_events.1007.second_guest + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:second_guest + } + } + add_hook = { + type = favor_hook + target = scope:second_guest + } + } + + reverse_add_opinion = { + target = scope:second_guest + modifier = grateful_opinion + opinion = 25 + } + + if = { + limit = { + this = scope:host + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:second_guest } + } + + stress_impact = { + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:second_guest + multiplier = 0.5 + } + modifier = { + scope:first_guest.current_military_strength > scope:second_guest.current_military_strength + add = -50 + } + } + } + + #opt-out + option = { + trigger = { + root = scope:host + } + name = coronation_events.1007.opt_out + + stress_impact = { + base = minor_stress_impact_loss + patient = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + add = 20 + OR = { + has_trait = impatient + has_trait = callous + has_trait = lazy + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +scripted_effect coronation_events_1011_reward_effect = { + switch = { + trigger = has_trait + education_$SKILL$_1 = { + scope:ancestor_artifact = { + add_artifact_modifier = artifact_monthly_$SKILL$_lifestyle_xp_1_modifier + } + } + education_$SKILL$_2 = { + scope:ancestor_artifact = { + add_artifact_modifier = artifact_monthly_$SKILL$_lifestyle_xp_2_modifier + } + } + education_$SKILL$_3 = { + scope:ancestor_artifact = { + add_artifact_modifier = artifact_monthly_$SKILL$_lifestyle_xp_3_modifier + } + } + education_$SKILL$_4 = { + scope:ancestor_artifact = { + add_artifact_modifier = artifact_monthly_$SKILL$_lifestyle_xp_4_modifier + } + } + education_$SKILL$_5 = { + scope:ancestor_artifact = { + add_artifact_modifier = artifact_monthly_$SKILL$_lifestyle_xp_4_modifier + #add_artifact_modifier = artifact_$SKILL$_per_prestige_level_modifier + } + } + } + custom_tooltip = coronation_events.1011.root_reward.tt +} + +# decide upon new bonuses for your crown +coronation_events.1011 = { + type = activity_event + title = coronation_events.1011.t + desc = coronation_events.1011.desc + override_background = { + reference = relaxing_room + } + left_portrait = { + character = root + animation = admiration + camera = camera_event_center + } + right_portrait = { + character = scope:priest + animation = crowning + } + + lower_right_portrait = { + character = scope:previous_holder + } + + artifact = { + position = lower_left_portrait + target = scope:ancestor_artifact + trigger = { exists = scope:ancestor_artifact } + } + theme = coronation_activity + + cooldown = { years = 5 } + + trigger = { + coronation_living_officiator_trigger = yes + has_activity_intent = coronation_exalt_crown + exists = primary_title.previous_holder + primary_title.previous_holder = { + has_same_education_trait_as_root_trigger = no + } + trigger_if = { + limit = { + coronation_proper_artifact_crown_trigger = yes + } + any_character_artifact = { + artifact_slot_type = helmet + } + } + trigger_else_if = { + limit = { + coronation_proper_artifact_regalia_trigger = yes + } + any_character_artifact = { + artifact_slot_type = regalia + } + } + trigger_else = { + any_character_artifact = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + involved_activity.var:officiator ?= { + save_scope_as = priest + } + if = { + limit = { + coronation_proper_artifact_crown_trigger = yes + } + random_character_artifact = { + limit = { + artifact_slot_type = helmet + } + save_scope_as = ancestor_artifact + } + } + else_if = { + limit = { + coronation_proper_artifact_regalia_trigger = yes + } + random_character_artifact = { + limit = { + artifact_slot_type = regalia + } + save_scope_as = ancestor_artifact + } + } + else = { + random_character_artifact = { + limit = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + save_scope_as = ancestor_artifact + } + } + + primary_title = { + previous_holder ?= { save_scope_as = previous_holder } + } + } + + # refit + option = { + name = coronation_events.1011.refit + add_prestige = medium_prestige_gain + switch = { + trigger = has_trait + education_diplomacy = { + coronation_events_1011_reward_effect = { SKILL = diplomacy } + } + education_martial = { + coronation_events_1011_reward_effect = { SKILL = martial } + } + education_stewardship = { + coronation_events_1011_reward_effect = { SKILL = stewardship } + } + education_intrigue = { + coronation_events_1011_reward_effect = { SKILL = intrigue } + } + education_learning = { + coronation_events_1011_reward_effect = { SKILL = learning } + } + } + + stress_impact = { + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -50 + } + } + } + + # roll with it + option = { + name = coronation_events.1011.previous + if = { + limit = { + exists = root.dynasty + scope:previous_holder = { + dynasty ?= root.dynasty + } + } + dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + } + else = { + add_legitimacy = miniscule_legitimacy_gain + } + scope:previous_holder = { + switch = { + trigger = has_trait + education_diplomacy = { + coronation_events_1011_reward_effect = { SKILL = diplomacy } + } + education_martial = { + coronation_events_1011_reward_effect = { SKILL = martial } + } + education_stewardship = { + coronation_events_1011_reward_effect = { SKILL = stewardship } + } + education_intrigue = { + coronation_events_1011_reward_effect = { SKILL = intrigue } + } + education_learning = { + coronation_events_1011_reward_effect = { SKILL = learning } + } + } + } + + stress_impact = { + ambitious = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 50 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + + +# Main dish in the banquet is undercooked (feast shared event) +coronation_events.1012 = { + type = activity_event + title = coronation_events.1012.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.1012.host.desc + } + desc = coronation_events.1012.guest.desc + } + } + center_portrait = { + character = scope:guest + camera = camera_event_center + animation = anger + } + + left_portrait = { + character = scope:host + animation = stunned + camera = camera_event_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + is_vegetarian_trigger = no + trigger_if = { + limit = { + scope:activity = { + has_activity_type = activity_coronation + } + } + scope:activity = { + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_austere + } + } + } + trigger_if = { + limit = { + scope:activity = { + has_activity_type = activity_feast + } + } + scope:activity = { + has_activity_option = { + category = feast_option_food + option = feast_food_bad + } + } + } + # to avoid getting similar accident-adjacent events in succession + NOT = { + has_character_flag = poor_activity_option_accident + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + add_character_flag = { + flag = poor_activity_option_accident + years = 5 + } + scope:activity.activity_host ?= { save_scope_as = host } + + if = { + limit = { + this = scope:host + } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + } + save_scope_as = guest + } + } + } + else = { + save_scope_as = guest + } + } + + # EAT IT. + option = { + name = coronation_events.1012.eat_it + trigger = { + this = scope:host + has_activity_intent = coronation_weaken_detractors + scope:guest = { + is_in_guest_subset = { name = detractor } + } + } + + scope:guest = { + show_as_tooltip = { add_trait = ill } + hidden_effect = { + trigger_event = { + id = health.1001 + days = { 3 10 } + } + } + } + if = { + limit = { + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_rival_effect = { + REASON = rival_forced_bad_food + CHARACTER = scope:guest + OPINION = -20 + } + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + vengeful = minor_stress_impact_loss + callous = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + modifier = { + add = 20 + OR = { + has_trait = vengeful + has_trait = callous + } + } + } + } + + # send back + option = { + name = coronation_events.1012.back + trigger = { + this = scope:host + } + + reverse_add_opinion = { + target = scope:guest + modifier = grateful_opinion + opinion = 25 + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:guest } + + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + stress_impact = { + temperate = minor_stress_impact_loss + gluttonous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = gluttonous + } + modifier = { + add = 20 + has_trait = temperate + } + } + } + + # new trend + option = { + name = coronation_events.1012.trend + trigger = { + this = scope:host + stewardship >= high_skill_rating + } + show_as_unavailable = { + this = scope:host + stewardship < high_skill_rating + } + + random = { + chance = 10 + show_as_tooltip = { add_trait = ill } + hidden_effect = { + trigger_event = { + id = health.1001 + days = { 3 10 } + } + } + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + ai_chance = { + base = 0 + } + } + + # complain + option = { + name = coronation_events.1012.complain + trigger = { + this = scope:guest + } + + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + stress_impact = { + base = minor_stress_impact_gain + gluttonous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = gluttonous + } + } + } + + # just munch down + option = { + name = coronation_events.1012.munch + trigger = { + this = scope:guest + } + + random = { + chance = 10 + show_as_tooltip = { add_trait = ill } + hidden_effect = { + trigger_event = { + id = health.1001 + days = { 3 10 } + } + } + } + + scope:host = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + + stress_impact = { + gluttonous = medium_stress_impact_loss + } + + ai_chance = { + base = 0 + modifier = { + factor = 50 + has_trait = gluttonous + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# A torch accident sets something on fire (feast shared event) +coronation_events.1013 = { + type = activity_event + title = coronation_events.1013.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.1013.host.desc + } + desc = coronation_events.1013.guest.desc + } + } + right_portrait = { + character = scope:guest + camera = camera_event_right + animation = drink + } + + center_portrait = { + character = root + animation = shock + camera = camera_event_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + override_effect_2d = { + reference = smoke + } + + trigger = { + trigger_if = { + limit = { + involved_activity = { + has_activity_type = activity_coronation + } + } + involved_activity = { + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_austere + } + } + } + trigger_if = { + limit = { + involved_activity = { + has_activity_type = activity_feast + } + } + involved_activity = { + has_activity_option = { + category = feast_option_food + option = feast_food_bad + } + } + } + # to avoid getting similar accident-adjacent events in succession + NOT = { + has_character_flag = poor_activity_option_accident + } + involved_activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + involved_activity.var:officiator ?= this + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity.activity_host ?= { save_scope_as = host } + add_character_flag = { + flag = poor_activity_option_accident + years = 5 + } + + if = { + limit = { + this = scope:host + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + } + if = { + limit = { + is_ai = yes + } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + involved_activity.var:officiator ?= this + } + } + save_scope_as = guest + } + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + } + save_scope_as = guest + } + } + } + } + + # burn! + option = { + name = coronation_events.1013.burn + trigger = { + OR = { + AND = { + root = scope:host + has_activity_intent = coronation_weaken_detractors + scope:guest = { + is_in_guest_subset = { name = detractor } + } + } + AND = { + NOT = { + this = scope:host + } + has_activity_intent = coronation_offer_support + scope:guest = { + is_in_guest_subset = { name = detractor } + } + } + AND = { + NOT = { + this = scope:host + } + has_activity_intent = coronation_disrupt_loyalists + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + } + } + + scope:guest = { + increase_wounds_no_death_effect = { REASON = burned } + } + + if = { + limit = { + this = scope:host + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + + if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + coronation_weaken_detractors_opinion_effect = yes + } + + stress_impact = { + base = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + } + } + + # make sure guest doesn't get hurt + option = { + name = coronation_events.1013.hero + trigger = { + OR = { + has_trait = brave + has_trait = compassionate + has_trait = reckless + AND = { + root = scope:host + has_activity_intent = coronation_embrace_supporters + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + AND = { + root = scope:host + has_activity_intent = coronation_impress_attendees + } + } + } + + increase_wounds_no_death_effect = { REASON = burned } + + add_prestige = medium_prestige_gain + + if = { + limit = { + root = scope:host + has_activity_intent = coronation_impress_attendees + } + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + } + + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + if = { + limit = { + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_saved_fire + CHARACTER = scope:guest + OPINION = 20 + } + } + coronation_embrace_supporters_opinion_effect = yes + } + + stress_impact = { + brave = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + } + } + + # snuff out the fire + option = { + name = coronation_events.1013.snuff_out + trigger = { + learning >= high_skill_rating + } + show_as_unavailable = { + learning < high_skill_rating + } + if = { + limit = { + OR = { + is_ai = no + this = scope:activity.activity_host + is_in_guest_subset = { name = supporter } + has_activity_intent = coronation_offer_support + } + } + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + } + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + if = { + limit = { + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_saved_fire + CHARACTER = scope:guest + OPINION = 20 + } + } + coronation_embrace_supporters_opinion_effect = yes + } + add_learning_lifestyle_xp = medium_lifestyle_xp + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = craven + } + modifier = { + add = 25 + has_trait = brave + } + } + } + + # effortlessly douse the fire + option = { + name = coronation_events.1013.douse + trigger = { + prowess >= high_skill_rating + } + show_as_unavailable = { + prowess < high_skill_rating + } + add_prestige = minor_prestige_gain + if = { + limit = { + OR = { + is_ai = no + this = scope:activity.activity_host + is_in_guest_subset = { name = supporter } + has_activity_intent = coronation_offer_support + } + } + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + } + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + if = { + limit = { + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_saved_fire + CHARACTER = scope:guest + OPINION = 20 + } + } + coronation_embrace_supporters_opinion_effect = yes + } + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = craven + } + modifier = { + add = 25 + has_trait = brave + } + } + } + + # run! + option = { + name = coronation_events.1013.run + + scope:guest = { + increase_wounds_no_death_effect = { REASON = burned } + } + + add_prestige = minor_prestige_loss + + stress_impact = { + brave = medium_stress_impact_gain + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = brave + } + modifier = { + add = 25 + has_trait = craven + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Guests stampede over a rumor of food scarcity (feast shared event) +coronation_events.1014 = { + type = activity_event + title = coronation_events.1014.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.1014.host.desc + } + desc = coronation_events.1014.guest.desc + } + } + right_portrait = { + character = scope:guest + camera = camera_event_left + animation = disbelief + } + + left_portrait = { + character = root + animation = paranoia + camera = camera_event_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + trigger_if = { + limit = { + scope:activity = { + has_activity_type = activity_feast + } + } + scope:activity = { + has_activity_option = { + category = feast_option_food + option = feast_food_bad + } + } + } + trigger_if = { + limit = { + scope:activity = { + has_activity_type = activity_coronation + } + } + scope:activity = { + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_austere + } + } + } + # to avoid getting similar accident-adjacent events in succession + NOT = { + has_character_flag = poor_activity_option_accident + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + add_character_flag = { + flag = poor_activity_option_accident + years = 5 + } + scope:activity.activity_host ?= { save_scope_as = host } + if = { + limit = { + this = scope:host + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + + if = { + limit = { + is_ai = yes + } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + this = scope:host + involved_activity.var:officiator ?= this + } + } + save_scope_as = guest + } + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + } + save_scope_as = guest + } + } + } + } + + # join the stampede + option = { + name = coronation_events.1014.join + + random = { + chance = 10 + increase_wounds_no_death_effect = { REASON = accident } + if = { + limit = { + OR = { + is_ai = no + this = scope:activity.activity_host + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + has_activity_intent = coronation_disrupt_loyalists + } + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + } + hidden_effect = { + change_current_weight = 20 + } + add_character_modifier = { + modifier = full_of_dessert_modifier + years = 5 + } + scope:guest = { + increase_wounds_no_death_effect = { REASON = accident } + } + + stress_impact = { + base = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + ai_chance = { + base = 0 + modifier = { + factor = 50 + has_trait = gluttonous + } + } + } + + # calm down the crowd + option = { + name = coronation_events.1014.calm + trigger = { + diplomacy >= high_skill_rating + } + show_as_unavailable = { + diplomacy < high_skill_rating + } + if = { + limit = { + OR = { + is_ai = no + this = scope:activity.activity_host + is_in_guest_subset = { name = supporter } + has_activity_intent = coronation_offer_support + } + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { + activity_special_type_progression_tiny = yes + every_attending_character = { + limit = { + NOR = { this = scope:host } + this = root + } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + } + } + else = { + scope:activity = { + every_attending_character = { + limit = { NOT = { this = scope:host } } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + } + } + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = craven + } + } + } + + # run! + option = { + name = coronation_events.1014.run + + scope:guest = { + increase_wounds_no_death_effect = { REASON = accident } + } + + add_prestige = minor_prestige_loss + + stress_impact = { + brave = medium_stress_impact_gain + craven = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = craven + } + modifier = { + factor = 0 + has_trait = brave + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Friendly religious figure raises a toast in your name at your coronation banquet +coronation_events.1015 = { + type = activity_event + title = coronation_events.1015.t + desc = coronation_events.1015.desc + right_portrait = { + character = scope:guest + animation = toast + } + + left_portrait = { + character = root + animation = drink + } + + theme = feast_activity + + override_effect_2d = { + reference = legend_glow + } + + cooldown = { years = 5 } + + trigger = { + piety_level >= high_piety_level + drinks_alcohol_trigger = yes + scope:activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + this.faith = root.faith + drinks_alcohol_trigger = yes + OR = { + has_trait = zealous + piety_level >= high_piety_level + } + is_clergy = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + is_clergy = yes + } + save_scope_as = guest + } + } + } + + # hell yeah it's divine + option = { + name = coronation_events.1015.divine + trigger = { + has_activity_intent = coronation_impress_attendees + } + + scope:activity = { + custom_tooltip = coronation_tt_positive_tiny + activity_special_type_progression_tiny = yes + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + every_attending_character = { + limit = { + has_trait = zealous + NOT = { this = scope:host } + } + custom = custom.every_zealous_attending_character + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + shy = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + cynical = minor_stress_impact_gain + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_zeal = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + # cherish the toast + option = { + name = coronation_events.1015.cherish + + if = { + limit = { + reverse_opinion = { + target = scope:guest + value > 30 + } + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_toasted_coronation + CHARACTER = scope:guest + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:guest + modifier = grateful_opinion + opinion = 25 + } + } + + stress_impact = { + base = minor_stress_impact_loss + shy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_zeal = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + modifier = { + stress_level >= 1 + add = 2 + } + } + } + + # the audacity + option = { + name = coronation_events.1015.hush + + add_dread = minor_dread_gain + + scope:guest = { + add_stress = medium_stress_gain + } + + stress_impact = { + cynical = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_zeal = high_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# You have the opportunity to raise a toast at your coronation banquet +coronation_events.1016 = { + type = activity_event + title = coronation_events.1016.t + desc = coronation_events.1016.desc + right_portrait = { + character = scope:guest + animation = wedding_drunk + camera = camera_event_very_right + } + + center_portrait = { + character = scope:guest_2 + animation = drink_goblet + camera = camera_event_right + } + + left_portrait = { + character = scope:host + animation = toast_goblet + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_guest_subset = { + name = detractor + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + count >= 2 + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity.activity_host ?= { save_scope_as = host } + + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = guest + } + } + + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + NOT = { + this = scope:guest + } + } + save_scope_as = guest_2 + } + } + } + + # great toast + option = { + name = coronation_events.1016.great + trigger = { + has_activity_intent = coronation_impress_attendees + } + + duel = { + skill = diplomacy + value = high_skill_rating + # you manage to win them over + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1016.great.tt.success + send_interface_toast = { + title = coronation_events.1016.great.tt.success + left_icon = root + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + scope:guest = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + scope:guest_2 = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + coronation_impress_attendees_opinion_effect = yes + } + } + # they don't think it's good enough + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1016.great.tt.failure + send_interface_toast = { + title = coronation_events.1016.great.tt.failure + left_icon = root + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_loss + } + else = { + add_prestige = minor_prestige_loss + } + } + } + } + ai_chance = { + base = 5 + } + } + + # embarrass guests toast + option = { + name = coronation_events.1016.embarrass + trigger = { + has_activity_intent = coronation_weaken_detractors + intrigue >= high_skill_rating + } + show_as_unavailable = { + has_activity_intent = coronation_weaken_detractors + intrigue < high_skill_rating + } + + add_dread = medium_dread_gain + + scope:guest = { + add_stress = medium_stress_gain + } + + scope:guest_2 = { + add_stress = medium_stress_gain + } + + scope:guest = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + + scope:guest_2 = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + + coronation_weaken_detractors_opinion_effect = yes + + ai_chance = { + base = 5 + } + } + + # why bother? + option = { + name = coronation_events.1016.nah + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + stress_level >= 1 + add = 2 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Participants bring their local beverages for you to try on at your coronation banquet +coronation_events.1017 = { + type = activity_event + title = coronation_events.1017.t + desc = coronation_events.1017.desc + right_portrait = { + character = scope:supporter + animation = debating + } + + center_portrait = { + character = scope:detractor + animation = disgust + camera = camera_event_right + } + + left_portrait = { + character = root + animation = drink_goblet + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + root.culture != scope:activity.activity_location.culture + scope:activity = { + any_guest_subset = { + name = detractor + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + NOT = { + this.culture = root.culture + this.culture = scope:activity.activity_location.culture + } + } + any_guest_subset = { + name = supporter + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + this.culture = scope:activity.activity_location.culture + } + } + faith_forbids_alcohol_trigger = no + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + NOT = { + this.culture = root.culture + this.culture = scope:activity.activity_location.culture + } + } + save_scope_as = detractor + } + } + + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + this.culture = scope:activity.activity_location.culture + } + save_scope_as = supporter + } + } + } + + # praise all the beverages, making a speech about the land + option = { + name = coronation_events.1017.diplo + trigger = { + has_activity_intent = coronation_impress_attendees + diplomacy >= high_skill_rating + } + + scope:activity = { + custom_tooltip = coronation_tt_positive_tiny + activity_special_type_progression_tiny = yes + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + activity_location.county = { + add_county_modifier = { + modifier = bp4_coronation_good_harvest_modifier + years = 10 + } + } + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + paranoid = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + + ai_chance = { + base = 5 + modifier = { + has_trait = paranoid + add = -2 + } + modifier = { + has_trait = inappetetic + add = -2 + } + modifier = { + has_trait = arrogant + add = -2 + } + modifier = { + has_trait = gluttonous + add = 2 + } + } + } + + # praise all the beverages, making a speech about the land (watered down) + option = { + name = coronation_events.1017.diplo + trigger = { + NOT = { + has_activity_intent = coronation_impress_attendees + } + diplomacy < high_skill_rating + } + + scope:activity = { + activity_location.county = { + add_county_modifier = { + modifier = bp4_coronation_good_harvest_modifier + years = 5 + } + } + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + paranoid = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + + ai_chance = { + base = 5 + modifier = { + has_trait = paranoid + add = -2 + } + modifier = { + has_trait = inappetetic + add = -2 + } + modifier = { + has_trait = arrogant + add = -2 + } + modifier = { + has_trait = gluttonous + add = 2 + } + } + } + + # humiliate dissenter + option = { + name = coronation_events.1017.isolate + trigger = { + has_activity_intent = coronation_weaken_detractors + } + + if = { + limit = { + has_royal_court = yes + } + change_current_court_grandeur = medium_court_grandeur_gain + } + else = { + every_courtier = { + custom = custom.every_courtier + limit = { + is_adult = yes + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + } + + scope:detractor = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -25 + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = medium_influence_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + paranoid = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + + ai_chance = { + base = 5 + modifier = { + has_trait = paranoid + add = -2 + } + modifier = { + has_trait = inappetetic + add = -2 + } + modifier = { + has_trait = arrogant + add = -2 + } + modifier = { + has_trait = gluttonous + add = 2 + } + } + } + + # praise supporter + option = { + name = coronation_events.1017.empower + trigger = { + has_activity_intent = coronation_embrace_supporters + } + if = { + limit = { + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_praised_vintage + CHARACTER = scope:supporter + OPINION = 20 + } + } + if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + } + show_as_tooltip = { + appoint_court_position = { + recipient = scope:supporter + court_position = court_brewmaster_court_position + } + } + } + + hidden_effect = { + if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + NOT = { employs_court_position = court_brewmaster_court_position } + } + appoint_court_position = { + recipient = scope:supporter + court_position = court_brewmaster_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + employs_court_position = court_brewmaster_court_position + } + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:supporter + holder = court_position:court_brewmaster_court_position + court_position = court_brewmaster_court_position + } + remove_character_flag = temporary_court_position_cost_removal + } + } + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { + paranoid = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + + ai_chance = { + base = 5 + modifier = { + has_trait = paranoid + add = -2 + } + modifier = { + has_trait = inappetetic + add = -2 + } + modifier = { + has_trait = arrogant + add = -2 + } + modifier = { + has_trait = gluttonous + add = 2 + } + } + } + + # praise supporter (watered down) + option = { + name = coronation_events.1017.empower + trigger = { + NOT = { + has_activity_intent = coronation_embrace_supporters + } + } + + show_as_tooltip = { + appoint_court_position = { + recipient = scope:supporter + court_position = court_brewmaster_court_position + } + } + hidden_effect = { + if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + NOT = { employs_court_position = court_brewmaster_court_position } + } + appoint_court_position = { + recipient = scope:supporter + court_position = court_brewmaster_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + employs_court_position = court_brewmaster_court_position + } + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:supporter + holder = court_position:court_brewmaster_court_position + court_position = court_brewmaster_court_position + } + remove_character_flag = temporary_court_position_cost_removal + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + + ai_chance = { + base = 5 + modifier = { + has_trait = paranoid + add = -2 + } + modifier = { + has_trait = inappetetic + add = -2 + } + modifier = { + has_trait = arrogant + add = -2 + } + modifier = { + has_trait = gluttonous + add = 2 + } + } + } + + # I couldn't possibly drink first + option = { + name = coronation_events.1017.nah + + scope:activity = { + every_attending_character = { + limit = { + NOT = { this = root } + } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + inappetetic = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + gluttonous = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + has_trait = paranoid + add = 2 + } + modifier = { + has_trait = inappetetic + add = 2 + } + modifier = { + has_trait = arrogant + add = 2 + } + modifier = { + has_trait = gluttonous + add = -2 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# While arranging seats at the table at your coronation banquet, you make a decision about where your detractors will sit +coronation_events.1018 = { + type = activity_event + title = coronation_events.1018.t + desc = { + desc = coronation_events.1018.desc + triggered_desc = { + trigger = { has_trait = wrathful } + desc = coronation_events.1018.desc.wrathful + } + triggered_desc = { + trigger = { diplomacy > 10 } + desc = coronation_events.1018.desc.diplo + } + } + center_portrait = { + character = scope:detractor + animation = flirtation + } + + right_portrait = { + character = scope:supporter + animation = happiness + + } + + left_portrait = { + character = scope:host + animation = scheme + camera = camera_event_left_wedding + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_guest_subset = { + name = supporter + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + any_guest_subset = { + name = detractor + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + } + has_activity_intent = coronation_weaken_detractors + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity.activity_host ?= { save_scope_as = host } + custom_tooltip = happened_because_intent_tt + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = detractor + } + } + + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = supporter + } + } + } + + # deal + option = { + name = coronation_events.1018.deal + add_hook_if_possible_default_length_effect = { + TARGET = scope:detractor + TYPE = favor_hook + } + + stress_impact = { + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + just = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + # switch + option = { + name = coronation_events.1018.switch + add_character_modifier = { + modifier = bp4_shielded_reign_modifier + years = 10 + } + scope:detractor = { + add_stress = medium_stress_gain + } + + stress_impact = { + paranoid = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +scripted_effect coronation_events_1019_memory_reward_effect = { + custom_tooltip = coronation_events.1019.memory_reward.tt + add_prestige = minor_prestige_gain + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = marriage + } + } + progress_towards_lover_effect = { + REASON = lover_coronation_gifts + CHARACTER = scope:$SCOPE$ + OPINION = 20 + } + } + if = { + limit = { + scope:$SCOPE$_memory = { + OR = { + has_memory_category = war + has_memory_category = martial + } + } + } + add_martial_lifestyle_xp = minor_lifestyle_xp + } + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = major + } + } + add_prestige = minor_prestige_gain + } + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = family + } + } + dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + } + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = travel + } + } + traveler_travel_xp_effect = { + MIN = 3 + MAX = 5 + } + } + + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = travel + } + } + traveler_travel_xp_effect = { + MIN = 3 + MAX = 5 + } + } + + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = childhood + } + } + if = { + limit = { + reverse_opinion = { + target = scope:$SCOPE$ + value > 40 + } + OR = { + scope:$SCOPE$ = { is_ai = yes } + AND = { + scope:$SCOPE$ = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_coronation_gifts + CHARACTER = scope:$SCOPE$ + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:$SCOPE$ + modifier = grateful_opinion + opinion = 25 + } + } + } +} + +# You distribute gifts to your supporters at your coronation banquet +coronation_events.1019 = { + type = activity_event + title = coronation_events.1019.t + desc = coronation_events.1019.desc + right_portrait = { + character = scope:supporter + animation = throne_room_conversation_4 + } + + center_portrait = { + character = scope:supporter_2 + animation = throne_room_bow_1 + camera = camera_event_right + } + + left_portrait = { + character = root + animation = wedding_bride_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:activity = { + any_guest_subset = { + name = supporter + any_memory = { + has_memory_category = positive + has_memory_participant = root + } + count >= 2 + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + any_memory = { + has_memory_category = positive + has_memory_participant = root + } + } + save_scope_as = supporter + } + random_guest_subset = { + name = supporter + limit = { + NOT = { + this = scope:supporter + } + any_memory = { + has_memory_category = positive + has_memory_participant = root + } + } + save_scope_as = supporter_2 + } + } + + scope:supporter = { + random_memory = { + limit = { + has_memory_category = positive + has_memory_participant = root + } + save_scope_as = supporter_memory + } + } + + scope:supporter_2 = { + random_memory = { + limit = { + has_memory_category = positive + has_memory_participant = root + } + save_scope_as = supporter_2_memory + } + } + } + + # give them both gifts + option = { + name = coronation_events.1019.both + + pay_short_term_gold = { + target = scope:supporter + gold = minor_gold_value + } + + pay_short_term_gold = { + target = scope:supporter_2 + gold = minor_gold_value + } + if = { + limit = { + reverse_opinion = { + target = scope:supporter + value > 40 + } + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_coronation_gifts + CHARACTER = scope:supporter + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:supporter + modifier = grateful_opinion + opinion = 25 + } + } + if = { + limit = { + reverse_opinion = { + target = scope:supporter_2 + value > 40 + } + OR = { + scope:supporter_2 = { is_ai = yes } + AND = { + scope:supporter_2 = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_coronation_gifts + CHARACTER = scope:supporter_2 + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:supporter_2 + modifier = grateful_opinion + opinion = 25 + } + } + + + + stress_impact = { + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + just = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + modifier = { + short_term_gold <= medium_gold_value + add = -2 + } + } + } + + # give supporter a gift + option = { + name = coronation_events.1019.supporter + remove_short_term_gold = minor_gold_value + + coronation_events_1019_memory_reward_effect = { SCOPE = supporter } + + stress_impact = { + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + } + + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + modifier = { + short_term_gold <= minor_gold_value + add = -2 + } + modifier = { + scope:supporter_2.current_military_strength > scope:supporter.current_military_strength + add = -2 + } + } + } + + # give supporter_2 a gift + option = { + name = coronation_events.1019.supporter_2 + remove_short_term_gold = minor_gold_value + + coronation_events_1019_memory_reward_effect = { SCOPE = supporter_2 } + + stress_impact = { + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + modifier = { + short_term_gold <= minor_gold_value + add = -2 + } + modifier = { + scope:supporter.current_military_strength > scope:supporter_2.current_military_strength + add = -2 + } + } + } + + # don't give any gifts + option = { + name = coronation_events.1019.nah + add_stewardship_lifestyle_xp = medium_lifestyle_xp + + stress_impact = { + paranoid = minor_stress_impact_loss + shy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + modifier = { + has_lifestyle = stewardship_lifestyle + add = 2 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Clan vassals show their concerns +coronation_events.1020 = { + type = activity_event + title = coronation_events.1020.t + desc = coronation_events.1020.desc + right_portrait = { + character = scope:dynasty_vassal + animation = throne_room_conversation_4 + } + + center_portrait = { + character = scope:not_dynasty_vassal + animation = throne_room_bow_1 + camera = camera_event_right + } + + left_portrait = { + character = root + animation = wedding_bride_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + government_has_flag = government_is_clan + scope:activity = { + any_attending_character = { + is_ai = yes + government_has_flag = government_is_clan + NOT = { + dynasty = root.dynasty + } + is_vassal_of = root + } + } + scope:activity = { + any_attending_character = { + is_ai = yes + government_has_flag = government_is_clan + dynasty = root.dynasty + is_vassal_of = root + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + government_has_flag = government_is_clan + dynasty = root.dynasty + is_vassal_of = root + } + save_scope_as = dynasty_vassal + } + random_attending_character = { + limit = { + is_ai = yes + government_has_flag = government_is_clan + NOT = { + dynasty = root.dynasty + } + is_vassal_of = root + } + save_scope_as = not_dynasty_vassal + } + } + } + + # embrace supporter + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + OR = { + scope:not_dynasty_vassal = { + is_in_guest_subset = { name = supporter } + } + scope:dynasty_vassal = { + is_in_guest_subset = { name = supporter } + } + } + } + name = coronation_events.1020.embrace_supporters + custom_tooltip = coronation_events.1020.embrace_supporters.tt + + if = { + limit = { + scope:not_dynasty_vassal = { + is_in_guest_subset = { name = supporter } + } + } + add_hook_if_possible_default_length_effect = { + TARGET = scope:not_dynasty_vassal + TYPE = favor_hook + } + scope:not_dynasty_vassal = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + add_prestige = medium_prestige_gain + } + } + + if = { + limit = { + scope:dynasty_vassal = { + is_in_guest_subset = { name = supporter } + } + } + house = { + add_unity_value = { + value = medium_unity_gain + character = root + desc = clan_unity_coronation_increased + } + } + scope:dynasty_vassal = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + add_prestige = medium_prestige_gain + } + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # weaken detractor + option = { + trigger = { + has_activity_intent = coronation_weaken_detractors + OR = { + scope:not_dynasty_vassal = { + is_in_guest_subset = { name = detractor } + } + scope:dynasty_vassal = { + is_in_guest_subset = { name = detractor } + } + } + } + name = coronation_events.1020.weaken_detractors + + if = { + limit = { + scope:not_dynasty_vassal = { + is_in_guest_subset = { name = detractor } + } + } + house = { + add_unity_value = { + value = medium_unity_gain + character = root + desc = clan_unity_coronation_increased + } + } + scope:not_dynasty_vassal = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -20 + } + add_stress = medium_stress_gain + } + } + + if = { + limit = { + scope:dynasty_vassal = { + is_in_guest_subset = { name = detractor } + } + } + if = { + limit = { + scope:not_dynasty_vassal = { + NOT = { is_in_guest_subset = { name = detractor } } + } + } + house = { + add_unity_value = { + value = medium_unity_loss + character = root + desc = clan_unity_coronation_decreased + } + } + } + scope:dynasty_vassal = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -20 + } + add_stress = medium_stress_gain + } + } + custom_tooltip = coronation_events.1020.weaken_detractors.tt + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + arrogant = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # talk your way out of it + option = { + trigger = { diplomacy >= high_skill_rating } + name = coronation_events.1020.a + flavor = coronation_events.1020.a.flavor + + house = { + add_unity_value = { + value = minor_unity_gain + character = root + desc = clan_unity_coronation_increased + } + } + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + scope:dynasty_vassal = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + scope:not_dynasty_vassal = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # support the vassal that is not part of your house + option = { + name = coronation_events.1020.b + flavor = coronation_events.1020.b.tt + scope:not_dynasty_vassal = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + + add_hook_if_possible_default_length_effect = { + TARGET = scope:not_dynasty_vassal + TYPE = favor_hook + } + + house = { + add_unity_value = { + value = medium_unity_loss + character = root + desc = clan_unity_coronation_decreased + } + } + + every_vassal_or_below = { + limit = { dynasty = root.dynasty } + custom = coronation_events.1020.b.custom + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # imprison the non dynastic vassal for the impertinence + option = { + name = coronation_events.1020.c + + add_dread = minor_dread_gain + + house = { + add_unity_value = { + value = medium_unity_gain + character = root + desc = clan_unity_coronation_increased + } + } + if = { + limit = { + OR = { + scope:not_dynasty_vassal = { + is_ai = yes + } + is_ai = no + } + } + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:not_dynasty_vassal + } + } + + + stress_impact = { just = medium_stress_gain } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_negative_ai_value + } + } + } + + # focus on family + option = { + name = coronation_events.1020.d + + house = { + add_unity_value = { + value = medium_unity_gain + character = root + desc = clan_unity_coronation_increased + } + } + + scope:not_dynasty_vassal = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -20 + } + } + every_vassal_or_below = { + limit = { + government_has_flag = government_is_clan + NOT = { + dynasty = root.dynasty + } + NOT = { this = scope:not_dynasty_vassal } + } + custom = clan.1101.d.custom + + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + generous = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = medium_stress_impact_gain + craven = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_negative_ai_value + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + has_trait = generous + has_trait = humble + has_trait = just + has_trait = craven + has_trait = trusting + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Powerful taxman approaches host +coronation_events.1021 = { + type = activity_event + title = coronation_events.1021.t + desc = coronation_events.1021.desc + left_portrait = { + character = root + animation = disapproval + } + + right_portrait = { + character = scope:supporter + animation = eavesdrop + camera = camera_event_very_right + } + + center_portrait = { + character = scope:taxman + animation = betting + camera = camera_event_center_pointing_left + } + override_background = { + reference = relaxing_room + } + + theme = coronation_activity + + cooldown = { years = 5 } + + trigger = { + government_has_flag = government_is_clan + + scope:activity = { + any_attending_character = { + is_ai = yes + is_tax_collector = yes + is_vassal_of = root + tax_slot = { + any_tax_slot_vassal = { + count >= 1 + } + } + ai_greed > 0 + } + any_guest_subset = { + name = supporter + is_ai = yes + is_tax_collector = no + OR = { + is_courtier_of = root + is_vassal_of = root + } + trigger_if = { + limit = { + root = { + has_activity_intent = coronation_embrace_supporters + } + } + OR = { + is_powerful_vassal_of = root + is_councillor_of = root + } + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_tax_collector = yes + is_vassal_of = root + tax_slot = { + any_tax_slot_vassal = { + count >= 1 + } + } + ai_greed > 0 + } + save_scope_as = taxman + save_scope_as = tax_collector + } + random_guest_subset = { + name = supporter + limit = { + is_ai = yes + is_powerful_vassal_of = root + is_councillor_of = root + } + alternative_limit = { + is_ai = yes + is_powerful_vassal_of = root + } + alternative_limit = { + is_ai = yes + is_vassal_of = root + } + save_scope_as = supporter + } + } + } + + # embrace_supporters + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + } + name = coronation_events.1021.embrace_supporters + flavor = coronation_events.1021.embrace_supporters.flavor + + scope:supporter = { + add_opinion = { + target = root + modifier = loyalty_opinion + opinion = 20 + } + } + add_character_modifier = { + modifier = coronation_tax_collectors_watched_modifier + years = 10 + } + scope:taxman = { + add_character_modifier = { + modifier = coronation_tax_collector_scrutiny_modifier + years = 10 + } + } + + stress_impact = { greedy = minor_stress_impact_gain } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_honor = high_chance_impact_positive_ai_value + } + } + } + + # impress_attendees + option = { + trigger = { + has_activity_intent = coronation_impress_attendees + diplomacy >= high_skill_rating + } + show_as_unavailable = { + has_activity_intent = coronation_impress_attendees + diplomacy < high_skill_rating + } + name = coronation_events.1021.impress_attendees + flavor = coronation_events.1021.impress_attendees.flavor + + house = { + add_unity_value = { + value = minor_unity_gain + character = root + desc = clan_unity_coronation_nepotism.desc + } + } + scope:taxman = { + tax_slot = { + every_tax_slot_vassal = { + custom = custom.every_tax_slot_vassal + limit = { + is_ai = yes + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + } + + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { greedy = minor_stress_impact_gain } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_honor = high_chance_impact_positive_ai_value + } + } + } + + # you're not that important + option = { + name = coronation_events.1021.a + flavor = coronation_events.1021.a.flavor + + house = { + add_unity_value = { + value = minor_unity_gain + character = root + desc = clan_unity_coronation_nepotism.desc + } + } + + add_legitimacy = minor_legitimacy_gain + + scope:taxman = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + + stress_impact = { greedy = minor_stress_impact_gain } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_honor = high_chance_impact_positive_ai_value + } + } + } + + # empower tax collector + option = { + name = coronation_events.1021.c + flavor = coronation_events.1021.c.flavor + + house = { + add_unity_value = { + value = minor_unity_loss + character = root + desc = clan_unity_refused_nepotism.desc + } + } + add_character_modifier = { + modifier = bp4_empowered_tax_collectors_modifier + years = 10 + } + scope:taxman = { + if = { + limit = { + highest_skill = diplomacy + } + add_diplomacy_skill = 1 + } + else_if = { + limit = { + highest_skill = intrigue + } + add_intrigue_skill = 1 + } + else = { + add_stewardship_skill = 1 + } + } + + + stress_impact = { + honest = minor_stress_impact_gain + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + # strike a deal with the tax collector + option = { + name = coronation_events.1021.b + flavor = coronation_events.1021.b.flavor + scope:taxman = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + add_character_modifier = { + modifier = coronation_thriving_collector_modifier + years = 5 + } + tax_slot = { + every_tax_slot_vassal = { + custom = custom.every_tax_slot_vassal + limit = { + is_ai = yes + } + add_character_modifier = { + modifier = coronation_harsh_collector_modifier + years = 5 + } + } + } + } + + + stress_impact = { + honest = minor_stress_impact_gain + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = medium_chance_impact_positive_ai_value + ai_sociability = medium_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# A supporter offers you a gift during the feast in exchange for better court clothing +coronation_events.1022 = { + type = activity_event + title = coronation_events.1022.t + desc = coronation_events.1022.desc + right_portrait = { + character = scope:supporter + animation = throne_room_conversation_4 + } + + left_portrait = { + character = root + animation = wedding_bride_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:activity = { + any_guest_subset = { + name = supporter + is_ai = yes + #Needs enough money to afford silken robes + OR = { + is_ruler = yes + gold >= 100 + } + #Needs appropriate personality + NOR = { + has_trait = greedy + has_trait = temperate + has_trait = humble + has_trait = peasant_leader + } + any_memory = { + has_memory_category = positive + has_memory_participant = root + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + #Needs enough money to afford silken robes + OR = { + is_ruler = yes + gold >= 100 + } + #Needs appropriate personality + NOR = { + has_trait = greedy + has_trait = temperate + has_trait = humble + has_trait = peasant_leader + } + any_memory = { + has_memory_category = positive + has_memory_participant = root + } + is_ai = yes + } + save_scope_as = supporter + } + } + + scope:supporter = { + hidden_effect = { + add_gold = major_gold_value + } + random_memory = { + limit = { + has_memory_category = positive + has_memory_participant = root + } + save_scope_as = supporter_memory + } + } + } + + # accept the gift and the deal + option = { + name = coronation_events.1022.a + + scope:supporter = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + + if = { + limit = { has_dlc_feature = royal_court } + custom_tooltip = free_fashion_for_15_years + add_character_flag = { + flag = court_free_fashion + years = 15 + } + } + else = { + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + + reverse_add_opinion = { + target = scope:supporter + modifier = pleased_opinion + opinion = 30 + } + + stress_impact = { + greedy = minor_stress_impact_loss + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + modifier = { + short_term_gold <= medium_gold_value + add = 2 + } + } + } + + # ask for more gold in exchange for a future deal + option = { + name = coronation_events.1022.b + scope:supporter = { + pay_short_term_gold = { + target = root + gold = major_gold_value + } + if = { + limit = { + can_add_hook = { + type = favor_hook + target = root + } + } + add_hook = { + type = favor_hook + target = root + } + } + } + + reverse_add_opinion = { + target = scope:supporter + modifier = pleased_opinion + opinion = 30 + } + + stress_impact = { + greedy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = medium_chance_impact_positive_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + modifier = { + short_term_gold <= minor_gold_value + add = 4 + } + } + } + + # redirect the gift towards the realm + option = { + name = coronation_events.1022.c + + scope:supporter = { + add_stewardship_skill = 1 + } + + add_stewardship_lifestyle_xp = medium_lifestyle_xp + + stress_impact = { + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + modifier = { + has_lifestyle = stewardship_lifestyle + add = 2 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Detractor makes a backhanded compliment in a toast +coronation_events.1023 = { + type = activity_event + title = coronation_events.1023.t + desc = { + desc = coronation_events.1023.desc + triggered_desc = { + trigger = { + exists = scope:supporter + } + desc = coronation_events.1023.supporter.desc + } + } + right_portrait = { + character = scope:detractor + animation = toast + } + + center_portrait = { + character = root + animation = drink + } + + left_portrait = { + trigger = { + exists = scope:supporter + } + character = scope:supporter + animation = shock + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + drinks_alcohol_trigger = yes + scope:activity = { + any_guest_subset = { + name = detractor + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + NOT = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + NOT = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + } + save_scope_as = detractor + } + } + + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + scope:activity = { + any_guest_subset = { + name = supporter + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + } + } + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = supporter + } + } + } + } + + # boldly make a retort + option = { + name = coronation_events.1023.a + trigger = { + has_activity_intent = coronation_impress_attendees + } + scope:activity = { + custom_tooltip = coronation_tt_positive_tiny + activity_special_type_progression_tiny = yes + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + shy = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + brave = medium_stress_impact_loss + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_boldness = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # redirect toast to supporter + option = { + name = coronation_events.1023.b + trigger = { + has_activity_intent = coronation_embrace_supporters + exists = scope:supporter + } + if = { + limit = { + scope:supporter = { + opinion = { + target = root + value > 30 + } + } + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_toasted_coronation + CHARACTER = scope:supporter + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:supporter + modifier = grateful_opinion + opinion = 25 + } + } + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { + shy = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + # answer the toast directly and imprison detractor + option = { + name = coronation_events.1023.c + trigger = { + has_activity_intent = coronation_weaken_detractors + scope:detractor = { + is_ai = yes + } + } + hard_imprison_character_effect = { + TARGET = scope:detractor + IMPRISONER = root + } + add_dread = medium_dread_gain + scope:detractor = { + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = medium_influence_loss + } + else = { + add_prestige = medium_prestige_loss + } + if = { + limit = { + OR = { + is_ai = yes + AND = { + root = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_rival_effect = { + REASON = rival_unjustified_imprisonment + CHARACTER = root + OPINION = -50 + } + } + } + if = { + limit = { + scope:detractor = { + is_a_faction_member = yes + } + } + scope:detractor.joined_faction = { + add_faction_discontent = major_discontent_gain + } + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + shy = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + vengeful = medium_stress_impact_loss + wrathful = minor_stress_impact_loss + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_zeal = high_chance_impact_negative_ai_value + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = compassionate + } + } + } + } + + # remove the detractor by force + option = { + name = coronation_events.1023.d + trigger = { + NOT = { + has_activity_intent = coronation_weaken_detractors + } + } + scope:detractor = { remove_from_activity = scope:activity } + add_dread = minor_dread_gain + if = { + limit = { + scope:detractor = { + is_a_faction_member = yes + } + } + scope:detractor.joined_faction = { + add_faction_discontent = minor_discontent_gain + } + } + scope:detractor = { + add_opinion = { + modifier = humiliated_opinion + target = root + opinion = -25 + } + } + stress_impact = { + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = humble + } + } + modifier = { + factor = 0.5 + scope:detractor = { + is_a_faction_member = yes + } + } + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_zeal = high_chance_impact_negative_ai_value + } + } + } + + # gracefully ignore + option = { + name = coronation_events.1023.e + + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + scope:detractor = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -10 + } + } + + stress_impact = { + shy = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_negative_ai_value + ai_zeal = high_chance_impact_positive_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Foreign guest brings a gift of friendship +coronation_events.1024 = { + type = activity_event + title = coronation_events.1024.t + desc = { + random_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:foreign.faith = root.faith + } + } + desc = coronation_events.1024.intro_diff_faith + } + triggered_desc = { + trigger = { + NOT = { + scope:foreign.culture = root.culture + } + } + desc = coronation_events.1024.intro_diff_culture + } + desc = coronation_events.1024.intro_diff_neither + } + desc = coronation_events.1024.desc + triggered_desc = { + trigger = { + has_activity_intent = coronation_embrace_supporters + } + desc = coronation_events.1024.supporter.desc + } + triggered_desc = { + trigger = { + has_activity_intent = coronation_weaken_detractors + } + desc = coronation_events.1024.detractor.desc + } + } + left_portrait = { + character = scope:guest + trigger = { + exists = scope:guest + } + triggered_animation = { + trigger = { + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + animation = admiration + } + animation = scheme + } + + right_portrait = { + character = scope:foreign + animation = throne_room_bow_1 + camera = camera_event_right + } + + center_portrait = { + character = root + animation = happiness + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_attending_character = { + is_ai = yes + is_independent_ruler = yes + NOT = { + culture = root.culture + has_relation_rival = root + is_in_guest_subset = { name = detractor } + } + save_temporary_scope_as = foreign_temp + trigger_if = { + limit = { + root = { has_activity_intent = coronation_weaken_detractors } + } + scope:activity = { + any_guest_subset = { + name = detractor + is_ai = yes + highest_held_title_tier >= tier_county + opinion = { + target = scope:foreign_temp + value <= 0 + } + NOT = { + has_relation_rival = scope:foreign_temp + } + } + } + } + } + } + trigger_if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + scope:activity = { + any_guest_subset = { + name = supporter + is_ai = yes + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + activity_host = { save_scope_as = host } + random_attending_character = { + limit = { + is_ai = yes + is_independent_ruler = yes + NOT = { + culture = root.culture + has_relation_rival = root + is_in_guest_subset = { name = detractor } + } + } + save_scope_as = foreign + } + if = { + limit = { + root = { + has_activity_intent = coronation_embrace_supporters + } + } + random_guest_subset = { + name = supporter + limit = { + is_ai = yes + } + save_scope_as = guest + } + } + if = { + limit = { + root = { + has_activity_intent = coronation_weaken_detractors + } + } + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + highest_held_title_tier >= tier_county + opinion = { + target = scope:foreign + value <= 0 + } + NOT = { + has_relation_rival = scope:foreign + } + } + save_scope_as = guest + } + } + } + } + + # use the situation to awe the people present + option = { + trigger = { + has_activity_intent = coronation_impress_attendees + } + name = coronation_events.1024.impress_attendees + + scope:foreign = { + pay_short_term_gold = { + target = root + gold = activity_minor_gold_value + } + } + culture = { + change_cultural_acceptance = { + target = scope:foreign.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_event + } + } + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # use the situation to bolster a supporter + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:foreign = { + NOR = { + is_at_war_with = root + is_allied_to = root + } + highest_held_title_tier >= tier_county + is_in_guest_subset = { name = supporter } + #Not way way stronger than root + half_max_military_strength < root.max_military_strength + } + } + name = coronation_events.1024.embrace_supporters + + scope:foreign = { + pay_short_term_gold = { + target = root + gold = activity_minor_gold_value + } + add_opinion = { + target = root + modifier = event_negotiated_alliance_opinion + } + save_scope_as = recipient + } + + scope:guest = { + if = { + limit = { + highest_held_title_tier < root.highest_held_title_tier + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + } + + custom_tooltip = negotiate_alliance_effect_tooltip + create_alliance = { + target = scope:foreign + allied_through_owner = root + allied_through_target = scope:foreign + } + + stress_impact = { + arrogant = minor_stress_impact_gain + fickle = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + #Root is much stronger + modifier = { + add = -100 + root.half_max_military_strength > scope:foreign.max_military_strength + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = fickle + has_trait = arrogant + } + } + } + } + + # use the situation to stress out a detractor + option = { + trigger = { + has_activity_intent = coronation_weaken_detractors + exists = scope:guest + } + name = coronation_events.1024.weaken_detractors + + scope:foreign = { + pay_short_term_gold = { + target = root + gold = activity_minor_gold_value + } + } + + scope:guest = { + add_stress = medium_stress_gain + if = { + limit = { + OR = { + root = { is_ai = no } + AND = { + is_ai = yes + scope:foreign = { is_ai = yes } + } + } + } + progress_towards_rival_effect = { + REASON = rival_foreign_threat + CHARACTER = scope:foreign + OPINION = -30 + } + } + if = { + limit = { + OR = { + is_ai = yes + AND = { + root = { is_ai = no } + is_ai = no + } + } + } + progress_towards_rival_effect = { + REASON = rival_foreign_threat + CHARACTER = scope:foreign + OPINION = -30 + } + } + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + compassionate = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = craven + } + } + } + } + + # use the situation to ensnare them as tributary + option = { + trigger = { + has_activity_intent = coronation_exalt_crown + scope:foreign = { + is_tributary = no + highest_held_title_tier < root.highest_held_title_tier + is_landed = yes + } + } + name = coronation_events.1024.exalt_crown + + scope:foreign = { + add_opinion = { + modifier = audacity_opinion + target = root + opinion = -30 + } + pay_short_term_gold = { + target = root + gold = activity_minor_gold_value + } + } + start_tributary_interaction_effect = { + TRIBUTARY = scope:foreign + SUZERAIN = root + } + if = { + limit = { + scope:foreign = { + OR = { + highest_held_title_tier >= tier_kingdom + max_military_strength >= root.max_military_strength + } + } + } + add_tyranny = medium_tyranny_gain + } + else_if = { + limit = { + scope:foreign = { + OR = { + highest_held_title_tier >= tier_duchy + max_military_strength >= root.half_max_military_strength + } + } + } + add_tyranny = minor_tyranny_gain + } + + + stress_impact = { + content = medium_stress_impact_gain + generous = medium_stress_impact_gain + humble = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + modifier = { + add = 50 + scope:foreign = { + highest_held_title_tier < tier_kingdom + } + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = generous + has_trait = humble + has_trait = just + } + } + } + } + + # rudely decline + option = { + name = coronation_events.1024.a + + add_prestige = medium_prestige_gain + + scope:foreign = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_greed = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = trusting + } + } + } + } + + # politely accept + option = { + name = coronation_events.1024.b + + scope:foreign = { + pay_short_term_gold = { + target = root + gold = activity_minor_gold_value + } + } + + culture = { + change_cultural_acceptance = { + target = scope:foreign.culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_event + } + } + + scope:foreign = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + + stress_impact = { + callous = miniscule_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# two guests argue during the feast +coronation_events.1025 = { + type = activity_event + title = coronation_events.1025.t + + desc = { + desc = coronation_events.1025.desc.intro + triggered_desc = { + trigger = { exists = scope:supporter } + desc = coronation_events.1025.desc.supporter + } + triggered_desc = { + trigger = { exists = scope:detractor } + desc = coronation_events.1025.desc.detractor + } + } + + left_portrait = { + trigger = { exists = scope:supporter } + character = scope:supporter + animation = drink_goblet + camera = camera_event_very_right + } + + center_portrait = { + character = root + animation = wedding_objection_start + } + + right_portrait = { + trigger = { exists = scope:detractor } + character = scope:detractor + animation = drink_goblet + camera = camera_event_very_left + } + + theme = feast_activity + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + is_in_guest_subset = { name = supporter } + } + any_attending_character = { + is_ai = yes + is_adult = yes + is_in_guest_subset = { name = detractor } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + is_in_guest_subset = { name = supporter } + } + save_scope_as = supporter + } + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + is_in_guest_subset = { name = detractor } + } + save_scope_as = detractor + } + } + } + + option = { + name = coronation_events.1025.a + trigger = { + has_activity_intent = coronation_embrace_supporters + exists = scope:supporter + } + if = { + limit = { + reverse_opinion = { + target = scope:supporter + value > 40 + } + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_took_side_in_fight + CHARACTER = scope:supporter + OPINION = 30 + } + } + else = { + scope:supporter = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + scope:detractor = { + add_opinion = { + modifier = contempt_opinion + target = root + opinion = -20 + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + + coronation_embrace_supporters_opinion_effect = yes + + ai_chance = { + base = 30 + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_honor = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1025.b + trigger = { + has_activity_intent = coronation_impress_attendees + } + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1025.d + trigger = { + has_activity_intent = coronation_weaken_detractors + exists = scope:detractor + } + + scope:detractor = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -25 + } + add_stress = medium_stress_gain + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + vengeful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1025.e + trigger = { + has_activity_intent = coronation_exalt_crown + any_vassal = { + has_vassal_stance = parochial + } + } + + coronation_exalt_crown_opinion_effect = yes + + stress_impact = { + arrogant = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1025.c + + if = { + limit = { + reverse_opinion = { + target = scope:supporter + value > 40 + } + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_took_side_in_fight + CHARACTER = scope:supporter + OPINION = 20 + } + } + else = { + scope:supporter = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + scope:detractor = { + add_opinion = { + modifier = contempt_opinion + target = root + opinion = -10 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_rationality = high_chance_impact_positive_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + opinion_modifier = { + opinion_target = scope:supporter + multiplier = 0.5 + } + modifier = { + scope:detractor.current_military_strength > scope:supporter.current_military_strength + add = -50 + } + } + } + + option = { + name = coronation_events.1025.f + + if = { + limit = { + reverse_opinion = { + target = scope:detractor + value >= 0 + } + OR = { + scope:detractor = { is_ai = yes } + AND = { + scope:detractor = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_took_side_in_fight + CHARACTER = scope:detractor + OPINION = 20 + } + } + else = { + scope:detractor = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + } + scope:supporter = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_rationality = high_chance_impact_positive_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + opinion_modifier = { + opinion_target = scope:detractor + multiplier = 0.5 + } + modifier = { + scope:supporter.current_military_strength > scope:detractor.current_military_strength + add = -50 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# coronation cake token hunt +coronation_events.1026 = { + type = activity_event + title = coronation_events.1026.t + + desc = { + desc = coronation_events.1026.desc + first_valid = { + triggered_desc = { + trigger = { root = scope:token_finder } + desc = coronation_events.1026.special_desc + } + triggered_desc = { + trigger = { + scope:token_finder = { + is_in_guest_subset = { name = supporter } + } + } + desc = coronation_events.1026.supporter_desc + } + triggered_desc = { + trigger = { + scope:token_finder = { + is_in_guest_subset = { name = detractor } + } + } + desc = coronation_events.1026.detractor_desc + } + desc = coronation_events.1026.fallback_desc + } + } + + left_portrait = { + trigger = { + NOT = { + scope:token_finder = root + } + } + character = root + animation = ecstasy + } + center_portrait = { + character = scope:token_finder + animation = toast + camera = camera_event_left + } + right_portrait = { + character = scope:guest + trigger = { exists = scope:guest } + animation = throne_room_cheer_1 + camera = camera_event_right + } + + theme = feast_activity + cooldown = { years = 5 } + + trigger = { + scope:activity = { + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_lavish + } + any_attending_character = { + count >= 2 + is_ai = yes + is_adult = yes + NOT = { this = root } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + trigger_if = { + limit = { + root = { + has_activity_intent = coronation_embrace_supporters + } + } + OR = { + is_in_guest_subset = { name = supporter } + this = root + } + } + trigger_if = { + limit = { + root = { + has_activity_intent = coronation_weaken_detractors + } + } + OR = { + is_in_guest_subset = { name = detractor } + this = root + } + } + } + save_scope_as = token_finder + } + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { this = root } + NOT = { this = scope:token_finder } + } + save_scope_as = guest + } + } + } + + option = { + name = coronation_events.1026.special + trigger = { + scope:token_finder = root + } + + add_prestige = medium_prestige_gain + add_legitimacy = minor_legitimacy_gain + + scope:activity = { + every_attending_character = { + limit = { NOT = { this = root } } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 500 + } + } + + option = { + name = coronation_events.1026.a + trigger = { + has_activity_intent = coronation_impress_attendees + NOT = { + root = scope:token_finder + } + } + + coronation_impress_attendees_opinion_effect = yes + custom_tooltip = coronation_tt_positive_tiny + + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + NOT = { this = root } + } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 5 + } + } + activity_special_type_progression_tiny = yes + } + + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + factor = 0.5 + has_trait = craven + } + ai_value_modifier = { + ai_honor = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1026.b + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:token_finder = { + is_in_guest_subset = { name = supporter } + } + NOT = { + root = scope:token_finder + } + } + + pay_short_term_gold = { + target = scope:token_finder + gold = activity_minor_gold_value + } + + if = { + limit = { + reverse_opinion = { + target = scope:token_finder + value > 50 + } + OR = { + scope:token_finder = { is_ai = yes } + AND = { + scope:token_finder = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_token_reward + CHARACTER = scope:token_finder + OPINION = 20 + } + } + else = { + scope:token_finder = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + factor = 2 + has_trait = generous + } + modifier = { + factor = 0.5 + has_trait = greedy + } + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1026.c + trigger = { + has_activity_intent = coronation_weaken_detractors + scope:token_finder = { + is_in_guest_subset = { name = detractor } + } + NOT = { + root = scope:token_finder + } + } + + scope:token_finder = { + add_stress = medium_stress_gain + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -15 + } + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + vengeful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + modifier = { + add = 20 + has_trait = vengeful + } + modifier = { + factor = 0.5 + has_trait = compassionate + } + ai_value_modifier = { + ai_honor = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + option = { + name = coronation_events.1026.d + trigger = { + has_activity_intent = coronation_exalt_crown + NOT = { + root = scope:token_finder + } + exists = dynasty + scope:token_finder.dynasty ?= root.dynasty + } + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + + coronation_exalt_crown_opinion_effect = yes + + stress_impact = { + arrogant = minor_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + factor = 0.5 + has_trait = content + } + ai_value_modifier = { + ai_honor = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + option = { + name = coronation_events.1026.e + + stress_impact = { + base = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + temperate = minor_stress_impact_gain + } + + ai_chance = { + base = 60 + modifier = { + add = 20 + has_trait = gluttonous + } + modifier = { + factor = 0.5 + has_trait = temperate + } + ai_value_modifier = { + ai_sociability = medium_chance_impact_negative_ai_value + ai_honor = medium_chance_impact_negative_ai_value + } + } + } + + option = { + name = coronation_events.1026.f + + add_piety = minor_piety_gain + stress_impact = { + gluttonous = minor_stress_impact_gain + temperate = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + modifier = { + add = 30 + has_trait = temperate + } + modifier = { + factor = 0.5 + has_trait = gluttonous + } + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_honor = medium_chance_impact_positive_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# a guest is highlighted during a choreography +coronation_events.1027 = { + type = activity_event + title = coronation_events.1027.t + desc = { + desc = coronation_events.1027.desc + first_valid = { + triggered_desc = { + trigger = { root = scope:highlighted_guest } + desc = coronation_events.1027.special_desc + } + triggered_desc = { + trigger = { + scope:highlighted_guest = { + is_in_guest_subset = { name = supporter } + } + } + desc = coronation_events.1027.supporter_desc + } + triggered_desc = { + trigger = { + scope:highlighted_guest = { + is_in_guest_subset = { name = detractor } + } + } + desc = coronation_events.1027.detractor_desc + } + desc = coronation_events.1027.fallback_desc + } + } + + left_portrait = { + character = root + animation = throne_room_applaud_1 + } + + right_portrait = { + trigger = { + NOT = { + scope:highlighted_guest = root + } + } + character = scope:highlighted_guest + animation = dancing + } + + theme = feast_activity + cooldown = { years = 5 } + + trigger = { + scope:activity = { + NOT = { + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_austere + } + } + any_attending_character = { + is_adult = yes + is_ai = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + is_adult = yes + is_ai = yes + } + create_character_memory = { + type = coronation_highlighted_memory + participants = { + host = scope:host + } + } + save_scope_as = highlighted_guest + } + } + } + + option = { + name = coronation_events.1027.special + trigger = { + root = scope:highlighted_guest + } + + add_prestige = medium_prestige_gain + add_legitimacy = minor_legitimacy_gain + + scope:activity = { + every_attending_character = { + limit = { NOT = { this = root } } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 500 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1027.a + trigger = { + has_activity_intent = coronation_impress_attendees + NOT = { root = scope:highlighted_guest } + } + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + ai_value_modifier = { + ai_sociability = medium_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1027.b + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:highlighted_guest = { + is_in_guest_subset = { name = supporter } + } + } + if = { + limit = { + reverse_opinion = { + target = scope:highlighted_guest + value > 50 + } + OR = { + scope:highlighted_guest = { is_ai = yes } + AND = { + scope:highlighted_guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + CHARACTER = scope:highlighted_guest + REASON = friend_dance + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:highlighted_guest + modifier = spirits_lifted_opinion + opinion = 20 + } + } + + scope:highlighted_guest = { + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + } + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { + generous = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value + ai_compassion = medium_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1027.c + trigger = { + has_activity_intent = coronation_weaken_detractors + scope:highlighted_guest = { + is_in_guest_subset = { name = detractor } + } + } + + scope:highlighted_guest = { + add_stress = medium_stress_gain + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -15 + } + } + + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + vengeful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + option = { + name = coronation_events.1027.d + trigger = { + has_activity_intent = coronation_exalt_crown + NOT = { root = scope:highlighted_guest } + } + + dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + + coronation_exalt_crown_opinion_effect = yes + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = medium_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1027.e + + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + NOT = { this = root } + } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 10 + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 45 + modifier = { + add = 10 + has_trait = gregarious + } + modifier = { + factor = 0.5 + has_trait = shy + } + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1027.f + + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + NOT = { this = root } + } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + } + + stress_impact = { + base = minor_stress_impact_loss + shy = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + } + + ai_chance = { + base = 35 + modifier = { + add = 15 + has_trait = shy + } + modifier = { + factor = 0.4 + has_trait = gregarious + } + ai_value_modifier = { + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Multi-faith blessing offer during the Coronation Ceremony +coronation_events.1028 = { + type = activity_event + title = coronation_events.1028.t + + theme = coronation_activity + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = interested + } + + center_portrait = { + character = scope:clergy_representative + animation = ecstasy + camera = camera_event_right + } + + right_portrait = { + character = scope:guest + animation = stunned + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:guest = { + is_in_guest_subset = { name = detractor } + } + } + desc = coronation_events.1028.detractor.desc + } + triggered_desc = { + trigger = { + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + desc = coronation_events.1028.supporter.desc + } + desc = coronation_events.1028.fallback.desc + } + } + + trigger = { + faith = { + NOT = { + has_doctrine = doctrine_pluralism_pluralistic + } + } + scope:activity = { + any_attending_character = { + is_adult = yes + is_ai = yes + NOT = { + faith = root.faith + has_trait = cynical + } + } + trigger_if = { + limit = { + root = { has_activity_intent = coronation_weaken_detractors } + } + any_attending_character = { + is_adult = yes + is_ai = yes + is_in_guest_subset = { name = detractor } + faith = root.faith + } + } + trigger_if = { + limit = { + root = { has_activity_intent = coronation_embrace_supporters } + } + any_attending_character = { + is_adult = yes + is_ai = yes + is_in_guest_subset = { name = supporter } + faith = root.faith + } + } + trigger_else = { + any_attending_character = { + is_adult = yes + is_ai = yes + faith = root.faith + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + scope:activity = { + random_attending_character = { + limit = { + is_adult = yes + is_ai = yes + is_in_guest_subset = { name = detractor } + faith = root.faith + } + save_scope_as = guest + } + } + } + else_if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + scope:activity = { + random_attending_character = { + limit = { + is_adult = yes + is_ai = yes + is_in_guest_subset = { name = supporter } + faith = root.faith + } + save_scope_as = guest + } + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + is_adult = yes + is_ai = yes + faith = root.faith + } + save_scope_as = guest + } + } + } + scope:activity = { + random_attending_character = { + limit = { + is_adult = yes + NOT = { + faith = root.faith + has_trait = cynical + } + } + save_scope_as = clergy_representative + } + } + } + + option = { + name = coronation_events.1028.supporter + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + add_learning_lifestyle_xp = medium_lifestyle_xp + add_piety = medium_piety_gain + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:guest } + scope:guest = { + opinion = { + target = root + value > 0 + } + } + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_matters_of_faith + CHARACTER = scope:guest + OPINION = default_friend_opinion + } + } + else = { + reverse_add_opinion = { + target = scope:guest + modifier = kindness_opinion + opinion = 20 + } + } + + + + scope:guest = { + add_piety = medium_piety_gain + } + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { + shy = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = high_chance_impact_negative_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1028.detractor + trigger = { + has_activity_intent = coronation_weaken_detractors + scope:guest = { + is_in_guest_subset = { name = detractor } + } + faith = { + faith_hostility_level = { + target = scope:clergy_representative.faith + value > faith_astray_level + } + } + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + + + scope:guest = { + add_piety = medium_piety_loss + add_stress = major_stress_gain + } + + scope:activity = { + every_attending_character = { + limit = { + NOT = { + has_trait = cynical + } + faith = root.faith + } + + custom = coronation_events.1028.detractor.tt + + add_opinion = { + target = scope:guest + modifier = impious_opinion + opinion = -10 + } + } + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + forgiving = minor_stress_impact_gain + vengeful = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = high_chance_impact_negative_ai_value + ai_vengefulness = medium_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1028.c # Publicly rebuke the request + + trigger = { + has_trait = zealous + } + add_piety = major_piety_gain + + random = { + chance = { + value = 10 + if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_astray_level + } + } + } + add = 10 + } + else_if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + add = 20 + } + else_if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + add = 30 + } + } + add_trait = holy_warrior + } + + scope:clergy_representative = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -15 + } + add_stress = minor_stress_gain + } + + scope:activity = { + every_attending_character = { + limit = { + NOT = { + this = scope:clergy_representative + } + has_trait = zealous + faith = root.faith + NOT = { this = root } + } + custom = coronation_events.1028.c.tt + add_opinion = { + target = root + modifier = pious_opinion + opinion = 20 + } + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = major_stress_impact_gain + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + ai_value_modifier = { + ai_zeal = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + option = { + name = coronation_events.1028.a + trigger = { + has_trait = cynical + } + add_character_modifier = { + modifier = tolerant_opinion_modifier + years = 25 + } + + scope:guest = { + coronation_move_towards_supporter_effect = { CHARACTER = scope:guest } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + add_piety = { + value = miniscule_piety_loss + if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value = faith_astray_level + } + } + } + add = minor_piety_loss + } + else_if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + add = medium_piety_loss + } + else_if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + add = major_piety_loss + } + } + + random = { + chance = { + value = 10 + if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_astray_level + } + } + } + add = 10 + } + else_if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + add = 20 + } + else_if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + add = 30 + } + } + add_perk = apostate_perk + } + + scope:activity = { + every_attending_character = { + limit = { + has_trait = zealous + faith = root.faith + } + + custom = coronation_events.1028.a.tt + + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + } + + if = { + limit = { + scope:activity = { + any_attending_character = { + faith = scope:clergy_representative.faith + this != scope:clergy_representative + } + } + } + scope:activity = { + every_attending_character = { + limit = { + faith = scope:clergy_representative.faith + NOT = { + this = scope:clergy_representative + } + } + custom = coronation_events.1028.a.tt3 + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + } + } + + stress_impact = { + cynical = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = high_chance_impact_negative_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1028.b # Politely decline alternative blessings + + trigger = { + NOT = { + has_trait = zealous + has_trait = cynical + } + } + add_piety = medium_piety_gain + + scope:activity = { + every_attending_character = { + limit = { + has_trait = zealous + faith = root.faith + } + + custom = coronation_events.1028.b.tt + + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_zeal = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1028.c # Publicly rebuke the request + add_piety = major_piety_gain + scope:clergy_representative = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -25 + } + } + if = { + limit = { + scope:clergy_representative = { is_courtier_of = root } + } + remove_courtier_or_guest = scope:clergy_representative + } + + scope:activity = { + every_attending_character = { + limit = { + NOR = { + this = scope:clergy_representative + this = root + } + has_trait = zealous + faith = root.faith + } + custom = coronation_events.1028.c.tt + add_opinion = { + target = root + modifier = pious_opinion + opinion = 20 + } + } + } + random = { + chance = { + value = 10 + if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_astray_level + } + } + } + add = 10 + } + else_if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + add = 20 + } + else_if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + add = 30 + } + } + add_trait = holy_warrior + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = major_stress_impact_gain + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + ai_value_modifier = { + ai_zeal = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + option = { + name = coronation_events.1028.d # Evade the question entirely + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + stress_impact = { + cynical = minor_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_honor = medium_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# you discover some forgotten ancient rights +coronation_events.1029 = { + type = activity_event + title = coronation_events.1029.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_activity_intent = coronation_embrace_supporters + } + desc = coronation_events.1029.supporter.desc + } + triggered_desc = { + trigger = { + has_activity_intent = coronation_weaken_detractors + } + desc = coronation_events.1029.detractor.desc + } + desc = coronation_events.1029.desc + } + } + + left_portrait = { + character = scope:guest + triggered_animation = { + trigger = { scope:guest = { is_in_guest_subset = { name = detractor } } } + animation = rage + } + triggered_animation = { + trigger = { scope:guest = { is_in_guest_subset = { name = supporter } } } + animation = ecstasy + } + } + + center_portrait = { + character = root + animation = interested + camera = camera_event_left + } + + right_portrait = { + character = scope:priest + animation = chancellor + } + + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + coronation_living_officiator_trigger = yes + primary_title.previous_holder ?= { + exists = yes + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + grab_mythical_founder_effect = yes + involved_activity.var:officiator ?= { + save_scope_as = priest + } + root.primary_title = { + save_scope_as = primary_title + } + + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + scope:activity = { + random_guest_subset = { + name = supporter + save_scope_as = guest + } + } + } + else_if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + scope:activity = { + random_guest_subset = { + name = detractor + save_scope_as = guest + } + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { is_ai = yes } + save_scope_as = guest + } + } + } + } + + option = { + name = coronation_events.1029.a + trigger = { + has_activity_intent = coronation_exalt_crown + has_ce1_dlc_trigger = yes + } + + gain_legitimizing_legend_seed_tooltip_effect = yes + legend_seed_great_deed_title_effect = { + TITLE = root.primary_title + } + + coronation_exalt_crown_opinion_effect = yes + + stress_impact = { ambitious = minor_stress_impact_loss } + ai_chance = { base = 50 } + } + + option = { + name = coronation_events.1029.b + trigger = { + has_activity_intent = coronation_embrace_supporters + } + if = { + limit = { + reverse_opinion = { + target = scope:guest + value > 30 + } + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + scope:guest = { + progress_towards_friend_effect = { + REASON = friend_ancestral_vow + CHARACTER = root + OPINION = 20 + } + } + } + else = { + reverse_add_opinion = { + target = scope:guest + modifier = loyalty_opinion + opinion = 25 + } + } + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { generous = minor_stress_impact_loss } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1029.c + trigger = { + has_activity_intent = coronation_weaken_detractors + } + if = { + limit = { + scope:guest = { is_ai = yes } + } + add_hook_if_possible_default_length_effect = { + TARGET = scope:guest + TYPE = manipulation_hook + } + } + + coronation_move_towards_supporter_effect = { CHARACTER = scope:guest } + + scope:guest = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -15 + } + add_stress = minor_stress_gain + } + + coronation_weaken_detractors_opinion_effect = yes + stress_impact = { vengeful = minor_stress_impact_loss } + ai_chance = { + base = 30 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1029.d + trigger = { + has_activity_intent = coronation_impress_attendees + diplomacy >= medium_skill_rating + } + show_as_unavailable = { + has_activity_intent = coronation_impress_attendees + diplomacy < medium_skill_rating + } + + skill = diplomacy + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { + activity_special_type_progression_tiny = yes + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { brave = minor_stress_impact_loss } + ai_chance = { base = 100 } + } + + option = { + name = coronation_events.1029.e + add_piety = minor_piety_gain + stress_impact = { shy = minor_stress_impact_loss } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_honor = high_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Scholar offers to include the coronation in their chronicle +scripted_trigger coronation_events_1030_valid_scholar = { + learning > 10 + is_ai = yes + is_in_guest_subset = { name = supporter } + OR = { + is_vassal_of = root + is_courtier_of = root + } +} + +coronation_events.1030 = { + type = activity_event + title = coronation_events.1030.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { has_activity_intent = coronation_exalt_crown } + desc = coronation_events.1030.exalt.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_impress_attendees } + desc = coronation_events.1030.impress.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_embrace_supporters } + desc = coronation_events.1030.supporters.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_weaken_detractors } + desc = coronation_events.1030.detractors.desc + } + } + } + + center_portrait = { + character = root + animation = interested + camera = camera_event_left + } + + right_portrait = { + character = scope:scholar + animation = storyteller + } + + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + involved_activity = { + any_attending_character = { + coronation_events_1030_valid_scholar = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + involved_activity = { + random_attending_character = { + limit = { + coronation_events_1030_valid_scholar = yes + } + weight = { + base = 1 + modifier = { + add = learning + } + modifier = { + is_vassal_of = root + add = 5 + } + } + save_scope_as = scholar + } + } + } + + option = { + name = coronation_events.1030.a + trigger = { + has_activity_intent = coronation_exalt_crown + } + + scope:scholar = { + duel = { + skills = { learning diplomacy } + value = high_skill_rating + # the scholar gets it right + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1030.tt.success + send_interface_toast = { + title = coronation_events.1030.tt.success + left_icon = scope:scholar + root = { + if = { + limit = { + has_ce1_dlc_trigger = yes + has_legend_chapter_trigger = { CHAPTER = extra_deed } + } + add_character_modifier = { + modifier = bp4_chronicled_coronation_modifier + years = 5 + } + promoted_legend ?= { + change_legend_quality_effect = { + VALUE = major_legend_quality_increase + } + set_legend_chapter = { + name = extra_deed + localization_key = legend_chapter_great_coronation + } + } + } + else = { + add_prestige = medium_prestige_gain + add_legitimacy = minor_legitimacy_gain + } + } + } + } + # the scholar gets it wrong + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1030.tt.failure + send_interface_toast = { + title = coronation_events.1030.tt.failure + left_icon = scope:scholar + add_prestige = minor_prestige_loss + add_stress = minor_stress_gain + } + } + } + } + + + + stress_impact = { arrogant = minor_stress_impact_loss } + + ai_chance = { + base = 40 + } + } + + option = { + name = coronation_events.1030.b + trigger = { + has_activity_intent = coronation_impress_attendees + } + + scope:scholar = { + duel = { + skills = { learning diplomacy } + value = high_skill_rating + # the scholar gets it right + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1030.tt.success + send_interface_toast = { + title = coronation_events.1030.tt.success + left_icon = scope:scholar + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + } + } + # the scholar gets it wrong + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1030.tt.failure + send_interface_toast = { + title = coronation_events.1030.tt.failure + left_icon = scope:scholar + add_prestige = minor_prestige_loss + add_stress = minor_stress_gain + } + } + } + } + + stress_impact = { gregarious = minor_stress_impact_loss } + + ai_chance = { base = 50 } + } + + option = { + name = coronation_events.1030.c + trigger = { + has_activity_intent = coronation_embrace_supporters + } + + scope:scholar = { + duel = { + skills = { learning diplomacy } + value = high_skill_rating + # the scholar gets it right + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1030.tt.success + send_interface_toast = { + title = coronation_events.1030.tt.success + left_icon = scope:scholar + scope:activity = { + every_guest_subset = { + name = supporter + limit = { is_ai = yes } + custom = every_supporter_activity + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + } + } + } + # the scholar gets it wrong + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1030.tt.failure + send_interface_toast = { + title = coronation_events.1030.tt.failure + left_icon = scope:scholar + add_prestige = minor_prestige_loss + add_stress = minor_stress_gain + } + } + } + } + + + + stress_impact = { compassionate = minor_stress_impact_loss } + + ai_chance = { base = 35 } + } + + option = { + name = coronation_events.1030.d + trigger = { + has_activity_intent = coronation_weaken_detractors + } + + scope:scholar = { + duel = { + skills = { learning diplomacy } + value = high_skill_rating + # the scholar gets it right + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1030.tt.success + send_interface_toast = { + title = coronation_events.1030.tt.success + left_icon = scope:scholar + scope:activity = { + every_guest_subset = { + name = detractor + limit = { is_ai = yes } + custom = every_detractor_tt + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + add_stress = minor_stress_gain + add_legitimacy = miniscule_legitimacy_loss + } + } + } + } + # the scholar gets it wrong + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1030.tt.failure + send_interface_toast = { + title = coronation_events.1030.tt.failure + left_icon = scope:scholar + add_prestige = minor_prestige_loss + add_stress = minor_stress_gain + } + } + } + } + + stress_impact = { vengeful = minor_stress_impact_loss } + + ai_chance = { base = 30 } + } + + option = { + name = coronation_events.1030.e + + add_piety = minor_piety_gain + + stress_impact = { + shy = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_zeal = high_chance_impact_positive_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Host sets the tone for the choir +coronation_events.1031 = { + type = activity_event + title = coronation_events.1031.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { has_activity_intent = coronation_exalt_crown } + desc = coronation_events.1031.exalt.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_impress_attendees } + desc = coronation_events.1031.impress.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_embrace_supporters } + desc = coronation_events.1031.supporters.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_weaken_detractors } + desc = coronation_events.1031.detractors.desc + } + } + } + + left_portrait = { + character = root + animation = personality_honorable + } + + center_portrait = { + trigger = { exists = involved_activity.var:officiator } + character = involved_activity.var:officiator + animation = chancellor + camera = camera_event_right + } + + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + coronation_living_officiator_trigger = yes + scope:activity = { + NOT = { + has_activity_option = { + category = ceremony_size + option = coronation_small_ceremony + } + } + } + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + involved_activity.var:officiator ?= { + save_scope_as = priest + } + } + + option = { + name = coronation_events.1031.e + + trigger = { + OR = { + culture = { + has_cultural_tradition = tradition_music_theory + } + has_trait = lifestyle_poet + } + } + + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + add_learning_skill = 1 + + scope:activity = { + if = { + limit = { exists = var:officiator } + var:officiator ?= { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + } + every_attending_character = { + limit = { + is_ai = yes + OR = { + has_trait = lifestyle_poet + has_trait = scholar + } + NOT = { + this = root + } + } + custom = every_poet_scholar + add_opinion = { + target = root + modifier = amazed_opinion + opinion = 10 + } + } + } + + stress_impact = { + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 300 + } + } + + + option = { + name = coronation_events.1031.a + + trigger = { + NOR = { + culture = { + has_cultural_tradition = tradition_music_theory + } + has_trait = lifestyle_poet + } + } + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + is_vassal_of = root + } + custom = every_attending_vassal + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + + stress_impact = { arrogant = minor_stress_impact_loss } + + ai_chance = { base = 40 } + } + + option = { + name = coronation_events.1031.b + add_diplomacy_skill = 1 + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + OR = { + is_in_guest_subset = { name = detractor } + has_trait = compassionate + } + } + custom = every_attending_detractor_or_compassionate + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 10 + } + } + } + + stress_impact = { compassionate = minor_stress_impact_loss } + + ai_chance = { base = 30 } + } + + option = { + name = coronation_events.1031.c + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + root.dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + + scope:activity = { + every_guest_subset = { + name = detractor + limit = { is_ai = yes } + custom = every_detractor_tt + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + add_stress = minor_stress_gain + } + } + + stress_impact = { vengeful = minor_stress_impact_loss } + + ai_chance = { base = 20 } + } + + option = { + name = coronation_events.1031.d + add_stress = minor_stress_loss + stress_impact = { shy = minor_stress_impact_loss } + ai_chance = { base = 10 } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# You prepare a grand gesture for the ceremony +coronation_events.1032 = { + type = activity_event + title = coronation_events.1032.t + + desc = coronation_events.1032.desc + + left_portrait = { + character = root + animation = personality_compassionate + } + + center_portrait = { + trigger = { exists = scope:supporter } + character = scope:supporter + camera = camera_event_right + animation = interested_left + } + + right_portrait = { + trigger = { exists = scope:detractor } + character = scope:detractor + animation = war_over_win + } + + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_guest_subset = { + name = supporter + is_ai = yes + } + any_guest_subset = { + name = detractor + is_ai = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + involved_activity.var:officiator ?= { + save_scope_as = priest + } + + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + is_ai = yes + } + save_scope_as = supporter + } + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + } + save_scope_as = detractor + } + } + + if = { + limit = { + NOT = { + faith = { + any_faith_holy_order = { + holy_order_patron = root + save_temporary_scope_as = order + } + } + } + # Jomsvikings should use their special decision if appropriate. + trigger_if = { + limit = { has_fp1_dlc_trigger = yes } + faith = { + NOT = { fp1_valid_norse_faith_for_jomsvikings_trigger = yes } + } + } + trigger_if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = holy_order_can_be_created_by_dukes + } + highest_held_title_tier >= tier_duchy + } + NOT = { + any_sub_realm_barony = { + is_under_holy_order_lease = yes + } + } + } + + OR = { + AND = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = holy_order_can_be_created_by_dukes + } + highest_held_title_tier >= tier_duchy + } + highest_held_title_tier >= tier_kingdom + any_held_county = { + any_in_de_jure_hierarchy = { + tier = tier_barony + is_capital_barony = no + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + } + } + } + random_held_county = { + limit = { + any_in_de_jure_hierarchy = { + tier = tier_barony + is_capital_barony = no + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + } + random_in_de_jure_hierarchy = { + limit = { + tier = tier_barony + is_capital_barony = no + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + save_scope_as = barony + } + } + } + } + + option = { + name = coronation_events.1032.c + flavor = coronation_events.1032.c.flavor + + trigger = { + exists = scope:barony + NOT = { + faith = { + any_faith_holy_order = { + holy_order_patron = root + save_temporary_scope_as = order + } + } + } + # Jomsvikings should use their special decision if appropriate. + trigger_if = { + limit = { has_fp1_dlc_trigger = yes } + faith = { + NOT = { fp1_valid_norse_faith_for_jomsvikings_trigger = yes } + } + } + trigger_if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = holy_order_can_be_created_by_dukes + } + highest_held_title_tier >= tier_duchy + } + NOT = { + any_sub_realm_barony = { + is_under_holy_order_lease = yes + } + } + } + + OR = { + AND = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = holy_order_can_be_created_by_dukes + } + highest_held_title_tier >= tier_duchy + } + highest_held_title_tier >= tier_kingdom + any_held_county = { + any_in_de_jure_hierarchy = { + tier = tier_barony + is_capital_barony = no + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + } + } + } + + custom_tooltip = create_holy_order_decision_effect_message_coronation + + if = { + limit = { + exists = scope:barony + } + hidden_effect = { + if = { + limit = { NOT = { scope:barony.holder = root } } + create_title_and_vassal_change = { + type = leased_out + save_scope_as = change + add_claim_on_loss = no + } + scope:barony = { + change_title_holder_include_vassals = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + + create_character = { + template = holy_order_leader_character + location = scope:barony.title_province + save_scope_as = leader + } + + create_holy_order_neutral_effect = { + LEADER = scope:leader + CAPITAL = scope:barony + NEW_HO_SCOPE = new_holy_order + FOUNDER = root + } + } + create_holy_order_effect = yes + + add_piety = medium_piety_loss + + + stress_impact = { impatient = minor_stress_impact_loss } + + ai_chance = { base = 20 } + } + + option = { + name = coronation_events.1032.d + flavor = coronation_events.1032.d.flavor + + trigger = { + OR = { + dread >= major_dread_value + has_trait = wrathful + } + scope:detractor = { + NAND = { + has_trait = blind + has_trait = disfigured + } + } + } + + add_dread = medium_dread_gain + scope:detractor = { + if = { + limit = { + NOT = { + has_trait = blind + } + } + add_trait = blind + add_opinion = { + modifier = blinded_me + target = root + } + } + else = { + add_trait = disfigured + add_opinion = { + modifier = disfigured_me + target = root + } + } + } + add_tyranny = medium_tyranny_gain + + stress_impact = { + vengeful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + + ai_chance = { + base = 15 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + ai_compassion >= low_positive_ai_value + } + } + } + } + option = { + name = coronation_events.1032.a + flavor = coronation_events.1032.a.flavor + + custom_tooltip = coronation_tt_positive_tiny + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + scope:activity = { + activity_special_type_progression_tiny = yes + every_attending_character = { + limit = { + is_ai = yes + is_in_guest_subset = { name = supporter } + NOT = { + this = root + } + } + custom = every_supporter_activity + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + } + remove_short_term_gold = medium_gold_value + + stress_impact = { compassionate = minor_stress_impact_loss } + + ai_chance = { base = 35 } + } + + option = { + name = coronation_events.1032.b + trigger = { + scope:supporter = { + OR = { + highest_held_title_tier >= tier_kingdom + AND = { + highest_held_title_tier < tier_kingdom + is_landed = yes + is_independent_ruler = yes + is_tributary = no + } + is_landed = no + } + } + } + + if = { + limit = { + scope:supporter = { + highest_held_title_tier >= tier_kingdom + } + } + scope:supporter = { + add_opinion = { + target = root + modifier = event_negotiated_alliance_opinion + } + } + custom_tooltip = { + text = create_alliance_supporter_tt + create_alliance = { + target = scope:supporter + allied_through_owner = root + allied_through_target = scope:supporter + } + } + } + else_if = { + limit = { + scope:supporter = { + highest_held_title_tier < tier_kingdom + is_landed = yes + is_independent_ruler = yes + is_tributary = no + } + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + scope:supporter = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + else_if = { + limit = { + scope:supporter = { + is_landed = no + } + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + set_relation_friend = { + reason = friend_coronation_honor + target = scope:supporter + } + hidden_effect = { + add_opinion = { + target = scope:supporter + modifier = friendliness_opinion + opinion = 50 + } + } + + reverse_add_opinion = { + target = scope:supporter + modifier = friendliness_opinion + opinion = 50 + } + } + + stress_impact = { arrogant = minor_stress_impact_loss } + + ai_chance = { base = 30 } + } + option = { + name = coronation_events.1032.e + + scope:detractor = { + add_opinion = { + target = root + opinion = 15 + modifier = commiseration_opinion + } + } + stress_impact = { + shy = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Rival speaks up +coronation_events.1033 = { + type = activity_event + title = coronation_events.1033.t + desc = coronation_events.1033.desc + + left_portrait = { + character = root + animation = disapproval + } + + right_portrait = { + character = scope:rival + animation = anger + } + + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + has_activity_intent = coronation_weaken_detractors + scope:activity = { + any_attending_character = { + has_relation_rival = root + OR = { + is_powerful_vassal = yes + highest_held_title_tier >= tier_kingdom + } + drinks_alcohol_trigger = yes + NOT = { + has_trait = temperate + } + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + ai_rationality < medium_positive_ai_value + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + custom_tooltip = happened_because_intent_tt + scope:activity = { + random_attending_character = { + limit = { + has_relation_rival = root + OR = { + is_powerful_vassal = yes + highest_held_title_tier >= tier_kingdom + } + drinks_alcohol_trigger = yes + NOT = { + has_trait = temperate + } + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + ai_rationality < medium_positive_ai_value + } + } + save_scope_as = rival + } + var:officiator ?= { + save_scope_as = priest + } + } + } + + option = { + name = coronation_events.1033.c + + add_dread = minor_dread_gain + rightfully_imprison_character_effect = { + IMPRISONER = root + TARGET = scope:rival + } + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + option = { + name = coronation_events.1033.a + add_legitimacy = minor_legitimacy_gain + add_piety = minor_piety_gain + if = { + limit = { + NOT = { has_relation_nemesis = scope:rival } + OR = { + scope:rival = { is_ai = yes } + AND = { + scope:rival = { + is_ai = no + } + is_ai = no + } + } + } + set_relation_nemesis = { + target = scope:rival + reason = rival_publicly_denounced_at_coronation + } + } + else = { + scope:rival = { + add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -50 + } + } + } + stress_impact = { + base = medium_stress_gain + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { + name = coronation_events.1033.b + + trigger = { + diplomacy >= 14 + } + + add_legitimacy = minor_legitimacy_gain + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + add_diplomacy_skill = 1 + + if = { + limit = { + OR = { + scope:rival = { is_ai = yes } + AND = { + scope:rival = { + is_ai = no + } + is_ai = no + } + } + } + scope:rival = { + remove_relation_rival = root + add_opinion = { + target = root + modifier = humbled_opinion + opinion = 25 + } + } + } + + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + OR = { + has_trait = compassionate + has_trait = trusting + is_in_guest_subset = { name = supporter } + } + } + custom = custom.every_compassionate_trusting_supporter + add_opinion = { + target = root + modifier = loyalty_opinion + opinion = 10 + } + } + } + + stress_impact = { forgiving = minor_stress_impact_loss } + + ai_chance = { base = 30 } + } + + option = { + name = coronation_events.1033.d + add_legitimacy = minor_legitimacy_loss + stress_impact = { + calm = minor_stress_impact_loss + humble = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = arrogant + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# choose a robe for the coronation +coronation_events.1034 = { + type = activity_event + title = coronation_events.1034.t + desc = coronation_events.1034.desc + + theme = coronation_activity + + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = shock + camera = camera_event_left + } + + center_portrait = { + character = scope:supporter + animation = debating + camera = camera_event_center + } + + right_portrait = { + character = scope:detractor + animation = anger + camera = camera_event_right + } + + lower_right_portrait = { + character = scope:host + } + + trigger = { + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + scope:host = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + } + scope:activity = { + any_guest_subset = { + name = detractor + this != root + culture = { has_graphical_east_asia_culture_group_trigger = yes } + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + } + any_guest_subset = { + name = supporter + this != root + culture = { has_graphical_east_asia_culture_group_trigger = yes } + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + this != root + culture = { has_graphical_east_asia_culture_group_trigger = yes } + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + } + save_scope_as = detractor + } + random_guest_subset = { + name = supporter + limit = { + this != root + culture = { has_graphical_east_asia_culture_group_trigger = yes } + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + } + save_scope_as = supporter + } + } + } + + option = { + name = coronation_events.1034.a # "I shall wear a robe finer than theirs — let them take the hint." + trigger = { + highest_held_title_tier >= scope:host.highest_held_title_tier + OR = { + is_in_guest_subset = { name = detractor } + dislikes_character_trigger = { CHARACTER = scope:host } + } + } + + custom_tooltip = coronation_events.1034.a.tt + + add_intrigue_lifestyle_xp = minor_lifestyle_xp + + add_character_flag = outshining_host + scope:host = { + trigger_event = coronation_events.1035 + } + + stress_impact = { + ambitious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + add = 25 + has_trait = arrogant + } + modifier = { + add = 10 + has_trait = ambitious + } + modifier = { + add = -20 + has_trait = humble + } + } + } + + option = { + name = coronation_events.1034.b # "I will match the Host’s colors, a silent sign of my allegiance." + trigger = { + OR = { + likes_character_trigger = { CHARACTER = scope:host } + is_in_guest_subset = { name = supporter } + } + } + + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + + add_opinion = { + target = scope:host + modifier = respect_opinion + opinion = 10 + } + + stress_impact = { + trusting = minor_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + add = 20 + has_trait = trusting + } + modifier = { + add = -10 + has_trait = deceitful + } + } + } + + option = { + name = coronation_events.1034.c # "Tradition guides me — I will wear what is proper." + add_piety = minor_piety_gain + + if = { + limit = { has_trait = confucian_education } + add_trait_xp = { + trait = confucian_education + value = lifestyle_confucian_education_xp_gain_minor_value + } + } + else = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + + stress_impact = { + zealous = minor_stress_impact_loss + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = 20 + has_trait = zealous + } + modifier = { + add = -15 + has_trait = arbitrary + } + } + } + + option = { + name = coronation_events.1034.d # "Let fashion speak — I’ll wear what the capital wears." + add_prestige = minor_prestige_gain + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + + stress_impact = { + gregarious = minor_stress_impact_loss + zealous = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = 15 + has_trait = gregarious + } + modifier = { + add = -15 + has_trait = zealous + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# some awful guest is trying to outshine you +coronation_events.1035 = { + type = activity_event + title = coronation_events.1035.t + desc = coronation_events.1035.desc + + theme = coronation_activity + + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = disapproval + camera = camera_event_left + } + + center_portrait = { + character = scope:offending_guest + animation = fanning_coyly + camera = camera_event_center + } + + trigger = { + scope:host = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + scope:activity = { + any_attending_character = { + has_character_flag = outshining_host + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_attending_character = { + limit = { + has_character_flag = outshining_host + } + save_scope_as = offending_guest + } + } + } + + option = { + name = coronation_events.1035.a # "Let them have their moment. My mandate stands above fabric." + + if = { + limit = { government_allows = merit } + change_merit = minor_merit_gain + } + else = { + add_prestige = minor_prestige_gain + } + + scope:offending_guest = { + add_opinion = { + target = root + modifier = weak_opinion + opinion = 10 + } + } + + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + + hidden_effect = { + scope:offending_guest = { + send_interface_toast = { + title = coronation_events.1035.a.toast + left_icon = root + add_prestige = minor_prestige_gain + } + } + } + + stress_impact = { + humble = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + add = 20 + has_trait = humble + } + modifier = { + add = -10 + has_trait = arrogant + } + } + } + + option = { + name = coronation_events.1035.b # "Their insult will not be forgotten." + + progress_towards_rival_effect = { + REASON = rival_outshine_coronation + CHARACTER = scope:offending_guest + OPINION = -20 + } + + hidden_effect = { + scope:offending_guest = { + send_interface_toast = { + title = coronation_events.1035.b.toast + left_icon = root + show_as_tooltip = { + root = { + progress_towards_rival_effect = { + REASON = rival_outshine_coronation + CHARACTER = scope:offending_guest + OPINION = -20 + } + } + } + } + } + } + + stress_impact = { + wrathful = minor_stress_impact_loss + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + add = 20 + has_trait = wrathful + } + modifier = { + add = -15 + has_trait = forgiving + } + } + } + + option = { + name = coronation_events.1035.c # "A gentle word in private should suffice." + + scope:offending_guest = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + + hidden_effect = { + scope:offending_guest = { + send_interface_toast = { + title = coronation_events.1035.c.toast + left_icon = root + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + just = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + modifier = { + add = 15 + has_trait = just + } + modifier = { + add = -10 + has_trait = callous + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + scope:activity = { + every_attending_character = { + remove_character_flag = outshining_host + } + } + } +} + +# People are reciting verses in honor of the coronation +coronation_events.1036 = { + type = activity_event + title = coronation_events.1036.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host.culture = { has_cultural_pillar = heritage_chinese } + } + desc = coronation_events.1036.china.desc + } + triggered_desc = { + trigger = { + scope:host.culture = { has_cultural_pillar = heritage_japonic } + } + desc = coronation_events.1036.japan.desc + } + triggered_desc = { + trigger = { + scope:host.culture = { has_cultural_pillar = heritage_korean } + } + desc = coronation_events.1036.korea.desc + } + desc = coronation_events.1036.desc + } + } + + theme = coronation_activity + + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = fanning + } + + center_portrait = { + character = scope:verse_initiator + animation = storyteller + } + + right_portrait = { + character = scope:host + animation = throne_room_bow_1 + } + + trigger = { + scope:host = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + scope:activity = { + any_attending_character = { + this != root + OR = { + likes_character_trigger = { CHARACTER = scope:host } + is_in_guest_subset = { name = supporter } + } + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_attending_character = { + limit = { + this != root + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + } + } + save_scope_as = verse_initiator + } + } + } + + option = { + name = coronation_events.1036.a # Praise Host in verse + + trigger = { + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + } + OR = { + likes_character_trigger = { CHARACTER = scope:host } + is_in_guest_subset = { name = supporter } + } + } + + progress_towards_friend_effect = { + REASON = best_friend_poetry + CHARACTER = scope:host + OPINION = 15 + } + + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + else_if = { + limit = { + has_trait = lifestyle_poet + has_trait_xp = { + trait = lifestyle_poet + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_poet + value = 10 + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 40 + modifier = { + add = 20 + has_trait = gregarious + } + modifier = { + add = 15 + likes_character_trigger = { CHARACTER = scope:host } + } + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { + name = coronation_events.1036.b # Veiled critique of Host + + trigger = { + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + } + OR = { + dislikes_character_trigger = { CHARACTER = scope:host } + is_in_guest_subset = { name = detractor } + } + } + + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + else_if = { + limit = { + has_trait = lifestyle_poet + has_trait_xp = { + trait = lifestyle_poet + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_poet + value = 10 + } + } + + scope:activity.host = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_poetry + OPINION = -10 + } + } + + stress_impact = { + cynical = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + modifier = { + add = 20 + has_trait = cynical + } + modifier = { + add = 20 + dislikes_character_trigger = { CHARACTER = scope:host } + } + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + option = { + name = coronation_events.1036.c # Compose formal verse + + trigger = { + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + } + } + + if = { + limit = { has_trait = confucian_education } + add_trait_xp = { + trait = confucian_education + value = lifestyle_confucian_education_xp_gain_minor_value + } + } + else = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + else_if = { + limit = { + has_trait = lifestyle_poet + has_trait_xp = { + trait = lifestyle_poet + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_poet + value = 10 + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + } + + ai_chance = { + base = 35 + modifier = { + add = 20 + has_trait = ambitious + } + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { + name = coronation_events.1036.d # Praise the recital + + progress_towards_friend_effect = { + REASON = friend_praised_poetry + CHARACTER = scope:verse_initiator + OPINION = 15 + } + + stress_impact = { + trusting = minor_stress_impact_loss + } + + ai_chance = { + base = 35 + modifier = { + add = 15 + has_trait = trusting + } + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { + name = coronation_events.1036.e # Subtle critique of recital + + add_intrigue_lifestyle_xp = minor_lifestyle_xp + scope:verse_initiator = { + add_opinion = { + target = root + modifier = frustrated_opinion + opinion = -15 + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + } + + ai_chance = { + base = 25 + modifier = { + add = 20 + has_trait = arrogant + } + ai_value_modifier = { + ai_greed = 1 + ai_vengefulness = 1 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# someone is taking a natural occurrence as an omen +coronation_events.1037 = { + type = activity_event + title = coronation_events.1037.t + desc = coronation_events.1037.desc + theme = coronation_activity + cooldown = { years = 10 } + + left_portrait = { + character = scope:host + animation = stress + camera = camera_event_center_pointing_right + } + + center_portrait = { + character = scope:skeptical_guest + animation = shock + camera = camera_event_center_pointing_left + } + + right_portrait = { + trigger = { exists = scope:respected_elder } + character = scope:respected_elder + animation = personality_zealous + } + + trigger = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + OR = { + location.county = { + any_county_situation = { + OR = { + situation_type = natural_disaster_flood + situation_type = natural_disaster_earthquake + } + } + } + # Ongoing plague + any_sub_realm_county = { + any_county_province = { + any_province_epidemic = { + outbreak_intensity > minor + } + } + } + } + scope:activity = { + any_attending_character = { + is_ai = yes + has_trait = zealous + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + has_trait = zealous + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + save_scope_as = skeptical_guest + } + random_attending_character ?= { + limit = { + age > 60 + OR = { + AND = { + has_trait = confucian_education + has_trait_xp = { + trait = confucian_education + value > 70 + } + } + learning >= high_skill_rating + has_relation_elder = root + } + } + save_scope_as = respected_elder + } + } + location.county = { + random_county_situation ?= { + limit = { + OR = { + situation_type = natural_disaster_flood + situation_type = natural_disaster_earthquake + } + } + save_scope_as = omen_happening + } + } + if = { + limit = { + NOT = { + exists = scope:omen_happening + } + } + random_sub_realm_county = { + random_county_province = { + random_province_epidemic = { + limit = { + outbreak_intensity > minor + } + save_scope_as = omen_happening + } + } + } + } + } + + option = { + name = coronation_events.1037.a # Invoke scripture, poetry, or history + + trigger = { + OR = { + has_trait = confucian_education + learning >= high_skill_rating + } + } + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + add_learning_lifestyle_xp = medium_lifestyle_xp + + scope:skeptical_guest = { + add_opinion = { + target = scope:host + modifier = impressed_opinion + opinion = 15 + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 35 + modifier = { + add = 20 + has_trait = confucian_education + } + modifier = { + add = 15 + learning >= high_skill_rating + } + modifier = { + add = 15 + has_trait = arrogant + } + modifier = { + add = 15 + has_trait = diligent + } + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { + name = coronation_events.1037.b # Invite a respected elder to speak + + trigger = { + exists = scope:respected_elder + } + + if = { + limit = { has_trait = confucian_education } + add_trait_xp = { + trait = confucian_education + value = lifestyle_confucian_education_xp_gain_minor_value + } + } + else_if = { + limit = { + location = { + is_province_valid_confucian_education_trigger = yes + } + has_government = celestial_government + } + add_trait = confucian_education + } + else = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + + stress_impact = { + zealous = minor_stress_impact_loss + temperate = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + modifier = { + add = 20 + has_trait = temperate + } + modifier = { + add = 20 + has_trait = zealous + } + ai_value_modifier = { + ai_honor = 1 + ai_zeal = 2 + } + } + } + + option = { + name = coronation_events.1037.c # Expel them from the ceremony + + add_dread = medium_dread_gain + add_prestige = minor_prestige_loss + + scope:skeptical_guest = { + remove_from_activity = scope:activity + } + + stress_impact = { + wrathful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + modifier = { + add = 20 + has_trait = wrathful + } + modifier = { + add = 10 + has_trait = arbitrary + } + modifier = { + add = -10 + has_trait = just + } + ai_value_modifier = { + ai_greed = 1 + ai_vengefulness = 2 + } + } + } + + option = { + name = coronation_events.1037.d # Laugh it off + + scope:skeptical_guest = { + add_opinion = { + target = scope:host + modifier = dismissed_me_opinion + opinion = -5 + } + } + + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_gain + cynical = minor_stress_impact_loss + } + + ai_chance = { + base = 25 + modifier = { + add = -10 + has_trait = zealous + } + modifier = { + add = -10 + has_trait = cynical + } + ai_value_modifier = { + ai_zeal = -1 + } + } + } + after = { + # For MP + coronation_ready_effect = yes + } +} diff --git a/N3OW/events/activities/coronation_activity/coronation_events_6.txt b/N3OW/events/activities/coronation_activity/coronation_events_6.txt new file mode 100644 index 00000000..71df0ce4 --- /dev/null +++ b/N3OW/events/activities/coronation_activity/coronation_events_6.txt @@ -0,0 +1,15492 @@ +namespace = coronation_events + +######################################### +# Coronation - Flavor Events # +# coronation_events - 6000-6999 # +# Jason "Dirty Dog" Cantalini # +######################################### + +scripted_trigger coronation_events_6000_valid_switch_title_trigger = { + is_landless_type_title = no + #Only one tier beneath host + tier = scope:host.highest_held_title_tier_minus_one + #Host isn't already de jure liege + NOT = { de_jure_liege = scope:host.primary_title } + #Shouldn't be possible if the de jure liege is at war for your title + trigger_if = { + limit = { + exists = de_jure_liege.holder + } + de_jure_liege.holder = { + NOT = { + any_character_war = { + primary_attacker = prev + primary_defender = { + OR = { + this = scope:host + this = root + } + } + any_in_list = { + list = war_targets + OR = { + this = root.primary_title + any_in_de_jure_hierarchy = { + this = root.primary_title + } + } + + } + } + } + } + } + #Either borders liege title or borders yours, so we won't make disjointed messes + any_de_jure_county = { + OR = { + any_neighboring_county = { + duchy = { + OR = { + this = scope:host.capital_county.duchy + this = root.primary_title + kingdom = scope:host.primary_title + } + } + } + duchy = scope:host.capital_county.duchy + } + } + #Every county is in realm + any_de_jure_county = { + count = all + holder = { + OR = { + this = scope:host + any_liege_or_above = { + this = scope:host + } + } + } + } +} +scripted_effect coronation_events_6000_confederation_de_jure_effect = { + hidden_effect = { + scope:host = { + primary_title = { + set_destroy_on_gain_same_tier = no + } + } + } + + #Switch de jure + every_in_list = { + list = new_confederation_de_jure + set_de_jure_liege_title = scope:host.primary_title + } + + if = { + limit = { + root = scope:loyal_vassal + } + add_prestige = { + add = minor_prestige_loss + multiply = "list_size(new_confederation_de_jure)" + } + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:host + opinion = 30 + } + } + else = { + hidden_effect = { + add_prestige = { + add = minor_prestige_loss + multiply = "list_size(new_confederation_de_jure)" + } + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:host + opinion = 30 + } + } + } + + #If this is the Confederation's first de jure duchy, give liege chance to confirm and remove "destroy on gain same tier" + if = { + limit = { + scope:host.primary_title = { + any_direct_de_jure_vassal_title = { + count = all + holder ?= { + OR = { + this = root + this = scope:host + } + } + } + } + } + scope:host = { + primary_title = { + custom_tooltip = confederation_remove_destroy_chance_tt + } + } + } + if = { + limit = { + scope:host.primary_title = { + NOT = { + exists = empire + } + } + } + scope:host = { + primary_title = { + set_de_jure_liege_title = scope:de_jure_empire + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = coronation_confederation_de_jure_log + character = scope:host + target = scope:loyal_vassal + score = 100 + show_in_conclusion = yes + } + } + scope:loyal_vassal = { + create_character_memory = { + type = offered_realm_to_confederation_memory + participants = { + liege = scope:host + } + } + } +} +# You are a vassal at a confederation kingdom's coronation and it feels p good +coronation_events.6000 = { + type = activity_event + title = coronation_events.6000.t + desc = coronation_events.6000.desc + left_portrait = { + character = root + animation = admiration + } + center_portrait = { + character = scope:host + animation = laugh + camera = camera_event_left + } + right_portrait = { + character = scope:other_vassal + animation = standing_horse + camera = camera_event_standing_with_horse_right + } + override_background = { + reference = courtyard + } + theme = coronation_activity + cooldown = { years = 1 } + + trigger = { + liege ?= { this = scope:activity.activity_host } + is_ruler = yes + highest_held_title_tier >= tier_county + scope:activity = { + activity_host = { + #The succession law is really the only thing that makes it a Confederation kingdom + primary_title = { + has_title_law = confederation_elective_succession_law + } + highest_held_title_tier = tier_kingdom + NOR = { + tyranny >= low_tyranny + has_trait = arrogant + dread >= 80 + } + } + any_attending_character = { + NOR = { + this = root + this = scope:activity.activity_host + is_in_guest_subset = { + name = detractor + } + } + liege = scope:activity.activity_host + age >= 6 + } + } + } + weight_multiplier = { + base = 1 + modifier = { + add = -0.5 + has_trait = paranoid + } + modifier = { + add = -0.25 + has_trait = arrogant + } + modifier = { + add = -0.2 + ai_sociability <= medium_negative_ai_value + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + activity_host = { save_scope_as = host } + random_attending_character = { + limit = { + NOR = { + this = root + this = scope:host + is_in_guest_subset = { + name = detractor + } + } + liege = scope:activity.activity_host + age >= 6 + } + save_scope_as = other_vassal + } + } + if = { + limit = { + NOT = { + culture = scope:host.culture + } + } + scope:host.culture = { + add_to_list = other_confed_cultures + } + } + scope:host = { + every_vassal = { + limit = { + NOT = { + culture = root.culture + } + } + culture = { + add_to_list = other_confed_cultures + } + } + } + #Switch de jure + every_held_title = { + limit = { + coronation_events_6000_valid_switch_title_trigger = yes + } + add_to_list = new_confederation_de_jure + } + #Get completely controlled + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + duchy ?= { + coronation_events_6000_valid_switch_title_trigger = yes + any_de_jure_county = { + count = all + holder = { + OR = { + this = root + liege = root + } + } + } + NOR = { + is_in_list = new_confederation_de_jure + exists = holder + } + } + } + duchy = { + add_to_list = new_confederation_de_jure + } + } + scope:host = { + every_held_title = { + limit = { + coronation_events_6000_valid_switch_title_trigger = yes + } + add_to_list = new_confederation_de_jure + } + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + duchy = { + NOT = { + is_in_list = new_confederation_de_jure + } + coronation_events_6000_valid_switch_title_trigger = yes + any_de_jure_county = { + count = all + holder = { + OR = { + this = scope:host + liege = scope:host + } + } + } + NOR = { + is_in_list = new_confederation_de_jure + exists = holder + } + } + } + duchy = { + add_to_list = new_confederation_de_jure + } + } + capital_county.empire ?= { + save_scope_as = de_jure_empire + } + } + } + #My sub-realm belongs forever to the Confederation! + option = { + name = coronation_events.6000.a + flavor = coronation_events.6000.a.flavor + trigger = { + any_held_title = { + coronation_events_6000_valid_switch_title_trigger = yes + any_de_jure_county = { + any_neighboring_county = { + duchy = { + OR = { + this = scope:host.capital_county.duchy + kingdom = scope:host.primary_title + } + } + } + } + } + OR = { + has_activity_intent = coronation_offer_support + scope:host.primary_title = { + any_de_jure_county = { + count >= 1 + exists = this + } + } + } + } + save_scope_as = loyal_vassal + custom_description_no_bullet = { text = if_host_accepts_oath_tt } + show_as_tooltip = { + coronation_events_6000_confederation_de_jure_effect = yes + } + #Notify liege + scope:host = { + #Effects will actually be done in mirror event + trigger_event = coronation_events.6001 + } + stress_impact = { + fickle = medium_stress_impact_gain + greedy = minor_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_honor = 1 + ai_greed = -1 + } + modifier = { + add = 50 + has_trait = loyal + } + modifier = { + add = -100 + NOT = { is_in_guest_subset = { name = supporter } } + } + #Want this to keep happening if it already happened once + modifier = { + add = 150 + scope:host.primary_title = { + any_de_jure_county = { + count >= 1 + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = fickle + has_trait = greedy + has_trait = arbitrary + has_trait = disloyal + is_in_guest_subset = { name = detractor } + } + } + } + } + #My family should get involved and be well-known here + option = { + name = coronation_events.6000.b + flavor = coronation_events.6000.b.flavor + trigger = { + house ?= { + NOT = { + has_variable = confederation_house_promoted + } + } + } + custom_tooltip = house_confederation_vote_bonus_tt + save_scope_as = root_scope + #Boosted AI interest in picking your candidate + house = { + set_variable = { + name = confederation_house_promoted + years = 10 + } + } + scope:activity = { + add_activity_log_entry = { + key = coronation_house_candidates_log + character = scope:root_scope + score = 20 + show_in_conclusion = yes + } + } + #Because custom tooltip inside house scope doesn't work properly... + show_as_tooltip = { + if = { + limit = { + has_activity_intent = coronation_bear_witness + } + add_piety = minor_piety_gain + } + if = { + limit = { + has_activity_intent = coronation_seize_advantages + } + add_prestige = minor_prestige_gain + } + else = { + add_prestige = miniscule_prestige_gain + } + every_courtier = { + custom = custom.every_house_member + if = { + limit = { + root = { has_activity_intent = coronation_bear_witness } + } + add_piety = minor_piety_gain + root = { custom_tooltip = improved_because_intent_tt } + } + if = { + limit = { + root = { has_activity_intent = coronation_seize_advantages } + } + add_prestige = minor_prestige_gain + root = { custom_tooltip = improved_because_intent_tt } + } + else = { + add_prestige = miniscule_prestige_gain + } + } + } + hidden_effect = { + house = { + every_house_member = { + custom = custom.every_house_member + if = { + limit = { + root = { has_activity_intent = coronation_bear_witness } + } + add_piety = minor_piety_gain + } + if = { + limit = { + root = { has_activity_intent = coronation_seize_advantages } + } + add_prestige = minor_prestige_gain + } + else = { + add_prestige = miniscule_prestige_gain + } + } + } + } + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + shy = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_greed = 1 + } + modifier = { + add = 150 + has_activity_intent = coronation_seize_advantages + } + modifier = { + add = 50 + has_activity_intent = coronation_bear_witness + } + modifier = { + add = 100 + is_in_guest_subset = { name = detractor } + } + modifier = { + add = -100 + is_in_guest_subset = { name = supporter } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + } + } + } + } + #confederates together is very naice + option = { + name = coronation_events.6000.c + hidden_effect = { + scope:host = { + reverse_add_opinion = { + target = root + modifier = trust_opinion + opinion = 10 + } + every_vassal = { + reverse_add_opinion = { + target = root + modifier = trust_opinion + opinion = 10 + } + } + } + } + scope:host = { + add_opinion = { + target = root + modifier = trust_opinion + opinion = 10 + } + every_vassal = { + custom = custom.every_fellow_vassal + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = trust_opinion + opinion = 10 + } + } + } + if = { + limit = { + has_activity_intent = coronation_bear_witness + any_in_list = { + list = other_confed_cultures + count >= 1 + } + } + every_in_list = { + custom = custom.every_other_culture_confederation + list = other_confed_cultures + change_cultural_acceptance = { + target = root.culture + value = minor_cultural_acceptance_gain + desc = confederation_camraderie + } + } + custom_tooltip = improved_because_intent_tt + } + else_if = { + limit = { + has_activity_intent = coronation_bear_witness + has_legitimacy = yes + } + add_legitimacy = miniscule_legitimacy_gain + custom_tooltip = improved_because_intent_tt + } + stress_impact = { + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + compassionate = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + ambitious = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + modifier = { + add = 50 + has_activity_intent = coronation_bear_witness + } + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = arrogant + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +#Host response event +# Your vassal wants to swear their domain to confederation forever +coronation_events.6001 = { + type = activity_event + title = coronation_events.6001.t + desc = coronation_events.6001.desc + left_portrait = { + character = root + animation = personality_honorable + camera = camera_event_very_left + } + center_portrait = { + character = scope:loyal_vassal + animation = celebrate_sword + camera = camera_event_center_pointing_left + } + right_portrait = { + character = scope:other_vassal + animation = toast + camera = camera_event_very_right + } + override_background = { + reference = courtyard + } + theme = coronation_activity + + immediate = { + # For MP + coronation_busy_effect = yes + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + scope:loyal_vassal = { + primary_title = { + de_jure_liege = { + save_scope_as = old_de_jure + } + } + } + } + + #If this is my de jure land... surely I should get a vote strength...? + option = { + name = coronation_events.6001.a + trigger = { + NOR = { + has_character_flag = confederation_politicking_vote_2 + has_character_flag = confederation_politicking_vote + } + } + save_scope_as = root_scope + if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + add_character_flag = { + flag = confederation_politicking_vote_2 + years = 10 + } + custom_tooltip = confederation_elective_extra_vote_2 + custom_tooltip = improved_because_intent_tt + scope:activity = { + add_activity_log_entry = { + key = coronation_vote_log_2 + character = scope:root_scope + score = 20 + show_in_conclusion = yes + } + } + } + else = { + add_character_flag = { + flag = confederation_politicking_vote + years = 10 + } + custom_tooltip = confederation_elective_extra_vote + scope:activity = { + add_activity_log_entry = { + key = coronation_vote_log + character = scope:root_scope + score = 20 + show_in_conclusion = yes + } + } + } + scope:loyal_vassal = { + send_interface_toast = { + type = event_toast_effect_good + title = confederation_king_accepts_promise_tt + left_icon = scope:host + scope:loyal_vassal = { + coronation_events_6000_confederation_de_jure_effect = yes + } + } + } + if = { + limit = { + primary_title = { + any_de_jure_county = { + count = 0 + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + } + modifier = { + add = 100 + primary_title = { + any_de_jure_county = { + count >= 1 + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = ambitious + } + primary_title = { + any_de_jure_county = { + count = 0 + } + } + } + } + } + #Sounds good man + option = { + name = coronation_events.6001.b + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + add_legitimacy = minor_legitimacy_gain + custom_tooltip = improved_because_intent_tt + } + else = { + add_legitimacy = miniscule_legitimacy_gain + } + scope:loyal_vassal = { + send_interface_toast = { + type = event_toast_effect_good + title = confederation_king_accepts_promise_tt + left_icon = scope:host + scope:loyal_vassal = { + coronation_events_6000_confederation_de_jure_effect = yes + } + } + } + + if = { + limit = { + primary_title = { + any_de_jure_county = { + count = 0 + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + } + modifier = { + add = 100 + primary_title = { + any_de_jure_county = { + count >= 1 + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = ambitious + } + primary_title = { + any_de_jure_county = { + count = 0 + } + } + } + } + } + #Nooooo, think of the kingdoms of old! + option = { + name = coronation_events.6001.c + flavor = coronation_events.6001.c.flavor + scope:loyal_vassal = { + send_interface_toast = { + type = event_toast_effect_bad + title = confederation_king_rejects_promise_tt + left_icon = scope:host + scope:host = { + if = { + limit = { + NOT = { + has_character_modifier = admires_regal_kingdoms + } + } + add_character_modifier = { + modifier = admires_regal_kingdoms + years = 10 + } + } + if = { + limit = { + scope:loyal_vassal = { + is_ai = yes + } + } + scope:loyal_vassal = { + set_relation_rival = { + target = root + reason = rival_traitor_to_confederation + } + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:loyal_vassal } + } + add_tyranny = medium_tyranny_gain + } + } + } + + stress_impact = { + humble = medium_stress_impact_gain + just = medium_stress_impact_gain + content = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + ai_honor = -1 + } + modifier = { + add = -30 + scope:loyal_vassal = { + is_ai = no + } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = just + has_trait = content + has_trait = trusting + primary_title = { + any_de_jure_county = { + count >= 1 + } + } + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + + +scripted_trigger coronation_events_6010_assailant_trigger = { + NOR = { + is_allied_to = scope:activity.activity_host + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:activity.activity_host } + is_tributary_of_suzerain_or_above = scope:activity.activity_host + any_tributary = { + this = scope:activity.activity_host + } + any_truce_target = { + this = scope:activity.activity_host + } + } + highest_held_title_tier >= tier_duchy + current_military_strength >= 300 +} +scripted_effect coronation_events_6010_defender_effect = { + add_trait = loyal + if = { + limit = { + government_has_flag = government_is_nomadic + } + vassal_contract_set_obligation_level = { type = liege_war_participation_obligation level = 1 } + add_prestige = medium_prestige_gain + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:host + opinion = 40 + } + } + else = { + #You will join liege's defensive wars + custom_tooltip = confederation_alliance + custom_tooltip = confederation_join_war_offer_tt + scope:host = { + if = { + limit = { + root = scope:host + } + hidden_effect = { + add_opinion = { + target = scope:loyal_vassal + modifier = event_negotiated_alliance_opinion + } + } + } + else = { + add_opinion = { + target = scope:loyal_vassal + modifier = event_negotiated_alliance_opinion + } + } + add_to_variable_list = { + name = confed_vassals_defensive + target = scope:loyal_vassal + } + } + #Gain alliance with liege + create_alliance = { + target = scope:host + allied_through_owner = scope:loyal_vassal + allied_through_target = scope:host + } + } +} +scripted_effect coronation_events_6010_defender_effect_2 = { + if = { + limit = { + highest_skill = martial + OR = { + has_education_martial_trigger = yes + has_focus_martial = yes + } + NOT = { + has_trait = unyielding_defender + } + } + add_trait = unyielding_defender + add_martial_skill = 1 + } + else = { + custom_tooltip = best_commander_gains_defender_tt + hidden_effect = { + ordered_courtier = { + order_by = martial + limit = { + NOR = { + has_trait = unyielding_defender + has_trait = infirm + has_trait = incapable + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:loyal_vassal } + is_imprisoned = no + } + add_trait = unyielding_defender + add_martial_skill = 3 + } + } + } + scope:activity = { + add_activity_log_entry = { + key = coronation_confederation_defender_log + character = scope:loyal_vassal + target = scope:host + score = 50 + show_in_conclusion = yes + } + } + create_character_memory = { + type = promised_to_defend_confederation_memory + participants = { + liege = scope:host + } + } +} + +#Can the king alone defend the Confederation from those who hate us...? +coronation_events.6010 = { + type = activity_event + title = coronation_events.6010.t + desc = coronation_events.6010.desc + left_portrait = { + character = scope:warrior_1 + animation = throne_room_two_handed_passive_shield + hide_info = yes + } + center_portrait = { + character = root + animation = dismissal + camera = camera_event_very_left + } + right_portrait = { + character = scope:warrior_2 + animation = horse_archer_idle + hide_info = yes + camera = camera_event_horse_right_forward + } + lower_left_portrait = scope:host + lower_right_portrait = scope:assailer + override_background = { + reference = burning_building + } + override_effect_2d = { + reference = smoke + } + + theme = coronation_activity + cooldown = { years = 1 } + + trigger = { + is_ruler = yes + current_military_strength >= 100 + highest_held_title_tier >= tier_county + liege ?= scope:activity.activity_host + scope:activity = { + activity_host = { + #The succession law is really the only thing that makes it a Confederation kingdom + primary_title = { + has_title_law = confederation_elective_succession_law + } + highest_held_title_tier = tier_kingdom + any_neighboring_top_liege_realm_owner = { + coronation_events_6010_assailant_trigger = yes + } + } + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity.activity_host = { + save_scope_as = host + } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + scope:activity.activity_location = { + if = { + limit = { + root = { is_ai = no } + scope:host = { is_ai = yes } + } + county = { + change_county_control = minor_county_control_loss + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + } + save_scope_as = location + } + scope:host = { + primary_heir ?= { + save_scope_as = confederation_heir + } + ordered_neighboring_top_liege_realm_owner = { + order_by = { + value = "opinion(scope:host)" + multiply = -1 + } + limit = { + highest_held_title_tier >= tier_empire + current_military_strength >= scope:host.current_military_strength + coronation_events_6010_assailant_trigger = yes + } + alternative_limit = { + highest_held_title_tier >= tier_kingdom + current_military_strength >= scope:host.current_military_strength + coronation_events_6010_assailant_trigger = yes + } + alternative_limit = { + current_military_strength >= scope:host.current_military_strength + coronation_events_6010_assailant_trigger = yes + } + alternative_limit = { + coronation_events_6010_assailant_trigger = yes + } + save_scope_as = assailer + } + } + create_character = { + template = mercenary + dynasty = none + location = scope:activity.activity_location + gender_female_chance = root_soldier_female_chance + faith = scope:activity.activity_location.faith + culture = scope:activity.activity_location.culture + save_scope_as = warrior_1 + } + create_character = { + template = mercenary + dynasty = none + location = scope:activity.activity_location + gender_female_chance = root_soldier_female_chance + faith = scope:activity.activity_location.faith + culture = scope:activity.activity_location.culture + save_scope_as = warrior_2 + } + scope:warrior_1 = { + add_character_flag = need_military_outfit + } + scope:warrior_2 = { + add_character_flag = need_military_outfit + } + } + + #I will fight beside the Confederation king! + option = { + name = coronation_events.6010.a + trigger = { + NOT = { + is_at_war_with = scope:host + } + OR = { + AND = { + government_has_flag = government_is_nomadic + NOT = { + subject_contract_has_flag = vassal_contract_liege_forced_war_override + } + } + NOR = { + government_has_flag = government_is_nomadic + is_allied_to = scope:host + } + } + #Too many icons being displayed on option + trigger_if = { + limit = { + has_activity_intent = coronation_offer_support + } + has_activity_intent = coronation_offer_support + } + trigger_else_if = { + limit = { + has_trait = loyal + } + has_trait = loyal + } + trigger_else_if = { + limit = { + has_trait = just + } + has_trait = just + } + trigger_else = { + has_trait = brave + } + } + custom_description_no_bullet = { text = if_host_accepts_oath_tt } + save_scope_as = loyal_vassal + show_as_tooltip = { + coronation_events_6010_defender_effect = yes + coronation_events_6010_defender_effect_2 = yes + } + #Notify liege + scope:host = { + #Effects will actually be done in mirror event + trigger_event = coronation_events.6011 + } + stress_impact = { + just = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + fickle = medium_stress_impact_gain + craven = major_stress_impact_gain + arbitrary = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 1 + } + modifier = { + add = -75 + opinion = { + target = scope:host + value <= -20 + } + } + modifier = { + add = 50 + OR = { + has_trait = just + has_trait = brave + } + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = fickle + has_trait = arbitrary + has_trait = paranoid + has_trait = disloyal + } + } + } + } + #If it is OUR throne, surely I should have a claim to it... + option = { + name = coronation_events.6010.b + flavor = coronation_events.6010.b.flavor + trigger = { + NOR = { + has_perk = meritocracy_perk + AND = { + is_diarch_of_target = scope:host + scope:host = { + NOT = { has_diarchy_parameter = can_be_instantly_dismissed } + } + } + AND = { + is_powerful_vassal_of = scope:host + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_claim_throne_for_powerful_vassals + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:host + } + } + } + AND = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_claim_throne_for_all + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:host + } + } + } + AND = { + exists = title:d_sunni.holder + is_vassal_of = title:d_sunni.holder + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_claim_throne_for_caliph_vassals + } + } + has_character_flag = confederation_claim_throne + } + has_activity_intent = coronation_disrupt_loyalists + } + custom_tooltip = confederation_claim_throne + add_character_flag = confederation_claim_throne + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + humble = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + modifier = { + add = 50 + OR = { + has_trait = deceitful + has_trait = ambitious + } + } + modifier = { + OR = { + has_trait = disloyal + is_in_guest_subset = { name = detractor } + } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = just + } + } + } + } + #I need to get him replaced... + option = { + name = coronation_events.6010.c + trigger = { + NOR = { + has_character_flag = confederation_politicking_vote_2 + has_character_flag = confederation_politicking_vote + } + } + add_legitimacy = minor_legitimacy_gain + save_scope_as = root_scope + #Additional vote + if = { + limit = { + has_activity_intent = coronation_seize_advantages + } + add_character_flag = { + flag = confederation_politicking_vote_2 + years = 10 + } + custom_tooltip = confederation_elective_extra_vote_2 + custom_tooltip = improved_because_intent_tt + scope:activity = { + add_activity_log_entry = { + key = coronation_vote_log_2 + character = scope:root_scope + score = 20 + show_in_conclusion = yes + } + } + + } + else = { + add_character_flag = { + flag = confederation_politicking_vote + years = 10 + } + custom_tooltip = confederation_elective_extra_vote + scope:activity = { + add_activity_log_entry = { + key = coronation_vote_log + character = scope:root_scope + score = 20 + show_in_conclusion = yes + } + } + } + + #Disrupt loyalists bonus + if = { + limit = { + NOT = { + scope:confederation_heir = { + has_character_flag = harm_confederation_candidacy + } + } + #Limit how much this gets stolen from players/happens from non-players + OR = { + is_ai = no + is_powerful_vassal = yes + } + scope:confederation_heir = { + OR = { + AND = { + exists = scope:house.host + house ?= scope:host.house + } + AND = { + exists = involved_activity + is_in_guest_subset = { name = supporter } + } + } + NOR = { + AND = { + exists = root.house + house ?= root.house + } + is_allied_to = root + } + } + has_activity_intent = coronation_disrupt_loyalists + } + custom_tooltip = harm_confederation_candidate_vote_tt + scope:confederation_heir = { + add_character_flag = { + flag = harm_confederation_candidacy + years = 10 + } + } + if = { + limit = { + scope:host.primary_heir.dynasty ?= { + this = scope:host.dynasty + } + } + reverse_add_opinion = { + target = scope:host + modifier = ruined_my_heir_opinion + opinion = -20 + } + } + custom_tooltip = improved_because_intent_tt + } + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_vengefulness = 1 + } + modifier = { + add = 50 + has_trait = arrogant + } + modifier = { + OR = { + has_trait = disloyal + is_in_guest_subset = { name = detractor } + } + add = 50 + } + modifier = { + add = 50 + has_activity_intent = coronation_disrupt_loyalists + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = trusting + } + } + } + } + #confederates together STRONK + option = { + name = coronation_events.6010.d + add_character_modifier = { + modifier = confederation_warrior_modifier + years = 10 + } + hidden_effect = { + scope:host = { + reverse_add_opinion = { + target = root + modifier = admires_resolve_opinion + opinion = 10 + } + every_vassal = { + limit = { + NOT = { + this = root + } + } + reverse_add_opinion = { + target = root + modifier = admires_resolve_opinion + opinion = 5 + } + } + } + } + scope:host = { + add_opinion = { + target = root + modifier = admires_resolve_opinion + opinion = 10 + } + add_character_modifier = { + modifier = confederation_warrior_modifier + years = 10 + } + every_vassal = { + custom = custom.every_fellow_vassal + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = admires_resolve_opinion + opinion = 5 + } + add_character_modifier = { + modifier = confederation_warrior_modifier + years = 10 + } + } + } + custom_tooltip = confederation_warrior_modifier_stacking_tt + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + scope:warrior_1 = { + silent_disappearance_effect = yes + } + scope:warrior_2 = { + silent_disappearance_effect = yes + } + } +} + +scripted_trigger coronation_events_6011_trigger = { + is_adult = yes + age <= 32 + is_courtier_of = $CHARACTER$ + is_imprisoned = no + is_healthy = yes + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + NOR = { + is_primary_heir_of = $CHARACTER$ + is_player_heir_of = $CHARACTER$ + } + trigger_if = { + limit = { + has_variable = coronation_events_6011_liege + } + var:coronation_events_6011_liege = { + NOT = { + this = $CHARACTER$ + } + } + } + prowess >= low_skill_rating + opinion = { + target = $CHARACTER$ + value > 0 + } + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } + } +} +scripted_trigger coronation_events_6011_county_trigger = { + is_landless_type_title = no + NOT = { + any_county_province = { + has_holding_type = church_holding + } + } + any_county_province = { + has_holding = no + } + any_county_province = { + has_holding_type = tribal_holding + OR = { + has_building_or_higher = palisades_01 + has_building_or_higher = war_camps_01 + has_building_or_higher = warrior_lodges_01 + } + } +} + +#Host response event +# Your vassal wants to swear to aid you in war +coronation_events.6011 = { + type = activity_event + title = coronation_events.6011.t + desc = coronation_events.6011.desc + left_portrait = { + character = root + animation = stress + } + center_portrait = { + character = scope:loyal_vassal + animation = rage + camera = camera_event_center_pointing_left + } + right_portrait = { + character = scope:warrior_youth + animation = throne_room_two_handed_passive_shield + } + lower_center_portrait = scope:assailer + lower_right_portrait = scope:warrior_youth_vassal + override_background = { + reference = burning_building + } + override_effect_2d = { + reference = smoke + } + theme = coronation_activity + + trigger = { + NOT = { + has_character_flag = ach_6011_recently_triggered + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + add_character_flag = { + flag = ach_6011_recently_triggered + months = 1 + } + + #Trash the place a bit + scope:location.county = { + change_county_control = miniscule_county_control_loss + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + ordered_sibling = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = root } + martial >= average_skill_rating + } + save_scope_as = warrior_youth + } + if = { + limit = { + NOT = { + exists = scope:warrior_youth + } + } + ordered_child = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = root } + martial >= average_skill_rating + } + save_scope_as = warrior_youth + } + } + if = { + limit = { + NOT = { + exists = scope:warrior_youth + } + exists = house + } + house = { + ordered_house_member = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = root } + martial >= average_skill_rating + } + save_scope_as = warrior_youth + } + } + } + scope:warrior_youth = { + add_character_flag = need_military_outfit + } + scope:loyal_vassal = { + ordered_sibling = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = scope:loyal_vassal } + martial >= average_skill_rating + } + save_scope_as = warrior_youth_vassal + } + if = { + limit = { + NOT = { + exists = scope:warrior_youth_vassal + } + } + ordered_child = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = scope:loyal_vassal } + martial >= average_skill_rating + } + save_scope_as = warrior_youth_vassal + } + } + if = { + limit = { + NOT = { + exists = scope:warrior_youth_vassal + } + exists = house + } + house = { + ordered_house_member = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = scope:loyal_vassal } + martial >= average_skill_rating + } + save_scope_as = warrior_youth_vassal + } + } + } + } + if = { + limit = { + capital_county = { + coronation_events_6011_county_trigger = yes + } + } + capital_county = { + save_scope_as = pacifying_county + } + } + else = { + ordered_held_title = { + order_by = development_level + limit = { + tier = tier_county + coronation_events_6011_county_trigger = yes + } + save_scope_as = pacifying_county + } + } + scope:loyal_vassal = { + if = { + limit = { + capital_county = { + coronation_events_6011_county_trigger = yes + } + } + capital_county = { + save_scope_as = pacifying_county_vassal + } + } + else = { + ordered_held_title = { + order_by = development_level + limit = { + tier = tier_county + coronation_events_6011_county_trigger = yes + } + save_scope_as = pacifying_county_vassal + } + } + } + } + #Brace your lands for peace, my vassal, not war + option = { + trigger = { + exists = scope:pacifying_county + exists = scope:pacifying_county_vassal + government_has_flag = government_is_tribal + #Done this way so it doesn't show too many traits + OR = { + trigger_if = { + limit = { + has_trait = architect + } + has_trait = architect + } + trigger_else_if = { + limit = { + has_trait = administrator + } + has_trait = administrator + } + trigger_else_if = { + limit = { + has_trait = scholar + } + has_trait = scholar + } + trigger_else_if = { + limit = { + has_trait = diplomat + } + has_trait = diplomat + } + trigger_else_if = { + limit = { + has_trait = theologian + } + has_trait = theologian + } + trigger_else_if = { + limit = { + has_trait = compassionate + } + has_trait = compassionate + } + trigger_else_if = { + limit = { + has_trait = trusting + } + has_trait = trusting + } + trigger_else = { + has_trait = zealous + } + culture = { + has_cultural_tradition = tradition_pacifism + } + faith = { + OR = { + has_doctrine = tenet_pacifism + has_doctrine = tenet_dharmic_pacifism + } + } + } + scope:loyal_vassal = { + is_ai = yes + } + } + name = coronation_events.6011.a + flavor = coronation_events.6011.a.flavor + add_piety = major_piety_gain + add_prestige = major_prestige_loss + scope:pacifying_county = { + random_county_province = { + limit = { + OR = { + has_building_or_higher = warrior_lodges_01 + has_building_or_higher = palisades_01 + has_building_or_higher = war_camps_01 + } + } + if = { + limit = { + has_building_or_higher = war_camps_01 + } + destroy_or_downgrade_tribal_building_effect = { BUILDING = war_camps } + } + if = { + limit = { + has_building_or_higher = palisades_01 + } + destroy_or_downgrade_tribal_building_effect = { BUILDING = palisades } + } + if = { + limit = { + has_building_or_higher = warrior_lodges_01 + } + destroy_or_downgrade_building_effect = { BUILDING = warrior_lodges } + } + } + random_county_province = { + limit = { + has_holding = no + } + begin_create_holding = church_holding + } + } + scope:loyal_vassal = { + scope:pacifying_county_vassal = { + random_county_province = { + limit = { + OR = { + has_building_or_higher = warrior_lodges_01 + has_building_or_higher = palisades_01 + has_building_or_higher = war_camps_01 + } + } + if = { + limit = { + has_building_or_higher = war_camps_01 + } + destroy_or_downgrade_tribal_building_effect = { BUILDING = war_camps } + } + if = { + limit = { + has_building_or_higher = palisades_01 + } + destroy_or_downgrade_tribal_building_effect = { BUILDING = palisades } + } + if = { + limit = { + has_building_or_higher = warrior_lodges_01 + } + destroy_or_downgrade_building_effect = { BUILDING = warrior_lodges } + } + } + random_county_province = { + limit = { + has_holding = no + } + begin_create_holding = church_holding + } + } + } + stress_impact = { + zealous = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + paranoid = major_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = major_stress_impact_gain + cynical = medium_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = 1 + ai_energy = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + has_trait = cynical + has_trait = sadistic + } + } + } + } + + #Yes, we all should fight! In fact, send your youths to join a warband led by my kin + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + exists = scope:warrior_youth + exists = scope:warrior_youth_vassal + scope:loyal_vassal = { + is_ai = yes + } + trigger_if = { + limit = { + government_has_flag = government_is_tribal + } + has_dlc_feature = landless_playable + } + } + name = coronation_events.6011.b + flavor = coronation_events.6011.b.flavor + + #youth becomes laamp or landless nomad + scope:warrior_youth = { + if = { + limit = { + root = { government_has_flag = government_is_nomadic } + } + save_scope_as = holder + create_nomad_title = { + name = nomad_title_name + holder = scope:warrior_youth + government = nomad_government + save_scope_as = new_nomad_title + } + change_government = nomad_government + hidden_effect = { + add_gold = 30 + } + root = { + pay_herd = { + target = scope:warrior_youth + value = domicile.medium_herd_value + } + } + } + else = { + create_landless_adventurer_title_tooltip_effect = yes + add_character_modifier = { + modifier = ep3_voluntary_laamp_character_modifier + years = 5 + } + hidden_effect = { + # Create Adventurer + create_landless_adventurer_title_effect = { + REASON = flag:runaway_allowed + FLAVOR_CHAR = scope:warrior_youth + } + domicile ?= { + change_provisions = major_provisions_gain + } + } + root = { + pay_short_term_gold = { + target = scope:warrior_youth + gold = medium_gold_value + } + } + + + add_realm_law = camp_purpose_mercenaries + # Debug tracking + if = { + limit = { + is_ai = yes + debug_only = yes + } + if = { + limit = { exists = global_var:ai_voluntary_laamp_count } + change_global_variable = { + name = ai_voluntary_laamp_count + add = 1 + } + } + else = { + set_global_variable = { + name = ai_voluntary_laamp_count + value = 1 + } + } + debug_log = "AI became adventurer voluntarily" + debug_log_scopes = yes + } + } + + add_courtier = scope:warrior_youth_vassal + hidden_effect = { + scope:warrior_youth_vassal = { + add_trait = lifestyle_blademaster + } + } + + if = { + limit = { + government_has_flag = government_is_nomadic + } + create_maa_regiment = { + type = steppe_raiders + check_can_recruit = no + size = 2 + } + create_maa_regiment = { + type = horse_archers + check_can_recruit = no + size = 2 + } + } + else_if = { + limit = { + culture = { + culture_specializes_in_light_cavalry_maa = yes + } + } + create_maa_regiment = { + type = light_horsemen + check_can_recruit = no + size = 3 + } + } + else_if = { + limit = { + culture = { + culture_specializes_in_archer_maa = yes + } + } + create_maa_regiment = { + type = bowmen + check_can_recruit = no + size = 3 + } + create_maa_regiment = { + type = bowmen + check_can_recruit = no + size = 2 + } + } + else_if = { + limit = { + culture = { + culture_specializes_in_pikemen_maa = yes + } + } + create_maa_regiment = { + type = pikemen_unit + check_can_recruit = no + size = 3 + } + } + else = { + create_maa_regiment = { + type = light_footmen + check_can_recruit = no + size = 3 + } + create_maa_regiment = { + type = light_footmen + check_can_recruit = no + size = 2 + } + } + custom_tooltip = confederate_king_youth_warrior_tt + add_opinion = { + target = scope:host + modifier = event_negotiated_alliance_opinion + } + create_alliance = { + target = scope:host + allied_through_owner = scope:warrior_youth + allied_through_target = scope:host + } + } + + scope:warrior_youth = { + set_variable = { + name = coronation_events_6011_liege + value = root + years = 5 + } + } + scope:loyal_vassal = { + coronation_events_6010_defender_effect = yes + #The king doesn't need to see the rest + hidden_effect = { + coronation_events_6010_defender_effect_2 = yes + } + } + stress_impact = { + paranoid = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 300 + ai_value_modifier = { + ai_honor = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:loyal_vassal + multiplier = 3 + } + modifier = { + add = -200 + OR = { + has_trait = paranoid + has_trait = arbitrary + } + } + } + } + #I accept, we must defend our peoples + option = { + name = coronation_events.6011.c + scope:loyal_vassal = { + send_interface_toast = { + type = event_toast_effect_good + title = confederation_king_accepts_promise_tt + left_icon = scope:host + coronation_events_6010_defender_effect = yes + #The king doesn't need to see the rest + hidden_effect = { + coronation_events_6010_defender_effect_2 = yes + } + } + } + stress_impact = { + trusting = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:loyal_vassal + multiplier = 1 + } + modifier = { + add = -50 + OR = { + has_trait = arrogant + has_trait = arbitrary + } + } + } + } + #I can defend us all, thank you + option = { + name = { + trigger = { + has_activity_intent = coronation_exalt_crown + } + text = coronation_events.6011.d_house + } + name = { + text = coronation_events.6011.d + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = coronation_tt_positive_major + scope:activity = { activity_special_type_progression_major = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_major + CHAR = root + } + } + else = { + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + } + #exalt the crown bonus + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + dynasty = { + add_dynasty_prestige = miniscule_dynasty_prestige_value + } + custom_tooltip = improved_because_intent_tt + } + hidden_effect = { + scope:loyal_vassal = { + send_interface_toast = { + type = event_toast_effect_bad + title = confederation_king_rejects_promise_tt + left_icon = scope:host + reverse_add_opinion = { + target = scope:host + modifier = loyalty_opinion + opinion = 15 + } + } + } + } + stress_impact = { + arrogant = miniscule_stress_impact_loss + trusting = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -0.5 + } + modifier = { + add = -30 + scope:loyal_vassal = { + is_ai = no + } + } + modifier = { + add = -50 + OR = { + has_trait = trusting + has_trait = humble + } + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + scope:warrior_youth ?= { + remove_character_flag = need_military_outfit + } + } +} + +scripted_trigger coronation_events_6020_foe_trigger = { + save_temporary_scope_as = foe_temp + NOT = { + government_has_flag = government_is_herder + } + #sedentaries shouldn't go off invading nomadic lands + trigger_if = { + limit = { + $CHARACTER$ = { + NOT = { + government_has_flag = government_is_nomadic + } + } + } + NOT = { + government_has_flag = government_is_nomadic + } + } + $CHARACTER$ = { + NOR = { + var:coronation_war_foe ?= { + this = scope:foe_temp + } + var:coronation_war_foe_2 ?= { + this = scope:foe_temp + } + } + } + is_ruler = yes + trigger_if = { + limit = { + exists = scope:activity.var:officiator + } + NOT = { + this = scope:activity.var:officiator + } + } + highest_held_title_tier >= tier_county + current_military_strength <= $CHARACTER$.current_military_strength + trigger_if = { + limit = { + is_participant_in_activity = scope:activity + } + NOT = { is_in_guest_subset = { name = supporter } } + } + OR = { + NOT = { + is_vassal_or_below_of = root + } + AND = { + is_vassal_of = root + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + root = { has_imprisonment_reason = scope:foe_temp } + is_a_faction_member = yes + AND = { + any_claim = { + holder ?= root + } + NOT = { + any_parent = { + this = root + } + } + } + opinion = { + target = root + value < -50 + } + } + } + } + NOR = { + is_allied_to = root + is_allied_to = $CHARACTER$ + has_truce = $CHARACTER$ + is_tributary_of_suzerain_or_above = root + is_tributary_of_suzerain_or_above = $CHARACTER$ + root = { + is_tributary_of_suzerain_or_above = scope:foe_temp + } + any_warden_hostage = { + home_court = $CHARACTER$ + } + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_good_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } + } + any_sub_realm_county = { + any_neighboring_county = { + holder = { + OR = { + this = $CHARACTER$ + any_liege_or_above = { + this = $CHARACTER$ + } + } + } + } + } +} +scripted_trigger coronation_events_6020_supporter_trigger = { + is_ai = yes + location = scope:activity.activity_location + save_temporary_scope_as = supporter_temp + NOR = { + this = root + scope:activity.var:officiator ?= this + } + is_vassal_of = root + exists = capital_county + is_at_war = no + gold > 0 + #They have at least SOME army like c'mon + current_military_strength >= 200 + ##Borders vassal to attack or independent ruler to attack + OR = { + any_neighboring_top_liege_realm_owner = { + coronation_events_6020_foe_trigger = {CHARACTER = scope:supporter_temp } + } + root = { + any_vassal = { + NOT = { this = scope:supporter_temp } + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter_temp } + } + } + } + ai_boldness >= 0 + OR = { + ai_greed > 0 + ai_energy > 0 + ai_zeal > 0 + ai_honor > 0 + ai_boldness >= medium_positive_ai_value + } + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + culture = { + NOT = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + capital_county ?= { + development_level >= 1 + } + } +} +scripted_effect coronation_events_6020_mass_mobilization_effect = { + add_martial_lifestyle_xp = medium_lifestyle_xp + scope:supporter = { + if = { + limit = { + has_variable = mass_mobilitization_development_progress_value + } + custom_tooltip = mass_mob_dev_progress_tt + hidden_effect = { + every_held_title = { + limit = { + tier = tier_county + } + change_development_progress_with_overflow = scope:supporter.var:mass_mobilitization_development_progress_value + } + } + } + #Nomads lose fertility + else_if = { + limit = { + has_variable = mass_mobilitization_fertility_value + } + custom_tooltip = mass_mob_fertility_tt + hidden_effect = { + every_held_title = { + limit = { + tier = tier_county + county_fertility > 0 + } + change_county_fertility = scope:supporter.var:mass_mobilitization_fertility_value + } + } + } + #Tribal era just does development progress + else = { + + custom_tooltip = mass_mob_dev_tt + hidden_effect = { + every_held_title = { + limit = { + tier = tier_county + development_level >= 1 + } + change_development_level = { + add = scope:supporter.var:mass_mobilitization_development_value + min = { + value = development_level + multiply = -1 + } + } + } + } + } + } + + if = { + limit = { + scope:supporter.capital_county = { + title_province = { + has_holding_type = nomad_holding + } + } + } + scope:supporter = { + spawn_army = { + levies = 0 + men_at_arms = { + type = horse_archers + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + men_at_arms = { + type = nomadic_riders + stacks = { + value = var:mass_mobilitization_total + multiply = -4 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county = { + culture = { + has_innovation = innovation_advanced_bowmaking + NOR = { + culture_specializes_in_light_cavalry_maa = yes + culture_specializes_in_heavy_infantry_maa = yes + culture_specializes_in_pikemen_maa = yes + } + } + } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = crossbowmen + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county = { + culture = { culture_specializes_in_heavy_infantry_maa = yes } + culture = { has_innovation = innovation_quilted_armor } + } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = armored_footmen + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county.culture = { culture_specializes_in_light_cavalry_maa = yes } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = light_horsemen + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county = { + culture ={ culture_specializes_in_archer_cavalry_maa = yes } + } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = horse_archers + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county.culture = { culture_specializes_in_pikemen_maa = yes } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = pikemen_unit + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county.culture = { culture_specializes_in_archer_maa = yes } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = bowmen + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else = { + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = light_footmen + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } +} +scripted_effect coronation_events_6020_save_claim_effect = { + if = { + limit = { + NOT = { + any_claim = { + OR = { + holder ?= $FOE$ + holder ?= { + any_liege_or_above = { + this = $FOE$ + } + } + } + tier >= tier_county + } + } + } + #SAVE ONE OF FOE'S KINGDOMS + $FOE$ = { + ordered_held_title = { + order_by = { + value = 0 + every_de_jure_county = { + limit = { + OR = { + holder = $FOE$ + holder = { + any_liege_or_above = { + this = $FOE$ + } + } + } + } + add = 1 + } + } + limit = { + tier = tier_kingdom + any_de_jure_county = { + OR = { + holder = $FOE$ + holder = { + any_liege_or_above = { + this = $FOE$ + } + } + } + any_neighboring_county = { + OR = { + holder = scope:supporter + holder = { + any_liege_or_above = { + this = scope:supporter + } + } + } + } + } + } + alternative_limit = { + tier = tier_duchy + any_de_jure_county = { + OR = { + holder = $FOE$ + holder = { + any_liege_or_above = { + this = $FOE$ + } + } + } + any_neighboring_county = { + OR = { + holder = scope:supporter + holder = { + any_liege_or_above = { + this = scope:supporter + } + } + } + } + } + } + alternative_limit = { + tier = tier_county + any_neighboring_county = { + OR = { + holder = scope:supporter + holder = { + any_liege_or_above = { + this = scope:supporter + } + } + } + } + } + if = { + limit = { + $FOE$ = scope:foe + } + save_scope_as = title_claim_1 + } + else = { + save_scope_as = title_claim_2 + } + } + } + } +} +scripted_effect coronation_events_6020_declare_war_effect = { + if = { + limit = { + root = { + OR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + } + } + if = { + limit = { + government_allows = administrative + NOT = { + has_variable = admin_permission_to_declare_war + } + } + custom_tooltip = { + text = admin_gain_war_permission_desc + set_variable = admin_permission_to_declare_war + } + } + else_if = { + limit = { + government_has_flag = government_is_feudal + vassal_contract_obligation_level:war_declaration_rights < 1 + } + vassal_contract_set_obligation_level = { + type = war_declaration_rights + level = 1 + } + } + } + #Give the supporter a claim to a neighboring duchy, if possible + #Give the supporter a claim to a neighboring county + + #Already has existing claim... just declare war + if = { + limit = { + NOT = { + any_claim = { + OR = { + holder ?= $FOE$ + holder ?= { + any_liege_or_above = { + this = $FOE$ + } + } + } + tier >= tier_county + } + } + } + if = { + limit = { + $FOE$ = scope:foe + } + add_unpressed_claim = scope:title_claim_1 + } + else = { + add_unpressed_claim = scope:title_claim_2 + } + $FOE$ = { + add_opinion = { + modifier = outraged_opinion + target = root + opinion = -30 + } + } + scope:supporter = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 30 + } + } + } + #Declare war + ordered_claim = { + order_by = tier + limit = { + holder = { + OR = { + this ?= $FOE$ + any_liege_or_above = { + this = $FOE$ + } + } + } + + tier >= tier_county + } + save_scope_as = claim + } + hidden_effect = { + scope:supporter = { + start_war = { + cb = claim_cb + target = $FOE$ + target_title = scope:claim + claimant = scope:supporter + } + } + } + $FOE$ = { + save_scope_as = supporter_war_target + } + scope:activity = { + add_activity_log_entry = { + key = coronation_supporter_declares_war_log + character = scope:supporter + target = scope:supporter_war_target + score = 50 + show_in_conclusion = yes + } + } + +} + +#A supporter wants to be unleashed against your foes +coronation_events.6020 = { + type = activity_event + title = coronation_events.6020.t + desc = coronation_events.6020.desc + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + } + animation = acknowledging + } + animation = chancellor + } + center_portrait = { + character = scope:supporter + animation = inspect_weapon + } + lower_center_portrait = scope:foe + lower_right_portrait = scope:foe_2 + theme = coronation_activity + cooldown = { weeks = 2 } + + trigger = { + scope:activity = { + any_guest_subset = { + name = supporter + coronation_events_6020_supporter_trigger = yes + + OR = { + root = { + #Realm law does not restrict war + NOR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + } + #Admin war restriction and admin workarounds available + AND = { + root = { + OR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + } + } + OR = { + has_variable = admin_permission_to_declare_war + government_allows = administrative + } + } + #Feudal war restriction and feudal workarounds available + AND = { + root = { + OR = { + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + } + OR = { + vassal_contract_obligation_level:war_declaration_rights < 1 + government_has_flag = government_is_feudal + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + scope:activity = { + any_guest_subset = { + name = supporter + coronation_events_6020_supporter_trigger = yes + + OR = { + root = { + #Realm law does not restrict war + NOR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + } + #Admin war restriction and admin workarounds available + AND = { + root = { + OR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + } + } + OR = { + has_variable = admin_permission_to_declare_war + government_allows = administrative + } + } + #Feudal war restriction and feudal workarounds available + AND = { + root = { + OR = { + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + } + OR = { + vassal_contract_obligation_level:war_declaration_rights < 1 + government_has_flag = government_is_feudal + } + } + } + save_temporary_scope_as = weight_supporter + } + OR = { + any_guest_subset = { + name = detractor + coronation_events_6020_foe_trigger = { CHARACTER = scope:weight_supporter } + } + root = { + any_relation = { + type = rival + coronation_events_6020_foe_trigger = { CHARACTER = scope:weight_supporter } + } + } + } + + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + #Save host and location + scope:activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + #Save fighty supporter + scope:activity = { + ordered_guest_subset = { + order_by = current_military_strength + + name = supporter + limit = { + coronation_events_6020_supporter_trigger = yes + } + save_scope_as = supporter + } + #Save detractor as foe + ordered_guest_subset = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + name = detractor + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + } + save_scope_as = foe + } + } + #Any neighboring ruler as foe + scope:supporter = { + ordered_neighboring_top_liege_realm_owner = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + } + save_scope_as = foe + } + } + #A vassal that's in the outs + ordered_vassal = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + } + save_scope_as = foe + } + #SECOND FOE + scope:activity = { + ordered_guest_subset = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + name = detractor + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + NOT = { this = scope:foe } + } + save_scope_as = foe_2 + } + } + #Any neighboring ruler as foe + scope:supporter = { + ordered_neighboring_top_liege_realm_owner = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + NOT = { this = scope:foe } + } + save_scope_as = foe_2 + } + } + #A vassal that's in the outs + ordered_vassal = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + NOT = { this = scope:foe } + } + save_scope_as = foe_2 + } + if = { + limit = { + scope:supporter = { + OR = { + government_has_flag = government_is_tribal + } + culture = { + NOT = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + } + } + scope:supporter = { + set_variable = { + name = mass_mobilitization_development_progress_value + value = -50 + } + set_variable = { + name = mass_mobilitization_total + value = { + if = { + limit = { + scope:supporter = { + government_has_flag = government_is_tribal + } + } + add = -1 + } + else = { + #Half of early medievals + add = -0.5 + } + multiply = domain_size + } + } + } + } + else_if = { + limit = { + scope:supporter = { + government_has_flag = government_is_nomadic + } + } + scope:supporter = { + set_variable = { + name = mass_mobilitization_fertility_value + value = -100 + } + set_variable = { + name = mass_mobilitization_total + value = { + if = { + limit = { + current_year >= 1100 + } + add = -1.5 + } + else = { + add = -1 + } + multiply = domain_size + } + } + } + } + else = { + scope:supporter = { + set_variable = { + name = mass_mobilitization_development_value + value = { + if = { + limit = { + scope:supporter.culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + add = -1 + } + if = { + limit = { + scope:supporter.culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + add = -1 + } + add = -1 + } + } + set_variable = { + name = mass_mobilitization_total + value = { + add = var:mass_mobilitization_development_value + multiply = domain_size + } + } + } + } + scope:supporter = { + coronation_events_6020_save_claim_effect = { FOE = scope:foe } + if = { + limit = { + exists = scope:foe_2 + } + coronation_events_6020_save_claim_effect = { FOE = scope:foe_2 } + } + } + scope:supporter = { + set_variable = { + name = coronation_war_foe + value = scope:foe + months = 6 + } + if = { + limit = { + exists = scope:foe_2 + } + set_variable = { + name = coronation_war_foe_2 + value = scope:foe_2 + months = 6 + } + } + } + if = { + limit = { + NOT = { + exists = scope:title_claim_1 + } + } + scope:supporter = { + ordered_claim = { + order_by = tier + limit = { + holder = scope:foe + } + save_scope_as = title_claim_1 + } + } + } + if = { + limit = { + exists = scope:foe_2 + NOT = { + exists = scope:title_claim_2 + } + } + scope:supporter = { + ordered_claim = { + order_by = tier + limit = { + holder = scope:foe_2 + } + save_scope_as = title_claim_2 + } + } + } + } + #Special Intent option (TARGET 1) + option = { + name = coronation_events.6020.a + trigger = { + has_activity_intent = coronation_weaken_detractors + } + #Increase armies and tank development effect + coronation_events_6020_mass_mobilization_effect = yes + scope:supporter = { + coronation_events_6020_declare_war_effect = { FOE = scope:foe } + if = { + limit = { + exists = scope:title_claim_1 + } + custom_tooltip = coronation_supporter_declare_war_tt + } + else = { + custom_tooltip = coronation_supporter_declare_war_no_title_tt + } + if = { + limit = { + involved_activity ?= scope:activity + } + remove_from_activity = scope:activity + } + } + if = { + limit = { + scope:foe = { involved_activity ?= scope:activity } + } + scope:foe = { remove_from_activity = scope:activity } + } + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + calm = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + modifier = { + add = 50 + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + modifier = { + add = -100 + OR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + scope:supporter = { + NOR = { + has_variable = admin_permission_to_declare_war + vassal_contract_obligation_level:war_declaration_rights < 1 + } + } + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:foe + multiplier = -2 + desc = AI_OPINION_REASON + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:supporter + multiplier = 1 + desc = AI_OPINION_REASON + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + has_trait = calm + has_trait = content + } + } + } + } + #Special Intent option (TARGET 2) + option = { + name = coronation_events.6020.b + trigger = { + has_activity_intent = coronation_weaken_detractors + exists = scope:foe_2 + } + coronation_events_6020_mass_mobilization_effect = yes + scope:supporter = { + coronation_events_6020_declare_war_effect = { FOE = scope:foe_2 } + + if = { + limit = { + exists = scope:title_claim_2 + } + custom_tooltip = coronation_supporter_declare_war_2_tt + } + else = { + custom_tooltip = coronation_supporter_declare_war_no_title_2_tt + } + if = { + limit = { + involved_activity ?= scope:activity + } + remove_from_activity = scope:activity + } + } + if = { + limit = { + scope:foe_2 = { involved_activity ?= scope:activity } + } + scope:foe_2 = { remove_from_activity = scope:activity } + } + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + calm = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + modifier = { + add = 50 + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + modifier = { + add = -100 + OR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + scope:supporter = { + NOR = { + has_variable = admin_permission_to_declare_war + vassal_contract_obligation_level:war_declaration_rights < 1 + } + } + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:foe_2 + multiplier = -2 + desc = AI_OPINION_REASON + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:supporter + multiplier = 1 + desc = AI_OPINION_REASON + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + has_trait = calm + has_trait = content + } + } + } + } + #Normal declare (TARGET 1) + option = { + name = coronation_events.6020.c + scope:supporter = { + coronation_events_6020_declare_war_effect = { FOE = scope:foe } + + if = { + limit = { + exists = scope:title_claim_1 + } + custom_tooltip = coronation_supporter_declare_war_tt + } + else = { + custom_tooltip = coronation_supporter_declare_war_no_title_tt + } + if = { + limit = { + involved_activity ?= scope:activity + } + remove_from_activity = scope:activity + } + } + if = { + limit = { + scope:foe = { involved_activity ?= scope:activity } + } + scope:foe = { remove_from_activity = scope:activity } + } + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:foe + multiplier = -2 + desc = AI_OPINION_REASON + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + } + } + #Normal declare (TARGET 2) + option = { + trigger = { exists = scope:foe_2 } + name = coronation_events.6020.d + scope:supporter = { + coronation_events_6020_declare_war_effect = { FOE = scope:foe_2 } + + if = { + limit = { + exists = scope:title_claim_2 + } + custom_tooltip = coronation_supporter_declare_war_2_tt + } + else = { + custom_tooltip = coronation_supporter_declare_war_no_title_2_tt + } + if = { + limit = { + involved_activity ?= scope:activity + } + remove_from_activity = scope:activity + } + } + if = { + limit = { + scope:foe_2 = { involved_activity ?= scope:activity } + } + scope:foe_2 = { remove_from_activity = scope:activity } + } + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:foe_2 + multiplier = -2 + desc = AI_OPINION_REASON + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + } + } + #Redirect your passion to this great occasion + option = { + name = coronation_events.6020.e + #Option improved by an intent (and player is informed of this) + if = { + limit = { + has_activity_intent = coronation_impress_attendees + } + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + } + else = { + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + } + + + stress_impact = { + vengeful = minor_stress_impact_gain + sadistic = miniscule_stress_impact_gain + wrathful = minor_stress_impact_gain + paranoid = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -2 + } + modifier = { + add = -50 + OR = { + has_trait = sadistic + has_trait = paranoid + } + } + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + scope:supporter = { + remove_variable = mass_mobilitization_development_value + remove_variable = mass_mobilitization_development_progress_value + remove_variable = mass_mobilitization_fertility_value + remove_variable = mass_mobilitization_total + } + } +} + +scripted_effect coronation_events_6030_choose_courtesan_effect = { + had_sex_with_effect = { + CHARACTER = $COURTESAN$ + PREGNANCY_CHANCE = pregnancy_chance + } + + #Add to court + add_courtier = $COURTESAN$ + #Add progress to lover relation + set_relation_lover = { + reason = lover_coronation_courtesan + target = $COURTESAN$ + } + if = { + limit = { + NOT = { + has_trait = rakish + } + } + random = { + chance = 5 + add_trait = rakish + } + } + if = { + limit = { + scope:host = { + is_ai = yes + } + OR = { + intrigue > scope:host.intrigue + intrigue >= high_skill_rating + } + custom_tooltip = host_has_courtesan_hooks_tt + } + } + $COURTESAN$ = { + add_character_flag = { + flag = picked_courtesan + days = 30 + } + } +} + +#horny king is hosting a courtesan sex party +coronation_events.6030 = { + type = activity_event + title = { + first_valid = { + triggered_desc = { + trigger = { + involved_activity = { has_activity_type = activity_coronation } + } + desc = coronation_events.6030.t + } + desc = coronation_events.6030.t_feast + } + } + desc = coronation_events.6030.desc + left_portrait = { + character = scope:fearsome_courtesan + animation = flirtation + camera = camera_event_center_pointing_slighty_left + } + center_portrait = { + character = scope:cunning_courtesan + animation = admiration + camera = camera_event_left_forward + } + right_portrait = { + character = scope:host + animation = eccentric + } + lower_left_portrait = scope:experienced_courtesan + lower_center_portrait = scope:funny_courtesan_1 + lower_right_portrait = scope:funny_courtesan_2 + theme = coronation_activity + override_background = { + reference = bedchamber + } + cooldown = { months = 6 } + + trigger = { + is_adult = yes + is_playable_character = yes + NOT = { + this = involved_activity.activity_host + } + trigger_if = { + limit = { + is_ai = yes + } + might_cheat_on_every_partner_trigger = yes + } + NOR = { + has_trait = celibate + has_trait = chaste + is_incapable = yes + has_contagious_deadly_disease_trigger = yes + is_eunuch_trigger = yes + has_trait = leper + } + involved_activity = { + activity_host = { + OR = { + AND = { + #It's a trap! + is_ai = yes + OR = { + intrigue > decent_skill_rating + highest_skill = intrigue + } + opinion = { + target = root + value > -50 + } + } + #Actually likes you + opinion = { + target = root + value > 0 + } + } + + NOR = { + has_contagious_deadly_disease_trigger = yes + has_trait = leper + is_incapable = yes + has_trait = celibate + has_trait = chaste + } + is_adult = yes + OR = { + has_trait = deviant + might_cheat_on_every_partner_trigger = yes + has_trait = rakish + has_trait = seducer + has_trait = lustful + } + #Let's make this simple and only do same-gender pairs between root and host + OR = { + AND = { + is_male = yes + root = { is_male = yes } + } + AND = { + is_male = no + root = { is_male = no } + } + } + #Sexuality that matches root's + OR = { + AND = { + is_attracted_to_men = yes + root = { is_attracted_to_men = yes } + } + AND = { + is_attracted_to_women = yes + root = { is_attracted_to_women = yes } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -1 + involved_activity.activity_host = { + might_cheat_on_every_partner_trigger = no + } + } + modifier = { + add = -1 + involved_activity.activity_host = { + OR = { + AND = { + faith = { + has_doctrine = doctrine_adultery_men_shunned + } + is_male = yes + is_married = yes + } + AND = { + faith = { + has_doctrine = doctrine_adultery_women_shunned + } + is_female = yes + is_married = yes + } + } + } + } + modifier = { + add = -2 + involved_activity.activity_host = { + OR = { + AND = { + faith = { + has_doctrine = doctrine_adultery_men_crime + } + is_male = yes + is_married = yes + } + AND = { + faith = { + has_doctrine = doctrine_adultery_women_crime + } + is_female = yes + is_married = yes + } + } + } + } + modifier = { + add = 1 + involved_activity.activity_host = { + has_trait = lustful + } + } + modifier = { + add = 1 + involved_activity.activity_host = { + has_trait = deviant + } + } + modifier = { + add = 1 + involved_activity.activity_host = { + has_trait = seducer + } + } + modifier = { + add = 1 + root = { has_focus = intrigue_temptation_focus } + } + modifier = { + add = 1 + root = { has_trait = rakish } + } + modifier = { + add = 1 + root = { has_trait = lustful } + } + modifier = { + add = 1 + root = { has_trait = seducer } + } + modifier = { + add = 2 + involved_activity.activity_host = { + has_trait = rakish + } + } + modifier = { + add = 2 + involved_activity.activity_host = { + faith = { trait_is_virtue = lustful } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + #Save host and location + scope:activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + #Female courtesans + if = { + limit = { + AND = { + is_attracted_to_women = yes + scope:host = { is_attracted_to_women = yes } + } + } + create_character = { + location = root.location + template = experienced_courtesan_character + gender = female + faith = scope:host.faith + culture = scope:host.culture + save_scope_as = experienced_courtesan + } + create_character = { + location = root.location + template = funny_courtesan_character + gender = female + faith = scope:host.faith + culture = scope:host.culture + mother = scope:experienced_courtesan + save_scope_as = funny_courtesan_1 + } + scope:funny_courtesan_1 = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = funny_courtesan_character + gender = female + faith = scope:host.faith + culture = scope:host.culture + mother = scope:experienced_courtesan + save_scope_as = funny_courtesan_2 + } + scope:funny_courtesan_2 = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = cunning_courtesan_character + gender = female + faith = root.location.faith + culture = root.location.culture + save_scope_as = cunning_courtesan + } + scope:cunning_courtesan = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = fearsome_courtesan_character + gender = female + faith = root.location.faith + culture = root.location.culture + save_scope_as = fearsome_courtesan + } + scope:fearsome_courtesan = { + add_to_list = courtesans + } + scope:experienced_courtesan = { + add_to_list = courtesans + } + } + #Male courtesans + else = { + create_character = { + location = root.location + template = experienced_courtesan_character + gender = male + faith = scope:host.faith + culture = scope:host.culture + save_scope_as = experienced_courtesan + } + create_character = { + location = root.location + template = funny_courtesan_character + gender = male + father = scope:experienced_courtesan + faith = scope:host.faith + culture = scope:host.culture + save_scope_as = funny_courtesan_1 + } + scope:funny_courtesan_1 = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = funny_courtesan_character + gender = male + father = scope:experienced_courtesan + faith = scope:host.faith + culture = scope:host.culture + save_scope_as = funny_courtesan_2 + } + scope:funny_courtesan_2 = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = cunning_courtesan_character + gender = male + faith = scope:host.faith + culture = scope:host.culture + save_scope_as = cunning_courtesan + } + scope:cunning_courtesan = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = fearsome_courtesan_character + gender = male + faith = root.location.faith + culture = root.location.culture + save_scope_as = fearsome_courtesan + } + scope:fearsome_courtesan = { + add_to_list = courtesans + } + scope:experienced_courtesan = { + add_to_list = courtesans + } + } + hidden_effect = { + #Set sexuality + every_in_list = { + list = courtesans + random_list = { + 10 = { + set_sexuality = bisexual + } + 5 = { + trigger = { + OR = { + AND = { + is_female = yes + root = { is_female = yes } + } + AND = { + is_male = yes + root = { is_male = yes } + } + } + } + set_sexuality = homosexual + } + 10 = { + trigger = { + OR = { + AND = { + is_female = no + root = { is_female = yes } + } + AND = { + is_male = no + root = { is_male = yes } + } + } + } + set_sexuality = heterosexual + } + } + add_character_flag = { + flag = is_naked + days = 30 + } + } + #Assign nicknames + scope:experienced_courtesan = { + assign_random_nickname_effect = yes + } + scope:fearsome_courtesan = { + assign_random_nickname_effect = yes + } + scope:cunning_courtesan = { + assign_random_nickname_effect = yes + } + if = { + limit = { + scope:host = { + is_ai = yes + } + } + every_in_list = { + list = courtesans + scope:host = { + add_hook = { + type = supporter_hook + target = prev + } + } + } + } + } + } + #The fearsome arm-wrestling warrior woman/man + option = { + name = coronation_events.6030.a + flavor = { + first_valid = { + triggered_desc = { + trigger = { + scope:cunning_courtesan = { + is_male = yes + } + } + desc = coronation_events.6030.a_flavor + } + desc = coronation_events.6030.a_thighs + } + } + + add_prowess_skill = 1 + coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:fearsome_courtesan } + + stress_impact = { + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 200 + OR = { + OR = { + has_education_martial_trigger = yes + has_martial_lifestyle_trait_trigger = yes + } + } + } + modifier = { + factor = 0 + has_trait = just + } + } + } + #The clever little minx + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:cunning_courtesan = { + is_male = yes + } + } + desc = coronation_events.6030.b + } + desc = coronation_events.6030.b_minx + } + } + } + flavor = coronation_events.6030.b_flavor + + add_intrigue_lifestyle_xp = medium_lifestyle_xp + coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:cunning_courtesan } + + stress_impact = { + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 200 + OR = { + OR = { + has_education_intrigue_trigger = yes + has_intrigue_lifestyle_trait_trigger = yes + } + } + } + modifier = { + factor = 0 + has_trait = just + } + } + } + #The astute, experienced madame + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:cunning_courtesan = { + is_male = yes + } + } + desc = coronation_events.6030.c + } + desc = coronation_events.6030.c_dame + } + } + } + flavor = coronation_events.6030.c_flavor + + add_stewardship_lifestyle_xp = medium_lifestyle_xp + coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:experienced_courtesan } + + stress_impact = { + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 200 + OR = { + OR = { + has_education_stewardship_trigger = yes + has_stewardship_lifestyle_trait_trigger = yes + } + } + } + modifier = { + factor = 0 + has_trait = just + } + } + } + #The sisters/brothers + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:cunning_courtesan = { + is_male = yes + } + } + desc = coronation_events.6030.d + } + desc = coronation_events.6030.d_sisters + } + } + } + flavor = coronation_events.6030.d_flavor + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + + coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:funny_courtesan_1 } + #Courtesan 2 + had_sex_with_effect = { + CHARACTER = scope:funny_courtesan_2 + PREGNANCY_CHANCE = pregnancy_chance + } + #Add to court + add_courtier = scope:funny_courtesan_2 + #Add progress to lover relation + set_relation_lover = { + reason = lover_coronation_courtesan + target = scope:funny_courtesan_2 + } + scope:funny_courtesan_2 = { + add_character_flag = { + flag = picked_courtesan + days = 30 + } + } + + create_character_memory = { + type = had_a_threesome_memory + participants = { + partner_1 = scope:funny_courtesan_1 + partner_2 = scope:funny_courtesan_2 + } + } + + stress_impact = { + just = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 200 + OR = { + OR = { + has_education_diplomacy_trigger = yes + has_diplomacy_lifestyle_trait_trigger = yes + } + } + } + modifier = { + factor = 0 + has_trait = just + } + } + } + #Uh... nah maybe we can just have an intellectual conversation + # SLASH FUCK YOU HOST + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + has_activity_intent = coronation_disrupt_loyalists + scope:host = { + is_ai = yes + OR = { + NOT = { + faith = { trait_is_virtue = lustful } + } + AND = { + is_male = yes + scope:funny_courtesan_1 = { + is_male = yes + } + faith = { + has_doctrine = doctrine_homosexuality_crime + } + } + } + } + } + desc = coronation_events.6030.e_expose + } + desc = coronation_events.6030.e + } + } + } + #Needed for exposing option and opinion gain at end + save_scope_as = exposer + #I'm telling! + if = { + limit = { + involved_activity = { has_activity_type = activity_coronation } + has_activity_intent = coronation_disrupt_loyalists + scope:host = { + is_ai = yes + OR = { + NOT = { + faith = { trait_is_virtue = lustful } + } + AND = { + is_male = yes + scope:funny_courtesan_1 = { + is_male = yes + } + faith = { + has_doctrine = doctrine_homosexuality_crime + } + } + } + } + } + if = { + limit = { + faith = { trait_is_sin = lustful } + } + add_piety = major_piety_gain + } + else_if = { + limit = { + NOT = { + faith = { trait_is_virtue = lustful } + } + } + add_piety = minor_piety_gain + } + scope:host = { + #Piety loss based on how bad horny is + if = { + limit = { + faith = { trait_is_sin = lustful } + } + add_piety = major_piety_loss + } + else_if = { + limit = { + NOT = { + faith = { trait_is_virtue = lustful } + } + } + add_piety = medium_piety_loss + } + #Is this you exposing them cheating? + if = { + limit = { + is_married = yes + OR = { + AND = { + is_male = yes + NOT = { + faith = { + has_doctrine = doctrine_adultery_men_accepted + } + } + } + AND = { + is_female = yes + NOT = { + faith = { + has_doctrine = doctrine_adultery_women_accepted + } + } + } + } + } + save_scope_as = log_sent + scope:activity = { + add_activity_log_entry = { + key = coronation_host_orgy_exposed_log + character = scope:host + target = scope:exposer + score = 20 + show_in_conclusion = yes + scope:host = { + add_trait = adulterer + } + } + } + every_spouse = { + custom = custom.every_consort + add_opinion = { + target = scope:host + modifier = cheater_opinion + opinion = -40 + } + } + add_opinion = { + target = root + opinion = -60 + modifier = betrayal_opinion + } + } + else = { + add_opinion = { + target = root + opinion = -40 + modifier = betrayal_opinion + } + } + #Is this you exposing them being a sodomite? + if = { + limit = { + is_male = yes + scope:funny_courtesan_1 = { + is_male = yes + } + faith = { + has_doctrine = doctrine_homosexuality_crime + } + } + #Send log if haven't already + if = { + limit = { + NOT = { exists = scope:log_sent } + } + save_scope_as = log_sent + scope:activity = { + add_activity_log_entry = { + key = coronation_host_orgy_exposed_log + character = scope:host + target = scope:exposer + score = 20 + show_in_conclusion = yes + scope:host = { + add_trait = sodomite + } + } + } + } + else = { + add_trait = sodomite + } + } + } + custom_tooltip = improved_because_intent_tt + #Send log if haven't already + if = { + limit = { + NOT = { exists = scope:log_sent } + } + scope:activity = { + add_activity_log_entry = { + key = coronation_host_orgy_exposed_log + character = scope:host + target = scope:exposer + score = 20 + show_in_conclusion = yes + } + } + } + } + else = { + scope:host = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + add_learning_lifestyle_xp = minor_lifestyle_xp + } + stress_impact = { + lustful = major_stress_impact_gain + rakish = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_activity_intent = coronation_disrupt_loyalists + add = 100 + } + modifier = { + OR = { + has_trait = lustful + has_trait = rakish + might_cheat_on_every_partner_trigger = yes + } + factor = 0 + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + hidden_effect = { + every_in_list = { + list = courtesans + remove_character_flag = is_naked + } + if = { + limit = { + scope:host = { + is_ai = yes + } + } + #Random unpicked courtesan might be picked by host + random_in_list = { + list = courtesans + limit = { + is_courtier = no + } + random = { + chance = 50 + had_sex_with_effect = { + CHARACTER = scope:host + PREGNANCY_CHANCE = pregnancy_chance + } + add_character_flag = { + flag = picked_courtesan + days = 30 + } + #Add to court + scope:host = { + add_courtier = prev + } + } + } + } + every_in_list = { + list = courtesans + limit = { + NOT = { has_character_flag = picked_courtesan } + } + silent_disappearance_effect = yes + } + every_in_list = { + list = courtesans + silent_disappearance_ai_effect = yes + } + #gain opinion of AI host if they accepted + if = { + limit = { + NOT = { + exists = scope:exposer + } + scope:host = { + is_ai = yes + intrigue > root.intrigue + } + } + add_opinion = { + target = scope:host + modifier = grateful_opinion + opinion = 20 + } + } + } + } +} + +# CEREMONY-PHASE CROWNING EVENTS # + +#HOST EVENTS +#Being crowned by someone else +coronation_events.6100 = { + type = activity_event + title = coronation_events.6100.t + desc = { + desc = coronation_events.6100.desc_intro + #Host perspective + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = { + #Middle is faith dependent + first_valid = { + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + is_male = yes + } + } + desc = coronation_events.6100.desc_byzantine + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + } + } + desc = coronation_events.6100.desc_byzantine_femme + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + desc = coronation_events.6100.desc_high + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6100.desc_low + } + triggered_desc = { + trigger = { + scope:host.faith.religion = { + this = religion:christianity_religion + } + } + desc = coronation_events.6100.desc_christian + } + desc = coronation_events.6100.desc_generic + } + #Ending depends on faith and independence + first_valid = { + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + ai_zeal <= low_negative_ai_value + } + } + desc = coronation_events.6100.desc_ending_byzantine_cynical + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + } + } + desc = coronation_events.6100.desc_ending_byzantine + } + triggered_desc = { + trigger = { + scope:host = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + is_independent_ruler = no + } + } + desc = coronation_events.6100.desc_ending_non_abrahamic_vassal + } + triggered_desc = { + trigger = { + scope:host = { is_independent_ruler = no } + } + desc = coronation_events.6100.desc_ending_vassal + } + triggered_desc = { + trigger = { + scope:host = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + } + desc = coronation_events.6100.desc_ending_non_abrahamic + } + desc = coronation_events.6100.desc_ending + } + } + } + #Guest perspective + desc = { + #Middle is faith dependent + first_valid = { + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + is_male = yes + } + } + desc = coronation_events.6100.desc_byzantine_guest + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + } + } + desc = coronation_events.6100.desc_byzantine_femme_guest + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + desc = coronation_events.6100.desc_high_guest + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6100.desc_low_guest + } + triggered_desc = { + trigger = { + scope:host.faith.religion = { + this = religion:christianity_religion + } + } + desc = coronation_events.6100.desc_christian_guest + } + desc = coronation_events.6100.desc_generic_guest + } + #Ending depends on faith and independence + first_valid = { + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + } + } + desc = coronation_events.6100.desc_ending_byzantine_guest + } + triggered_desc = { + trigger = { + scope:host = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + is_independent_ruler = no + } + } + desc = coronation_events.6100.desc_ending_non_abrahamic_vassal_guest + } + triggered_desc = { + trigger = { + scope:host = { is_independent_ruler = no } + } + desc = coronation_events.6100.desc_ending_vassal_guest + } + triggered_desc = { + trigger = { + scope:host = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + } + desc = coronation_events.6100.desc_ending_non_abrahamic_guest + } + desc = coronation_events.6100.desc_ending_guest + } + } + } + } + left_portrait = { + character = scope:observer + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value < -50 + } + } + } + animation = disapproval + } + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value <= 30 + } + ai_honor <= medium_negative_ai_value + OR = { + this = scope:host.primary_heir + this = scope:host.diarch + } + } + } + animation = scheme + } + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value < 0 + } + } + } + animation = personality_vengeful + } + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value >= 90 + } + this = scope:host.primary_spouse + } + } + animation = wedding_happy_cry + } + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value >= 0 + } + ai_zeal >= low_positive_ai_value + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + OR = { + this = scope:host.primary_heir + this = scope:host.primary_spouse + } + } + } + animation = prayer + } + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value >= 60 + } + } + } + animation = personality_compassionate + } + animation = chaplain + camera = camera_event_left_crowning_observation + } + center_portrait = { + character = scope:host + animation = throne_room_kneel_1 + camera = camera_event_center_coronation_kneeling + } + right_portrait = { + character = scope:crowner + animation = crowning + camera = camera_event_right_crowner_crowning + } + override_background = { + trigger = { + scope:host.capital_county = title:c_byzantion + } + reference = ep3_hagia_sophia + } + override_background = { + trigger = { + NOT = { + scope:host.capital_county = title:c_byzantion + } + } + reference = temple + } + artifact = { + target = scope:crowning_artifact + position = lower_right_portrait + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + reference = legend_glow + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + + trigger = { + coronation_being_crowned_trigger = yes + } + on_trigger_fail = { + if = { + limit = { + coronation_self_crowning_trigger = yes + } + # Trigger the "there is no officiator" version + trigger_event = { + id = coronation_events.6101 + days = 1 + } + } + else = { + #Skip to enthroning + trigger_event = { + id = coronation_events.6102 + days = 1 + } + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + remove_character_flag = need_military_outfit + scope:activity.activity_host = { + save_scope_as = host + } + scope:host = { + #Pick appropriate music + #Eastern Orthodox chanting + if = { + limit = { + OR = { + faith = faith:orthodox + culture = { has_cultural_pillar = heritage_byzantine } + culture = { has_cultural_pillar = language_greek } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mep3_mood_06 + } + #Iberian + else_if = { + limit = { + OR = { + culture = { has_building_gfx = iberian_building_gfx } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = "mx_Struggle_ending_compromise" + } + #Norse + else_if = { + limit = { + culture = { has_graphical_norse_culture_group_trigger = yes } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mx_mood_fp1_thefeast + } + #Steppe + else_if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + has_trait = nomadic_philosophy + } + culture = { has_graphical_steppe_culture_group_trigger = yes } + } + play_music_cue = mx_cue_the_khans_glory + } + #MENA + else_if = { + limit = { + OR = { + culture = { has_graphical_mena_culture_group_trigger = yes } + culture = { has_graphical_iranian_culture_group_trigger = yes } + } + } + play_music_cue = struggleend_cue + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + play_music_cue = "mx_cue_succession" + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression >= 75 + } + play_music_cue = "mx_cue_positive_effect" + } + else = { + play_music_cue = "mx_cue_sacredrite" + } + if = { + limit = { + coronation_living_officiator_trigger = yes + } + involved_activity.var:officiator ?= { + save_scope_as = crowner + } + } + + #Get wife to be next to you + if = { + limit = { + exists = primary_spouse + scope:activity = { + any_attending_character = { + this = scope:host.primary_spouse + } + } + } + primary_spouse = { + save_scope_as = observer + } + } + #Get heir to be next to you + if = { + limit = { + NOT = { + exists = scope:observer + } + primary_heir = { + age >= 5 + } + scope:activity = { + any_attending_character = { + this = scope:host.primary_heir + } + } + } + primary_heir = { + save_scope_as = observer + } + } + #Get your crown/regalia to equip it + coronation_save_crowning_artifact_effect = { HOST = scope:host } + if = { + limit = { + this = root + } + coronation_ceremony_opinion_effect = yes + } + else = { + show_as_tooltip = { + coronation_ceremony_opinion_effect = yes + } + } + } + } + #Normal + option = { + name = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + text = coronation_events.6100.a_guest_low + } + name = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + NOT = { + this = scope:host + } + } + text = coronation_events.6100.a_guest + } + name = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + this = scope:host + } + text = coronation_events.6100.a + } + flavor = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + scope:host = { + has_trait = giant + } + } + desc = coronation_events.6100.a_flavor_giant + } + triggered_desc = { + trigger = { + this = scope:host + scope:host = { + age <= 14 + } + } + desc = coronation_events.6100.a_flavor_adolescent + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + NOT = { + this = scope:host + } + } + desc = coronation_events.6100.a_flavor_low_guest + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6100.a_flavor_low + } + desc = coronation_events.6100.a_flavor_decent + } + } + if = { + limit = { + this = scope:host + #Is only player at this coronation + NOT = { + scope:activity = { + any_attending_character = { + NOT = { + this = scope:host + } + is_ai = no + } + } + } + } + scope:host = { + if = { + limit = { + exists = scope:crowning_artifact + can_equip_artifact = scope:crowning_artifact + scope:crowning_artifact = { is_equipped = no } + } + scope:crowning_artifact = { equip_artifact_to_owner = yes } + } + coronation_change_law_effect = yes + } + } + else = { + show_as_tooltip = { + scope:host = { + if = { + limit = { + exists = scope:crowning_artifact + can_equip_artifact = scope:crowning_artifact + scope:crowning_artifact = { is_equipped = no } + } + scope:crowning_artifact = { equip_artifact_to_owner = yes } + } + coronation_change_law_effect = yes + } + } + } + if = { + limit = { + this = scope:host + scope:activity.var:activity_special_type_progression >= 25 + } + stress_impact = { + arrogant = massive_stress_impact_loss + ambitious = medium_stress_impact_loss + just = medium_stress_impact_loss + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + # Spouse crowning + trigger_event = { + id = coronation_events.6140 + days = 2 + } + #Need to equip crown after guests get this event + if = { + limit = { + scope:activity = { + any_attending_character = { + NOT = { + this = scope:host + } + is_ai = no + } + } + } + trigger_event = { + id = coronation_events.6103 + days = 5 + } + } + } +} + +scripted_effect coronation_events_6101_self_crowning_effect = { + add_prestige = medium_prestige_gain + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + faith.religious_head ?= { + save_scope_as = judger + } + } + else = { + cp:councillor_court_chaplain ?= { + save_scope_as = judger + } + } + if = { + limit = { + scope:activity.var:activity_special_type_progression < 75 + } + scope:judger ?= { + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -15 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + limit = { + has_vassal_stance = zealot + NOT = { + this = scope:judger + } + } + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -10 + } + } + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 50 + } + scope:judger ?= { + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -30 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + limit = { + has_vassal_stance = zealot + NOT = { + this = scope:judger + } + } + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -20 + } + } + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + scope:judger ?= { + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -50 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + limit = { + has_vassal_stance = zealot + NOT = { + this = scope:judger + } + } + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -30 + } + } + } +} + +#Host is crowning themselves +coronation_events.6101 = { + type = activity_event + title = coronation_events.6100.t + desc = { + #Is it guest or host perspective? + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + } + } + desc = coronation_events.6101.desc_crowning_intro + } + desc = coronation_events.6101.desc_no_being_crowned_intro + } + #Priests' dissent is leveled by magnificence + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + culture = { + has_cultural_pillar = heritage_iberian + has_cultural_pillar = language_iberian + } + } + scope:activity.var:activity_special_type_progression >= 25 + } + desc = coronation_events.6101.desc_crowning_priests_iberian + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + desc = coronation_events.6101.desc_crowning_priests_high + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6101.desc_crowning_priests_low + } + desc = coronation_events.6101.desc_crowning_priests_mid + } + #Mid part is Christian or not + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + } + } + desc = coronation_events.6101.desc_words_christian + } + desc = coronation_events.6101.desc_words_generic + } + #End is based on personality + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + has_trait = humble + has_trait = patient + has_trait = just + has_trait = content + has_trait = shy + has_trait = craven + has_trait = compassionate + has_trait = peasant_leader + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + + } + desc = coronation_events.6101.desc_ending_humble + } + desc = coronation_events.6101.desc_ending + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + } + } + desc = coronation_events.6101.desc_crowning_intro + } + desc = coronation_events.6101.desc_no_being_crowned_intro + } + #Priests' dissent is leveled by magnificence + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + culture = { + has_cultural_pillar = heritage_iberian + has_cultural_pillar = language_iberian + } + } + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + culture = { + has_cultural_pillar = heritage_iberian + has_cultural_pillar = language_iberian + } + scope:activity.var:activity_special_type_progression >= 25 + } + desc = coronation_events.6101.desc_crowning_priests_iberian + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + desc = coronation_events.6101.desc_crowning_priests_high_guest + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6101.desc_crowning_priests_low_guest + } + desc = coronation_events.6101.desc_crowning_priests_mid_guest + } + #Mid part is Christian or not + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + } + } + desc = coronation_events.6101.desc_words_christian_guest + } + desc = coronation_events.6101.desc_words_generic_guest + } + #End is based on personality + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + has_trait = humble + has_trait = patient + has_trait = just + has_trait = content + has_trait = shy + has_trait = craven + has_trait = compassionate + has_trait = peasant_leader + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + } + desc = coronation_events.6101.desc_ending_humble_guest + } + desc = coronation_events.6101.desc_ending_guest + } + } + } + } + + left_portrait = { + character = scope:observer + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + OR = { + has_activity_intent = coronation_offer_support + opinion = { + target = scope:host + value > 0 + } + } + } + animation = admiration + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + OR = { + has_activity_intent = coronation_disrupt_loyalists + opinion = { + target = scope:host + value < 30 + } + } + } + animation = personality_callous + } + animation = personality_zealous + camera = camera_event_left_to_the_left + } + center_portrait = { + character = scope:host + triggered_animation = { + trigger = { + scope:host = { + OR = { + has_trait = humble + has_trait = content + has_trait = craven + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + } + animation = personality_coward + } + triggered_animation = { + trigger = { + NOT = { + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = arbitrary + has_trait = greedy + } + } + animation = personality_honorable + } + triggered_animation = { + trigger = { + NOT = { + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + } + animation = personality_honorable + } + animation = acknowledging + camera = camera_event_center_pointing_slighty_left + } + right_portrait = { + character = scope:anointer + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + OR = { + has_activity_intent = coronation_offer_support + opinion = { + target = scope:host + value > 0 + } + } + } + animation = prayer + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + OR = { + has_activity_intent = coronation_disrupt_loyalists + opinion = { + target = scope:host + value < 30 + } + } + } + animation = disapproval + } + animation = chaplain + camera = camera_event_right_to_the_right + } + override_background = { + reference = throne_room + } + artifact = { + target = scope:crowning_artifact + position = lower_right_portrait + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + reference = legend_glow + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + + trigger = { + coronation_self_crowning_trigger = yes + } + on_trigger_fail = { + trigger_event = { + id = coronation_events.6102 + days = 1 + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + remove_character_flag = need_military_outfit + involved_activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + scope:host = { + #Pick appropriate music + #Eastern Orthodox chanting + if = { + limit = { + OR = { + faith = faith:orthodox + culture = { has_cultural_pillar = heritage_byzantine } + culture = { has_cultural_pillar = language_greek } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mep3_mood_06 + } + #Iberian + else_if = { + limit = { + OR = { + culture = { has_building_gfx = iberian_building_gfx } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = "mx_Struggle_ending_compromise" + } + #Norse + else_if = { + limit = { + culture = { has_graphical_norse_culture_group_trigger = yes } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mx_mood_fp1_thefeast + } + #Steppe + else_if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + has_trait = nomadic_philosophy + } + culture = { has_graphical_steppe_culture_group_trigger = yes } + } + play_music_cue = mx_cue_the_khans_glory + } + #MENA + else_if = { + limit = { + OR = { + culture = { has_graphical_mena_culture_group_trigger = yes } + culture = { has_graphical_iranian_culture_group_trigger = yes } + } + } + play_music_cue = struggleend_cue + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + play_music_cue = "mx_cue_succession" + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression >= 75 + } + play_music_cue = "mx_cue_positive_effect" + } + else = { + play_music_cue = "mx_cue_sacredrite" + } + #Save an anointer if you don't have one + if = { + limit = { + OR = { + NOT = { exists = scope:anointer } + scope:anointer = { + is_alive = no + } + scope:anointer = { + is_imprisoned = yes + } + } + } + coronation_save_anointer_effect = yes + } + #Get councilor + if = { + limit = { + NOT = { + exists = scope:observer + } + } + #Get a councillor to be next to you + scope:activity = { + ordered_attending_character = { + order_by = "opinion(scope:host)" + limit = { + is_councillor_of = scope:host + trigger_if = { + limit = { + exists = scope:anointer + } + NOT = { + this = scope:anointer + } + } + } + save_scope_as = observer + } + } + } + #Get vassal + if = { + limit = { + NOT = { + exists = scope:observer + } + } + scope:activity = { + ordered_attending_character = { + order_by = "opinion(scope:host)" + limit = { + is_vassal_of = scope:host + trigger_if = { + limit = { + exists = scope:anointer + } + NOT = { + this = scope:anointer + } + } + } + save_scope_as = observer + } + } + } + #Get your crown/regalia to equip it + coronation_save_crowning_artifact_effect = { HOST = scope:host } + if = { + limit = { + this = root + } + coronation_ceremony_opinion_effect = yes + if = { + limit = { + exists = scope:crowning_artifact + can_equip_artifact = scope:crowning_artifact + scope:crowning_artifact = { is_equipped = no } + } + scope:crowning_artifact = { equip_artifact_to_owner = yes } + } + coronation_change_law_effect = yes + } + else = { + show_as_tooltip = { + coronation_ceremony_opinion_effect = yes + if = { + limit = { + exists = scope:crowning_artifact + can_equip_artifact = scope:crowning_artifact + scope:crowning_artifact = { is_equipped = no } + } + scope:crowning_artifact = { equip_artifact_to_owner = yes } + } + coronation_change_law_effect = yes + } + } + } + } + #Normal + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { this = scope:host } + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + AND = { + liege = scope:host + is_a_faction_member = yes + } + } + } + desc = coronation_events.6101.a_guest_neg + } + triggered_desc = { + trigger = { + NOT = { this = scope:host } + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = trusting + } + NOT = { + host = { + has_trait = craven + } + } + } + desc = coronation_events.6101.a_guest_pos + } + triggered_desc = { + trigger = { + NOT = { this = scope:host } + } + desc = coronation_events.6101.a_guest + } + triggered_desc = { + trigger = { + this = scope:host + scope:host = { + OR = { + has_trait = humble + has_trait = content + has_trait = craven + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + } + desc = coronation_events.6101.a_oh_noes + } + desc = coronation_events.6101.a + } + } + } + scope:host = { + #Prestige gain and possible cleric opinion loss from self crowning + if = { + limit = { + this = root + coronation_proper_artifact_crown_trigger = yes + NAND = { + exists = faith.religious_head + this = faith.religious_head + } + } + coronation_events_6101_self_crowning_effect = yes + } + else_if = { + limit = { + coronation_proper_artifact_crown_trigger = yes + NAND = { + exists = faith.religious_head + this = faith.religious_head + } + } + show_as_tooltip = { + coronation_events_6101_self_crowning_effect = yes + } + } + } + if = { + limit = { + this = scope:host + scope:activity.var:activity_special_type_progression >= 25 + } + stress_impact = { + arrogant = massive_stress_impact_loss + ambitious = medium_stress_impact_loss + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + #Ceremony is over + #Spouse crowning + trigger_event = { + id = coronation_events.6140 + days = 2 + } + if = { + limit = { + scope:anointer = { + has_variable = anointer_destroy_me + } + } + scope:anointer = { + silent_disappearance_effect = yes + } + } + } +} + +#Host is being enthroned +coronation_events.6102 = { + type = activity_event + title = coronation_events.6102.t + #Mention Christian regalia (orb and scepter), etc + desc = { + #Is it guest or host perspective? + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = { + #End of other event serves as beginning + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + has_trait = humble + has_trait = patient + has_trait = just + has_trait = content + has_trait = shy + has_trait = craven + has_trait = compassionate + has_trait = peasant_leader + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + + } + desc = coronation_events.6101.desc_ending_humble + } + desc = coronation_events.6101.desc_ending + } + desc = coronation_events.6102_middle + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + scope:activity.var:activity_special_type_progression >= 75 + scope:host = { + NOR = { + has_trait = humble + has_trait = cynical + has_trait = depressed + has_trait = calm + } + } + } + desc = { + desc = coronation_events.6102.desc_high_east_asian + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_high_east_asian_ending_japan + } + desc = coronation_events.6102.desc_high_east_asian_ending + } + } + } + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + scope:activity.var:activity_special_type_progression < 25 + } + desc = { + desc = coronation_events.6102.desc_low_east_asian + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_low_east_asian_ending_japan + } + desc = coronation_events.6102.desc_low_east_asian_ending + } + } + } + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + } + desc = { + desc = coronation_events.6102.desc_mid_east_asian + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_mid_east_asian_ending_japan + } + desc = coronation_events.6102.desc_mid_east_asian_ending + } + } + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + scope:host = { + NOR = { + has_trait = humble + has_trait = cynical + has_trait = depressed + has_trait = calm + } + } + } + desc = coronation_events.6102.desc_high + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6102.desc_low + } + desc = coronation_events.6102.desc_mid + } + } + } + #Guest perspective + desc = { + #End of other event serves as beginning + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + has_trait = humble + has_trait = patient + has_trait = just + has_trait = content + has_trait = shy + has_trait = craven + has_trait = compassionate + has_trait = peasant_leader + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + } + desc = coronation_events.6101.desc_ending_humble_guest + } + desc = coronation_events.6101.desc_ending_guest + } + desc = coronation_events.6102_middle_guest + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + scope:activity.var:activity_special_type_progression >= 75 + scope:host = { + NOR = { + has_trait = humble + has_trait = cynical + has_trait = depressed + has_trait = calm + } + } + } + desc = { + desc = coronation_events.6102.desc_high_east_asian_guest + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_high_east_asian_ending_japan_guest + } + desc = coronation_events.6102.desc_high_east_asian_ending_guest + } + } + } + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + scope:activity.var:activity_special_type_progression < 25 + } + desc = { + desc = coronation_events.6102.desc_low_east_asian_guest + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_low_east_asian_ending_japan_guest + } + desc = coronation_events.6102.desc_low_east_asian_ending_guest + } + } + } + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + } + desc = { + desc = coronation_events.6102.desc_mid_east_asian_guest + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_mid_east_asian_ending_japan_guest + } + desc = coronation_events.6102.desc_mid_east_asian_ending_guest + } + } + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + NOR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + AND = { + is_vassal_of = scope:host + is_a_faction_member = yes + } + has_trait = cynical + has_trait = calm + has_trait = temperate + has_trait = callous + } + } + desc = coronation_events.6102.desc_high_guest + } + triggered_desc = { + trigger = { + OR = { + AND = { + scope:activity.var:activity_special_type_progression <= 50 + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + AND = { + is_vassal_of = scope:host + is_a_faction_member = yes + } + } + } + scope:activity.var:activity_special_type_progression < 25 + } + } + desc = coronation_events.6102.desc_low_guest + } + desc = coronation_events.6102.desc_mid_guest + } + } + } + } + + left_portrait = { + character = scope:observer + animation = reception_groom_left + camera = camera_event_left_to_the_left + } + center_portrait = { + character = scope:host + triggered_animation = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + NOT = { + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + } + animation = emperor + } + triggered_animation = { + trigger = { + NOT = { + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + } + animation = personality_honorable + } + animation = scepter + camera = camera_event_center_mostly_away_right + } + right_portrait = { + character = scope:anointer + animation = reception_bride_right + camera = camera_event_right_to_the_right + } + override_background = { + reference = throne_room + } + artifact = { + trigger = { + exists = scope:crowning_artifact + } + target = scope:crowning_artifact + position = lower_right_portrait + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + reference = legend_glow + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + immediate = { + # For MP + coronation_busy_effect = yes + + remove_character_flag = need_military_outfit + involved_activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + scope:host = { + save_scope_as = bg_override_char + #Pick appropriate music + #Eastern Orthodox chanting + if = { + limit = { + OR = { + faith = faith:orthodox + culture = { has_cultural_pillar = heritage_byzantine } + culture = { has_cultural_pillar = language_greek } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mep3_mood_06 + } + #Iberian + else_if = { + limit = { + OR = { + culture = { has_building_gfx = iberian_building_gfx } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = "mx_Struggle_ending_compromise" + } + #Norse + else_if = { + limit = { + culture = { has_graphical_norse_culture_group_trigger = yes } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mx_mood_fp1_thefeast + } + #Steppe + else_if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + has_trait = nomadic_philosophy + } + culture = { has_graphical_steppe_culture_group_trigger = yes } + } + play_music_cue = mx_cue_the_khans_glory + } + #MENA + else_if = { + limit = { + OR = { + culture = { has_graphical_mena_culture_group_trigger = yes } + culture = { has_graphical_iranian_culture_group_trigger = yes } + } + } + play_music_cue = struggleend_cue + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + play_music_cue = "mx_cue_succession" + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression >= 75 + } + play_music_cue = "mx_cue_positive_effect" + } + else = { + play_music_cue = "mx_cue_sacredrite" + } + #Save an anointer if you don't have one + if = { + limit = { + OR = { + NOT = { exists = scope:anointer } + scope:anointer = { + is_alive = no + } + scope:anointer = { + is_imprisoned = yes + } + } + } + coronation_save_anointer_effect = yes + } + #Get councilor + if = { + limit = { + NOT = { + exists = scope:observer + } + } + #Get a councillor to be next to you + scope:activity = { + ordered_attending_character = { + order_by = "opinion(scope:host)" + limit = { + is_councillor_of = scope:host + #spouse might feel strange here idk + trigger_if = { + limit = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_clan + } + } + } + NOT = { + is_spouse_of = scope:host + } + } + trigger_if = { + limit = { + exists = scope:anointer + } + NOT = { + this = scope:anointer + } + } + } + save_scope_as = observer + } + } + } + #Get vassal + if = { + limit = { + NOT = { + exists = scope:observer + } + } + scope:activity = { + ordered_attending_character = { + order_by = "opinion(scope:host)" + limit = { + is_vassal_of = scope:host + trigger_if = { + limit = { + exists = scope:anointer + } + NOT = { + this = scope:anointer + } + } + } + save_scope_as = observer + } + } + } + #Get your crown/regalia to equip it + coronation_save_crowning_artifact_effect = { HOST = scope:host } + if = { + limit = { + this = root + } + coronation_ceremony_opinion_effect = yes + if = { + limit = { + exists = scope:crowning_artifact + scope:crowning_artifact = { + is_equipped = no + } + can_equip_artifact = scope:crowning_artifact + } + scope:crowning_artifact = { equip_artifact_to_owner = yes } + } + coronation_change_law_effect = yes + } + else = { + show_as_tooltip = { + coronation_ceremony_opinion_effect = yes + if = { + limit = { + exists = scope:crowning_artifact + can_equip_artifact = scope:crowning_artifact + scope:crowning_artifact = { is_equipped = no } + } + scope:crowning_artifact = { equip_artifact_to_owner = yes } + } + coronation_change_law_effect = yes + } + } + } + } + #Normal + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { this = scope:host } + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + AND = { + liege = scope:host + is_a_faction_member = yes + } + } + } + desc = coronation_events.6102.a_guest_neg + } + triggered_desc = { + trigger = { + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = trusting + } + NOT = { + host = { + has_trait = craven + } + } + NOT = { this = scope:host } + scope:activity.var:activity_special_type_progression >= 25 + } + desc = coronation_events.6102.a_guest_pos + } + triggered_desc = { + trigger = { + NOT = { this = scope:host } + } + desc = coronation_events.6102.a_guest + } + triggered_desc = { + trigger = { + this = scope:host + scope:host = { + OR = { + has_trait = humble + has_trait = content + has_trait = craven + } + NOR = { + has_trait = arrogant + has_trait = ambitious + } + } + } + desc = coronation_events.6101.a_oh_noes + } + triggered_desc = { + trigger = { + this = scope:host + scope:activity.var:activity_special_type_progression < 25 + NOR = { + has_trait = humble + has_trait = content + has_trait = calm + } + } + desc = coronation_events.6102.a_host_neg + } + desc = coronation_events.6101.a + } + } + } + if = { + limit = { + this = scope:host + scope:activity.var:activity_special_type_progression >= 25 + } + stress_impact = { + arrogant = massive_stress_impact_loss + ambitious = medium_stress_impact_loss + just = medium_stress_impact_loss + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + #Spouse crowning event + trigger_event = { + id = coronation_events.6140 + days = 2 + } + if = { + limit = { + scope:anointer = { + has_variable = anointer_destroy_me + } + } + scope:anointer = { + silent_disappearance_effect = yes + } + } + } +} + +coronation_events.6103 = { + hidden = yes + immediate = { + scope:host = { + coronation_change_law_effect = yes + } + } +} + +scripted_effect coronation_events_6110_artifact_reward_effect = { + save_scope_as = chosen_artifact + #A TIERED BONUS BASED ON THE RARITY OF THE ARTIFACT + if = { + limit = { + rarity = illustrious + } + root = { + add_legitimacy = medium_legitimacy_gain + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + } + } + else_if = { + limit = { + rarity = famed + } + root = { + add_legitimacy = minor_legitimacy_gain + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + } + } + else_if = { + limit = { + rarity = masterwork + } + root = { + add_legitimacy = miniscule_legitimacy_gain + custom_tooltip = coronation_tt_positive_miniscule + scope:activity = { activity_special_type_progression_miniscule = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_miniscule + CHAR = root + } + } + } + #BONUS IF YOU HAVE EXALT THE CROWN INTENT + if = { + limit = { + NOT = { + has_variable = coronation_title_crown_bonus + } + root = { + has_activity_intent = coronation_exalt_crown + } + } + save_scope_as = artifact_target + scope:blesser = { + save_scope_as = antiquarian_from_task + } + root = { + save_scope_as = liege + hidden_effect = { + scope:artifact_target = { + antiquarian_improve_artifact_effect = yes + } + } + custom_tooltip = coronation_artifact_improved + } + set_variable = { + name = coronation_title_crown_bonus + } + } + #Add desc line + set_artifact_description = crowning_artifact_desc + + scope:activity = { + add_activity_log_entry = { + key = coronation_title_artifact_log + character = scope:host + score = 20 + show_in_conclusion = yes + } + } + +} + +#Coronation artifact needs to become artifact OF TITLE +coronation_events.6110 = { + type = activity_event + title = { + first_valid = { + triggered_desc = { + trigger = { + government_has_flag = government_is_nomadic + } + desc = coronation_events.6110.t_nomad + } + desc = coronation_events.6110.t + } + } + desc = { + desc = coronation_events.6110.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + exists = scope:old_title_artifact + exists = scope:crowning_artifact_2 + } + } + desc = coronation_events.6110.desc_crowns + } + triggered_desc = { + trigger = { + coronation_proper_artifact_regalia_trigger = no + } + desc = coronation_events.6110.desc_crown + } + desc = coronation_events.6110.desc_regalia + } + desc = coronation_events.6110.desc_2 + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = coronation_events.6110.desc_st_peter + } + desc = coronation_events.6110.desc_generic + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:old_title_artifact + } + desc = coronation_events.6110.desc_old_artifact + } + triggered_desc = { + trigger = { + exists = scope:crowning_artifact_2 + } + desc = coronation_events.6110.desc_no_old_artifact_plural + } + desc = coronation_events.6110.desc_no_old_artifact + } + } + left_portrait = { + character = root + animation = prayer + camera = camera_event_very_left + } + center_portrait = { + character = scope:observer + triggered_animation = { + trigger = { + root = { coronation_proper_artifact_regalia_trigger = yes } + } + animation = throne_room_messenger_3 + } + triggered_animation = { + trigger = { + root = { coronation_proper_artifact_regalia_trigger = no } + } + animation = crowning + } + camera = camera_event_right_pointing_left + hide_info = yes + } + right_portrait = { + character = scope:blesser + triggered_animation = { + trigger = { + root = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + } + animation = reception_groom_left + } + triggered_animation = { + trigger = { + root = { + coronation_proper_artifact_regalia_trigger = yes + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + animation = reading + } + triggered_animation = { + trigger = { + root = { coronation_proper_artifact_regalia_trigger = no } + } + animation = toast_goblet + } + camera = camera_event_right_fully_away + } + artifact = { + target = scope:crowning_artifact + position = lower_left_portrait + } + artifact = { + target = scope:crowning_artifact_2 + position = lower_center_portrait + } + artifact = { + target = scope:crowning_artifact_3 + position = lower_right_portrait + } + override_background = { + trigger = { + scope:host.capital_county = title:c_byzantion + } + reference = ep3_hagia_sophia + } + override_background = { + trigger = { + NOT = { + scope:host.capital_county = title:c_byzantion + } + } + reference = temple + } + + theme = coronation_activity + cooldown = { days = 20 } + + trigger = { + coronation_has_proper_artifact_trigger = yes + this = scope:activity.activity_host + scope:activity = { + NOT = { + has_variable = had_coronation_events_6110 + } + activity_host = { + save_temporary_scope_as = host_temp + #Save whether it needs to be helmet or nah + trigger_if = { + limit = { + coronation_proper_artifact_crown_trigger = yes + coronation_proper_artifact_regalia_trigger = no + } + save_temporary_scope_as = needs_crown_temp + } + trigger_if = { + limit = { + coronation_proper_artifact_regalia_trigger = yes + coronation_proper_artifact_crown_trigger = no + } + save_temporary_scope_as = needs_regalia_temp + } + + OR = { + #Doesn't have a crown tied to title + NOT = { + any_character_artifact = { + trigger_if = { + limit = { + exists = scope:needs_crown_temp + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia_temp + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = regalia + artifact_slot_type = helmet + } + } + has_variable = artifact_succession_title + var:artifact_succession_title ?= { + this = root.primary_title + } + } + } + #Has crown tied to title... and a better crown + AND = { + any_character_artifact = { + trigger_if = { + limit = { + exists = scope:needs_crown_temp + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia_temp + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = regalia + artifact_slot_type = helmet + } + } + has_variable = artifact_succession_title + var:artifact_succession_title ?= { + this = root.primary_title + } + save_temporary_scope_as = artifact_temp + } + any_character_artifact = { + trigger_if = { + limit = { + exists = scope:needs_crown_temp + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia_temp + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = regalia + artifact_slot_type = helmet + } + } + NOT = { + has_variable = artifact_succession_title + var:artifact_succession_title ?= { + this = root.primary_title + } + } + #Checking rarity is higher than title crown + OR = { + AND = { + rarity = illustrious + scope:artifact_temp = { + NOT = { + rarity = illustrious + } + } + } + AND = { + rarity = famed + scope:artifact_temp = { + NOR = { + rarity = illustrious + rarity = famed + } + } + } + } + } + } + } + } + } + } + on_trigger_fail = { + #Anointment event + trigger_event = { + id = coronation_events.6130 + days = 3 + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + save_scope_value_as = { + name = year + value = current_year + } + scope:activity = { + set_variable = { + name = had_coronation_events_6110 + } + activity_host = { + save_scope_as = host + } + } + #Save whether it needs to be helmet or nah + if = { + limit = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + coronation_proper_artifact_regalia_trigger = no + } + } + save_scope_as = needs_crown + } + if = { + limit = { + scope:host = { + coronation_proper_artifact_regalia_trigger = yes + coronation_proper_artifact_crown_trigger = no + } + } + save_scope_as = needs_regalia + } + #Save your title's regalia if it exists + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + + has_variable = artifact_succession_title + var:artifact_succession_title ?= root.primary_title + } + save_scope_as = old_title_artifact + } + + #Save up to 5 crowns/regalia that aren't your title's crown/regalia + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + trigger_if = { + limit = { + has_variable = artifact_succession_title + } + NOT = { + var:artifact_succession_title = root.primary_title + } + } + } + save_scope_as = crowning_artifact + } + if = { + limit = { + exists = scope:crowning_artifact + } + #Try to save second + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + NOT = { + this = scope:crowning_artifact + } + trigger_if = { + limit = { + has_variable = artifact_succession_title + } + NOT = { + var:artifact_succession_title = root.primary_title + } + } + } + save_scope_as = crowning_artifact_2 + } + } + if = { + limit = { + exists = scope:crowning_artifact_2 + } + #try to save 3rd + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + NOR = { + this = scope:crowning_artifact + this = scope:crowning_artifact_2 + } + trigger_if = { + limit = { + has_variable = artifact_succession_title + } + NOT = { + var:artifact_succession_title = root.primary_title + } + } + } + save_scope_as = crowning_artifact_3 + } + } + if = { + limit = { + exists = scope:crowning_artifact_3 + } + #Try to save 4th + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + NOR = { + this = scope:crowning_artifact + this = scope:crowning_artifact_2 + this = scope:crowning_artifact_3 + } + trigger_if = { + limit = { + has_variable = artifact_succession_title + } + NOT = { + var:artifact_succession_title = root.primary_title + } + } + } + save_scope_as = crowning_artifact_4 + } + } + + if = { + limit = { + exists = scope:crowning_artifact_4 + } + #Try to save 5th + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + NOR = { + this = scope:crowning_artifact + this = scope:crowning_artifact_2 + this = scope:crowning_artifact_3 + this = scope:crowning_artifact_4 + } + trigger_if = { + limit = { + has_variable = artifact_succession_title + } + NOT = { + var:artifact_succession_title = root.primary_title + } + } + } + save_scope_as = crowning_artifact_5 + } + } + + #Save priest + if = { + limit = { + exists = involved_activity.var:officiator + involved_activity.var:officiator = { + is_alive = yes + is_imprisoned = no + } + } + #Save characters for the scene + involved_activity.var:officiator = { + save_scope_as = blesser + } + } + if = { + limit = { + NOT = { + exists = scope:blesser + } + cp:councillor_court_chaplain ?= { + is_alive = yes + is_imprisoned = no + is_incapable = no + has_contagious_deadly_disease_trigger = no + } + } + #SAVE COURT CHAPLAIN + cp:councillor_court_chaplain = { + save_scope_as = blesser + } + } + if = { + limit = { + NOT = { + exists = scope:blesser + } + } + create_character = { + template = priest_character_template + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = blesser + } + scope:blesser = { + add_character_flag = blesser_destroy_me + } + } + + #Save another priest + if = { + limit = { + cp:councillor_court_chaplain ?= { + NOT = { + this = scope:blesser + } + is_alive = yes + is_imprisoned = no + is_incapable = no + has_contagious_deadly_disease_trigger = no + } + } + cp:councillor_court_chaplain = { + save_scope_as = observer + } + } + else = { + create_character = { + template = priest_character_template + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = observer + } + scope:observer = { + add_character_flag = blesser_destroy_me + } + } + } + + #Artifact 1 + option = { + name = coronation_events.6110.a + custom_tooltip = coronation_titling_artifact_tt + if = { + limit = { + exists = player_heir + NOT = { + primary_heir ?= player_heir + } + } + custom_tooltip = coronation_titling_artifact_will_be_lost_tt + } + scope:crowning_artifact = { + set_variable = { + name = artifact_succession_title + value = root.primary_title + } + coronation_events_6110_artifact_reward_effect = yes + } + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + scope:crowning_artifact = { + OR = { + rarity = famed + rarity = illustrious + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + #Artifact 2 + option = { + trigger = { + exists = scope:crowning_artifact_2 + } + name = coronation_events.6110.b + custom_tooltip = coronation_titling_artifact_2_tt + if = { + limit = { + exists = player_heir + NOT = { + primary_heir ?= player_heir + } + } + custom_tooltip = coronation_titling_artifact_will_be_lost_2_tt + } + scope:crowning_artifact_2 = { + set_variable = { + name = artifact_succession_title + value = root.primary_title + } + coronation_events_6110_artifact_reward_effect = yes + } + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + scope:crowning_artifact_2 = { + OR = { + rarity = famed + rarity = illustrious + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + #Artifact 3 + option = { + trigger = { + exists = scope:crowning_artifact_3 + } + name = coronation_events.6110.c + custom_tooltip = coronation_titling_artifact_3_tt + if = { + limit = { + exists = player_heir + NOT = { + primary_heir ?= player_heir + } + } + custom_tooltip = coronation_titling_artifact_will_be_lost_3_tt + } + scope:crowning_artifact_3 = { + set_variable = { + name = artifact_succession_title + value = root.primary_title + } + coronation_events_6110_artifact_reward_effect = yes + } + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + scope:crowning_artifact_3 = { + OR = { + rarity = famed + rarity = illustrious + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + #Artifact 4 + option = { + trigger = { + exists = scope:crowning_artifact_4 + } + name = coronation_events.6110.d + custom_tooltip = coronation_titling_artifact_4_tt + if = { + limit = { + exists = player_heir + NOT = { + primary_heir ?= player_heir + } + } + custom_tooltip = coronation_titling_artifact_will_be_lost_4_tt + } + scope:crowning_artifact_4 = { + set_variable = { + name = artifact_succession_title + value = root.primary_title + } + coronation_events_6110_artifact_reward_effect = yes + } + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + scope:crowning_artifact_4 = { + OR = { + rarity = famed + rarity = illustrious + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + #Artifact 5 + option = { + trigger = { + exists = scope:crowning_artifact_5 + } + name = coronation_events.6110.e + custom_tooltip = coronation_titling_artifact_5_tt + if = { + limit = { + exists = player_heir + NOT = { + primary_heir ?= player_heir + } + } + custom_tooltip = coronation_titling_artifact_will_be_lost_5_tt + } + scope:crowning_artifact_5 = { + set_variable = { + name = artifact_succession_title + value = root.primary_title + } + coronation_events_6110_artifact_reward_effect = yes + } + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + scope:crowning_artifact_5 = { + OR = { + rarity = famed + rarity = illustrious + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + #Title??? This is my family/other title's artifact, and always will be! + option = { + name = { + trigger = { + NOT = { exists = scope:old_title_artifact } + exists = scope:crowning_artifact_2 + } + text = coronation_events.6110.f_plural + } + name = { + trigger = { + NOT = { exists = scope:old_title_artifact } + } + text = coronation_events.6110.f + } + + name = { + trigger = { + exists = scope:old_title_artifact + } + text = coronation_events.6110.f_replacing + } + + custom_tooltip = coronation_artifact_unaltered_succession_tt + if = { + limit = { + NOT = { exists = scope:old_title_artifact } + } + add_legitimacy = minor_legitimacy_loss + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + else = { + custom_tooltip = old_title_artifact_remains_tt + custom_tooltip = coronation_tt_negative_tiny + scope:activity = { activity_special_type_progression_negative_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative_tiny + CHAR = root + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 0 + modifier = { + has_trait = greedy + add = 1 + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + if = { + limit = { + is_ai = yes + scope:blesser = { + has_character_flag = blesser_destroy_me + } + } + scope:blesser = { + silent_disappearance_effect = yes + } + } + if = { + limit = { + is_ai = yes + scope:observer = { + has_character_flag = blesser_destroy_me + } + } + scope:observer = { + silent_disappearance_effect = yes + } + } + #Anointment event + trigger_event = { + id = coronation_events.6130 + days = 3 + } + } +} + +#Calling for the approval of the CLERGY +coronation_events.6120 = { + type = activity_event + title = coronation_events.6120.t + desc = { + #Triggered based on where you're going for rites + first_valid = { + triggered_desc = { + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + OR = { + location.barony = title:b_constantinople + AND = { + location.barony = title:b_vaticano + faith = faith:catholic + scope:host.faith = faith:catholic + } + AND = { + current_year >= 950 + location.barony = title:b_london + } + location.barony = title:b_reims + location = { + has_holding_type = church_holding + } + } + } + desc = coronation_events.6120.desc_cathedral + } + triggered_desc = { + trigger = { + exists = scope:activity.special_guest:priest + } + desc = coronation_events.6120.desc_holy_site + } + desc = coronation_events.6120.desc_generic_intro + } + #Triggered based on magnificence + first_valid = { + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6120.desc_low_magnificence + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + desc = coronation_events.6120.desc_high_magnificence + } + desc = coronation_events.6120.desc_generic_mid + } + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + desc = coronation_events.6120.desc_anointment + } + desc = coronation_events.6120.desc + } + #Clergy deliver their petition + first_valid = { + triggered_desc = { + trigger = { + coronation_clergy_approval_value < -1 + } + desc = coronation_events.6120.desc_low_clergy + } + triggered_desc = { + trigger = { + coronation_clergy_approval_value >= 1 + } + desc = coronation_events.6120.desc_high_clergy + } + desc = coronation_events.6120.desc_mid_clergy + } + } + left_portrait = { + character = scope:oather_1 + #Priests + triggered_animation = { + trigger = { + root = { coronation_clergy_approval_value < -1 } + } + animation = personality_cynical + } + triggered_animation = { + trigger = { + root = { coronation_clergy_approval_value >= 1 } + } + animation = prayer + } + animation = personality_honorable + camera = camera_event_very_left + } + center_portrait = { + character = scope:host + animation = wedding_priest + } + right_portrait = { + character = scope:oather_2 + #Priests + triggered_animation = { + trigger = { + root = { coronation_clergy_approval_value < -1 } + } + animation = eyeroll + } + triggered_animation = { + trigger = { + root = { coronation_clergy_approval_value >= 1 } + } + animation = admiration + } + animation = chaplain + camera = camera_event_very_right + } + override_background = { + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + trigger = { + this = involved_activity.activity_host + } + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + activity_host = { save_scope_as = host } + activity_location = { save_scope_as = location } + } + if = { + limit = { + exists = faith.religious_head + } + faith = { + religious_head = { save_scope_as = hof } + } + } + + #Save holy men + if = { + limit = { + coronation_living_officiator_trigger = yes + } + scope:activity.var:officiator = { + save_scope_as = oather_1 + } + } + if = { + limit = { + NOT = { + exists = scope:oather_1 + } + cp:councillor_court_chaplain ?= { + is_alive = yes + is_imprisoned = no + is_incapable = no + has_contagious_deadly_disease_trigger = no + } + } + #SAVE COURT CHAPLAIN + cp:councillor_court_chaplain = { + save_scope_as = oather_1 + } + } + if = { + limit = { + NOT = { + exists = scope:oather_1 + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + government_has_flag = government_is_theocracy + } + save_scope_as = oather_1 + } + } + } + if = { + limit = { + NOT = { + exists = scope:oather_1 + } + } + create_character = { + template = priest_character_template + location = scope:host.location + culture = scope:host.location.culture + faith = scope:host.faith + save_scope_as = oather_1 + } + scope:oather_1 = { + add_character_flag = oather_1_destroy + } + } + #Save second one + if = { + limit = { + cp:councillor_court_chaplain ?= { + NOT = { + this = scope:oather_1 + } + is_alive = yes + is_imprisoned = no + is_incapable = no + has_contagious_deadly_disease_trigger = no + } + } + #SAVE COURT CHAPLAIN + cp:councillor_court_chaplain = { + save_scope_as = oather_2 + } + } + if = { + limit = { + NOT = { + exists = scope:oather_2 + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + government_has_flag = government_is_theocracy + NOT = { + this = scope:oather_1 + } + } + save_scope_as = oather_2 + } + } + } + if = { + limit = { + NOT = { + exists = scope:oather_2 + } + } + create_character = { + template = priest_character_template + location = scope:host.location + culture = scope:host.location.culture + faith = scope:host.faith + save_scope_as = oather_2 + } + scope:oather_2 = { + add_character_flag = oather_2_destroy + } + } + coronation_ceremony_piety_effect = yes + } + #Unlocked I SWEAR REAL HARD TO GET THE HERETICS + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + OR = { + faith = { + NOT = { + has_doctrine = doctrine_pluralism_pluralistic + } + } + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + has_trait = zealous + } + + } + } + name = coronation_events.6120.a + flavor = coronation_events.6120.a.flavor + scope:activity = { + add_activity_log_entry = { + key = coronation_swore_heretic_persecute + character = scope:host + root = { + add_character_modifier = { + modifier = coronation_swore_persecution_modifier + years = 20 + } + if = { + limit = { + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + has_trait = zealous + } + NOT = { + has_trait = holy_warrior + } + martial > average_skill_rating + } + add_trait = holy_warrior + } + } + + } + } + stress_impact = { + zealous = minor_stress_impact_loss + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + } + + modifier = { + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + has_trait = zealous + } + NOT = { + has_trait = holy_warrior + } + martial > average_skill_rating + add = 25 + } + modifier = { + NOT = { + has_focus_martial = yes + } + add = -50 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = cynical + } + } + } + } + #I will affirm in a way that places my authority above the church's + option = { + trigger = { + learning >= decent_skill_rating + trigger_if = { + limit = { has_trait = deceitful } + has_trait = deceitful + } + trigger_else_if = { + limit = { has_trait = cynical } + has_trait = cynical + } + trigger_else_if = { + limit = { has_trait = arbitrary } + has_trait = arbitrary + } + trigger_else_if = { + limit = { has_trait = fickle } + has_trait = fickle + } + trigger_else_if = { + limit = { has_trait = paranoid } + has_trait = paranoid + } + trigger_else_if = { + limit = { has_trait = arrogant } + has_trait = arrogant + } + trigger_else_if = { + limit = { has_trait = ambitious } + has_trait = ambitious + } + trigger_else = { + has_trait = greedy + } + } + name = coronation_events.6120.b + flavor = coronation_events.6120.b.flavor + scope:activity = { + add_activity_log_entry = { + key = coronation_exploiting_church_log + character = scope:host + root = { + add_character_modifier = { + modifier = coronation_denying_clergy_modifier + years = 20 + } + add_piety = medium_piety_loss + } + } + } + + stress_impact = { + cynical = minor_stress_impact_loss + greedy = minor_stress_impact_loss + fickle = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + zealous = medium_stress_impact_gain + generous = minor_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + } + + modifier = { + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + has_trait = zealous + } + NOT = { + has_trait = holy_warrior + } + martial > average_skill_rating + add = 25 + } + modifier = { + NOT = { + has_focus_martial = yes + } + add = -50 + } + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = generous + has_trait = just + } + } + } + } + #Priests approve/disapprove + option = { + name = { + trigger = { + NOR = { + ai_honor >= high_positive_ai_value + ai_zeal >= medium_positive_ai_value + } + OR = { + coronation_clergy_approval_value < -1 + has_trait = cynical + has_trait = arbitrary + has_trait = fickle + } + } + text = coronation_events.6120.c_begrudging + } + name = { + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + NOT = { + NOR = { + ai_honor >= high_positive_ai_value + ai_zeal >= medium_positive_ai_value + } + OR = { + coronation_clergy_approval_value < -1 + has_trait = cynical + has_trait = arbitrary + has_trait = fickle + } + } + } + text = coronation_events.6120.c_christian + } + name = { + trigger = { + NOT = { OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } } + NOT = { + NOR = { + ai_honor >= high_positive_ai_value + ai_zeal >= medium_positive_ai_value + } + OR = { + coronation_clergy_approval_value < -1 + has_trait = cynical + has_trait = arbitrary + has_trait = fickle + } + } + + } + text = coronation_events.6120.c + } + ai_chance = { + base = 100 + } + } + + after = { + # For MP + coronation_ready_effect = yes + if = { + limit = { + scope:oather_1 = { + has_character_flag = oather_1_destroy + } + } + scope:oather_1 = { + silent_disappearance_effect = yes + } + } + if = { + limit = { + scope:oather_2 = { + has_character_flag = oather_2_destroy + } + } + scope:oather_2 = { + silent_disappearance_effect = yes + } + } + #Approval of the nobles + trigger_event = { + id = coronation_events.6121 + days = 3 + } + } +} + +scripted_trigger coronation_events_6121_detractor_ally_trigger = { + current_military_strength >= 300 + is_ai = yes + highest_held_title_tier >= tier_county + NOR = { + is_vassal_or_below_of = root + is_allied_to = root + is_tributary_of_suzerain_or_above = root + has_relation_blood_brother = prev + government_has_flag = government_is_herder + any_war_ally = { + this = prev + } + } +} +scripted_trigger coronation_events_6121_minority_trigger = { + is_participant_in_activity = scope:activity + has_vassal_stance = minority + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + culture = { + NOT = { this = root.culture } + cultural_acceptance = { + target = root.culture + value <= 80 + } + } +} +#Calling for the approval of the NOBILITY +coronation_events.6121 = { + type = activity_event + title = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + has_cultural_pillar = heritage_magyar + } + } + OR = { + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + primary_title = title:e_mongol_empire + } + } + desc = coronation_events.6121.t_kurultai + } + desc = coronation_events.6121.t + } + } + desc = { + #Regional flavor + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + has_cultural_pillar = heritage_magyar + } + } + OR = { + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + primary_title = title:e_mongol_empire + } + } + desc = coronation_events.6121.desc_kurultai + } + triggered_desc = { + trigger = { + OR = { + is_roman_emperor_primary_title_trigger = yes + culture = { + has_cultural_tradition = tradition_ep3_roman_ceremonies + } + culture = { + has_cultural_tradition = tradition_roman_legacy + } + } + } + desc = coronation_events.6121.desc_byzantine + } + desc = coronation_events.6121.desc_generic_intro + } + #Are the nobles compliant? + first_valid = { + triggered_desc = { + trigger = { + coronation_vassals_approval_value < -1 + } + desc = coronation_events.6121.desc_low_approval + } + triggered_desc = { + trigger = { + coronation_vassals_approval_value >= 1 + } + desc = coronation_events.6121.desc_high_approval + } + desc = coronation_events.6121.desc_mid_approval + } + } + left_portrait = { + character = scope:vassal_1 + #Nobles + triggered_animation = { + trigger = { + root = { coronation_vassals_approval_value < -1 } + } + animation = anger + } + triggered_animation = { + trigger = { + root = { coronation_vassals_approval_value >= 1 } + } + animation = throne_room_bow_3 + } + animation = throne_room_bow_2 + camera = camera_event_very_left + } + center_portrait = { + character = scope:host + triggered_animation = { + trigger = { + root = { coronation_vassals_approval_value < -1 } + } + animation = worry + } + animation = wedding_groom_right + } + right_portrait = { + character = scope:vassal_2 + #Nobles + triggered_animation = { + trigger = { + root = { coronation_vassals_approval_value < -1 } + } + animation = hunting_knife_start + } + triggered_animation = { + trigger = { + root = { coronation_vassals_approval_value >= 1 } + } + animation = celebrate_sword + } + animation = wedding_objection_start + camera = camera_event_very_right + } + lower_left_portrait = scope:detractor_ally_1 + lower_center_portrait = scope:detractor_ally_2 + override_background = { + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + + trigger = { + this = involved_activity.activity_host + scope:activity = { + any_attending_character = { + count >= 2 + is_vassal_of = root + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + } + } + on_trigger_fail = { + #Skip to Approval of the people if you have too few vassals attending + trigger_event = { + id = coronation_events.6122 + days = 3 + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + activity_host = { save_scope_as = host } + activity_location = { save_scope_as = location } + } + #Host is liked, choose supporters + if = { + limit = { + coronation_vassals_approval_value >= -1 + } + scope:activity = { + ordered_guest_subset = { + name = supporter + order_by = max_military_strength + limit = { + is_vassal_of = root + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_1 + } + } + scope:activity = { + ordered_guest_subset = { + name = supporter + order_by = max_military_strength + limit = { + is_vassal_of = root + NAND = { + exists = scope:vassal_1 + this = scope:vassal_1 + } + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_2 + } + } + } + #Host is disliked, choose detractors + else = { + scope:activity = { + ordered_guest_subset = { + name = detractor + order_by = max_military_strength + limit = { + is_vassal_of = root + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_1 + } + } + scope:activity = { + ordered_guest_subset = { + name = detractor + order_by = max_military_strength + limit = { + is_vassal_of = root + NAND = { + exists = scope:vassal_1 + this = scope:vassal_1 + } + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_2 + } + } + } + #Random vassal fallbacks + if = { + limit = { + NOT = { + exists = scope:vassal_1 + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + is_vassal_of = root + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_1 + } + } + } + if = { + limit = { + NOT = { + exists = scope:vassal_2 + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + is_vassal_of = root + NOT = { + this = scope:vassal_1 + } + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_2 + } + } + } + #Save detractors with foreign allies and foreign allies, if possible + if = { + limit = { + coronation_vassals_approval_value < -1 + has_activity_intent = coronation_weaken_detractors + intrigue >= high_skill_rating + scope:activity = { + any_guest_subset = { + name = detractor + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + is_ai = yes + is_vassal_of = root + any_ally = { + coronation_events_6121_detractor_ally_trigger = yes + } + } + } + } + scope:activity = { + every_guest_subset = { + name = detractor + limit = { + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + is_ai = yes + is_vassal_of = root + any_ally = { + coronation_events_6121_detractor_ally_trigger = yes + } + } + ordered_ally = { + order_by = current_military_strength + limit = { + coronation_events_6121_detractor_ally_trigger = yes + } + add_to_list = detractor_allies + } + } + ordered_in_list = { + list = detractor_allies + order_by = current_military_strength + save_scope_as = detractor_ally_1 + } + ordered_in_list = { + list = detractor_allies + order_by = current_military_strength + limit = { + NOT = { + this = scope:detractor_ally_1 + } + } + + save_scope_as = detractor_ally_2 + } + #Overwrite vassals we already saved, these are more relevant + scope:detractor_ally_1 = { + ordered_ally = { + order_by = current_military_strength + limit = { + is_ai = yes + is_vassal_of = root + is_in_guest_subset = { name = detractor } + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_1 + } + } + + scope:detractor_ally_2 = { + ordered_ally = { + order_by = current_military_strength + limit = { + is_ai = yes + is_vassal_of = root + is_in_guest_subset = { name = detractor } + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + NOT = { + this = scope:vassal_1 + } + } + save_scope_as = vassal_2 + } + } + } + } + #Overwrite with minority vassals if that option is available + if = { + limit = { + has_activity_intent = coronation_impress_attendees + diplomacy >= decent_skill_rating + any_vassal = { + count >= 2 + coronation_events_6121_minority_trigger = yes + } + } + ordered_vassal = { + order_by = max_military_strength + limit = { + coronation_events_6121_minority_trigger = yes + opinion = { + target = root + value >= -20 + } + } + alternative_limit = { + coronation_events_6121_minority_trigger = yes + opinion = { + target = root + value >= -60 + } + } + alternative_limit = { + coronation_events_6121_minority_trigger = yes + } + save_scope_as = vassal_1 + } + ordered_vassal = { + order_by = max_military_strength + limit = { + coronation_events_6121_minority_trigger = yes + NOT = { + this = scope:vassal_1 + } + opinion = { + target = root + value >= -20 + } + } + alternative_limit = { + coronation_events_6121_minority_trigger = yes + opinion = { + target = root + value >= -60 + } + NOT = { + this = scope:vassal_1 + } + } + alternative_limit = { + coronation_events_6121_minority_trigger = yes + NOT = { + this = scope:vassal_1 + } + } + save_scope_as = vassal_2 + } + } + coronation_ceremony_prestige_effect = yes + } + #THESE VASSALS THAT DON'T LIKE ME ARE FOREIGN PUPPETS + option = { + trigger = { + has_activity_intent = coronation_weaken_detractors + intrigue >= high_skill_rating + exists = scope:detractor_ally_1 + } + name = coronation_events.6121.a + flavor = coronation_events.6121.a.flavor + scope:activity = { + add_activity_log_entry = { + key = coronation_foreign_enemies_log + score = 50 + character = scope:vassal_1 + target = scope:vassal_2 + #Break alliance between vassal and foreign ruler + scope:vassal_1 = { + break_alliance = scope:detractor_ally_1 + if = { + limit = { + NOT = { + has_relation_rival = root + } + } + set_relation_rival = { + target = root + reason = rival_accused_of_foreign_collusion + } + } + else = { + set_relation_nemesis = { + target = root + reason = rival_accused_of_foreign_collusion + } + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:vassal_1 } + } + scope:vassal_2 = { + if = { + limit = { + exists = scope:detractor_ally_2 + } + break_alliance = scope:detractor_ally_2 + } + if = { + limit = { + NOT = { + has_relation_rival = root + } + } + set_relation_rival = { + target = root + reason = rival_accused_of_foreign_collusion + } + } + else = { + set_relation_nemesis = { + target = root + reason = rival_accused_of_foreign_collusion + } + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:vassal_2 } + } + } + } + scope:vassal_1 = { + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + scope:vassal_2 = { + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + if = { + limit = { + scope:detractor_ally_1 = { + is_confederation_member = yes + } + } + scope:detractor_ally_1.confederation = { + remove_confederation_member = scope:detractor_ally_1 + } + } + if = { + limit = { + scope:detractor_ally_2 = { + is_confederation_member = yes + } + } + scope:detractor_ally_2.confederation = { + remove_confederation_member = scope:detractor_ally_2 + } + } + + scope:detractor_ally_1 = { + add_opinion = { + target = root + opinion = -50 + modifier = hate_opinion + } + if = { + limit = { + involved_activity ?= scope:activity + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:detractor_ally_1 } + } + } + if = { + limit = { + exists = scope:detractor_ally_2 + } + scope:detractor_ally_2 = { + add_opinion = { + target = root + opinion = -50 + modifier = hate_opinion + } + } + if = { + limit = { + involved_activity ?= scope:activity + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:detractor_ally_2 } + } + } + + + stress_impact = { + vengeful = miniscule_stress_impact_loss + paranoid = minor_stress_impact_loss + trusting = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + just = miniscule_stress_impact_gain + honest = miniscule_stress_impact_gain + } + ai_chance = { + base = 150 + modifier = { + add = 100 + OR = { + has_trait = vengeful + has_trait = paranoid + has_trait = sadistic + has_trait = deceitful + } + } + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = forgiving + has_trait = just + has_trait = honest + } + } + } + } + #I should make a show of accepting loyalty from minorities + option = { + trigger = { + has_activity_intent = coronation_impress_attendees + stewardship >= decent_skill_rating + any_vassal = { + count >= 2 + coronation_events_6121_minority_trigger = yes + } + } + name = coronation_events.6121.b + flavor = coronation_events.6121.b_flavor + scope:activity = { + add_activity_log_entry = { + key = coronation_honored_minorities_ceremony_log + character = scope:vassal_1 + target = scope:vassal_2 + scope:vassal_1 = { + #Become supporter if opinion is positive + if = { + limit = { + OR = { + is_in_guest_subset = { name = detractor } + AND = { + NOT = { is_in_guest_subset = { name = supporter } } + opinion = { + target = root + value >= 0 + } + } + } + is_ai = yes + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:vassal_1 } + } + if = { + limit = { + culture = scope:vassal_2.culture + } + #Add cultural acceptance + culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_cultural_acceptance_gain + desc = cultural_acceptance_favored_during_oath + } + } + } + else = { + #Add cultural acceptance + culture = { + change_cultural_acceptance = { + target = root.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_favored_during_oath + } + } + } + } + scope:vassal_2 = { + #Become supporter if opinion is positive + if = { + limit = { + OR = { + is_in_guest_subset = { name = detractor } + AND = { + NOT = { is_in_guest_subset = { name = supporter } } + opinion = { + target = root + value >= 0 + } + } + } + is_ai = yes + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:vassal_2 } + } + if = { + limit = { + NOT = { + culture = scope:vassal_1.culture + } + } + #Add cultural acceptance + culture = { + change_cultural_acceptance = { + target = root.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_favored_during_oath + } + } + } + } + } + } + scope:vassal_1 = { + #Add opinion of root + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + scope:vassal_2 = { + #Add opinion of root + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + stress_impact = { + trusting = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + add = 100 + OR = { + has_trait = compassionate + has_trait = humble + has_trait = trusting + } + } + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arrogant + has_trait = paranoid + } + } + } + } + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + diplomacy >= average_skill_rating + scope:activity = { + any_guest_subset = { + count >= 2 + name = supporter + is_vassal_of = root + } + } + } + name = coronation_events.6121.c + + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + scope:activity = { + every_guest_subset = { + name = supporter + custom = custom.every_vassal_supporter + limit = { + is_vassal_of = root + } + if = { + limit = { + government_allows = administrative + top_liege = involved_activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + add_opinion = { + target = root + modifier = loyalty_opinion + opinion = 15 + } + hidden_effect = { + reverse_add_opinion = { + target = root + modifier = loyalty_opinion + opinion = 10 + } + } + } + } + ai_chance = { + base = 200 + } + } + option = { + trigger = { + NOT = { + government_allows = administrative + } + trigger_if = { + limit = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + OR = { + has_trait = lifestyle_blademaster + has_trait = knight_errant + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 30 + } + } + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 20 + } + } + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 20 + } + } + has_trait = aggressive_attacker + has_trait = reckless + has_trait = gallant + has_trait = adventurer + has_trait = viking + has_trait = shieldmaiden + #Normal personality_triggers + has_trait = wrathful + has_trait = vengeful + has_trait = brave + has_trait = fickle + has_trait = arrogant + has_trait = sadistic + } + } + trigger_else = { + #Just the warrior-type triggers + OR = { + has_trait = lifestyle_blademaster + has_trait = knight_errant + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 30 + } + } + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 20 + } + } + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 20 + } + } + has_trait = aggressive_attacker + has_trait = reckless + has_trait = gallant + has_trait = adventurer + has_trait = viking + has_trait = shieldmaiden + } + } + coronation_vassals_approval_value < -1 + scope:vassal_2 = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + is_ai = yes + } + } + name = coronation_events.6121.d + flavor = coronation_events.6121.d_flavor + add_internal_flag = dangerous + scope:activity = { + add_activity_log_entry = { + key = coronation_noble_oath_duel_log + score = 50 + show_in_conclusion = yes + character = root + target = scope:vassal_2 + } + } + + + custom_tooltip = coronation_events.6121_duel_tt + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:vassal_2 + FATALITY = always + FIXED = no + LOCALE = temple + OUTPUT_EVENT = single_combat.1006 + INVALIDATION_EVENT = single_combat.1006 + } + add_dread = major_dread_gain + add_prestige = medium_prestige_gain + if = { + limit = { + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + add_tyranny = major_tyranny_gain + } + else_if = { + limit = { + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + add_tyranny = medium_tyranny_gain + } + scope:vassal_2 = { + set_relation_rival = { + target = root + reason = rival_duel_attacked + } + if = { + limit = { + involved_activity ?= scope:activity + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:vassal_2 } + } + } + stress_impact = { + wrathful = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + craven = massive_stress_impact_gain + humble = minor_stress_impact_gain + forgiving = major_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_vengefulness = 1 + ai_rationality = -1 + } + modifier = { + add = 100 + OR = { + has_trait = wrathful + has_trait = vengeful + } + } + modifier = { + add = 50 + OR = { + has_trait = sadistic + has_trait = arrogant + has_trait = brave + has_trait = fickle + } + } + modifier = { + add = 50 + prowess >= extremely_high_skill_rating + } + modifier = { + add = -100 + prowess < scope:vassal_2.prowess + } + modifier = { + factor = 0.5 + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = humble + has_trait = forgiving + has_trait = compassionate + has_trait = calm + prowess <= low_skill_rating + } + } + } + } + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + trigger_if = { + limit = { + coronation_vassals_approval_value >= -1 + coronation_vassals_approval_value < 1 + } + OR = { + has_trait = paranoid + has_trait = depressed + has_trait = vengeful + } + } + trigger_else = { + coronation_vassals_approval_value < -1 + } + } + desc = coronation_events.6121.e_low + } + triggered_desc = { + trigger = { + coronation_vassals_approval_value >= -1 + OR = { + has_trait = arrogant + has_trait = trusting + has_trait = content + has_trait = callous + has_trait = sadistic + } + NOR = { + has_trait = humble + has_trait = compassionate + has_trait = paranoid + has_trait = generous + has_trait = forgiving + } + } + desc = coronation_events.6121.e_high + } + desc = coronation_events.6121.e_mid + } + } + } + ai_chance = { + base = 100 + } + } + + after = { + # For MP + coronation_ready_effect = yes + + #Approval of the people + trigger_event = { + id = coronation_events.6122 + days = 3 + } + } +} + +#The approval of the people event +coronation_events.6122 = { + type = activity_event + title = coronation_events.6122.t + desc = { + first_valid = { + #Loc for anointment taking place outside realm + triggered_desc = { + trigger = { + scope:location.county.holder = { + NOT = { top_liege = root } + } + } + desc = coronation_events.6122.desc_intro_foreign + } + desc = coronation_events.6122.desc_intro + } + #Are the people compliant? + first_valid = { + triggered_desc = { + trigger = { + coronation_popular_approval_value < -1 + } + desc = coronation_events.6122.desc_low_approval + } + triggered_desc = { + trigger = { + coronation_popular_approval_value >= 1 + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + OR = { + location.barony = title:b_vaticano + location.barony = title:b_roma + location.culture = { + has_cultural_pillar = language_greek + } + } + } + desc = coronation_events.6122.desc_high_approval_christian + } + triggered_desc = { + trigger = { + coronation_popular_approval_value >= 1 + } + desc = coronation_events.6122.desc_high_approval + } + desc = coronation_events.6122.desc_mid_approval + } + } + left_portrait = { + character = scope:host + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value < -1 } + } + animation = eyeroll + } + triggered_animation = { + trigger = { + root = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + } + animation = acknowledging + } + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value >= 1 } + } + animation = interested + } + animation = personality_rational + } + center_portrait = { + character = scope:commoner_1 + #Nobles + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value < -1 } + } + animation = personality_coward + } + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value >= 1 } + } + animation = throne_room_bow_3 + } + animation = throne_room_bow_2 + camera = camera_event_very_right + hide_info = yes + } + right_portrait = { + character = scope:commoner_2 + #Nobles + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value < -1 } + } + animation = crying + } + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value >= 1 } + } + animation = obsequious_bow + } + animation = throne_room_bow_1 + camera = camera_event_very_right + hide_info = yes + } + lower_left_portrait = scope:detractor_ally_1 + lower_center_portrait = scope:detractor_ally_2 + override_background = { + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + on_trigger_fail = { + #artifact blessing + trigger_event = { + id = coronation_events.6110 + days = 3 + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + select_local_farm_animal_effect = yes + scope:activity = { + activity_host = { save_scope_as = host } + activity_location = { save_scope_as = location } + } + capital_province = { save_scope_as = capital_p } + create_character = { + template = settlement_elder_character + dynasty = none + location = scope:activity.activity_location + gender_female_chance = activity_location_faith_dominant_gender_female_chance + faith = scope:activity.activity_location.faith + culture = scope:activity.activity_location.culture + save_scope_as = commoner_1 + } + create_character = { + template = settlement_elder_character + dynasty = none + location = scope:activity.activity_location + gender_female_chance = activity_location_faith_dominant_gender_female_chance + faith = scope:activity.activity_location.faith + culture = scope:activity.activity_location.culture + save_scope_as = commoner_2 + } + coronation_ceremony_legitimacy_effect = yes + } + #Exalt the crown + option = { + trigger = { + has_activity_intent = coronation_exalt_crown + coronation_popular_approval_value >= 1 + location.county = { + holder = root + NOT = { + has_county_modifier = coronation_loyal_to_the_crown_modifier + } + } + } + name = coronation_events.6122.a + flavor = coronation_events.6122.a.flavor + + #Get a county modifier that is replaced with a negative one if the county gets taken by another primary title holder + scope:activity = { + add_activity_log_entry = { + key = coronation_inspired_loyalty_crowd_log + score = 20 + character = root + scope:location.county = { + add_county_modifier = { + modifier = coronation_loyal_to_the_crown_modifier + years = 20 + } + } + } + } + scope:location.county = { + set_variable = { + name = coronation_loyal_to_title + value = scope:host.primary_title + } + custom_tooltip = coronation_modifier_removed_on_new_primary_tt + custom_tooltip = coronation_modifier_negative_on_new_primary_tt + } + remove_short_term_gold = minor_gold_value + stress_impact = { + generous = minor_stress_impact_loss + arrogant = medium_stress_impact_loss + shy = minor_stress_impact_gain + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 300 + modifier = { + add = 200 + OR = { + has_trait = arrogant + has_trait = generous + } + } + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = shy + has_trait = humble + has_trait = content + has_trait = greedy + } + } + } + } + #PUNISH THIS RABBLE + option = { + trigger = { + martial >= medium_skill_rating + coronation_popular_approval_value < -1 + } + name = coronation_events.6122.b + flavor = coronation_events.6122.b.flavor + scope:activity = { + add_activity_log_entry = { + key = coronation_quelled_crowd_log + score = 20 + character = root + root = { + add_character_modifier = { + modifier = punishes_popular_dissent_modifier + years = 20 + } + scope:location.county = { + add_county_modifier = { + modifier = coronation_crowds_beaten_modifier + years = 5 + } + } + } + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + compassionate = major_stress_impact_gain + humble = major_stress_impact_gain + forgiving = major_stress_impact_gain + trusting = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -2 + } + modifier = { + add = { + value = dread + multiply = 2 + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = humble + has_trait = forgiving + has_trait = trusting + has_trait = generous + } + } + } + } + + #Opt out + option = { + #Triggered names based on positivity of crowd and your arrogance + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = humble + has_trait = compassionate + has_trait = calm + has_trait = forgiving + } + coronation_popular_approval_value < -1 + NOR = { + has_trait = arrogant + has_trait = vengeful + has_trait = sadistic + has_trait = wrathful + } + } + desc = coronation_events.6122.c_v_low_humble + } + triggered_desc = { + trigger = { + OR = { + has_trait = wrathful + has_trait = arrogant + has_trait = sadistic + has_trait = arbitrary + has_trait = vengeful + coronation_popular_approval_value < -1 + } + coronation_popular_approval_value < 1 + } + desc = coronation_events.6122.c_v_low + } + triggered_desc = { + trigger = { + trigger_if = { + limit = { + coronation_popular_approval_value >= -1 + coronation_popular_approval_value < 1 + } + NOR = { + has_trait = humble + ai_compassion >= low_positive_ai_value + } + } + trigger_else = { + coronation_popular_approval_value < -1 + } + } + desc = coronation_events.6122.c_low + } + triggered_desc = { + trigger = { + coronation_popular_approval_value >= -1 + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = trusting + has_trait = eccentric + } + } + desc = coronation_events.6122.c_high + } + desc = coronation_events.6122.c_mid + } + } + } + ai_chance = { + base = 100 + } + } + + after = { + # For MP + coronation_ready_effect = yes + + scope:commoner_1 = { + silent_disappearance_effect = yes + } + scope:commoner_2 = { + silent_disappearance_effect = yes + } + #artifact blessing + trigger_event = { + id = coronation_events.6110 + days = 3 + } + } +} + +scripted_trigger coronation_events_6123_crucial_vassal_trigger = { + is_powerful_vassal_of = scope:host + OR = { + is_diarch_of_target = scope:host + is_councillor_of = scope:host + legitimacy_level >= 5 + prestige_level >= 4 + } +} + +scripted_trigger coronation_events_6123_significant_vassal_trigger = { + OR = { + is_powerful_vassal_of = scope:host + is_diarch_of_target = scope:host + is_councillor_of = scope:host + legitimacy_level >= 4 + prestige_level >= 3 + } +} + +scripted_trigger coronation_events_6123_vengeful_supporter_trigger = { + is_ai = yes + NOR = { + has_relation_nemesis = root + has_trait = forgiving + } + OR = { + is_councillor_of = scope:host + is_close_family_of = scope:host + highest_held_title_tier >= tier_county + } + OR = { + opinion = { + target = scope:host + value >= 80 + } + ai_vengefulness > low_positive_ai_value + ai_honor > low_positive_ai_value + opinion = { + target = root + value < -40 + } + } +} + +#Summary of approvals for guests +coronation_events.6123 = { + type = activity_event + title = coronation_events.6123.t + desc = { + desc = coronation_events.6123.desc_intro + #Clergy response + first_valid = { + triggered_desc = { + trigger = { + scope:host = { coronation_clergy_approval_value < -1 } + } + desc = coronation_events.6123.desc_low_clergy + } + triggered_desc = { + trigger = { + scope:host = { coronation_clergy_approval_value >= 1 } + } + desc = coronation_events.6123.desc_high_clergy + } + desc = coronation_events.6123.desc_mid_clergy + } + desc = coronation_events.6123.desc_then + triggered_desc = { + trigger = { + scope:location.county.holder = { + NOT = { top_liege = scope:host } + } + } + desc = coronation_events.6123.desc_pop_foreign + } + #Popular approval response + first_valid = { + triggered_desc = { + trigger = { + scope:host = { coronation_popular_approval_value < -1 } + } + desc = coronation_events.6123.desc_low_populace + } + triggered_desc = { + trigger = { + scope:host = { coronation_popular_approval_value >= 1 } + } + desc = coronation_events.6123.desc_high_populace + } + desc = coronation_events.6123.desc_mid_populace + } + #Are the nobles compliant? + first_valid = { + triggered_desc = { + trigger = { + scope:host = { coronation_vassals_approval_value < -1 } + } + desc = coronation_events.6123.desc_low_vassals + } + triggered_desc = { + trigger = { + scope:host = { coronation_vassals_approval_value >= 1 } + } + desc = coronation_events.6123.desc_high_vassals + } + desc = coronation_events.6123.desc_mid_vassals + } + #Are the nobles compliant? + first_valid = { + triggered_desc = { + trigger = { + root = { + is_vassal_of = scope:host + } + } + desc = coronation_events.6123.desc_end_vassal + } + desc = coronation_events.6123.desc_end_spectator + } + } + left_portrait = { + character = scope:vassal + triggered_animation = { + trigger = { + trigger_if = { + limit = { + scope:vassal = { + this = root + } + } + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = disloyal + is_a_faction_member = yes + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = scope:vassal + } + } + } + NOR = { + has_trait = shy + has_trait = humble + has_trait = calm + has_activity_intent = coronation_offer_support + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = scope:vassal + } + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + trigger_else = { + scope:host = { coronation_vassals_approval_value < -1 } + } + } + animation = anger + } + triggered_animation = { + trigger = { + trigger_if = { + limit = { + scope:vassal = { + this = root + } + } + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = loyal + has_trait = craven + has_trait = humble + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = scope:vassal + } + } + } + NOR = { + has_trait = arrogant + has_trait = brave + has_trait = fickle + has_activity_intent = coronation_disrupt_loyalists + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = scope:vassal + } + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + trigger_else = { + scope:host = { coronation_vassals_approval_value < -1 } + } + } + animation = throne_room_bow_3 + } + animation = throne_room_bow_2 + camera = camera_event_very_left + } + center_portrait = { + character = scope:host + triggered_animation = { + trigger = { + scope:host = { + coronation_clergy_approval_value < -1 + coronation_vassals_approval_value < -1 + } + } + animation = worry + } + animation = wedding_groom_right + } + right_portrait = { + character = scope:priest + triggered_animation = { + trigger = { + scope:host = { coronation_clergy_approval_value < -1 } + } + animation = eyeroll + } + triggered_animation = { + trigger = { + scope:host = { coronation_clergy_approval_value >= 1 } + } + animation = admiration + } + animation = chaplain + camera = camera_event_very_right + } + lower_left_portrait = scope:major_supporter_1 + lower_center_portrait = scope:major_supporter_2 + lower_right_portrait = scope:major_supporter_3 + override_background = { + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + on_trigger_fail = { + #artifact blessing + trigger_event = { + id = coronation_events.6110 + days = 3 + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + involved_activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + scope:host = { + show_as_tooltip = { + coronation_ceremony_piety_effect = yes + coronation_ceremony_legitimacy_effect = yes + coronation_ceremony_prestige_effect = yes + } + save_scope_as = bg_override_char + } + #Save a vassal + #Prefer root if they are a vassal + if = { + limit = { + is_vassal_of = scope:host + NOR = { + is_at_war_with = scope:host + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal + } + #Host is liked, choose supporters + if = { + limit = { + NOT = { + exists = scope:vassal + } + coronation_vassals_approval_value >= -1 + } + scope:activity = { + ordered_guest_subset = { + name = supporter + order_by = max_military_strength + limit = { + is_vassal_of = scope:host + NOR = { + is_at_war_with = scope:host + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal + } + } + } + #Host is disliked, choose detractors + else = { + scope:activity = { + ordered_guest_subset = { + name = detractor + order_by = max_military_strength + limit = { + is_vassal_of = scope:host + NOR = { + is_at_war_with = scope:host + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal + } + } + } + #Random vassal fallbacks + if = { + limit = { + NOT = { + exists = scope:vassal + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + is_vassal_of = scope:host + NOR = { + is_at_war_with = scope:host + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal + } + } + } + #Oops no vassals... grab capital county barons + if = { + limit = { + NOT = { + exists = scope:vassal + } + } + scope:host.capital_county = { + random_county_province = { + limit = { + barony = { + exists = holder + NOT = { + holder = scope:host + } + holder = { + is_vassal_of = scope:host + basic_is_available_ai = yes + } + } + OR = { + has_holding_type = castle_holding + has_holding_type = tribal_holding + has_holding_type = nomad_holding + } + } + barony.holder = { + save_scope_as = vassal + } + } + } + } + #Grab any baron??? + if = { + limit = { + NOT = { + exists = scope:vassal + } + } + scope:host = { + random_held_title = { + limit = { + tier = tier_county + any_county_province = { + barony = { + exists = holder + NOT = { + holder = scope:host + } + holder = { + is_vassal_of = scope:host + basic_is_available_ai = yes + } + } + OR = { + has_holding_type = castle_holding + has_holding_type = tribal_holding + has_holding_type = nomad_holding + } + } + } + random_county_province = { + limit = { + barony = { + exists = holder + NOT = { + holder = scope:host + } + holder = { + is_vassal_of = scope:host + basic_is_available_ai = yes + } + } + OR = { + has_holding_type = castle_holding + has_holding_type = tribal_holding + has_holding_type = nomad_holding + } + } + barony.holder = { + save_scope_as = vassal + } + } + } + } + } + #Grab non-attending vassal + if = { + limit = { + NOT = { + exists = scope:vassal + } + } + scope:host = { + random_vassal = { + limit = { + basic_is_available_ai = yes + NOR = { + is_at_war_with = scope:host + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + this = root + } + age > 5 + } + save_scope_as = vassal + } + } + } + #Just going to go with a courtier "vassal", out of options... + if = { + limit = { + NOT = { + exists = scope:vassal + } + } + scope:host = { + random_knight = { + limit = { + basic_is_available_ai = yes + NOT = { + is_consort_of = scope:host + } + } + save_scope_as = vassal + } + } + } + #Save a priest to use in event + #Save holy men + if = { + limit = { + coronation_living_officiator_trigger = yes + } + scope:activity.var:officiator = { + save_scope_as = priest + } + } + if = { + limit = { + NOT = { + exists = scope:priest + } + cp:councillor_court_chaplain ?= { + is_alive = yes + is_imprisoned = no + is_incapable = no + has_contagious_deadly_disease_trigger = no + } + } + #SAVE COURT CHAPLAIN + cp:councillor_court_chaplain = { + save_scope_as = priest + } + } + if = { + limit = { + NOT = { + exists = scope:priest + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + government_has_flag = government_is_theocracy + } + save_scope_as = priest + } + } + } + if = { + limit = { + NOT = { + exists = scope:priest + } + } + create_character = { + template = priest_character_template + location = scope:host.location + culture = scope:host.location.culture + faith = scope:host.faith + save_scope_as = priest + } + scope:priest = { + add_character_flag = oather_1_destroy + } + } + #Save major supporters that might become rivals of detractor + if = { + limit = { + has_activity_intent = coronation_disrupt_loyalists + coronation_events_6123_crucial_vassal_trigger = yes + } + scope:activity = { + ordered_in_list = { + variable = major_supporter + order_by = max_military_strength + limit = { + coronation_events_6123_vengeful_supporter_trigger = yes + } + save_scope_as = major_supporter_1 + } + ordered_in_list = { + variable = major_supporter + order_by = max_military_strength + limit = { + exists = scope:major_supporter_1 + this != scope:major_supporter_1 + coronation_events_6123_vengeful_supporter_trigger = yes + } + save_scope_as = major_supporter_2 + } + ordered_in_list = { + variable = major_supporter + order_by = max_military_strength + limit = { + exists = scope:major_supporter_1 + exists = scope:major_supporter_2 + this != scope:major_supporter_1 + this != scope:major_supporter_2 + coronation_events_6123_vengeful_supporter_trigger = yes + } + save_scope_as = major_supporter_3 + } + } + } + } + #WOO! I AM SO INTO YOU, MY LIEGE + option = { + trigger = { + is_vassal_of = scope:host + highest_held_title_tier > tier_barony + } + name = coronation_events.6123.a + flavor = coronation_events.6123.a_flavor + + if = { + limit = { + is_ai = no + } + scope:host = { + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6123_vassal_feted_you + left_icon = root + #Increase magnificence (players only) + #Host gains legitimacy and prestige (players only) + if = { + limit = { + root = { + coronation_events_6123_crucial_vassal_trigger = yes + } + } + custom_tooltip = coronation_tt_positive_major + scope:activity = { activity_special_type_progression_major = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_major + CHAR = root + } + if = { + limit = { + root = { has_activity_intent = coronation_offer_support } + } + add_legitimacy = minor_legitimacy_gain + } + + if = { + limit = { + government_allows = administrative + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + add_stress = minor_stress_impact_loss + } + else_if = { + limit = { + root = { + coronation_events_6123_significant_vassal_trigger = yes + } + } + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + if = { + limit = { + root = { has_activity_intent = coronation_offer_support } + } + add_legitimacy = miniscule_legitimacy_gain + } + if = { + limit = { + government_allows = administrative + } + change_influence = miniscule_influence_gain + } + else = { + add_prestige = miniscule_prestige_gain + } + add_stress = miniscule_stress_impact_loss + } + else = { + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + if = { + limit = { + root = { has_activity_intent = coronation_offer_support } + } + add_legitimacy = { + value = miniscule_legitimacy_gain + multiply = 0.5 + } + } + if = { + limit = { + government_allows = administrative + } + change_influence = { + value = miniscule_influence_gain + multiply = 0.5 + } + } + else = { + add_prestige = { + value = miniscule_prestige_gain + multiply = 0.5 + } + } + } + } + } + } + #Major AI can fuck with magnificence a bit + else = { + if = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + } + if = { + limit = { + has_activity_intent = coronation_offer_support + } + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + } + else = { + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + } + } + } + scope:activity = { + add_activity_log_entry = { + key = coronation_supporter_pledge_leader_log + character = root + score = 50 + show_in_conclusion = yes + #Host and supporters lose opinion + #Detractors gain opinion + #Host and supporters gain opinion + #Detractors lose opinion + root = { + if = { + limit = { + has_activity_intent = coronation_offer_support + } + #Bigger opinion gain if you're sticking your neck out for supporters + if = { + limit = { + scope:activity = { + number_of_supporters_activity <= number_of_detractors_activity + } + } + scope:host = { + add_opinion = { + target = root + modifier = support_opinion + opinion = 35 + } + } + scope:activity = { + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 35 + } + } + } + } + else = { + scope:host = { + add_opinion = { + target = root + modifier = support_opinion + opinion = 25 + } + } + scope:activity = { + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 25 + } + } + } + } + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = rival_supporter_opinion + opinion = -35 + } + } + } + } + else = { + #Bigger opinion gain if you're sticking your neck out for supporters + if = { + limit = { + scope:activity = { + number_of_supporters_activity <= number_of_detractors_activity + } + } + scope:host = { + add_opinion = { + target = root + modifier = support_opinion + opinion = 25 + } + } + scope:activity = { + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 25 + } + } + } + } + else = { + scope:host = { + add_opinion = { + target = root + modifier = support_opinion + opinion = 15 + } + } + scope:activity = { + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 15 + } + } + } + } + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = rival_supporter_opinion + opinion = -30 + } + } + } + } + } + } + } + if = { + limit = { + has_activity_intent = coronation_offer_support + } + custom_tooltip = improved_because_intent_tt + } + + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:host + multiplier = 1 + } + modifier = { + add = 50 + has_trait = loyal + } + modifier = { + add = 100 + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:host } + } + modifier = { + add = 50 + has_dread_level_towards = { + target = scope:host + level >= 2 + } + } + modifier = { + add = -50 + is_powerful_vassal = no + } + modifier = { + add = 100 + has_activity_intent = coronation_offer_support + } + modifier = { + add = 100 + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + } + modifier = { + factor = 0 + OR = { + has_activity_intent = coronation_disrupt_loyalists + NOR = { + is_in_guest_subset = { name = supporter } + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + } + } + } + #I am going to really make this suck for my liege + option = { + trigger = { + is_vassal_of = scope:host + highest_held_title_tier > tier_barony + } + name = coronation_events.6123.b + flavor = coronation_events.6123.b_flavor + + if = { + limit = { + is_ai = no + } + scope:host = { + #message just for multiplayer coronations + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6123_vassal_scorned_you + left_icon = root + #decrease magnificence (players only) + #Host loses legitimacy and prestige (players only) + if = { + limit = { + root = { + coronation_events_6123_crucial_vassal_trigger = yes + } + } + custom_tooltip = coronation_tt_negative_major + scope:activity = { activity_special_type_progression_negative_major = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative_major + CHAR = root + } + if = { + limit = { + root = { has_activity_intent = coronation_disrupt_loyalists } + } + add_legitimacy = minor_legitimacy_loss + #Root gets some currency in exchange for rivalries + if = { + limit = { + exists = scope:major_supporter_1 + root = { + government_allows = administrative + } + } + change_influence = major_influence_gain + } + else_if = { + limit = { + exists = scope:major_supporter_1 + } + root = { + add_prestige = major_prestige_gain + } + } + } + + if = { + limit = { + government_allows = administrative + } + change_influence = minor_influence_loss + } + else = { + add_prestige = minor_prestige_loss + } + add_stress = minor_stress_impact_gain + } + else_if = { + limit = { + root = { + coronation_events_6123_significant_vassal_trigger = yes + } + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + if = { + limit = { + root = { has_activity_intent = coronation_disrupt_loyalists } + } + add_legitimacy = miniscule_legitimacy_loss + } + if = { + limit = { + government_allows = administrative + } + change_influence = miniscule_influence_loss + } + else = { + add_prestige = miniscule_prestige_loss + } + add_stress = miniscule_stress_impact_gain + } + else = { + custom_tooltip = coronation_tt_negative_tiny + scope:activity = { activity_special_type_progression_negative_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative_tiny + CHAR = root + } + if = { + limit = { + root = { has_activity_intent = coronation_disrupt_loyalists } + } + add_legitimacy = { + value = miniscule_legitimacy_loss + multiply = 0.5 + } + } + if = { + limit = { + government_allows = administrative + } + change_influence = { + value = miniscule_influence_loss + multiply = 0.5 + } + } + else = { + add_prestige = { + value = miniscule_prestige_loss + multiply = 0.5 + } + } + } + } + } + } + #Major AI can fuck with magnificence a bit + else = { + if = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + if = { + limit = { + has_activity_intent = coronation_disrupt_loyalists + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + else = { + custom_tooltip = coronation_tt_negative_tiny + scope:activity = { activity_special_type_progression_negative_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative_tiny + CHAR = root + } + } + } + } + scope:activity = { + add_activity_log_entry = { + key = coronation_detractor_pledge_insult_log + character = root + score = 50 + show_in_conclusion = no + #Host and supporters lose opinion + #Detractors gain opinion + root = { + if = { + limit = { + has_activity_intent = coronation_disrupt_loyalists + } + if = { + limit = { + coronation_events_6123_crucial_vassal_trigger = yes + } + if = { + limit = { + NOT = { + has_relation_nemesis = scope:host + } + #Host is AI or both chars are players + OR = { + scope:host = { + is_ai = yes + } + AND = { + is_ai = no + scope:host = { + is_ai = no + } + } + } + } + progress_towards_rival_effect = { + REASON = rival_coronation_pledge_scandal + CHARACTER = scope:host + OPINION = 0 + } + } + if = { + limit = { + exists = scope:major_supporter_1 + } + progress_towards_rival_effect = { + REASON = rival_coronation_pledge_scandal + CHARACTER = scope:major_supporter_1 + OPINION = 0 + } + } + if = { + limit = { + exists = scope:major_supporter_2 + } + progress_towards_rival_effect = { + REASON = rival_coronation_pledge_scandal + CHARACTER = scope:major_supporter_2 + OPINION = 0 + } + } + if = { + limit = { + exists = scope:major_supporter_3 + } + progress_towards_rival_effect = { + REASON = rival_coronation_pledge_scandal + CHARACTER = scope:major_supporter_3 + OPINION = 0 + } + } + } + scope:host = { + add_opinion = { + target = root + modifier = contempt_opinion + opinion = -30 + } + } + scope:activity = { + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = rival_detractor_opinion + opinion = -30 + } + } + } + #Bigger opinion gain if you are sticking your neck out for detractors + if = { + limit = { + scope:activity = { + number_of_detractors_activity <= number_of_supporters_activity + } + } + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 45 + } + } + } + } + else = { + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 35 + } + } + } + } + } + else = { + scope:host = { + add_opinion = { + target = root + modifier = contempt_opinion + opinion = -25 + } + } + scope:activity = { + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = rival_detractor_opinion + opinion = -25 + } + } + } + #Bigger opinion gain if you are sticking your neck out for detractors + if = { + limit = { + scope:activity = { + number_of_detractors_activity <= number_of_supporters_activity + } + } + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 35 + } + } + } + } + else = { + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 20 + } + } + } + } + } + } + } + } + if = { + limit = { + has_activity_intent = coronation_disrupt_loyalists + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + is_ai = yes + } + coronation_move_towards_detractor_effect = { CHARACTER = root } + } + + stress_impact = { + humble = medium_stress_impact_gain + craven = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + shy = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:host + multiplier = -1 + } + modifier = { + add = 50 + has_trait = disloyal + } + + modifier = { + add = 100 + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + + modifier = { + add = 50 + any_claim = { + holder ?= scope:host + } + } + modifier = { + add = 100 + is_a_faction_member = yes + } + modifier = { + add = 100 + has_activity_intent = coronation_disrupt_loyalists + } + modifier = { + add = -50 + is_powerful_vassal = no + } + modifier = { + add = 100 + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = craven + has_trait = forgiving + has_dread_level_towards = { + target = scope:host + level >= 1 + } + has_activity_intent = coronation_offer_support + NOR = { + is_in_guest_subset = { name = detractor } + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + } + } + } + + #Whatever, the ceremony happens + option = { + #Triggered names based on attitude towards host + name = { + text = { + first_valid = { + #resentful vassal + triggered_desc = { + trigger = { + is_vassal_of = scope:host + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = disloyal + has_trait = arrogant + has_trait = ambitious + is_a_faction_member = yes + } + NOR = { + has_trait = shy + has_trait = humble + has_trait = content + has_trait = loyal + has_activity_intent = coronation_offer_support + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6123.c_vassal_resents + } + #happy vassal + triggered_desc = { + trigger = { + is_vassal_of = scope:host + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = loyal + has_trait = humble + has_trait = compassionate + has_trait = just + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = sadistic + has_trait = callous + has_activity_intent = coronation_disrupt_loyalists + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6123.c_vassal_pleased + } + #Neutral vassal + triggered_desc = { + trigger = { + is_vassal_of = scope:host + } + desc = coronation_events.6123.c_vassal_neutral + } + #Like that vassals disrespect king + triggered_desc = { + trigger = { + scope:host = { + coronation_vassals_approval_value < -1 + } + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = disloyal + has_trait = arbitrary + has_trait = fickle + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + NOR = { + has_activity_intent = coronation_offer_support + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = just + } + } + desc = coronation_events.6123.c_likes_disrespect + } + #Angered by disrespectful vassals + triggered_desc = { + trigger = { + scope:host = { + coronation_vassals_approval_value < -1 + } + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = loyal + has_trait = just + has_trait = humble + has_trait = content + has_trait = trusting + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + } + NOR = { + has_activity_intent = coronation_disrupt_loyalists + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6123.c_dislikes_disrespect + } + #Angered by loyal vassals + triggered_desc = { + trigger = { + scope:host = { + coronation_vassals_approval_value >= 1 + } + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = disloyal + has_trait = arbitrary + has_trait = fickle + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + NOR = { + has_activity_intent = coronation_offer_support + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = just + } + } + desc = coronation_events.6123.c_dislikes_loyalty + } + #Like loyal vassals + triggered_desc = { + trigger = { + scope:host = { + coronation_vassals_approval_value >= 1 + } + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = loyal + has_trait = just + has_trait = humble + has_trait = content + has_trait = trusting + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + } + NOR = { + has_activity_intent = coronation_disrupt_loyalists + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6123.c_likes_loyalty + } + #Dislikes king + triggered_desc = { + trigger = { + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + NOR = { + has_activity_intent = coronation_offer_support + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6123.c_dislikes_host + } + #Neutral + desc = coronation_events.6123.c + } + } + } + #Stress when you are angry vassal + if = { + limit = { + is_vassal_of = scope:host + has_relation_rival = scope:host + } + stress_impact = { + base = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + } + #Stress when you are happy vassal + else_if = { + limit = { + is_vassal_of = scope:host + } + stress_impact = { + humble = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + } + } + #Generic vassal stress + else = { + limit = { + is_vassal_of = scope:host + } + stress_impact = { + arrogant = miniscule_stress_impact_gain + } + } + ai_chance = { + base = 100 + } + } + + after = { + # For MP + coronation_ready_effect = yes + if = { + limit = { + scope:priest = { + has_character_flag = oather_1_destroy + } + } + scope:priest = { + silent_disappearance_effect = yes + } + } + #Anointment event + trigger_event = { + id = coronation_events.6130 + days = 3 + } + } +} + +scripted_trigger coronation_events_6130_dharmic_trigger = { + faith.religion = { + AND = { + is_in_family = rf_eastern + NOT = { + this = religion:zoroastrianism_religion + } + } + } + root.involved_activity.activity_location = { + OR = { + geographical_region = world_india + geographical_region = world_tibet + geographical_region = world_burma + } + } +} +#Anointment, perhaps by the HoF in an actual anointment +coronation_events.6130 = { + type = activity_event + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + desc = coronation_events.6130.t_anointment + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + desc = coronation_events.6130.t_dharmic + } + desc = coronation_events.6130.t + } + } + desc = { + #Intro line + desc = coronation_events.6130.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + this = scope:host + scope:host.faith.religion = { + this = religion:christianity_religion + } + } + desc = coronation_events.6130.papal_intro_host + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + scope:host.faith.religion = { + this = religion:christianity_religion + } + } + desc = coronation_events.6130.papal_intro_guest + } + triggered_desc = { + trigger = { + this = scope:host + scope:host.faith.religion = { + OR = { + this = religion:christianity_religion + this = religion:judaism_religion + } + } + } + desc = coronation_events.6130.abrahamic_intro_host + } + triggered_desc = { + trigger = { + this = scope:host + scope:host.faith.religion = { + OR = { + this = religion:christianity_religion + this = religion:judaism_religion + } + } + } + desc = coronation_events.6130.abrahamic_intro_guest + } + triggered_desc = { + trigger = { + this = scope:host + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + desc = coronation_events.6130.dharmic_intro_host + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + desc = coronation_events.6130.dharmic_intro_guest + } + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.6130.generic_intro_host + } + desc = coronation_events.6130.generic_intro_guest + } + #Little description of priest, whether hof or just some priest + #Dharmic also work for generic here + first_valid = { + triggered_desc = { + trigger = { + scope:anointer = { + this = faith.religious_head + opinion = { + target = scope:host + value < 0 + } + } + } + desc = coronation_events.6130.faith_head_disapproves + } + triggered_desc = { + trigger = { + scope:anointer = { + this = faith.religious_head + opinion = { + target = scope:host + value >= 50 + } + is_male = yes + } + } + desc = coronation_events.6130.faith_head_likes + } + triggered_desc = { + trigger = { + scope:anointer = { + this = faith.religious_head + } + } + desc = coronation_events.6130.faith_head + } + triggered_desc = { + trigger = { + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion scope:host.faith.religion = religion:catholic_religion scope:host.faith.religion = religion:protestant_religion + } + scope:anointer = { + NOT = { + this = scope:host.cp:councillor_court_chaplain + } + is_landed = yes + } + } + desc = coronation_events.6130.christian_non_hof_non_cc + } + triggered_desc = { + trigger = { + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion scope:host.faith.religion = religion:catholic_religion scope:host.faith.religion = religion:protestant_religion + } + } + desc = coronation_events.6130.christian_non_hof + } + desc = coronation_events.6130.anointer_fallback + } + #Anointing with oil or water from sacred rivers? + #Abrahamic also work for generic here + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + this = scope:host + OR = { + has_trait = cynical + has_trait = brave + has_trait = callous + has_trait = sadistic + has_trait = calm + } + NOR = { + has_trait = zealous + has_trait = craven + has_trait = shy + } + } + desc = coronation_events.6130.anointing_abrahamic_host_disrespectful + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + this = scope:host + } + desc = coronation_events.6130.anointing_abrahamic_host + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + } + desc = coronation_events.6130.anointing_abrahamic_guest + } + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.6130.anointing_dharmic_host + } + desc = coronation_events.6130.anointing_dharmic_guest + } + #Credit it to church or god based on zeal + #Abrahamic also work for generic here + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + this = scope:host + ai_zeal >= medium_negative_ai_value + } + desc = coronation_events.6130.ending_abrahamic_host_zealous + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + this = scope:host + } + desc = coronation_events.6130.ending_abrahamic_host_cynical + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + ai_zeal >= medium_negative_ai_value + } + desc = coronation_events.6130.ending_abrahamic_guest_zealous + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + } + desc = coronation_events.6130.ending_abrahamic_guest_cynical + } + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.6130.ending_dharmic_host + } + desc = coronation_events.6130.ending_dharmic_guest + } + } + + center_portrait = { + character = scope:host + animation = throne_room_bow_3 + camera = camera_event_center_pointing_right + } + right_portrait = { + character = scope:anointer + triggered_animation = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + animation = toast_goblet + } + animation = wedding_priest + camera = camera_event_very_right + } + + override_background = { + trigger = { + scope:host.capital_county = title:c_byzantion + } + reference = ep3_hagia_sophia + } + override_background = { + trigger = { + NOT = { + scope:host.capital_county = title:c_byzantion + } + } + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + reference = legend_glow + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + cooldown = { days = 20 } + + theme = coronation_activity + + trigger = { + involved_activity ?= { + activity_host = { + NAND = { + exists = faith.religious_head + this = faith.religious_head + } + } + OR = { + activity_host.faith.religion = religion:christianity_religion + activity_host.faith.religion = religion:judaism_religion + activity_host = { + coronation_events_6130_dharmic_trigger = yes + } + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + on_trigger_fail = { + if = { + limit = { + coronation_being_crowned_trigger = yes + } + #Skip to crowning + trigger_event = { + id = coronation_events.6100 + days = 3 + } + } + else_if = { + limit = { + coronation_self_crowning_trigger = yes + } + #Skip to crowning self + trigger_event = { + id = coronation_events.6101 + days = 3 + } + } + else = { + #Skip to enthroning + trigger_event = { + id = coronation_events.6102 + days = 3 + } + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + activity_host = { save_scope_as = host } + activity_location = { save_scope_as = location } + } + coronation_save_anointer_effect = yes + scope:host = { + save_scope_as = bg_override_char + } + #Resource adjustments only for host + if = { + limit = { + this = scope:host + } + #Reward, adjusted by fervor + scope:host = { + if = { + limit = { + faith = { + fervor >= 90 + } + } + every_vassal = { + custom = custom.every_same_faith_vassal + limit = { + faith = scope:host.faith + } + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 20 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor >= 80 + } + } + every_vassal = { + custom = custom.every_same_faith_vassal + limit = { + faith = scope:host.faith + } + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 15 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor >= 70 + } + } + every_vassal = { + custom = custom.every_same_faith_vassal + limit = { + faith = scope:host.faith + } + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 10 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor >= 60 + } + } + every_vassal = { + custom = custom.every_same_faith_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 5 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor < 30 + } + } + every_vassal = { + custom = custom.every_different_faith_vassal + limit = { + NOT = { faith = scope:host.faith } + } + add_opinion = { + target = scope:host + modifier = heathen_anointment_opinion + opinion = -5 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor < 20 + } + } + every_vassal = { + custom = custom.every_different_faith_vassal + limit = { + NOT = { faith = scope:host.faith } + } + add_opinion = { + target = scope:host + modifier = heathen_anointment_opinion + opinion = -10 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor < 10 + } + } + every_vassal = { + custom = custom.every_different_faith_vassal + limit = { + NOT = { faith = scope:host.faith } + } + add_opinion = { + target = scope:host + modifier = heathen_anointment_opinion + opinion = -15 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + } + #Anointment rewards if root is host + if = { + limit = { + this = root + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + #Scale rewards based on fervor + if = { + limit = { + faith = { + fervor >= 100 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 30 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 2 + } + add_piety = { + value = major_piety_gain + multiply = 2 + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + else_if = { + limit = { + faith = { + fervor >= 80 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 28 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 1.8 + } + add_piety = { + value = major_piety_gain + multiply = 1.8 + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + else_if = { + limit = { + faith = { + fervor >= 60 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 26 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 1.6 + } + add_piety = { + value = major_piety_gain + multiply = 1.6 + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + else_if = { + limit = { + faith = { + fervor >= 40 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 24 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 1.4 + } + add_piety = { + value = major_piety_gain + multiply = 1.4 + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + else_if = { + limit = { + faith = { + fervor >= 20 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 22 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 1.2 + } + add_piety = { + value = major_piety_gain + multiply = 1.2 + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + else = { + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 20 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 1 + } + add_piety = { + value = major_piety_gain + multiply = 1 + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + } + } + } + } + #I am sooo ready to fight for the faith + option = { + trigger = { + this = scope:host + NOT = { + has_trait = faith_warrior + } + faith = { + fervor >= 75 + } + trigger_if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + has_focus_martial = yes + } + trigger_else = { + has_focus_martial = yes + OR = { + has_trait = education_martial_3 + has_trait = education_martial_4 + has_trait = education_martial_5 + } + } + } + name = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + } + text = coronation_events.6130.a + } + name = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + text = coronation_events.6130.a_dharmic + } + flavor = coronation_events.6130.a.flavor + reason = lifestyle_focus + + #Kingdom tier holy war gives crusader trait + custom_tooltip = crusader_from_k_holy_war_tt + set_variable = { + name = k_holy_war_crusader + } + stress_impact = { + zealous = major_stress_impact_loss + wrathful = miniscule_stress_impact_loss + vengeful = minor_stress_impact_loss + sadistic = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + cynical = medium_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 100 + OR = { + has_trait = zealous + has_trait = wrathful + has_trait = vengeful + has_trait = sadistic + has_trait = brave + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = cynical + has_trait = craven + } + } + } + } + #It is now my duty to CONVERT + option = { + trigger = { + this = scope:host + trigger_if = { + limit = { + NOR = { + has_trait = zealous + has_trait = diligent + has_trait = just + has_trait = ambitious + has_trait = arrogant + has_trait = impatient + } + } + learning >= decent_skill_rating + } + trigger_else = { + OR = { + has_trait = zealous + has_trait = diligent + has_trait = just + has_trait = ambitious + has_trait = arrogant + has_trait = impatient + } + } + } + name = coronation_events.6130.b + + + #conversion interactions acceptance bonus + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + custom_tooltip = conversion_acceptance_bonus_tt + add_character_flag = conversion_acceptance_bonus + } + else = { + custom_tooltip = conversion_acceptance_bonus_low_tt + add_character_flag = conversion_acceptance_bonus_low + } + + stress_impact = { + zealous = major_stress_impact_loss + content = minor_stress_impact_gain + cynical = major_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 150 + modifier = { + add = 100 + has_trait = zealous + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = cynical + has_trait = content + } + } + } + } + #Express gratitude to the priest + option = { + trigger = { + this = scope:host + OR = { + has_trait = gregarious + has_trait = zealous + has_trait = compassionate + has_trait = humble + has_trait = generous + has_trait = trusting + } + #Not a temp character + NOT = { + scope:anointer = { + has_character_flag = anointer_destroy_me + } + } + } + name = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + } + text = coronation_events.6130.c + } + name = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + text = coronation_events.6130.c_dharmic + } + flavor = coronation_events.6130.c.flavor + scope:anointer = { + add_opinion = { + target = scope:host + modifier = pleased_opinion + opinion = 20 + } + hidden_effect = { + reverse_add_opinion = { + target = scope:host + modifier = respect_opinion + opinion = 25 + } + } + if = { + limit = { + involved_activity ?= scope:activity + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:anointer } + } + } + stress_impact = { + zealous = medium_stress_impact_loss + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + cynical = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + OR = { + has_trait = humble + has_trait = zealous + } + } + modifier = { + factor = 0 + OR = { + has_trait = fickle + has_trait = cynical + has_trait = arrogant + } + } + } + } + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + ai_zeal >= low_positive_ai_value + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + } + desc = coronation_events.6130.d.faithful_host + } + triggered_desc = { + trigger = { + this = scope:host + ai_zeal >= low_positive_ai_value + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + desc = coronation_events.6130.d.faithful_host_dharmic + } + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.6130.d.cynical_host + } + triggered_desc = { + trigger = { + ai_zeal >= low_positive_ai_value + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + opinion = { + target = scope:host + value > 0 + } + } + desc = coronation_events.6130.d.faithful_guest_dharmic + } + triggered_desc = { + trigger = { + ai_zeal >= low_positive_ai_value + opinion = { + target = scope:host + value > 0 + } + } + desc = coronation_events.6130.d.faithful_guest + } + desc = coronation_events.6130.d.cynical_guest + } + } + } + #Some piety for viewers + if = { + limit = { + faith = scope:host.faith + NOT = { this = scope:host } + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + add_piety = miniscule_piety_gain + } + #Faith gains fervor if this is anointment + scope:host = { + if = { + limit = { + this = root + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + add_piety = medium_piety_gain + faith = { + change_fervor = { + value = 4 + desc = fervor_gain_anointment + } + } + add_character_modifier = { + modifier = coronation_anointed_imperial_modifier + years = 10 + } + } + else_if = { + limit = { + this = root + } + add_piety = minor_piety_gain + add_character_modifier = { + modifier = coronation_anointed_modifier + years = 10 + } + } + #To show audience + else_if = { + limit = { + NOT = { this = root } + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + show_as_tooltip = { + add_piety = medium_piety_gain + add_character_modifier = { + modifier = coronation_anointed_modifier + years = 10 + } + faith = { + change_fervor = { + value = 4 + desc = fervor_gain_anointment + } + } + } + } + else_if = { + limit = { + NOT = { this = root } + } + show_as_tooltip = { + add_piety = medium_piety_gain + add_character_modifier = { + modifier = coronation_anointed_modifier + years = 10 + } + } + } + } + + stress_impact = { + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + after = { + # For MP + coronation_ready_effect = yes + + if = { + limit = { + coronation_being_crowned_trigger = yes + } + #crowning + trigger_event = { + id = coronation_events.6100 + days = 3 + } + } + else_if = { + limit = { + coronation_self_crowning_trigger = yes + } + #self-crowning + trigger_event = { + id = coronation_events.6101 + days = 3 + } + } + else = { + #enthroning + trigger_event = { + id = coronation_events.6102 + days = 3 + } + } + } +} + +scripted_effect coronation_events_6140_spouse_effects = { + add_prestige = coronation_spouse_prestige_value + if = { + limit = { + government_allows = administrative + top_liege.primary_title = scope:host.top_liege.primary_title + } + change_influence = coronation_spouse_influence_value + } + if = { + limit = { + NOT = { + this = root + } + is_ai = yes + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + has_trait = diligent + has_trait = impatient + has_trait = gregarious + } + NOR = { + has_trait = humble + has_trait = content + has_trait = shy + } + } + add_stress = coronation_spouse_stress_value + } + if = { + limit = { + OR = { + scope:activity.var:activity_special_type_progression >= 25 + AND = { + scope:activity.var:activity_special_type_progression < 25 + scope:host.highest_held_title_tier >= tier_empire + } + } + } + scope:activity = { + every_attending_character = { + custom = custom.every_attending_character + limit = { + NOT = { + this = scope:spouse + } + } + add_opinion = { + target = scope:spouse + modifier = crowned_consort_opinion + opinion = coronation_spouse_opinion_value + } + } + } + } + custom_tooltip = coronation_magnificence_spouse_effects_tt +} + +#Spouse's crowning/enthronement event +coronation_events.6140 = { + type = activity_event + title = coronation_events.6140.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:spouse + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + any_consort = { + NOT = { + this = scope:spouse + } + } + } + } + desc = coronation_events.6140_desc_polygamous_spouse + } + desc = coronation_events.6140_desc_intro_spouse + } + desc = coronation_events.6140_desc_spouse + first_valid = { + triggered_desc = { + trigger = { + scope:spouse = { + NOT = { + knows_language_of_culture = scope:host.culture + } + } + scope:host = { + has_royal_court = no + } + } + desc = coronation_events.6140_desc_foreign_wife_no_court_spouse + } + triggered_desc = { + trigger = { + scope:host = { + has_royal_court = yes + } + scope:spouse = { + NOR = { + knows_court_language_of = scope:host + culture = scope:host.culture + } + } + } + desc = coronation_events.6140_desc_foreign_wife_spouse + } + triggered_desc = { + trigger = { + scope:spouse = { + OR = { + is_lowborn = yes + AND = { + dynasty ?= { + dynasty_prestige_level <= 1 + } + NOR = { + any_parent = { + highest_held_title_tier >= tier_kingdom + } + any_sibling = { + highest_held_title_tier >= tier_kingdom + } + } + learning < high_skill_rating + } + } + } + } + desc = coronation_events.6140_desc_lowly_wife_spouse + } + triggered_desc = { + trigger = { + scope:spouse = { + dynasty ?= { + dynasty_prestige_level >= 3 + } + OR = { + AND = { + dynasty ?= { + dynasty_prestige_level >= 7 + } + house ?= { + any_house_member = { + highest_held_title_tier >= tier_kingdom + } + } + } + any_parent = { + highest_held_title_tier >= tier_kingdom + } + any_sibling = { + highest_held_title_tier >= tier_kingdom + } + } + learning >= average_skill_rating + } + } + desc = coronation_events.6140_desc_regal_wife_spouse + } + desc = coronation_events.6140_desc_mid_wife_spouse + } + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_regalia_trigger = no + } + } + desc = coronation_events.6140_desc_crown_spouse + } + desc = coronation_events.6140_desc_neutral_spouse + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + any_consort = { + NOT = { + this = scope:spouse + } + } + } + } + desc = coronation_events.6140_desc_polygamous + } + desc = coronation_events.6140_desc + } + first_valid = { + triggered_desc = { + trigger = { + NOR = { + this = scope:host + this = scope:spouse + } + } + desc = coronation_events.6140_desc_guest + } + desc = coronation_events.6140_desc_host + } + first_valid = { + triggered_desc = { + trigger = { + scope:spouse = { + NOT = { + knows_language_of_culture = scope:host.culture + } + } + scope:host = { + has_royal_court = no + } + } + desc = coronation_events.6140_desc_foreign_wife_no_court + } + triggered_desc = { + trigger = { + scope:host = { + has_royal_court = yes + } + scope:spouse = { + NOR = { + knows_court_language_of = scope:host + culture = scope:host.culture + } + } + } + desc = coronation_events.6140_desc_foreign_wife + } + triggered_desc = { + trigger = { + scope:spouse = { + OR = { + is_lowborn = yes + AND = { + dynasty ?= { + dynasty_prestige_level <= 1 + } + NOR = { + any_parent = { + highest_held_title_tier >= tier_kingdom + } + any_sibling = { + highest_held_title_tier >= tier_kingdom + } + } + learning < high_skill_rating + } + } + } + } + desc = coronation_events.6140_desc_lowly_wife + } + triggered_desc = { + trigger = { + scope:spouse = { + dynasty ?= { + dynasty_prestige_level >= 3 + } + OR = { + AND = { + dynasty ?= { + dynasty_prestige_level >= 7 + } + house ?= { + any_house_member = { + highest_held_title_tier >= tier_kingdom + } + } + } + any_parent = { + highest_held_title_tier >= tier_kingdom + } + any_sibling = { + highest_held_title_tier >= tier_kingdom + } + } + learning >= average_skill_rating + } + } + desc = coronation_events.6140_desc_regal_wife + } + desc = coronation_events.6140_desc_mid_wife + } + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_regalia_trigger = no + } + } + desc = coronation_events.6140_desc_crown + } + desc = coronation_events.6140_desc_neutral + } + } + } + } + left_portrait = { + character = scope:host + triggered_animation = { + trigger = { + scope:host = { + OR = { + has_relation_lover = scope:spouse + has_relation_crush = scope:spouse + has_relation_soulmate = scope:spouse + } + } + } + animation = love + } + triggered_animation = { + trigger = { + scope:host = { + OR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + opinion = { + target = scope:spouse + value < -60 + } + } + } + } + animation = disapproval + } + triggered_animation = { + trigger = { + OR = { + scope:host.religion = religion:eastern_orthodox_religion + scope:host.religion = religion:catholic_religion + scope:host.religion = religion:protestant_religion + scope:spouse.religion = religion:eastern_orthodox_religion + scope:spouse.religion = religion:catholic_religion + scope:spouse.religion = religion:protestant_religion + } + } + animation = scepter + } + triggered_animation = { + trigger = { + scope:host = { + coronation_host_east_asian_trigger = yes + } + } + animation = emperor + } + triggered_animation = { + trigger = { + scope:host = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = marshal + } + animation = chaplain + camera = camera_event_left_to_the_left_pointing_in + } + center_portrait = { + character = scope:spouse + triggered_animation = { + trigger = { + scope:host = { + OR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + opinion = { + target = scope:spouse + value < -60 + } + } + } + scope:spouse = { + OR = { + ai_greed > medium_positive_ai_value + ai_honor < medium_negative_ai_value + ai_compassion < medium_negative_ai_value + } + } + } + animation = manic + } + triggered_animation = { + trigger = { + scope:spouse = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + ai_has_warlike_personality = yes + } + } + animation = wedding_objection_start + } + triggered_animation = { + trigger = { + OR = { + scope:host.religion = religion:eastern_orthodox_religion + scope:host.religion = religion:catholic_religion + scope:host.religion = religion:protestant_religion + scope:spouse.religion = religion:eastern_orthodox_religion + scope:spouse.religion = religion:catholic_religion + scope:spouse.religion = religion:protestant_religion + } + ai_zeal < medium_positive_ai_value + } + animation = acknowledging + } + animation = prayer + camera = camera_event_center + } + right_portrait = { + character = scope:anointer + triggered_animation = { + trigger = { + scope:anointer.faith = { + has_doctrine_parameter = unreformed + } + } + animation = throne_room_bow_2 + } + animation = chancellor + camera = camera_event_very_right + } + + override_background = { + trigger = { + NOT = { + scope:host.capital_county = title:c_byzantion + } + coronation_being_crowned_trigger = no + coronation_self_crowning_trigger = no + } + reference = throne_room + } + override_background = { + trigger = { + scope:host.capital_county = title:c_byzantion + OR = { + coronation_being_crowned_trigger = yes + coronation_self_crowning_trigger = yes + } + } + reference = ep3_hagia_sophia + } + override_background = { + trigger = { + NOT = { + scope:host.capital_county = title:c_byzantion + } + OR = { + coronation_being_crowned_trigger = yes + coronation_self_crowning_trigger = yes + } + } + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + reference = legend_glow + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + cooldown = { days = 20 } + + theme = coronation_activity + + trigger = { + exists = involved_activity.activity_host.primary_spouse + involved_activity = { + any_attending_character = { + this = involved_activity.activity_host.primary_spouse + NOR = { + has_contagious_deadly_disease_trigger = yes + has_trait = incapable + has_trait = wounded_3 + is_imprisoned = yes + } + } + } + } + on_trigger_fail = { + #Ceremony is over + if = { + limit = { + this = involved_activity.activity_host + } + # Oath Events + trigger_event = { + id = coronation_events.0100 + days = 2 + } + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + activity_host = { save_scope_as = host } + activity_location = { save_scope_as = location } + } + scope:host = { + save_scope_as = bg_override_char + primary_spouse = { + save_scope_as = spouse + } + } + #Save an anointer if you don't have one + if = { + limit = { + OR = { + NOT = { exists = scope:anointer } + scope:anointer = { + is_alive = no + } + scope:anointer = { + is_imprisoned = yes + } + } + } + scope:host = { coronation_save_anointer_effect = yes } + } + if = { + limit = { + OR = { + AND = { + this = scope:host + scope:spouse = { + is_ai = yes + } + } + AND = { + this = scope:spouse + is_ai = no + } + } + } + scope:spouse = { + coronation_events_6140_spouse_effects = yes + } + } + else = { + scope:spouse = { + show_as_tooltip = { coronation_events_6140_spouse_effects = yes } + } + } + scope:spouse = { + assign_quirk_effect = yes + } + assign_quirk_effect = yes + } + #Your spouse converts + option = { + trigger = { + this = scope:host + scope:spouse = { + NOT = { + faith = root.faith + } + is_ai = yes + } + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + var:activity_special_type_progression > 50 + } + } + name = coronation_events.6140.aa + flavor = coronation_events.6140.aa.flavor + + duel = { + skill = diplomacy + target = scope:spouse + #You convince her + 55 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + add = 20 + scope:spouse = { + opinion = { + target = scope:host + value >= 25 + } + } + } + modifier = { + add = 20 + scope:spouse = { + opinion = { + target = scope:host + value >= 50 + } + } + } + modifier = { + add = 25 + scope:spouse = { + opinion = { + target = scope:host + value >= 75 + } + } + } + modifier = { + add = 30 + scope:spouse = { + opinion = { + target = scope:host + value >= 90 + } + } + } + modifier = { + add = 30 + scope:activity.var:activity_special_type_progression >= 75 + } + modifier = { + add = 20 + scope:spouse = { + OR = { + has_trait = trusting + has_trait = fickle + } + } + } + + desc = coronation_events.6140.aa_success + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6140.aa_success + right_icon = scope:spouse + + scope:spouse = { + set_character_faith = scope:host.faith + } + } + } + #She is not convinced + 45 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = 20 + scope:spouse = { + opinion = { + target = scope:host + value <= -25 + } + } + } + modifier = { + add = 20 + scope:spouse = { + opinion = { + target = scope:host + value <= -50 + } + } + } + modifier = { + add = 30 + scope:spouse = { + opinion = { + target = scope:host + value <= -75 + } + } + } + modifier = { + add = 50 + scope:spouse = { + opinion = { + target = scope:host + value <= -90 + } + } + } + modifier = { + add = 100 + scope:spouse = { + OR = { + has_trait = zealous + has_trait = stubborn + } + } + } + modifier = { + add = 20 + scope:spouse.faith = { + faith_hostility_level = { + target = scope:host.faith + value >= faith_hostile_level + } + } + } + modifier = { + add = 20 + scope:spouse.faith = { + faith_hostility_level = { + target = scope:host.faith + value >= faith_evil_level + } + } + } + modifier = { + add = 50 + scope:spouse = { + highest_held_title_tier >= scope:host.highest_held_title_tier + } + } + modifier = { + add = 50 + scope:spouse = { + highest_held_title_tier >= tier_county + } + } + modifier = { + add = 50 + scope:spouse = { + highest_held_title_tier >= tier_county + NOT = { + is_vassal_of = scope:host + } + } + } + desc = coronation_events.6140.aa_fail + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6140.aa_fail + right_icon = scope:spouse + + scope:spouse = { + add_opinion = { + modifier = annoyed_opinion + target = scope:host + opinion = -15 + } + + } + } + } + } + custom_tooltip = anointment_available_because_magnificence_tt + stress_impact = { + zealous = major_stress_impact_loss + cynical = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 100 + scope:spouse = { + highest_held_title_tier < tier_county + } + } + modifier = { + add = 300 + has_trait = zealous + } + modifier = { + diplomacy > high_skill_rating + add = 100 + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + scope:spouse.highest_held_title_tier > root.highest_held_title_tier + diplomacy <= low_skill_rating + } + } + } + } + #I must get rid of this person... + option = { + trigger = { + this = scope:host + NOR = { + has_relation_soulmate = scope:spouse + has_relation_best_friend = scope:spouse + } + } + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse } + opinion = { + target = scope:spouse + value >= 90 + } + } + } + desc = coronation_events.6140.a_like + } + triggered_desc = { + trigger = { + OR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + opinion = { + target = scope:spouse + value < -60 + } + } + } + desc = coronation_events.6140.a_dislike + } + desc = coronation_events.6140.a + } + } + } + #Rivalry progress + if = { + limit = { + OR = { + scope:spouse = { + is_ai = yes + } + AND = { + is_ai = no + scope:spouse = { + is_ai = no + } + } + } + } + progress_towards_rival_effect = { + REASON = rival_despised_mutual_coronation + CHARACTER = scope:spouse + OPINION = 0 + } + } + #Bonus towards hostile schemes against spouse + custom_tooltip = coronation_spouse_hostile_scheme_bonus_tt + set_variable = { + name = spouse_hostile_scheme_bonus + value = scope:spouse + } + + hidden_effect = { + add_opinion = { + target = scope:spouse + modifier = hate_opinion + opinion = -40 + } + } + if = { + limit = { + OR = { + has_relation_friend = scope:spouse + has_relation_lover = scope:spouse + } + } + stress_impact = { + base = medium_stress_impact_gain + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + lustful = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + honest = minor_stress_impact_gain + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + } + } + else = { + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + lustful = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + honest = minor_stress_impact_gain + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + } + } + ai_chance = { + base = -10 + ai_value_modifier = { + ai_compassion = -0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:spouse + multiplier = -1 + } + modifier = { + add = 500 + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + } + modifier = { + add = -200 + scope:spouse = { + OR = { + house ?= { + any_house_member = { + is_allied_to = scope:host + } + } + any_close_family_member = { + is_allied_to = scope:host + } + } + + } + } + modifier = { + add = 10 + scope:spouse = { + is_lowborn = yes + } + } + modifier = { + add = 10 + scope:spouse = { + fertility <= low_fertility + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + has_trait = honest + has_trait = humble + has_trait = content + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse } + } + } + } + } + #Yay! MAI WIFE + option = { + trigger = { + this = scope:host + } + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_relation_lover = scope:spouse + has_relation_soulmate = scope:spouse + opinion = { + target = scope:spouse + value >= 90 + } + } + } + desc = coronation_events.6140.b_like + } + triggered_desc = { + trigger = { + OR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + opinion = { + target = scope:spouse + value < -60 + } + } + } + desc = coronation_events.6140.b_dislike + } + desc = coronation_events.6140.b + } + } + } + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:spouse + opinion = 15 + } + hidden_effect = { + add_opinion = { + modifier = grateful_opinion + target = scope:spouse + opinion = 5 + } + } + ai_chance = { + base = 100 + } + } + #I am the spouse + option = { + trigger = { + this = scope:spouse + } + name = coronation_events.6140.c + flavor = coronation_events.6140.c_flavor + if = { + limit = { + scope:activity.var:activity_special_type_progression >= 75 + scope:host.highest_held_title_tier >= tier_empire + is_ai = no + } + stress_impact = { + arrogant = massive_stress_impact_loss + ambitious = massive_stress_impact_loss + greedy = massive_stress_impact_loss + diligent = massive_stress_impact_loss + impatient = massive_stress_impact_loss + gregarious = massive_stress_impact_loss + humble = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + else_if = { + limit = { + OR = { + scope:activity.var:activity_special_type_progression >= 75 + AND = { + scope:activity.var:activity_special_type_progression >= 50 + scope:host.highest_held_title_tier >= tier_empire + } + } + is_ai = no + } + stress_impact = { + arrogant = major_stress_impact_loss + ambitious = major_stress_impact_loss + greedy = major_stress_impact_loss + diligent = major_stress_impact_loss + impatient = major_stress_impact_loss + gregarious = major_stress_impact_loss + humble = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + else_if = { + limit = { + OR = { + scope:activity.var:activity_special_type_progression >= 50 + AND = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.highest_held_title_tier >= tier_empire + } + } + is_ai = no + } + stress_impact = { + arrogant = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + greedy = medium_stress_impact_loss + diligent = medium_stress_impact_loss + impatient = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + humble = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + else_if = { + limit = { + is_ai = no + OR = { + scope:activity.var:activity_special_type_progression >= 25 + AND = { + scope:activity.var:activity_special_type_progression < 25 + scope:host.highest_held_title_tier >= tier_empire + } + } + } + stress_impact = { + arrogant = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + greedy = minor_stress_impact_loss + diligent = minor_stress_impact_loss + impatient = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + humble = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + else_if = { + limit = { + is_ai = no + } + stress_impact = { + arrogant = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + impatient = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + humble = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + } + #I am an observer + option = { + trigger = { + NOR = { + this = scope:spouse + this = scope:host + } + } + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + AND = { + exists = scope:spouse.house + house = scope:spouse.house + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse } + } + } + desc = coronation_events.6140.d_likes_spouse + } + triggered_desc = { + trigger = { + OR = { + scope:spouse = { + any_close_family_member = { + OR = { + is_at_war_with = root + has_relation_rival = root + AND = { + is_a_faction_member = yes + is_vassal_of = root + } + AND = { + root = { + is_a_faction_member = yes + liege ?= prev + } + } + } + } + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + } + } + desc = coronation_events.6140.d_dislikes_spouse + } + triggered_desc = { + trigger = { + OR = { + has_activity_intent = coronation_disrupt_loyalists + is_target_in_variable_list = { + name = major_detractor + target = prev + } + AND = { + is_a_faction_member = yes + is_vassal_of = scope:host + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6140.d_dislikes_host + } + triggered_desc = { + trigger = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_activity_intent = coronation_offer_support + is_allied_to = scope:host + } + } + desc = coronation_events.6140.d_likes_host + } + desc = coronation_events.6140.d + } + } + } + } + after = { + #Ceremony is over + if = { + limit = { + this = scope:host + } + # Oath Events + trigger_event = { + id = coronation_events.0100 + days = 2 + } + } + # For MP + coronation_ready_effect = yes + if = { + limit = { + scope:anointer = { + has_character_flag = anointer_destroy_me + } + } + scope:anointer = { + silent_disappearance_effect = yes + } + } + } +} + +scripted_trigger coronation_events_6150_neighbor_trigger = { + involved_activity ?= scope:activity + basic_is_available_ai = yes + NOT = { is_in_guest_subset = { name = detractor } } + highest_held_title_tier <= root.highest_held_title_tier + is_tributary = no + is_at_war = no + NOR = { + has_trait = conqueror + has_trait = greatest_of_khans + has_trait = ambitious + has_trait = arrogant + has_trait = paranoid + } + opinion = { + target = root + value > -20 + } + current_military_strength <= root.half_current_military_strength +} + +scripted_trigger coronation_events_6150_vassal_trigger = { + basic_is_available_ai = yes + is_vassal_of = root + NOT = { is_obedient_to = root } + NOR = { + scope:advisor ?= this + is_in_guest_subset = { name = detractor } + trigger_if = { + limit = { + is_powerful_vassal_of = root + } + is_a_faction_member = yes + } + is_at_war_with = root + } + opinion = { + target = root + value >= -25 + } +} + +#RANDOM EVENTS +#Your chancellor wants to do some major politics +coronation_events.6150 = { + type = activity_event + title = coronation_events.6150.t + desc = coronation_events.6150.desc + left_portrait = { + character = root + animation = personality_rational + camera = camera_event_very_left + } + center_portrait = { + character = scope:advisor + animation = throne_room_chancellor + camera = camera_event_center_pointing_very_left + } + right_portrait = { + character = scope:neighbor + triggered_animation = { + trigger = { + scope:neighbor = { + opinion = { + target = root + value <= 0 + } + } + } + animation = personality_content + } + animation = admiration + camera = camera_event_right_to_the_right_more_right + } + lower_center_portrait = scope:disobedient_vassal + lower_right_portrait = scope:confederate + theme = coronation_activity + cooldown = { months = 6 } + + trigger = { + is_landed = yes + + NOT = { + involved_activity = { + has_activity_option = { + category = ceremony_size + option = coronation_small_ceremony + } + } + } + any_councillor = { + involved_activity ?= scope:activity + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + NOT = { is_in_guest_subset = { name = detractor } } + diplomacy >= medium_skill_rating + } + any_neighboring_top_liege_realm_owner = { + coronation_events_6150_neighbor_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -0.5 + is_ai = yes + } + modifier = { + add = 2 + has_activity_intent = coronation_weaken_detractors + any_neighboring_top_liege_realm_owner = { + involved_activity ?= scope:activity + basic_is_available_ai = yes + OR = { + is_confederation_member = yes + suzerain ?= { + is_confederation_member = yes + NOT = { + this = root + } + } + } + } + } + modifier = { + add = 1 + has_activity_intent = coronation_embrace_supporters + any_neighboring_top_liege_realm_owner = { + coronation_events_6150_neighbor_trigger = yes + is_in_guest_subset = { name = supporter } + faith = { + faith_hostility_level = { + target = root.faith + value <= faith.faith_hostile_level + } + } + } + } + modifier = { + add = 1 + has_activity_intent = coronation_impress_attendees + scope:activity = { + any_attending_character = { + coronation_events_6150_vassal_trigger = yes + } + } + } + modifier = { + add = 1 + any_councillor = { + has_council_position = councillor_chancellor + involved_activity ?= scope:activity + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + is_in_guest_subset = { name = supporter } + diplomacy >= high_skill_rating + NOT = { + is_a_faction_member = yes + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + #Save host and location + scope:activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + ordered_councillor = { + order_by = diplomacy + #Get chancellor + limit = { + has_council_position = councillor_chancellor + involved_activity ?= scope:activity + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + NOT = { is_in_guest_subset = { name = detractor } } + diplomacy >= medium_skill_rating + NOT = { + is_a_faction_member = yes + } + } + #Get decently talented spouse + alternative_limit = { + has_council_position = councillor_spouse + diplomacy >= high_skill_rating + involved_activity ?= scope:activity + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + NOT = { is_in_guest_subset = { name = detractor } } + NOT = { + is_a_faction_member = yes + } + } + alternative_limit = { + involved_activity ?= scope:activity + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + NOT = { is_in_guest_subset = { name = detractor } } + diplomacy >= medium_skill_rating + NOT = { + is_a_faction_member = yes + } + } + save_scope_as = advisor + } + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + any_neighboring_top_liege_realm_owner = { + coronation_events_6150_neighbor_trigger = yes + is_in_guest_subset = { name = supporter } + faith = { + faith_hostility_level = { + target = root.faith + value <= faith.faith_hostile_level + } + } + } + } + ordered_neighboring_top_liege_realm_owner = { + order_by = "opinion(scope:host)" + limit = { + coronation_events_6150_neighbor_trigger = yes + is_in_guest_subset = { name = supporter } + faith = { + faith_hostility_level = { + target = root.faith + value <= faith.faith_hostile_level + } + } + } + save_scope_as = neighbor + save_scope_as = neighbor_supporter + } + } + else = { + ordered_neighboring_top_liege_realm_owner = { + order_by = "opinion(scope:host)" + limit = { + coronation_events_6150_neighbor_trigger = yes + } + save_scope_as = neighbor + } + } + if = { + limit = { + has_activity_intent = coronation_impress_attendees + government_has_flag = government_is_nomadic + } + scope:activity = { + ordered_attending_character = { + order_by = "opinion(scope:host)" + limit = { + coronation_events_6150_vassal_trigger = yes + is_councillor_of = root + } + alternative_limit = { + highest_held_title_tier = root.highest_held_title_tier_minus_one + coronation_events_6150_vassal_trigger = yes + } + alternative_limit = { + coronation_events_6150_vassal_trigger = yes + } + save_scope_as = disobedient_vassal + } + } + } + #Get confederation to break up + if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + ordered_neighboring_top_liege_realm_owner = { + order_by = ai_greed + limit = { + involved_activity ?= scope:activity + basic_is_available_ai = yes + confederation ?= { is_house_based = no } # any_confederation_member is not performant for house blocs + NOR = { + is_allied_to = root + is_at_war_as_defender = yes + this = scope:neighbor + } + OR = { + AND = { + ai_greed >= low_positive_ai_value + ai_honor <= 0 + } + AND = { + ai_honor <= low_negative_ai_value + ai_greed >= 0 + } + } + } + save_scope_as = confederate + add_to_list = confederation_members + + confederation = { save_scope_as = confederation } + } + scope:confederation = { + ordered_confederation_member = { + order_by = ai_greed + max = 2 + limit = { + basic_is_available_ai = yes + NOR = { + this = root + this = scope:confederate + is_allied_to = root + is_at_war_as_defender = yes + } + OR = { + AND = { + ai_greed >= low_positive_ai_value + ai_honor <= 0 + } + AND = { + ai_honor <= low_negative_ai_value + ai_greed >= 0 + } + } + } + add_to_list = confederation_members + } + } + } + } + #Impress Attendees - make a vassal loyal + option = { + trigger = { + has_activity_intent = coronation_impress_attendees + exists = scope:disobedient_vassal + } + name = coronation_events.6150.a + flavor = coronation_events.6150.a.flavor + scope:disobedient_vassal = { + add_opinion = { + target = root + modifier = obedience_opinion + } + } + if = { + limit = { + dread >= 5 + } + add_dread = minor_dread_loss + add_piety = minor_piety_loss + } + else = { + add_piety = medium_piety_loss + } + stress_impact = { + arrogant = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + modifier = { + add = 100 + scope:disobedient_vassal = { + is_powerful_vassal = yes + } + } + modifier = { + add = 50 + dread <= 0 + } + modifier = { + add = -50 + scope:disobedient_vassal = { + current_military_strength < root.half_current_military_strength + } + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + } + } + } + } + #Exalt the crown - take visiting rulers on a tour of activity_location + option = { + trigger = { + has_activity_intent = coronation_exalt_crown + scope:activity.activity_location.county.holder = { + OR = { + this = root + top_liege = root + } + } + } + name = coronation_events.6150.b + flavor = coronation_events.6150.b.flavor + + scope:activity.activity_location.county = { + add_county_modifier = { + modifier = coronation_tour_of_notables_modifier + years = 20 + } + } + scope:advisor = { + if = { + limit = { + is_ai = yes + } + add_diplomacy_lifestyle_xp = major_lifestyle_xp + } + } + stress_impact = { + arrogant = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + add = 100 + has_trait = arrogant + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + + } + #Weaken detractors - remove members from a confederation + option = { + trigger = { + has_activity_intent = coronation_weaken_detractors + exists = scope:confederate + } + name = coronation_events.6150.c + flavor = coronation_events.6150.c.flavor + if = { + limit = { + primary_title = { + has_title_law = confederation_elective_succession_law + } + } + add_tyranny = minor_tyranny_gain + } + hidden_effect = { + scope:neighbor.confederation = { + every_confederation_member = { + limit = { + NOT = { + this = scope:confederate + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6150.d.confederation_alert + left_icon = root + right_icon = scope:confederate + custom_tooltip = coronation_events.6150.d.confederation_alert_tt + } + } + } + } + + #Diplomacy duel + scope:advisor = { + duel = { + skill = diplomacy + value = high_skill_rating + #Remove 3 confederation members! + 15 = { + trigger = { + any_in_list = { + list = confederation_members + count >= 3 + } + } + desc = coronation_events.6150.c.success_crit + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -14 + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6150.c.success_crit + left_icon = scope:advisor + right_icon = scope:confederate + every_in_list = { + list = confederation_members + confederation = { + remove_confederation_member = prev + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + root = { + pay_short_term_gold = { + target = prev + gold = prev.medium_gold_value + } + } + } + } + } + } + #remove 2 confederation member + 30 = { + trigger = { + any_in_list = { + list = confederation_members + count >= 3 + } + } + desc = coronation_events.6150.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -29 + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6150.c.success + left_icon = scope:advisor + right_icon = scope:confederate + scope:confederate = { + confederation = { + remove_confederation_member = scope:confederate + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + root = { + pay_short_term_gold = { + target = prev + gold = prev.medium_gold_value + } + } + } + ordered_in_list = { + list = confederation_members + order_by = ai_greed + limit = { + NOT = { + this = scope:confederate + } + } + confederation = { + remove_confederation_member = prev + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + root = { + pay_short_term_gold = { + target = prev + gold = prev.medium_gold_value + } + } + } + } + } + } + #remove 1 confederation member + 65 = { + desc = coronation_events.6150.c.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -64 + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6150.c.fail + left_icon = scope:advisor + right_icon = scope:confederate + scope:confederate = { + confederation = { + remove_confederation_member = scope:confederate + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + root = { + pay_short_term_gold = { + target = prev + gold = prev.medium_gold_value + } + } + } + } + } + } + } + } + stress_impact = { + deceitful = minor_stress_impact_loss + just = medium_stress_impact_gain + greedy = minor_stress_impact_gain + honest = medium_stress_impact_gain + content = miniscule_stress_impact_gain + compassionate = miniscule_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_greed = 1 + } + modifier = { + add = 25 + has_trait = deceitful + } + modifier = { + add = 25 + scope:confederation = { + any_confederation_member = { + count > 5 + } + } + } + modifier = { + add = 100 + scope:confederation = { + any_confederation_member = { + count > 8 + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = just + has_trait = honest + has_trait = trusting + short_term_gold <= scope:confederate.medium_gold_value_tripled + } + } + } + } + #Embrace supporters - turn potential tributary into vassal + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + exists = scope:neighbor_supporter + } + name = coronation_events.6150.supp + scope:advisor = { + duel = { + skill = diplomacy + value = medium_skill_rating + 50 = { + desc = coronation_events.6150.supp.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 90 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 70 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 50 + } + } + add = 30 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 20 + } + } + add = 20 + } + modifier = { + scope:neighbor = { + has_dread_level_towards = { + target = root + level >= 1 + } + } + add = 40 + } + modifier = { + scope:neighbor = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + add = 40 + } + modifier = { + add = 100 + root = { + OR = { + has_trait = conqueror + has_trait = greatest_of_khans + } + } + } + modifier = { + add = 50 + root = { + highest_held_title_tier_minus_one > scope:neighbor.highest_held_title_tier + } + } + modifier = { + add = 50 + root = { + highest_held_title_tier > scope:neighbor.highest_held_title_tier + } + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6150.supp.success + left_icon = scope:advisor + right_icon = scope:neighbor + if = { + limit = { + scope:neighbor = { + is_confederation_member = yes + } + } + scope:neighbor.confederation = { + remove_confederation_member = scope:neighbor + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + scope:neighbor = { + change_liege = { + liege = root + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + scope:advisor = { + if = { + limit = { + is_ai = yes + } + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + add_prestige = medium_prestige_gain + } + } + } + } + } + 50 = { + desc = coronation_events.6150.supp.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -90 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -70 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -50 + } + } + add = 30 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -20 + } + } + add = 30 + } + modifier = { + add = 20 + scope:neighbor.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + modifier = { + add = 20 + scope:neighbor.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + modifier = { + add = 30 + scope:neighbor = { + is_confederation_member = yes + } + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6150.supp.fail + left_icon = scope:advisor + right_icon = scope:neighbor + scope:neighbor = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + } + } + } + } + } + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:neighbor + multiplier = 1 + } + opinion_modifier = { + who = scope:neighbor + opinion_target = root + multiplier = 1 + } + modifier = { + add = 100 + scope:advisor = { + diplomacy >= extremely_high_skill_rating + } + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + scope:advisor = { + diplomacy < high_skill_rating + } + } + } + } + } + #Get a tributary + option = { + name = coronation_events.6150.d + if = { + limit = { + NOT = { exists = scope:neighbor_supporter } + } + scope:advisor = { + duel = { + skill = diplomacy + value = medium_skill_rating + 50 = { + desc = coronation_events.6150.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 90 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 70 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 50 + } + } + add = 30 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 20 + } + } + add = 20 + } + modifier = { + scope:neighbor = { + has_dread_level_towards = { + target = root + level >= 1 + } + } + add = 40 + } + modifier = { + scope:neighbor = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + add = 40 + } + modifier = { + add = 100 + root = { + OR = { + has_trait = conqueror + has_trait = greatest_of_khans + } + } + } + modifier = { + add = 50 + root = { + highest_held_title_tier_minus_one > scope:neighbor.highest_held_title_tier + } + } + modifier = { + add = 50 + root = { + highest_held_title_tier > scope:neighbor.highest_held_title_tier + } + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6150.d.success + left_icon = scope:advisor + right_icon = scope:neighbor + if = { + limit = { + scope:neighbor = { + is_confederation_member = yes + } + } + scope:neighbor.confederation = { + remove_confederation_member = scope:neighbor + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + } + start_tributary_interaction_effect = { + TRIBUTARY = scope:neighbor + SUZERAIN = root + } + scope:advisor = { + if = { + limit = { + is_ai = yes + } + add_prestige = medium_prestige_gain + } + } + } + } + + } + 50 = { + desc = coronation_events.6150.d.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -90 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -70 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -50 + } + } + add = 30 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -20 + } + } + add = 30 + } + modifier = { + add = 20 + scope:neighbor.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + modifier = { + add = 20 + scope:neighbor.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + modifier = { + add = 30 + scope:neighbor = { + is_confederation_member = yes + } + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6150.d.fail + left_icon = scope:advisor + right_icon = scope:neighbor + scope:neighbor = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + } + } + } + } + } + } + else = { + if = { + limit = { + scope:neighbor = { + is_confederation_member = yes + } + } + scope:neighbor.confederation = { + remove_confederation_member = scope:neighbor + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + } + root = { + start_tributary_interaction_effect = { + TRIBUTARY = scope:neighbor + SUZERAIN = root + } + } + if = { + limit = { + scope:advisor = { is_ai = yes } + } + scope:advisor = { add_prestige = medium_prestige_gain } + } + } + stress_impact = { + greedy = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:neighbor + multiplier = 0.5 + } + opinion_modifier = { + who = scope:neighbor + opinion_target = root + multiplier = 0.5 + } + modifier = { + add = 50 + scope:advisor = { + diplomacy >= very_high_skill_rating + } + } + modifier = { + add = 25 + scope:neighbor.highest_held_title_tier < root.highest_held_title_tier_minus_one + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + scope:advisor = { + diplomacy < decent_skill_rating + } + } + } + } + } + #Strengthen the unity of the council + option = { + name = coronation_events.6150.e + every_councillor = { + custom = custom.every_councillor + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = coronation_councillor_unity_tooltip_nomadic + hidden_effect = { + if = { + limit = { + highest_skill = diplomacy + } + add_character_modifier = { + modifier = councillor_unity_modifier_diplomacy + years = 5 + } + } + else_if = { + limit = { + highest_skill = stewardship + } + add_character_modifier = { + modifier = councillor_unity_modifier_stewardship + years = 5 + } + } + else_if = { + limit = { + highest_skill = intrigue + } + add_character_modifier = { + modifier = councillor_unity_modifier_intrigue + years = 5 + } + } + else_if = { + limit = { + highest_skill = learning + } + add_character_modifier = { + modifier = councillor_unity_modifier_learning + years = 5 + } + } + else = { + add_character_modifier = { + modifier = councillor_unity_modifier_martial + years = 5 + } + } + } + } + custom_tooltip = coronation_councillor_unity_tooltip + hidden_effect = { + if = { + limit = { + has_council_position = councillor_chancellor + } + add_character_modifier = { + modifier = councillor_unity_modifier_diplomacy + years = 5 + } + } + else_if = { + limit = { + has_council_position = councillor_steward + } + add_character_modifier = { + modifier = councillor_unity_modifier_stewardship + years = 5 + } + } + else_if = { + limit = { + has_council_position = councillor_spymaster + } + add_character_modifier = { + modifier = councillor_unity_modifier_intrigue + years = 5 + } + } + else_if = { + limit = { + has_council_position = councillor_court_chaplain + } + add_character_modifier = { + modifier = councillor_unity_modifier_learning + years = 5 + } + } + else_if = { + limit = { + has_council_position = councillor_marshal + } + add_character_modifier = { + modifier = councillor_unity_modifier_martial + years = 5 + } + } + else = { + #Add highest skill to spouse... and other council positions I don't know about I guess + if = { + limit = { + highest_skill = diplomacy + } + add_character_modifier = { + modifier = councillor_unity_modifier_diplomacy + years = 5 + } + } + else_if = { + limit = { + highest_skill = stewardship + } + add_character_modifier = { + modifier = councillor_unity_modifier_stewardship + years = 5 + } + } + else_if = { + limit = { + highest_skill = intrigue + } + add_character_modifier = { + modifier = councillor_unity_modifier_intrigue + years = 5 + } + } + else_if = { + limit = { + highest_skill = learning + } + add_character_modifier = { + modifier = councillor_unity_modifier_learning + years = 5 + } + } + else = { + add_character_modifier = { + modifier = councillor_unity_modifier_martial + years = 5 + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + after = { + # For MP + coronation_ready_effect = yes + } +} diff --git a/N3OW/events/activities/hold_court_activity/hold_court_events_general.txt b/N3OW/events/activities/hold_court_activity/hold_court_events_general.txt new file mode 100644 index 00000000..cecf175d --- /dev/null +++ b/N3OW/events/activities/hold_court_activity/hold_court_events_general.txt @@ -0,0 +1,26947 @@ +namespace = hold_court + +# Differences in namespace range down to the ongoing CD civil war between whether a range starts at 0 or 1. +## It starts at 001 and goes to 000, damn it, and anyone who says otherwise is a knave and a cur. + +################################################## +# # RANGES +# 0001 - 0100 Setup, Example, & Misc +# 1001 - 2000 Shoes +# 2001 - 2999 Ewan +# 3000 - 4000 Bianca +# 4001 - 5000 Isabella +# 5001 - 5999 Linnea +# 6000 - 6999 Claudia +# 7000 - 8000 George +# 8001 - 8999 Joe +# 9000 - 9999 Oltner +# +################################################## + + + + + + + + + + + +################################################## +# Setup, Example, & Misc + +################################################## +# 0001 - 0010 Example Event +# 0011 - 0010 Activity Start +# 0021 - 0020 Activity End +################################################## + +################################################## +# Example Event +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# Example hold court event for studying. +hold_court.0001 = { + # Court-type events only appear in the Royal Court view, and, for the Hold Court activity, are mandatory. + type = court_event + # Desc and theming rules are as normal, but since there's no background, there's no need for background overrides. + title = hold_court.0001.t + desc = hold_court.0001.desc + theme = court + # Main portraits are unnecessary: we define this stuff via the court_scene block instead. + # Secondary portraits may be used as usual. + lower_left_portrait = scope:character_c + + # Hold Court events should be fired from their specific on_action (hold_court_event_selection), but since this is an example, it's left orphaned. + orphan = yes + + # Here, we define how the event appears inside the court view. + ## This block exists in the root scope, so you can just define anyone you'd normally have access to/set up in the immediate block here. + court_scene = { + # Define which character will have the button for starting the event appear over the top of 'em. + button_position_character = scope:character_a + # Forcibly open the event next. + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + # Roles defined in \ck3\game\gfx\court_scene\character_roles\, if you want to change them or add new ones. + roles = { + # First, we take each scoped relevant scoped character. + scope:character_a = { + # Then we define their role, where they're positioned in the scene. + group = petitioners_group + # Next, we select their animation override (if applicable: you can leave it to the generic default/role default if defined, though generally you'll want to define this). + animation = anger + } + scope:character_b = { + group = petitioners_group + animation = rage + } + # Characters who are not physically present are referred to only via copy links or lower portraits, so we don't bother putting them here. + } + } + + # Add the widget to show which court event we're currently at in the chain. + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + weight_multiplier = { + base = 1 + + # Court weightings: plug in a court type that should see this event more often. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + # As with portraits, we do our general character setup stuff in this event. + random_courtier_or_guest = { save_scope_as = character_a } + random_courtier_or_guest = { + limit = { + this != scope:character_a + } + save_scope_as = character_b + } + } + + # Court events, as with all events, require at least one option to display. + option = { + name = hold_court.0001.a + } +} + +################################################## +# Activity Start +# by Sean Hughes & Ewan Cowhig Croft +# 0011 - 0010 +################################################## + +# Played at the start of the activity as an intro. +hold_court.0011 = { + type = court_event + title = hold_court.0001.t + desc = hold_court.0001.desc + theme = realm + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_duty" } + court_scene = { + button_position_character = root + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + # roles = { + # root = { + # role = ruler + # animation = throne_room_ruler + # } + # } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + immediate = { + # Play the appropriate music cue. + if = { + limit = { + culture = { has_graphical_mena_culture_group_trigger = yes } + } + play_music_cue = "middleeasterncourt_cue" + } + else_if = { + limit = { + culture = { has_graphical_mediterranean_culture_group_trigger = yes } + } + play_music_cue = "mediterraneancourt_cue" + } + else_if = { + limit = { + culture = { has_graphical_india_culture_group_trigger = yes } + } + play_music_cue = "indiancourt_cue" + } + else_if = { + limit = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + play_music_cue = "mx_cue_tgp_asian_tournament" + } + ## If we can't find a more specific cue track, default to something more neutral. + else = { play_music_cue = "europeancourt_cue" } + # Set variable so we know if a player is holding court + if = { + limit = { + has_multiple_players = no + } + add_character_flag = { + flag = holding_court_character_flag + days = 5 + } + } + else = { + add_character_flag = { + flag = holding_court_character_flag + years = 1 + } + } + + # Tracking for how many petitioners have come through. + set_variable = { + name = num_petitioners + value = initial_petitioners_value + } + # Start a counting variable for widget progress. + set_variable = { + name = petitioner_current_progress + value = 0 + } + # Widget setup. + ## Set the total length of the chain. + save_scope_value_as = { + name = event_chain_length + value = petitioner_total_chain_length_value + } + ## Manually set the current widget length. + ### Due to code-side shenanigans, we do this a bit awkwardly. + save_scope_value_as = { + name = event_chain_progress + value = 1 + } + } + + option = { + name = hold_court.0001.a + custom_tooltip = hold_court_start_activity + # Set up the general flow. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.0001.b + remove_variable = num_petitioners + remove_variable = petitioner_current_progress + remove_character_flag = holding_court_character_flag + ai_chance = { + base = 0 + } + } +} + +################################################## +# Activity End +# by Sean Hughes & Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +# Played at the end of the activity to clean it up. +hold_court.0021 = { + type = court_event + title = hold_court.0021.t + desc = hold_court.0021.desc + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + court_scene = { + button_position_character = root + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + # roles = { + # root = { + # role = ruler + # animation = throne_room_ruler + # } + # } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + + immediate = { + # Clean up the ol' variable. + remove_variable = petitioner_current_progress + remove_character_flag = holding_court_character_flag + # Update the widget one last time. + save_scope_value_as = { + name = event_chain_progress + value = petitioner_total_chain_length_value + } + root = { apply_hold_court_grace_effect = yes } + } + + option = { + name = hold_court.0021.a + # Guaranteed small grandeur reward, in addition to any from events + change_current_court_grandeur = minor_court_grandeur_gain + # LEGITIMACY GAIN FROM HOLDING COURT + if = { + limit = { + has_legitimacy = yes + } + add_legitimacy = minor_legitimacy_gain + } + } +} + + + + + + + + + + +################################################## +# Shoes + +################################################## +# 1001 - 1010 Indirect Espionage +# 1011 - 1020 A Call to War +# 1021 - 1030 Dust to Dust +# 1031 - 1040 A Traitor Uncovered +# 1041 - 1050 God's Own Lands +################################################## + +################################################## +# Indirect Espionage +# by Sean Hughes +# 1001 - 1010 +################################################## + +# Guest arrives in your court, offers to spill rumors in exchange for money. +hold_court.1001 = { + type = court_event + title = hold_court.1001.t + desc = hold_court.1001.desc + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + lower_right_portrait = scope:neighboring_ruler + court_scene = { + button_position_character = scope:rumormonger + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:rumormonger = { + group = petitioners_group + animation = personality_greedy + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { has_character_flag = had_event_hold_court_1001 } + any_pool_guest = { + save_temporary_scope_as = rumor_person + is_available_adult = yes + any_known_secret = { + NOR = { + is_known_by = root + secret_target ?= scope:rumor_person + } + secret_target ?= { + top_liege ?= { is_landed = yes } + top_liege != root.top_liege + } + } + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + add_character_flag = { + flag = had_event_hold_court_1001 + years = 10 + } + random_pool_guest = { + limit = { + save_temporary_scope_as = rumor_person + is_available_adult = yes + any_known_secret = { + NOR = { + is_known_by = root + secret_target ?= scope:rumor_person + } + secret_target ?= { + top_liege ?= { is_landed = yes } + top_liege != root.top_liege + } + } + has_court_event_flag = no + } + save_scope_as = rumormonger + court_event_character_flag_effect = yes + random_known_secret = { + limit = { + NOR = { + is_known_by = root + secret_target ?= scope:rumor_person + } + secret_target ?= { + top_liege ?= { is_landed = yes } + top_liege != root.top_liege + } + } + secret_target.top_liege = { + save_scope_as = neighboring_ruler + court_event_character_flag_effect = yes + primary_title = { + save_scope_as = neighboring_realm + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.1001.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + pay_short_term_gold = { + target = scope:rumormonger + gold = tiny_gold_value + } + custom_tooltip = hold_court.1001.a.success.tt + hidden_effect = { + scope:rumormonger = { + every_known_secret = { + limit = { + NOR = { + is_known_by = root + secret_target ?= scope:rumor_person + } + secret_target = { + top_liege ?= { is_landed = yes } + top_liege != root.top_liege + } + } + reveal_to = root + } + } + } + } + + option = { + name = hold_court.1001.a.seducer + trigger = { + has_trait = seducer + might_cheat_on_every_partner_trigger = yes + scope:rumormonger = { + is_attracted_to_gender_of = root + might_cheat_on_every_partner_trigger = yes + } + } + trait = seducer + + + had_sex_with_effect = { + CHARACTER = scope:rumormonger + PREGNANCY_CHANCE = pregnancy_chance + } + custom_tooltip = hold_court.1001.a.success.tt + hidden_effect = { + scope:rumormonger = { + every_known_secret = { + limit = { + NOR = { + is_known_by = root + secret_target ?= scope:rumor_person + } + secret_target = { + top_liege ?= { is_landed = yes } + top_liege != root.top_liege + } + } + reveal_to = root + } + } + } + } + + option = { + name = hold_court.1001.b + add_dread = minor_dread_gain + imprison_character_effect = { + TARGET = scope:rumormonger + IMPRISONER = root + } + } + + option = { + name = hold_court.1001.c + change_current_court_grandeur = medium_court_grandeur_gain + custom_tooltip = hold_court_1001_pool_tt + hidden_effect = { + scope:rumormonger = { + move_to_pool = yes + } + } + + } + + after = { + scope:rumormonger = { + clear_court_event_participation = yes + } + scope:neighboring_ruler = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Call to War +# by Sean Hughes +# 1011 - 1020 +################################################## + +scripted_trigger hold_court_1011_valid_neighbour_trigger = { + tier < root.primary_title.tier + any_claimant = { hold_court_1011_valid_neighbour_claimant_trigger = yes } +} + +scripted_trigger hold_court_1011_valid_neighbour_claimant_trigger = { + is_ruler = no + is_adult = yes + basic_is_available_ai = yes + has_court_event_flag = no + NOT = { is_courtier_of = root } +} + +# Claimant asks for your help in pushing their claim RIGHT NOW!!! +hold_court.1011 = { + type = court_event + title = hold_court.1011.t + desc = hold_court.1011.desc + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + lower_right_portrait = scope:target_character + court_scene = { + button_position_character = scope:claimant_guest + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:claimant_guest = { + group = petitioners_group + animation = personality_bold + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + cooldown = { years = 10 } + + trigger = { + any_neighboring_and_across_water_top_liege_realm = { hold_court_1011_valid_neighbour_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike} + } + + immediate = { + random_neighboring_and_across_water_top_liege_realm = { + limit = { hold_court_1011_valid_neighbour_trigger = yes } + random_claimant = { + limit = { hold_court_1011_valid_neighbour_claimant_trigger = yes } + save_scope_as = claimant_guest + court_event_character_flag_effect = yes + } + save_scope_as = target_title + holder = { + save_scope_as = target_character + } + } + hidden_effect = { + add_visiting_courtier = scope:claimant_guest + scope:claimant_guest = { save_scope_as = courtier } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + + option = { + name = hold_court.1011.a + add_courtier = scope:claimant_guest + add_hook = { + type = loyalty_hook + target = scope:claimant_guest + } + reverse_add_opinion = { + target = scope:target_character + modifier = insult_opinion + opinion = -25 + } + show_as_tooltip = { + random_list = { + desc = courtier_guest_management.0102.a.rl.desc + 1 = { + show_chance = no + desc = courtier_guest_management.0102.a.stay + custom_tooltip = courtier_guest_management.0102.a.stay.tt + } + 1 = { + show_chance = no + desc = courtier_guest_management.0102.a.leave + scope:claimant_guest = { select_and_move_to_pool_effect = yes } + } + } + } + + hidden_effect = { + scope:claimant_guest = { + add_character_flag = { + flag = courtier_staying_for_claim + years = 1 + } + trigger_event = { + id = courtier_guest_management.0103 + years = 1 + } + } + } + } + + option = { + name = hold_court.1011.b + remove_courtier_or_guest = scope:claimant_guest + scope:claimant_guest = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -20 + } + } + scope:target_character = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + + option = { + name = hold_court.1011.c + show_as_tooltip = { + add_visiting_courtier = scope:claimant_guest + } + scope:claimant_guest = { + add_opinion = { + modifier = kindness_opinion + target = root + opinion = 10 + } + } + } + + after = { + scope:claimant_guest = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Dust to Dust +# by Sean Hughes +# 1021 - 1030 +################################################## + +# Dust to Dust: A peasant asks for financial relief +hold_court.1021 = { + type = court_event + title = hold_court.1021.t + desc = hold_court.1021.desc + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + court_scene = { + button_position_character = scope:peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:peasant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + # Portrait left in in order to apply outfit tags. + left_portrait = { + character = scope:peasant + outfit_tags = { beggar_rags } + hide_info = yes + } + + trigger = { + NOT = { has_character_flag = had_event_hold_court_2001 } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = had_event_hold_court_2001 + years = 10 + } + + random_sub_realm_barony = { + limit = { county = { holder = root } } + save_scope_as = village + county = { save_scope_as = county } + } + hidden_effect = { + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + gender_female_chance = root_soldier_female_chance + save_scope_as = peasant + } + scope:peasant = { + add_trait = peasant_leader + change_current_weight = -60 + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + trigger = { stewardship >= high_skill_rating } + name = hold_court.1021.a.stewardship + skill = stewardship + every_sub_realm_county = { + custom = county_or_15_dev + limit = { + OR = { + this = scope:county + development_level <= 15 + } + } + add_county_modifier = { + modifier = hold_court_cropsharing + years = 20 + } + } + } + + option = { + name = hold_court.1021.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= medium_treasury_or_gold_value + } + } + + remove_treasury_or_gold = medium_treasury_or_gold_value + every_sub_realm_county = { + custom = county_or_15_dev + limit = { + OR = { + this = scope:county + development_level <= 15 + } + } + add_county_modifier = { + modifier = hold_court_grateful_peasants_modifier + years = 10 + } + } + change_current_court_grandeur = medium_court_grandeur_gain + } + + option = { + name = hold_court.1021.b + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= medium_gold_value + } + } + + remove_treasury_or_gold = minor_treasury_or_gold_value + every_sub_realm_county = { + custom = county_or_15_dev + limit = { + OR = { + this = scope:county + development_level <= 15 + } + } + add_county_modifier = { + modifier = hold_court_free_labor + years = 10 + } + } + } + + option = { + name = hold_court.1021.c + + every_sub_realm_county = { + custom = county_or_15_dev + limit = { + OR = { + this = scope:county + development_level <= 15 + } + } + add_county_modifier = { + modifier = hold_court_ploughs_to_swords + years = 10 + } + } + } + + after = { + scope:peasant = { silent_disappearance_effect = yes } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + + + + + + + + + + +################################################## +# Ewan + +# [slightly anachronistic tumbleweed imagery] + + + + + + + + + + +################################################## +# Bianca + +################################################## +# 3000 - 3001 A Feast in your Name +# 3010 An Unconventional Preacher +# 3020 Culture Clash: Offensive Monument +# 3030 War Restorations +# 3040 Laughs Requested +# 3050 A Noble Responsibility +# 3060 Addressing the Corruption +# 3070 The Child with Two Mothers +# 3080 Exhibiting your collection +# 3090 - 3091 Celebrating another culture +################################################## + +##################################### +# A Feast in your Name # +# by Bianca Savazzi # +# 3000 - 3001 # +##################################### + +scripted_trigger hold_court_3000_vassal_trigger = { + basic_is_available_ai = yes + is_adult = yes + short_term_gold >= standard_activity_cost + has_court_event_flag = no + NOT = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + trigger_if = { + limit = { exists = root.var:was_promised_a_feast } + root.var:was_promised_a_feast = { this != prev } + } +} + +# You're approached by a vassal that offers to pay for your next feast +hold_court.3000 = { + type = court_event + title = hold_court.3000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_trait = blind } + desc = hold_court.3000.desc.opening.blind + } + triggered_desc = { + desc = hold_court.3000.desc.opening + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:feast_vassal = { + opinion = { + target = root + value >= 10 + } + } + } + desc = hold_court.3000.desc.dislikes + } + triggered_desc = { + desc = hold_court.3000.desc.likes + } + } + } + theme = court + cooldown = { years = 5 } + court_scene = { + button_position_character = scope:feast_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:feast_vassal = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + has_character_flag = had_event_vassal_2101 # Event where vassal requests a feast + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + trigger = { + NOT = { government_has_flag = government_is_mandala } + is_landed_or_landless_administrative = yes + is_in_civil_war = no + is_adult = yes + any_vassal = { + hold_court_3000_vassal_trigger = yes + } + } + + immediate = { + random_vassal = { + limit = { + hold_court_3000_vassal_trigger = yes + } + save_scope_as = feast_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Accept, grant a favour + option = { + name = hold_court.3000.a + scope:feast_vassal = { + add_opinion = { + modifier = ep1_accepted_sponsoring_a_feast_opinion + target = root + } + add_hook = { + target = root + type = favor_hook + } + pay_short_term_gold = { + target = root + gold = standard_activity_cost + } + } + custom_tooltip = hold_court.3000.a.tt + + hidden_effect = { + set_variable = { + name = hold_court_sponsored_a_feast + value = scope:feast_vassal + years = 5 + } + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_honor = tiny_chance_impact_positive_ai_value # Honorable characters tend to agree to fair deals + ai_greed = medium_chance_impact_negative_ai_value # Greedy characters don't necessarily want a "fair" deal + } + } + } + + # Option B: Accept greedily + option = { + name = hold_court.3000.b + trigger = { + OR = { + has_trait = greedy + has_trait = arbitrary + has_trait = arrogant + } + } + stress_impact = { + greedy = medium_stress_loss + } + scope:feast_vassal = { + if = { + limit = { + OR = { + has_trait = generous + has_trait = humble + } + } + add_opinion = { + modifier = ep1_took_advantage_of_kindness_opinion + target = root + opinion = -10 + } + } + else = { + add_opinion = { + modifier = ep1_took_advantage_of_kindness_opinion + target = root + } + } + pay_short_term_gold = { + target = root + gold = standard_activity_cost + } + } + custom_tooltip = hold_court.3000.a.tt + hidden_effect = { + set_variable = { + name = hold_court_sponsored_a_feast + value = scope:feast_vassal + years = 5 + } + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_honor = medium_chance_impact_negative_ai_value # Honorable characters tend to agree to fair deals + ai_greed = medium_chance_impact_positive_ai_value # Greedy characters don't necessarily want a "fair" deal + } + } + } + + # Option C: Persuade them to change the deal + option = { + name = hold_court.3000.c + trigger = { + OR = { + has_lifestyle = diplomacy_lifestyle + diplomacy >= high_skill_rating + has_education_diplomacy_trigger = yes + } + } + duel = { + skill = diplomacy + value = 10 + 30 = { + desc = hold_court.3000.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + hidden_effect = { + set_variable = { + name = hold_court_sponsored_a_feast + value = scope:feast_vassal + years = 5 + } + } + send_interface_toast = { + title = hold_court.3000.t + left_icon = scope:feast_vassal + custom_tooltip = hold_court.3000.c.success + } + } + 10 = { + desc = hold_court.3000.c.failure + scope:feast_vassal = { + add_opinion = { + modifier = ep1_rejected_sponsoring_a_feast_opinion + target = root + } + } + send_interface_toast = { + title = hold_court.3000.t + left_icon = scope:feast_vassal + custom_tooltip = hold_court.3000.c.failure + } + } + } + ai_chance = { + base = 15 + modifier = { + OR = { + has_lifestyle = diplomacy_lifestyle + diplomacy >= high_skill_rating + has_education_diplomacy_trigger = yes + } + add = 40 + } + ai_value_modifier = { + ai_honor = medium_chance_impact_positive_ai_value # Honorable characters tend to agree to fair deals + ai_greed = medium_chance_impact_positive_ai_value # Greedy characters don't necessarily want a "fair" deal + } + } + } + + # Option D: Reject + option = { + name = hold_court.3000.d + scope:feast_vassal = { + add_opinion = { + modifier = ep1_rejected_sponsoring_a_feast_opinion + target = root + } + } + + ai_chance = { + base = 15 + modifier = { + OR = { + has_trait = reclusive + has_trait = shy + } + add = 40 + } + modifier = { + gold < -100 #AI should want to take the loan if out of money + add = -100 + } + } + } + + after = { + add_character_flag = { + flag = hold_court_3000_a_feast_in_your_name + years = 5 + } + scope:feast_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Follow-up event Gain some GSV +hold_court.3001 = { + type = character_event + title = hold_court.3000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:feast_vassal = { is_alive = yes } + } + desc = hold_court.3001.desc + } + triggered_desc = { + desc = hold_court.3001.desc.dead + } + } + } + theme = court + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:feast_vassal + animation = happiness + } + + trigger = { + has_character_flag = hold_court_3000_a_feast_in_your_name + has_variable = hold_court_sponsored_a_feast + } + + immediate = { + var:hold_court_sponsored_a_feast = { + save_scope_as = feast_vassal + } + remove_variable = hold_court_sponsored_a_feast + } + + # Option A: Celebrate your success! + option = { + name = hold_court.3001.a + trigger = { + scope:feast_vassal = { is_alive = yes } + } + ai_chance = { + base = 1 + } + } + + # Option B: Celebrate your success, even if the vassal is dead! + option = { + name = hold_court.3001.b + trigger = { + scope:feast_vassal = { is_alive = no } + } + ai_chance = { + base = 1 + } + } + + after = { + change_current_court_grandeur = medium_court_grandeur_gain + } +} + +##################################### +# An Unconventional Preacher # +# by Bianca Savazzi # +# 3010 # +##################################### + +scripted_trigger court_3010_an_unconventional_preacher_vassal_trigger = { + faith = root.faith + is_available_healthy_ai_adult = yes + has_court_event_flag = no + save_temporary_scope_as = unconventional_preacher_temp +} + +# Vassal requests investigation of an unorthodox preacher. Another pleas for more tolerance or even a change in doctrines. +hold_court.3010 = { + type = court_event + title = hold_court.3010.t + desc = { + desc = hold_court.3010.desc.opening + first_valid = { + triggered_desc = { + trigger = { + faith = { + OR = { + has_doctrine = doctrine_clerical_gender_male_only + has_doctrine = doctrine_clerical_gender_female_only + } + } + } + desc = hold_court.3010.desc.preacher_gender + } + } + desc = hold_court.3010.desc.closing + } + theme = court + lower_center_portrait = scope:unconventional_preacher + cooldown = { years = 5 } + court_scene = { + button_position_character = scope:religious_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:religious_vassal = { + group = petitioners_group + animation = personality_zealous + } + scope:tolerant_vassal = { + group = petitioners_group + animation = personality_forgiving + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_vassal = { + court_3010_an_unconventional_preacher_vassal_trigger = yes + count >= 2 + } + faith = { + # Faith requires some restriction on who can practise it for the event to make sense + NOT = { + has_doctrine = doctrine_clerical_gender_either + } + } + OR = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher_temp + COURT_POS = high_almoner_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher_temp + COURT_POS = court_artificer_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher_temp + COURT_POS = court_physician_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher_temp + COURT_POS = chief_qadi_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher_temp + COURT_POS = court_tutor_court_position + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + if = { + limit = { + faith = { has_doctrine_parameter = clergy_must_be_male } + } + create_character = { + template = virtuous_priest_character_template + location = root.capital_province + gender = female + dynasty = none + save_scope_as = unconventional_preacher + } + } + else_if = { + limit = { + faith = { has_doctrine_parameter = clergy_must_be_female } + } + create_character = { + template = virtuous_priest_character_template + location = root.capital_province + gender = male + dynasty = none + save_scope_as = unconventional_preacher + } + } + else = { + create_character = { + template = virtuous_priest_character_template + location = root.capital_province + gender_female_chance = 50 + dynasty = none + save_scope_as = unconventional_preacher + } + } + hidden_effect = { + # We add them to court so that they can become high almoner, but hide that from the tooltip + add_courtier = scope:unconventional_preacher + } + + random_vassal = { + limit = { court_3010_an_unconventional_preacher_vassal_trigger = yes } + weight = { + base = 1 + modifier = { + add = 10 + has_trait = zealous + } + modifier = { + add = 5 + OR = { + has_trait = stubborn + has_trait = diligent + has_trait = impatient + } + } + modifier = { + add = -3 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + modifier = { + add = -5 + OR = { + has_trait = cynical + any_secret = { + type = secret_non_believer + } + } + } + modifier = { + add = 2 + has_council_position = councillor_court_chaplain #Slight pivot towards picking + } + } + save_scope_as = religious_vassal + court_event_character_flag_effect = yes + } + + random_vassal = { + limit = { + this != scope:religious_vassal + court_3010_an_unconventional_preacher_vassal_trigger = yes + } + weight = { + base = 1 + modifier = { + add = -10 + has_trait = zealous + } + modifier = { + add = 5 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + modifier = { + add = 5 + OR = { + has_trait = cynical + any_secret = { + type = secret_non_believer + } + } + } + modifier = { + add = 2 + has_council_position = councillor_court_chaplain + } + } + save_scope_as = tolerant_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Leave the preacher alone + option = { + trigger = { + OR = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = court_artificer_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = court_physician_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = chief_qadi_court_position + } + } + } + name = hold_court.3010.a + reverse_add_opinion = { + target = scope:religious_vassal + modifier = impious_opinion + opinion = -10 + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = chief_qadi_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:unconventional_preacher + POSITION = chief_qadi + } + } + else_if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = court_artificer_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:unconventional_preacher + POSITION = court_artificer + } + } + else_if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = court_physician_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:unconventional_preacher + POSITION = court_physician + } + } + ai_chance = { + base = 15 + modifier = { + gold < tiny_gold_value # AI won't hire positions if they don't have money + add = -15 + } + ai_value_modifier = { + ai_zeal = medium_chance_impact_negative_ai_value # Zealous characters don't like unconventional preachers + } + } + } + + # Option C: Appoint them as your almoner + option = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = high_almoner_court_position + } + } + name = hold_court.3010.c + reverse_add_opinion = { + target = scope:religious_vassal + modifier = impious_opinion + opinion = -10 + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:unconventional_preacher + POSITION = high_almoner + } + ai_chance = { + base = 15 + modifier = { + gold < tiny_gold_value # AI won't hire positions if they don't have money + add = -15 + } + ai_value_modifier = { + ai_zeal = medium_chance_impact_negative_ai_value # Zealous characters don't like unconventional preachers + } + } + } + + # Option D: Invite the preacher to serve as court tutor + option = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = court_tutor_court_position + } + } + name = hold_court.3010.d + reverse_add_opinion = { + target = scope:religious_vassal + modifier = impious_opinion + opinion = -10 + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:unconventional_preacher + POSITION = court_tutor + } + ai_chance = { + base = 15 + modifier = { + gold < tiny_gold_value # AI won't hire positions if they don't have money + add = -15 + } + ai_value_modifier = { + ai_zeal = medium_chance_impact_negative_ai_value # Zealous characters don't like unconventional preachers + } + } + } + + # Option B: Punish the preacher + option = { + name = hold_court.3010.b + scope:unconventional_preacher = { + silent_disappearance_effect = yes + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_zeal = medium_chance_impact_positive_ai_value # Zealous characters don't like unconventional preachers + ai_compassion = medium_chance_impact_negative_ai_value # Compassionate characters rather not punish those who do good + } + } + } + + after = { + scope:tolerant_vassal = { + clear_court_event_participation = yes + } + scope:religious_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +##################################### +# Culture Clash: Offensive Monument # +# by Bianca Savazzi # +# 3020 # +##################################### + +scripted_trigger hold_court_3020_peasant_trigger = { + basic_is_available_ai = yes + is_adult = yes + is_lowborn = yes + has_court_event_flag = no + #culture is left out for reusability +} + +scripted_trigger hold_court_3020_valid_barony = { + tier = tier_barony + holder ?= { + this != root + culture = root.culture + has_court_event_flag = no + } +} + +# Peasants of another culture want to restore a controversial monument that mocks yours +hold_court.3020 = { + type = court_event + title = hold_court.3020.t + desc = hold_court.3020.desc + theme = court + cooldown = { years = 5 } + court_scene = { + button_position_character = scope:holder_of_area + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:holder_of_area = { + group = petitioners_group + animation = shock + } + scope:different_culture_peasant = { + group = petitioners_group + animation = anger + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_held_title = { + title_tier = county + any_in_de_jure_hierarchy = { + hold_court_3020_valid_barony = yes + } + culture != root.culture + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_held_title = { + title_tier = county + limit = { + any_in_de_jure_hierarchy = { + hold_court_3020_valid_barony = yes + } + culture != root.culture + } + random_in_de_jure_hierarchy = { + limit = { + hold_court_3020_valid_barony = yes + } + save_scope_as = village + holder = { + save_scope_as = holder_of_area + court_event_character_flag_effect = yes + } + county = { save_scope_as = village_county } + } + } + # Try to fetch an existing character + if = { + limit = { + any_pool_guest = { + hold_court_3020_peasant_trigger = yes + culture = scope:village.culture + } + } + + random_pool_guest = { + limit = { + hold_court_3020_peasant_trigger = yes + culture = scope:village.culture + } + add_trait = peasant_leader + save_scope_as = different_culture_peasant + court_event_character_flag_effect = yes + } + } + else = { # else, make one for the event + create_character = { + template = servant_character + location = scope:village.title_province + culture = scope:village.title_province.culture + dynasty = none + trait = peasant_leader + save_scope_as = different_culture_peasant + } + add_character_flag = created_character_hold_court_3020 + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option C: Build something marrying the two cultures + option = { + name = hold_court.3020.c + trigger = { + has_trait = eccentric + } + remove_treasury_or_gold = medium_treasury_or_gold_value + every_held_title = { + title_tier = county + limit = { + culture = scope:village.culture + } + custom = every_county_of_culture + add_county_modifier = { + modifier = 3020_multicultural_monument + years = 15 + } + } + scope:village.culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value # SPeNd rEsouRcEs!? + ai_compassion = high_chance_impact_positive_ai_value # Compassionate characters don't like punishing others + } + modifier = { + factor = 0 + short_term_treasury_or_gold < medium_treasury_or_gold_value + } + } + } + + # Option A: Destroy the statue and build one for YOUR culture! + option = { + name = hold_court.3020.a + add_dread = minor_dread_gain + every_held_title = { + title_tier = county + limit = { + culture = scope:village.culture + } + custom = every_county_of_culture + add_county_modifier = { + modifier = 3020_own_culture_monument + years = 15 + } + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_vengefulness = medium_chance_impact_positive_ai_value # Vengeful characters don't like being mocked + ai_compassion = medium_chance_impact_negative_ai_value # Compassionate characters don't like punishing others + } + } + } + + # Option B: Accept + option = { + name = hold_court.3020.b + remove_treasury_or_gold = minor_treasury_or_gold_value + every_held_title = { + title_tier = county + limit = { + culture = scope:village.culture + } + custom = every_county_of_culture + add_county_modifier = { + modifier = hold_court_grateful_peasants_modifier + years = 15 + } + } + scope:village.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value # SPend resources!? + ai_compassion = medium_chance_impact_positive_ai_value # Compassionate characters don't like punishing others + } + modifier = { + factor = 0 + short_term_treasury_or_gold < minor_treasury_or_gold_value + } + } + } + + after = { + if = { + limit = { has_character_flag = created_character_hold_court_3020 } + hidden_effect = { + scope:different_culture_peasant = { + clear_court_event_participation = yes + death = { + death_reason = death_vanished + } + } + remove_character_flag = created_character_hold_court_3020 + } + } + scope:holder_of_area = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +##################################### +# War Restorations # +# by Bianca Savazzi # +# 3030 # +##################################### + +# Peasants of another culture want to restore a monument that was looted during war +hold_court.3030 = { + type = court_event + title = hold_court.3030.t + desc = hold_court.3030.desc + theme = court + cooldown = { years = 5 } + court_scene = { + button_position_character = scope:different_culture_peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:different_culture_peasant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + is_at_war = no + days_of_continuous_peace < 600 + any_directly_owned_province = { + culture != root.culture + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_directly_owned_province = { + limit = { + culture != root.culture + } + weight = { + base = 1 + modifier = { + add = 10 + has_free_building_slot = yes + } + } + save_scope_as = province + } + + # Try to fetch an existing character + if = { + limit = { + any_pool_guest = { + hold_court_3020_peasant_trigger = yes + culture = scope:province.culture + } + } + + random_pool_guest = { + limit = { + hold_court_3020_peasant_trigger = yes + culture = scope:province.culture + } + add_trait = peasant_leader + save_scope_as = different_culture_peasant + court_event_character_flag_effect = yes + } + } + else = { # else, make one for the event + create_character = { + template = servant_character + location = scope:province + culture = scope:province.culture + dynasty = none + trait = peasant_leader + save_scope_as = different_culture_peasant + } + scope:different_culture_peasant = { + court_event_character_flag_effect = yes + } + add_character_flag = created_character_hold_court_3030 + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Pay to restore the building + option = { + name = hold_court.3030.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = medium_treasury_or_gold_value + + stress_impact = { + greedy = medium_stress_gain + generous = medium_stress_loss + improvident = medium_stress_loss + } + + scope:province.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + } + + # Option B: Raze monument to use the materials elsewhere + option = { + name = hold_court.3030.b + trigger = { + scope:province = { has_free_building_slot = yes } + } + + stress_impact = { + greedy = medium_stress_loss + } + + scope:province = { + add_province_modifier = { + modifier = hold_court_less_building_cost_modifier + days = 3650 + } + } + + scope:province.culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_negative_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + } + + # Option C: Refuse + option = { + name = hold_court.3030.c + + stress_impact = { + generous = medium_stress_gain + improvident = medium_stress_gain + } + + scope:province = { + county = { + add_county_modifier = { + modifier = hold_court_displeased_peasants_modifier + years = 5 + } + } + } + } + + after = { + if = { + limit = { has_character_flag = created_character_hold_court_3030 } + hidden_effect = { + scope:different_culture_peasant = { + clear_court_event_participation = yes + death = { + death_reason = death_vanished + } + } + remove_character_flag = created_character_hold_court_3030 + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +##################################### +# Laughs Requested # +# by Bianca Savazzi # +# 3040 # +##################################### + +# Vassal/Courtier petitions for the recruitment of a jester +hold_court.3040 = { + type = court_event + title = hold_court.3040.t + desc = hold_court.3040.desc + theme = court + lower_center_portrait = scope:potential_jester + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:jester_requester + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:jester_requester = { + group = petitioners_group + animation = happiness + } + scope:kill_joy = { + group = petitioners_group + animation = dismissal + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { + employs_court_position = court_jester_court_position + } + can_employ_court_position_type = court_jester_court_position + any_vassal = { + is_available_ai_adult = yes + has_court_event_flag = no + save_temporary_scope_as = extroverted_vassal_check + } + any_vassal = { + is_available_ai_adult = yes + has_court_event_flag = no + this != scope:extroverted_vassal_check + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + random_vassal = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + weight = { + base = 1 + modifier = { + has_personality_extroverted_trigger = yes + add = 10 + } + modifier = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + add = 5 + } + } + save_scope_as = jester_requester + court_event_character_flag_effect = yes + assign_quirk_effect = yes # So that they have a quirk in loc + + create_character = { + template = pool_repopulate_diplomacy + location = scope:jester_requester.location + dynasty = none #It has to be a lowborn + save_scope_as = potential_jester + } + } + + hidden_effect = { add_courtier = scope:potential_jester } # So they're considered valid for the position + + random_vassal = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + this != scope:jester_requester + } + weight = { + base = 1 + modifier = { + has_trait_introverted_trigger = yes + add = 10 + } + modifier = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + add = 5 + } + } + save_scope_as = kill_joy + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Employ peasant + option = { + name = hold_court.3040.a + + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:potential_jester + COURT_POS = court_jester_court_position + } + } + + hidden_effect = { + reverse_add_opinion = { + target = scope:potential_jester + modifier = loyal_servant + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:potential_jester + } + custom_tooltip = { + text = generic_cp_discount_tt + scope:potential_jester = { + add_character_flag = cp_discount + } + } + reverse_add_opinion = { + target = scope:jester_requester + modifier = pleased_opinion + opinion = 20 + } + ai_chance = { + base = 5 + + modifier = { + has_trait_extroverted_trigger = yes + add = 2 + } + modifier = { + short_term_gold >= medium_gold_value + add = 5 + } + + ai_value_modifier = { + ai_greed = tiny_chance_impact_negative_ai_value #Recruiting this person means less cost to find a jester + } + } + } + + # Option B: Employ jester requester as jester + option = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:jester_requester + COURT_POS = court_jester_court_position + } + } + name = hold_court.3040.b + + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:jester_requester + } + hidden_effect = { + scope:potential_jester = { + death = { + death_reason = death_vanished #Ripperoni + } + } + } + + ai_chance = { + base = 5 + + modifier = { + opinion = { + target = scope:jester_requester + value <= low_positive_opinion + } + add = 5 + } + modifier = { + has_trait = arbitrary + add = 5 + } + modifier = { + short_term_gold >= medium_gold_value + add = 5 + } + } + } + + # Option C: Employ killjoy as jester + option = { + name = hold_court.3040.c + + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:kill_joy + COURT_POS = court_jester_court_position + } + } + + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:kill_joy + } + scope:kill_joy = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_killjoy_jester + OPINION = -20 + } + } + reverse_add_opinion = { + target = scope:jester_requester + modifier = pleased_opinion + opinion = 35 + } + hidden_effect = { + scope:potential_jester = { + death = { + death_reason = death_vanished + } + } + } + + ai_chance = { + base = 5 + + modifier = { + opinion = { + target = scope:kill_joy + value <= low_positive_opinion + } + add = 5 + } + modifier = { + has_trait = arbitrary + add = 5 + } + modifier = { + short_term_gold >= medium_gold_value + add = 5 + } + } + } + + # Option E: Do nothing + option = { + name = hold_court.3040.e + + hidden_effect = { + scope:potential_jester = { + death = { + death_reason = death_vanished + } + } + } + + ai_chance = { + base = 2 + + modifier = { + has_trait_introverted_trigger = yes + add = 2 + } + + modifier = { + short_term_gold < medium_gold_value + add = 5 + } + } + } + + after = { + scope:jester_requester = { + clear_court_event_participation = yes + } + scope:kill_joy = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +##################################### +# Addressing the Corruption # +# by Bianca Savazzi # +# 3060 # +##################################### + +scripted_trigger hold_court_3060_county_and_holder_trigger = { + county_control <= low_county_control + holder = { + this != root + is_vassal_of = root + basic_is_available_ai = yes + is_adult = yes + has_court_event_flag = no + } +} + +scripted_trigger hold_court_3060_replacement_candidate_trigger = { + basic_is_available_ai = yes + has_court_event_flag = no + is_adult = yes + stewardship >= mediocre_skill_rating + NOT = { is_of_major_or_minor_interest_trigger = { CHARACTER = root } } + can_be_steward_trigger = { COURT_OWNER = scope:county_petitioner } +} + +scripted_effect hold_court_3060_remove_corruption = { + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_inefficient_tax_collection_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_inefficient_tax_collection_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_deserting_levies_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_deserting_levies_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_lackluster_administration_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_lackluster_administration_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_uncooperative_guilds_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_uncooperative_guilds_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_lack_of_sheriffs_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_lack_of_sheriffs_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_lack_of_courts_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_lack_of_courts_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_bandits_rampant_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_bandits_rampant_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_unsafe_highways_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_unsafe_highways_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_smuggling_ring_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_smuggling_ring_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_thieves_guild_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_thieves_guild_modifier + } + } +} + +# Banditry is rife in a county and now a vassal is coming to you asking for help. +hold_court.3060 = { + type = court_event + title = hold_court.3060.t + desc = { + desc = hold_court.3060.desc.opening + first_valid = { + random_valid = { + triggered_desc = { + trigger = { + scope:corrupt_county = { + OR = { + has_county_modifier = county_corruption_smuggling_ring_modifier + has_county_modifier = county_corruption_thieves_guild_modifier + } + } + } + desc = hold_court.3060.desc.thieves + } + triggered_desc = { + trigger = { + scope:corrupt_county = { + OR = { + county_control <= low_county_control + has_county_modifier = county_corruption_bandits_rampant_modifier + has_county_modifier = county_corruption_unsafe_highways_modifier + } + } + } + desc = hold_court.3060.desc.bandits + } + triggered_desc = { + trigger = { + scope:corrupt_county = { has_county_modifier = county_corruption_inefficient_tax_collection_modifier } + } + desc = hold_court.3060.desc.tax + } + triggered_desc = { + trigger = { + scope:corrupt_county = { has_county_modifier = county_corruption_lack_of_sheriffs_modifier } + } + desc = hold_court.3060.desc.sheriffs + } + triggered_desc = { + trigger = { + scope:corrupt_county = { has_county_modifier = county_corruption_uncooperative_guilds_modifier } + } + desc = hold_court.3060.desc.guilds + } + triggered_desc = { + trigger = { + scope:corrupt_county = { has_county_modifier = county_corruption_deserting_levies_modifier } + } + desc = hold_court.3060.desc.levies + } + triggered_desc = { + trigger = { + scope:corrupt_county = { has_county_modifier = county_corruption_lack_of_courts_modifier } + } + desc = hold_court.3060.desc.courts + } + triggered_desc = { + trigger = { + scope:corrupt_county = { + has_county_modifier = county_corruption_inefficient_census_modifier + has_county_modifier = county_corruption_lackluster_administration_modifier + } + } + desc = hold_court.3060.desc.rulers + } + } + } + desc = hold_court.3060.desc.closing + } + theme = court + lower_left_portrait = { + trigger = { + exists = scope:cp_steward + exists = scope:cp_steward_replacement + } + character = scope:cp_steward + } + lower_right_portrait = { + trigger = { + exists = scope:cp_steward_replacement + } + character = scope:cp_steward_replacement + } + court_scene = { + button_position_character = scope:county_petitioner + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:county_petitioner = { + group = petitioners_group + animation = personality_rational + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_sub_realm_county = { + hold_court_3060_county_and_holder_trigger = yes + } + NOT = { has_character_flag = hold_court_3060_corrupt_county } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + #Cooldown flag + add_character_flag = { + flag = hold_court_3060_corrupt_county + years = 10 + } + random_sub_realm_county = { + limit = { hold_court_3060_county_and_holder_trigger = yes } + holder = { + save_scope_as = county_petitioner + assign_quirk_effect = yes + court_event_character_flag_effect = yes + } + save_scope_as = corrupt_county + } + + # Getting random better courtier for Option D + if = { + limit = { + scope:county_petitioner = { + exists = cp:councillor_steward + is_ai = yes + } + } + scope:county_petitioner.cp:councillor_steward = { save_scope_as = cp_steward } + random_courtier = { + limit = { + hold_court_3060_replacement_candidate_trigger = yes + stewardship > scope:cp_steward.stewardship #should be better than the current one to be considered a better replacement + } + save_scope_as = cp_steward_replacement + court_event_character_flag_effect = yes + } + } + else = { + random_courtier = { + limit = { + hold_court_3060_replacement_candidate_trigger = yes + } + save_scope_as = cp_steward_replacement + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Gold + option = { + name = hold_court.3060.a + pay_treasury_or_gold = { + target = scope:county_petitioner + value = medium_treasury_or_gold_value + } + every_sub_realm_county = { + custom = every_low_county_control + limit = { county_control <= low_county_control } + change_county_control = 20 + } + hold_court_3060_remove_corruption = yes + scope:county_petitioner = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + hidden_effect = { + stress_impact = { + greedy = medium_stress_loss + } + } + } + + ai_chance = { + base = 15 + + modifier = { + has_trait = generous + add = 5 + } + modifier = { + has_trait = greedy + add = -15 + } + modifier = { + short_term_treasury_or_gold <= medium_treasury_or_gold_value + factor = 0 + } + } + } + + # Option B: Offer a courtier + option = { + name = hold_court.3060.d + trigger = { + exists = scope:cp_steward_replacement + } + + scope:county_petitioner = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + fire_councillor = scope:cp_steward + assign_councillor_type = { + type = councillor_steward + target = scope:cp_steward_replacement + } + } + every_sub_realm_county = { + custom = every_low_county_control + limit = { county_control <= low_county_control } + change_county_control = 20 + } + hold_court_3060_remove_corruption = yes + + ai_chance = { + base = 0 + } + } + + # Option C: Do nothing + option = { + name = hold_court.3060.c + + ai_chance = { + base = 100 + } + } + + after = { + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:county_petitioner = { + clear_court_event_participation = yes + } + } +} + +##################################### +# Exhibiting your collection # +# by Bianca Savazzi # +# 3080 # +##################################### + +# Antiquarian suggests letting people pay to see your artifacts +hold_court.3080 = { + type = court_event + title = hold_court.3080.t + desc = hold_court.3080.desc + theme = court + cooldown = { years = 5 } + + court_scene = { + button_position_character = scope:antiquarian + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:antiquarian = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_physically_able_ai_adult = yes + has_court_event_flag = no + } + any_character_artifact = { + count >= 2 + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -0.5 + NOR = { + gold < minor_gold_value + prestige < minor_prestige_value + } + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_court_position_holder = { + type = antiquarian_court_position + limit = { + is_physically_able_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = antiquarian + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Charge money + option = { + name = hold_court.3080.a + custom_tooltip = hold_court.3080.a.tt + add_gold = medium_gold_value + add_character_modifier = { + modifier = petition_event_artifact_exhibition_for_gold + years = 10 + } + stress_impact = { + greedy = medium_stress_loss + arrogant = medium_stress_loss + generous = medium_stress_gain + humble = medium_stress_gain + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + gold < minor_gold_value + add = 5 + } + } + } + + # Option B: Gain Prestige + option = { + name = hold_court.3080.b + custom_tooltip = hold_court.3080.a.tt + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = petition_event_artifact_exhibition_for_prestige + years = 10 + } + stress_impact = { + greedy = minor_stress_gain + arrogant = medium_stress_loss + generous = medium_stress_gain + humble = medium_stress_gain + } + + ai_chance = { + base = 15 + + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = 1 + } + modifier = { + has_trait = ambitious + add = 5 + } + modifier = { + has_trait = arrogant + add = 5 + } + } + } + + # Option C: Not worth the risk + option = { + name = hold_court.3080.c + + ai_chance = { + base = 15 + modifier = { + has_trait = lazy + add = 5 + } + modifier = { + has_trait = paranoid #They're already after me! Why would I invite an increased risk!? + add = 50 + } + } + } + + after = { + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:antiquarian = { + clear_court_event_participation = yes + } + } +} + +##################################### +# Celebrating another culture # +# by Bianca Savazzi # +# 3090 - 3091 # +##################################### + +#A vassal of a minority culture suggest holding a festival/exhibit/faire of their minority Culture + +scripted_trigger hold_court_3090_different_culture_vassal_trigger = { + culture != root.culture + culture = { + cultural_acceptance = { target = root.culture value < hybridization_threshold_value } + } + is_physically_able_ai_adult = yes + has_court_event_flag = no +} + +hold_court.3090 = { + type = court_event + title = hold_court.3090.t + desc = hold_court.3090.desc + theme = court + cooldown = { years = 10 } + + court_scene = { + button_position_character = scope:different_culture_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:different_culture_vassal = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_vassal = { + hold_court_3090_different_culture_vassal_trigger = yes + } + } + + immediate = { + random_vassal = { + limit = { + hold_court_3090_different_culture_vassal_trigger = yes + } + save_scope_as = different_culture_vassal + court_event_character_flag_effect = yes + assign_quirk_effect = yes # So that they have a quirk in loc + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #More common if you're currently Promoting Acceptance + weight_multiplier = { + base = 0.5 + modifier = { + add = 10 + exists = cp:councillor_steward + cp:councillor_steward = { + is_performing_council_task = task_accept_culture + } + } + modifier = { + add = 0.5 + short_term_gold < minor_gold_value + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + # Option A: Celebrate both cultures! + option = { + name = hold_court.3090.a + remove_treasury_or_gold = major_treasury_or_gold_value + culture = { + change_cultural_acceptance = { + target = scope:different_culture_vassal.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:different_culture_vassal + opinion = 40 + } + if = { + limit = { + any_vassal = { + is_ai = no + has_court_event_flag = no + scope:different_culture_vassal != this + culture = scope:different_culture_vassal.culture + } + } + every_vassal = { + custom = custom.every_vassal_of_target_culture + limit = { + culture = scope:different_culture_vassal.culture + has_court_event_flag = no + is_ai = no + } + add_opinion = { + target = root + opinion = 10 + modifier = respect_opinion + } + } + } + + stress_impact = { + greedy = major_stress_gain #SO. MUCH. SPENT. MONEY. + arrogant = medium_stress_gain #Presenting oursselves as equals!? BAH! + compassionate = major_stress_loss #Promoting understanding between the two, yaaaaaay! + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 1 + ai_compassion = 0.5 + } + modifier = { + has_trait = compassionate + add = 50 + } + modifier = { + short_term_treasury_or_gold < major_treasury_or_gold_value #AI don't do it if they can't afford it + factor = 0 + } + } + } + + # Option B: Their culture in the capital! + option = { + name = hold_court.3090.b + remove_treasury_or_gold = medium_treasury_or_gold_value + culture = { + change_cultural_acceptance = { + target = scope:different_culture_vassal.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:different_culture_vassal + opinion = 20 + } + if = { + limit = { + any_vassal = { + scope:different_culture_vassal != this + culture = scope:different_culture_vassal.culture + } + } + every_vassal = { + custom = custom.every_vassal_of_target_culture + limit = { + culture = scope:different_culture_vassal.culture + } + add_opinion = { + target = root + opinion = 5 + modifier = respect_opinion + } + } + } + stress_impact = { + greedy = medium_stress_loss + arrogant = medium_stress_loss + generous = medium_stress_gain + humble = medium_stress_gain + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + short_term_treasury_or_gold < medium_treasury_or_gold_value #AI don't do it if they can't afford it + factor = 0 + } + } + } + + # Option C: OUR culture, in their area + option = { + name = hold_court.3090.c + remove_treasury_or_gold = minor_treasury_or_gold_value + culture = { + change_cultural_acceptance = { + target = scope:different_culture_vassal.culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:different_culture_vassal + opinion = -10 + } + stress_impact = { + arrogant = medium_stress_loss + humble = medium_stress_gain + } + + ai_chance = { + base = 15 + + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + } + modifier = { + short_term_treasury_or_gold < minor_treasury_or_gold_value #AI don't do it if they can't afford it + factor = 0 + } + modifier = { + has_trait = arrogant + add = 5 + } + } + } + + # Option D: Nah + option = { + name = hold_court.3090.d + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:different_culture_vassal + opinion = -30 + } + ai_chance = { + base = 15 + modifier = { + has_trait = lazy + add = 5 + } + modifier = { + short_term_treasury_or_gold < minor_treasury_or_gold_value #AI won't do anything if they can't afford it + factor = 2 + } + } + } + + after = { + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:different_culture_vassal = { + clear_court_event_participation = yes + } + } +} + +#Vassal wants to peacock a culture that's close to hybridizing with your culture + +scripted_trigger hold_court_3091_different_culture_vassal_trigger = { + culture != root.culture + culture = { + cultural_acceptance = { target = root.culture value >= hybridization_threshold_value } + } + is_physically_able_ai_adult = yes + has_court_event_flag = no +} + +hold_court.3091 = { + type = court_event + title = hold_court.3091.t + desc = hold_court.3091.desc + theme = court + cooldown = { years = 10 } + + court_scene = { + button_position_character = scope:same_culture_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:same_culture_vassal = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_vassal = { + hold_court_3091_different_culture_vassal_trigger = yes + } + any_vassal = { + culture = root.culture + is_physically_able_ai_adult = yes + has_court_event_flag = no + } + } + + immediate = { + random_vassal = { + limit = { + hold_court_3091_different_culture_vassal_trigger = yes + } + save_scope_as = different_culture_vassal #Used to track the culture that's close to hybridization + } + + random_vassal = { + limit = { + culture = root.culture + is_physically_able_ai_adult = yes + has_court_event_flag = no + } + weight = { + base = 1 + ai_value_modifier = { + ai_compassion = -1 #More likely to pick a vassal with less compassion and understanding + } + modifier = { + add = 10 + has_trait = arrogant #believes they are better + } + modifier = { + add = 10 + has_trait = zealous #zealous and not tolerant + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + } + } + save_scope_as = same_culture_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #More common if you're currently Promoting Culture + weight_multiplier = { + base = 0.5 + modifier = { + add = 10 + exists = cp:councillor_steward + cp:councillor_steward = { + is_performing_council_task = task_promote_culture + } + } + modifier = { + add = 0.5 + short_term_gold < minor_gold_value + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + # Option A: Peacocking to the max, strut your culture struff + option = { + name = hold_court.3091.a + add_prestige = major_prestige_gain + culture = { + change_cultural_acceptance = { + target = scope:different_culture_vassal.culture + value = low_negative_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:same_culture_vassal + opinion = 40 + } + every_vassal = { + custom = custom.every_vassal_of_target_culture + limit = { + culture = scope:different_culture_vassal.culture + } + add_opinion = { + target = root + opinion = -10 + modifier = annoyed_opinion + } + } + + stress_impact = { + arrogant = major_stress_loss #Yeah, we awesome + humble = major_stress_gain #I don't think we should claim to be better + compassionate = major_stress_gain #but... why not understanding between us? + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_compassion = -0.5 + } + } + } + + # Option B: Humblebrag + option = { + name = hold_court.3091.b + add_prestige = medium_prestige_gain + culture = { + change_cultural_acceptance = { + target = scope:different_culture_vassal.culture + value = miniscule_negative_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:same_culture_vassal + opinion = 20 + } + every_vassal = { + custom = custom.every_vassal_of_target_culture + limit = { + culture = scope:different_culture_vassal.culture + } + add_opinion = { + target = root + opinion = -5 + modifier = annoyed_opinion + } + } + stress_impact = { + arrogant = medium_stress_loss + generous = medium_stress_gain + humble = medium_stress_gain + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + # Option C: Nah + option = { + name = hold_court.3091.c + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:same_culture_vassal + opinion = -30 + } + ai_chance = { + base = 15 + modifier = { + has_trait = lazy + add = 5 + } + } + } + + after = { + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:same_culture_vassal = { + clear_court_event_participation = yes + } + } +} + + + + + + + + + + +################################################## +# Isabella + +################################################## +# 4001 Scourge - Your heir is a terrible person, vassals request new heir +# 4500 Endless Poetry - Great Poet appears at court +# 4600 SheHe who makes a Beast out of HerHimself... - Peasants are convinced tyrannical ruler is an actual monster +# 4700 An End to Agony - Vassals discuss the state of your prisons +# 4800 I Should Like a Veal Cutlet - House arrest prisoner demands fancy dinner +# 4900 In Ancient Times... - Dodgy genealogist offers to trace your lineage back to mythic heroes +################################################## + +################################################## +# Scourge +# by Isabella Welch +# 4001 +################################################## + +# Your heir is a terrible person, vassals request new heir +hold_court.4001 = { + type = court_event + title = hold_court.4001.t + desc = { + desc = hold_court.4001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = heir_gets_in_street_fights + } + desc = hold_court.4001.heir_street_fight + } + triggered_desc = { + trigger = { + has_character_flag = heir_robbed_me + } + desc = hold_court.4001.heir_robbery + } + triggered_desc = { + trigger = { + has_character_flag = heir_lives_in_tavern + } + desc = hold_court.4001.heir_tavern + } + triggered_desc = { + trigger = { + has_character_flag = heir_poor_diplomat + } + desc = hold_court.4001.heir_diplomacy_failure + } + triggered_desc = { + trigger = { + has_character_flag = heir_personally_hated + } + desc = hold_court.4001.heir_hated + } + + } + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = has_protective_spouse + } + desc = hold_court.4001.protective_parent + } + desc = hold_court.4001.accusation_default + } + desc = hold_court.4001.heir_admission + } + theme = diplomacy_family_focus + lower_left_portrait = scope:protective_parent + lower_right_portrait = scope:preferred_heir + court_scene = { + button_position_character = scope:annoyed_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:annoyed_vassal = { + group = petitioners_group + animation = rage + } + scope:annoying_heir = { + group = petitioners_group + animation = scheme + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { has_character_flag = has_had_disliked_heir_event } + any_vassal = { + count >= 1 + has_court_event_flag = no + is_ai = yes + } + root.primary_heir = { + has_court_event_flag = no + is_ai = yes + age >= 13 + is_player_heir_of = root + is_child_of = root + OR = { + has_trait = arrogant + has_trait = arbitrary + has_trait = wrathful + has_trait = sadistic + has_trait = lunatic + has_trait = callous + has_trait = drunkard + has_trait = deceitful + has_trait = greedy + has_trait = lazy + has_trait = lustful + has_trait = stubborn + has_trait = rakish + has_trait = fornicator + has_trait = adulterer + has_trait = deviant + has_trait = rowdy + has_trait = murderer + has_trait = vengeful + has_trait = torturer + any_vassal = { + opinion = { + target = root.primary_heir + value <= medium_negative_opinion + } + } + diplomacy <= low_skill_rating + } + } + any_child = { + NOT = { is_player_heir_of = root } + NOT = { has_trait = bastard } + has_court_event_flag = no + is_ai = yes + character_gender_can_inherit_from_trigger = { CHARACTER = root } + is_child_of = root + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + save_scope_as = actor # for loc + add_character_flag = { + flag = has_had_disliked_heir_event + days = 1825 + } + primary_heir = { + save_scope_as = annoying_heir + court_event_character_flag_effect = yes + } + random_child = { + limit = { + NOT = { is_player_heir_of = root } + NOT = { has_trait = bastard } + has_court_event_flag = no + character_gender_can_inherit_from_trigger = { CHARACTER = root } + is_child_of = root + is_ai = yes + } + court_event_character_flag_effect = yes + save_scope_as = preferred_heir + } + random_vassal = { + weight = { + base = 1 + modifier = { + has_relation_rival = scope:annoying_heir + factor = 20 + } + modifier = { + factor = 20 + opinion = { + target = scope:annoying_heir + value <= medium_negative_opinion + } + } + modifier = { + factor = 5 + is_powerful_vassal = yes + } + } + limit = { + is_ai = yes + has_court_event_flag = no + NOT = { + scope:annoying_heir = { + is_child_of = prev + } + } + } + save_scope_as = annoyed_vassal + court_event_character_flag_effect = yes + } + if = { + limit = { + any_spouse = { + is_parent_of = scope:annoying_heir + has_court_event_flag = no + is_ai = no + } + } + random_spouse = { + limit = { + is_parent_of = scope:annoying_heir + has_court_event_flag = no + is_ai = no + } + save_scope_as = protective_parent + } + add_character_flag = has_protective_spouse + } + if = { + limit = { + scope:annoying_heir = { + OR = { + has_trait = wrathful + has_trait = sadistic + has_trait = vengeful + has_trait = torturer + has_trait = murderer + has_trait = callous + has_trait = stubborn + } + } + } + add_character_flag = heir_gets_in_street_fights + + } + else_if = { + limit = { + scope:annoying_heir = { + OR = { + has_trait = greedy + has_trait = arrogant + has_trait = deceitful + has_trait = arbitrary + has_trait = lunatic + } + } + } + add_character_flag = heir_robbed_me + } + else_if = { + limit = { + scope:annoying_heir = { + OR = { + has_trait = drunkard + has_trait = lazy + has_trait = fornicator + has_trait = lustful + has_trait = adulterer + has_trait = rakish + has_trait = rowdy + } + } + } + add_character_flag = heir_lives_in_tavern + } + + else_if = { + limit = { + scope:annoying_heir = { + diplomacy <= low_skill_rating + } + } + add_character_flag = heir_poor_diplomat + } + else = { + add_character_flag = heir_personally_hated + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.4001.b + set_designated_heir = scope:preferred_heir + scope:annoying_heir = { + disinherit_effect = { DISINHERITOR = root } + } + stress_impact = { + family_first = medium_stress_gain + } + every_courtier_or_guest = { + custom = all_courtiers_and_guests + add_opinion = { + opinion = 15 + target = root + modifier = grateful_opinion + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_rationality = -0.5 + ai_sociability = 0.5 + } + } + } + option = { + name = hold_court.4001.d + trigger = { + scope:preferred_heir = { + NOR = { + has_trait = arrogant + has_trait = arbitrary + has_trait = wrathful + has_trait = sadistic + has_trait = lunatic + has_trait = callous + has_trait = drunkard + has_trait = deceitful + has_trait = greedy + has_trait = lazy + has_trait = lustful + has_trait = stubborn + has_trait = rakish + has_trait = fornicator + has_trait = adulterer + has_trait = deviant + has_trait = rowdy + has_trait = murderer + has_trait = vengeful + has_trait = torturer + } + } + scope:annoying_heir = { + number_of_commander_traits > 0 + + } + } + scope:annoying_heir = { + if = { + limit = { + NOT = { has_trait = reckless } + } + add_trait = reckless + } + add_prowess_skill = 4 + } + ai_chance = { + base =50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { + name = hold_court.4001.a + add_legitimacy = miniscule_legitimacy_gain + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -0.75 + ai_rationality = -0.5 + ai_sociability = -0.5 + } + } + } + + after = { + remove_character_flag = heir_personally_hated + remove_character_flag = heir_poor_diplomat + remove_character_flag = heir_lives_in_tavern + remove_character_flag = heir_robbed_me + remove_character_flag = heir_gets_in_street_fights + remove_character_flag = has_protective_spouse + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:annoyed_vassal = { + clear_court_event_participation = yes + } + scope:annoying_heir = { + clear_court_event_participation = yes + } + } +} + +################################################## +# Endless Poetry +# by Isabella Welch +# 4500 +################################################## + +# Demanding poet! +scripted_trigger demanding_poet_scripted_gender_trigger = { + primary_title = { + OR = { + has_title_law = female_only_law + has_title_law = female_preference_law + } + } + NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_male } } +} + +hold_court.4500 = { + type = court_event + title = hold_court.4500.t + desc = hold_court.4500.desc + theme = learning_scholarship_focus + court_scene = { + button_position_character = scope:demanding_poet + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:demanding_poet = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + is_ai = no + NOT = { + has_character_flag = has_had_demanding_poet_event + NOT = { has_free_council_slot = yes } + } + can_employ_court_position_type = court_poet_court_position + NOT = { employs_court_position = court_poet_court_position } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_demanding_poet_event + days = 7300 + } + save_scope_as = realm_holder + + if = { + limit = { demanding_poet_scripted_gender_trigger = yes } + create_character = { + location = root.capital_province + template = demanding_poet_character + gender = female + save_scope_as = demanding_poet + } + } + else = { + create_character = { + location = root.capital_province + template = demanding_poet_character + gender = male + save_scope_as = demanding_poet + } + } + hidden_effect = { + add_courtier = scope:demanding_poet + scope:demanding_poet = { + give_nickname = nick_the_poet + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.4500.b + change_current_court_grandeur = minor_court_grandeur_gain + replace_existing_position_with_character_in_current_scope_court_effect = { + CHARACTER = scope:demanding_poet + POSITION = court_poet_court_position + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.25 + ai_rationality = 0.75 + } + } + } + option = { + name = hold_court.4500.a + scope:demanding_poet = { silent_disappearance_effect = yes } + stress_impact = { + lifestyle_poet = minor_stress_gain + journaller = medium_stress_gain + arbitrary = minor_stress_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = -0.25 + ai_rationality = 0.75 + } + } + } + after = { + scope:demanding_poet = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# SheHe who makes a Beast out of HerHimself... +# by Isabella Welch +# 4600 +################################################## + +scripted_trigger cannibal_follow_up_trigger = { + scope:possible_cannibal_ruler = { + is_alive = yes + is_cannibal_trigger = no + } + scope:cannibal_vassal = { + is_alive = yes + is_cannibal_trigger = yes + is_ai = yes + has_court_event_flag = no + } +} + +# Peasants are convinced you're a literal monster +hold_court.4600 = { + type = court_event + title = hold_court.4600.t + desc = hold_court.4600.desc + theme = intrigue_intimidation_focus + override_background = { + reference = throne_room + } + lower_left_portrait = scope:chancellor + court_scene = { + button_position_character = scope:challenger_peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:challenger_peasant = { + group = petitioners_group + animation = rage + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { has_character_flag = has_had_monstrous_ruler_event } + OR = { + tyranny >= medium_tyranny + has_trait = torturer + has_trait = schemer + has_trait = sadistic + AND = { + is_witch_trigger = yes + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = witch GENDER_CHARACTER = root } + } + AND = { + is_cannibal_trigger = yes + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = cannibal GENDER_CHARACTER = root } + } + } + OR = { # I care about dread + has_focus = intrigue_skulduggery_focus + has_focus = intrigue_intimidation_focus + has_focus = diplomacy_majesty_focus + has_focus = martial_authority_focus + dread <= low_dread + } + exists = cp:councillor_chancellor + cp:councillor_chancellor = { + has_court_event_flag = no + is_ai = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ## The beast... + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + ## & his library... + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_monstrous_ruler_event + years = 5 + } + save_scope_as = possible_cannibal_ruler + create_character = { + location = root.capital_province + template = challenger_peasant_character + save_scope_as = challenger_peasant + + } + scope:challenger_peasant = { + court_event_character_flag_effect = yes + } + cp:councillor_chancellor = { + save_scope_as = chancellor + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.4600.a + trigger = { + has_trait = eccentric + } + add_prestige = medium_prestige_gain + change_current_court_grandeur = minor_court_grandeur_gain + add_intrigue_lifestyle_perk_points = 1 + every_held_county = { + custom = custom.every_held_county + add_county_modifier = { + modifier = county_confident_in_humanity_modifier + years = 25 + } + } + add_dread = medium_dread_gain + ai_chance = { + base = 200 + ai_value_modifier = { + ai_boldness = 0.25 + ai_rationality = 0.25 + } + } + } + + option = { + name = hold_court.4600.b + add_dread = medium_dread_gain + if = { + limit = { + any_vassal_or_below = { + is_ai = yes + OR = { + has_trait = cannibal + any_secret = { type = secret_cannibal } + } + } + } + random_vassal_or_below = { + limit = { + is_ai = yes + has_court_event_flag = no + OR = { + has_trait = cannibal + any_secret = { type = secret_cannibal } + } + NOR = { + has_relation_lover = root + has_relation_friend = root + has_relation_rival = root + has_relation_soulmate = root + is_close_family_of = root + } + } + save_scope_as = cannibal_vassal + } + trigger_event = { + id = hold_court.4601 + days = { 30 40 } + } + } + give_nickname = nick_the_child_of_devilgod + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.25 + ai_honor = -0.75 + } + } + } + + option = { + name = hold_court.4600.c + flavor = hold_court.4600.c.tt + add_dread = major_dread_loss + if = { + limit = { has_trait = sadistic } + remove_trait = sadistic + add_trait_force_tooltip = compassionate + } + else_if = { + limit = { has_trait = callous } + remove_trait = callous + add_trait_force_tooltip = compassionate + } + if = { + limit = { + is_cannibal_trigger = yes + } + remove_cannibal_secret_or_trait_effect = yes + } + if = { + limit = { + is_witch_trigger = yes + } + remove_witch_secret_or_trait_effect = yes + } + every_held_county = { + custom = custom.every_held_county + add_county_modifier = { + modifier = county_confident_in_humanity_modifier + years = 25 + } + } + stress_impact = { + sadistic = massive_stress_impact_gain + callous = massive_stress_impact_gain + confider = medium_stress_loss + just = medium_stress_loss + } + ai_chance = { + base = 0 # We don't want the AI changing their traits + } + } + + option = { + name = hold_court.4600.d + ai_chance = { + base = 15 + ai_value_modifier = { + ai_boldness = -0.25 + ai_rationality = 1 + } + } + } + + after = { + hidden_effect = { + scope:challenger_peasant = { + clear_court_event_participation = yes + death = { + death_reason = death_vanished + } + } + } + scope:chancellor = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.4601 = { + type = letter_event + opening = { desc = hold_court.4601.t } + desc = hold_court.4601.d + sender = scope:cannibal_vassal + + trigger = { + cannibal_follow_up_trigger = yes + } + + option = { + name = hold_court.4601.a + add_prestige = minor_prestige_gain + trigger_event = { + id = hold_court.4602 + days = { 7 9 } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = 0.25 + } + } + } + option = { + name = hold_court.4601.b + add_prestige = minor_prestige_loss + scope:cannibal_vassal = { + add_opinion = { + modifier = rejected_invitation_opinion + opinion = -10 + target = root + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -0.25 + } + } + } +} + +hold_court.4602 = { + type = character_event + title = hold_court.4602.t + desc = hold_court.4602.desc + theme = murder_scheme + left_portrait = { + character = scope:cannibal_vassal + animation = flirtation + } + + trigger = { + cannibal_follow_up_trigger = yes + } + + immediate = { + scope:cannibal_vassal = { + if = { + limit = { + any_secret = { + type = secret_cannibal + NOT = { any_secret_knower = { this = root } } + } + } + random_secret = { + type = secret_cannibal + reveal_to = root + } + } + } + } + + option = { + name = hold_court.4602.a + give_cannibal_secret_or_trait_effect = yes + scope:cannibal_vassal = { + add_opinion = { + target = root + modifier = also_cannibal + } + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_rationality = -0.75 + } + modifier = { + has_trait = gluttonous + add = 20 + } + } + } + + option = { + name = hold_court.4602.b + if = { + limit = { + scope:cannibal_vassal = { is_attracted_to_gender_of = root } + is_attracted_to_gender_of = scope:cannibal_vassal + } + set_relation_lover = { reason = lover_cannibal_seduction target = scope:cannibal_vassal } + } + else = { + set_relation_friend = { reason = friend_private_feast target = scope:cannibal_vassal } + } + increase_wounds_effect = { REASON = eaten } + scope:cannibal_vassal = { + add_opinion = { + target = root + opinion = 40 + modifier = delicious_morsel_opinion + } + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_rationality = -0.75 + } + modifier = { + has_trait = lustful + add = 20 + } + } + } + + option = { + name = hold_court.4602.c + trigger = { + is_cannibal_trigger = no + } + add_opinion = { + target = scope:cannibal_vassal + opinion = -50 + modifier = tried_to_eat_me_opinion + } + scope:cannibal_vassal = { + add_opinion = { + target = root + opinion = -20 + modifier = rejected_opinion + } + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_rationality = 0.75 + } + modifier = { + has_trait = gluttonous + add = -20 + } + } + } +} + +################################################## +# In Ancient Times... +# by Isabella Welch +# 4900 +################################################## + +# Shady genealogist offers to write up your legendary family history +hold_court.4900 = { + type = court_event + title = hold_court.4900.t + desc = hold_court.4900.desc + theme = diplomacy_family_focus + court_scene = { + button_position_character = scope:suspicious_genealogist + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:suspicious_genealogist = { + group = petitioners_group + animation = scheme + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { has_character_flag = has_had_suspicious_genealogist_event } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_ai = yes + } + OR = { + AND = { + is_female = yes + mother ?= { + mother ?= { + mother ?= { + mother ?= { + exists = mother + } + } + } + } + } + AND = { + is_male = yes + father ?= { + father ?= { + father ?= { + father ?= { + exists = father + } + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_suspicious_genealogist_event + years = 5 + } + save_scope_as = ruler_history_target + create_character = { + location = root.capital_province + template = suspicious_genealogist_character + save_scope_as = suspicious_genealogist + } + scope:suspicious_genealogist = { + court_event_character_flag_effect = yes + } + primary_title = { save_scope_as = target_title } + grab_mythical_founder_effect = yes + cp:councillor_court_chaplain = { + save_scope_as = chaplain + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.4900.e + trigger = { + NOT = { exists = promoted_legend } + has_dlc_feature = legends + NOT = { has_game_rule = historical_legends_only } + } + create_legend_seed = { + type = legitimizing + quality = famed + chronicle = ancestral_glory_not_in_history + properties = { + ancestor_flag = root.var:mythical_ancestor_var + title = root.primary_title + } + } + stress_impact = { + arrogant = major_stress_impact_loss + honest = minor_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = 0.75 + ai_honor = 0.75 + } + } + } + + option = { + name = hold_court.4900.a + trigger = { + root.dynasty = { + dynasty_prestige_level >= low_dynasty_prestige_level + dynasty_prestige_level < high_dynasty_prestige_level + } + } + root.dynasty = { add_dynasty_prestige = medium_dynasty_prestige_gain } + hidden_effect = { + scope:suspicious_genealogist = { + death = { + death_reason = death_vanished + } + } + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = 0.75 + ai_honor = 0.75 + } + } + } + + option = { + name = hold_court.4900.b + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= medium_gold_value + } + } + change_current_court_grandeur = major_court_grandeur_gain + trigger_event = { + id = hold_court.4901 + days = { 1 2 } + } + remove_short_term_gold = minor_gold_value + ai_chance = { + base = 25 + } + } + + option = { + name = hold_court.4900.c + trigger = { + root.dynasty = { + dynasty_prestige_level >= high_dynasty_prestige_level + } + } + root.dynasty = { add_dynasty_prestige = medium_dynasty_prestige_gain } + hidden_effect = { + scope:suspicious_genealogist = { + death = { + death_reason = death_vanished + } + } + } + ai_chance = { + base = 25 + } + } + + option = { + name = hold_court.4900.d + trigger = { + root.dynasty = { + dynasty_prestige_level < low_dynasty_prestige_level + } + } + root.dynasty = { add_dynasty_prestige = medium_dynasty_prestige_gain } + hidden_effect = { + scope:suspicious_genealogist = { + death = { + death_reason = death_vanished + } + } + } + ai_chance = { + base = 25 + } + } + + after = { + scope:chaplain = { + clear_court_event_participation = yes + } + scope:suspicious_genealogist = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# the reading of the family lineage... +hold_court.4901 = { + type = character_event + title = hold_court.4900.t + theme = diplomacy_family_focus + desc = { + desc = hold_court.4901.desc.intro + first_valid = { + triggered_desc = { + trigger = { + is_female = yes + } + desc = hold_court.4901.mothers + } + triggered_desc = { + trigger = { + is_male = yes + } + desc = hold_court.4901.fathers + } + } + desc = hold_court.4901.desc.outro + } + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:suspicious_genealogist + animation = scheme + } + + trigger = { + scope:suspicious_genealogist = { is_alive = yes } + scope:ruler_history_target = { is_alive = yes } + } + + immediate = { + if = { + limit = { is_female = yes } + root.mother = { + save_scope_as = mother_1 + this.mother = { + save_scope_as = mother_2 + this.mother = { + save_scope_as = mother_3 + this.mother = { + save_scope_as = mother_4 + this.mother = { + save_scope_as = mother_5 + } + } + } + } + } + } + if = { + limit = { is_male = yes } + root.father = { + save_scope_as = father_1 + this.father = { + save_scope_as = father_2 + this.father = { + save_scope_as = father_3 + this.father = { + save_scope_as = father_4 + this.father = { + save_scope_as = father_5 + } + } + } + } + } + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { + name = hold_court.4901.a + flavor = hold_court.4901.a.tt + every_courtier_or_guest = { + custom = all_courtiers_and_guests + add_opinion = { + target = root + modifier = bored_opinion + opinion = -5 + } + } + stress_impact = { + diligent = medium_stress_gain + patient = medium_stress_gain + family_first = medium_stress_gain + + } + every_child = { + limit = { + age < 15 + has_education_diplomacy_trigger = yes + } + add_diplomacy_skill = 2 + } + every_child = { + limit = { + has_trait = bastard + } + add_opinion = { + target = root + opinion = -15 + modifier = flaunted_lineage_opinion + } + } + ai_chance = { + base = 25 + modifier = { + has_trait = family_first + add = 50 + } + } + } + option = { + name = hold_court.4901.b + every_courtier_or_guest = { + limit = { NOT = { is_close_or_extended_family_of = root } } + custom = all_courtiers_and_guests + add_opinion = { + target = root + modifier = bored_opinion + opinion = -5 + } + } + stress_impact = { + humble = major_stress_gain + family_first = minor_stress_loss + } + every_close_or_extended_family_member = { + limit = { + NOR = { + is_courtier_of = root + } + } + custom = all_family_members + add_opinion = { + target = root + modifier = flaunted_lineage_opinion + opinion = 15 + } + } + ai_chance = { + base = 25 + modifier = { + has_trait = patient + add = 50 + } + } + } + option = { + name = hold_court.4901.c + every_courtier_or_guest = { + custom = all_courtiers_and_guests + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 5 + } + } + stress_impact = { + impatient = major_stress_loss + } + ai_chance = { + base = 25 + modifier = { + has_trait = impatient + add = 50 + } + } + } + + after = { + hidden_effect = { + scope:suspicious_genealogist = { + death = { + death_reason = death_vanished + } + } + } + } +} + + + + + + + + + + +################################################## +# Linnea + +################################################## +# 5010 - 5019 Out of Control +# 5020 - 5029 Dancing Plague +# 5030 - 5039 New Written Language +################################################## + +################################################## +# Out of Control +# by Linnéa Thimrén +# 5010 - 5019 +################################################## + +# Low control - give control to low control counties +hold_court.5010 = { + type = court_event + title = hold_court.5010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:marshal + } + desc = hold_court.5010.desc_marshal + } + desc = hold_court.5010.desc + } + desc = hold_court.5010.desc.outro + } + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + left_portrait = { + character = scope:peasant + animation = beg + } + lower_right_portrait = scope:portrait + court_scene = { + button_position_character = scope:peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:peasant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { has_character_flag = had_event_hold_court_5010 } + any_sub_realm_county = { + county_control < medium_county_control + NOT = { has_county_modifier = county_increased_presence_modifier } + } + } + + weight_multiplier = { + base = 0.5 + modifier = { + add = 0.5 + exists = cp:councillor_marshal + cp:councillor_marshal = { + is_performing_council_task = task_increase_control + is_available = yes #Not currently travelling or attending activity + location.county ?= { + county_control < medium_county_control + NOT = { has_county_modifier = county_increased_presence_modifier } + } + } + } + modifier = { + add = 0.25 + any_sub_realm_county = { + county_control <= low_county_control + NOT = { has_county_modifier = county_increased_presence_modifier } + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = had_event_hold_court_5010 + years = 10 + } + every_sub_realm_county = { + limit = { + county_control < medium_county_control + NOT = { has_county_modifier = county_increased_presence_modifier } + } + add_to_list = potential_county + } + random_in_list = { + list = potential_county + limit = { + exists = root.cp:councillor_marshal + root.cp:councillor_marshal = { + is_performing_council_task = task_increase_control + is_available = yes #Not currently travelling or attending activity + councillor_task_target = prev.title_province + } + } + alternative_limit = { + county_control <= low_county_control + } + alternative_limit = { + always = yes + } + save_scope_as = county + } + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + trait = compassionate + save_scope_as = peasant + } + scope:peasant = { + court_event_character_flag_effect = yes + } + #To save the most relevant character for loc and portrait + if = { + limit = { + exists = cp:councillor_marshal + cp:councillor_marshal = { + has_court_event_flag = no + is_ai = yes + is_performing_council_task = task_increase_control + councillor_task_target = scope:county.title_province + } + } + cp:councillor_marshal = { + save_scope_as = marshal + save_scope_as = portrait + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + scope:county.holder != root + scope:county.holder = { has_court_event_flag = no } + } + scope:county.holder = { + save_scope_as = vassal + save_scope_as = portrait + court_event_character_flag_effect = yes + } + } + else = { + save_scope_as = portrait + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + + option = { # Let's go for it + name = hold_court.5010.a + + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:county = { + change_county_control = medium_county_control_gain + } + every_sub_realm_county = { + custom = every_low_county_control + limit = { + county_control <= low_county_control + NOT = { this = scope:county } + } + change_county_control = minor_county_control_gain + } + stress_impact = { + compassionate = medium_stress_impact_loss + callous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = -1 + ai_compassion = 1 + } + modifier = { + factor = 0 + gold <= medium_treasury_or_gold_value + } + } + } + + option = { # We need more violence! + name = hold_court.5010.b + scope:county = { + add_county_modifier = { + modifier = county_increased_presence_modifier + days = 3650 + } + change_county_control = major_county_control_gain + } + every_sub_realm_county = { + custom = every_low_county_control + limit = { + county_control <= low_county_control + NOT = { this = scope:county } + } + add_county_modifier = { + modifier = county_increased_presence_modifier + days = 3650 + } + change_county_control = major_county_control_gain + } + stress_impact = { + sadistic = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + } + } + + option = { # Idc lol + name = hold_court.5010.c + stress_impact = { + compassionate = minor_stress_impact_gain + } + } + + after = { + if = { + limit = { + exists = scope:marshal + } + clear_court_event_participation = yes + } + else_if = { + limit = { + exists = scope:vassal + } + clear_court_event_participation = yes + } + hidden_effect = { + scope:peasant = { + clear_court_event_participation = yes + } + if = { + limit = { + scope:county = { + has_county_modifier = county_increased_presence_modifier + } + } + scope:peasant = { + death = { + death_reason = death_hanged + } + } + } + else_if = { + limit = { + scope:county.holder != root + scope:county.holder.capital_province = { + local_pool_is_full_trigger = no + } + } + scope:peasant = { + move_to_pool_at = scope:county.holder.capital_province + } + } + else = { + scope:peasant = { + death = { + death_reason = death_vanished + } + } + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# New Written Language +# by Linnéa Thimrén +# 5030 - 5039 +################################################## + +# Minority gender in your court develops their own written language (think Nüshu) +scripted_trigger hold_court_5030_courtier_basic_trigger = { + has_court_event_flag = no + is_ai = yes + faith = root.faith + is_imprisoned = no + NOT = { has_trait = incapable } + OR = { + AND = { + OR = { + root = { has_realm_law = male_only_law } + root = { has_realm_law = male_preference_law } + } + is_female = yes + } + AND = { + OR = { + root = { has_realm_law = female_only_law } + root = { has_realm_law = female_preference_law } + } + is_male = yes + } + } +} +scripted_trigger hold_court_5030_courtier_adult_trigger = { + hold_court_5030_courtier_basic_trigger = yes + is_adult = yes + NOT = { has_court_position = court_tutor_court_position } +} +hold_court.5030 = { + type = court_event + title = hold_court.5030.t + desc = hold_court.5030.desc + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + lower_right_portrait = scope:court_tutor + court_scene = { + button_position_character = scope:courtier + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:courtier = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_courtier = { + hold_court_5030_courtier_adult_trigger = yes + } + OR = { + AND = { + OR = { + root = { has_realm_law = male_only_law } + root = { has_realm_law = male_preference_law } + } + is_female = yes + } + AND = { + OR = { + root = { has_realm_law = female_only_law } + root = { has_realm_law = female_preference_law } + } + is_male = yes + } + } + OR = { # Make sure you care about schemes and such + has_lifestyle = intrigue_lifestyle + any_scheme = { is_hostile = yes } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + cooldown = { years = 40 } + + immediate = { + random_courtier = { + limit = { + hold_court_5030_courtier_adult_trigger = yes + } + weight = { + base = 1 + compare_modifier = { + value = learning + multiplier = 2 + } + } + save_scope_as = courtier + court_event_character_flag_effect = yes + } + if = { + limit = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_physically_able_adult = yes + has_court_event_flag = no + is_ai = yes + } + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { + is_physically_able_adult = yes + has_court_event_flag = no + is_ai = yes + } + save_scope_as = court_tutor + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Allow it + name = hold_court.5030.a + #If you're part of the gender minority you get a boost as well + if = { + limit = { + OR = { + AND = { + OR = { + has_realm_law = male_only_law + has_realm_law = male_preference_law + } + is_female = yes + } + AND = { + OR = { + has_realm_law = female_only_law + has_realm_law = female_preference_law + } + is_male = yes + } + } + } + if = { + limit = { + is_male = yes + } + add_character_modifier = { + modifier = hold_court_written_language_men_advanced_modifier + years = 20 + } + } + else = { + add_character_modifier = { + modifier = hold_court_written_language_women_advanced_modifier + years = 20 + } + } + } + #Boost all courtiers of the relevant gender + every_courtier = { + limit = { + hold_court_5030_courtier_basic_trigger = yes + } + custom = hold_court.5030.courtiers + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + if = { + limit = { + is_male = yes + } + add_character_modifier = { + modifier = hold_court_written_language_men_modifier + years = 20 + } + } + else = { + add_character_modifier = { + modifier = hold_court_written_language_women_modifier + years = 20 + } + } + } + } + + option = { # Embrace it and task your Court Tutor with teaching it + name = hold_court.5030.b + trigger = { + exists = scope:court_tutor + } + #If you're part of the gender minority you get a boost as well + if = { + limit = { + OR = { + AND = { + OR = { + has_realm_law = male_only_law + has_realm_law = male_preference_law + } + is_female = yes + } + AND = { + OR = { + has_realm_law = female_only_law + has_realm_law = female_preference_law + } + is_male = yes + } + } + } + if = { + limit = { + is_male = yes + } + add_character_modifier = { + modifier = hold_court_written_language_men_advanced_modifier + years = 20 + } + } + else = { + add_character_modifier = { + modifier = hold_court_written_language_women_advanced_modifier + years = 20 + } + } + } + #Boost all courtiers of the relevant gender + every_courtier = { + limit = { + hold_court_5030_courtier_basic_trigger = yes + } + custom = hold_court.5030.courtiers + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + if = { + limit = { + is_male = yes + } + add_character_modifier = { + modifier = hold_court_written_language_men_advanced_modifier + years = 20 + } + } + else = { + add_character_modifier = { + modifier = hold_court_written_language_women_advanced_modifier + years = 20 + } + } + } + } + + option = { # Use their expertise for other things + name = hold_court.5030.c + scope:courtier = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -15 + } + } + add_character_modifier = { + modifier = invented_code_resistance_modifier + years = 5 + } + stress_impact = { + paranoid = medium_stress_impact_loss + } + } + + after = { + scope:courtier = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:court_tutor } + scope:court_tutor = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + + + + + + + + + + +################################################## +# Claudia + +################################################## +# 6000 Empty Granaries +# 6010 Land Grants +# 6020 Hawks and Doves +# 6030 From Beyond the Border +# 6040 A Lost Treasure +# 6050 - 6051 A Holy Tomb +# 6060 A Convenient Offer +# 6070 Budding Ally +# 6080 Settling the [people] +# 6090 Heretics at Large +# 6100 - 6101 A Land at War +# 6110 A Ravaged Land +# 6120 - 6121 The Day of Truth +# 6130 The Cadastre +# 6140 A Cumbersome Gift +# 6150 The End Is Nigh! +# 6160 Empty Coffers +# 6170 Ignoble Imprisonment +# 6180 The Shadow Behind the Throne +# 6190 A Shadow in the Night +# 6200 - 6201 The Monster of X +# 6210 A Land of Barbarians +# 6220 Studying the Dead +# 6230 A Massive Problem +################################################## + +################################################## +# Empty Granaries +# by Claudia Baldassi +# 6000 +################################################## + +# A province has been hit by a famine and is asking for your help. What do you do? # + +scripted_trigger hold_court_6000_valid_province_trigger = { + OR = { + has_province_modifier = recently_looted_modifier + has_province_modifier = disease_spreading_modifier + has_province_modifier = winter_harsh_modifier + barony = { + holder ?= { + has_character_flag = recently_occupied_flag + } + } + } + barony = { + holder ?= { + this != root + is_available_ai_adult = yes + has_court_event_flag = no + } + } +} + +scripted_trigger hold_court_6000_valid_inspector_trigger = { + has_court_event_flag = no + OR = { + stewardship >= 14 + has_trait = education_stewardship_2 + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + has_trait = administrator + } + NOR = { + has_trait = lazy + is_spouse_of = root + is_concubine_of = root + } + is_councillor = no + is_available_ai_adult = yes +} + +hold_court.6000 = { + type = court_event + title = hold_court.6000.t + desc = { + desc = hold_court.6000.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:6000_poor = { + has_character_flag = recently_occupied_flag + } + } + desc = hold_court.6000.desc_occupation + } + triggered_desc = { + trigger = { + scope:6000_province = { + has_province_modifier = recently_looted_modifier + } + } + desc = hold_court.6000.desc_raiding + } + triggered_desc = { + trigger = { + scope:6000_province = { + has_province_modifier = disease_spreading_modifier + } + } + desc = hold_court.6000.desc_epidemics + } + triggered_desc = { + trigger = { + scope:6000_province = { + has_province_modifier = winter_harsh_modifier + } + } + desc = hold_court.6000.desc_winter + } + } + desc = hold_court.6000.desc_middle + triggered_desc = { + trigger = { + exists = scope:6000_count + } + desc = hold_court.6000.desc_count + } + desc = hold_court.6000.desc_ending + } + theme = court + lower_left_portrait = scope:6000_count + lower_right_portrait = scope:inspector + court_scene = { + button_position_character = scope:6000_poor + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6000_poor = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_realm_province = { + hold_court_6000_valid_province_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_realm_province = { + limit = { + hold_court_6000_valid_province_trigger = yes + } + save_scope_as = 6000_province + } + scope:6000_province = { + barony = { + holder = { + save_scope_as = 6000_poor + } + } + } + if = { + limit = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + random_court_position_holder = { + type = seneschal_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = inspector + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + any_courtier_or_guest = { + hold_court_6000_valid_inspector_trigger = yes + } + } + random_courtier_or_guest = { + limit = { + hold_court_6000_valid_inspector_trigger = yes + } + save_scope_as = inspector + court_event_character_flag_effect = yes + } + } + if = { + limit = { + scope:6000_province.county.holder = { + NOR = { + this = root + this = scope:6000_poor + } + } + } + scope:6000_province.county.holder = { + save_scope_as = 6000_count + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: send money + option = { + name = hold_court.6000.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= medium_gold_value + } + } + pay_treasury_or_gold = { + target = scope:6000_poor + value = medium_treasury_or_gold_value + } + add_hook = { + type = favor_hook + target = scope:6000_poor + } + every_sub_realm_county = { + limit = { + title_province = { hold_court_6000_valid_province_trigger = yes } + } + add_county_modifier = { + modifier = invested_in_province_modifier + years = 10 + } + } + if = { + limit = { exists = scope:6000_count } + scope:6000_count = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 5 + + modifier = { + gold < 0 + add = -10 + } + modifier = { + short_term_gold >= medium_gold_value + add = 5 + } + modifier = { + OR = { + has_trait = generous + has_trait = improvident + has_trait = profligate + } + add = 15 + } + } + } + + #Option B: less taxes + option = { + name = hold_court.6000.b + every_sub_realm_county = { + limit = { + title_province = { hold_court_6000_valid_province_trigger = yes } + } + add_county_modifier = { + modifier = court_tax_relief_county_modifier + years = 10 + } + } + if = { + limit = { exists = scope:6000_count } + scope:6000_count = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + } + add_hook = { + type = indebted_hook + target = scope:6000_poor + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 5 + + modifier = { + gold < 0 + add = -5 + } + modifier = { + OR = { + has_trait = greedy + ai_greed >= medium_positive_ai_value + } + add = -10 + } + } + } + + #Option C: send inspector - limited to adequate character + option = { + name = hold_court.6000.c + trigger = { + exists = scope:inspector + } + custom_tooltip = hold_court.6000.c.tt + scope:inspector = { + add_character_modifier = { + modifier = hold_court_inspector_modifier + years = 10 + } + } + remove_courtier_or_guest = { + character = scope:inspector + new_location = scope:6000_province + } + ai_chance = { + base = 10 + } + } + + #Option D: they can manage it on their own + option = { + name = hold_court.6000.d + stress_impact = { + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 2 + + modifier = { + has_trait = lazy + add = 10 + } + modifier = { + OR = { + has_trait = just + has_trait = generous + has_trait = compassionate + has_trait = gregarious + } + add = -5 + } + } + } + + after = { + if = { + limit = { + exists = scope:inspector + } + scope:inspector = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# From Beyond the Border +# by Claudia Baldassi +# 6030 +################################################## + +# A bilingual monk from a (recently conquered) county of a different culture is offering their translation of the great works of their culture into your language # + +scripted_trigger hold_court_6030_valid_county_trigger = { + culture = { + this != root.culture + save_temporary_scope_as = 6030_border_culture + } + any_neighboring_county = { + holder = { + this != root + culture = scope:6030_border_culture + } + } + any_county_province = { + has_holding_type = church_holding + } + religion = { + any_faith = { + has_doctrine = tenet_monasticism + } + } +} + +hold_court.6030 = { + type = court_event + title = hold_court.6030.t + desc = hold_court.6030.desc + theme = court + court_scene = { + button_position_character = scope:6030_monk + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6030_monk = { + group = petitioners_group + animation = personality_rational + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 25 } + + trigger = { + any_held_county = { + hold_court_6030_valid_county_trigger = yes + } + } + + weight_multiplier = { + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_held_county = { + limit = { + hold_court_6030_valid_county_trigger = yes + } + save_scope_as = 6030_border + } + scope:6030_border = { + random_county_province = { + limit = { + has_holding_type = church_holding + } + save_scope_as = 6030_church + } + } + create_character = { + location = root.capital_province + template = priest_character_template + faith = scope:6030_border.faith + culture = scope:6030_border.culture + gender_female_chance = root_faith_clergy_gender_female_chance + trait = devoted + save_scope_as = 6030_monk + } + hidden_effect = { + add_courtier = scope:6030_monk + } + scope:6030_monk = { + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: accept the translation + option = { + name = hold_court.6030.a + add_prestige = minor_prestige_gain + change_current_court_grandeur = minor_court_grandeur_gain + scope:6030_monk = { select_and_move_to_pool_effect = yes } + culture = { + change_cultural_acceptance = { + target = scope:6030_monk.culture + value = minor_cultural_acceptance_value + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + scope:6030_monk = { + add_character_flag = 6030_remove_char_flag + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + #Option B: you ask them to stay and teach you + option = { + name = hold_court.6030.b + trigger = { + learning >= 12 + } + skill = learning + add_prestige = medium_prestige_gain + change_current_court_grandeur = minor_court_grandeur_gain + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:6030_monk + COURT_POS = court_tutor_court_position + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_tutor + CANDIDATE = scope:6030_monk + } + } + add_character_modifier = { + modifier = hold_court_bilingual_readings_modifier + years = 10 + } + culture = { + change_cultural_acceptance = { + target = scope:6030_monk.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + stress_impact = { + content = minor_stress_impact_gain + impatient = minor_stress_impact_gain + irritable = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { + has_trait = content + add = -25 + } + modifier = { + has_trait = impatient + add = -25 + } + modifier = { + has_trait = irritable + add = -50 + } + modifier = { + has_trait = arrogant + add = -50 + } + modifier = { + has_trait = lazy + add = -50 + } + modifier = { + has_trait = ambitious + add = 50 + } + } + } + + #Option C: I don't care + option = { + name = hold_court.6030.c + scope:6030_monk = { select_and_move_to_pool_effect = yes } + scope:6030_monk = { + add_character_flag = 6030_remove_char_flag + } + stress_impact = { + lazy = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + } + modifier = { + has_trait = lazy + add = 50 + } + } + } + + after = { + scope:6030_monk = { + clear_court_event_participation = yes + if = { + limit = { has_character_flag = 6030_remove_char_flag } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Lost Treasure +# by Claudia Baldassi +# 6040 +################################################## + +# Scribes from a remote monastery think they've found a rare/long-lost manuscript. It might be a fake, something worthless, or an artifact # + +hold_court.6040 = { + type = court_event + title = hold_court.6040.t + desc = hold_court.6040.desc + theme = court + lower_left_portrait = scope:antiquarian + court_scene = { + button_position_character = scope:6040_monk + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6040_monk = { + group = petitioners_group + animation = ecstasy + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_realm_province = { + has_holding_type = church_holding + religion = { + any_faith = { + has_doctrine = tenet_monasticism + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_realm_province = { + limit = { + has_holding_type = church_holding + religion = { + any_faith = { + has_doctrine = tenet_monasticism + } + } + } + save_scope_as = 6040_church + } + create_character = { + location = root.capital_province + template = priest_character_template + faith = scope:6040_church.faith + gender_female_chance = root_faith_clergy_gender_female_chance + trait = devoted + save_scope_as = 6040_monk + } + scope:6040_monk = { + court_event_character_flag_effect = yes + } + if = { + limit = { + employs_court_position = antiquarian_court_position + } + court_position:antiquarian_court_position = { save_scope_as = antiquarian } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option B: send for the antiquarian - if you have one + option = { + name = hold_court.6040.b + trigger = { + exists = scope:antiquarian + } + random_list = { + 10 = { #it's an artifact! + desc = hold_court.6040.c.tt.4 + send_interface_toast = { + title = hold_court_6040_b_artifact + random_dummy_gender_effect = yes + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:lunatic + SET_TOPIC = flag:artifact_book_voynich + } + } + scope:antiquarian = { add_learning_skill = 2 } + add_prestige = medium_prestige_gain + } + 35 = { #it's an old book + desc = hold_court.6040.c.tt.3 + send_interface_toast = { + title = hold_court_6040_b_generic + scope:antiquarian = { add_learning_skill = 1 } + add_prestige = minor_prestige_gain + } + } + 30 = { #they have no clue + modifier = { + factor = 0 + scope:antiquarian = { + OR = { + has_trait = education_learning_4 + has_trait = education_learning_5 + has_trait = intellect_good_3 + has_trait = scholar + learning > 20 + } + } + } + modifier = { + add = -20 + scope:antiquarian = { + OR = { + has_trait = education_learning_3 + has_trait = intellect_good_2 + learning >= 15 + learning <= 20 + } + } + } + desc = hold_court.6040.b.tt + send_interface_toast = { + title = hold_court_6040_b_clueless + add_character_modifier = hold_court_mysterious_book_modifier + add_prestige = medium_prestige_loss + } + } + 20 = { #it's a fake! + desc = hold_court.6040.c.tt + send_interface_toast = { + title = hold_court_6040_b_fake + add_prestige = medium_prestige_gain + scope:antiquarian = { add_learning_skill = 2 } + } + } + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + #Option C: study it yourself - if you can + option = { + name = hold_court.6040.c + trigger = { + learning >= 12 + } + skill = learning + random_list = { + 30 = { #it's an old book + desc = hold_court.6040.c.tt.3 + send_interface_toast = { + title = hold_court_6040_b_generic + add_learning_skill = 1 + add_prestige = minor_prestige_gain + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:lunatic + SET_TOPIC = flag:artifact_book_voynich + } + } + } + 50 = { #you have no clue + modifier = { + factor = 0 + OR = { + has_trait = education_learning_4 + has_trait = education_learning_5 + has_trait = intellect_good_3 + has_trait = scholar + learning > 20 + } + } + modifier = { + add = -20 + OR = { + has_trait = education_learning_3 + has_trait = intellect_good_2 + AND = { + learning <= 20 + learning >= 15 + } + } + } + desc = hold_court.6040.c.tt.2 + send_interface_toast = { + title = hold_court_6040_c_clueless + add_prestige = medium_prestige_loss + add_character_modifier = hold_court_mysterious_book_modifier + } + } + 15 = { #it's a fake! + desc = hold_court.6040.c.tt + send_interface_toast = { + title = hold_court_6040_b_fake + add_prestige = medium_prestige_gain + add_learning_skill = 2 + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_energy = 0.25 + } + } + } + + #Option D: it's clearly demonic! + option = { + name = hold_court.6040.d + trigger = { + OR = { + has_trait = zealous + has_trait = theologian + } + } + add_piety = major_piety_gain + add_prestige = minor_prestige_loss + add_dread = minor_dread_gain + add_stress = major_stress_impact_loss + ai_chance = { + base = 200 + } + } + + #Option E: who cares about books? + option = { + name = hold_court.6040.e + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + } + modifier = { + has_trait = lazy + add = 50 + } + } + } + + after = { + scope:6040_monk = { + clear_court_event_participation = yes + silent_disappearance_effect = yes + } + if = { + limit = { exists = scope:antiquarian } + scope:antiquarian = { clear_court_event_participation = yes } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Holy Tomb +# by Claudia Baldassi +# 6050 - 6051 +################################################## + +# The tomb of a local saint has been growing in popularity. The devotees of the saint are now asking for a land grant to support the growing religious establishment there. # + +scripted_trigger hold_court_6050_religion_trigger = { + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:islam_religion + religion = religion:buddhism_religion + religion = religion:hinduism_religion + } +} + +hold_court.6050 = { + type = court_event + title = hold_court.6050.t + desc = { + desc = hold_court.6050.desc + triggered_desc = { + trigger = { + exists = scope:6050_pop.faith.religious_head + scope:6050_pop.faith.religious_head = root + } + desc = hold_court.6050.desc_hof + } + } + theme = court + lower_left_portrait = scope:6050_holy + court_scene = { + button_position_character = scope:6050_pop + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6050_pop = { + group = petitioners_group + animation = ecstasy + } + scope:chaplain = { + group = petitioners_group + animation = ecstasy + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + #Note: This event is triggered by hold_court.6051 and cannot have any triggers of its own. All triggers must be in hold_court.6051 or the queue can get stuck here forever. + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + create_character = { + location = root.capital_province + template = servant_character + faith = scope:6050_tomb.faith + culture = scope:6050_tomb.culture + save_scope_as = 6050_pop + } + scope:6050_pop = { + court_event_character_flag_effect = yes + } + cp:councillor_court_chaplain = { + save_scope_as = chaplain + court_event_character_flag_effect = yes + } + if = { + limit = { + exists = scope:6050_pop.faith.religious_head + scope:6050_pop.faith.religious_head != root + } + random = { + chance = 20 + add_character_flag = { + flag = 6050_church_approves + days = 10 + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: create a temple on the tomb + option = { + name = hold_court.6050.a + trigger = { + NOT = { has_trait = lifestyle_mystic } + } + scope:6050_tomb = { + set_holding_type = church_holding + } + if = { + limit = { + OR = { + has_character_flag = 6050_church_approves + AND = { + exists = scope:6050_pop.faith.religious_head + scope:6050_pop.faith.religious_head = root + } + } + } + add_piety = major_piety_gain + } + else = { + add_piety = major_piety_loss + } + scope:6050_tomb.county = { + add_county_modifier = { + modifier = tougher_to_convert + years = 10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: limited to mystic: relic + option = { + name = hold_court.6050.b + trigger = { has_trait = lifestyle_mystic } + religion = { save_scope_as = statue_religion } + create_artifact = { + name = artifact_pedestal_reliquary_6050_saint_name + description = artifact_pedestal_reliquary_6050_saint_desc + type = pedestal + template = 6050_relic_template + visuals = reliquary + modifier = artifact_monthly_piety_3_modifier + save_scope_as = 6050_relic + } + scope:6050_relic = { + set_variable = { # required to track equipability in template + name = statue_religion + value = root.religion + } + } + scope:6050_tomb = { + set_holding_type = church_holding + } + if = { + limit = { + OR = { + has_character_flag = 6050_church_approves + AND = { + exists = scope:6050_pop.faith.religious_head + scope:6050_pop.faith.religious_head = root + } + } + } + add_piety = major_piety_gain + } + else = { + add_piety = major_piety_loss + } + scope:6050_tomb.county = { + add_county_modifier = { + modifier = tougher_to_convert + years = 10 + } + } + ai_chance = { + base = 200 + } + } + + #Option C: persecute the local cult + option = { + name = hold_court.6050.c + add_dread = medium_dread_gain + if = { + limit = { + OR = { + NOT = { + has_character_flag = 6050_church_approves + } + AND = { + exists = scope:6050_pop.faith.religious_head + scope:6050_pop.faith.religious_head = root + } + } + } + add_piety = major_piety_gain + } + if = { + limit = { + scope:6050_tomb.county.faith != root.faith + } + scope:6050_tomb.county = { + set_county_faith = root.faith + } + } + scope:6050_tomb.county = { + change_county_control = 50 + } + stress_impact = { + lifestyle_mystic = medium_stress_impact_gain + trusting = minor_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + if = { + limit = { + has_character_flag = 6050_church_approves + } + stress_impact = { + zealous = major_stress_impact_gain + } + } + else = { + stress_impact = { + zealous = major_stress_impact_loss + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = trusting + add = -25 + } + modifier = { + has_trait = lifestyle_mystic + add = -50 + } + modifier = { + has_trait = compassionate + add = -75 + } + modifier = { + has_trait = forgiving + add = -75 + } + } + } + #Option D: ignore them + option = { + name = hold_court.6050.d + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 50 + } + } + } + + after = { + scope:6050_pop = { + clear_court_event_participation = yes + silent_disappearance_effect = yes + } + scope:chaplain = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.6051 = { #Hidden event to create the saint + type = character_event + hidden = yes + cooldown = { years = 30 } + + trigger = { + any_realm_province = { + has_holding = no + hold_court_6050_religion_trigger = yes + county.faith != root.faith + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + + immediate = { + random_realm_province = { + limit = { + has_holding = no + hold_court_6050_religion_trigger = yes + } + save_scope_as = 6050_tomb + } + create_character = { + location = scope:6050_tomb + template = local_saint_template + faith = scope:6050_tomb.faith + culture = scope:6050_tomb.culture + save_scope_as = 6050_holy + } + scope:6050_holy = { + death = { + death_reason = death_mysterious + } + } + trigger_event = hold_court.6050 + } +} + +################################################## +# A Convenient Offer +# by Claudia Baldassi +# 6060 +################################################## + +# A wealthy knight or merchant offers to purchase a piece of land from you - in exchange for money, which you really need # + +scripted_trigger hold_court_6060_valid_county_trigger = { + OR = { + has_holding = no + AND = { + is_county_capital = no + barony = { + holder = root + is_leased_out = no + } + NOT = { + has_holding_type = church_holding + } + } + } +} + +scripted_trigger hold_court_6060_valid_knight_trigger = { + has_court_event_flag = no + is_landed = no + stewardship >= 6 + NOT = { has_trait = celibate } + is_available_ai_adult = yes +} + +hold_court.6060 = { + type = court_event + title = hold_court.6060.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:6060_rich = { is_knight = yes } + } + desc = hold_court.6060.desc + } + desc = hold_court.6060.desc_merchant + } + desc = hold_court.6060.desc_ending + } + theme = court + court_scene = { + button_position_character = scope:6060_rich + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6060_rich = { + group = petitioners_group + animation = personality_bold + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + faith = { + trait_is_sin = drunkard + } + any_held_county = { + any_county_province = { + hold_court_6060_valid_county_trigger = yes + } + } + trigger_if = { + limit = { + highest_held_title_tier = tier_empire + } + gold < 500 + } + trigger_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + gold < 250 + } + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + gold <= 0 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_held_county = { + limit = { + any_county_province = { + hold_court_6060_valid_county_trigger = yes + } + } + random_county_province = { + limit = { + hold_court_6060_valid_county_trigger = yes + } + save_scope_as = 6060_offer + } + } + if = { + limit = { + any_knight = { + hold_court_6060_valid_knight_trigger = yes + } + } + random_knight = { + limit = { + hold_court_6060_valid_knight_trigger = yes + } + save_scope_as = 6060_rich + court_event_character_flag_effect = yes + } + } + else = { + create_character = { + location = root.capital_province + template = stewardship_wealth_focus_friend_template + trait = ambitious + save_scope_as = 6060_rich + } + } + hidden_effect = { + scope:6060_rich = { + court_event_character_flag_effect = yes + add_treasury_or_gold = major_treasury_or_gold_value + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: sell the province + option = { + name = hold_court.6060.a + scope:6060_rich = { + pay_treasury_or_gold = { + target = root + value = major_treasury_or_gold_value + } + } + if = { + limit = { + scope:6060_offer = { + has_holding = no + } + } + scope:6060_offer = { + set_holding_type = castle_holding + } + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:6060_offer = { + barony = { + change_title_holder = { + holder = scope:6060_rich + change = scope:change + } + } + } + custom_tooltip = { + text = character_title_cannot_be_revoked_tt + scope:6060_rich = { + add_character_flag = { + flag = titles_protected + years = 25 + } + } + } + resolve_title_and_vassal_change = scope:change + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_honor = 0.25 + } + } + } + + #Option B: Allow it as a city + option = { + name = hold_court.6060.b + scope:6060_rich = { + pay_treasury_or_gold = { + target = root + value = 250 + } + } + if = { + limit = { + scope:6060_offer = { + has_holding = no + } + } + scope:6060_offer = { + set_holding_type = city_holding + } + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:6060_offer = { + barony = { + change_title_holder = { + holder = scope:6060_rich + change = scope:change + } + } + } + custom_tooltip = { + text = character_title_cannot_be_revoked_tt + scope:6060_rich = { + add_character_flag = { + flag = titles_protected + years = 25 + } + } + } + resolve_title_and_vassal_change = scope:change + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = 0.5 + } + modifier = { + has_trait = greedy + add = 50 + } + } + } + + #Option C: refuse + option = { + name = hold_court.6060.c + ai_chance = { + base = 100 + } + } + + after = { + scope:6060_rich = { + clear_court_event_participation = yes + if = { + limit = { + is_knight = no + is_landed = no + } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Budding Ally +# by Claudia Baldassi +# 6070 +################################################## + +# An ally is asking you to raise their child as their guardian # + +scripted_trigger hold_court_6070_valid_child_trigger = { + has_court_event_flag = no + is_available_ai_child = yes + age >= 6 + age <= 12 + is_incapable = no + is_courtier_of = prev + is_alive = yes + is_landed = no +} + +scripted_trigger hold_court_6070_valid_friend_trigger = { + has_court_event_flag = no + is_available_ai_child = yes + age >= 4 + age <= 14 + is_incapable = no + is_alive = yes + is_landed = no + is_courtier_of = root +} + +scripted_trigger hold_court_6070_valid_betrothed_trigger = { + has_court_event_flag = no + is_betrothed = no + is_married = no + could_marry_character_trigger = { CHARACTER = scope:6070_child } + is_alive = yes + is_landed = no + is_incapable = no + is_courtier_of = root + basic_is_available_ai = yes +} + +hold_court.6070 = { + type = court_event + title = hold_court.6070.t + desc = hold_court.6070.desc + theme = court + court_scene = { + button_position_character = scope:6070_embassy + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6070_embassy = { + group = petitioners_group + animation = admiration + } + scope:6070_child = { + group = petitioners_group + animation = worry + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + is_adult = yes + num_of_relation_ward < 2 + any_ally = { + is_ruler = yes + is_available_ai_adult = yes + has_court_event_flag = no + any_child = { + hold_court_6070_valid_child_trigger = yes + save_temporary_scope_as = temp_ward + } + } + trigger_if = { + limit = { + scope:temp_ward = { + any_relation = { type = guardian } + } + } + any_ally = { + is_ruler = yes + is_available_ai_adult = yes + has_court_event_flag = no + any_child = { + this = scope:temp_ward + } + any_courtier_or_guest = { + has_relation_guardian = scope:temp_ward + is_available_ai_adult = yes + has_court_event_flag = no + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + random_ally = { + limit = { + any_child = { + hold_court_6070_valid_child_trigger = yes + } + } + save_scope_as = 6070_sender + court_event_character_flag_effect = yes + } + scope:6070_sender = { + random_child = { + limit = { + hold_court_6070_valid_child_trigger = yes + } + save_scope_as = 6070_child + court_event_character_flag_effect = yes + } + } + if = { + limit = { + scope:6070_sender = { + any_courtier = { + has_court_event_flag = no + is_available_healthy_ai_adult = yes + } + } + } + scope:6070_sender = { + random_courtier = { + limit = { + has_court_event_flag = no + is_available_healthy_ai_adult = yes + } + save_scope_as = 6070_embassy + court_event_character_flag_effect = yes + } + } + } + else = { + create_character = { + location = scope:6070_sender.capital_province + template = pool_repopulate_diplomacy + culture = scope:6070_sender.culture + faith = scope:6070_sender.faith + save_scope_as = 6070_embassy + } + scope:6070_embassy = { + court_event_character_flag_effect = yes + add_character_flag = 6070_remove_char_flag + } + } + if = { + limit = { + any_child = { + is_heir_of = root + hold_court_6070_valid_friend_trigger = yes + } + } + random_child = { + limit = { + is_heir_of = root + hold_court_6070_valid_friend_trigger = yes + } + save_scope_as = 6070_friend + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + any_child = { + hold_court_6070_valid_friend_trigger = yes + } + } + random_child = { + limit = { + hold_court_6070_valid_friend_trigger = yes + } + save_scope_as = 6070_friend + court_event_character_flag_effect = yes + } + } + if = { + limit = { + any_child = { + hold_court_6070_valid_betrothed_trigger = yes + } + } + random_child = { + limit = { + hold_court_6070_valid_betrothed_trigger = yes + } + save_scope_as = 6070_betrothed_temp + } + } + if = { + limit = { + exists = scope:6070_betrothed_temp + scope:6070_child = { + is_betrothed = no + could_marry_character_trigger = { CHARACTER = scope:6070_betrothed_temp } + } + } + scope:6070_betrothed_temp = { + save_scope_as = 6070_betrothed + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: Accept + option = { + name = hold_court.6070.a + scope:6070_sender = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + if = { + limit = { + scope:6070_child = { + any_relation = { type = guardian } + } + } + scope:6070_child = { + every_relation = { + type = guardian + remove_guardian_effect = { + GUARDIAN = this + WARD = scope:6070_child + RETURN_WARD = no + HIDE_OPINION = no + } + } + } + } + scope:6070_child = { + set_relation_guardian = root + } + set_variable = { + name = character_requested_as_educator + value = root + years = 10 + } + set_variable = { + name = character_making_education_request + value = scope:6070_sender + years = 10 + } + if = { + limit = { + root != scope:6070_child.host + } + root = { + add_visiting_courtier = scope:6070_child + } + } + stress_impact = { + shy = medium_stress_impact_gain + reclusive = medium_stress_impact_gain + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.25 + ai_honor = 0.25 + } + modifier = { + has_trait = shy + add = -50 + } + modifier = { + has_trait = reclusive + add = -50 + } + modifier = { + has_trait = paranoid + add = -75 + } + } + } + + #Option B: Accept + encourage friendship with your child (limited if child available) + option = { + name = hold_court.6070.b + trigger = { + exists = scope:6070_friend + } + scope:6070_sender = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 35 + } + } + if = { + limit = { + scope:6070_child = { + any_relation = { type = guardian } + } + } + scope:6070_child = { + every_relation = { + type = guardian + remove_guardian_effect = { + GUARDIAN = this + WARD = scope:6070_child + RETURN_WARD = no + HIDE_OPINION = no + } + } + } + } + scope:6070_child = { + set_relation_guardian = root + progress_towards_friend_effect = { + REASON = friend_childhood_new_home + CHARACTER = scope:6070_friend + OPINION = 10 + } + } + if = { + limit = { + root != scope:6070_child.host + } + root = { + add_visiting_courtier = scope:6070_child + } + } + stress_impact = { + shy = medium_stress_impact_gain + reclusive = medium_stress_impact_gain + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_sociability = 0.25 + } + modifier = { + has_trait = shy + add = -50 + } + modifier = { + has_trait = reclusive + add = -50 + } + modifier = { + has_trait = paranoid + add = -75 + } + } + } + + #Option C: Accept + require betrothal (limited if child available) + option = { + name = hold_court.6070.c + trigger = { + exists = scope:6070_betrothed + } + scope:6070_sender = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 40 + } + } + if = { + limit = { + scope:6070_child = { + any_relation = { type = guardian } + } + } + scope:6070_child = { + every_relation = { + type = guardian + remove_guardian_effect = { + GUARDIAN = this + WARD = scope:6070_child + RETURN_WARD = no + HIDE_OPINION = no + } + } + } + } + scope:6070_child = { + set_relation_guardian = root + create_betrothal = scope:6070_betrothed + } + if = { + limit = { + root != scope:6070_child.host + } + root = { + add_visiting_courtier = scope:6070_child + } + } + stress_impact = { + shy = medium_stress_impact_gain + reclusive = medium_stress_impact_gain + paranoid = major_stress_impact_gain + diplomat = major_stress_impact_loss + family_first = major_stress_impact_loss + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_sociability = 0.25 + } + modifier = { + has_trait = shy + add = -50 + } + modifier = { + has_trait = reclusive + add = -50 + } + modifier = { + has_trait = paranoid + add = -75 + } + modifier = { + has_trait = diplomat + add = 75 + } + modifier = { + has_trait = family_first + add = 75 + } + } + } + + #Option D: Refuse + option = { + name = hold_court.6070.d + scope:6070_sender = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + stress_impact = { + shy = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + reclusive = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_honor = -0.25 + } + modifier = { + has_trait = shy + add = 50 + } + modifier = { + has_trait = reclusive + add = 50 + } + modifier = { + has_trait = paranoid + add = 75 + } + } + } + + #Option E: Refuse because child is a menace! + option = { + name = hold_court.6070.e + trigger = { + scope:6070_child = { + OR = { + has_trait = rowdy + has_trait = bossy + has_trait = callous + has_trait = wrathful + has_trait = sadistic + } + } + } + scope:6070_sender = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -50 + } + } + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 150 + } + } + + after = { + scope:6070_sender = { + clear_court_event_participation = yes + } + scope:6070_child = { + clear_court_event_participation = yes + } + scope:6070_embassy = { + clear_court_event_participation = yes + if = { + limit = { has_character_flag = 6070_remove_char_flag } + silent_disappearance_effect = yes + } + } + if = { + limit = { exists = scope:6070_friend } + scope:6070_friend = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:6070_betrothed } + scope:6070_betrothed = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Settling the [people] +# by Claudia Baldassi +# 6080 +################################################## + +# A representative of another culture in a county you own offers to settle an unused holding. You can grant them the county, which cannot be revoked for a long while. # + +scripted_trigger hold_court_6080_valid_county_trigger = { + is_landless_type_title = no + any_county_province = { + has_holding = no + } + culture = { + this != root.culture + } +} + +hold_court.6080 = { + type = court_event + title = hold_court.6080.t + desc = hold_court.6080.desc + theme = court + court_scene = { + button_position_character = scope:6080_count + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6080_count = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_held_county = { + hold_court_6080_valid_county_trigger = yes + } + government_has_flag = government_is_feudal + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_held_county = { + limit = { + hold_court_6080_valid_county_trigger = yes + } + save_scope_as = 6080_county + } + scope:6080_county.culture = { + save_scope_as = 6080_culture + } + if = { + limit = { + any_courtier_or_guest = { + has_court_event_flag = no + is_available_healthy_ai_adult = yes + culture = { + this = scope:6080_culture + } + } + } + random_courtier_or_guest = { + limit = { + has_court_event_flag = no + is_available_healthy_ai_adult = yes + culture = { + this = scope:6080_culture + } + } + save_scope_as = 6080_count + court_event_character_flag_effect = yes + } + } + else = { + create_character = { + location = root.capital_province + template = merchant_template + culture = scope:6080_culture + save_scope_as = 6080_count + } + scope:6080_count = { + add_character_flag = 6080_remove_char_flag + court_event_character_flag_effect = yes + } + } + scope:6080_county = { + random_county_province = { + limit = { + has_holding = no + } + save_scope_as = 6080_province + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option C: Grant the barony + option = { + name = hold_court.6080.c + trigger = { + has_trait = administrator + } + scope:6080_province = { + set_holding_type = church_holding + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:6080_province = { + barony = { + change_title_holder = { + holder = scope:6080_count + change = scope:change + } + } + } + custom_tooltip = { + text = character_title_cannot_be_revoked_tt + scope:6080_count = { + add_character_flag = { + flag = titles_protected + years = 25 + } + } + } + resolve_title_and_vassal_change = scope:change + scope:6080_county = { + culture = { + change_cultural_acceptance = { + target = root.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = -50 + } + } + } + + #Option A: Grant the county + option = { + name = hold_court.6080.a + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:6080_county = { + change_title_holder = { + holder = scope:6080_count + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:6080_count = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + if = { + limit = { + government_has_flag = government_is_feudal + } + vassal_contract_set_obligation_level = { + type = title_revocation_rights + level = 1 + } + set_subject_contract_modification_blocked = yes + } + } + custom_tooltip = hold_court.6080.a.tt + scope:6080_county = { + culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_cultural_acceptance_gain + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + add_county_modifier = { + modifier = hold_court_grateful_peasants_modifier + years = 50 + } + scope:6080_province = { + random_list = { + 40 = { + set_holding_type = city_holding + } + 25 = { + set_holding_type = castle_holding + } + 15 = { + set_holding_type = church_holding + } + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = -75 + } + } + } + + #Option B: Say no + option = { + name = hold_court.6080.b + scope:6080_county = { + change_county_control = 10 + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = generous + add = -50 + } + } + } + + after = { + scope:6080_count = { + clear_court_event_participation = yes + if = { + limit = { + has_character_flag = 6080_remove_char_flag + is_landed = no + } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Heretics at Large +# by Claudia Baldassi +# 6090 +################################################## + +# A vassal comes to you begging for help because their land is overrun by heretics/infidels. # + +scripted_trigger hold_court_6090_valid_vassal_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + faith = root.faith + is_landed_or_landless_administrative = yes + capital_county ?= { + hold_court_6090_valid_county_trigger = yes + } +} + +scripted_trigger hold_court_6090_valid_county_trigger = { + is_landless_type_title = no + faith = { + this != root.faith + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } +} + +hold_court.6090 = { + type = court_event + title = hold_court.6090.t + desc = { + desc = hold_court.6090.desc + triggered_desc = { + trigger = { + exists = scope:high_almoner + } + desc = hold_court.6090.desc.almoner + } + triggered_desc = { + trigger = { + exists = scope:executioner + } + desc = hold_court.6090.desc.executioner + } + } + theme = court + lower_right_portrait = scope:high_almoner + lower_center_portrait = scope:executioner + lower_left_portrait = scope:court_chaplain + court_scene = { + button_position_character = scope:6090_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6090_vassal = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_vassal = { + hold_court_6090_valid_vassal_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_vassal = { + limit = { + hold_court_6090_valid_vassal_trigger = yes + } + save_scope_as = 6090_vassal + court_event_character_flag_effect = yes + } + if = { + limit = { + employs_court_position = high_almoner_court_position + any_court_position_holder = { + type = high_almoner_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + random_court_position_holder = { + type = high_almoner_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = high_almoner + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = executioner_court_position + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + random_court_position_holder = { + type = executioner_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = executioner + court_event_character_flag_effect = yes + } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + has_court_event_flag = no + } + } + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + court_event_character_flag_effect = yes + } + } + scope:6090_vassal = { + capital_county = { + save_scope_as = 6090_main_county + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: send court chaplain + option = { + name = hold_court.6090.a + trigger = { + exists = scope:court_chaplain + } + scope:6090_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6090_valid_county_trigger = yes + } + add_county_modifier = { + modifier = easier_to_convert + years = 15 + } + } + } + scope:court_chaplain = { + set_council_task = { + task_type = task_conversion + target = scope:6090_main_county.title_province + } + } + scope:6090_vassal = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 20 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { + has_trait = cynical + add = -75 + } + } + } + + #Option B: send the almoners + option = { + name = hold_court.6090.b + trigger = { + exists = scope:high_almoner + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + scope:6090_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6090_valid_county_trigger = yes + } + add_county_modifier = { + modifier = easier_to_convert + years = 15 + } + } + } + remove_treasury_or_gold = medium_gold_value + scope:6090_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6090_valid_county_trigger = yes + } + add_county_modifier = { + modifier = court_6090_almoners_county_modifier + years = 15 + } + } + add_opinion = { + target = root + modifier = pious_opinion + opinion = 30 + } + } + scope:high_almoner = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 30 + } + } + stress_impact = { + greedy = major_stress_impact_gain + } + change_current_court_grandeur = medium_court_grandeur_gain + add_piety = medium_piety_gain + ai_chance = { + base = 200 + modifier = { + gold < medium_gold_value + add = -200 + } + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { + has_trait = cynical + add = -75 + } + } + } + + #Option C: tolerance + option = { + name = hold_court.6090.c + trigger = { + NOT = { has_trait = zealous } + } + scope:6090_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6090_valid_county_trigger = yes + } + add_county_modifier = { + modifier = governance_1074_local_faith_respected_modifier + years = 10 + } + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + custom_tooltip = { + text = title_granted_to_local_leader_tt + create_character = { + template = servant_character + location = root.location + faith = scope:6090_main_county.faith + culture = scope:6090_main_county.culture + save_scope_as = new_ruler + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:6090_main_county = { + change_title_holder = { + holder = scope:new_ruler + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:new_ruler ?= { + if = { + limit = { + government_has_flag = government_is_feudal + } + vassal_contract_set_obligation_level = { + type = religious_rights + level = 1 + } + set_subject_contract_modification_blocked = yes + } + } + add_hook = { + target = scope:new_ruler + type = loyalty_hook + } + } + change_current_court_grandeur = minor_court_grandeur_gain + add_prestige = medium_prestige_gain + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + } + modifier = { + has_trait = cynical + add = 75 + } + } + } + + #Option D: send the executioners + option = { + name = hold_court.6090.d + trigger = { + exists = scope:executioner + } + scope:6090_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 25 + } + every_sub_realm_county = { + limit = { + hold_court_6090_valid_county_trigger = yes + } + add_county_modifier = { + modifier = court_6090_executioners_county_modifier + years = 5 + } + add_county_modifier = { + modifier = easier_to_convert + years = 15 + } + } + } + scope:executioner = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 25 + } + } + stress_impact = { + just = major_stress_impact_gain + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 0.5 + } + modifier = { + has_trait = just + add = -75 + } + modifier = { + has_trait = compassionate + add = -100 + } + modifier = { + has_trait = zealous + add = 50 + } + modifier = { + has_trait = callous + add = 75 + } + } + } + + #Option E: It's your problem + option = { + name = hold_court.6090.e + scope:6090_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + if = { + limit = { + has_trait = zealous + can_set_relation_rival_trigger = { CHARACTER = root } + } + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_province_help + OPINION = 0 + } + } + } + stress_impact = { + lazy = medium_stress_impact_loss + diligent = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 50 + } + modifier = { + has_trait = diligent + add = -75 + } + } + } + + after = { + scope:6090_vassal = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:high_almoner } + scope:high_almoner = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:executioner } + scope:executioner = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:court_chaplain } + scope:court_chaplain = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Land at War +# by Claudia Baldassi +# 6100 - 6101 +################################################## + +# Two vassals have been waging a long inconclusive war and come to you to settle the dispute # + +scripted_trigger vassal_war_char_trigger = { + has_court_event_flag = no + is_at_war = yes + is_at_war_with_liege = no + is_available_ai_adult = yes +} + +scripted_trigger vassal_war_conflict_trigger = { + any_war_participant = { + count = 0 + OR = { + top_liege = this + NOT = { is_vassal_or_below_of = root } + } + } + war_days >= 365 + attacker_war_score >= -50 + attacker_war_score <= 50 + casus_belli = { + primary_attacker = { + vassal_war_char_trigger = yes + is_vassal_of = root + } + primary_defender = { + vassal_war_char_trigger = yes + is_vassal_of = root + } + } +} + +hold_court.6100 = { + type = court_event + title = hold_court.6100.t + desc = { + desc = hold_court.6100.desc + triggered_desc = { + trigger = { + exists = scope:jester + NOR = { + scope:6100_vassal_1 = { has_trait = lifestyle_poet } + scope:6100_vassal_2 = { has_trait = lifestyle_poet } + } + } + desc = hold_court.6100.desc.jester + } + } + theme = court + lower_center_portrait = scope:jester + court_scene = { + button_position_character = scope:6100_vassal_1 + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6100_vassal_1 = { + group = petitioners_group + animation = personality_bold + } + scope:6100_vassal_2 = { + group = petitioners_group + animation = personality_bold + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { + vassal_war_char_trigger = yes + any_character_war = { vassal_war_conflict_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_vassal = { + limit = { vassal_war_char_trigger = yes } + random_character_war = { + limit = { vassal_war_conflict_trigger = yes } + save_scope_as = vassal_war + } + } + scope:vassal_war = { + primary_attacker = { + save_scope_as = 6100_vassal_1 + court_event_character_flag_effect = yes + } + primary_defender = { + save_scope_as = 6100_vassal_2 + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + has_court_event_flag = no + is_landed = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = court_jester_court_position + limit = { + has_court_event_flag = no + is_landed = no + is_available_ai_adult = yes + } + save_scope_as = jester + court_event_character_flag_effect = yes + } + } + root = { + save_scope_as = 6100_lord + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: Attacker is right + option = { + name = hold_court.6100.a + scope:vassal_war = { + end_war = attacker + } + scope:6100_vassal_1 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 50 + } + } + scope:6100_vassal_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -50 + } + } + ai_chance = { + base = 100 + modifier = { + opinion = { + target = scope:6100_vassal_1 + value >= low_positive_opinion + } + opinion = { + target = scope:6100_vassal_2 + value <= low_positive_opinion + } + add = 50 + } + modifier = { + opinion = { + target = scope:6100_vassal_1 + value >= high_positive_opinion + } + opinion = { + target = scope:6100_vassal_2 + value <= low_negative_opinion + } + add = 100 + } + } + } + + #Option B: Defender is right + option = { + name = hold_court.6100.b + scope:vassal_war = { + end_war = defender + } + scope:6100_vassal_2 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 50 + } + } + scope:6100_vassal_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -50 + } + } + ai_chance = { + base = 100 + modifier = { + opinion = { + target = scope:6100_vassal_2 + value >= low_positive_opinion + } + opinion = { + target = scope:6100_vassal_1 + value <= low_positive_opinion + } + add = 50 + } + modifier = { + opinion = { + target = scope:6100_vassal_2 + value >= high_positive_opinion + } + opinion = { + target = scope:6100_vassal_1 + value <= low_negative_opinion + } + add = 100 + } + } + } + + #Option C: ask for a white peace + option = { + name = hold_court.6100.c + trigger = { + NOT = { exists = scope:jester } + } + scope:vassal_war = { + end_war = white_peace + } + scope:6100_vassal_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + scope:6100_vassal_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + add_prestige = medium_prestige_gain + add_piety = medium_piety_gain + stress_impact = { + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { + has_trait = wrathful + add = -50 + } + } + } + + #Option D: cruel/arbitrary - throw them both in prison + option = { + name = hold_court.6100.d + trigger = { + OR = { + has_trait = arbitrary + has_trait = sadistic + has_trait = paranoid + has_trait = deceitful + has_trait = torturer + } + NOT = { exists = scope:jester } + } + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:6100_vassal_1 + } + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:6100_vassal_2 + } + add_dread = major_dread_gain + ai_chance = { + base = 200 + } + } + + #Option E: propose a duel - if possible + option = { + name = hold_court.6100.e + custom_tooltip = hold_court.6100.e.tt + trigger = { + scope:6100_vassal_1 = { + can_start_single_combat_trigger = yes + } + scope:6100_vassal_2 = { + can_start_single_combat_trigger = yes + } + NOR = { + has_trait = arbitrary + has_trait = sadistic + has_trait = paranoid + has_trait = deceitful + has_trait = torturer + } + NOT = { exists = scope:jester } + } + configure_start_single_combat_effect = { + SC_INITIATOR = scope:6100_vassal_1 + SC_ATTACKER = scope:6100_vassal_1 + SC_DEFENDER = scope:6100_vassal_2 + FATALITY = no + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = hold_court.6101 + INVALIDATION_EVENT = fp1_tbc.0102 + } + add_prestige = medium_prestige_gain + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + #Option F: jester proposes a funny solution/competition + option = { + name = hold_court.6100.f + trigger = { + exists = scope:jester + NOR = { + scope:6100_vassal_1 = { has_trait = lifestyle_poet } + scope:6100_vassal_2 = { has_trait = lifestyle_poet } + } + } + scope:6100_vassal_1 = { + add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -75 + } + } + scope:6100_vassal_2 = { + add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -75 + } + } + scope:6100_vassal_1 = { + duel = { + skill = diplomacy + target = scope:6100_vassal_2 + 10 = { + desc = hold_court.6100.f.1 + compare_modifier = { + value = scope:duel_value + multiplier = 3 + } + root = { + send_interface_toast = { + title = hold_court.6100.f.1.t + scope:vassal_war = { + end_war = attacker + } + } + } + } + 10 = { + desc = hold_court.6100.f.2 + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + root = { + send_interface_toast = { + title = hold_court.6100.f.2.t + scope:vassal_war = { + end_war = defender + } + } + } + } + } + } + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_sociability = 0.25 + } + } + } + + #Option G: solve your own problems + option = { + name = hold_court.6100.g + custom_tooltip = hold_court.6100.g.tt + scope:6100_vassal_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + scope:6100_vassal_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + stress_impact = { + lazy = medium_stress_impact_loss + content = medium_stress_impact_loss + diligent = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 50 + } + modifier = { + has_trait = content + add = 50 + } + modifier = { + has_trait = diligent + add = -50 + } + modifier = { + has_trait = compassionate + add = -50 + } + } + } + + after = { + scope:6100_vassal_1 = { + clear_court_event_participation = yes + } + scope:6100_vassal_2 = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:jester } + scope:jester = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.6101 = { + hidden = yes + + immediate = { + scope:6100_lord = { + send_interface_toast = { + title = hold_court.6101.t + left_icon = scope:sc_victor + right_icon = scope:sc_loser + custom_tooltip = hold_court.6101.tt + } + } + + if = { + limit = { + scope:sc_victor = { + this = scope:6100_vassal_1 + } + } + scope:vassal_war = { + end_war = attacker + } + scope:6100_vassal_1 = { + add_prestige = medium_prestige_gain + } + } + else = { + scope:vassal_war = { + end_war = defender + } + scope:6100_vassal_2 = { + add_prestige = medium_prestige_gain + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } +} + +################################################## +# A Ravaged Land +# by Claudia Baldassi +# 6110 +################################################## + +# Two vassals are fighting a bitter & bloody war, with the land/peasants suffering as it rages onwards. The peasants come to complain and ask for a peaceful solution # + +scripted_trigger hold_court_6110_valid_pool_character_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + is_lowborn = yes + OR = { + faith = scope:6110_vassal_1.capital_county.faith + faith = scope:6110_vassal_2.capital_county.faith + } + OR = { + culture = scope:6110_vassal_1.capital_county.culture + culture = scope:6110_vassal_2.capital_county.culture + } +} + +hold_court.6110 = { + type = court_event + title = hold_court.6110.t + desc = { + desc = hold_court.6110.desc + triggered_desc = { + trigger = { + exists = scope:almoner + } + desc = hold_court.6110.desc.almoner + } + } + theme = court + lower_left_portrait = scope:6110_vassal_1 + lower_center_portrait = scope:6110_vassal_2 + court_scene = { + button_position_character = scope:6110_rep + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6110_rep = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { + vassal_war_char_trigger = yes + any_character_war = { vassal_war_conflict_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_vassal = { + limit = { vassal_war_char_trigger = yes } + random_character_war = { + limit = { vassal_war_conflict_trigger = yes } + save_scope_as = vassal_war + } + } + scope:vassal_war = { + primary_attacker = { + save_scope_as = 6110_vassal_1 + court_event_character_flag_effect = yes + } + primary_defender = { + save_scope_as = 6110_vassal_2 + court_event_character_flag_effect = yes + } + } + if = { + limit = { + any_pool_character = { + province = root.capital_province + hold_court_6110_valid_pool_character_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { + hold_court_6110_valid_pool_character_trigger = yes + } + save_scope_as = 6110_rep + } + } + else = { + create_character = { + location = root.capital_province + template = servant_character + faith = scope:6110_vassal_2.capital_county.faith + culture = scope:6110_vassal_2.capital_county.culture + save_scope_as = 6110_rep + } + scope:6110_rep = { + add_character_flag = 6110_remove_char_flag + } + } + scope:6110_rep = { + court_event_character_flag_effect = yes + } + hidden_effect = { add_courtier = scope:6110_rep } + if = { + limit = { + employs_court_position = high_almoner_court_position + any_court_position_holder = { + type = high_almoner_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = high_almoner_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = almoner + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: decree ceasefire (enforce demands) + option = { + name = hold_court.6110.a + scope:vassal_war = { + end_war = attacker + } + scope:6110_vassal_1 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_1 + change_county_control = 15 + } + } + scope:6110_vassal_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_2 + change_county_control = 15 + } + } + ai_chance = { + base = 100 + modifier = { + gold < medium_gold_value + add = -100 + } + modifier = { + has_trait = profligate + add = 75 + } + modifier = { + has_trait = improvident + add = 75 + } + modifier = { + has_trait = greedy + add = -75 + } + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + #Option B: decree ceasefire (white peace) + option = { + name = hold_court.6110.b + scope:vassal_war = { + end_war = white_peace + } + scope:6110_vassal_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_1 + change_county_control = 15 + } + } + scope:6110_vassal_2 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_2 + change_county_control = 15 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { + has_trait = wrathful + add = -50 + } + } + } + + #Option C: decree ceasefire (surrender) + option = { + name = hold_court.6110.c + scope:vassal_war = { + end_war = defender + } + scope:6110_vassal_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_1 + change_county_control = 15 + } + } + scope:6110_vassal_2 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_2 + change_county_control = 15 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { + has_trait = wrathful + add = -50 + } + } + } + + #Option E: don't meddle + option = { + name = hold_court.6110.e + scope:6110_vassal_1 = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_1 + change_county_control = -5 + } + } + scope:6110_vassal_2 = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_2 + change_county_control = 5 + } + } + ai_chance = { + base = 100 + } + } + + after = { + scope:6100_vassal_1 = { + clear_court_event_participation = yes + } + scope:6100_vassal_2 = { + clear_court_event_participation = yes + } + scope:6110_rep = { + clear_court_event_participation = yes + if = { + limit = { + has_character_flag = 6110_remove_char_flag + is_imprisoned = no + } + silent_disappearance_effect = yes + } + } + if = { + limit = { exists = scope:almoner } + scope:almoner = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# The Day of Truth +# by Claudia Baldassi +# 6120 - 6121 +################################################## + +# Your steward requires you to invest in a large-scale survey of your kingdom and people to make taxation more efficient (think Domesday Book) # + +scripted_effect hold_court_6120_rewards = { + every_sub_realm_county = { + custom = all_realm_county + change_county_control = 20 + } + if = { + limit = { + any_court_position_holder = { + type = seneschal_court_position + } + } + add_character_modifier = { + modifier = 6121_seneschal_domesday_modifier + years = 30 + } + } + else = { + add_character_modifier = { + modifier = 6121_steward_domesday_modifier + years = 30 + } + } +} + +hold_court.6120 = { + type = court_event + title = hold_court.6120.t + desc = { + desc = hold_court.6120.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:keeper_swans + } + desc = hold_court.6120.desc.swans + } + triggered_desc = { + trigger = { + exists = scope:seneschal + } + desc = hold_court.6120.desc.seneschal + } + } + triggered_desc = { + trigger = { + exists = scope:jester + } + desc = hold_court.6120.desc.jester + } + } + theme = court + lower_left_portrait = scope:seneschal + lower_center_portrait = scope:keeper_swans + lower_right_portrait = scope:jester + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:steward + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:steward = { + group = petitioners_group + animation = personality_rational + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + NOT = { #not using cooldown because the cooldown is only valid if you do the survey + has_character_flag = 6120_has_domesday_book_flag + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + if = { + limit = { + employs_court_position = keeper_of_swans_court_position + any_court_position_holder = { + type = keeper_of_swans_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = keeper_of_swans_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = keeper_swans + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = seneschal_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = seneschal + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + has_court_event_flag = no + is_available_ai_adult = yes + is_landed = no + } + } + random_court_position_holder = { + type = court_jester_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + is_landed = no + } + save_scope_as = jester + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: yes + option = { + name = hold_court.6120.a + trigger = { + NOT = { exists = scope:seneschal } + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = major_treasury_or_gold_value + add_character_flag = { + flag = 6120_has_domesday_book_flag + years = 50 + } + show_as_tooltip = { + random_list = { + 100 = { + show_chance = no + desc = hold_court.6120.a.tt + hold_court_6120_rewards = yes + } + } + } + hidden_effect = { + scope:steward = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + trigger_event = { + id = hold_court.6121 + days = 185 + } + } + stress_impact = { + lazy = major_stress_impact_gain + content = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + gold < major_gold_value + add = -100 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_rationality = 0.5 + ai_greed = -0.25 + } + modifier = { + has_trait = lazy + add = -75 + } + modifier = { + has_trait = content + add = -75 + } + } + } + + #Option C: did you say TAXES?? + option = { + name = hold_court.6120.c + every_vassal = { + limit = { + is_ai = yes + } + custom = 6120_every_vassal + pay_treasury_or_gold = { + target = root + value = tiny_treasury_or_gold_value + } + } + add_character_modifier = { + modifier = 6120_extra_taxes_modifier + years = 10 + } + stress_impact = { + generous = major_stress_impact_gain + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = generous + add = -75 + } + modifier = { + has_trait = compassionate + add = -75 + } + modifier = { + has_trait = just + add = -75 + } + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + #Option D: no + option = { + name = hold_court.6120.d + trigger = { + NOT = { exists = scope:jester } + } + stress_impact = { + ambitious = medium_stress_impact_gain + diligent = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = ambitious + add = -50 + } + modifier = { + has_trait = diligent + add = -75 + } + } + } + + #Option E: no but with jester + option = { + name = hold_court.6120.e + trigger = { + exists = scope:jester + } + scope:jester = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + stress_impact = { + ambitious = major_stress_impact_gain + diligent = massive_stress_impact_gain + } + ai_chance = { + base = 150 + modifier = { + has_trait = ambitious + add = -50 + } + modifier = { + has_trait = diligent + add = -75 + } + } + } + + after = { + scope:steward = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:keeper_swans } + scope:keeper_swans = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:seneschal } + scope:seneschal = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:jester } + scope:jester = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.6121 = { + type = character_event + title = hold_court.6121.t + desc = hold_court.6121.desc + theme = court + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:6121_responsible + animation = personality_rational + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + OR = { + AND = { + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + } + } + AND = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + is_available_ai_adult = yes + } + } + } + } + + immediate = { + if = { + limit = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = seneschal_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = 6121_responsible + } + } + else = { + cp:councillor_steward = { + save_scope_as = 6121_responsible + } + } + } + + option = { + name = hold_court.6121.a + hold_court_6120_rewards = yes + } +} + +################################################## +# The Cadastre +# by Claudia Baldassi +# 6130 +################################################## + +# Someone suggests a "cadastral survey" - high cost for an increase of development in all counties you hold # + +scripted_trigger hold_court_6130_valid_child_trigger = { + has_court_event_flag = no + is_courtier_of = root + age >= 11 + is_available_ai_child = yes +} + +scripted_effect hold_court_6130_a_rewards = { + if = { + limit = { + OR = { + has_character_flag = 6130_seneschal_assigned + has_character_flag = 6131_seneschal_assigned + } + } + every_held_county = { + custom = custom.every_held_county + change_development_progress_with_overflow = 50 + } + } + else_if = { + limit = { + OR = { + has_character_flag = 6130_steward_assigned + has_character_flag = 6131_steward_assigned + } + } + every_held_county = { + custom = custom.every_held_county + change_development_progress_with_overflow = 35 + } + } + scope:6130_proposer = { + add_prestige = minor_prestige_gain + } + every_held_county = { + custom = custom.every_held_county + add_county_modifier = { + modifier = 6131_mapped_wilderness_county_modifier + years = 10 + } + } + add_prestige = medium_prestige_gain +} + +hold_court.6130 = { + type = court_event + title = hold_court.6130.t + desc = hold_court.6130.desc + theme = court + lower_left_portrait = scope:tutor + lower_center_portrait = scope:m_hunt + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:6130_proposer + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6130_proposer = { + group = petitioners_group + animation = personality_rational + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + NOT = { # not cooldown because it's only valid if you do the cadastre + has_character_flag = 6130_has_done_cadastre + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + if = { + limit = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = seneschal_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = 6130_proposer + save_scope_as = seneschal + court_event_character_flag_effect = yes + } + add_character_flag = { + flag = 6130_seneschal_assigned + months = 6 + } + } + else = { + cp:councillor_steward = { + save_scope_as = 6130_proposer + court_event_character_flag_effect = yes + } + add_character_flag = { + flag = 6130_steward_assigned + days = 180 + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: yes + option = { + name = hold_court.6130.a + remove_treasury_or_gold = major_treasury_or_gold_value + show_as_tooltip = { + random_list = { + 100 = { + show_chance = no + desc = hold_court.6130.a.tt + hold_court_6130_a_rewards = yes + } + } + } + hidden_effect = { + trigger_event = { + id = hold_court.6131 + days = { 93 171 } + } + add_character_flag = { + flag = 6130_has_done_cadastre + years = 20 + } + } + stress_impact = { + lazy = minor_stress_gain + greedy = medium_stress_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = -50 + } + modifier = { + has_trait = greedy + add = -75 + } + modifier = { + gold < major_treasury_or_gold_value + factor = 0 + } + ai_value_modifier = { + ai_greed = -0.25 + ai_rationality = 0.25 + } + } + } + + #Option D: no + option = { + name = hold_court.6130.d + scope:6130_proposer = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + if = { + limit = { + has_character_flag = 6130_seneschal_assigned + } + remove_character_flag = 6130_seneschal_assigned + } + if = { + limit = { + has_character_flag = 6130_steward_assigned + } + remove_character_flag = 6130_steward_assigned + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.25 + } + modifier = { + gold < major_gold_value + add = 100 + } + } + } + + after = { + scope:6130_proposer = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:m_hunt } + scope:m_hunt = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.6131 = { + type = character_event + title = hold_court.6131.t + desc = hold_court.6131.desc + theme = court + right_portrait = { + character = scope:6131_proposer + animation = personality_rational + } + + trigger = { + trigger_if = { + limit = { + scope:6130_proposer = { is_alive = no } + } + OR = { + exists = cp:councillor_steward + any_court_position_holder = { + type = seneschal_court_position + } + } + } + } + + immediate = { + if = { + limit = { + scope:6130_proposer = { is_alive = yes } + } + scope:6130_proposer = { + save_scope_as = 6131_proposer + } + } + else_if = { + limit = { + any_court_position_holder = { + type = seneschal_court_position + } + } + random_court_position_holder = { + type = seneschal_court_position + save_scope_as = 6131_proposer + } + add_character_flag = { + flag = 6131_seneschal_assigned + days = 3 + } + } + else = { + cp:councillor_steward = { + save_scope_as = 6131_proposer + } + add_character_flag = { + flag = 6131_steward_assigned + days = 3 + } + } + if = { + limit = { + scope:6130_proposer = { + is_alive = no + } + } + if = { + limit = { + has_character_flag = 6130_seneschal_assigned + } + remove_character_flag = 6130_seneschal_assigned + } + if = { + limit = { + has_character_flag = 6130_steward_assigned + } + remove_character_flag = 6130_steward_assigned + } + } + } + + option = { + name = hold_court.6131.a + hold_court_6130_a_rewards = yes + } +} + +################################################## +# A Cumbersome Gift +# by Claudia Baldassi +# 6140 +################################################## + +# A vassal offers you a bear/tiger/lion. Do you keep it for entertainment, kill it for a soft carpet, or...? If you keep it to show off during banquets, something might happen, good or bad! # + +scripted_trigger hold_court_6140_valid_vassal_trigger = { + has_court_event_flag = no + opinion = { + target = root + value >= 50 + } + is_available_healthy_ai_adult = yes + any_held_county = { + title_province = { + OR = { + hold_court_6140_europe_trigger = yes + hold_court_6140_india_trigger = yes + hold_court_6140_africa_trigger = yes + } + } + } +} + +scripted_trigger hold_court_6140_europe_trigger = { + terrain = forest + geographical_region = world_europe +} + +scripted_trigger hold_court_6140_india_trigger = { + terrain = jungle + geographical_region = world_india +} + +scripted_trigger hold_court_6140_africa_trigger = { + OR = { + terrain = jungle + terrain = desert_mountains + terrain = oasis + terrain = drylands + } + geographical_region = world_africa +} + +hold_court.6140 = { + type = court_event + title = hold_court.6140.t + desc = hold_court.6140.desc + theme = court + lower_right_portrait = scope:jester + court_scene = { + button_position_character = scope:6140_gifter + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6140_gifter = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_vassal = { + hold_court_6140_valid_vassal_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_vassal = { + limit = { + hold_court_6140_valid_vassal_trigger = yes + } + save_scope_as = 6140_gifter + court_event_character_flag_effect = yes + random_held_county = { + limit = { + title_province = { + OR = { + hold_court_6140_europe_trigger = yes + hold_court_6140_india_trigger = yes + hold_court_6140_africa_trigger = yes + } + } + } + save_scope_as = location + title_province = { + save_scope_as = 6140_province + } + } + } + if = { + limit = { + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + has_court_event_flag = no + is_available_healthy_ai_adult = yes + } + } + random_court_position_holder = { + type = court_jester_court_position + limit = { + has_court_event_flag = no + is_available_healthy_ai_adult = yes + } + save_scope_as = jester + } + } + hunt_activity_dangerous_game_effect = { PROVINCE = scope:6140_province } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: Kill it for pelt (chance to get an artifact) + option = { + name = hold_court.6140.a + custom_tooltip = hold_court.6140.a.tt + random_list = { + 80 = { + add_character_modifier = { + modifier = 6140_new_carpet_modifier + years = 50 + } + } + 20 = { + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = root + LEGENDARY = no + ANIMAL = root.var:animal_type + } + if = { + limit = { exists = scope:newly_created_artifact } + scope:newly_created_artifact = { save_scope_as = pelt } + send_interface_toast = { + title = hold_court.6140.artifact_toast + left_icon = scope:pelt + show_as_tooltip = { + scope:pelt = { set_owner = root } + } + } + } + custom_tooltip = hold_court.6140.artifact_tt + } + } + change_current_court_grandeur = minor_court_grandeur_gain + ai_chance = { + base = 100 + } + } + + #Option B: Keep it as pet + option = { + name = hold_court.6140.b + change_current_court_grandeur = monumental_court_grandeur_gain + add_character_modifier = { + modifier = 6140_pet_modifier + years = 10 + } + ai_chance = { + base = 100 + } + } + + #Option C: if you have a jester + option = { + name = hold_court.6140.c + trigger = { + exists = scope:jester + } + change_current_court_grandeur = medium_court_grandeur_gain + reverse_add_opinion = { + target = scope:jester + modifier = scared_opinion + opinion = -30 + } + add_character_modifier = { + modifier = 6140_pet_modifier + years = 10 + } + every_courtier_or_guest = { + custom = 6140_every_courtier_or_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + scope:jester = { + duel = { + skill = prowess + value = average_skill_rating + 50 = { #Success! + compare_modifier = { + value = scope:duel_value + multiplier = 4 + min = -50 + } + desc = hold_court.6140.c.success + root = { + send_interface_toast = { + title = hold_court.6140.c.success.tt + left_icon = scope:jester + every_courtier_or_guest = { + custom = 6140_every_courtier_or_guest + add_opinion = { + target = scope:jester + modifier = impressed_opinion + opinion = 20 + } + } + } + } + } + 30 = { #Soft failure + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -20 + } + desc = hold_court.6140.c.soft_failure + root = { + send_interface_toast = { + title = hold_court.6140.c.soft_failure.tt + left_icon = scope:jester + every_courtier_or_guest = { + custom = 6140_every_courtier_or_guest + add_opinion = { + target = scope:jester + modifier = amused_opinion + opinion = 10 + } + } + } + } + } + 15 = { #Middle failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -20 + } + desc = hold_court.6140.c.middle_failure + root = { + send_interface_toast = { + title = hold_court.6140.c.middle_failure.tt + left_icon = scope:jester + scope:jester = { + random_list = { + 30 = { + apply_maimed_trait_and_modifier_effect = yes + } + 30 = { + add_trait = one_legged + } + 30 = { + add_trait = disfigured + } + } + } + } + } + } + 5 = { #Hard failure + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -1 + } + desc = hold_court.6140.c.hard_failure + root = { + send_interface_toast = { + title = hold_court.6140.c.hard_failure.tt + left_icon = scope:jester + scope:jester = { + death = { + death_reason = death_riding_animal + } + } + } + } + } + } + } + ai_chance = { + base = 120 + ai_value_modifier = { + ai_compassion = -0.25 + ai_sociability = 0.25 + } + } + } + + #Option D: if you are a torturer + option = { + name = hold_court.6140.d + trigger = { + OR = { + has_trait = torturer + has_trait = callous + has_trait = sadistic + } + } + trait = torturer + trait = callous + trait = sadistic + add_character_modifier = { + modifier = 6140_pet_modifier + years = 10 + } + every_prisoner = { + custom = 6140_every_prisoner + add_opinion = { + target = root + modifier = scared_opinion + opinion = -50 + } + add_character_modifier = 6140_animal_guardian_modifier + } + ai_chance = { + base = 150 + } + } + + #Option E: Turn it away + option = { + name = hold_court.6140.e + reverse_add_opinion = { + target = scope:6140_gifter + modifier = insult_opinion + opinion = -40 + } + ai_chance = { + base = 75 + } + } + + after = { + remove_variable = animal_type + scope:6140_gifter = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:jester } + scope:jester = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +#feast events: +# -host-only - you bring in the beast: you/someone gets hurt or killed, your master of the hunt intervenes, jester rides it, you intimidate your enemies, all guests are impressed (if no one dies) +# -host-triggered - the host brings in the beast: you are scared/impressed, you/someone gets hurt or killed, master of the hunt of host intervenes, jester rides it + +################################################## +# Empty Coffers +# by Claudia Baldassi +# 6160 +################################################## + +# A vassal is bankrupt and is asking for money to be bailed out. # + +scripted_trigger hold_court_6160_valid_bankrupt_vassal_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + gold < 0 +} + +scripted_trigger hold_court_6160_valid_hook_trigger = { + OR = { + has_hook_of_type = { + type = indebted_hook + target = root + } + has_hook_of_type = { + type = favor_hook + target = root + } + } +} + +scripted_trigger hold_court_6160_valid_friend_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + OR = { + has_any_good_relationship_with_root_trigger = yes + is_child_of = root + has_relation_best_friend = root + has_relation_soulmate = root + is_close_family_of = root + } +} + +hold_court.6160 = { + type = court_event + title = hold_court.6160.t + desc = { + desc = hold_court.6160.desc + first_valid = { + triggered_desc = { + trigger = { + scope:6160_vassal = { hold_court_6160_valid_friend_trigger = yes } + } + desc = hold_court.6160.desc_friend + } + triggered_desc = { + trigger = { + scope:6160_vassal = { hold_court_6160_valid_hook_trigger = yes } + } + desc = hold_court.6160.desc_hook + } + desc = hold_court.6160.desc_fallback + } + } + theme = court + lower_left_portrait = scope:almoner + lower_center_portrait = scope:seneschal + court_scene = { + button_position_character = scope:6160_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6160_vassal = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + any_vassal = { hold_court_6160_valid_bankrupt_vassal_trigger = yes } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 3 + any_vassal = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_hook_trigger = yes + } + } + modifier = { + factor = 2 + any_vassal = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_friend_trigger = yes + } + } + modifier = { + factor = 0.1 + gold < 0 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + if = { + limit = { + any_vassal = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_hook_trigger = yes + } + } + random_vassal = { + limit = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_hook_trigger = yes + } + save_scope_as = 6160_vassal + } + } + else_if = { + limit = { + any_vassal = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_friend_trigger = yes + } + } + random_vassal = { + limit = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_friend_trigger = yes + } + save_scope_as = 6160_vassal + } + } + else = { + random_vassal = { + limit = { hold_court_6160_valid_bankrupt_vassal_trigger = yes } + save_scope_as = 6160_vassal + } + } + scope:6160_vassal = { + court_event_character_flag_effect = yes + } + if = { + limit = { + employs_court_position = high_almoner_court_position + any_court_position_holder = { + type = high_almoner_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = high_almoner_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = almoner + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = seneschal_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = seneschal + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: money for new hook + option = { + name = hold_court.6160.a + trigger = { + NOT = { + scope:6160_vassal = { + hold_court_6160_valid_hook_trigger = yes + } + } + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + pay_short_term_gold = { + target = scope:6160_vassal + gold = medium_gold_value + } + add_hook = { + type = indebted_hook + target = scope:6160_vassal + } + reverse_add_opinion = { + target = scope:6160_vassal + modifier = grateful_opinion + opinion = 20 + } + stress_impact = { + greedy = medium_stress_gain + } + ai_chance = { + base = 100 + modifier = { + gold < medium_gold_value + add = -95 + } + modifier = { + has_trait = greedy + add = -50 + } + ai_value_modifier = { + ai_greed = -0.25 + } + } + } + + #Option B: gold for old hook + option = { + name = hold_court.6160.b + trigger = { + scope:6160_vassal = { + hold_court_6160_valid_hook_trigger = yes + } + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + scope:6160_vassal = { + remove_hook = { target = root } + } + pay_short_term_gold = { + target = scope:6160_vassal + gold = medium_gold_value + } + reverse_add_opinion = { + target = scope:6160_vassal + modifier = grateful_opinion + opinion = 30 + } + stress_impact = { + greedy = medium_stress_gain + } + ai_chance = { + base = 120 + modifier = { + gold < medium_gold_value + add = -95 + } + modifier = { + has_trait = greedy + add = -50 + } + ai_value_modifier = { + ai_greed = -0.25 + ai_honor = 0.25 + } + } + } + + #Option C: gold for friend + option = { + name = hold_court.6160.c + trigger = { + scope:6160_vassal = { + hold_court_6160_valid_friend_trigger = yes + NOT = { + hold_court_6160_valid_hook_trigger = yes + } + } + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + pay_short_term_gold = { + target = scope:6160_vassal + gold = medium_gold_value + } + add_prestige = major_prestige_gain + change_current_court_grandeur = medium_court_grandeur_gain + reverse_add_opinion = { + target = scope:6160_vassal + modifier = grateful_opinion + opinion = 40 + } + stress_impact = { + gregarious = medium_stress_loss + improvident = major_stress_loss + greedy = major_stress_gain + } + ai_chance = { + base = 100 + modifier = { + gold < medium_gold_value + add = -95 + } + modifier = { + has_trait = greedy + add = -75 + } + modifier = { + has_trait = gregarious + add = 50 + } + modifier = { + has_trait = improvident + add = 75 + } + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + #Option D: almoner + option = { + name = hold_court.6160.d + trigger = { + exists = scope:almoner + NOT = { exists = scope:seneschal } # Prevent option bloat + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + pay_short_term_gold = { + target = scope:6160_vassal + gold = major_gold_value + } + add_piety = major_piety_gain + change_current_court_grandeur = major_court_grandeur_gain + reverse_add_opinion = { + target = scope:6160_vassal + modifier = grateful_opinion + opinion = 30 + } + add_hook = { + type = indebted_hook + target = scope:6160_vassal + } + stress_impact = { + improvident = major_stress_loss + greedy = major_stress_gain + } + ai_chance = { + base = 100 + modifier = { + gold < major_gold_value + add = -95 + } + modifier = { + has_trait = greedy + add = -75 + } + modifier = { + has_trait = improvident + add = 75 + } + modifier = { + has_trait = zealous + add = 25 + } + ai_value_modifier = { + ai_greed = -0.5 + ai_zeal = 0.5 + } + } + } + + #Option E: seneschal + option = { + name = hold_court.6160.e + trigger = { + exists = scope:seneschal + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + if = { + limit = { + scope:6160_vassal = { + hold_court_6160_valid_hook_trigger = yes + } + } + scope:6160_vassal = { + remove_hook = { target = root } + } + } + pay_treasury_or_gold = { + target = scope:6160_vassal + value = medium_treasury_or_gold_value + } + scope:6160_vassal = { + add_character_modifier = { + modifier = 6160_seneschal_help_modifier + years = 5 + } + } + add_hook = { + type = indebted_hook + target = scope:6160_vassal + } + add_prestige = medium_prestige_gain + change_current_court_grandeur = medium_court_grandeur_gain + reverse_add_opinion = { + target = scope:6160_vassal + modifier = grateful_opinion + opinion = 30 + } + stress_impact = { + greedy = medium_stress_gain + } + ai_chance = { + base = 120 + modifier = { + gold < medium_treasury_or_gold_value + add = -95 + } + modifier = { + has_trait = greedy + add = -50 + } + ai_value_modifier = { + ai_greed = -0.25 + } + } + } + + #Option F: no money to spare + option = { + name = hold_court.6160.f + reverse_add_opinion = { + target = scope:6160_vassal + modifier = disappointed_opinion + opinion = -10 + } + stress_impact = { + generous = major_stress_gain + improvident = massive_stress_gain + } + ai_chance = { + base = 100 + modifier = { + gold < medium_gold_value + add = 95 + } + modifier = { + has_trait = greedy + add = 50 + } + modifier = { + has_trait = generous + add = -75 + } + modifier = { + has_trait = improvident + add = -100 + } + ai_value_modifier = { + ai_greed = 0.25 + } + } + } + + after = { + scope:6160_vassal = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:almoner } + scope:almoner = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:seneschal } + scope:seneschal = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Ignoble Imprisonment +# by Claudia Baldassi +# 6170 +################################################## + +# A vassal has a family member imprisoned by another vassal in your realm. They petition you to have them released # + +scripted_trigger hold_court_6170_valid_vassal_trigger = { + is_available_ai_adult = yes + has_court_event_flag = no + save_temporary_scope_as = vassal_scope + OR = { + any_close_or_extended_family_member = { + hold_court_6170_valid_prisoner_trigger = yes + } + any_consort = { + hold_court_6170_valid_prisoner_trigger = yes + } + betrothed ?= { + hold_court_6170_valid_prisoner_trigger = yes + } + } +} + +scripted_trigger hold_court_6170_valid_prisoner_trigger = { + has_court_event_flag = no + is_imprisoned = yes + is_ai = yes + imprisoner = { + is_vassal_of = root + NOR = { + AND = { + exists = scope:vassal_scope + this = scope:vassal_scope + } + AND = { + exists = scope:6170_vassal + this = scope:6170_vassal + } + } + } +} + +hold_court.6170 = { + type = court_event + title = hold_court.6170.t + desc = hold_court.6170.desc + theme = court + lower_right_portrait = scope:6170_relative + lower_left_portrait = scope:6170_rival + court_scene = { + button_position_character = scope:6170_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6170_vassal = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { + hold_court_6170_valid_vassal_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + random_vassal = { + limit = { + hold_court_6170_valid_vassal_trigger = yes + } + save_scope_as = 6170_vassal + court_event_character_flag_effect = yes + } + if = { + limit = { + scope:6170_vassal = { + any_close_or_extended_family_member = { + hold_court_6170_valid_prisoner_trigger = yes + } + } + } + scope:6170_vassal = { + random_close_or_extended_family_member = { + limit = { + hold_court_6170_valid_prisoner_trigger = yes + } + save_scope_as = 6170_relative + } + } + } + else_if = { + limit = { + scope:6170_vassal = { + any_consort = { + hold_court_6170_valid_prisoner_trigger = yes + } + } + } + scope:6170_vassal = { + random_consort = { + limit = { + hold_court_6170_valid_prisoner_trigger = yes + } + save_scope_as = 6170_relative + } + } + } + else = { + scope:6170_vassal = { + betrothed = { + save_scope_as = 6170_relative + } + } + } + scope:6170_relative = { + court_event_character_flag_effect = yes + imprisoner = { + save_scope_as = 6170_rival + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: release them + option = { + name = hold_court.6170.a + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:6170_vassal + } + } + add_hook = { + type = favor_hook + target = scope:6170_vassal + } + } + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:6170_relative + } + } + add_hook = { + type = favor_hook + target = scope:6170_relative + } + } + scope:6170_relative = { release_from_prison = yes } + reverse_add_opinion = { + target = scope:6170_vassal + modifier = grateful_opinion + opinion = 30 + } + if = { + limit = { + scope:6170_vassal = { + can_set_relation_potential_friend_trigger = { CHARACTER = root } + } + } + scope:6170_vassal = { + set_relation_potential_friend = root + } + } + reverse_add_opinion = { + target = scope:6170_relative + modifier = grateful_opinion + opinion = 30 + } + stress_impact = { + callous = medium_stress_gain + torturer = medium_stress_gain + arbitrary = medium_stress_gain + sadistic = medium_stress_gain + vengeful = medium_stress_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + modifier = { + has_trait = callous + add = -50 + } + modifier = { + has_trait = torturer + add = -50 + } + modifier = { + has_trait = arbitrary + add = -50 + } + modifier = { + has_trait = sadistic + add = -50 + } + modifier = { + has_trait = vengeful + add = -50 + } + } + } + + #Option E: I don't care + option = { + name = hold_court.6170.e + stress_impact = { + lazy = medium_stress_loss + compassionate = medium_stress_gain + diligent = medium_stress_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 50 + } + modifier = { + has_trait = compassionate + add = -50 + } + modifier = { + has_trait = diligent + add = -50 + } + } + } + + after = { + scope:6170_vassal = { + clear_court_event_participation = yes + } + scope:6170_relative = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +############################# +# A Shadow in the Night # +# by Claudia Baldassi # +# 6190 # +############################# + +# Court physician has been spotted in the cemetery excavating the graves of the recently deceased. He is using them to practice dissecting/documentation but the locals are (understandably) not happy and want you to disown him. # + +hold_court.6190 = { + type = court_event + title = hold_court.6190.t + desc = hold_court.6190.desc + theme = court + + court_scene = { + button_position_character = scope:6190_local + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6190_local = { + group = petitioners_group + animation = anger + } + scope:physician = { + group = petitioners_group + animation = schadenfreude + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_court_event_flag = no + is_available_ai_adult = yes + OR = { + has_trait = ambitious + has_trait = cynical + has_trait = callous + has_trait = sadistic + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 20 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } + } + } + modifier = { + add = 10 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_focus_or_focus_trait_trigger = { FOCUS = learning_medicine_focus } + } + } + modifier = { + add = 5 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + modifier = { + add = 10 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_trait = ambitious + } + } + modifier = { + add = 10 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_trait = cynical + } + } + modifier = { + add = 10 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_trait = callous + } + } + modifier = { + add = 10 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_trait = sadistic + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_court_position_holder = { + type = court_physician_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = physician + court_event_character_flag_effect = yes + } + create_character = { + location = root.capital_province + template = generic_peasant_character + save_scope_as = 6190_local + } + scope:6190_local = { + court_event_character_flag_effect = yes + } + capital_province = { + save_scope_as = capital + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: these studies are necessary + option = { + name = hold_court.6190.a + capital_county = { + add_county_modifier = { + modifier = 6190_grave_robbing_county_modifier + years = 10 + } + } + every_courtier_or_guest = { + custom = custom.every_non_callous_or_sadistic_courtier_and_guest + limit = { + NOR = { + has_trait = callous + has_trait = sadistic + this = scope:physician + } + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + scope:physician = { + if = { + limit = { + NAND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + random = { + chance = 15 + physician_lifestyle_rank_up_effect = yes + } + } + else_if = { + limit = { + NOT = { + has_trait = lifestyle_physician + } + } + add_trait = lifestyle_physician + } + else = { + add_learning_skill = 1 + } + } + stress_impact = { + zealous = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.25 + } + } + } + + #Option B: I wanna take part! FOR SCIENCE! + option = { + name = hold_court.6190.b + trigger = { + OR = { + has_trait = lifestyle_physician + has_trait = cynical + has_trait = callous + has_trait = sadistic + AND = { + has_focus_or_focus_trait_trigger = { FOCUS = learning_medicine_focus } + has_trait = ambitious + } + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } + } + } + add_dread = medium_dread_gain + change_current_court_grandeur = minor_court_grandeur_loss + add_learning_lifestyle_perk_points = 1 + every_courtier_or_guest = { + custom = custom.every_non_callous_or_sadistic_courtier_and_guest + limit = { + NOR = { + has_trait = callous + has_trait = sadistic + this = scope:physician + } + } + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + scope:physician = { + if = { + limit = { + NAND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + random = { + chance = 20 + physician_lifestyle_rank_up_effect = yes + } + } + else_if = { + limit = { + NOT = { + has_trait = lifestyle_physician + } + } + add_trait = lifestyle_physician + } + else = { + add_learning_skill = 1 + } + } + capital_county = { + add_county_modifier = { + modifier = 6190_grave_robbing_county_modifier + years = 10 + } + } + stress_impact = { + compassionate = major_stress_impact_gain + zealous = major_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_compassion = -0.5 + } + } + } + + #Option D: Blasphemy! Punish the physician + option = { + name = hold_court.6190.d + revoke_court_position = { + recipient = scope:physician + court_position = court_physician_court_position + } + rightfully_imprison_character_effect = { + TARGET = scope:physician + IMPRISONER = root + } + capital_county = { + add_county_modifier = { + modifier = 6190_safe_graves_county_modifier + years = 10 + } + } + every_courtier_or_guest = { + custom = custom.every_zealous_courtier_and_guest + limit = { + has_trait = zealous + this != scope:physician + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 25 + } + } + stress_impact = { + zealous = medium_stress_impact_loss + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + torturer = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = -1 + } + } + } + + #Option E: Just stop + option = { + name = hold_court.6190.e + scope:physician = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + capital_county = { + add_county_modifier = { + modifier = 6190_safe_graves_county_modifier + years = 10 + } + } + ai_chance = { + base = 100 + } + } + + after = { + scope:physician = { + clear_court_event_participation = yes + } + scope:6190_local = { + clear_court_event_participation = yes + if = { + limit = { + is_alive = yes + is_imprisoned = no + } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +######################### +# A Land of Foreigners # +# by Claudia Baldassi # +# 6210 # +######################### + +# A vassal comes to you begging for help because their land is overrun by unhappy barbarians (= other culture). # + +scripted_trigger hold_court_6210_valid_vassal_trigger = { + has_court_event_flag = no + culture = { + this = root.culture + any_parent_culture_or_above = { + save_temporary_scope_as = parent + } + } + is_landed_or_landless_administrative = yes + is_available_ai_adult = yes + exists = capital_county + OR = { + capital_county = { + hold_court_6210_valid_county_trigger = yes + } + AND = { + realm_size >= 4 + any_sub_realm_county = { + count >= 3 + hold_court_6210_valid_county_trigger = yes + } + } + } +} + +scripted_trigger hold_court_6210_valid_county_trigger = { + culture = { + NOR = { + this = root.culture + any_parent_culture_or_above = { + this = root.culture + this = scope:parent + } + } + } +} + +hold_court.6210 = { + type = court_event + title = hold_court.6210.t + desc = hold_court.6210.desc + theme = court + lower_left_portrait = { + trigger = { exists = scope:steward } + character = scope:steward + } + lower_center_portrait = { + trigger = { exists = scope:r_architect } + character = scope:r_architect + } + cooldown = { years = 10 } + + court_scene = { + button_position_character = scope:6210_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6210_vassal = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_vassal = { + hold_court_6210_valid_vassal_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_vassal = { + limit = { + hold_court_6210_valid_vassal_trigger = yes + } + save_scope_as = 6210_vassal + court_event_character_flag_effect = yes + } + if = { + limit = { + any_court_position_holder = { + type = royal_architect_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = royal_architect_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = r_architect + court_event_character_flag_effect = yes + } + } + if = { + limit = { + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + } + if = { + limit = { + scope:6210_vassal.capital_county = { + hold_court_6210_valid_county_trigger = yes + } + } + scope:6210_vassal.capital_county = { + save_scope_as = 6210_main_county + } + } + else = { + scope:6210_vassal = { + random_sub_realm_county = { + limit = { + hold_court_6210_valid_county_trigger = yes + } + save_scope_as = 6210_main_county + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: send steward + option = { + name = hold_court.6210.a + trigger = { + exists = scope:steward + } + scope:steward = { + set_council_task = { + task_type = task_promote_culture + target = scope:6210_main_county.title_province + } + } + scope:6210_main_county = { + add_county_modifier = { + modifier = easier_to_culture_convert + years = 25 + } + } + scope:6210_vassal = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + stress_impact = { + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = -25 + } + } + } + + #Option B: send the architect + option = { + name = hold_court.6210.b + trigger = { + exists = scope:r_architect + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + custom_tooltip = hold_court.6210.b.tt + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:6210_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6210_valid_county_trigger = yes + } + add_county_modifier = { + modifier = 6210_architect_county_modifier + years = 5 + } + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + scope:r_architect = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + change_current_court_grandeur = major_court_grandeur_gain + add_prestige = medium_prestige_gain + scope:6210_main_county = { + add_county_modifier = { + modifier = easier_to_culture_convert + years = 25 + } + } + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + gold < medium_treasury_or_gold_value + add = -200 + } + } + } + + #Option C: tolerance + option = { + name = hold_court.6210.c + scope:6210_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6210_valid_county_trigger = yes + } + add_county_modifier = { + modifier = governance_1073_conversion_resistance_modifier + years = 10 + } + } + } + scope:6210_main_county.culture = { + change_cultural_acceptance = { + target = root.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + change_current_court_grandeur = minor_court_grandeur_gain + add_prestige = medium_prestige_gain + ai_chance = { + base = 100 + modifier = { + has_trait = trusting + add = 20 + } + modifier = { + has_trait = compassionate + add = 30 + } + modifier = { + culture = { has_cultural_pillar = ethos_egalitarian } + add = 100 + } + modifier = { + has_trait = paranoid + add = -100 + } + } + } + + after = { + scope:6210_vassal = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:r_architect } + scope:r_architect = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:steward } + scope:steward = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +############################# +# A Massive Problem # +# by Claudia Baldassi # +# 6230 # +############################# + +# A vassal in India has problem with a horde of elephants that have gone berserk and brought ruin and destruction in one (several?) of his counties. He pleads for help to manage the elephants and rebuild! # + +hold_court.6230 = { + type = court_event + title = hold_court.6230.t + desc = hold_court.6230.desc + theme = court + lower_left_portrait = scope:m_horse + + court_scene = { + button_position_character = scope:6230_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6230_vassal = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_vassal_or_below = { + has_court_event_flag = no + is_available_ai_adult = yes + is_landed_or_landless_administrative = yes + capital_province = { + geographical_region = world_innovation_elephants + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_vassal_or_below = { + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + is_landed_or_landless_administrative = yes + capital_province = { + geographical_region = world_innovation_elephants + } + + } + save_scope_as = 6230_vassal + court_event_character_flag_effect = yes + } + scope:6230_vassal.capital_province = { + save_scope_as = 6230_province + } + if = { + limit = { + employs_court_position = master_of_horse_court_position + any_court_position_holder = { + type = master_of_horse_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = master_of_horse_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = m_horse + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: send gold to rebuild + option = { + name = hold_court.6230.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + pay_treasury_or_gold = { + target = scope:6230_vassal + value = medium_gold_value + } + reverse_add_opinion = { + target = scope:6230_vassal + modifier = grateful_opinion + opinion = 20 + } + scope:6230_province.county = { + add_county_modifier = { + modifier = 6230_rebuilding + years = 25 + } + } + add_prestige = medium_prestige_gain + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + add = -200 + gold < medium_gold_value + } + } + } + + #Option B: send aid in capturing the elephants + option = { + name = hold_court.6230.b + trigger = { + NOT = { exists = scope:m_horse } + } + duel = { + skill = martial + value = average_skill_rating + 40 = { + desc = hold_court.6230.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3 + } + send_interface_toast = { + title = hold_court.6230.b.success.tt + add_character_modifier = { + modifier = 6230_new_elephants_modifier + years = 10 + } + change_current_court_grandeur = medium_court_grandeur_gain + } + } + 60 = { + desc = hold_court.6230.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + send_interface_toast = { + title = hold_court.6230.b.failure.tt + change_current_court_grandeur = medium_court_grandeur_loss + scope:6230_province.county = { change_county_control = -5 } + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { + add = -75 + martial < 10 + } + } + } + + #Option C: send master of horse to help + option = { + name = hold_court.6230.c + trigger = { + exists = scope:m_horse + } + scope:m_horse = { + duel = { + skill = martial + value = average_skill_rating + 40 = { + desc = hold_court.6230.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3 + } + root = { + send_interface_toast = { + title = hold_court.6230.b.success.tt + add_character_modifier = { + modifier = 6230_new_elephants_modifier + years = 10 + } + change_current_court_grandeur = medium_court_grandeur_gain + } + } + } + 60 = { + desc = hold_court.6230.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + root = { + send_interface_toast = { + title = hold_court.6230.b.failure.tt + change_current_court_grandeur = medium_court_grandeur_loss + scope:6230_province.county = { change_county_control = -5 } + } + } + } + } + } + ai_chance = { + base = 100 + } + } + + #Option D: Ganesh leads them + option = { + name = hold_court.6230.d + trigger = { + faith.religion = religion:hinduism_religion + } + add_piety = major_piety_gain + stress_impact = { + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option E: nope + option = { + name = hold_court.6230.e + reverse_add_opinion = { + target = scope:6230_vassal + modifier = disappointed_opinion + opinion = -20 + } + scope:6230_province.county = { change_county_control = -5 } + ai_chance = { + base = 75 + } + } + + after = { + scope:6230_vassal = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:m_horse } + scope:m_horse = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + + + + + +################################################## +# Joe Parkin + +################################################## +# 8001 Stifled Commerce +# 8010 The X Frontier +# 8020 Sacred Claims +# 8030 Civic Rivalry +# 8040 Special Treatment +# 8050 - 8053 Royal Service +# 8060 - 8061 A Temple for X +# 8070 - 8071 The Growth of X +# 8080 The Republic of X +# 8090 A Place at Court +# 8100 A Child of the Court +# 8110 Serious Business +# 8120 Evangelical Backlash +# 8130 Cultural Pride +# 8140 - 8142 Puppy Patronage +# 8150 Contractual Compromise +# 8160 Public Accusation +# 8161 Personal Matter +# 8170 - 8171 Services Rendered +# 8180 Noble Privileges +# 8190 Enemy Within +# 8200 Servant of God +# 8210 Rightful Lands +# 8220 - 8222 Opportunity Knocks +# 8240 Thy Neighbor's Wife +# 8241 Spoiled for Choice +# 8250 Hankering for X +# 8251 The Dancer +# 8260 The King's Peace +# 8270 Oath of Fealty +# 8280 Nomadic Neighbors +################################################## + +################################################## +# Stifled Commerce +# by Joe Parkin +# 8001 +################################################## + +scripted_trigger hold_court_available_mayor_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + primary_title = { + tier = tier_barony + NOT = { has_variable = hold_court_city_cooldown_var } + } + government_has_flag = government_is_republic + NOT = { is_close_or_extended_family_of = root } +} + +scripted_effect hold_court_8001_revoke_title_effect = { + if = { + limit = { has_relation_friend = root } + remove_relation_friend = root + } + if = { # If they recently imprisoned you, or asked for your excommunication, they become your rival + limit = { + OR = { + has_opinion_modifier = { + target = root + modifier = released_from_prison + } + AND = { + exists = var:requested_my_excommunication + var:requested_my_excommunication = root + } + } + NOT = { has_relation_rival = root } + } + if = { + limit = { has_relation_potential_rival = root } + remove_relation_potential_rival = root + } + root = { + set_relation_rival = { + target = prev + reason = rival_revoked_title + } + } + } + else = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_removed_mayor + OPINION = 0 + } + } +} + +# A merchant complains about the mayor of their town +hold_court.8001 = { + type = court_event + title = hold_court.8001.t + desc = hold_court.8001.desc + theme = court + lower_right_portrait = scope:portrait + court_scene = { + button_position_character = scope:merchant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:merchant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { hold_court_available_mayor_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + every_vassal = { + limit = { hold_court_available_mayor_trigger = yes } + add_to_list = potential_mayor + } + random_in_list = { + list = potential_mayor + limit = { + OR = { + has_trait = lazy + has_trait = greedy + has_trait = deceitful + has_trait = arbitrary + stewardship <= mediocre_skill_rating + } + } + alternative_limit = { + NOR = { + has_trait = diligent + has_trait = generous + has_trait = honest + has_trait = just + stewardship >= decent_skill_rating + } + } + alternative_limit = { + always = yes + } + save_scope_as = mayor + save_scope_as = portrait + court_event_character_flag_effect = yes + primary_title = { + save_scope_as = town + set_variable = { + name = hold_court_city_cooldown_var + years = 25 + } + } + } + create_character = { + template = merchant_template + location = root.capital_province + trait = honest + save_scope_as = merchant + after_creation = { + add_character_flag = created + } + } + scope:merchant = { + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Replace the Mayor + name = hold_court.8001.a + scope:mayor = { + depose = yes # depose_effect unnecessary for AI mayor + add_opinion = { + modifier = angry_opinion + target = root + opinion = -40 + } + hold_court_8001_revoke_title_effect = yes + } + scope:town.county = { change_development_progress = 50 } + add_character_modifier = { + modifier = hold_court_8001_deposed_modifier + years = 10 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_compassion = 0.25 + ai_rationality = 0.25 + ai_greed = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { # Make Merchant the Mayor + name = hold_court.8001.b + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + scope:town = { + change_title_holder = { + holder = scope:merchant + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:mayor = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -60 + } + hold_court_8001_revoke_title_effect = yes + } + random_list = { + 30 = { + modifier = { + add = 5 + scope:merchant = { has_trait = diligent } + } + modifier = { + add = 5 + scope:merchant = { has_trait = generous } + } + modifier = { + add = 5 + scope:merchant = { has_trait = honest } + } + modifier = { + add = 5 + scope:merchant = { has_trait = just } + } + modifier = { + add = 5 + scope:merchant = { stewardship >= decent_skill_rating } + } + send_interface_toast = { + title = hold_court.8001.b.tt_success + scope:town.county = { + add_county_modifier = { + modifier = hold_court_8001_merchant_boon_modifier + years = 15 + } + change_development_level = 1 + } + } + } + 70 = { + modifier = { + add = 5 + scope:merchant = { has_trait = lazy } + } + modifier = { + add = 5 + scope:merchant = { has_trait = greedy } + } + modifier = { + add = 5 + scope:merchant = { has_trait = arbitrary } + } + modifier = { + add = 5 + scope:merchant = { has_trait = deceitful } + } + modifier = { + add = 5 + scope:merchant = { stewardship <= 6 } + } + modifier = { + add = 5 + scope:merchant = { age < 25 } + } + modifier = { + add = 5 + scope:merchant = { has_trait = infirm } + } + modifier = { + add = 5 + scope:merchant = { has_trait = incapable } + } + modifier = { + add = 5 + scope:merchant = { age > 60 } + } + send_interface_toast = { + title = hold_court.8001.b.tt_failure + scope:town.county = { + add_county_modifier = { + modifier = hold_court_8001_merchant_bust_modifier + years = 15 + } + } + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + } + } + } + add_character_modifier = { + modifier = hold_court_8001_deposed_modifier + years = 10 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_compassion = -0.25 + ai_rationality = -0.25 + ai_greed = -0.5 + ai_boldness = 0.5 + } + } + } + + option = { # Fine the Mayor + name = hold_court.8001.c + duel = { + skill = stewardship + value = average_skill_rating + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8001.c.tt_success + send_interface_toast = { + title = hold_court.8001.c.tt_success + scope:mayor = { + pay_short_term_gold = { + target = root + gold = root.medium_gold_value + } + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -15 + } + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -9 + } + desc = hold_court.8001.c.tt_failure + send_interface_toast = { + title = hold_court.8001.c.tt_failure + scope:town.county = { + scope:town.county = { change_development_progress = -50 } + add_county_modifier = { + modifier = hold_court_8001_ignored_modifier + years = 10 + } + } + stress_impact = { + just = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_greed = 0.5 + } + modifier = { #Weight up for duel. + add = 15 + stewardship > scope:mayor.stewardship + } + } + } + + option = { # Compensate the Merchants + name = hold_court.8001.d + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:mayor = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + scope:town.county = { + add_county_modifier = { + modifier = hold_court_8001_compensated_modifier + years = 15 + } + } + stress_impact = { + greedy = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_compassion = 0.5 + ai_greed = -0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Imprison the Merchant + name = hold_court.8001.e + imprison_character_effect = { + TARGET = scope:merchant + IMPRISONER = root + } + scope:mayor = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + add_dread = minor_dread_gain + scope:town.county = { + add_county_modifier = { + modifier = hold_court_8001_imprisoned_modifier + years = 10 + } + } + stress_impact = { + just = medium_stress_impact_gain + calm = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = -0.5 + ai_rationality = -0.25 + ai_compassion = -0.25 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = just + } + modifier = { #Weight down for stress. + add = -30 + has_trait = calm + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + } + } + + after = { + scope:mayor = { + clear_court_event_participation = yes + } + scope:merchant = { + clear_court_event_participation = yes + if = { + limit = { + is_landed = no + is_imprisoned = no + } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:merchant = { + if = { + limit = { + is_ruler = no + } + silent_disappearance_ai_if_created_effect = yes + } + } + } +} + +################################################## +# The X Frontier +# by Joe Parkin +# 8010 +################################################## + +scripted_trigger hold_court_8010_lord_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + primary_title.tier >= tier_county + government_has_flag = government_is_feudal + subject_contract_is_blocked_from_modification = no + OR = { + vassal_contract_obligation_level_can_be_increased = fortification_rights + NOT = { vassal_contract_has_flag = has_march_contract } + } +} + +scripted_trigger hold_court_8010_contract_trigger = { + scope:frontier_lord = { + government_has_flag = government_is_feudal + vassal_contract_has_modifiable_obligations = yes + OR = { + AND = { + root.culture = { has_innovation = innovation_battlements } + vassal_contract_obligation_level_can_be_increased = fortification_rights + } + AND = { + root.culture = { has_innovation = innovation_burhs } + NOT = { vassal_contract_has_flag = has_march_contract } + } + } + } +} + +# A vassal bordering a powerful neighbor is worried +hold_court.8010 = { + type = court_event + title = hold_court.8010.t + desc = hold_court.8010.desc + theme = court + lower_right_portrait = scope:neighboring_enemy + court_scene = { + button_position_character = scope:frontier_lord + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:frontier_lord = { + group = petitioners_group + animation = worry + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + top_liege = this + NOT = { + any_vassal = { has_character_modifier = hold_court_8010_fortifications_modifier } + } + any_vassal = { + hold_court_8010_lord_trigger = yes + any_sub_realm_county = { hold_court_8010_county_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_vassal = { + hold_court_8010_lord_trigger = yes + any_sub_realm_county = { hold_court_8010_county_trigger = yes } + primary_title.tier >= 2 + OR = { + has_trait = paranoid + has_trait = lazy + has_trait = craven + is_powerful_vassal = yes + } + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + capital_barony = { save_scope_as = capital } + ordered_vassal = { + limit = { + hold_court_8010_lord_trigger = yes + any_sub_realm_county = { hold_court_8010_county_trigger = yes } # Prefer Dukes... + primary_title.tier = tier_duchy + } + alternative_limit = { + hold_court_8010_lord_trigger = yes + any_sub_realm_county = { hold_court_8010_county_trigger = yes } # ...then Counts... + primary_title.tier = tier_county + } + alternative_limit = { + hold_court_8010_lord_trigger = yes + any_sub_realm_county = { hold_court_8010_county_trigger = yes } # ...then Kings + primary_title.tier = tier_kingdom + } + order_by = hold_court_8010_border_length_value + save_scope_as = frontier_lord + court_event_character_flag_effect = yes + random_sub_realm_county = { + limit = { hold_court_8010_county_trigger = yes } + title_province.barony = { save_scope_as = frontier_barony } + ordered_title_to_title_neighboring_county = { + limit = { + holder.top_liege = { + NOR = { + this = root + is_allied_to = root + max_military_strength < hold_court_8010_75_strength_value # 75% of root's soldiers + } + } + } + order_by = holder.top_liege.max_military_strength + de_jure_liege = { save_scope_as = neighboring_duchy } + holder.top_liege = { save_scope_as = neighboring_enemy } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Give vassal defensive contract (March/Fortification Rights) + name = hold_court.8010.a + trigger = { + hold_court_8010_contract_trigger = yes + OR = { + AND = { + culture = { has_innovation = innovation_burhs } + scope:frontier_lord.primary_title.tier >= tier_duchy + } + AND = { + culture = { has_innovation = innovation_battlements } + scope:frontier_lord = { vassal_contract_obligation_level_can_be_increased = fortification_rights } + } + } + } + scope:frontier_lord = { + if = { + limit = { + AND = { + root.culture = { has_innovation = innovation_battlements } + vassal_contract_obligation_level_can_be_increased = fortification_rights + } + } + vassal_contract_set_obligation_level = { + type = fortification_rights + level = 1 + } + } + else = { + vassal_contract_set_obligation_level = { + type = special_contract + level = 2 + } + } + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + if = { + limit = { + can_add_hook = { + target = scope:frontier_lord + type = indebted_hook + } + } + add_hook = { + target = scope:frontier_lord + type = indebted_hook + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_compassion = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Pay for vassals fortications (if A is unavailable) + name = hold_court.8010.b + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:frontier_barony.county = { + add_county_modifier = { + modifier = hold_court_8010_fortifications_modifier + years = 15 + } + } + scope:frontier_lord = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + if = { + limit = { + can_add_hook = { + target = scope:frontier_lord + type = indebted_hook + } + } + add_hook = { + target = scope:frontier_lord + type = indebted_hook + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_compassion = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Fortify your own capital instead + name = hold_court.8010.c + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = medium_treasury_or_gold_value + capital_county = { + add_county_modifier = { + modifier = hold_court_8010_fortifications_modifier + years = 15 + } + } + scope:frontier_lord = { + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -15 + } + } + stress_impact = { + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_honor = -0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = brave + } + } + } + + option = { # Argue that it is unwarranted + name = hold_court.8010.d + duel = { + skill = diplomacy + value = average_skill_rating + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8010.d.tt_success + send_interface_toast = { + title = hold_court.8010.d.tt_success + left_icon = scope:frontier_lord + change_current_court_grandeur = medium_court_grandeur_gain + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = hold_court.8010.d.tt_failure + send_interface_toast = { + title = hold_court.8010.d.tt_failure + left_icon = scope:frontier_lord + add_prestige = minor_prestige_loss + scope:frontier_lord = { + add_opinion = { + modifier = dismissive_opinion + target = root + opinion = -20 + } + } + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = honest + } + modifier = { #Weight down for stress. + add = -15 + has_trait = paranoid + } + modifier = { #Weight up for duel. + add = 15 + diplomacy > scope:frontier_lord.diplomacy + } + } + } + + option = { # Dismiss vassal + name = hold_court.8010.e + add_character_modifier = { + modifier = hold_court_8010_vassal_modifier + years = 10 + } + scope:frontier_lord = { + add_opinion = { + modifier = dismissive_opinion + target = root + opinion = -10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + } + } + + after = { + scope:frontier_lord = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Sacred Claims +# by Joe Parkin +# 8020 +################################################## + +scripted_trigger hold_court_8020_county_trigger = { + this != root.capital_county + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + faith = root.faith + holder = { + has_court_event_flag = no + NOR = { + government_has_flag = government_is_theocracy + this = root.cp:councillor_court_chaplain + trigger_if = { + limit = { + exists = root.faith.religious_head + root != root.faith.religious_head + } + this = root.faith.religious_head + } + } + any_held_title = { + count >= 2 + title_tier = county + } + OR = { + this = root + AND = { + is_available_ai_adult = yes + NOT = { has_any_bad_relationship_with_root_trigger = yes } + } + } + } +} + +scripted_trigger hold_court_8020_cathedral_barony_trigger = { + is_holy_site_of = root.faith + title_province = { + OR = { + has_building = holy_site_cathedral_01 + has_building = holy_site_mosque_01 + has_building = holy_site_pagan_grand_temple_01 + has_building = holy_site_indian_grand_temple_01 + has_building = holy_site_other_grand_temple_01 + # TGP + has_building = holy_site_buddhist_grand_temple_01 + has_building = holy_site_japanese_temple_01 + has_building = holy_site_chinese_temple_01 + has_building = holy_site_se_asia_pagan_temple_01 + } + } +} + +scripted_effect hold_court_8020_grant_effect = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -20 + } + } + } + scope:target_county = { + change_title_holder = { + holder = scope:candidate + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + hidden_effect = { + scope:candidate = { change_government = theocracy_government } + } +} + +# Chaplain asks for a holy site +hold_court.8020 = { + type = court_event + title = hold_court.8020.t + desc = { + desc = hold_court.8020.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:pope } + desc = hold_court.8020.desc.body_pope + } + desc = hold_court.8020.desc.body_fallback + } + desc = hold_court.8020.desc.body_1 + first_valid = { + triggered_desc = { + trigger = { scope:target_county.holder = root } # Owns target personally + desc = hold_court.8020.desc.body_personal + } + desc = hold_court.8020.desc.body_vassal # Vassal owns target + } + desc = hold_court.8020.desc.body_2 + } + theme = realm + lower_left_portrait = scope:candidate + lower_right_portrait = scope:pope + artifact = { + target = scope:bishop_relic + position = lower_center_portrait + } + court_scene = { + button_position_character = scope:bishop + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:bishop = { + group = petitioners_group + animation = chaplain + } + scope:vassal_or_candidate = { + group = petitioners_group + animation = disapproval + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 30 } + + trigger = { + NOT = { has_character_flag = has_had_county_request_event } + top_liege = this + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_available_ai_adult = yes + } + faith = { + has_doctrine = doctrine_theocracy_temporal + NOT = { has_doctrine_parameter = unreformed } + } + any_realm_county = { # Less than 10% theocratic counties in realm + percent <= 0.1 + holder = { government_has_flag = government_is_theocracy } + } + any_realm_county = { hold_court_8020_county_trigger = yes } # there is a holy_site in the realm + } + + weight_multiplier = { + base = 1 + modifier = { # County has a cathedral + add = 1 + any_realm_county = { + hold_court_8020_county_trigger = yes + any_county_province = { + barony = { hold_court_8020_cathedral_barony_trigger = yes } + } + OR = { + holder = root + holder = { is_vassal_of = root } + } + } + } + modifier = { # No prince bishops in realm + add = 0.5 + NOT = { + any_vassal_or_below = { + primary_title = { tier >= tier_county } + government_has_flag = government_is_theocracy + } + } + } + modifier = { # Favor emperors + add = 1 + highest_held_title_tier = tier_empire + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_county_request_event + years = 15 + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + court_event_character_flag_effect = yes + } + hidden_effect = { + if = { + limit = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + create_artifact_pedestal_reliquary_christian_effect = { OWNER = scope:bishop } + } + else_if = { + limit = { religion = religion:islam_religion } + create_artifact_pedestal_reliquary_islam_effect = { OWNER = scope:bishop } + } + else_if = { + limit = { religion = religion:buddhism_religion } + create_artifact_pedestal_reliquary_buddhism_effect = { OWNER = scope:bishop } + } + else_if = { + limit = { religion = religion:judaism_religion } + create_artifact_pedestal_reliquary_judaism_effect = { OWNER = scope:bishop } + } + else = { + create_artifact_sculpture_religious_effect = { OWNER = scope:bishop } + } + scope:newly_created_artifact = { save_scope_as = bishop_relic } + } + if = { + limit = { + exists = faith.religious_head + NOR = { + faith.religious_head = root + faith.religious_head = scope:bishop + } + } + faith.religious_head = { save_scope_as = pope } + } + every_realm_county = { + limit = { hold_court_8020_county_trigger = yes } + add_to_list = potential_princebishoprics + } + random_in_list = { + list = potential_princebishoprics + limit = { + holder = root + any_county_province = { + barony = { hold_court_8020_cathedral_barony_trigger = yes } + } + } + alternative_limit = { + any_county_province = { + barony = { hold_court_8020_cathedral_barony_trigger = yes } + } + } + alternative_limit = { holder = root } + alternative_limit = { always = yes } + save_scope_as = target_county + root = { + set_variable = { # Save var for custom loc + name = holy_site_var + value = scope:target_county + } + } + } + if = { + limit = { + scope:target_county.holder != root + } + scope:target_county.holder = { + save_scope_as = vassal + court_event_character_flag_effect = yes + } + } + create_character = { + age = { 30 50 } + template = priest_character_template + location = root.capital_province + trait = devoted + save_scope_as = candidate + } + scope:candidate = { + court_event_character_flag_effect = yes + } + + if = { + limit = { exists = scope:vassal } + scope:vassal = { save_scope_as = vassal_or_candidate } + } + else = { + scope:candidate = { save_scope_as = vassal_or_candidate } + } + + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Gift the county + name = hold_court.8020.a + scope:bishop_relic = { + set_owner = { + target = root + history = { + location = root.capital_province + actor = scope:bishop + recipient = root + type = given + } + } + } + hold_court_8020_grant_effect = yes + scope:target_county = { + if = { + limit = { + any_county_province = { + barony = { hold_court_8020_cathedral_barony_trigger = yes } + } + } + root = { add_piety = massive_piety_gain } + } + else = { + root = { add_piety = major_piety_gain } + } + } + scope:bishop = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 30 + } + } + if = { + limit = { exists = scope:pope } + scope:pope = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 15 + } + } + } + if = { + limit = { scope:target_county.holder = root } + stress_impact = { greedy = medium_stress_impact_gain } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_greed = -0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Theocratic debate + name = hold_court.8020.b + duel = { + skill = learning + target = scope:bishop + 8 = { + desc = hold_court.8020.b.tt_success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = hold_court.8020.b.tt_success + left_icon = scope:bishop + change_current_court_grandeur = medium_court_grandeur_gain + add_prestige = medium_prestige_gain + } + } + 12 = { + desc = hold_court.8020.b.tt_failure + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = hold_court.8020.b.tt_failure + left_icon = scope:bishop + hold_court_8020_grant_effect = yes + scope:target_county = { + if = { + limit = { + any_county_province = { + barony = { hold_court_8020_cathedral_barony_trigger = yes } + } + } + root = { add_piety = major_piety_gain } + } + else = { + root = { add_piety = minor_piety_gain } + } + } + scope:bishop = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + if = { + limit = { exists = scope:pope } + scope:pope = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + } + } + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + modifier = { #Weight up for duel. + add = 15 + learning > scope:bishop.learning + } + } + } + + option = { # Refuse no pope + no candidate + name = hold_court.8020.c + trigger = { + NOT = { exists = scope:pope } + scope:target_county.holder = root + } + add_piety = minor_piety_loss + scope:bishop = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -20 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Refuse no pope + candidate + name = hold_court.8020.d + trigger = { + NOT = { exists = scope:pope } + scope:target_county.holder != root + } + add_piety = minor_piety_loss + scope:target_county.holder = { + if = { + limit = { + this != root + } + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + } + scope:bishop = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -10 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Refuse pope + no candidate + name = hold_court.8020.e + trigger = { + exists = scope:pope + scope:target_county.holder = root + } + add_piety = minor_piety_loss + scope:bishop = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -20 + } + } + scope:pope = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -10 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Refuse pope + candidate + name = hold_court.8020.e + trigger = { + exists = scope:pope + scope:target_county.holder != root + } + add_piety = minor_piety_loss + scope:target_county.holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + scope:bishop = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -10 + } + } + + scope:pope = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -5 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + after = { + scope:bishop = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:candidate } + scope:candidate = { + clear_court_event_participation = yes + if = { + limit = { + is_alive = yes + is_landed = no + } + silent_disappearance_effect = yes + } + } + } + remove_variable = holy_site_var + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Special Treatment +# by Joe Parkin +# 8040 +################################################## + +scripted_trigger hold_court_8040_vassal_trigger = { + has_court_event_flag = no + faith != root.faith + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + government_has_flag = government_is_feudal + vassal_contract_obligation_level_can_be_increased = religious_rights + liege.faith = { + faith_hostility_level = { + target = prev.faith + value < faith_evil_level + } + } +} + +# A vassal of another faith asks for religious freedom +hold_court.8040 = { + type = court_event + title = hold_court.8040.t + desc = { + desc = hold_court.8040.desc + first_valid = { + triggered_desc = { + trigger = { + scope:infidel_vassal.religion = root.religion + } + desc = hold_court.8040.desc.intro_same_religion + } + triggered_desc = { + trigger = { + always = yes + } + desc = hold_court.8040.desc.intro_fallback + } + } + } + theme = court + lower_right_portrait = scope:bishop + court_scene = { + button_position_character = scope:infidel_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:infidel_vassal = { + group = petitioners_group + animation = worry + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + any_vassal = { hold_court_8040_vassal_trigger = yes } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_vassal = { + hold_court_8040_vassal_trigger = yes + is_powerful_vassal = yes + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + cp:councillor_court_chaplain = { + save_scope_as = bishop + court_event_character_flag_effect = yes + } + ordered_vassal = { + limit = { hold_court_8040_vassal_trigger = yes } + order_by = max_military_strength + save_scope_as = infidel_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Grant religious rights + name = hold_court.8040.a + if = { + limit = { + can_add_hook = { + target = scope:infidel_vassal + type = indebted_hook + } + } + add_hook = { + target = scope:infidel_vassal + type = indebted_hook + } + } + scope:infidel_vassal = { + vassal_contract_set_obligation_level = { + type = religious_rights + level = 1 + } + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + scope:bishop = { + if = { + limit = { scope:infidel_vassal.religion = root.religion } + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + else = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -20 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Learning debate with same religion + name = hold_court.8040.b + trigger = { scope:infidel_vassal.religion = root.religion } + duel = { + skill = learning + target = scope:infidel_vassal + 10 = { + desc = hold_court.8040.c.tt_accept + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + send_interface_toast = { + title = hold_court.8040.c.tt_accept + left_icon = scope:infidel_vassal + right_icon = scope:bishop + add_prestige = medium_prestige_gain + save_scope_as = actor + scope:infidel_vassal = { save_scope_as = recipient } + custom_tooltip = demand_conversion_tt + hidden_effect = { demand_conversion_interaction_effect = yes } + } + } + 10 = { + desc = hold_court.8040.c.tt_refuse + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = hold_court.8040.c.tt_refuse + left_icon = scope:infidel_vassal + right_icon = scope:bishop + scope:bishop = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + } + } + } + + option = { # Different faith demand + name = { + trigger = { + scope:infidel_vassal.religion != root.religion + } + text = hold_court.8040.c.religion + } + name = { + trigger = { + scope:infidel_vassal.faith != root.faith + } + text = hold_court.8040.c.faith + } + scope:infidel_vassal = { + add_opinion = { + modifier = demanded_my_conversion_opinion + target = root + opinion = -10 + } + } + random_list = { + 40 = { + modifier = { + add = -20 + scope:infidel_vassal.religion != root.religion + } + show_chance = no + desc = hold_court.8040.c.tt_accept + send_interface_toast = { + title = hold_court.8040.c.tt_accept + left_icon = scope:infidel_vassal + add_piety = medium_piety_gain + save_scope_as = actor + scope:infidel_vassal = { save_scope_as = recipient } + custom_tooltip = demand_conversion_tt + hidden_effect = { demand_conversion_interaction_effect = yes } + scope:bishop = { + add_opinion = { + modifier = pious_opinion + target = root + opinion = 10 + } + } + } + } + 60 = { + show_chance = no + desc = hold_court.8040.c.tt_refuse + send_interface_toast = { + title = hold_court.8040.c.tt_refuse + left_icon = scope:infidel_vassal + stress_impact = { zealous = medium_stress_impact_gain } + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -0.5 + ai_rationality = -0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + } + } + + option = { # Refuse + name = hold_court.8040.d + add_piety = minor_piety_gain + scope:infidel_vassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + scope:bishop = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + + after = { + scope:bishop = { + clear_court_event_participation = yes + } + scope:infidel_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Royal Service +# by Joe Parkin +# 8050 - 054 +################################################## + +scripted_trigger hold_court_8050_knight_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + is_landed = no + faith = root.faith + top_liege = root + NOT = { is_primary_heir_of = prev } # prev = scope:vassal + NOT = { is_knight_of = root } + NOT = { has_relation_rival = root } + NOT = { is_close_family_of = root } + court_position_martial_trigger = { EMPLOYER = root } +} + +scripted_trigger hold_court_8050_vassal_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + NOT = { is_close_family_of = root } + NOT = { has_relation_rival = root } + NOT = { has_court_position = bodyguard_court_position } + OR = { + any_close_or_extended_family_member = { hold_court_8050_knight_trigger = yes } + any_courtier = { + has_relation_friend = prev + hold_court_8050_knight_trigger = yes + } + is_ai = no + } +} + +scripted_effect hold_court_8050_accepted_knight_effect = { + scope:knight = { + hidden_effect = { + if = { + limit = { + is_foreign_court_or_pool_guest = yes + } + return_to_court = yes + } + set_employer = root + set_knight_status = force + } + set_variable = { + name = hold_court_8050_knight + value = scope:vassal + years = 10 + } + add_prestige = minor_prestige_gain + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + trigger_event = { + id = hold_court.8054 + days = 365 + } + send_interface_message = { + title = hold_court.8050.a.tt_toast + left_icon = scope:knight + right_icon = scope:vassal + scope:knight = { custom_tooltip = hold_court.8050.a.tt_knight } + } +} + +# Vassal presents their relative as a potential knight +hold_court.8050 = { + type = court_event + title = hold_court.8050.t + desc = { + desc = hold_court.8050.desc + first_valid = { + triggered_desc = { + trigger = { scope:knight.prowess >= extremely_high_skill_rating } + desc = hold_court.8050.desc_talented + } + triggered_desc = { + trigger = { scope:knight.prowess >= decent_skill_rating } + desc = hold_court.8050.desc_suitable + } + triggered_desc = { + trigger = { scope:knight.prowess >= mediocre_skill_rating } + desc = hold_court.8050.desc_passing + } + desc = hold_court.8050.desc_unsuitable + } + } + theme = court + lower_right_portrait = scope:grandmaster + lower_center_portrait = { + character = scope:bodyguard + trigger = { + scope:knight.prowess > medium_skill_rating + NOT = { + scope:vassal = { has_hook = root } + } + } + } + court_scene = { + button_position_character = scope:vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:vassal = { + group = petitioners_group + animation = admiration + } + scope:knight = { + group = petitioners_group + animation = marshal + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + any_vassal = { hold_court_8050_vassal_trigger = yes } + NOT = { has_character_flag = hold_court_8051_flag } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + number_of_knights < max_number_of_knights + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_vassal = { # Find a vassal with someone to present + limit = { hold_court_8050_vassal_trigger = yes } + save_scope_as = vassal + court_event_character_flag_effect = yes + if = { + limit = { + any_close_or_extended_family_member = { hold_court_8050_knight_trigger = yes } + } + random_close_or_extended_family_member = { + limit = { hold_court_8050_knight_trigger = yes } + save_scope_as = knight + set_signature_weapon_effect = yes + } + } + else_if = { + limit = { + any_courtier = { + has_relation_friend = scope:vassal + hold_court_8050_knight_trigger = yes + } + } + random_courtier = { + limit = { + has_relation_friend = scope:vassal + hold_court_8050_knight_trigger = yes + } + save_scope_as = knight + set_signature_weapon_effect = yes + } + } + else = { + create_character = { + gender_female_chance = root_soldier_female_chance + location = scope:vassal.capital_province + template = soldier_friend_character + dynasty = generate + save_scope_as = knight + } + scope:knight = { set_signature_weapon_effect = yes } + } + } + scope:knight = { + court_event_character_flag_effect = yes + } + faith = { # Find a holy order + if = { + limit = { + any_faith_holy_order = { always = yes } + } + random_faith_holy_order = { + limit = { + leader = { NOT = { has_relation_rival = scope:knight } } + } + alternative_limit = { always = yes } + leader = { save_scope_as = grandmaster } + } + } + } + if = { + limit = { + any_court_position_holder = { + type = bodyguard_court_position + count >= 2 + this != scope:vassal + } + } + ordered_court_position_holder = { + type = bodyguard_court_position + limit = { + this != scope:vassal + } + order_by = { + value = 0 + subtract = prowess + } + save_scope_as = bodyguard + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Accept + name = hold_court.8050.a + highlight_portrait = scope:knight + set_variable = { + name = hold_court_8050_promise + value = scope:knight + years = 10 + } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + if = { + limit = { has_hook = root } + custom_tooltip = hold_court.8050.a.tt_hook + remove_hook = { target = root } + } + } + hold_court_8050_accepted_knight_effect = yes + stress_impact = { + gallant = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.25 + } + modifier = { + add = 30 + number_of_knights < max_number_of_knights + } + modifier = { #Weight up for stress. + add = 30 + has_trait = gallant + } + modifier = { #Weight down for stress. + add = -30 + has_trait = paranoid + } + } + } + + option = { # Take a hook if they suck + name = hold_court.8050.b + trigger = { + scope:knight.prowess < medium_skill_rating + NOR = { + scope:vassal = { has_hook = root } + root = { has_hook = scope:vassal } + } + } + highlight_portrait = scope:vassal + set_variable = { + name = hold_court_8050_promise + value = scope:knight + years = 10 + } + scope:vassal = { + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -10 + } + } + if = { + limit = { + can_add_hook = { + target = scope:vassal + type = indebted_hook + } + } + add_hook = { + target = scope:vassal + type = indebted_hook + } + } + hold_court_8050_accepted_knight_effect = yes + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.25 + ai_compassion = -0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + } + } + + option = { # Send to Holy Order instead + name = hold_court.8050.c + trigger = { + has_trait = zealous + exists = scope:grandmaster + NOT = { + scope:vassal = { has_hook = root } + } + NOT = { # unlikely to be the case, but since they are more complicated to break, let's just avoid breaking grand wedding + scope:knight = { has_been_promised_grand_wedding = yes } + } + } + trait = zealous + highlight_portrait = scope:grandmaster + add_piety = medium_piety_gain + scope:vassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + scope:knight = { + add_trait = order_member + if = { + limit = { is_married = yes } + every_spouse = { divorce = scope:knight } + } + if = { + limit = { exists = betrothed } + break_betrothal = betrothed + } + } + scope:grandmaster = { + add_courtier = scope:knight + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + option = { # Make them your new bodyguard + name = hold_court.8050.d + trigger = { + scope:knight.prowess > medium_skill_rating + scope:vassal = { + NOR = { + has_hook = root + has_court_position = bodyguard_court_position + } + } + } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + set_variable = { + name = hold_court_8050_promise + value = scope:knight + years = 10 + } + add_courtier = scope:knight + scope:knight = { + hidden_effect = { return_to_court = yes } + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 30 + } + hidden_effect = { + add_prestige = medium_prestige_gain + progress_towards_friend_effect = { + REASON = friend_hired_body_guard + CHARACTER = root + OPINION = 0 + } + } + set_variable = { + name = hold_court_8050_knight + value = scope:vassal + years = 10 + } + } + if = { + limit = { exists = scope:bodyguard } + revoke_court_position = { + recipient = scope:bodyguard + court_position = bodyguard_court_position + } + scope:bodyguard = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = bodyguard_court_position + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = bodyguard + CANDIDATE = scope:knight + } + } + hidden_effect = { + send_interface_message = { + title = hold_court.8050.a.tt_toast + left_icon = scope:knight + right_icon = scope:vassal + scope:knight = { custom_tooltip = hold_court.8050.d.tt_bodyguard } + } + } + trigger_event = { + id = hold_court.8054 + days = 365 + } + stress_impact = { + paranoid = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.5 + ai_compassion = 0.25 + } + modifier = { #Weight up. + add = 30 + scope:knight.prowess > decent_skill_rating + } + modifier = { #Weight up. + add = 30 + scope:knight.prowess > very_high_skill_rating + } + modifier = { #Weight down for stress. + add = -30 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -30 + has_trait = shy + } + } + } + + option = { # Refuse + name = { + trigger = { + scope:knight.prowess >= 20 + } + text = hold_court.8050.e.talented + } + name = { + trigger = { + scope:knight.prowess < 20 + scope:knight.prowess >= 14 + } + text = hold_court.8050.e.suitable + } + name = { + trigger = { + scope:knight.prowess < 14 + scope:knight.prowess >= 8 + } + text = hold_court.8050.e.passing + } + name = { + trigger = { + scope:knight.prowess < 8 + } + text = hold_court.8050.e.unsuitable + } + trigger = { + NOT = { + scope:vassal = { has_hook = root } + } + } + scope:vassal = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -10 + } + } + scope:knight = { + add_prestige = minor_prestige_loss + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -20 + } + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_refused_service + OPINION = 0 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + } + modifier = { + add = 15 + scope:knight.prowess < 10 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + } + } + + after = { + scope:vassal = { + clear_court_event_participation = yes + } + scope:knight = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +scripted_trigger hold_court_8050_angry_trigger = { + OR = { + prowess >= high_skill_rating + has_trait = vengeful + has_trait = wrathful + has_trait = just + has_trait = honest + has_trait = ambitious + has_trait = arrogant + has_trait = brave + AND = { + has_variable = hold_court_8050_knight + var:hold_court_8050_knight = { + is_alive = yes + is_vassal_of = root + has_relation_friend = prev # prev = scope:vassal + } + } + } +} + +scripted_effect hold_court_8051_promise_opinion_effect = { + if = { + limit = { + has_opinion_modifier = { + modifier = grateful_opinion + target = root + } + } + remove_opinion = { + modifier = grateful_opinion + target = root + } + } + add_opinion = { + modifier = broke_promise + target = root + } +} + +# Vassal is angry you fired the knight +hold_court.8051 = { + type = court_event + title = hold_court.8051.t + desc = hold_court.8051.desc + theme = court + court_scene = { + button_position_character = scope:vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:vassal = { + group = petitioners_group + animation = anger + } + scope:knight = { + group = petitioners_group + animation = shame + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + weight_multiplier = { + base = 1 + modifier = { + add = 3 + var:hold_court_8050_promise = { hold_court_8050_angry_trigger = yes } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + var:hold_court_8050_promise = { + save_scope_as = knight + var:hold_court_8050_knight = { save_scope_as = vassal } + } + add_character_flag = { + flag = hold_court_8051_flag + years = 15 + } + } + + option = { # Reinstate + name = hold_court.8051.a + scope:knight = { + if = { + limit = { scope:knight.employer = root } + custom_tooltip = hold_court.8051.a.tt_knight + } + else = { + hidden_effect = { set_employer = root } + custom_tooltip = hold_court.8050.a.tt_knight + } + hidden_effect = { set_knight_status = force } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + } + trigger_event = { + id = hold_court.8054 + days = 365 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.25 + ai_honor = -0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + } + } + + option = { # Refuse + name = hold_court.8051.b + scope:vassal = { hold_court_8051_promise_opinion_effect = yes } + scope:knight = { + hold_court_8051_promise_opinion_effect = yes + hidden_effect = { + return_to_court = yes + set_employer = scope:vassal + } + custom_tooltip = hold_court.8051.b.tt_return + } + remove_variable = hold_court_8050_promise + stress_impact = { + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.25 + ai_honor = -0.25 + } + modifier = { + add = 15 + scope:knight.prowess < 10 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + } + } +} + +# Vassal is apoplectic! You the fired knight again! +hold_court.8052 = { + type = court_event + title = hold_court.8052.t + desc = { + desc = hold_court.8052.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:vassal = { has_trait = wrathful } + } + desc = hold_court.8052.desc.wrath + } + desc = hold_court.8052.desc.fallback + } + } + theme = court + court_scene = { + button_position_character = scope:vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:vassal = { + group = petitioners_group + animation = rage + } + scope:knight = { + group = petitioners_group + animation = marshal + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + weight_multiplier = { + base = 1 + modifier = { + add = 3 + var:hold_court_8050_promise = { hold_court_8050_angry_trigger = yes } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + var:hold_court_8050_promise = { + save_scope_as = knight + var:hold_court_8050_knight = { save_scope_as = vassal } + remove_variable = hold_court_8050_knight + } + scope:vassal = { hold_court_8051_promise_opinion_effect = yes } + scope:knight = { hold_court_8051_promise_opinion_effect = yes } + } + + option = { # Oh get over it + name = hold_court.8052.a + scope:knight = { + hidden_effect = { + return_to_court = yes + set_employer = scope:vassal + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { # Arrest them + name = hold_court.8052.b + trigger = { + scope:vassal = { has_trait = wrathful } + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = arrogant + } + } + trait = vengeful + trait = wrathful + trait = arrogant + imprison_character_effect = { + TARGET = scope:vassal + IMPRISONER = root + } + scope:vassal = { hold_court_8051_promise_opinion_effect = yes } + scope:knight = { + hold_court_8051_promise_opinion_effect = yes + hidden_effect = { + return_to_court = yes + set_employer = scope:vassal + } + } + stress_impact = { + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 2 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = forgiving + } + } + } + + after = { remove_variable = hold_court_8050_promise } +} + +# Knight dies in your service +hold_court.8053 = { + type = character_event + title = hold_court.8053.t + desc = { + desc = hold_court.8053.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:knight.killer } + desc = hold_court.8053.killer + } + desc = hold_court.8053.battle + } + random_valid = { + triggered_desc = { + trigger = { scope:knight.prowess >= 20 } + desc = hold_court.8053.desc_talented + } + triggered_desc = { + trigger = { scope:knight.prowess >= 14 } + desc = hold_court.8053.desc_suitable + } + triggered_desc = { + trigger = { scope:knight.prowess >= 8 } + desc = hold_court.8053.desc_passing + } + triggered_desc = { + trigger = { has_trait = craven } + desc = hold_court.8053.desc_coward + } + triggered_desc = { + trigger = { + NOT = { has_trait = craven } + scope:knight.prowess < 8 + } + desc = hold_court.8053.desc_unsuitable + } + } + desc = hold_court.8053.desc.body + } + theme = court + override_background = { reference = battlefield } + left_portrait = { + character = scope:vassal + animation = sadness + } + right_portrait = { + character = scope:knight + } + + trigger = { primary_title.tier >= tier_kingdom } + + immediate = { + scope:knight = { + show_as_tooltip = { + if = { + limit = { exists = killer } + death = { + death_reason = death_battle + killer = scope:knight.killer + } + } + else = { + death = { death_reason = death_battle } + } + } + } + } + + option = { # Oh + name = hold_court.8053.a + } +} + +scripted_trigger hold_court_8050_fired_trigger = { + has_variable = hold_court_8050_knight + this = root.var:hold_court_8050_promise + is_knight = no + var:hold_court_8050_knight = { + is_landed_or_landless_administrative = yes + is_vassal_or_below_of = root + NOT = { has_relation_rival = root } + } + NOR = { + has_trait = disfigured + has_trait = maimed + has_relation_friend = root + has_relation_rival = root + has_court_position = bodyguard_court_position + } +} + +# Trigger for follow up events +hold_court.8054 = { + hidden = yes + + trigger = { + has_variable = hold_court_8050_promise + primary_title.tier >= tier_kingdom } + + immediate = { + if = { + limit = { hold_court_8050_fired_trigger = yes } + if = { + limit = { has_variable = hold_court_8051_flag } + trigger_event = hold_court.8052 + } + else = { trigger_event = hold_court.8051 } + } + else = { + trigger_event = { + id = hold_court.8054 + days = 365 + } + } + } +} + +################################################## +# A Temple for X +# by Joe Parkin +# 8060 - 061 +################################################## + +scripted_trigger hold_court_8060_vassal_trigger = { + faith = root.faith + NOR = { + this = scope:bishop + is_vassal_of = scope:bishop + } +} + +scripted_effect hold_court_8060_completion_effect = { + show_as_tooltip = { + scope:target_county = { + custom_tooltip = hold_court.8060.a.tt + add_county_modifier = { + modifier = hold_court_8060_built_modifier + years = 20 + } + } + scope:bishop = { + custom_tooltip = hold_court.8060.a.tt + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } +} + +# Chaplain wants a new Temple built +hold_court.8060 = { + type = court_event + title = hold_court.8060.t + desc = { + desc = hold_court.8060.desc + first_valid = { + triggered_desc = { + trigger = { scope:target_county.holder = root } + desc = hold_court.8060.desc.owned + } + triggered_desc = { + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + } + desc = hold_court.8060.desc.vassal + } + desc = hold_court.8060.desc.subvassal + } + first_valid = { + triggered_desc = { + trigger = { + scope:target_county = { + any_county_province = { has_holding_type = church_holding } + } + } + desc = hold_court.8060.desc.existing + } + desc = hold_court.8060.desc.first + } + desc = hold_court.8060.desc.end + } + theme = realm + lower_left_portrait = scope:vassal + lower_center_portrait = scope:subvassal + court_scene = { + button_position_character = scope:bishop + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:bishop = { + group = petitioners_group + animation = chaplain + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_available_ai_adult = yes + } + NOT = { has_character_flag = has_had_holding_request_event } + NOT = { has_variable = hold_court_8060_church_var } + gold > hold_court_holding_cost_double_value + faith = { + has_doctrine = doctrine_theocracy_temporal + NOT = { has_doctrine_parameter = unreformed } + } + OR = { + any_held_title = { + county_has_empty_province_trigger = yes + faith = ROOT.faith + } + any_sub_realm_county = { + faith = root.faith + holder = { + NOR = { + this = root.cp:councillor_court_chaplain + is_vassal_of = root.cp:councillor_court_chaplain + } + } + any_county_province = { province_has_no_holding_trigger = yes } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + any_held_title = { + title_tier = county + county_has_empty_province_trigger = yes + faith = ROOT.faith + county_has_no_church_trigger = yes + } + } + modifier = { + add = 1 + any_held_title = { + title_tier = county + county_has_empty_province_trigger = yes + faith = ROOT.faith + county_has_all_holding_types = yes + } + } + modifier = { + add = -2 + cp:councillor_court_chaplain.learning < 10 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_holding_request_event + years = 15 + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + court_event_character_flag_effect = yes + } + if = { # root's counties... + limit = { + any_held_title = { + county_has_empty_province_trigger = yes + faith = ROOT.faith + } + } + ordered_held_title = { + limit = { + county_has_empty_province_trigger = yes + faith = ROOT.faith + county_has_no_church_trigger = yes + } + alternative_limit = { + county_has_empty_province_trigger = yes + faith = ROOT.faith + county_has_all_holding_types = yes + } + alternative_limit = { county_has_empty_province_trigger = yes } + order_by = development_level + save_scope_as = target_county + } + } + else = { # ... vassal counties + ordered_sub_realm_county = { + limit = { + holder = { + is_vassal_of = ROOT + hold_court_8060_vassal_trigger = yes + } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + county_has_no_church_trigger = yes + } + alternative_limit = { + holder = { + is_vassal_of = ROOT + hold_court_8060_vassal_trigger = yes + } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + county_has_all_holding_types = yes + } + alternative_limit = { + holder = { + is_vassal_of = ROOT + hold_court_8060_vassal_trigger = yes + } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + } + alternative_limit = { + holder = { hold_court_8060_vassal_trigger = yes } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + county_has_no_church_trigger = yes + } + alternative_limit = { + holder = { hold_court_8060_vassal_trigger = yes } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + county_has_all_holding_types = yes + } + alternative_limit = { + holder = { hold_court_8060_vassal_trigger = yes } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + } + order_by = development_level + save_scope_as = target_county + holder = { + if = { + limit = { + NOT = { is_vassal_of = root } + } + liege = { save_scope_as = vassal } + save_scope_as = subvassal + } + else = { save_scope_as = vassal } + } + } + } + scope:target_county = { + random_county_province = { + limit = { province_has_no_holding_trigger = yes } + save_scope_as = target_province + } + } + if = { + limit = { + any_court_position_holder = { type = royal_architect_court_position } + } + random_court_position_holder = { + type = royal_architect_court_position + save_scope_as = royal_architect + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Pay for the Temple + name = hold_court.8060.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = hold_court_holding_cost_cheaper_value + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_cheaper_value } + } + } + hold_court_8060_completion_effect = yes + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + set_variable = { + name = hold_court_8060_church_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_zeal = 0.5 + ai_rationality = 0.25 + ai_compassion = 0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Get the Vassal to pay half + name = hold_court.8060.b + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + scope:vassal.short_term_gold >= hold_court_holding_cost_half_value + } + show_as_unavailable = { scope:vassal.short_term_gold < hold_court_holding_cost_half_value } + highlight_portrait = scope:vassal + remove_treasury_or_gold = hold_court_holding_cost_half_value + scope:vassal = { + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -15 + } + } + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_half_value } + } + } + hold_court_8060_completion_effect = yes + set_variable = { + name = hold_court_8060_church_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_compassion = 0.5 + ai_zeal = 0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Get the Subvassal to pay half + name = hold_court.8060.c + trigger = { + exists = scope:subvassal + OR = { + scope:subvassal.short_term_gold >= hold_court_holding_cost_half_value + scope:vassal.short_term_gold >= hold_court_holding_cost_half_value + } + } + show_as_unavailable = { + scope:subvassal.short_term_gold < hold_court_holding_cost_half_value + scope:vassal.short_term_gold < hold_court_holding_cost_half_value + } + highlight_portrait = scope:subvassal + remove_treasury_or_gold = hold_court_holding_cost_half_value + scope:subvassal = { # Vassals not happy about paying + if = { + limit = { long_term_gold >= hold_court_holding_cost_half_value } + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + else = { + scope:vassal = { + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + } + } + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_half_value } + } + } + hold_court_8060_completion_effect = yes + set_variable = { + name = hold_court_8060_church_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_compassion = 0.5 + ai_zeal = 0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Architect involved + name = hold_court.8060.d + trigger = { exists = scope:royal_architect } + scope:royal_architect = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + duel = { + skill = stewardship + value = average_skill_rating + 6 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8060.d.tt_success + send_interface_toast = { + title = hold_court.8060.d.tt_success + left_icon = scope:frontier_lord + root = { + remove_treasury_or_gold = hold_court_holding_cost_architect_cheaper_value + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_architect_cheaper_value } + } + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = hold_court.8060.d.tt_normal + send_interface_toast = { + title = hold_court.8060.d.tt_normal + left_icon = scope:frontier_lord + root = { + remove_treasury_or_gold = hold_court_holding_cost_cheaper_value + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_cheaper_value } + } + } + } + } + } + 4 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + desc = hold_court.8060.d.tt_failure + send_interface_toast = { + title = hold_court.8060.d.tt_failure + left_icon = scope:frontier_lord + root = { + remove_treasury_or_gold = hold_court_holding_cost_architect_expensive_value + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_architect_expensive_value } + } + } + } + } + } + } + } + hold_court_8060_completion_effect = yes + stress_impact = { + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = diligent + } + } + } + + option = { # Refuse + name = { + trigger = { + NOT = { exists = scope:vassal } + } + text = hold_court.8060.e.own + } + name = { + trigger = { exists = scope:vassal } + text = hold_court.8060.e.vassal + } + if = { + limit = { exists = scope:vassal } + add_piety = miniscule_piety_loss + } + else = { add_piety = minor_piety_loss } + scope:bishop = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_zeal = -0.5 + ai_compassion = -0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + after = { + if = { + limit = { has_variable = hold_court_8060_church_var } + trigger_event = { + id = hold_court.8061 + days = 1830 # 5 years + 5 days + } + } + scope:bishop = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# The Temple is complete +hold_court.8061 = { + type = character_event + title = hold_court.8061.t + desc = { + first_valid = { + triggered_desc = { # In case you have no bishop on completion + trigger = { + exists = scope:bishop + scope:bishop = { is_alive = yes } + } + desc = hold_court.8061.desc.bishop + } + desc = hold_court.8061.desc.fallback + } + first_valid = { + triggered_desc = { + trigger = { scope:target_county.holder = root } + desc = hold_court.8061.desc.owned + } + triggered_desc = { + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + } + desc = hold_court.8061.desc.vassal + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:target_county = { + any_county_province = { + count >= 2 + has_holding_type = church_holding + } + } + } + desc = hold_court.8061.desc.existing + } + desc = hold_court.8061.desc.first + } + } + theme = realm + override_background = { + trigger = { + NOR = { + faith = { religion = religion:hinduism_religion } + faith = { religion = religion:buddhism_religion } + faith = { religion = religion:jainism_religion } + } + } + reference = temple + } + override_background = { + trigger = { + OR = { + faith = { religion = religion:hinduism_religion } + faith = { religion = religion:buddhism_religion } + faith = { religion = religion:jainism_religion } + } + } + reference = ep2_holy_site_indian + } + left_portrait = { + character = scope:bishop + animation = happiness + trigger = { + scope:bishop = { is_alive = yes } + } + } + lower_right_portrait = scope:vassal + + trigger = { + has_variable = hold_court_8060_church_var + var:hold_court_8060_church_var = { + OR = { + county.holder = root + county.holder.top_liege = root + } + } + } + + immediate = { + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = bishop } + } + var:hold_court_8060_church_var = { + save_scope_as = target_province + county = { + save_scope_as = target_county + holder = { + if = { + limit = { + this != root + } + if = { + limit = { + liege != root + } + save_scope_as = subvassal + liege = { save_scope_as = vassal } + } + else = { save_scope_as = vassal } + } + } + } + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + show_as_tooltip = { + scope:target_county.holder = { + add_piety = massive_piety_gain + } + faith = { + change_fervor = { + value = 1 + desc = fervor_gain_built_temple_holding + } + } + } + } + + option = { # Great + name = hold_court.8061.a + if = { + limit = { exists = scope:vassal } + add_piety = major_piety_gain + } + scope:target_county = { + add_county_modifier = { + modifier = hold_court_8060_built_modifier + years = 25 + } + } + scope:bishop = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + + after = { remove_variable = hold_court_8060_church_var } +} + +################################################## +# The Growth of X +# by Joe Parkin +# 8070 - 071 +################################################## + +scripted_trigger hold_court_8070_vassal_trigger = { # Vassal who is not the steward + NOR = { + this = scope:steward + is_vassal_of = scope:steward + } +} + +scripted_effect hold_court_8070_completion_effect = { # Show effects once holding is built + show_as_tooltip = { + scope:target_county = { + custom_tooltip = hold_court.8070.a.tt + add_county_modifier = { + modifier = hold_court_8070_built_modifier + years = 25 + } + } + scope:steward = { + custom_tooltip = hold_court.8070.a.tt + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } +} + +# Steward wants investment in City +hold_court.8070 = { + type = court_event + title = hold_court.8070.t + desc = { + desc = hold_court.8070.desc.intro + first_valid = { # County owner descriptions + triggered_desc = { + trigger = { scope:target_county.holder = root } + desc = hold_court.8060.desc.owned + } + triggered_desc = { + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + } + desc = hold_court.8060.desc.vassal + } + desc = hold_court.8060.desc.subvassal + } + desc = hold_court.8070.desc.body + first_valid = { # City number descriptions + triggered_desc = { + trigger = { + scope:target_county = { + any_county_province = { has_holding_type = city_holding } + } + } + desc = hold_court.8070.desc.existing + } + desc = hold_court.8070.desc.first + } + desc = hold_court.8070.desc.end + } + theme = realm + lower_right_portrait = scope:vassal + court_scene = { + button_position_character = scope:steward + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:steward = { + group = petitioners_group + animation = steward + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 30 } + + trigger = { + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + NOT = { has_character_flag = has_had_holding_request_event } + NOT = { has_variable = hold_court_8070_city_var } + gold > hold_court_holding_cost_double_value + OR = { + any_held_title = { county_has_empty_province_trigger = yes } + any_sub_realm_county = { + holder = { + NOR = { + this = root.cp:councillor_steward + is_vassal_of = root.cp:councillor_steward + } + } + any_county_province = { province_has_no_holding_trigger = yes } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + any_held_title = { + title_tier = county + county_has_empty_province_trigger = yes + county_has_no_city_trigger = yes + } + } + modifier = { + add = 1 + any_held_title = { + title_tier = county + county_has_empty_province_trigger = yes + county_has_all_holding_types = yes + } + } + modifier = { + add = -2 + cp:councillor_steward.stewardship < 10 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = has_had_holding_request_event + years = 15 + } + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + if = { # root's counties... + limit = { + any_held_title = { county_has_empty_province_trigger = yes } + } + ordered_held_title = { + limit = { + county_has_empty_province_trigger = yes + county_has_no_city_trigger = yes + } + alternative_limit = { + county_has_empty_province_trigger = yes + county_has_all_holding_types = yes + } + alternative_limit = { county_has_empty_province_trigger = yes } + order_by = development_level + save_scope_as = target_county + } + } + else = { # ... vassal counties + ordered_sub_realm_county = { + limit = { + holder = { + is_vassal_of = root + hold_court_8070_vassal_trigger = yes + } + any_county_province = { province_has_no_holding_trigger = yes } + county_has_no_city_trigger = yes + } + alternative_limit = { + holder = { + is_vassal_of = root + hold_court_8070_vassal_trigger = yes + } + any_county_province = { province_has_no_holding_trigger = yes } + county_has_all_holding_types = yes + } + alternative_limit = { + holder = { + is_vassal_of = root + hold_court_8070_vassal_trigger = yes + } + any_county_province = { province_has_no_holding_trigger = yes } + } + alternative_limit = { + holder = { hold_court_8070_vassal_trigger = yes } + any_county_province = { province_has_no_holding_trigger = yes } + county_has_no_city_trigger = yes + } + alternative_limit = { + holder = { hold_court_8070_vassal_trigger = yes } + any_county_province = { province_has_no_holding_trigger = yes } + county_has_all_holding_types = yes + } + alternative_limit = { + holder = { hold_court_8070_vassal_trigger = yes } + any_county_province = { province_has_no_holding_trigger = yes } + } + order_by = development_level + save_scope_as = target_county + holder = { save_scope_as = vassal } + } + } + scope:target_county = { + random_county_province = { + limit = { province_has_no_holding_trigger = yes } + save_scope_as = target_province + } + } + if = { + limit = { + any_court_position_holder = { type = royal_architect_court_position } + } + random_court_position_holder = { + type = royal_architect_court_position + save_scope_as = royal_architect + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Pay for the City + name = hold_court.8070.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + remove_treasury_or_gold = hold_court_holding_cost_cheaper_value + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_cheaper_value } + } + } + hold_court_8070_completion_effect = yes + show_as_tooltip = { + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + } + set_variable = { + name = hold_court_8070_city_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_rationality = 0.25 + ai_compassion = 0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Get the Vassal to pay half + name = hold_court.8070.b + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + scope:vassal.short_term_gold >= hold_court_holding_cost_half_value + } + show_as_unavailable = { scope:vassal.short_term_gold < hold_court_holding_cost_half_value } + highlight_portrait = scope:vassal + remove_treasury_or_gold = hold_court_holding_cost_half_value + scope:vassal = { + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -15 + } + } + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_half_value } + } + } + hold_court_8070_completion_effect = yes + set_variable = { + name = hold_court_8070_city_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_rationality = 0.25 + ai_compassion = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Get the Subvassal to pay half + name = hold_court.8070.c + trigger = { + exists = scope:vassal + exists = scope:subvassal + OR = { + scope:subvassal.short_term_gold >= hold_court_holding_cost_half_value + scope:vassal.short_term_gold >= hold_court_holding_cost_half_value + } + } + show_as_unavailable = { + scope:subvassal.short_term_gold < hold_court_holding_cost_half_value + scope:vassal.short_term_gold < hold_court_holding_cost_half_value + } + remove_treasury_or_gold = hold_court_holding_cost_half_value + scope:subvassal = { # Vassals not happy about paying + if = { + limit = { long_term_gold >= hold_court_holding_cost_half_value } + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + else = { + scope:vassal = { + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + } + } + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_half_value } + } + } + hold_court_8070_completion_effect = yes + set_variable = { + name = hold_court_8070_city_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_rationality = 0.25 + ai_compassion = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Architect involved + name = hold_court.8070.d + trigger = { exists = scope:royal_architect } + scope:royal_architect = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + duel = { + skill = stewardship + value = average_skill_rating + 6 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8060.d.tt_success + send_interface_toast = { + title = hold_court.8060.d.tt_success + left_icon = scope:royal_architect + root = { + remove_treasury_or_gold = hold_court_holding_cost_architect_cheaper_value + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_architect_cheaper_value } + } + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = hold_court.8060.d.tt_normal + send_interface_toast = { + title = hold_court.8060.d.tt_normal + left_icon = scope:royal_architect + root = { + remove_treasury_or_gold = hold_court_holding_cost_cheaper_value + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_cheaper_value } + } + } + } + } + } + 4 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + desc = hold_court.8060.d.tt_failure + send_interface_toast = { + title = hold_court.8060.d.tt_failure + left_icon = scope:royal_architect + root = { + remove_treasury_or_gold = hold_court_holding_cost_architect_expensive_value + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_architect_expensive_value } + } + } + } + } + } + } + } + hold_court_8070_completion_effect = yes + stress_impact = { + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = diligent + } + } + } + + option = { # Refuse + name = hold_court.8070.e + add_prestige = minor_prestige_loss + scope:steward = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + after = { + scope:steward = { + clear_court_event_participation = yes + } + if = { + limit = { has_variable = hold_court_8070_city_var } + trigger_event = { + id = hold_court.8071 + days = 1830 # 5 years + 10 days + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# The City is complete +hold_court.8071 = { + type = character_event + title = hold_court.8071.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:steward + scope:steward = { is_alive = yes } + } + desc = hold_court.8071.desc.steward + } + desc = hold_court.8071.desc.fallback + } + first_valid = { + triggered_desc = { + trigger = { scope:target_county.holder = root } + desc = hold_court.8071.desc.owned + } + triggered_desc = { + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + } + desc = hold_court.8071.desc.vassal + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:target_county = { + any_county_province = { + count >= 2 + has_holding_type = city_holding + } + } + } + desc = hold_court.8071.desc.existing + } + desc = hold_court.8071.desc.first + } + } + theme = realm + override_background = { reference = market } + left_portrait = { + character = scope:steward + animation = happiness + trigger = { + scope:steward = { is_alive = yes } + } + } + lower_right_portrait = scope:vassal + + trigger = { + has_variable = hold_court_8070_city_var + var:hold_court_8070_city_var = { + OR = { + county.holder = root + county.holder.top_liege = root + } + } + } + + immediate = { + if = { + limit = { exists = cp:councillor_steward } + cp:councillor_steward = { save_scope_as = steward } + } + var:hold_court_8070_city_var = { + save_scope_as = target_province + county = { + save_scope_as = target_county + holder = { + if = { + limit = { + this != root + } + if = { + limit = { + liege != root + } + save_scope_as = subvassal + liege = { save_scope_as = vassal } + } + else = { save_scope_as = vassal } + } + } + } + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + } + + option = { # Great + name = hold_court.8071.a + scope:target_county = { + add_county_modifier = { + modifier = hold_court_8070_built_modifier + years = 25 + } + } + scope:steward = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + + after = { remove_variable = hold_court_8070_city_var } +} + +################################################## +# The Republic of X +# by Joe Parkin +# 8080 +################################################## + +scripted_trigger hold_court_8080_mayor_trigger = { # Check mayor's culture, and city wealth + hold_court_available_mayor_trigger = yes + culture = { has_innovation = innovation_development_02 } + primary_title = { + de_jure_liege = { + this != root.capital_county + } + title_province.combined_building_level >= 5 + } +} + +scripted_effect hold_court_8080_grant_effect = { # Grant county to mayor + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:mayor.primary_title.de_jure_liege = { + change_title_holder = { + holder = scope:mayor + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:target_county = { + add_county_modifier = { + modifier = hold_court_8080_granted_modifier + years = 20 + } + } +} + +# Mayor wants rights over a county +hold_court.8080 = { + type = court_event + title = hold_court.8080.t + desc = { + desc = hold_court.8080.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:target_county = { + has_coastal_province = yes + } + } + desc = hold_court.8080.desc.body_sea + } + desc = hold_court.8080.desc.body_fallback + } + desc = hold_court.8080.desc.body + } + theme = realm + court_scene = { + button_position_character = scope:mayor + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:mayor = { + group = petitioners_group + animation = admiration + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 40 } + + trigger = { + NOR = { + has_character_flag = has_had_county_request_event + has_character_flag = has_had_government_request_event + } + top_liege = this + culture = { has_innovation = innovation_development_02 } + any_vassal = { hold_court_8080_mayor_trigger = yes } + NOT = { + any_sub_realm_county = { + percent > 0.1 + holder = { government_has_flag = government_is_republic } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_vassal = { + hold_court_8080_mayor_trigger = yes + primary_title.title_province = { has_building_or_higher = common_tradeport_01 } + } + } + modifier = { + add = 1 + any_vassal = { + hold_court_8080_mayor_trigger = yes + primary_title = { + de_jure_liege = { + has_coastal_province = yes + } + } + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = has_had_county_request_event + years = 15 + } + add_character_flag = { + flag = has_had_government_request_event + years = 15 + } + ordered_vassal = { + limit = { + hold_court_8080_mayor_trigger = yes + primary_title.title_province = { has_building_or_higher = common_tradeport_01 } + } + alternative_limit = { + hold_court_8080_mayor_trigger = yes + primary_title = { + de_jure_liege = { + has_coastal_province = yes + } + } + } + alternative_limit = { hold_court_8080_mayor_trigger = yes } + order_by = primary_title.title_province.combined_building_level + save_scope_as = mayor + court_event_character_flag_effect = yes + primary_title = { + save_scope_as = target_city + set_variable = { + name = hold_court_city_cooldown_var + years = 10 + } + de_jure_liege = { save_scope_as = target_county } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Grant Republican County + name = hold_court.8080.a + hold_court_8080_grant_effect = yes + scope:mayor = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_compassion = 0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # For a gift + name = hold_court.8080.b + if = { + limit = { scope:mayor.short_term_treasury_or_gold >= root.medium_treasury_or_gold_value } + scope:mayor = { + pay_treasury_or_gold = { + target = root + value = root.medium_treasury_or_gold_value + } + } + } + else = { add_treasury_or_gold = major_treasury_or_gold_value } + hold_court_8080_grant_effect = yes + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + option = { # Offer smaller privileges + name = hold_court.8080.c + duel = { + skill = stewardship + target = scope:mayor + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8080.c.tt_success + send_interface_toast = { + title = hold_court.8080.c.tt_success + left_icon = scope:mayor + scope:mayor = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + scope:target_county = { + add_county_modifier = { + modifier = hold_court_8080_compromise_modifier + years = 20 + } + } + } + } + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = hold_court.8080.c.tt_failure + send_interface_toast = { + title = hold_court.8080.c.tt_failure + left_icon = scope:mayor + add_prestige = minor_prestige_loss + scope:mayor = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = 0.5 + } + } + } + + option = { # Refuse + name = hold_court.8080.d + scope:mayor = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + scope:target_county = { + add_county_modifier = { + modifier = hold_court_8080_upset_modifier + years = 15 + } + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + option = { # Imprison the Mayor + name = hold_court.8080.e + imprison_character_effect = { + TARGET = scope:mayor + IMPRISONER = root + } + add_dread = minor_dread_gain + add_character_modifier = { + modifier = hold_court_8080_prison_modifier + years = 10 + } + stress_impact = { + humble = medium_stress_impact_gain + just = medium_stress_impact_gain + calm = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = -0.5 + ai_rationality = -0.25 + ai_compassion = -0.25 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -30 + has_trait = just + } + modifier = { #Weight down for stress. + add = -30 + has_trait = calm + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + } + } + + after = { + scope:mayor = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Place at Court +# by Joe Parkin +# 8090 +################################################## + +scripted_trigger hold_court_8090_can_move_trigger = { + has_court_event_flag = no + AND = { + has_any_court_position = no + can_be_employed_as_any_court_position_trigger = yes + } + is_available_ai_adult = yes + is_landed = no + faith = root.faith + top_liege = root + NOT = { is_primary_heir_of = prev } # prev = scope:vassal + NOT = { has_relation_rival = root } + NOT = { is_close_family_of = root } +} + +scripted_trigger hold_court_8090_candidate_trigger = { # Courtier is not already in a position + has_court_event_flag = no + is_available_ai_adult = yes + OR = { + AND = { + has_any_court_position = no + can_be_employed_as_any_court_position_trigger = yes + } + any_close_family_member = { hold_court_8090_can_move_trigger = yes } + } +} + +scripted_effect hold_court_8090_hook_effect = { + if = { + limit = { + NOR = { + has_relation_lover = $CHAR$ + has_relation_friend = $CHAR$ + } + } + if = { + limit = { + can_add_hook = { + target = $CHAR$ + type = indebted_hook + } + } + add_hook = { + target = $CHAR$ + type = indebted_hook + } + } + } + else = { + if = { + limit = { has_character_modifier = hold_court_8090_favorites_modifier } + hidden_effect = { remove_character_modifier = hold_court_8090_favorites_modifier } + } + add_character_modifier = { + modifier = hold_court_8090_favorites_modifier + years = 5 + } + } +} + +# Vassal/courtier wants a Court Position +hold_court.8090 = { + type = court_event + title = hold_court.8090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { exists = scope:vassal_advocate } + } + desc = hold_court.8090.desc.intro + } + desc = hold_court.8090.desc.intro_advocate + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:old_holder + scope:vassal = { has_relation_rival = scope:old_holder } + } + desc = hold_court.8090.desc.rival # RIVAL HOLDS POS + } + triggered_desc = { + trigger = { + exists = scope:old_holder + exists = scope:vassal_advocate + } + desc = hold_court.8090.desc.other_advocate + } + triggered_desc = { + trigger = { exists = scope:old_holder } + desc = hold_court.8090.desc.other + } + triggered_desc = { + trigger = { + NOT = { exists = scope:vassal_advocate } + scope:vassal = { has_trait = arrogant } + } + desc = hold_court.8090.desc.arrogant # FILLED BUT ARROGANT + } + triggered_desc = { + trigger = { + NOT = { exists = scope:vassal_advocate } + scope:vassal = { has_trait = ambitious } + } + desc = hold_court.8090.desc.ambitious # FILLED BUT AMBITIOUS + } + triggered_desc = { + trigger = { + exists = scope:old_holder + OR = { + AND = { # Stewardship roles + scope:vassal.var:target_court_position = flag:royal_architect + scope:vassal.var:target_court_position = flag:seneschal + scope:vassal.var:target_court_position = flag:court_gardener + scope:vassal.var:target_court_position = flag:keeper_of_swans + scope:vassal.stewardship > scope:old_holder.stewardship + } + AND = { # Learning roles + scope:vassal.var:target_court_position = flag:court_tutor + scope:vassal.var:target_court_position = flag:high_almoner + scope:vassal.var:target_court_position = flag:court_physician + scope:vassal.var:target_court_position = flag:antiquarian + scope:vassal.var:target_court_position = flag:court_artificer + scope:vassal.var:target_court_position = flag:chief_qadi + scope:vassal.var:target_court_position = flag:court_astrologer + scope:vassal.learning > scope:old_holder.learning + } + AND = { # Martial roles + scope:vassal.var:target_court_position = flag:master_of_horse + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:champion + scope:vassal.var:target_court_position = flag:master_of_hunt + scope:vassal.var:target_court_position = flag:garuda + scope:vassal.martial > scope:old_holder.martial + scope:vassal.var:target_court_position = flag:akolouthos + } + AND = { # Diplomacy roles + scope:vassal.var:target_court_position = flag:court_poet + scope:vassal.var:target_court_position = flag:court_musician + scope:vassal.var:target_court_position = flag:cupbearer + scope:vassal.var:target_court_position = flag:lady_in_waiting + scope:vassal.var:target_court_position = flag:cultural_emissary + scope:vassal.diplomacy > scope:old_holder.diplomacy + } + AND = { # Intrigue roles + scope:vassal.var:target_court_position = flag:chief_eunuch + scope:vassal.intrigue > scope:old_holder.intrigue + } + } + } + desc = hold_court.8090.desc.superior # Position is occupied but by someone worse at it + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:vassal_advocate } + desc = hold_court.8090.desc.empty_advocate + } + desc = hold_court.8090.desc.empty + } + random_valid = { + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:royal_architect + scope:vassal = { has_trait = architect } + } + desc = hold_court_8090_interest_architect + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:seneschal + scope:vassal = { has_trait = administrator } + } + desc = hold_court_8090_interest_seneschal_administrator + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:seneschal + scope:vassal = { is_eunuch_trigger = yes } + } + desc = hold_court_8090_interest_seneschal_eunuch + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:high_almoner + scope:vassal = { has_trait = improvident } + } + desc = hold_court_8090_interest_almoner + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_physician + scope:vassal = { has_trait = lifestyle_physician } + } + desc = hold_court_8090_interest_physician_experience + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_physician + scope:vassal = { has_trait = lifestyle_mystic } + } + desc = hold_court_8090_interest_physician_mystic + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_physician + scope:vassal = { has_trait = lifestyle_herbalist } + } + desc = hold_court_8090_interest_physician_herbalist + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:antiquarian + scope:vassal = { has_trait = scholar } + } + desc = hold_court_8090_interest_antiquarian + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:master_of_horse + scope:vassal = { has_trait = overseer } + } + desc = hold_court_8090_interest_horse + } + triggered_desc = { + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_soulmate = scope:vassal + } + desc = hold_court_8090_interest_bodyguard_soulmate + } + triggered_desc = { + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_lover = scope:vassal + } + desc = hold_court_8090_interest_bodyguard_lover + } + triggered_desc = { + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_best_friend = scope:vassal + } + desc = hold_court_8090_interest_bodyguard_bestie + } + triggered_desc = { + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_friend = scope:vassal + } + desc = hold_court_8090_interest_bodyguard_friend + } + triggered_desc = { + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:champion + scope:vassal.var:target_court_position = flag:garuda + } + scope:vassal = { has_trait = lifestyle_blademaster } + } + desc = hold_court_8090_interest_champion + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:master_of_hunt + scope:vassal = { has_trait = lifestyle_hunter } + } + desc = hold_court_8090_interest_hunt + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_poet + scope:vassal = { has_trait = lifestyle_poet } + } + desc = hold_court_8090_interest_poet + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_musician + scope:vassal = { has_trait = gregarious } + } + desc = hold_court_8090_interest_musician_gregarious + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_musician + scope:vassal = { + culture = { + this != scope:second.culture + has_cultural_tradition = tradition_music_theory + } + } + } + desc = hold_court_8090_interest_musician_culture + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:cupbearer + scope:vassal = { has_trait = lifestyle_reveler } + } + desc = hold_court_8090_interest_cupbearer + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_soulmate = scope:vassal + } + desc = hold_court_8090_interest_lady_soulmate + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_lover = scope:vassal + } + desc = hold_court_8090_interest_lady_lover + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_best_friend = scope:vassal + } + desc = hold_court_8090_interest_lady_bestie + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_friend = scope:vassal + } + desc = hold_court_8090_interest_lady_friend + } + triggered_desc = { + trigger = { scope:vassal.var:target_court_position = flag:chief_eunuch } + desc = hold_court_8090_interest_eunuch + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_gardener + scope:vassal = { + OR = { + has_trait = lifestyle_gardener + has_trait = lifestyle_herbalist + } + } + } + desc = hold_court_8090_interest_gardener + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_artificer + scope:vassal = { has_completed_inspiration = yes } + } + desc = hold_court_8090_interest_artificer + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:cultural_emissary + scope:vassal = { has_trait = diplomat } + } + desc = hold_court_8090_interest_emissary + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:chief_qadi + scope:vassal = { has_trait = scholar } + } + desc = hold_court_8090_interest_qadi + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:garuda + scope:vassal = { has_trait = lifestyle_blademaster } + } + desc = hold_court_8090_interest_garuda + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:keeper_of_swans + scope:vassal = { has_trait = lifestyle_hunter } + } + desc = hold_court_8090_interest_keeper_of_swans + } + triggered_desc = { + trigger = { has_relation_soulmate = scope:vassal } + desc = hold_court_8090_interest_soulmate + } + triggered_desc = { + trigger = { has_relation_lover = scope:vassal } + desc = hold_court_8090_interest_lover + } + triggered_desc = { + trigger = { has_relation_best_friend = scope:vassal } + desc = hold_court_8090_interest_bestie + } + triggered_desc = { + trigger = { has_relation_friend = scope:vassal } + desc = hold_court_8090_interest_friend + } + triggered_desc = { + trigger = { exists = scope:old_holder } + desc = hold_court_8090_interest_other + } + triggered_desc = { + trigger = { + NOT = { exists = scope:old_holder } + } + desc = hold_court_8090_interest_fallback + } + } + } + theme = realm + lower_right_portrait = scope:old_holder + court_scene = { + button_position_character = scope:vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:vassal = { + group = petitioners_group + animation = admiration + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + OR = { + any_vassal = { hold_court_8090_candidate_trigger = yes } + any_courtier = { hold_court_8090_candidate_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + has_employed_any_court_position = no + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + save_scope_as = liege + every_vassal = { + limit = { hold_court_8090_candidate_trigger = yes } + add_to_list = hold_court_8090_candidate_list + } + every_courtier = { + limit = { hold_court_8090_candidate_trigger = yes } + add_to_list = hold_court_8090_candidate_list + } + random_in_list = { + list = hold_court_8090_candidate_list + weight = { + base = 1 + modifier = { + add = 2 + is_landed_or_landless_administrative = yes + } + modifier = { + add = -1 + highest_held_title_tier = tier_barony + } + modifier = { + add = 2 + highest_held_title_tier = tier_duchy + } + modifier = { + add = 4 + highest_held_title_tier = tier_kingdom + } + modifier = { + add = -20 + is_councillor_of = root + } + modifier = { + add = 2 + has_trait = arrogant + } + modifier = { + add = 2 + has_trait = ambitious + } + modifier = { + add = 10 + has_relation_friend = root + } + modifier = { + add = 20 + has_relation_best_friend = root + } + modifier = { + add = 30 + has_relation_lover = root + } + modifier = { + add = 40 + has_relation_soulmate = root + } + } + hidden_effect = { + random_list = { + 2 = { + trigger = { has_any_court_position = no } + save_scope_as = vassal + court_event_character_flag_effect = yes + } + 2 = { + trigger = { + any_close_family_member = { hold_court_8090_can_move_trigger = yes } + } + save_scope_as = vassal_advocate + court_event_character_flag_effect = yes + ordered_close_family_member = { + limit = { hold_court_8090_can_move_trigger = yes } + save_scope_as = vassal + court_event_character_flag_effect = yes + } + } + } + } + } + scope:vassal = { + court_position_generator_effect = { VAR = target EMPLOYER = root } + court_position_generator_effect = { VAR = backup EMPLOYER = root } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Grant desired position + name = { + trigger = { exists = scope:old_holder } # Replace + text = hold_court.8090.b + } + name = { # Lady-in-Waiting Soulmate + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_soulmate = scope:vassal + } + text = hold_court.8090.a.lady_in_waiting_soulmate + } + name = { # Lady-in-Waiting Lover + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_lover = scope:vassal + } + text = hold_court.8090.a.lady_in_waiting_lover + } + name = { # Bodyguard Soulmate + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_soulmate = scope:vassal + } + text = hold_court.8090.a.bodyguard_soulmate + } + name = { # Bodyguard Lover + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_lover = scope:vassal + } + text = hold_court.8090.a.bodyguard_lover + } + name = { # Default + trigger = { always = yes } + text = hold_court.8090.a + } + trigger = { exists = scope:vassal.var:target_court_position } + court_position_generator_assignment_effect = { VAR = target CANDIDATE = scope:vassal EMPLOYER = root } + if = { + limit = { + NOT = { exists = scope:vassal_advocate } + } + if = { + limit = { exists = scope:vassal_advocate } + hold_court_8090_hook_effect = { CHAR = scope:vassal_advocate } + scope:vassal_advocate = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + } + } + else = { + hold_court_8090_hook_effect = { CHAR = scope:vassal } + } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + if = { + limit = { + OR = { + has_relation_lover = scope:vassal + has_relation_soulmate = scope:vassal + } + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + scope:vassal.var:target_court_position = flag:lady_in_waiting + } + } + had_sex_with_effect = { + CHARACTER = scope:vassal + PREGNANCY_CHANCE = pregnancy_chance + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { #Weight up. + add = 15 + has_relation_friend = scope:vassal + } + modifier = { #Weight up. + add = 30 + has_relation_best_friend = scope:vassal + } + modifier = { #Weight up. + add = 45 + has_relation_lover = scope:vassal + } + modifier = { #Weight up. + add = 60 + has_relation_soulmate = scope:vassal + } + } + } + + option = { # Grant some other unclaimed position + name = hold_court.8090.c + trigger = { exists = scope:vassal.var:backup_court_position } + show_unlock_reason = no + court_position_generator_assignment_effect = { VAR = backup CANDIDATE = scope:vassal EMPLOYER = root } + if = { + limit = { exists = scope:vassal_advocate } + scope:vassal_advocate = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 5 + } + } + } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + stress_impact = { + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 2 + ai_energy = 1 + ai_compassion = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Offer bad role + name = { + text = hold_court.8090.d.advocate + trigger = { exists = scope:vassal_advocate } + } + name = { + text = hold_court.8090.d + trigger = { + NOT = { exists = scope:vassal_advocate } + } + } + trigger = { + OR = { + AND = { + has_imprisonment_reason = scope:vassal + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = executioner_court_position + } + NOR = { + scope:vassal.var:target_court_position ?= flag:executioner + scope:vassal.var:backup_court_position ?= flag:executioner + } + } + AND = { + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = court_jester_court_position + } + NOR = { + scope:vassal.var:target_court_position ?= flag:court_jester + scope:vassal.var:backup_court_position ?= flag:court_jester + } + } + AND = { + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = food_taster_court_position + } + NOR = { + scope:vassal.var:target_court_position ?= flag:food_taster + scope:vassal.var:backup_court_position ?= flag:food_taster + } + } + } + } + scope:vassal = { + if = { + limit = { + NOR = { + is_vassal_of = root + is_courtier_of = root + employer = root + } + } + hidden_effect = { set_employer = root } + } + } + if = { + limit = { # Executioner + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = executioner_court_position + } + NOR = { + scope:vassal.var:target_court_position = flag:executioner + scope:vassal.var:backup_court_position = flag:executioner + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = executioner + CANDIDATE = scope:vassal + } + if = { + limit = { + NOT = { has_imprisonment_reason = scope:vassal } + } + stress_impact = { + just = medium_stress_impact_gain + } + } + } + else_if = { # Jester + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = court_jester_court_position + } + NOR = { + scope:vassal.var:target_court_position = flag:court_jester + scope:vassal.var:backup_court_position = flag:court_jester + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:vassal + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + } + else_if = { # Taster + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = food_taster_court_position + } + NOR = { + scope:vassal.var:target_court_position = flag:food_taster + scope:vassal.var:backup_court_position = flag:food_taster + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = food_taster + CANDIDATE = scope:vassal + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + } + if = { + limit = { exists = scope:vassal_advocate } + scope:vassal_advocate = { + add_opinion = { + modifier = insulted_opinion + target = root + opinion = -10 + } + } + } + scope:vassal = { + if = { + limit = { has_court_position = executioner_court_position } + root = { consume_imprisonment_reasons = scope:vassal } + } + if = { + limit = { has_relation_friend = root } + remove_relation_friend = root + } + add_opinion = { + modifier = insulted_opinion + target = root + opinion = -15 + } + } + ai_chance = { + base = 100 + modifier = { #Weight up. + add = 15 + has_imprisonment_reason = scope:vassal + has_trait = just + } + modifier = { #Weight up. + add = 15 + NOT = { has_imprisonment_reason = scope:vassal } + has_trait = arbitrary + } + } + } + + option = { # Refuse + name = { + text = hold_court.8090.e.advocate + trigger = { exists = scope:vassal_advocate } + } + name = { + text = hold_court.8090.e + trigger = { + NOT = { exists = scope:vassal_advocate } + } + } + if = { + limit = { exists = scope:vassal_advocate } + scope:vassal_advocate = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + scope:vassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + + after = { + scope:vassal = { + clear_court_event_participation = yes + remove_variable = target_court_position + remove_variable = backup_court_position + } + if = { + limit = { exists = scope:vassal_advocate } + scope:vassal_advocate = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Child of the Court +# by Joe Parkin +# 8100 +################################################## + +scripted_trigger hold_court_8100_child_trigger = { + has_court_event_flag = no + is_available_ai_child = yes # Children only + age < 14 # Not already almost done with education, sets time which must be invested to get rewards + NOT = { is_child_of = root } # Is not your child + NOT = { has_relation_ward = root } # Is not already a ward of the player + NOT = { + root = { has_strong_hook = prev } # prev = scope:ward + } + trigger_if = { + limit = { is_close_or_extended_family_of = root } # If related to the player, must be a nibling or great nibling + OR = { + AND = { + exists = root.father + OR = { + is_grandchild_of = root.father + is_great_grandchild_of = root.father + } + } + AND = { + exists = root.mother + OR = { + is_grandchild_of = root.mother + is_great_grandchild_of = root.mother + } + } + } + } + faith = root.faith # Has the same faith as the player + trigger_if = { + limit = { + faith = { has_doctrine = doctrine_gender_male_dominated } # If male dominated, must be no father + } + OR = { + NOT = { exists = father } + father = { + OR = { + is_alive = no + is_imprisoned = yes + } + } + } + NOR = { + AND = { + is_courtier_of = root + mother ?= { is_courtier_of = root } + } + AND = { + is_courtier_of = root + father ?= { is_courtier_of = root } + } + } + } + trigger_if = { + limit = { + faith = { has_doctrine = doctrine_gender_female_dominated } # If female dominated, must be no mother + } + OR = { + NOT = { exists = mother } + mother = { + OR = { + is_alive = no + is_imprisoned = yes + } + } + } + } +} + +scripted_trigger hold_court_8100_parent_trigger = { # is a parent eligible to advocate? + this != root + OR = { + is_alive = yes + is_imprisoned = no + } + has_court_event_flag = no + is_available_ai_adult = yes + OR = { + employer = root + AND = { + exists = scope:ward_employer + employer = scope:ward_employer + } + } +} + +scripted_trigger hold_court_8100_adopt_trigger = { # is someone disadvantaged by adoption? + OR = { + is_child_of = root + AND = { + is_spouse_of = root + root = { + any_child = { + any_parent = { this = scope:advocate } + } + } + } + } +} + +scripted_effect hold_court_8100_root_effect = { # make root the guardian + hidden_effect = { + if = { + limit = { + employer != root + } + set_employer = root + } + } + set_relation_guardian = root + set_variable = { + name = hold_court_8100_fosterer + value = root + years = 17 + } + root = { + if = { + limit = { + NOT = { + scope:ward = { is_close_family_of = root } + } + } + change_current_court_grandeur = medium_court_grandeur_gain + } + } +} + +scripted_effect hold_court_8100_guardian_effect = { # make scope:guardian the guardian + hidden_effect = { + if = { + limit = { + employer != scope:guardian.employer + } + set_employer = scope:guardian.employer + } + } + set_relation_guardian = scope:guardian + root = { + if = { + limit = { + NOT = { + scope:ward = { is_close_family_of = root } + } + } + change_current_court_grandeur = minor_court_grandeur_gain + } + } +} + +scripted_effect hold_court_8100_root_or_guardian_effect = { # make root guardian, or scope:guardian if not + if = { + limit = { + root = { num_of_relation_ward < 2 } + } + hold_court_8100_root_effect = yes + } + else = { hold_court_8100_guardian_effect = yes } +} + +# A parent wants you to be their child's ward +hold_court.8100 = { + type = court_event + title = hold_court.8100.t + desc = { + desc = hold_court.8100.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:ward_employer + scope:ward_employer != root + } + desc = hold_court.8100.desc.vassal + } + desc = hold_court.8100.desc.court + } + desc = hold_court.8100.desc.body + first_valid = { + triggered_desc = { + trigger = { + scope:ward = { is_close_or_extended_family_of = root } + } + desc = hold_court.8100.desc.interest_family + } + triggered_desc = { + trigger = { + scope:ward = { + is_landed_or_landless_administrative = yes + OR = { + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = no + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + } + } + desc = hold_court.8100.desc.interest_marriage + } + triggered_desc = { + trigger = { + scope:ward = { is_landed_or_landless_administrative = yes } + } + desc = hold_court.8100.desc.interest_alliance + } + desc = hold_court.8100.desc.interest_fallback + } + } + theme = realm + override_background = { reference = throne_room } + lower_left_portrait = scope:ward_employer + lower_right_portrait = scope:guardian + court_scene = { + button_position_character = scope:advocate + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:advocate = { + group = petitioners_group + animation = beg + } + scope:ward = { + group = petitioners_group + animation = sadness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + NOT = { + any_courtier = { + has_variable = hold_court_8100_fosterer + var:hold_court_8100_fosterer = root + } + } + trigger_if = { # There is a parentless child at court + limit = { + any_courtier = { hold_court_8100_child_trigger = yes } + } + any_courtier = { + hold_court_8100_child_trigger = yes + save_temporary_scope_as = ward_temp + } + } + trigger_else = { + any_vassal = { + any_courtier = { + hold_court_8100_child_trigger = yes + save_temporary_scope_as = ward_temp + } + } + } + OR = { + num_of_relation_ward < 2 + any_courtier = { # Guardian + has_court_event_flag = no + is_available_ai_adult = yes + num_of_relation_ward < 2 + NOT = { is_parent_of = scope:ward_temp } + save_temporary_scope_as = compare_character + scope:ward_temp = { has_ward_guardian_education_match_compare_character_trigger = yes } # same education + } + } + any_courtier = { # Advocate backup + has_court_event_flag = no + is_available_ai_adult = yes + NOT = { is_parent_of = scope:ward_temp } + trigger_if = { + limit = { exists = scope:compare_character } + this != scope:compare_character + } + } + } + + weight_multiplier = { + base = 1 + # Shares education focus of player + modifier = { + add = 1 + any_courtier = { + hold_court_8100_child_trigger = yes + root = { save_temporary_scope_as = compare_character } + has_ward_guardian_education_match_compare_character_trigger = yes # same education interest + } + } + modifier = { + add = 1 + any_vassal = { + any_courtier = { + hold_court_8100_child_trigger = yes + root = { save_temporary_scope_as = compare_character } + has_ward_guardian_education_match_compare_character_trigger = yes # same education interest + } + } + } + # Has no guardian + modifier = { + add = 2 + any_courtier = { + hold_court_8100_child_trigger = yes + num_of_relation_guardian = 0 + } + } + modifier = { + add = 2 + any_vassal = { + any_courtier = { + hold_court_8100_child_trigger = yes + num_of_relation_guardian = 0 + } + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + every_courtier = { + limit = { hold_court_8100_child_trigger = yes } + add_to_list = hold_court_8100_list + } + every_vassal = { + every_courtier = { + limit = { hold_court_8100_child_trigger = yes } + add_to_list = hold_court_8100_list + } + } + random_in_list = { + list = hold_court_8100_list + weight = { + base = 1 + # Shares education focus of root + modifier = { + add = 10 + root = { save_temporary_scope_as = compare_character } + has_ward_guardian_education_match_compare_character_trigger = yes # same education interest + } + # Has no guardian + modifier = { + add = 2 + num_of_relation_guardian = 0 + } + # Not a more suitable ward + modifier = { + add = 20 + any_sibling = { + count = all + hold_court_8100_child_trigger = yes + OR = { + AND = { + root = { save_temporary_scope_as = compare_character } + has_ward_guardian_education_match_compare_character_trigger = yes # same education interest + } + age < prev.age # prev = scope:ward + } + } + } + # Related to root + modifier = { + add = 100 + is_close_or_extended_family_of = root + } + # In root court + modifier = { + add = 25 + employer = root + } + } + save_scope_as = ward + court_event_character_flag_effect = yes + if = { + limit = { + employer ?= { + this != root + } + } + employer = { save_scope_as = ward_employer } + } + } + random_courtier = { # Guardian + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + num_of_relation_ward < 2 + NOT = { is_parent_of = scope:ward } + save_temporary_scope_as = compare_character + scope:ward = { has_ward_guardian_education_match_compare_character_trigger = yes } # same education + } + alternative_limit = { + has_court_event_flag = no + is_available_ai_adult = yes + num_of_relation_ward < 2 + NOT = { is_parent_of = scope:ward } + } + save_scope_as = guardian + court_event_character_flag_effect = yes + } + scope:ward = { + if = { + limit = { + mother ?= { hold_court_8100_parent_trigger = yes } + } + mother = { save_scope_as = advocate } + } + else_if = { + limit = { + father ?= { hold_court_8100_parent_trigger = yes } + } + father = { save_scope_as = advocate } + } + else = { + root = { + random_courtier = { # Advocate backup + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { is_parent_of = scope:ward } + trigger_if = { + limit = { exists = scope:guardian } + this != scope:guardian + } + } + weight = { + base = 1 + modifier = { + factor = 10 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = just + has_trait = paranoid + has_trait = family_first + has_trait = gallant + has_trait = diligent + has_trait = lazy + } + } + modifier = { + factor = 50 + is_close_family_of = scope:ward + } + } + save_scope_as = advocate + court_event_character_flag_effect = yes + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Become the child's guardian + name = hold_court.8100.a + trigger = { num_of_relation_ward < 2 } + highlight_portrait = root + scope:ward = { + hold_court_8100_root_effect = yes + custom_tooltip = hold_court.8100.hook.tt + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + scope:advocate = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + if = { + limit = { exists = scope:ward_employer } + scope:ward_employer = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 5 + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.25 + ai_greed = -0.25 + } + modifier = { #Weight up. + add = 30 + scope:ward = { + root = { save_temporary_scope_as = compare_character } + has_ward_guardian_education_match_compare_character_trigger = yes # same education interest + } + } + modifier = { #Weight up. + add = 30 + scope:ward = { is_close_or_extended_family_of = root } + } + modifier = { #Weight down for stress. + add = -45 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Find another guardian + name = hold_court.8100.b + trigger = { exists = scope:guardian } + highlight_portrait = scope:guardian + scope:ward = { + hold_court_8100_guardian_effect = yes + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + scope:advocate = { + if = { + limit = { is_close_family_of = root } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + else = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + if = { + limit = { exists = scope:ward_employer } + scope:ward_employer = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 5 + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_greed = -0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Adopt them + name = hold_court.8100.c + trigger = { + scope:ward = { is_lowborn = yes } + } + scope:ward = { + if = { + limit = { + can_add_hook = { + target = scope:ward + type = loyalty_hook + } + } + add_hook = { + target = scope:ward + type = loyalty_hook + } + } + hidden_effect = { + if = { + limit = { + employer != root + } + set_employer = root + } + } + set_relation_guardian = root + if = { + limit = { + root = { is_male = yes } + } + set_father = root + } + else = { set_mother = root } + set_house = root.house + add_opinion = { + modifier = grateful_child + target = root + opinion = 40 + } + add_character_modifier = { modifier = hold_court_8100_adopted_modifier } + } + scope:advocate = { + if = { + limit = { hold_court_8100_adopt_trigger = yes } + add_opinion = { + target = root + modifier = envy_opinion + opinion = -20 + } + } + else = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 20 + } + } + } + if = { + limit = { + exists = scope:ward_employer + scope:ward_employer = { + NOT = { hold_court_8100_adopt_trigger = yes } + } + } + scope:ward_employer = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + } + every_child = { + custom = hold_court.8100.c.tt_child + limit = { + this != scope:ward + } + add_opinion = { + target = root + modifier = envy_opinion + opinion = -20 + } + add_opinion = { + target = scope:ward + modifier = envy_opinion + opinion = -40 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + modifier = { #Weight up. + add = 50 + AND = { + any_child = { count = 0 } + OR = { + can_have_children = no + AND = { + is_married = yes + primary_spouse = { can_have_children = no } + allowed_more_spouses = no + max_number_of_concubines = 0 + } + } + } + } + modifier = { #Weight down. + add = -50 + any_child = { + count > 0 + this = root.primary_heir + } + } + modifier = { #Weight down. + add = -50 + any_child = { + count > 2 + } + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { + factor = 0 + is_adult = no + } + } + } + + option = { # Pay their way + name = hold_court.8100.d + trigger = { + OR = { + scope:advocate.gold >= root.minor_gold_value + scope:ward.gold >= root.minor_gold_value + } + } + if = { + limit = { scope:ward.gold >= root.minor_gold_value } + scope:ward = { + pay_short_term_gold = { + target = root + gold = root.minor_gold_value + } + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -15 + } + } + scope:advocate = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -10 + } + } + } + else = { + scope:advocate = { + pay_short_term_gold = { + target = root + gold = root.minor_gold_value + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -15 + } + } + scope:ward = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -10 + } + } + } + if = { + limit = { exists = scope:ward_employer } + scope:ward_employer = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 5 + } + } + } + if = { + limit = { num_of_relation_ward < 2 } + scope:ward = { + hidden_effect = { + if = { + limit = { + employer != root + } + set_employer = root + } + } + set_relation_guardian = root + set_variable = { + name = hold_court_8100_fosterer + value = root + years = 17 + } + custom_tooltip = hold_court.8100.hook.tt + } + } + else = { + scope:ward = { + hidden_effect = { + if = { + limit = { + employer != scope:guardian.employer + } + set_employer = scope:guardian.employer + } + } + set_relation_guardian = scope:guardian + } + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + } + } + + option = { # Refuse + name = hold_court.8100.e + if = { + limit = { + NOT = { + scope:ward = { is_close_family_of = root } + } + } + change_current_court_grandeur = medium_court_grandeur_loss + } + scope:ward = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + scope:advocate = { + if = { + limit = { is_close_family_of = root } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + else = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + if = { + limit = { exists = scope:ward_employer } + scope:ward_employer = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + after = { + scope:ward = { + clear_court_event_participation = yes + } + scope:guardian = { + clear_court_event_participation = yes + } + scope:advocate = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Serious Business +# by Joe Parkin +# 8110 +################################################## + +# A peasant comes to you with a very provincial problem +hold_court.8110 = { + type = court_event + title = hold_court.8110.t + desc = { + desc = hold_court.8110.desc + random_valid = { + desc = hold_court.8110.desc.affair + desc = hold_court.8110.desc.fence + desc = hold_court.8110.desc.goat + desc = hold_court.8110.desc.veg + desc = hold_court.8110.desc.drink + } + } + theme = realm + lower_center_portrait = cp:councillor_steward + lower_right_portrait = scope:executioner + court_scene = { + button_position_character = scope:peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:peasant = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_held_title = { + title_tier = county + county = { + county_control > 80 + any_county_province = { has_holding = yes } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ## Since you take peasant administrative concerns seriously... + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_held_title = { # Find a place for loc + title_tier = county + limit = { + county = { + county_control > 80 + any_county_province = { has_holding = yes } + } + } + random_county_province = { + limit = { has_holding = yes } + save_scope_as = peasant_holding + } + } + hidden_effect = { # Create peasants + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + gender_female_chance = root_soldier_female_chance + trait = beauty_bad_2 + save_scope_as = peasant + } + dummy_female = { save_scope_as = dummy_female } + dummy_male = { save_scope_as = dummy_male } + } + scope:peasant = { + court_event_character_flag_effect = yes + } + if = { # Save Steward if relevant + limit = { + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + } + if = { # Save Executioner if relevant + limit = { + employs_court_position = executioner_court_position + any_court_position_holder = { + type = executioner_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = executioner_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = executioner + court_event_character_flag_effect = yes + } + } + court_position_old_holder_effect = { POS = court_jester EMPLOYER = root } # Save Jester if relevant + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Hear them out + name = hold_court.8110.a + add_character_modifier = { + modifier = hold_court_8110_common_modifier + years = 10 + } + stress_impact = { + base = medium_stress_impact_gain + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_energy = 0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -30 + has_trait = impatient + } + } + } + + option = { # Steward handle it + name = hold_court.8110.b + trigger = { exists = scope:steward } + highlight_portrait = scope:steward + scope:steward = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + scope:peasant_holding.county = { + add_county_modifier = { + modifier = hold_court_8110_steward_modifier + years = 10 + } + } + stress_impact = { + patient = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = patient + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + } + } + + option = { # Execute them + name = hold_court.8110.c + trigger = { exists = scope:executioner } + highlight_portrait = scope:executioner + add_tyranny = minor_tyranny_gain + add_dread = miniscule_dread_gain + scope:peasant = { + death = { + killer = scope:executioner + death_reason = death_execution + } + } + scope:peasant_holding.county = { + add_county_modifier = { + modifier = hold_court_8110_execute_modifier + years = 10 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_compassion = -0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + } + } + + option = { # Make them a jester + name = hold_court.8110.d + scope:peasant = { + hidden_effect = { set_employer = root } + add_opinion = { + modifier = insult_opinion + target = root + opinion = -10 + } + } + if = { + limit = { exists = scope:old_holder } + show_as_tooltip = { + appoint_court_position = { + recipient = scope:peasant + court_position = court_jester_court_position + } + } + hidden_effect = { + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:peasant + holder = scope:old_holder + court_position = court_jester_court_position + } + remove_character_flag = temporary_court_position_cost_removal + } + } + else = { + if = { + limit = { + can_employ_court_position_type = court_jester_court_position + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:peasant + } + } + } + scope:peasant_holding.county = { + add_county_modifier = { + modifier = hold_court_8110_jester_modifier + years = 10 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = 0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + } + } + + option = { # Be done with it + name = hold_court.8110.e + add_character_modifier = { + modifier = hold_court_8110_haughty_modifier + years = 10 + } + stress_impact = { + just = medium_stress_impact_gain + patient = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = -0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = patient + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + } + } + + after = { + scope:peasant = { + clear_court_event_participation = yes + if = { + limit = { + is_alive = yes + NOT = { has_court_position = court_jester_court_position } + } + silent_disappearance_effect = yes + } + } + scope:steward ?= { + clear_court_event_participation = yes + } + scope:executioner ?= { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Evangelical Backlash +# by Joe Parkin +# 8120 +################################################## + +scripted_trigger hold_court_8120_syncretic_faith_trigger = { + scope:peasant.religion != root.religion + OR = { + AND = { # Eastern + scope:peasant.faith.religion = { is_in_family = rf_eastern } + faith = { has_doctrine = tenet_eastern_syncretism } + } + AND = { # Pagan + scope:peasant.faith = { has_doctrine_parameter = unreformed } + faith = { has_doctrine = tenet_unreformed_syncretism } + } + AND = { # Christian + OR = { + scope:peasant.religion = religion:eastern_orthodox_religion + scope:peasant.religion = religion:catholic_religion + scope:peasant.religion = religion:protestant_religion + } + faith = { has_doctrine = tenet_christian_syncretism } + } + AND = { # Islam + scope:peasant.religion = religion:islam_religion + faith = { has_doctrine = tenet_islamic_syncretism } + } + AND = { # Judaism + scope:peasant.religion = religion:judaism_religion + faith = { has_doctrine = tenet_jewish_syncretism } + } + } +} + +scripted_effect hold_court_8120_stop_effect = { + set_variable = { + name = hold_court_8120_religion_block + value = scope:conversion_target.faith + years = 15 + } + add_character_modifier = { + modifier = hold_court_8120_tolerance_modifier + years = 10 + } + scope:bishop = { + add_opinion = { + modifier = impious_opinion + target = root + opinion = -15 + } + set_council_task = { task_type = task_religious_relations } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8120_stopped_modifier + years = 15 + } + } + custom_tooltip = hold_court.8120.a.tt_conversion + stress_impact = { + zealous = medium_stress_impact_gain + callous = medium_stress_impact_gain + } +} + +# Locals ask you to stop trying to convert them +hold_court.8120 = { + type = court_event + title = hold_court.8120.t + desc = { + desc = hold_court.8120.desc + first_valid = { + triggered_desc = { + trigger = { scope:peasant.religion = root.religion } + desc = hold_court.8120.desc.same_religion + } + triggered_desc = { + trigger = { scope:peasant.culture = root.culture } + desc = hold_court.8120.desc.same_culture + } + desc = hold_court.8120.desc.other + } + } + theme = realm + lower_right_portrait = scope:bishop + court_scene = { + button_position_character = scope:peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:peasant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + NOT = { has_character_flag = has_had_conversion_event } + top_liege = this + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_available_ai_adult = yes + } + any_held_county = { is_target_of_council_task = task_conversion } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_conversion_event + years = 15 + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + court_event_character_flag_effect = yes + } + random_held_county = { + limit = { is_target_of_council_task = task_conversion } + save_scope_as = conversion_target + } + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + gender_female_chance = root_soldier_female_chance + culture = scope:conversion_target.culture + faith = scope:conversion_target.faith + save_scope_as = peasant + } + scope:peasant = { + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Stop the priests - unsyncretic + name = hold_court.8120.a + trigger = { hold_court_8120_syncretic_faith_trigger = no } + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_evil_level + } + } + } + add_piety = medium_piety_loss + } + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_hostile_level + } + } + } + add_piety = minor_piety_loss + } + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_astray_level + } + } + } + add_piety = miniscule_piety_loss + } + hold_court_8120_stop_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Stop the priests - syncretic + name = hold_court.8120.b + trigger = { hold_court_8120_syncretic_faith_trigger = yes } + if = { + limit = { + AND = { + scope:peasant.faith.religion = { is_in_family = rf_eastern } + faith = { has_doctrine = tenet_eastern_syncretism } + } + } + custom_tooltip = hold_court.8120.b.tt_eastern # Eastern + } + else_if = { + limit = { + AND = { + scope:peasant.faith = { has_doctrine_parameter = unreformed } + faith = { has_doctrine = tenet_unreformed_syncretism } + } + } + custom_tooltip = hold_court.8120.b.tt_pagan # Pagan + } + else_if = { + limit = { + AND = { + OR = { + scope:peasant.religion = religion:eastern_orthodox_religion + scope:peasant.religion = religion:catholic_religion + scope:peasant.religion = religion:protestant_religion + } + faith = { has_doctrine = tenet_christian_syncretism } + } + } + custom_tooltip = hold_court.8120.b.tt_christianity # Christian + } + else_if = { + limit = { + AND = { + scope:peasant.religion = religion:islam_religion + faith = { has_doctrine = tenet_islamic_syncretism } + } + } + custom_tooltip = hold_court.8120.b.tt_islam # Islam + } + else = { custom_tooltip = hold_court.8120.b.tt_judaism } # Judaism + add_piety = medium_piety_gain + hold_court_8120_stop_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Demand religious taxes + name = hold_court.8120.c + add_treasury_or_gold = minor_treasury_or_gold_value + if = { + limit = { + NOT = { + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + } + } + } + custom_tooltip = hold_court.8120.c.tt_tenet + stress_impact = { + honest = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + } + else = { + add_piety = minor_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + } + } + stress_impact = { + generous = medium_stress_impact_gain + } + set_variable = { + name = hold_court_8120_religion_block + value = scope:conversion_target.faith + years = 15 + } + scope:bishop = { + if = { + limit = { + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + } + } + add_opinion = { + modifier = pious_opinion + target = root + opinion = 5 + } + } + else = { + add_opinion = { + modifier = impious_opinion + target = root + opinion = -10 + } + } + set_council_task = { task_type = task_religious_relations } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8120_tax_modifier + years = 15 + } + custom_tooltip = hold_court.8120.a.tt_conversion + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 2 + ai_zeal = 1 + } + modifier = { #Weight up for stress. + add = 30 + NOT = { + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + } + } + OR = { + has_trait = cynical + has_trait = deceitful + } + } + modifier = { #Weight down for stress. + add = -30 + NOT = { + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + } + } + OR = { + has_trait = honest + has_trait = zealous + } + } + modifier = { #Weight down for stress. + add = -15 + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + } + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + } + } + + option = { # Execute + name = hold_court.8120.d + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_evil_level + } + } + } + add_piety = major_piety_gain + } + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_hostile_level + } + } + } + add_piety = medium_piety_gain + } + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_astray_level + } + } + } + add_piety = minor_piety_gain + } + add_dread = minor_dread_gain + add_character_modifier = { + modifier = hold_court_8120_terror_modifier + years = 10 + } + scope:peasant = { + death = { + killer = root + death_reason = death_execution + } + } + scope:bishop = { + add_opinion = { + modifier = pious_opinion + target = root + opinion = 20 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + compassionate = massive_stress_impact_gain + torturer = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + ai_compassion = -1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { #Weight up for stress. + add = 15 + has_trait = torturer + } + } + } + + option = { # Refuse + name = hold_court.8120.e + scope:bishop = { + add_opinion = { + modifier = pious_opinion + target = root + opinion = 10 + } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8120_refused_modifier + years = 20 + } + } + stress_impact = { + callous = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = cynical + } + } + } + + after = { + scope:bishop = { + clear_court_event_participation = yes + } + scope:peasant = { + clear_court_event_participation = yes + if = { + limit = { is_alive = yes } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Cultural Pride +# by Joe Parkin +# 8130 +################################################## + +scripted_trigger hold_court_8130_county_trigger = { + NOR = { + has_county_modifier = hold_court_8120_tax_modifier + has_county_modifier = hold_court_8120_stopped_modifier + has_county_modifier = hold_court_8120_refused_modifier + has_county_modifier = hold_court_8130_service_modifier + } +} + +scripted_effect hold_court_8130_stop_effect = { + set_variable = { + name = hold_court_8130_culture_block + value = scope:conversion_target.culture + years = 15 + } + add_character_modifier = { + modifier = hold_court_8130_tolerance_modifier + years = 10 + } + scope:steward = { + if = { + limit = { + culture != scope:conversion_target.culture + } + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + else = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + set_council_task = { task_type = task_collect_taxes } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8120_stopped_modifier + years = 15 + } + custom_tooltip = hold_court.8120.a.tt_conversion + } + stress_impact = { + arrogant = medium_stress_impact_gain + } +} + +# Locals ask you to stop trying to integrate them +hold_court.8130 = { + type = court_event + title = hold_court.8130.t + desc = { + desc = hold_court.8130.desc + first_valid = { + triggered_desc = { + trigger = { + scope:peasant.culture = { has_same_culture_language = root.culture } + } + desc = hold_court.8130.desc.same_language + } + triggered_desc = { + trigger = { + scope:peasant.culture = { has_same_culture_heritage = root.culture } + } + desc = hold_court.8130.desc.same_heritage + } + triggered_desc = { + trigger = { + scope:peasant.culture = { has_same_culture_ethos = root.culture } + } + desc = hold_court.8130.desc.same_ethos + } + desc = hold_court.8130.desc.other + } + } + theme = realm + lower_right_portrait = scope:steward + court_scene = { + button_position_character = scope:peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:peasant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + NOT = { has_character_flag = has_had_conversion_event } + top_liege = this + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + any_held_county = { + is_target_of_council_task = task_promote_culture + hold_court_8130_county_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_conversion_event + years = 5 + } + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + random_held_county = { + limit = { + is_target_of_council_task = task_promote_culture + hold_court_8130_county_trigger = yes + } + save_scope_as = conversion_target + } + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + gender_female_chance = root_soldier_female_chance + culture = scope:conversion_target.culture + faith = scope:conversion_target.faith + save_scope_as = peasant + } + scope:peasant = { + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Stop + name = hold_court.8130.a + trigger = { + NOT = { + root.culture = { has_cultural_pillar = ethos_egalitarian } + } + } + add_prestige = minor_prestige_loss + hold_court_8130_stop_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + modifier = { #Weight down for stress. + add = -60 + has_trait = arrogant + } + } + } + + option = { # Stop - but egalitarian! + name = hold_court.8130.b + trigger = { + root.culture = { has_cultural_pillar = ethos_egalitarian } + } + hold_court_8130_stop_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = -2 + } + modifier = { #Weight down for stress. + add = -60 + has_trait = arrogant + } + } + } + + option = { # Demand + name = hold_court.8130.c + custom_tooltip = hold_court.8130.c.tt_service + hidden_effect = { + create_character = { + gender_female_chance = root_soldier_female_chance + location = root.capital_province + template = new_warrior_character + faith = scope:conversion_target.faith + culture = scope:conversion_target.culture + save_scope_as = soldier + } + send_interface_message = { + type = event_guest_neutral + title = hold_court.8130.c.tt_service_title + right_icon = scope:soldier + hidden_effect = { + scope:soldier = { set_employer = root } + } + scope:soldier = { + add_opinion = { + modifier = kindness_opinion + target = root + opinion = 15 + } + } + } + } + set_variable = { + name = hold_court_8130_culture_block + value = scope:conversion_target.culture + years = 15 + } + scope:steward = { + if = { + limit = { + culture != scope:conversion_target.culture + } + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + else = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + set_council_task = { task_type = task_collect_taxes } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8130_service_modifier + years = 15 + } + custom_tooltip = hold_court.8120.a.tt_conversion + } + stress_impact = { + generous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arrogant + } + } + } + + option = { # Execute + name = hold_court.8130.d + trigger = { + OR = { + has_trait = arrogant + has_trait = torturer + has_trait = sadistic + has_trait = callous + } + } + trait = arrogant + trait = torturer + trait = sadistic + trait = callous + add_dread = minor_dread_gain + add_character_modifier = { + modifier = hold_court_8130_terror_modifier + years = 10 + } + scope:peasant = { + death = { + killer = root + death_reason = death_execution + } + } + scope:steward = { + if = { + limit = { + culture != scope:conversion_target.culture + } + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + else = { + add_opinion = { + modifier = cruelty_opinion + target = root + opinion = -10 + } + } + } + stress_impact = { + torturer = medium_stress_impact_loss + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_compassion = -1 + } + modifier = { #Weight up for stress. + add = 15 + has_trait = torturer + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + } + } + + option = { # Refuse + name = hold_court.8130.e + scope:steward = { + if = { + limit = { + culture != scope:conversion_target.culture + } + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + else = { + add_opinion = { + modifier = hurt_opinion + target = root + opinion = -5 + } + } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8120_refused_modifier + years = 20 + } + } + stress_impact = { + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + after = { + scope:steward = { + clear_court_event_participation = yes + } + scope:peasant = { + clear_court_event_participation = yes + if = { + limit = { is_alive = yes } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Puppy Patronage +# by Joe Parkin +# 8140 - 142 +################################################## + +# Master of the hunt brings a pup +hold_court.8140 = { + type = court_event + title = hold_court.8140.t + desc = hold_court.8140.desc + theme = realm + court_scene = { + button_position_character = scope:huntmaster + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:huntmaster = { + group = petitioners_group + animation = admiration + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_court_position_holder = { + type = master_of_hunt_court_position + has_court_event_flag = no + is_available_ai_adult = yes + NOR = { + has_any_bad_relationship_with_root_trigger = yes + any_owned_story = { type = story_cycle_pet_cat } + has_character_modifier = cat_story_modifier + } + } + NOR = { + house = { has_house_modifier = hold_court_8140_house_modifier } + any_owned_story = { type = story_cycle_pet_dog } + any_owned_story = { type = story_cycle_pet_cat } + has_character_modifier = dog_story_modifier + has_character_modifier = cat_story_modifier + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_court_position_holder = { + type = master_of_hunt_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + NOR = { + has_any_bad_relationship_with_root_trigger = yes + any_owned_story = { type = story_cycle_pet_cat } + has_character_modifier = cat_story_modifier + } + } + save_scope_as = huntmaster + court_event_character_flag_effect = yes + } + save_scope_as = pup_house_ruler + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Invest in the kennel + name = hold_court.8140.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= massive_treasury_or_gold_value + } + } + remove_treasury_or_gold = major_treasury_or_gold_value + house = { + add_house_modifier = { + modifier = hold_court_8140_house_modifier + years = 30 + } + custom_tooltip = hold_court.8140.a.tt + every_house_member = { + limit = { + is_ai = no + is_landed_or_landless_administrative = yes + this != root + } + trigger_event = hold_court.8141 + } + set_variable = { + name = hold_court_8140_pup_founder + value = root + } + } + scope:huntmaster = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 15 + } + progress_towards_friend_effect = { + REASON = friend_invested_in_kennel + CHARACTER = root + OPINION = 0 + } + } + start_dog_story_cycle_effect = yes + change_current_court_grandeur = medium_court_grandeur_gain + stress_impact = { + lifestyle_hunter = minor_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_greed = -0.5 + ai_boldness = 1 + ai_energy = 2 + } + modifier = { #Weight up. + add = 30 + has_trait = lifestyle_hunter + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Just take the pup + name = hold_court.8140.b + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= medium_gold_value + } + } + remove_short_term_gold = minor_gold_value + start_dog_story_cycle_effect = yes + scope:huntmaster = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + stress_impact = { + callous = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = -0.25 + ai_energy = 1 + } + modifier = { #Weight up. + add = 15 + has_trait = lifestyle_hunter + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Cat's are better tho + name = hold_court.8140.c + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= medium_gold_value + } + } + remove_short_term_gold = minor_gold_value + start_cat_story_cycle_effect = yes + scope:huntmaster = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -15 + } + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_dogs_suck + OPINION = 0 + } + } + if = { + limit = { + any_vassal_or_below = { + any_owned_story = { type = story_cycle_pet_cat } + } + } + every_vassal_or_below = { + limit = { + any_owned_story = { type = story_cycle_pet_cat } + } + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + } + stress_impact = { + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_greed = -0.25 + ai_energy = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + } + } + + option = { # Refuse + name = hold_court.8140.d + scope:huntmaster = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + change_current_court_grandeur = minor_court_grandeur_loss + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -2 + ai_energy = -2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + } + } + + after = { + scope:huntmaster = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.8141 = { # Ping for non-AI house members + type = character_event + title = hold_court.8140.t + desc = hold_court.8141.desc + theme = realm + override_background = { reference = throne_room } + left_portrait = { + character = scope:pup_house_ruler + } + right_portrait = { + character = scope:huntmaster + animation = admiration + } + + option = { # Yay puppos + name = hold_court.8141.a + show_as_tooltip = { + house = { + add_house_modifier = { + modifier = hold_court_8140_house_modifier + years = 30 + } + custom_tooltip = hold_court.8140.a.tt + } + } + } +} + +hold_court.8142 = { # Event on puppy adoption + type = character_event + title = hold_court.8142.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + house ?= { has_variable = hold_court_8140_pup_founder } + } + desc = hold_court.8142.desc + } + desc = hold_court.8142.desc_alternative + } + } + theme = realm + override_background = { reference = throne_room } + left_portrait = { + character = scope:pup_house_ruler + animation = happiness + } + + immediate = { + if = { + limit = { + house ?= { has_variable = hold_court_8140_pup_founder } + } + house.var:hold_court_8140_pup_founder = { save_scope_as = pup_house_ruler } + } + else = { + save_scope_as = pup_house_ruler + } + } + + option = { # Accept + name = hold_court.8142.a + start_dog_story_cycle_effect = yes + } + + option = { # Change mind + name = hold_court.8142.b + add_gold = minor_gold_value + } +} + +################################################## +# Contractual Compromise +# by Joe Parkin +# 8150 +################################################## + +scripted_trigger hold_court_8150_faction_trigger = { + exists = yes + NOT = { exists = faction_war } + faction_leader ?= { + has_court_event_flag = no + is_available_ai_adult = yes + is_vassal_of = root + government_has_flag = government_is_feudal + OR = { + vassal_contract_obligation_level_can_be_decreased = feudal_government_taxes + vassal_contract_obligation_level_can_be_decreased = feudal_government_levies + } + } + OR = { + faction_is_type = independence_faction + faction_is_type = liberty_faction + faction_is_type = claimant_faction + } +} + +scripted_effect hold_court_8150_obligation_effect = { + hidden_effect = { + random_list = { + 50 = { + trigger = { vassal_contract_obligation_level_can_be_decreased = feudal_government_taxes } + vassal_contract_decrease_obligation_level = feudal_government_taxes + } + 50 = { + trigger = { vassal_contract_obligation_level_can_be_decreased = feudal_government_levies } + vassal_contract_decrease_obligation_level = feudal_government_levies + } + } + } + add_character_flag = { + flag = joining_faction_block + years = 5 + } +} + +# Leader of a faction offers you an out +hold_court.8150 = { + type = court_event + title = hold_court.8150.t + desc = { + desc = hold_court.8150.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:target_faction = { + any_faction_member = { count = 1 } + } + } + desc = hold_court.8150.desc.alone + } + triggered_desc = { + trigger = { + scope:target_faction = { + any_faction_member = { count <= 3 } + } + } + desc = hold_court.8150.desc.few + } + desc = hold_court.8150.desc.group + } + desc = hold_court.8150.desc.body + first_valid = { + triggered_desc = { + trigger = { + scope:target_faction = { faction_is_type = independence_faction } + } + desc = hold_court.8150.desc.independence + } + triggered_desc = { + trigger = { + scope:target_faction = { faction_is_type = liberty_faction } + } + desc = hold_court.8150.desc.liberty + } + triggered_desc = { + trigger = { + scope:target_faction = { faction_is_type = claimant_faction } + exists = scope:target_faction.special_character + scope:target_faction.faction_leader = scope:target_faction.special_character + } + desc = hold_court.8150.desc.claimant_self + } + triggered_desc = { + trigger = { + scope:target_faction = { faction_is_type = claimant_faction } + } + desc = hold_court.8150.desc.claimant + } + } + desc = hold_court.8150.desc.outro + } + theme = realm + court_scene = { + button_position_character = scope:target_faction.faction_leader + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:target_faction.faction_leader = { + group = petitioners_group + animation = disapproval + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_targeting_faction = { hold_court_8150_faction_trigger = yes } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + any_targeting_faction = { + hold_court_8150_faction_trigger = yes + any_faction_member = { count >= 5 } + } + } + modifier = { + factor = 2 + any_targeting_faction = { + hold_court_8150_faction_trigger = yes + faction_power >= faction_power_threshold + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + ordered_targeting_faction = { + limit = { hold_court_8150_faction_trigger = yes } + order_by = faction_power + save_scope_as = target_faction + faction_leader = { + court_event_character_flag_effect = yes + save_scope_as = targeted_factions_leader #Saving in order to be able to clear the flag. + } + } + if = { + limit = { + any_held_title = { + count > 1 + title_tier = county + is_landless_type_title = no + } + } + ordered_held_title = { + title_tier = county + limit = { + this != root.capital_county + is_landless_type_title = no + } + order_by = { + value = 0 + subtract = title_province.combined_building_level + } + save_scope_as = bribe_county + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Accept + name = hold_court.8150.a + change_current_court_grandeur = medium_court_grandeur_loss + scope:target_faction = { + if = { # Split effects for nicer tooltips + limit = { + any_faction_member = { count = 1 } + } + faction_leader = { + custom_tooltip = hold_court.8150.a.tt_single_all + hold_court_8150_obligation_effect = yes + } + } + else = { + every_faction_member = { + custom = hold_court.8150.a.tt_multiple_feudal_intro + limit = { government_has_flag = government_is_feudal } + custom_tooltip = hold_court.8150.a.tt_shared + hold_court_8150_obligation_effect = yes + } + } + destroy_faction = yes + } + stress_impact = { + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Arrest + name = hold_court.8150.b + imprison_character_effect = { + TARGET = scope:target_faction.faction_leader + IMPRISONER = root + } + scope:target_faction = { + every_faction_member = { + custom = hold_court.8150.a.tt_multiple_intro + limit = { + this != scope:target_faction.faction_leader + } + add_opinion = { + modifier = angry_opinion + target = root + opinion = -20 + } + } + if = { + limit = { + any_faction_member = { count = 1 } + } + show_as_tooltip = { destroy_faction = yes } + } + } + add_dread = minor_dread_gain + stress_impact = { + just = medium_stress_impact_gain + patient = medium_stress_impact_gain + shy = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = patient + } + modifier = { #Weight down for stress. + add = -15 + has_trait = shy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = forgiving + } + } + } + + option = { # Bribe + name = hold_court.8150.c + trigger = { + NOT = { + scope:target_faction.faction_leader = { has_relation_rival = root } + } + } + random_list = { + 40 = { + desc = hold_court.8150.d.tt_accept + send_interface_toast = { + title = hold_court.8150.c.tt_success + left_icon = scope:target_faction.faction_leader + if = { + limit = { exists = scope:bribe_county } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:bribe_county = { + change_title_holder = { + holder = scope:target_faction.faction_leader + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + else = { + pay_short_term_gold = { + target = scope:target_faction.faction_leader + gold = root.major_gold_value + } + } + scope:target_faction = { + faction_leader = { + custom_tooltip = hold_court.8150.a.tt_single_cooldown + add_character_flag = { + flag = joining_faction_block + years = 5 + } + } + every_faction_member = { + custom = hold_court.8150.a.tt_multiple_intro + limit = { + this != scope:target_faction.faction_leader + } + add_opinion = { + target = scope:target_faction.faction_leader + modifier = angry_opinion + opinion = -20 + } + } + destroy_faction = yes + } + } + modifier = { + factor = 10 + has_trait = deceitful + } + modifier = { + factor = 10 + has_trait = greedy + } + modifier = { + factor = 10 + has_trait = fickle + } + } + 60 = { + desc = hold_court.8150.d.tt_reject + send_interface_toast = { + title = hold_court.8150.c.tt_failure + left_icon = scope:target_faction.faction_leader + scope:target_faction = { + add_faction_discontent = 15 + every_faction_member = { + custom = hold_court.8150.a.tt_multiple_intro + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -15 + } + } + } + } + modifier = { + factor = 10 + has_trait = honest + } + modifier = { + factor = 10 + has_trait = stubborn + } + modifier = { + factor = 20 + scope:target_faction.faction_leader = scope:target_faction.special_character + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = -0.5 + ai_rationality = 1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = honest + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + } + } + + option = { # Convince + name = hold_court.8150.d + duel = { + skill = diplomacy + target = scope:target_faction.faction_leader + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + desc = hold_court.8150.d.tt_accept + send_interface_toast = { + title = hold_court.8150.d.tt_accept + left_icon = scope:target_faction.faction_leader + add_prestige = medium_prestige_gain + scope:target_faction = { + faction_leader = { + custom_tooltip = hold_court.8150.a.tt_single_cooldown + add_character_flag = { + flag = joining_faction_block + years = 5 + } + } + every_faction_member = { + custom = hold_court.8150.a.tt_multiple_intro + limit = { + this != scope:target_faction.faction_leader + } + add_opinion = { + target = scope:target_faction.faction_leader + modifier = disappointed_opinion + opinion = -10 + } + } + destroy_faction = yes + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8150.d.tt_reject + send_interface_toast = { + title = hold_court.8150.d.tt_reject + left_icon = scope:target_faction.faction_leader + scope:target_faction = { add_faction_discontent = 10 } + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_rationality = 1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + } + } + + option = { # Refuse + name = hold_court.8150.e + add_prestige = medium_prestige_loss + scope:target_faction = { add_faction_discontent = 5 } + stress_impact = { + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = paranoid + } + } + } + + after = { + scope:targeted_factions_leader = { clear_court_event_participation = yes } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Public Accusation +# by Joe Parkin +# 8160 +################################################## + +# Is the scheme a valid court scheme? +scripted_trigger hold_court_8160_valid_court_scheme_trigger = { + exists = scheme_target_character.liege + OR = { # Victim and plotter share same court + scheme_owner = scheme_target_character.liege + scheme_owner = { is_vassal_or_below_of = prev.scheme_target_character.liege } + scheme_owner = { is_courtier_of = prev.scheme_target_character.liege } + } + NOR = { + scheme_owner = root + scheme_target_character = root + } +} + +scripted_trigger hold_court_8160_valid_plotter_trigger = { + this != root + is_available_ai_adult = yes + exists = scope:scheme_target_scope + trigger_if = { + limit = { exists = scope:scheme_target_scope } + NOR = { + this = scope:scheme_target_scope # victim + has_friendly_relationship_trigger = { CHARACTER = scope:scheme_target_scope } # victim + } + can_start_scheme = { + type = murder + target_character = scope:scheme_target_scope # victim + } + } +} + +# Is the scheme a valid murder/abduct scheme? +scripted_trigger hold_court_8160_valid_hostile_scheme_trigger = { + AND = { + hold_court_8160_valid_court_scheme_trigger = yes + OR = { + scheme_type = murder + scheme_type = abduct + } + } + scheme_target_character = { + save_temporary_scope_as = scheme_target_scope + liege = { + OR = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + any_courtier = { hold_court_8160_valid_plotter_trigger = yes } + } + } + } +} + +# Is the character a valid advocate of the victim? +scripted_trigger hold_court_8160_valid_concerned_trigger = { + this != root + is_available_ai_adult = yes + top_liege = prev.top_liege # victim + NOT = { + is_scheming_against = { target = prev } # victim + } +} + +# Is the character already targeted by a valid scheme? +scripted_trigger hold_court_8160_current_hostile_target_trigger = { + this != root + has_court_event_flag = no + is_available_ai = yes + any_targeting_scheme = { hold_court_8160_valid_hostile_scheme_trigger = yes } + trigger_if = { # if target is a child, they have a parent or family member to advocate + limit = { is_adult = no } + OR = { + any_parent = { hold_court_8160_valid_concerned_trigger = yes } + any_close_family_member = { hold_court_8160_valid_concerned_trigger = yes } + } + } +} + +# Is the character, their spouse, or a family member, targeted? +scripted_trigger hold_court_8160_valid_existing_hostile_trigger = { + this != root + OR = { + hold_court_8160_current_hostile_target_trigger = yes + AND = { + is_married = yes + primary_spouse = { + top_liege = prev.top_liege + hold_court_8160_current_hostile_target_trigger = yes + } + } + any_close_family_member = { + exists = yes + OR = { + is_vassal_or_below_of = prev.liege # victim.root + is_courtier_of = prev.liege # victim.root + } + hold_court_8160_current_hostile_target_trigger = yes + } + } +} + +scripted_effect hold_court_8160_save_create_scheme_effect = { + if = { + limit = { + any_targeting_scheme = { hold_court_8160_valid_hostile_scheme_trigger = yes } + } + random_targeting_scheme = { + limit = { hold_court_8160_valid_hostile_scheme_trigger = yes } + save_scope_as = victim_scheme + scheme_target_character = { save_scope_as = victim } + scheme_owner = { save_scope_as = debug_scheme_owner } + } + } + else = { + save_temporary_scope_as = scheme_target_scope + save_scope_as = victim + liege = { + if = { + limit = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + } + random_vassal_or_below = { + limit = { hold_court_8160_valid_plotter_trigger = yes } + save_scope_as = debug_scheme_owner + start_scheme = { + type = murder + target_character = scope:victim + } + } + } + else = { + random_courtier = { + limit = { hold_court_8160_valid_plotter_trigger = yes } + save_scope_as = debug_scheme_owner + start_scheme = { + type = murder + target_character = scope:victim + } + } + } + } + random_targeting_scheme = { + limit = { scheme_owner = scope:debug_scheme_owner } + save_scope_as = victim_scheme + } + } + scope:victim = { + court_event_character_flag_effect = yes + } +} + +# Choose who is the target of the scheme +scripted_effect hold_court_8160_vassal_picker_scheme_effect = { + hidden_effect = { + random_list = { + 100 = { + modifier = { + factor = 100 + hold_court_8160_current_hostile_target_trigger = yes + } + hold_court_8160_save_create_scheme_effect = yes + } + 50 = { + trigger = { is_married = yes } + modifier = { + factor = 100 + primary_spouse = { hold_court_8160_current_hostile_target_trigger = yes } + } + primary_spouse = { hold_court_8160_save_create_scheme_effect = yes } + } + 50 = { + trigger = { + any_close_family_member = { count = 1 } + } + modifier = { + factor = 100 + any_close_family_member = { hold_court_8160_current_hostile_target_trigger = yes } + } + random_close_family_member = { + limit = { hold_court_8160_current_hostile_target_trigger = yes } + alternative_limit = { always = yes } + hold_court_8160_save_create_scheme_effect = yes + } + } + } + } +} + +scripted_effect hold_court_8160_imprison_effect = { + rightfully_imprison_character_effect = { + TARGET = scope:accused + IMPRISONER = root + } + hidden_effect = { + scope:accused = { + if = { + limit = { + exists = scope:victim.primary_spouse + scope:victim_scheme = { scheme_type = seduce } + this != scope:victim.primary_spouse + } + add_opinion = { + modifier = angry_opinion + target = scope:victim.primary_spouse + opinion = -20 + } + } + else = { + add_opinion = { + modifier = angry_opinion + target = scope:victim + opinion = -20 + } + } + if = { + limit = { exists = scope:concerned } + add_opinion = { + modifier = angry_opinion + target = scope:concerned + opinion = -20 + } + } + } + } + scope:victim = { + if = { + limit = { + exists = primary_spouse + scope:victim_scheme = { scheme_type = seduce } + scope:accused != scope:victim.primary_spouse + } + primary_spouse = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + else = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } +} + +scripted_trigger hold_court_8160_accused_trigger = { + this != root + is_available_ai_adult = yes + NOR = { + this = scope:victim + has_friendly_relationship_trigger = { CHARACTER = scope:victim } + } + can_start_scheme = { + type = murder + target_character = scope:victim + } +} + +# Target of a scheme wants you to punish the schemer - murder/abduct version +hold_court.8160 = { + type = court_event + title = hold_court.8160.t + desc = { + # Who is coming to the throne? + first_valid = { + triggered_desc = { # Child with family + trigger = { + scope:victim = { is_adult = no } + } + desc = hold_court.8160.desc.intro_child + } + triggered_desc = { # Spouse + trigger = { exists = scope:concerned } + desc = hold_court.8160.desc.intro_spouse + } + desc = hold_court.8160.desc.intro_alone # fallback/default + } + first_valid = { + triggered_desc = { # Spouse + trigger = { exists = scope:concerned } + desc = hold_court.8160.desc.intro_other + } + desc = hold_court.8160.desc.intro_me + } + # Who is accused? + first_valid = { + triggered_desc = { # Actually revealed to be involved in scheme + trigger = { + scope:accused = { is_agent_exposed_in_scheme = scope:victim_scheme } + } + desc = hold_court.8160.desc.exposed + } + desc = hold_court.8160.desc.suspicion # Speculation + } + # What is the reason for suspicion? + first_valid = { + triggered_desc = { # Nemeses + trigger = { + scope:accused = { has_relation_nemesis = scope:victim } + } + desc = hold_court.8160.desc.nemesis + } + triggered_desc = { # Rivals + trigger = { + scope:accused = { has_relation_rival = scope:victim } + } + desc = hold_court.8160.desc.rival + } + triggered_desc = { # Accused has claim on Target + trigger = { + scope:accused = { + any_claim = { holder = scope:victim } + } + } + desc = hold_court.8160.desc.my_claimant + } + triggered_desc = { # Target has claim on Accused + trigger = { + scope:accused = { + any_held_title = { + any_claimant = { this = scope:victim } + } + } + } + desc = hold_court.8160.desc.their_claimant + } + triggered_desc = { # Accused and Target covet same title + trigger = { + scope:victim = { + any_claim = { + any_claimant = { this = scope:accused } + } + } + } + desc = hold_court.8160.desc.joint_claimant + } + triggered_desc = { # Accused is a villain + trigger = { + scope:accused = { + OR = { + has_education_intrigue_trigger = yes + has_trait = deceitful + } + } + } + desc = hold_court.8160.desc.intrigue + } + triggered_desc = { # Accused dislikes Target + trigger = { + scope:accused = { + opinion = { + target = scope:victim + value < 0 + } + } + } + desc = hold_court.8160.desc.their_dislike + } + triggered_desc = { # Target dislikes Accused + trigger = { + scope:accused = { + reverse_opinion = { + target = scope:victim + value < 0 + } + } + } + desc = hold_court.8160.desc.my_dislike + } + desc = hold_court.8160.desc.fallback # No good reason + } + # How many agents revealed? + desc = hold_court.8160.desc.outro + } + theme = realm + lower_right_portrait = scope:accused + court_scene = { + button_position_character = scope:concerned + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:concerned = { + group = petitioners_group + animation = worry + } + scope:victim = { + group = petitioners_group + animation = paranoia + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 5 } + + trigger = { + is_ai = no # Murder schemes are heavy for performance + OR = { + any_vassal_or_below = { + save_temporary_scope_as = scheme_target_scope + OR = { + hold_court_8160_valid_existing_hostile_trigger = yes + liege = { + OR = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + any_courtier = { hold_court_8160_valid_plotter_trigger = yes } + } + } + } + } + any_courtier = { + save_temporary_scope_as = scheme_target_scope + OR = { + hold_court_8160_valid_existing_hostile_trigger = yes + liege = { + OR = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + any_courtier = { hold_court_8160_valid_plotter_trigger = yes } + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + every_vassal_or_below = { + limit = { hold_court_8160_valid_existing_hostile_trigger = yes } + alternative_limit = { + save_temporary_scope_as = scheme_target_scope + liege = { + OR = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + any_courtier = { hold_court_8160_valid_plotter_trigger = yes } + } + } + } + add_to_list = victim_list + } + every_courtier = { + limit = { hold_court_8160_valid_existing_hostile_trigger = yes } + alternative_limit = { + save_temporary_scope_as = scheme_target_scope + liege = { + OR = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + any_courtier = { hold_court_8160_valid_plotter_trigger = yes } + } + } + } + add_to_list = victim_list + } + random_in_list = { + list = victim_list + limit = { hold_court_8160_current_hostile_target_trigger = yes } + alternative_limit = { + is_married = yes + primary_spouse = { + top_liege = prev.top_liege + hold_court_8160_current_hostile_target_trigger = yes + } + } + alternative_limit = { + any_close_family_member = { + exists = yes + OR = { + is_vassal_or_below_of = prev.liege # victim.root + is_courtier_of = prev.liege # victim.root + } + hold_court_8160_current_hostile_target_trigger = yes + } + } + alternative_limit = { is_vassal_of = root } + alternative_limit = { is_courtier_of = root } + alternative_limit = { always = yes } + weight = { + modifier = { + factor = 50 + has_trait = paranoid + } + modifier = { + factor = 25 + has_trait = arrogant + } + } + hold_court_8160_vassal_picker_scheme_effect = yes + } + if = { # Find actual scheme owner if revealed + limit = { + exists = scope:victim_scheme + scope:victim_scheme.scheme_owner = { is_agent_exposed_in_scheme = scope:victim_scheme } # scheme owner is known by target + } + scope:victim_scheme.scheme_owner = { + save_scope_as = accused + court_event_character_flag_effect = yes + } + } + else = { # Else find a suspect + every_vassal_or_below = { + limit = { hold_court_8160_accused_trigger = yes } + add_to_list = accused_list + } + every_courtier = { + limit = { hold_court_8160_accused_trigger = yes } + add_to_list = accused_list + } + random_in_list = { + list = accused_list + limit = { is_vassal_of = root } + alternative_limit = { is_courtier_of = root } + alternative_limit = { always = yes } + weight = { + base = 1 + modifier = { # Nemeses + add = 100 + has_relation_nemesis = scope:victim + } + modifier = { # Rivals + add = 50 + has_relation_rival = scope:victim + } + modifier = { # Accused has claim on Target + add = 100 + any_claim = { holder = scope:victim } + } + modifier = { # Target has claim on Accused + add = 100 + any_held_title = { + any_claimant = { this = scope:victim } + } + } + modifier = { # Accused and Target covet same title + add = 100 + any_claim = { + any_claimant = { this = scope:victim } + } + } + modifier = { # Accused is a villain + add = 100 + OR = { + has_education_intrigue_trigger = yes + has_trait = deceitful + } + } + modifier = { # Accused dislikes Target + add = 25 + opinion = { + target = scope:victim + value < 0 + } + } + modifier = { # Target dislikes Accused + add = 25 + reverse_opinion = { + target = scope:victim + value < 0 + } + } + } + save_scope_as = accused + } + } + # Save an advocate if necessary/relevant + scope:victim = { + if = { + limit = { is_adult = no } + if = { + limit = { + OR = { + faith_dominant_gender_female_or_equal = yes + father = { hold_court_8160_valid_concerned_trigger = no } + } + mother ?= { hold_court_8160_valid_concerned_trigger = yes } + } + mother = { save_scope_as = concerned } + } + else_if = { + limit = { + OR = { + faith_dominant_gender_male_or_equal = yes + mother = { hold_court_8160_valid_concerned_trigger = no } + } + father ?= { hold_court_8160_valid_concerned_trigger = yes } + } + father = { save_scope_as = concerned } + } + else = { + ordered_close_family_member = { + limit = { hold_court_8160_valid_concerned_trigger = yes } + order_by = age + save_scope_as = concerned + } + } + } + else_if = { + limit = { + is_married = yes + primary_spouse = { hold_court_8160_valid_concerned_trigger = yes } + } + primary_spouse = { save_scope_as = concerned } + } + else_if = { + limit = { + NOT = { is_vassal_of = root } + any_close_family_member = { hold_court_8160_valid_concerned_trigger = yes } + } + random_close_family_member = { + limit = { hold_court_8160_valid_concerned_trigger = yes } + save_scope_as = concerned + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + court_event_character_flag_effect = yes + } + } + } + if = { + limit = { exists = scope:concerned } + add_character_flag = { + flag = concerned_exists + years = 1 + } + } + # Save titles for motives localization + scope:accused = { + if = { + limit = { + any_claim = { holder = scope:victim } + } + ordered_claim = { + limit = { holder = scope:victim } + order_by = tier + save_scope_as = relevant_title + } + } + else_if = { + limit = { + any_held_title = { + any_claimant = { this = scope:victim } + } + } + ordered_held_title = { + limit = { + any_claimant = { this = scope:victim } + } + order_by = tier + save_scope_as = relevant_title + } + } + else_if = { + limit = { + any_claim = { + any_claimant = { this = scope:victim } + } + } + ordered_claim = { + limit = { + any_claimant = { this = scope:victim } + } + order_by = tier + save_scope_as = relevant_title + } + } + } + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + has_court_event_flag = no + is_available_ai_adult = yes + NOR = { + this = scope:victim + this = scope:accused + AND = { + exists = scope:concerned + this = scope:concerned + } + } + } + } + random_court_position_holder = { + type = executioner_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + NOR = { + this = scope:victim + this = scope:accused + AND = { + exists = scope:concerned + this = scope:concerned + } + } + } + save_scope_as = executioner + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Arrest + name = hold_court.8160.a + if = { + limit = { + scope:victim_scheme = { scheme_type = murder } + } + add_opinion = { + modifier = attempted_murder_opinion + target = scope:accused + } + } + else = { + add_opinion = { + modifier = attempted_abduction_opinion + target = scope:accused + } + } + scope:accused = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -20 + } + hidden_effect = { + add_opinion = { + modifier = angry_opinion + target = scope:victim + opinion = -20 + } + if = { + limit = { exists = scope:concerned } + add_opinion = { + modifier = angry_opinion + target = scope:concerned + opinion = -20 + } + } + } + } + scope:victim = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { scope:accused = scope:debug_scheme_owner } + add_tyranny = minor_tyranny_gain + } + else = { + stress_impact = { + just = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -2 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -30 + scope:accused = scope:debug_scheme_owner + has_trait = just + } + } + } + + option = { # Torture + name = { + trigger = { has_trait = torturer } + text = hold_court.8160.b.torturer + } + name = { + trigger = { + exists = scope:executioner + } + text = hold_court.8160.b.executioner + } + trigger = { + OR = { + exists = scope:executioner + has_trait = torturer + } + } + scope:accused = { + random_list = { + 75 = { + modifier = { + factor = 2 + has_trait = craven + } + modifier = { + factor = 2 + has_trait = fickle + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 2 + is_agent_exposed_in_scheme = scope:victim_scheme + } + desc = hold_court.8160.b.tt_confession + root = { + send_interface_toast = { + title = hold_court.8160.b.tt_confession + left_icon = scope:accused + right_icon = scope:victim + hold_court_8160_imprison_effect = yes + } + } + } + 25 = { + modifier = { + factor = 2 + has_trait = stubborn + } + modifier = { + factor = 2 + has_trait = brave + } + modifier = { + factor = 2 + has_trait = just + } + modifier = { + factor = 2 + AND = { + NOT = { is_agent_exposed_in_scheme = scope:victim_scheme } + has_trait = honest + } + } + modifier = { + factor = 2 + AND = { + is_agent_exposed_in_scheme = scope:victim_scheme + has_trait = deceitful + } + } + desc = hold_court.8160.b.tt_silence + root = { + send_interface_toast = { + title = hold_court.8160.b.tt_silence + left_icon = scope:accused + right_icon = scope:victim + } + } + } + } + add_opinion = { + modifier = tortured_me + target = root + } + if = { + limit = { exists = scope:executioner } + hidden_effect = { + add_opinion = { + modifier = tortured_me + target = scope:executioner + } + } + } + if = { + limit = { + is_married = yes + NOR = { + primary_spouse = { + this = root + this = scope:victim + AND = { + exists = scope:concerned + this = scope:concerned + } + } + } + } + primary_spouse = { + add_opinion = { + modifier = tortured_family_member + target = root + } + if = { + limit = { exists = scope:executioner } + hidden_effect = { + add_opinion = { + modifier = tortured_family_member + target = scope:executioner + } + } + } + } + } + every_close_family_member = { + limit = { + NOR = { + this = root + this = scope:victim + AND = { + exists = scope:concerned + this = scope:concerned + } + } + } + add_opinion = { + modifier = tortured_family_member + target = root + } + if = { + limit = { exists = scope:executioner } + hidden_effect = { + add_opinion = { + modifier = tortured_family_member + target = scope:executioner + } + } + } + } + } + scope:victim = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + if = { + limit = { exists = scope:executioner } + hidden_effect = { + add_opinion = { + modifier = grateful_opinion + target = scope:executioner + opinion = 15 + } + } + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + if = { + limit = { exists = scope:executioner } + hidden_effect = { + add_opinion = { + modifier = grateful_opinion + target = scope:executioner + opinion = 15 + } + } + } + } + } + + if = { + limit = { + scope:victim_scheme.scheme_owner = { is_agent_exposed_in_scheme = scope:victim_scheme } + } + add_tyranny = medium_tyranny_gain + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + } + else = { + add_tyranny = major_tyranny_gain + stress_impact = { + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = just + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + } + } + + option = { # Attempt to find the truth + name = hold_court.8160.c + show_as_tooltip = { + duel = { + skill = intrigue + target = scope:accused + 1 = { + show_chance = no + desc = hold_court.8160.c.tt_success + hold_court_8160_imprison_effect = yes + } + 1 = { + show_chance = no + desc = hold_court.8160.c.tt_failure + scope:victim = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + } + } + hidden_effect = { + duel = { + skill = intrigue + target = scope:accused + 8 = { + trigger = { + scope:victim_scheme = { + any_scheme_agent_character = { this = scope:accused } + } + } + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = hold_court.8160.c.tt_success + left_icon = scope:accused + right_icon = scope:victim + hold_court_8160_imprison_effect = yes + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -9 + } + send_interface_toast = { + title = hold_court.8160.c.tt_failure + left_icon = scope:accused + right_icon = scope:victim + add_prestige = medium_prestige_loss + scope:victim = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + } + } + } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + ai_zeal = -1 + ai_energy = -1 + ai_rationality = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -30 + has_trait = lazy + } + } + } + + option = { # Dismiss + name = { + trigger = { + scope:victim_scheme = { + any_scheme_agent_character = { this = root } + } + } + text = hold_court.8160.d.involved + } + name = { + trigger = { + scope:victim_scheme.scheme_owner = { is_agent_exposed_in_scheme = scope:victim_scheme } + } + text = hold_court.8160.d.proof + } + name = { + trigger = { always = yes } + text = hold_court.8160.d.fallback + } + scope:victim_scheme = { + if = { + limit = { + any_scheme_agent_character = { this = root } + } + add_scheme_progress = scheme_progress_gain + } + } + scope:accused = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + scope:victim = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + if = { + limit = { + scope:victim_scheme.scheme_owner = { is_agent_exposed_in_scheme = scope:victim_scheme } + } + stress_impact = { + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + } + else = { + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.5 + ai_energy = -2 + } + } + } + + after = { + if = { + limit = { has_character_flag = concerned_exists } + remove_character_flag = concerned_exists + } + scope:victim = { + clear_court_event_participation = yes + } + scope:accused = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:executioner } + scope:executioner = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Personal Matter +# by Joe Parkin +# 8161 +################################################## + +# Is the character able to be targeted by a valid scheme? +scripted_trigger hold_court_8161_valid_seduce_target_trigger = { + this != root + age < 50 + has_court_event_flag = no + is_available_ai_adult = yes + exists = liege + save_temporary_scope_as = hold_court_8161_victim + liege = { + any_vassal_or_below = { hold_court_8161_valid_seduce_plotter_trigger = yes } + } +} + +# Is the character able to start a valid scheme? +scripted_trigger hold_court_8161_valid_seduce_plotter_trigger = { + NOR = { + this = root + is_spouse_of = root + } + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:hold_court_8161_victim } # victim + might_cheat_on_every_partner_trigger = yes + can_start_scheme = { + type = seduce + target_character = scope:hold_court_8161_victim # victim + } + exists = scope:hold_court_8161_victim.primary_spouse # to avoid errors + NOR = { + has_trait = chaste + has_trait = shy + has_trait = craven + has_trait = content + has_trait = celibate + } + NOR = { + this = scope:hold_court_8161_victim # victim + this = scope:hold_court_8161_victim.primary_spouse # victim's spouse + has_friendly_relationship_trigger = { CHARACTER = scope:hold_court_8161_victim.primary_spouse } # victim's spouse + } +} + +# Is the scheme a valid seduction scheme? +scripted_trigger hold_court_8161_valid_seduce_scheme_trigger = { + hold_court_8160_valid_court_scheme_trigger = yes + scheme_type = seduce + scheme_success_chance >= 30 +} + +# Is the character a valid event target? +scripted_trigger hold_court_8161_valid_target_vassal_trigger = { + NOR = { + this = root + is_spouse_of = root + } + has_court_event_flag = no + is_available_ai_adult = yes + is_married = yes + top_liege = primary_spouse.top_liege + trigger_if = { + limit = { + primary_spouse = { is_male = yes } + } + NOT = { + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + trigger_else = { + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + OR = { + hold_court_8161_valid_seduce_target_trigger = yes + primary_spouse = { hold_court_8161_valid_seduce_target_trigger = yes } + } +} + +scripted_trigger hold_court_8161_existing_seduction_target_trigger = { + this != root + OR = { + any_targeting_scheme = { hold_court_8161_valid_seduce_scheme_trigger = yes } + primary_spouse = { + any_targeting_scheme = { hold_court_8161_valid_seduce_scheme_trigger = yes } + } + } +} + +scripted_trigger hold_court_8161_religious_crime_trigger = { + OR = { + AND = { + scope:victim.primary_spouse = { is_female = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + AND = { + scope:victim.primary_spouse = { is_male = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + AND = { + OR = { + AND = { + scope:victim = { is_male = yes } + scope:accused = { is_male = yes } + } + AND = { + scope:victim = { is_female = yes } + scope:accused = { is_female = yes } + } + } + NOT = { + faith = { has_doctrine = doctrine_homosexuality_accepted } + } + } + } +} + +# Save or create a seduction scheme in the court +scripted_effect hold_court_8161_save_create_scheme_effect = { + if = { + limit = { + any_targeting_scheme = { hold_court_8161_valid_seduce_scheme_trigger = yes } + } + random_targeting_scheme = { + limit = { hold_court_8161_valid_seduce_scheme_trigger = yes } + save_scope_as = victim_scheme + scheme_target_character = { save_scope_as = victim } + scheme_owner = { save_scope_as = debug_scheme_owner } + } + } + else = { + save_scope_as = victim + liege = { + random_vassal_or_below = { + limit = { hold_court_8161_valid_seduce_plotter_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 2 + has_trait = lustful + } + modifier = { + factor = 4 + has_trait = honest + } + modifier = { + factor = 2 + intrigue < average_skill_rating + } + modifier = { + factor = 4 + has_trait = contrite + } + modifier = { + factor = 4 + has_trait = confider + } + modifier = { + factor = 2 + has_trait = trusting + } + } + save_scope_as = debug_scheme_owner + start_scheme = { + type = seduce + target_character = scope:victim + } + } + } + random_targeting_scheme = { + limit = { scheme_owner = scope:debug_scheme_owner } + save_scope_as = victim_scheme + } + } + scope:victim = { + court_event_character_flag_effect = yes + primary_spouse = { + court_event_character_flag_effect = yes + } + } +} + +# Choose who is the target of the scheme +scripted_effect hold_court_8161_vassal_spouse_scheme_effect = { + hidden_effect = { + random_list = { + 50 = { + trigger = { hold_court_8161_valid_seduce_target_trigger = yes } + hold_court_8161_save_create_scheme_effect = yes + } + 100 = { + trigger = { + primary_spouse = { hold_court_8161_valid_seduce_target_trigger = yes } + } + primary_spouse = { hold_court_8161_save_create_scheme_effect = yes } + } + } + } +} + +# Spouse of the target of a scheme wants you to punish the schemer - seduction version +hold_court.8161 = { + type = court_event + title = hold_court.8161.t + desc = { + desc = hold_court.8161.desc.intro + first_valid = { + triggered_desc = { # Nemeses + trigger = { + scope:accused = { has_relation_nemesis = scope:victim.primary_spouse } + } + desc = hold_court.8161.desc.nemesis + } + triggered_desc = { # Rivals + trigger = { + scope:accused = { has_relation_rival = scope:victim.primary_spouse } + } + desc = hold_court.8161.desc.rival + } + triggered_desc = { # Quarry + trigger = { + scope:victim = { + OR = { + has_trait = beauty_good_1 + has_trait = beauty_good_2 + has_trait = beauty_good_3 + has_trait = lustful + } + } + } + desc = hold_court.8161.desc.quarry + } + triggered_desc = { # Accused dislikes Target + trigger = { + scope:accused = { + opinion = { + target = scope:victim.primary_spouse + value < 0 + } + } + } + desc = hold_court.8161.desc.their_dislike + } + triggered_desc = { # Target dislikes Accused + trigger = { + scope:accused = { + reverse_opinion = { + target = scope:victim.primary_spouse + value < 0 + } + } + } + desc = hold_court.8161.desc.my_dislike + } + triggered_desc = { # Accused is a villain + trigger = { + scope:accused = { + OR = { + has_education_intrigue_trigger = yes + has_trait = deceitful + has_trait = lustful + has_trait = seducer + } + } + } + desc = hold_court.8161.desc.intrigue + } + desc = hold_court.8161.desc.fallback # No good reason + } + desc = hold_court.8161.desc.body + } + theme = realm + lower_right_portrait = scope:accused + court_scene = { + button_position_character = scope:victim.primary_spouse + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:victim.primary_spouse = { + group = petitioners_group + animation = anger + } + scope:victim = { + group = petitioners_group + animation = disapproval + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 5 } + + trigger = { + OR = { + any_courtier_or_guest = { + hold_court_8161_valid_target_vassal_trigger = yes + trigger_if = { + limit = { NOT = { exists = scope:victim } } + save_temporary_scope_as = victim + } + exists = scope:victim.primary_spouse + } + any_vassal = { + hold_court_8161_valid_target_vassal_trigger = yes + trigger_if = { + limit = { NOT = { exists = scope:victim } } + save_temporary_scope_as = victim + } + exists = scope:victim.primary_spouse + } + } + OR = { + any_vassal_or_below = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + this = scope:victim + this = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + any_courtier_or_guest = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + this = scope:victim + this = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + random_list = { + 2 = { + trigger = { + any_courtier_or_guest = { hold_court_8161_valid_target_vassal_trigger = yes } + } + random_courtier_or_guest = { + limit = { + hold_court_8161_valid_target_vassal_trigger = yes + hold_court_8161_existing_seduction_target_trigger = yes + } + alternative_limit = { + hold_court_8161_valid_target_vassal_trigger = yes + } + weight = { + modifier = { + factor = 50 + has_trait = paranoid + } + modifier = { + factor = 25 + has_trait = arrogant + } + } + hold_court_8161_vassal_spouse_scheme_effect = yes + } + } + 2 = { + trigger = { + any_vassal_or_below = { hold_court_8161_valid_target_vassal_trigger = yes } + } + random_vassal_or_below = { + limit = { + hold_court_8161_valid_target_vassal_trigger = yes + hold_court_8161_existing_seduction_target_trigger = yes + } + alternative_limit = { + hold_court_8161_valid_target_vassal_trigger = yes + } + weight = { + modifier = { + factor = 50 + has_trait = paranoid + } + modifier = { + factor = 25 + has_trait = arrogant + } + } + hold_court_8161_vassal_spouse_scheme_effect = yes + } + } + } + hidden_effect = { + random_list = { + 50 = { + trigger = { exists = scope:debug_scheme_owner } + scope:debug_scheme_owner = { save_scope_as = accused } + } + 25 = { + trigger = { + any_vassal_or_below = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + this = scope:victim + this = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + } + random_vassal_or_below = { + limit = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + this = scope:victim + this = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + weight = { + base = 1 + modifier = { + factor = 100 + has_relation_nemesis = scope:victim.primary_spouse # Nemeses + } + modifier = { + factor = 50 + has_relation_rival = scope:victim.primary_spouse # Rivals + } + modifier = { + factor = 25 + opinion = { + target = scope:victim.primary_spouse # Accused dislikes Target + value < 0 + } + } + modifier = { + factor = 25 + reverse_opinion = { + target = scope:victim.primary_spouse # Target dislikes Accused + value < 0 + } + } + modifier = { # Accused is a villain + factor = 50 + OR = { + has_education_intrigue_trigger = yes + has_trait = deceitful + has_trait = lustful + has_trait = seducer + } + } + } + save_scope_as = accused + } + } + 25 = { + trigger = { + any_courtier_or_guest = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + THIS = scope:victim + THIS = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + } + random_courtier_or_guest = { + limit = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + THIS = scope:victim + THIS = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + weight = { + base = 1 + modifier = { + factor = 100 + has_relation_nemesis = scope:victim.primary_spouse # Nemeses + } + modifier = { + factor = 50 + has_relation_rival = scope:victim.primary_spouse # Rivals + } + modifier = { + factor = 25 + opinion = { + target = scope:victim.primary_spouse # Accused dislikes Target + value < 0 + } + } + modifier = { + factor = 25 + reverse_opinion = { + target = scope:victim.primary_spouse # Target dislikes Accused + value < 0 + } + } + modifier = { # Accused is a villain + factor = 50 + OR = { + has_education_intrigue_trigger = yes + has_trait = deceitful + has_trait = lustful + has_trait = seducer + } + } + } + save_scope_as = accused + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Arrest + name = { + trigger = { + OR = { + AND = { + scope:victim = { is_male = yes } + scope:accused = { is_male = yes } + } + AND = { + scope:victim = { is_female = yes } + scope:accused = { is_female = yes } + } + } + NOT = { + faith = { has_doctrine = doctrine_homosexuality_accepted } + } + } + text = hold_court.8161.a.homosexual + } + name = { + trigger = { + OR = { + AND = { + scope:victim.primary_spouse = { is_female = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + AND = { + scope:victim.primary_spouse = { is_male = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + } + } + text = hold_court.8161.a.adultery + } + trigger = { hold_court_8161_religious_crime_trigger = yes } + if = { + limit = { + OR = { + AND = { + scope:victim.primary_spouse = { is_female = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + AND = { + scope:victim.primary_spouse = { is_male = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + } + } + add_opinion = { + modifier = fornicator_crime + target = scope:accused + } + } + else = { + add_opinion = { + modifier = deviant_crime + target = scope:accused + } + } + scope:victim.primary_spouse = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + scope:accused = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + add_opinion = { + modifier = angry_opinion + target = scope:victim.primary_spouse + opinion = -10 + } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + NOR = { + cp:councillor_court_chaplain = scope:accused + cp:councillor_court_chaplain = scope:victim + cp:councillor_court_chaplain = scope:victim.primary_spouse + } + NOR = { + AND = { + scope:victim.primary_spouse = { is_female = yes } + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + AND = { + scope:victim.primary_spouse = { is_male = yes } + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + } + cp:councillor_court_chaplain = { + add_opinion = { + modifier = pious_opinion + target = root + opinion = 10 + } + } + } + stress_impact = { + just = medium_stress_impact_gain + cynical = medium_stress_impact_gain + deviant = medium_stress_impact_gain + lustful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_compassion = -1 + ai_zeal = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = just + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -30 + has_trait = deviant + } + modifier = { #Weight down for stress. + add = -30 + has_trait = lustful + } + } + } + + option = { # Attempt to find truth + name = hold_court.8161.c + show_as_tooltip = { + duel = { + skill = intrigue + target = scope:accused + 1 = { + show_chance = no + desc = hold_court.8160.c.tt_success + hold_court_8160_imprison_effect = yes + } + 1 = { + show_chance = no + desc = hold_court.8160.c.tt_failure + scope:accused = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + } + } + } + } + hidden_effect = { + duel = { + skill = intrigue + target = scope:accused + 8 = { + trigger = { + scope:victim_scheme ?= { + any_scheme_agent_character = { this = scope:accused } + } + } + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = hold_court.8160.c.tt_success + left_icon = scope:accused + right_icon = scope:victim + hold_court_8160_imprison_effect = yes + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = hold_court.8160.c.tt_failure + left_icon = scope:accused + right_icon = scope:victim + scope:accused = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + } + } + } + } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + ai_zeal = -1 + ai_energy = -1 + ai_rationality = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -30 + has_trait = lazy + } + } + } + + option = { # Dismiss + name = { + trigger = { + scope:victim_scheme ?= { + any_scheme_agent_character = { this = root } + } + } + text = hold_court.8161.d.involved + } + name = { + trigger = { + OR = { + AND = { + scope:victim.primary_spouse = { is_female = yes } + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + AND = { + scope:victim.primary_spouse = { is_male = yes } + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + } + text = hold_court.8161.d.permitted + } + name = { + trigger = { always = yes } + text = hold_court.8161.d.fallback + } + scope:victim_scheme ?= { + if = { + limit = { + any_scheme_agent_character = { this = root } + } + add_scheme_progress = scheme_progress_gain + } + } + scope:victim.primary_spouse = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + stress_impact = { + chaste = medium_stress_impact_gain + } + if = { + limit = { hold_court_8161_religious_crime_trigger = yes } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.5 + ai_energy = -2 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = chaste + } + modifier = { #Weight down for stress. + add = -30 + hold_court_8161_religious_crime_trigger = yes + has_trait = zealous + } + } + } + + after = { + scope:victim = { + clear_court_event_participation = yes + primary_spouse = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Noble Privileges +# by Joe Parkin +# 8180 +################################################## + +# Is there a duke or higher vassal has room for a positive contract change? +scripted_trigger hold_court_8180_lord_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + primary_title.tier >= tier_duchy + government_has_flag = government_is_feudal + subject_contract_is_blocked_from_modification = no + NOT = { has_variable = hc_8180_contract_var } + NOT = { has_hook = root } + OR = { + AND = { + faith != liege.faith + vassal_contract_obligation_level_can_be_increased = religious_rights # Religious + } + AND = { + liege.culture = { has_innovation = innovation_battlements } + vassal_contract_obligation_level_can_be_increased = fortification_rights # Fortification + } + AND = { + liege.culture = { has_innovation = innovation_currency_02 } + vassal_contract_obligation_level_can_be_increased = coinage_rights # Coinage + } + AND = { + liege = { + OR = { # Only relevant if war declaration is limited + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 + } + } + vassal_contract_obligation_level_can_be_increased = war_declaration_rights # War Declaration + } + vassal_contract_obligation_level_can_be_increased = council_rights # Council + AND = { + NOT = { + liege = { has_realm_law = crown_authority_0 } # Only relevant if revocation is possible + } + vassal_contract_obligation_level_can_be_increased = title_revocation_rights # Title Revocation + } + AND = { # Scutage + liege.culture = { + has_innovation = innovation_scutage + } + NOT = { vassal_contract_has_flag = has_scutage_contract } + } + AND = { # March + liege.culture = { + has_innovation = innovation_burhs + } + NOT = { vassal_contract_has_flag = has_march_contract } + } + AND = { # Palatinate + liege.culture = { + has_innovation = innovation_divine_right + } + NOT = { vassal_contract_has_flag = has_palatinate_contract } + } + } +} + +# Increase the relevant contract +scripted_effect hold_court_8180_grant_contract_effect = { + switch = { + trigger = var:hc_8180_contract_var + 1 = { # Religious + vassal_contract_set_obligation_level = { + type = religious_rights + level = 1 + } + } + 2 = { # Fortification + vassal_contract_set_obligation_level = { + type = fortification_rights + level = 1 + } + } + 3 = { # Coinage + vassal_contract_set_obligation_level = { + type = coinage_rights + level = 1 + } + } + 4 = { # War Declaration + vassal_contract_set_obligation_level = { + type = war_declaration_rights + level = 1 + } + } + 5 = { # Council Rights + vassal_contract_set_obligation_level = { + type = council_rights + level = 1 + } + } + 6 = { # Title Revocation + vassal_contract_set_obligation_level = { + type = title_revocation_rights + level = 1 + } + } + 7 = { # Scutage + vassal_contract_set_obligation_level = { + type = special_contract + level = 1 + } + } + 8 = { # March + vassal_contract_set_obligation_level = { + type = special_contract + level = 2 + } + } + 9 = { # Palatinate + vassal_contract_set_obligation_level = { + type = special_contract + level = 3 + } + } + } + hidden_effect = { set_subject_contract_modification_blocked = yes } +} + +# A vassal wants a contract buff +hold_court.8180 = { + type = court_event + title = hold_court.8180.t + desc = { + desc = hold_court.8180.desc.intro + first_valid = { # Contract Type + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 1 } + desc = hold_court.8180.desc.religious # Religious + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 2 } + desc = hold_court.8180.desc.fortification # Fortification + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 3 } + desc = hold_court.8180.desc.coinage # Coinage + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 4 } + desc = hold_court.8180.desc.war_declaration # War Declaration + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 5 } + desc = hold_court.8180.desc.council # Council + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 6 } + desc = hold_court.8180.desc.title_revocation # Title Revocation + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 7 } + desc = hold_court.8180.desc.scutage # Scutage + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 8 } + desc = hold_court.8180.desc.march # March + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 9 } + desc = hold_court.8180.desc.palatinate # Palatinate + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 10 } + desc = hold_court.8180.desc.family_entrepeneurship # Family Entrepeneurship + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 11 } + desc = hold_court.8180.desc.centralized_power # Centralized Power + } + } + first_valid = { # Context + # Religious + triggered_desc = { + trigger = { + scope:contract_lord.var:hc_8180_contract_var = 1 # Religious + scope:contract_lord.religion = root.religion + } + desc = hold_court.8180.desc.religious_heretic # Heretic + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 1 } # Religious + desc = hold_court.8180.desc.religious_heathen # Heathen + } + # Martial + triggered_desc = { + trigger = { + OR = { + scope:contract_lord.var:hc_8180_contract_var = 2 #Fortification + scope:contract_lord.var:hc_8180_contract_var = 8 # March + } + } + desc = hold_court.8180.desc.martial_defensive # Defensive + } + triggered_desc = { + trigger = { + scope:contract_lord.var:hc_8180_contract_var = 4 # War Declaration + scope:contract_lord.var:hc_8180_contract_var = 7 # Scutage + } + desc = hold_court.8180.desc.martial_offensive # Offensive + } + # Stewardship + triggered_desc = { + trigger = { + OR = { + scope:contract_lord.var:hc_8180_contract_var = 3 # Coinage + scope:contract_lord.var:hc_8180_contract_var = 11 # Centralized Power + } + } + desc = hold_court.8180.desc.stewardship + } + # Status + triggered_desc = { + trigger = { + OR = { + scope:contract_lord.var:hc_8180_contract_var = 5 # Council + scope:contract_lord.var:hc_8180_contract_var = 9 # Palatinate + } + } + desc = hold_court.8180.desc.status + } + # Family + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 10 } #Family Entrepeneurship + desc = hold_court.8180.desc.family + } + # Other + desc = hold_court.8180.desc.fallback # General + } + } + theme = court + artifact = { + target = scope:vassal_artifact + position = lower_right_portrait + } + court_scene = { + button_position_character = scope:contract_lord + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:contract_lord = { + group = petitioners_group + animation = admiration + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + is_adult = yes + any_vassal = { hold_court_8180_lord_trigger = yes } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_vassal = { + hold_court_8180_lord_trigger = yes + OR = { + has_trait = greedy + has_trait = ambitious + has_trait = shrewd + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + capital_barony = { save_scope_as = capital } + random_vassal = { + limit = { + hold_court_8180_lord_trigger = yes + primary_title.tier = tier_kingdom # Prefer Kings... + } + alternative_limit = { + hold_court_8180_lord_trigger = yes + primary_title.tier = tier_duchy # ...then Dukes. + } + weight = { + base = 1 + modifier = { + factor = 2 + NOT = { vassal_contract_obligation_level_can_be_decreased = special_contract } # No existing special contract + } + modifier = { + factor = 2 + is_powerful_vassal = yes + } + modifier = { + factor = 2 + OR = { + vassal_contract_obligation_level_can_be_increased = feudal_government_taxes + vassal_contract_obligation_level_can_be_increased = feudal_government_levies + } + } + modifier = { + factor = 2 + does_ai_vassal_in_vassal_contract_desire_obligation_change = yes + } + modifier = { + factor = 2 + has_trait = greedy + has_trait = ambitious + has_trait = shrewd + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + save_scope_as = contract_lord + court_event_character_flag_effect = yes + if = { + limit = { + any_held_title = { + count > 1 + title_tier = county + is_landless_type_title = no + } + } + ordered_held_title = { + title_tier = county + limit = { + this != holder.capital_county + de_jure_liege.holder = root + is_landless_type_title = no + } + alternative_limit = { + tier = tier_county + this != holder.capital_county + any_neighboring_county = { holder = root } + is_landless_type_title = no + } + alternative_limit = { + tier = tier_county + this != holder.capital_county + is_landless_type_title = no + } + order_by = { + value = 0 + subtract = development_level + } + save_scope_as = vassal_title + } + } + if = { + limit = { + any_character_artifact = { exists = yes } + } + ordered_character_artifact = { + order_by = artifact_rarity + save_scope_as = vassal_artifact + } + } + hidden_effect = { + random_list = { + 1 = { # Religious Rights / 1 + trigger = { + faith != liege.faith + vassal_contract_obligation_level_can_be_increased = religious_rights + } + modifier = { + factor = 2 + faith != liege.faith + } + modifier = { + factor = 2 + religion != liege.religion + } + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { factor = 4 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 1 + years = 20 # cooldown for this character + } + } + 1 = { # Fortification Rights / 2 + trigger = { + liege.culture = { has_innovation = innovation_battlements } + vassal_contract_obligation_level_can_be_increased = fortification_rights + } + modifier = { + factor = 2 + any_sub_realm_county = { hold_court_8010_county_trigger = yes } + } + modifier = { + factor = 2 + has_education_martial_trigger = yes + } + modifier = { + factor = 2 + has_martial_lifestyle_trait_trigger = yes + } + modifier = { factor = 2 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 2 + years = 20 # cooldown for this character + } + } + 1 = { # Coinage Rights / 3 + trigger = { + liege.culture = { has_innovation = innovation_currency_02 } + vassal_contract_obligation_level_can_be_increased = coinage_rights + } + modifier = { + factor = 2 + has_education_stewardship_trigger = yes + } + modifier = { + factor = 2 + has_stewardship_lifestyle_trait_trigger = yes + } + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { factor = 2 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 3 + years = 20 # cooldown for this character + } + } + 1 = { # War Declaration / 4 + trigger = { + liege = { + OR = { # Only relevant if war declaration is limited + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 + } + } + vassal_contract_obligation_level_can_be_increased = war_declaration_rights + } + modifier = { + factor = 2 + has_education_martial_trigger = yes + } + modifier = { + factor = 2 + has_martial_lifestyle_trait_trigger = yes + } + modifier = { + factor = 2 + has_trait = ambitious + } + modifier = { + factor = 2 + has_trait = wrathful + } + modifier = { factor = 3 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 4 + years = 20 # cooldown for this character + } + } + 1 = { # Council Rights / 5 + trigger = { vassal_contract_obligation_level_can_be_increased = council_rights } + modifier = { + factor = 2 + has_trait = ambitious + } + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 2 + dynasty.dynasty_prestige_level >= liege.dynasty.dynasty_prestige_level + } + modifier = { factor = 4 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 5 + years = 20 # cooldown for this character + } + } + 1 = { # Title Revocation / 6 + trigger = { + NOT = { + liege = { has_realm_law = crown_authority_0 } + } + vassal_contract_obligation_level_can_be_increased = title_revocation_rights + } + modifier = { + factor = 2 + has_trait = paranoid + } + modifier = { + factor = 2 + has_trait = craven + } + modifier = { factor = 4 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 6 + years = 20 # cooldown for this character + } + } + 1 = { # Scutage / 7 + trigger = { + liege.culture = { + has_innovation = innovation_scutage + } + NOT = { vassal_contract_obligation_level_can_be_decreased = special_contract } # No existing special contract + } + modifier = { + factor = 2 + OR = { + has_education_martial_trigger = yes + has_martial_lifestyle_trait_trigger = yes + } + } + modifier = { factor = 3 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 7 + years = 20 # cooldown for this character + } + } + 1 = { # March / 8 + trigger = { + liege.culture = { + has_innovation = innovation_burhs + } + NOT = { vassal_contract_obligation_level_can_be_decreased = special_contract } # No existing special contract + } + modifier = { + factor = 2 + has_education_martial_trigger = yes + } + modifier = { + factor = 2 + has_martial_lifestyle_trait_trigger = yes + } + modifier = { factor = 3 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 8 + years = 20 # cooldown for this character + } + } + 1 = { # Palatinate / 9 + trigger = { + liege.culture = { + has_innovation = innovation_divine_right + } + is_powerful_vassal = yes + NOT = { vassal_contract_obligation_level_can_be_decreased = special_contract } # No existing special contract + } + modifier = { + factor = 2 + has_education_diplomacy_trigger = yes + } + modifier = { + factor = 2 + has_diplomacy_lifestyle_trait_trigger = yes + } + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 2 + dynasty.dynasty_prestige_level >= liege.dynasty.dynasty_prestige_level + } + modifier = { factor = 5 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 9 + years = 20 # cooldown for this character + } + } + } + if = { # Determine whether tax or levies can be increased, and is relevant + limit = { + has_variable = hc_8180_contract_var + var:hc_8180_contract_var != 9 # Palatinate + OR = { + vassal_contract_obligation_level_can_be_increased = feudal_government_taxes + vassal_contract_obligation_level_can_be_increased = feudal_government_levies + } + } + random_list = { + 1 = { + trigger = { + var:hc_8180_contract_var != 8 # March + var:hc_8180_contract_var != 11 # Centralized Power / Support + vassal_contract_obligation_level_can_be_increased = feudal_government_taxes + } + modifier = { + factor = 10 + vassal_contract_obligation_level:feudal_government_taxes < vassal_contract_obligation_level:feudal_government_levies + } + set_variable = { + name = hc_8180_increase_var + value = 1 + } + } + 1 = { + trigger = { + var:hc_8180_contract_var != 7 # Scutage + var:hc_8180_contract_var != 10 # Family Entrepeneurship + vassal_contract_obligation_level_can_be_increased = feudal_government_levies + } + modifier = { + factor = 10 + vassal_contract_obligation_level:feudal_government_levies < vassal_contract_obligation_level:feudal_government_taxes + } + set_variable = { + name = hc_8180_increase_var + value = 2 + } + } + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Accept + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 1 } + text = hold_court.8180.a.religious + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 2 } + text = hold_court.8180.a.fortification + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 3 } + text = hold_court.8180.a.coinage + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 4 } + text = hold_court.8180.a.war_declaration + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 5 } + text = hold_court.8180.a.council + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 6 } + text = hold_court.8180.a.title_revocation + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 7 } + text = hold_court.8180.a.scutage + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 8 } + text = hold_court.8180.a.march + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 9 } + text = hold_court.8180.a.palatinate + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 10 } + text = hold_court.8180.a.family_entrepeneurship + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 11 } + text = hold_court.8180.a.centralized_power + } + if = { + limit = { + can_add_hook = { + target = scope:contract_lord + type = indebted_hook + } + } + add_hook = { + target = scope:contract_lord + type = indebted_hook + } + } + scope:contract_lord = { + hold_court_8180_grant_contract_effect = yes + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_compassion = 1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Demand payment + name = hold_court.8180.b + trigger = { + scope:contract_lord = { short_term_gold >= root.medium_gold_value } + } + random_list = { + 2 = { + desc = hold_court.8180.b.tt.success + modifier = { + factor = 2 + scope:contract_lord = { has_trait = content } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = generous } + } + modifier = { factor = hold_court_8180_contract_value } # based on relative worth of contract + send_interface_toast = { + title = hold_court.8180.b.tt.success + scope:contract_lord = { + pay_short_term_gold = { + target = root + gold = root.medium_gold_value + } + hold_court_8180_grant_contract_effect = yes + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -5 + } + } + } + } + 7 = { + desc = hold_court.8180.b.tt.failure + modifier = { + factor = 2 + scope:contract_lord = { has_trait = greedy } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = ambitious } + } + send_interface_toast = { + title = hold_court.8180.b.tt.failure + scope:contract_lord = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 2 + ai_compassion = -0.25 + ai_rationality = 1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + option = { # Demand artifact + name = hold_court.8180.c + trigger = { exists = scope:vassal_artifact } + random_list = { + 2 = { + desc = hold_court.8180.c.tt.success + modifier = { + factor = 2 + scope:contract_lord = { has_trait = content } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = generous } + } + modifier = { factor = hold_court_8180_contract_value } # based on relative worth of contract + send_interface_toast = { + title = hold_court.8180.c.tt.success + scope:contract_lord = { + scope:vassal_artifact = { + set_owner = { target = root } + } + hold_court_8180_grant_contract_effect = yes + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -5 + } + } + } + } + 7 = { + desc = hold_court.8180.b.tt.failure + modifier = { + factor = 2 + scope:contract_lord = { has_trait = greedy } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = ambitious } + } + modifier = { + factor = scope:vassal_artifact.var:quality # half of artifact quality + trigger = { + scope:vassal_artifact = { has_variable = quality } + } + } + send_interface_toast = { + title = hold_court.8180.b.tt.failure + scope:contract_lord = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + } + } + } + stress_impact = { + generous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 2 + ai_compassion = -0.25 + ai_rationality = 1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + } + } + + option = { # Demand title + name = hold_court.8180.d + trigger = { exists = scope:vassal_title } + random_list = { + 2 = { + desc = hold_court.8180.d.tt.success + modifier = { + factor = 2 + scope:contract_lord = { has_trait = content } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = generous } + } + modifier = { factor = hold_court_8180_contract_value } # based on relative worth of contract + send_interface_toast = { + title = hold_court.8180.d.tt.success + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:vassal_title = { + change_title_holder = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:contract_lord = { hold_court_8180_grant_contract_effect = yes } + } + } + 7 = { + desc = hold_court.8180.b.tt.failure + modifier = { + factor = 2 + scope:contract_lord = { has_trait = greedy } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = ambitious } + } + modifier = { + factor = 2 + OR = { + scope:vassal_title.de_jure_liege.holder = root + scope:contract_lord.primary_title = { is_de_jure_liege_or_above_target = scope:vassal_title } + } + } + send_interface_toast = { + title = hold_court.8180.b.tt.failure + scope:contract_lord = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + } + } + } + stress_impact = { + generous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 2 + ai_compassion = -0.25 + ai_rationality = 1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + } + } + + option = { # Demand forced partition + name = hold_court.8180.e + trigger = { + scope:contract_lord = { vassal_contract_obligation_level_can_be_increased = succession_rights } + } + random_list = { + 3 = { + desc = hold_court.8180.e.tt.success + modifier = { + factor = 2 + scope:contract_lord = { has_trait = content } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = generous } + } + modifier = { factor = hold_court_8180_contract_value } # based on relative worth of contract + send_interface_toast = { + title = hold_court.8180.e.tt.success + scope:contract_lord = { + hold_court_8180_grant_contract_effect = yes + vassal_contract_set_obligation_level = { + type = succession_rights + level = 1 + } + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -5 + } + } + } + } + 6 = { + desc = hold_court.8180.b.tt.failure + modifier = { + factor = 2 + scope:contract_lord = { has_trait = greedy } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = ambitious } + } + modifier = { + factor = 2 + any_heir = { count > 1 } + } + send_interface_toast = { + title = hold_court.8180.b.tt.failure + scope:contract_lord = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + } + } + } + stress_impact = { + trusting = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = 1 + ai_compassion = -0.25 + ai_rationality = 1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + option = { # Demand contract change + name = hold_court.8180.f + trigger = { + scope:contract_lord = { has_variable = hc_8180_increase_var } + } + scope:contract_lord = { + hold_court_8180_grant_contract_effect = yes + if = { + limit = { var:hc_8180_increase_var = 1 } + vassal_contract_increase_obligation_level = feudal_government_taxes + } + else = { vassal_contract_increase_obligation_level = feudal_government_levies } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = 0.5 + ai_rationality = 0.5 + ai_boldness = -1 + } + } + } + + option = { # Dismiss vassal + name = hold_court.8180.g + scope:contract_lord = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -0.5 + ai_rationality = -0.25 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + after = { + scope:contract_lord = { + clear_court_event_participation = yes + if = { + limit = { has_variable = hc_8180_increase_var } + remove_variable = hc_8180_increase_var + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Enemy Within +# by Joe Parkin +# 8190 +################################################## + +# A vassal wants a foreigner vassal to convert +hold_court.8190 = { + type = court_event + title = hold_court.8190.t + desc = { + desc = hold_court.8190.desc.intro + random_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:other_vassal.culture = { has_same_culture_ethos = root.culture } + } + } + desc = hold_court.8190.desc.ethos + } + triggered_desc = { + trigger = { + NOT = { + scope:other_vassal.culture = { has_same_culture_heritage = root.culture } + } + } + desc = hold_court.8190.desc.heritage + } + triggered_desc = { + trigger = { + NOT = { + scope:other_vassal.culture = { has_same_culture_language = root.culture } + } + } + desc = hold_court.8190.desc.language + } + desc = hold_court.8190.desc.fallback + } + desc = hold_court.8190.desc.body + } + theme = court + lower_right_portrait = scope:other_vassal + court_scene = { + button_position_character = scope:aggressor_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:aggressor_vassal = { + group = petitioners_group + animation = rage + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { # Is there a vassal who is not root culture? + is_available_ai_adult = yes + culture != root.culture + save_temporary_scope_as = other_temp + } + any_vassal = { # Is there another vassal of root culture who is not humble and doesn't like the other one? + has_court_event_flag = no + is_available_ai_adult = yes + culture = root.culture + NOT = { has_trait = humble } + NOR = { + has_relation_friend = scope:other_temp + scope:other_temp = { + has_friendly_relationship_trigger = { CHARACTER = prev } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_vassal = { + limit = { + is_available_ai_adult = yes + culture != root.culture + } + weight = { + base = 1 + modifier = { # Victim is at least a count + factor = 2 + primary_title.tier > tier_barony + } + } + save_scope_as = other_vassal + } + random_vassal = { + limit = { + is_available_ai_adult = yes + culture = root.culture + NOT = { has_trait = humble } + NOR = { + has_relation_friend = scope:other_vassal + scope:other_vassal = { + has_friendly_relationship_trigger = { CHARACTER = prev } + } + } + } + weight = { + modifier = { # Aggressor is arrogant + factor = 4 + has_trait = arrogant + } + modifier = { # Aggressor is a meanie + factor = 2 + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = arbitrary + } + } + modifier = { # Aggressor is not a baron/mayor + factor = 2 + primary_title.tier > tier_barony + } + modifier = { # Aggressor borders the victim + factor = 2 + any_held_title = { + title_tier = county + any_neighboring_county = { holder = scope:other_vassal } + } + } + modifier = { # Aggressor has claim beef with victim + factor = 2 + any_claim = { + OR = { + holder = scope:other_vassal + de_jure_liege.holder = scope:other_vassal + de_facto_liege.holder = scope:other_vassal + } + } + } + modifier = { # Aggressor is a rival of the victim + factor = 4 + has_relation_rival = scope:other_vassal + } + modifier = { # Aggressor doesn't like the victim + factor = 2 + opinion = { + target = scope:other_vassal + value <= 0 + } + } + modifier = { # Aggressor is the same rank as the victim + factor = 2 + primary_title.tier = scope:other_vassal.primary_title.tier + } + modifier = { # Aggressor is a powerful vassal + factor = 2 + is_powerful_vassal = yes + } + } + save_scope_as = aggressor_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Demand culture adoption + name = hold_court.8190.a + add_dread = miniscule_dread_gain + scope:aggressor_vassal = { + culture = { + change_cultural_acceptance = { + target = scope:other_vassal.culture + value = -10 + desc = cultural_intolerance_tt + } + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + every_vassal = { + limit = { + culture != root.culture + } + custom = hold_court.8190.a.tt.vassals + add_opinion = { + target = root + modifier = hurt_opinion + opinion = -10 + } + } + if = { + limit = { + any_realm_county = { culture = scope:other_vassal.culture } + } + every_realm_county = { + limit = { culture = scope:other_vassal.culture } + custom = hold_court.8190.a.tt.promote + add_county_modifier = { + modifier = hold_court_8190_vassal_modifier + years = 15 + } + } + } + random_list = { + 40 = { + modifier = { + add = -20 + NOT = { + scope:other_vassal.culture = { has_same_culture_heritage = root.culture } + } + } + modifier = { + add = -20 + scope:other_vassal = { has_trait = stubborn } + } + show_chance = no + desc = hold_court.8190.a.tt_accept + send_interface_toast = { + title = hold_court.8190.a.tt_accept + left_icon = scope:other_vassal + save_scope_as = actor + scope:other_vassal = { save_scope_as = recipient } + add_prestige = minor_prestige_gain + new_culture_created_vassal_conversion_effect = { + CONVERTEE = scope:recipient + CONVERTER = scope:actor + CULTURE = scope:actor.culture + } + } + } + 60 = { + show_chance = no + desc = hold_court.8190.a.tt_refuse + send_interface_toast = { + title = hold_court.8190.a.tt_refuse + left_icon = scope:other_vassal + scope:other_vassal = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + stress_impact = { zealous = medium_stress_impact_gain } + } + } + } + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + } + } + + option = { # Cultural acceptance + name = hold_court.8190.b + duel = { + skill = diplomacy + target = scope:aggressor_vassal + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = hold_court.8190.b.tt_success + send_interface_toast = { + title = hold_court.8190.b.tt_success + left_icon = scope:aggressor_vassal + right_icon = scope:other_vassal + scope:aggressor_vassal.culture = { + change_cultural_acceptance = { + target = scope:other_vassal.culture + value = 10 + desc = cultural_benevolence_tt + } + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = hold_court.8190.b.tt_failure + send_interface_toast = { + title = hold_court.8190.b.tt_failure + add_prestige = medium_prestige_loss + } + } + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + scope:other_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + if = { + limit = { + any_vassal = { + culture = scope:other_vassal.culture + this != scope:other_vassal + } + } + every_vassal = { + limit = { + culture = scope:other_vassal.culture + this != scope:other_vassal + } + custom = hold_court.8190.b.tt.vassals + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + } + stress_impact = { + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arrogant + } + } + } + + option = { # Side with other vassal + name = hold_court.8190.c + trigger = { + NOT = { has_relation_rival = scope:other_vassal } + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + scope:other_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + progress_towards_friend_effect = { + REASON = friend_respected_foreign_culture + CHARACTER = root + OPINION = 0 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = shy + } + } + } + + option = { # All cultures are equal + name = hold_court.8190.d + change_current_court_grandeur = minor_court_grandeur_gain + every_vassal = { + limit = { + culture != root.culture + } + custom = hold_court.8190.a.tt.vassals + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -15 + } + } + if = { + limit = { + any_vassal = { + culture = root.culture + has_trait = arrogant + this != scope:aggressor_vassal + } + } + every_vassal = { + limit = { + culture = root.culture + has_trait = arrogant + this != scope:aggressor_vassal + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + } + } + + after = { + scope:aggressor_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Servant of God +# by Joe Parkin +# 8200 +################################################## + +scripted_trigger hold_court_8200_infidel_trigger = { + is_available_ai_adult = yes + faith != root.faith + NOR = { + AND = { # Eastern + religion = { is_in_family = rf_eastern } + root.faith = { has_doctrine = tenet_eastern_syncretism } + } + AND = { # Pagan + faith = { has_doctrine_parameter = unreformed } + root.faith = { has_doctrine = tenet_unreformed_syncretism } + } + AND = { # Christian + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + root.faith = { has_doctrine = tenet_christian_syncretism } + } + AND = { # Islam + religion = religion:islam_religion + root.faith = { has_doctrine = tenet_islamic_syncretism } + } + AND = { # Judaism + religion = religion:judaism_religion + root.faith = { has_doctrine = tenet_jewish_syncretism } + } + } + NAND = { + government_has_flag = government_is_theocracy + primary_title = { is_head_of_faith = yes } + any_held_title = { + count = 0 + title_tier < duchy + } + } +} + +# A vassal wants an infidel vassal to convert +hold_court.8200 = { + type = court_event + title = hold_court.8200.t + desc = { + desc = hold_court.8200.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:infidel_vassal = { # Victim is a religious head with no other titles + government_has_flag = government_is_theocracy + primary_title = { is_head_of_faith = yes } + } + } + desc = hold_court.8200.desc.pope + } + desc = hold_court.8200.desc.vassal + } + desc = hold_court.8200.desc.body + } + theme = court + lower_right_portrait = scope:infidel_vassal + court_scene = { + button_position_character = scope:aggressor_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:aggressor_vassal = { + group = petitioners_group + animation = rage + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + NOT = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + any_vassal = { # Is there a vassal who is not root faith? + hold_court_8200_infidel_trigger = yes + save_temporary_scope_as = other_temp + } + any_vassal = { # Is there another vassal of root faith who is not cynical and doesn't like the other one? + has_court_event_flag = no + is_available_ai_adult = yes + faith = root.faith + NOT = { has_trait = cynical } + NOR = { + has_relation_friend = scope:other_temp + scope:other_temp = { + has_friendly_relationship_trigger = { CHARACTER = prev } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_vassal = { + limit = { hold_court_8200_infidel_trigger = yes } + weight = { + modifier = { + factor = 2 + primary_title.tier > tier_barony + } + } + save_scope_as = infidel_vassal + } + random_vassal = { + limit = { + is_available_ai_adult = yes + faith = root.faith + NOR = { + has_relation_friend = scope:infidel_vassal + scope:infidel_vassal = { + has_friendly_relationship_trigger = { CHARACTER = prev } + } + } + } + weight = { + modifier = { # Aggressor is zealous + factor = 4 + has_trait = zealous + } + modifier = { # Aggressor is a meanie + factor = 2 + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = arbitrary + } + } + modifier = { # Aggressor is not a baron/mayor + factor = 2 + primary_title.tier > tier_barony + } + modifier = { # Aggressor borders the victim + factor = 2 + any_held_title = { + title_tier = county + any_neighboring_county = { holder = scope:infidel_vassal } + } + } + modifier = { # Aggressor has claim beef with victim + factor = 2 + any_claim = { + OR = { + holder = scope:infidel_vassal + de_jure_liege.holder = scope:infidel_vassal + de_facto_liege.holder = scope:infidel_vassal + } + } + } + modifier = { # Aggressor is a rival of the victim + factor = 4 + has_relation_rival = scope:infidel_vassal + } + modifier = { # Aggressor doesn't like the victim + factor = 2 + opinion = { + target = scope:infidel_vassal + value <= 0 + } + } + modifier = { # Aggressor is the same rank as the victim + factor = 2 + primary_title.tier = scope:infidel_vassal.primary_title.tier + } + modifier = { # Aggressor is a powerful vassal + factor = 2 + is_powerful_vassal = yes + } + } + save_scope_as = aggressor_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Demand the vassal's conversion + name = hold_court.8200.a + add_dread = miniscule_dread_gain + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + every_vassal = { + limit = { + NOR = { + faith = root.faith + this = scope:infidel_vassal + } + } + custom = hold_court.8200.a.tt.vassals + add_opinion = { + target = root + modifier = hurt_opinion + opinion = -10 + } + } + if = { + limit = { + any_realm_county = { faith = scope:infidel_vassal.faith } + } + every_realm_county = { + limit = { faith = scope:infidel_vassal.faith } + custom = hold_court.8200.a.tt.convert + add_county_modifier = { + modifier = hold_court_8200_vassal_modifier + years = 15 + } + } + } + random_list = { + 40 = { + modifier = { + add = -20 + scope:infidel_vassal.religion != root.religion + } + modifier = { + add = -20 + scope:infidel_vassal = { has_trait = zealous } + } + show_chance = no + desc = hold_court.8200.a.tt_accept + send_interface_toast = { + title = hold_court.8200.a.tt_accept + left_icon = scope:infidel_vassal + add_piety = medium_piety_gain + save_scope_as = actor + scope:infidel_vassal = { save_scope_as = recipient } + demand_conversion_interaction_effect = yes + } + } + 60 = { + show_chance = no + desc = hold_court.8200.a.tt_refuse + send_interface_toast = { + title = hold_court.8200.a.tt_refuse + left_icon = scope:infidel_vassal + if = { + limit = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:infidel_vassal + } + } + add_opinion = { + modifier = illegal_resisted_conversion_opinion + target = scope:infidel_vassal + } + } + scope:infidel_vassal = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + stress_impact = { zealous = medium_stress_impact_gain } + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -2 + ai_zeal = 2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + } + } + + option = { # Adopt heretic's faith + name = hold_court.8200.c + trigger = { + NOT = { has_trait = zealous } + } + if = { + limit = { religion = scope:infidel_vassal.religion } + add_piety = medium_piety_loss + } + else = { add_piety = major_piety_loss } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -40 + } + } + scope:infidel_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + every_vassal = { + limit = { + faith = scope:infidel_vassal.faith + this != scope:infidel_vassal + } + custom = hold_court.8200.c.tt.vassals + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + } + set_character_faith_with_conversion = scope:infidel_vassal.faith + stress_impact = { + zealous = massive_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = 2 + ai_zeal = -4 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -60 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = cynical + } + } + } + + option = { # Side with the heretic + name = hold_court.8200.d + trigger = { + NOT = { has_relation_rival = scope:infidel_vassal } + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + scope:infidel_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + progress_towards_friend_effect = { + REASON = friend_respected_other_religion + CHARACTER = root + OPINION = 0 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_zeal = -2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = shy + } + } + } + + option = { # Dismiss zealotry + name = hold_court.8200.e + trigger = { + NOT = { has_trait = zealous } + } + change_current_court_grandeur = minor_court_grandeur_gain + every_vassal = { + limit = { + faith != root.faith + } + custom = hold_court.8200.a.tt.vassals + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -15 + } + } + if = { + limit = { + any_vassal = { + faith = root.faith + has_trait = zealous + this != scope:aggressor_vassal + } + } + every_vassal = { + limit = { + faith = root.faith + has_trait = zealous + this != scope:aggressor_vassal + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = -2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = zealous + } + } + } + + after = { + scope:aggressor_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Rightful Lands +# by Joe Parkin +# 8210 - 211 +################################################## + +scripted_trigger hold_court_8210_claim_trigger = { + tier = tier_county + is_landless_type_title = no + NOT = { this = root.capital_county } + holder = { + NOT = { this = $VASSAL$ } + OR = { + AND = { + this = root + root = { + any_held_title = { + count > 1 + tier = tier_county + is_landless_type_title = no + } + } + } + is_vassal_of = root + } + NOR = { + has_friendly_relationship_trigger = { CHARACTER = $VASSAL$ } + is_parent_of = $VASSAL$ + is_spouse_of = $VASSAL$ + } + } +} + +scripted_trigger hold_court_8210_vassal_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + NOT = { has_trait = content } + is_at_war = no + NOT = { is_close_family_of = root } + save_temporary_scope_as = vassal_temp + OR = { + any_de_jure_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:vassal_temp } + } + any_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:vassal_temp } + } + any_held_title = { + title_tier = county + any_neighboring_county = { + holder = { + this = root + NOR = { + has_friendly_relationship_trigger = { CHARACTER = scope:vassal_temp } + is_parent_of = scope:vassal_temp + is_spouse_of = scope:vassal_temp + } + } + } + } + } +} + +scripted_effect hold_court_8211_duel_win_effect = { + if = { + limit = { + NOR = { + this = root + scope:defender_vassal = root + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } +} + +scripted_effect hold_court_8211_duel_lose_effect = { + if = { + limit = { + this != root + } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } +} + +# A vassal wants a dejure or claimed county from another vassal +hold_court.8210 = { + type = court_event + title = hold_court.8210.t + desc = { + desc = hold_court.8210.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:aggressor_vassal = { + any_de_jure_claim = { this = scope:vassal_claim } + } + } + desc = hold_court.8210.desc.de_jure + } + triggered_desc = { + trigger = { + scope:aggressor_vassal = { has_strong_claim_on = scope:vassal_claim } + } + desc = hold_court.8210.desc.strong + } + desc = hold_court.8210.desc.weak + } + first_valid = { + triggered_desc = { + trigger = { scope:defender_vassal = root } + desc = hold_court.8210.desc.self + } + desc = hold_court.8210.desc.other + } + } + theme = court + lower_right_portrait = scope:defender_vassal + court_scene = { + button_position_character = scope:aggressor_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:aggressor_vassal = { + group = petitioners_group + animation = disapproval + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { hold_court_8210_vassal_trigger = yes } # Is there a vassal with a de jure claim on a title held by another vassal? + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_vassal = { + limit = { hold_court_8210_vassal_trigger = yes } + weight = { + modifier = { + factor = 4 + primary_title.tier > tier_barony + } + modifier = { # Aggressor is a meanie + factor = 2 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + modifier = { # Aggressor is a coward + factor = 2 + has_trait = craven + } + modifier = { # Aggressor is a powerful vassal + factor = 2 + is_powerful_vassal = yes + } + modifier = { + factor = 10 + any_de_jure_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:vassal_temp } + } + } + modifier = { + factor = 5 + any_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:vassal_temp } + } + } + } + save_scope_as = aggressor_vassal + court_event_character_flag_effect = yes + if = { + limit = { + any_de_jure_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:aggressor_vassal } + } + } + random_de_jure_claim = { + limit = { + hold_court_8210_claim_trigger = { VASSAL = scope:aggressor_vassal } + } + weight = { + modifier = { + factor = 4 + any_neighboring_county = { holder = scope:aggressor_vassal } + } + modifier = { + factor = 2 + de_jure_liege.tier = tier_duchy + } + modifier = { + factor = 2 + holder.max_military_strength > scope:aggressor_vassal.max_military_strength + } + modifier = { # More relevant if war declaration is limited + factor = 2 + root = { + OR = { + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 + } + } + } + modifier = { + factor = 2 + scope:aggressor_vassal = { has_strong_claim_on = prev } + } + modifier = { + factor = 4 + holder = { has_relation_rival = scope:aggressor_vassal } + } + modifier = { + factor = 4 + holder = { + reverse_opinion = { + target = scope:aggressor_vassal + value <= 0 + } + } + } + } + save_scope_as = vassal_claim + holder = { save_scope_as = defender_vassal } + } + } + else_if = { + limit = { + any_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:aggressor_vassal } + } + } + random_claim = { + limit = { + hold_court_8210_claim_trigger = { VASSAL = scope:aggressor_vassal } + } + weight = { + modifier = { + factor = 4 + any_neighboring_county = { holder = scope:aggressor_vassal } + } + modifier = { + factor = 2 + de_jure_liege.tier = tier_duchy + } + modifier = { + factor = 2 + holder.max_military_strength > scope:aggressor_vassal.max_military_strength + } + modifier = { # More relevant if war declaration is limited + factor = 2 + root = { + OR = { + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 + } + } + } + modifier = { + factor = 2 + scope:aggressor_vassal = { has_strong_claim_on = prev } + } + } + save_scope_as = vassal_claim + holder = { save_scope_as = defender_vassal } + } + } + else = { + random_held_title = { + title_tier = county + limit = { + any_neighboring_county = { + NOT = { this = root.capital_county } + holder = { + this = root + NOR = { + has_friendly_relationship_trigger = { CHARACTER = scope:aggressor_vassal } + is_parent_of = scope:aggressor_vassal + is_spouse_of = scope:aggressor_vassal + } + } + } + } + random_neighboring_county = { + limit = { + NOT = { this = root.capital_county } + holder = { + this = root + NOR = { + has_friendly_relationship_trigger = { CHARACTER = scope:aggressor_vassal } + is_parent_of = scope:aggressor_vassal + is_spouse_of = scope:aggressor_vassal + } + } + } + save_scope_as = vassal_claim + holder = { save_scope_as = defender_vassal } + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Support claimant + name = hold_court.8210.a + trigger = { + trigger_if = { + limit = { + scope:aggressor_vassal = { + NOR = { + any_de_jure_claim = { this = scope:vassal_claim } + has_claim_on = scope:vassal_claim + } + } + } + scope:defender_vassal != root + } + } + if = { + limit = { scope:defender_vassal = root } + } + else_if = { + limit = { + scope:aggressor_vassal = { + NOR = { + any_de_jure_claim = { this = scope:vassal_claim } + has_strong_claim_on = scope:vassal_claim + } + } + } + add_tyranny = major_tyranny_gain + } + else = { add_tyranny = minor_tyranny_gain } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:vassal_claim = { + change_title_holder = { + holder = scope:aggressor_vassal + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + if = { + limit = { scope:defender_vassal = root } + stress_impact = { + greedy = medium_stress_impact_gain + } + } + else = { + scope:defender_vassal = { + progress_towards_rival_effect = { + CHARACTER = scope:aggressor_vassal + REASON = rival_claimant_fight + OPINION = 0 + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + stress_impact = { + just = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight up for relatives. + add = 2 + scope:aggressor_vassal = { is_close_family_of = root } + NOT = { + scope:defender_vassal = { is_close_family_of = root } + } + } + } + } + + option = { # Start vassal war + name = hold_court.8210.b + trigger = { + is_valid_for_east_asian_events_trigger = no + NOT = { + faith = { has_doctrine = tenet_pacifism } + } + NOR = { + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 + } + scope:defender_vassal != root + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + add_character_flag = temp_no_claim_war_cost + start_war = { + cb = claim_cb + target = scope:vassal_claim.holder + claimant = scope:aggressor_vassal + target_title = scope:vassal_claim + } + remove_character_flag = temp_no_claim_war_cost + } + scope:defender_vassal = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = craven + } + modifier = { + add = 30 + culture = { has_cultural_pillar = ethos_bellicose } + } + } + } + + option = { # Start vassal duel + name = { + trigger = { + scope:defender_vassal != root + } + text = hold_court.8210.f.other + } + name = { + trigger = { always = yes } + text = hold_court.8210.f.self + } + trigger = { + is_valid_for_east_asian_events_trigger = no + scope:defender_vassal = { is_adult = yes } + } + custom_tooltip = hold_court.8210.duel_tt + show_as_tooltip = { + random_list = { + 10 = { + show_chance = no + desc = hold_court.8210.b.tt_aggressor + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:vassal_claim = { + change_title_holder = { + holder = scope:aggressor_vassal + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:aggressor_vassal = { hold_court_8211_duel_win_effect = yes } + scope:defender_vassal = { hold_court_8211_duel_lose_effect = yes } + } + 10 = { + show_chance = no + desc = hold_court.8210.b.tt_defender + scope:defender_vassal = { hold_court_8211_duel_win_effect = yes } + scope:aggressor_vassal = { hold_court_8211_duel_lose_effect = yes } + } + } + } + configure_start_single_combat_effect = { + SC_INITIATOR = scope:aggressor_vassal + SC_ATTACKER = scope:aggressor_vassal + SC_DEFENDER = scope:defender_vassal + FATALITY = no + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = hold_court.8211 + INVALIDATION_EVENT = fp1_tbc.0102 + } + stress_impact = { + lifestyle_blademaster = medium_stress_impact_loss + viking = medium_stress_impact_loss + varangian = medium_stress_impact_loss + berserker = medium_stress_impact_loss + brave = medium_stress_impact_loss + } + stress_impact = { + compassionate = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = craven + } + modifier = { + add = 30 + OR = { + culture = { has_cultural_tradition = tradition_martial_admiration } + culture = { has_cultural_tradition = tradition_chivalry } + culture = { has_cultural_tradition = tradition_futuwaa } + has_trait = gallant + has_perk = stalwart_leader_perk + } + } + } + } + + option = { # Support defender + name = { + trigger = { + NOR = { + scope:aggressor_vassal = { + any_de_jure_claim = { this = scope:vassal_claim } + } + scope:aggressor_vassal = { has_claim_on = scope:vassal_claim } + } + } + text = hold_court.8210.c.none + } + name = { + trigger = { scope:defender_vassal = root } + text = hold_court.8210.c.self + } + name = { + trigger = { + scope:defender_vassal != root + } + text = hold_court.8210.c.other + } + scope:aggressor_vassal = { + if = { + limit = { + NOT = { + any_de_jure_claim = { this = scope:vassal_claim } + } + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + if = { + limit = { has_strong_claim_on = scope:vassal_claim } + make_claim_weak = scope:vassal_claim + } + else = { remove_claim = scope:vassal_claim } + } + else = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -15 + } + } + } + if = { + limit = { + scope:defender_vassal != root + } + scope:defender_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + progress_towards_friend_effect = { + REASON = friend_took_side_in_dispute + CHARACTER = root + OPINION = 0 + } + } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + } + } + + option = { # Change liege + name = hold_court.8210.e + trigger = { + scope:defender_vassal != root + scope:aggressor_vassal = { + any_de_jure_claim = { this = scope:vassal_claim } + } + scope:defender_vassal.primary_title.tier < scope:aggressor_vassal.primary_title.tier + } + create_title_and_vassal_change = { + type = created + save_scope_as = change + add_claim_on_loss = no + } + scope:defender_vassal = { + change_liege = { + liege = scope:aggressor_vassal + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + scope:defender_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + } + } + + option = { # Not my problem + name = hold_court.8210.d + trigger = { + scope:defender_vassal != root + } + add_prestige = minor_prestige_gain + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + scope:defender_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -2 + ai_honor = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + } + } + + after = { + scope:aggressor_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.8211 = { + hidden = yes + + immediate = { + scope:aggressor_vassal.liege = { + send_interface_toast = { + title = hold_court.8031.t + left_icon = scope:sc_victor + right_icon = scope:sc_loser + scope:sc_victor = { + if = { + limit = { + this != scope:vassal_claim.holder + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:vassal_claim = { + change_title_holder = { + holder = scope:sc_victor + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + if = { + limit = { + liege != root + } + hold_court_8211_duel_win_effect = yes + } + } + scope:sc_loser = { + if = { + limit = { + NOR = { + liege = root + this = root + } + } + hold_court_8211_duel_lose_effect = yes + } + } + } + } + } +} + +################################################## +# The King's Peace +# by Joe Parkin +# 8260 +################################################## + +scripted_trigger hold_court_8260_faction_trigger = { + exists = yes + OR = { + faction_is_type = liberty_faction + faction_is_type = claimant_faction + } + OR = { + faction_power >= faction_power_threshold + faction_is_at_war = yes + } + trigger_if = { + limit = { exists = special_character } + special_character != root + } +} + +hold_court.8260 = { + type = court_event + title = hold_court.8260.t + desc = { + desc = hold_court.8260.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:vassal_faction.special_character + scope:vassal_faction.faction_leader = scope:vassal_faction.special_character + scope:vassal_faction = { faction_is_type = claimant_faction } + } + desc = hold_court.8220.desc.claimant_self + } + triggered_desc = { + trigger = { + scope:vassal_faction = { faction_is_type = claimant_faction } + } + desc = hold_court.8220.desc.claimant + } + triggered_desc = { + trigger = { always = yes } + desc = hold_court.8220.desc.liberty + } + } + desc = hold_court.8260.desc.body + } + theme = court + override_background = { reference = throne_room } + cooldown = { years = 10 } + lower_center_portrait = { + character = scope:vassal_faction.special_character + trigger = { + scope:vassal_faction = { + exists = special_character + special_character != faction_leader + } + } + } + lower_right_portrait = scope:vassal_faction.faction_leader + + court_scene = { + button_position_character = scope:vassal_faction.faction_target + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:vassal_faction_target = { + group = petitioners_group + animation = anger + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + trigger = { + any_vassal = { + has_court_event_flag = no + is_available_ai_adult = yes + any_targeting_faction = { target_of_powerful_faction_trigger = yes } + } + } + + immediate = { + random_vassal = { + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + any_targeting_faction = { target_of_powerful_faction_trigger = yes } + } + weight = { + base = 1 + modifier = { + factor = 4 + any_targeting_faction = { faction_can_press_demands = yes } + } + modifier = { + factor = 4 + any_targeting_faction = { + faction_type = claimant_faction + special_title ?= prev.primary_title + } + } + modifier = { + factor = 8 + is_close_family_of = root + } + modifier = { + factor = 2 + this = root.primary_heir + } + modifier = { + factor = 0.5 + primary_title.tier < tier_duchy + } + } + save_scope_as = vassal_faction_target + court_event_character_flag_effect = yes + ordered_targeting_faction = { + limit = { + target_of_powerful_faction_trigger = yes + faction_can_press_demands = yes + } + alternative_limit = { + target_of_powerful_faction_trigger = yes + faction_is_at_war = yes + } + alternative_limit = { target_of_powerful_faction_trigger = yes } + order_by = faction_discontent + save_scope_as = vassal_faction + faction_leader = { save_scope_as = vassal_faction_leader } # For loc + if = { + limit = { exists = special_character } + special_character = { save_scope_as = vassal_claimant } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Break up the faction/force surrender + name = { + trigger = { + scope:vassal_faction = { faction_is_at_war = yes } + } + text = hold_court.8260.a.war + } + name = { + trigger = { always = yes } + text = hold_court.8260.a.peace + } + scope:vassal_faction = { + faction_target = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + if = { + limit = { + exists = special_character + NOT = { + any_faction_member = { this = scope:vassal_faction.special_character } + } + } + special_character = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + } + if = { + limit = { faction_is_at_war = no } + every_faction_member = { + custom = hold_court_8260_faction_member_tt + add_faction_cooldown_effect = { YEARS = faction_war_white_peace_cooldown } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + destroy_faction = yes + } + else = { + every_faction_member = { + custom = hold_court_8260_faction_member_tt + add_faction_cooldown_effect = { YEARS = faction_war_defeat_cooldown } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -25 + } + } + faction_war = { end_war = defender } + } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_energy = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + modifier = { #Weight up for family + add = 25 + scope:vassal_faction.faction_target = { is_close_family_of = root } + } + modifier = { #Weight up for relatives + add = 25 + scope:vassal_faction.faction_target = { is_close_or_extended_family_of = root } + } + } + } + + option = { # Imprison faction leader + name = hold_court.8260.b + add_dread = minor_dread_gain + scope:vassal_faction.faction_target = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + imprison_character_effect = { + TARGET = scope:vassal_faction.faction_leader + IMPRISONER = root + } + scope:vassal_faction = { + if = { + limit = { + exists = special_character + faction_leader != special_character + } + special_character = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + every_faction_member = { + limit = { is_a_faction_leader = no } + custom = hold_court_8260_faction_member_tt + add_faction_cooldown_effect = { YEARS = faction_war_defeat_cooldown } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + scope:vassal_faction = { + if = { + limit = { faction_is_at_war = no } + destroy_faction = yes + } + else = { + faction_war = { end_war = defender } + } + } + } + stress_impact = { + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -2 + ai_boldness = 1 + ai_vengefulness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = forgiving + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + } + } + + option = { # End war white peace + name = hold_court.8260.c + trigger = { + scope:vassal_faction = { faction_is_at_war = yes } + } + scope:vassal_faction = { + scope:vassal_faction.faction_target = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 5 + } + } + if = { + limit = { + exists = special_character + faction_leader != special_character + } + special_character = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + } + every_faction_member = { + limit = { is_a_faction_leader = no } + custom = hold_court_8260_faction_member_tt + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + faction_war = { end_war = white_peace } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 2 + ai_compassion = 1 + ai_boldness = 1 + ai_vengefulness = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + } + } + + option = { # Make vassal surrender + name = hold_court.8260.d + add_tyranny = minor_tyranny_gain + scope:vassal_faction = { + faction_target = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + faction_leader = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + if = { + limit = { + exists = special_character + faction_leader != special_character + } + special_character = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + every_faction_member = { + limit = { is_a_faction_leader = no } + custom = hold_court_8260_faction_member_tt + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + if = { + limit = { faction_is_at_war = no } + if = { + limit = { faction_is_type = claimant_faction } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + special_title = { + change_title_holder_include_vassals = { + holder = scope:vassal_faction.special_character + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + else = { + faction_target = { decrease_crown_authority_effect = yes } + } + } + else = { + faction_war = { end_war = attacker } + } + hidden_effect = { + if = { + limit = {exists = scope:vassal_faction } + destroy_faction = yes + } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -2 + ai_compassion = -1 + ai_boldness = 1 + ai_vengefulness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for family + add = -25 + scope:vassal_faction.faction_target = { is_close_family_of = root } + } + modifier = { #Weight down for relatives + add = -25 + scope:vassal_faction.faction_target = { is_close_or_extended_family_of = root } + } + } + } + + option = { # Refuse + name = hold_court.8260.e + scope:vassal_faction = { + faction_target = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + every_faction_member = { + custom = hold_court_8260_faction_member_tt + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + ai_boldness = -1 + ai_vengefulness = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + } + } + + after = { + scope:vassal_faction_target = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Oath of Fealty +# by Joe Parkin +# 8270 +################################################## + +scripted_trigger hold_court_8270_neighbor_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + top_liege = this + primary_title.tier < root.primary_title.tier + primary_title.tier <= tier_duchy + NOT = { has_relation_rival = root } + opinion = { + target = root + value >= -25 + } + NOT = { + faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + any_neighboring_top_liege_realm_owner = { + count >= 2 + primary_title.tier >= prev.primary_title.tier + NOT = { is_allied_to = prev } + max_military_strength > prev.max_military_strength + } + calc_true_if = { + amount >= 2 + primary_title = { # is a de jure vassal + any_this_title_or_de_jure_above = { + this != prev + holder = root + } + } + OR = { # cultural acceptance is good + culture = root.culture + culture = { + cultural_acceptance = { target = root.culture value >= 50 } + } + } + primary_title.tier = tier_county + } +} + +hold_court.8270 = { + type = court_event + title = hold_court.8270.t + desc = hold_court.8270.desc + theme = court + override_background = { reference = throne_room } + cooldown = { years = 15 } + + court_scene = { + button_position_character = scope:neighbor + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:neighbor = { + group = petitioners_group + animation = admiration + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_neighboring_top_liege_realm_owner = { hold_court_8270_neighbor_trigger = yes } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_neighboring_top_liege_realm_owner = { + limit = { hold_court_8270_neighbor_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 4 + is_close_or_extended_family_of = root + } + modifier = { + factor = 10 + primary_title.tier = tier_county + } + modifier = { + factor = 4 + faith = root.faith + } + modifier = { + factor = 2 + religion = root.religion + } + modifier = { + factor = 2 + culture = root.culture + } + modifier = { + factor = 4 + opinion = { + target = root + value >= 50 + } + } + modifier = { + factor = 4 + any_neighboring_top_liege_realm_owner = { + this != root + primary_title.tier >= tier_kingdom + OR = { + AND = { + prev.faith = root.faith + faith != prev.faith + } + AND = { + prev.religion = root.religion + religion != prev.religion + } + AND = { + prev.culture = root.culture + culture != prev.culture + } + } + } + } + } + save_scope_as = neighbor + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Accept + name = hold_court.8270.a + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + scope:neighbor = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:neighbor = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + # Feudal vassals get contracts. + if = { + limit = { government_has_flag = government_is_feudal } + hidden_effect = { + if = { + limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) + vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 1 } + vassal_contract_set_obligation_level = { type = feudal_government_levies level = 1 } + } + } + custom_tooltip = low_obligations_taxes + custom_tooltip = low_obligations_levies + } + } + stress_impact = { + greedy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 2 + ai_greed = -2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = paranoid + } + } + } + + option = { # Demand better deal + name = hold_court.8270.b + random_list = { + 2 = { + show_chance = no + desc = hold_court.8270.b.accept + modifier = { + factor = 2 + scope:neighbor = { has_trait = craven } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = fickle } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = content } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = humble } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = wrathful } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = vengeful } + } + send_interface_toast = { + title = hold_court.8270.b.accept + left_icon = scope:neighbor + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + scope:neighbor = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + custom_tooltip = normal_obligations_taxes + custom_tooltip = normal_obligations_levies + } + } + 4 = { + show_chance = no + desc = hold_court.8270.b.refuse + modifier = { + factor = 2 + scope:neighbor = { has_trait = brave } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = stubborn } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = ambitious } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = arrogant } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = patient } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = forgiving } + } + change_current_court_grandeur = medium_court_grandeur_loss + send_interface_toast = { + title = hold_court.8270.b.refuse + left_icon = scope:neighbor + scope:neighbor = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + } + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_greed = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + } + } + + option = { # Refuse + name = hold_court.8270.d + change_current_court_grandeur = minor_court_grandeur_gain + scope:neighbor = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + stress_impact = { + honest = medium_stress_impact_gain + trusting = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_rationality = -2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = honest + } + modifier = { #Weight down for stress. + add = -15 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -15 + has_trait = fickle + } + } + } + + after = { + scope:neighbor = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Nomadic Neighbors +# by Joe Parkin +# 8280 +################################################## + +scripted_trigger nomadic_cultural_traditions_trigger = { + culture = { + OR = { + has_cultural_tradition = tradition_horse_lords + has_cultural_tradition = tradition_pastoralists + } + } +} + +scripted_trigger hold_court_8280_nomad_county_trigger = { + nomadic_cultural_traditions_trigger = yes + holder = { + government_has_flag = government_is_tribal + this != root + nomadic_cultural_traditions_trigger = yes + trigger_if = { + limit = { top_liege = root } + is_available_ai_adult = yes + } + } +} + +scripted_trigger hold_court_8280_feudal_county_trigger = { + nomadic_cultural_traditions_trigger = no + holder = { + has_court_event_flag = no + is_available_ai_adult = yes + nomadic_cultural_traditions_trigger = no + this != root + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + } + } + any_neighboring_county = { hold_court_8280_nomad_county_trigger = yes } +} + +hold_court.8280 = { + type = court_event + title = hold_court.8280.t + desc = { + first_valid = { # + triggered_desc = { + trigger = { + scope:nomad.top_liege != root + } + desc = hold_court.8280.desc.foreign + } + triggered_desc = { + trigger = { always = yes } + desc = hold_court.8280.desc.local + } + } + } + theme = court + override_background = { reference = throne_room } + cooldown = { years = 15 } + lower_right_portrait = { + character = scope:nomad.top_liege + trigger = { + scope:nomad.top_liege != root + } + } + + court_scene = { + button_position_character = scope:feudal_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:feudal_vassal = { + group = petitioners_group + animation = worry + } + scope:nomad_same_liege = { + group = petitioners_group + animation = dismissal + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + nomadic_cultural_traditions_trigger = no + any_realm_county = { hold_court_8280_feudal_county_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_realm_county = { + limit = { + holder = { is_vassal_of = root } + hold_court_8280_feudal_county_trigger = yes + } + alternative_limit = { hold_court_8280_feudal_county_trigger = yes } + holder = { + save_scope_as = feudal_vassal + court_event_character_flag_effect = yes + } + save_scope_as = feudal_county + ordered_neighboring_county = { + limit = { + holder.top_liege = { + this != root + government_has_flag = government_is_tribal + culture = { has_cultural_tradition = tradition_horse_lords } + } + hold_court_8280_nomad_county_trigger = yes + } + alternative_limit = { + holder.top_liege != root + hold_court_8280_nomad_county_trigger = yes + } + alternative_limit = { hold_court_8280_nomad_county_trigger = yes } + order_by = { + value = 0 + subtract = development_level + } + save_scope_as = nomad_county + culture = { save_scope_as = nomad_culture } + holder = { save_scope_as = nomad } + # Set up portrait groups. + scope:nomad = { + if = { + limit = { top_liege = root } + save_scope_as = nomad_same_liege + court_event_character_flag_effect = yes + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Kick nomads out + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= minor_treasury_or_gold_value + } + } + name = { + trigger = { scope:nomad.top_liege = root } + text = hold_court.8280.a.local + } + name = { + trigger = { always = yes } + text = hold_court.8280.a.foreign + } + add_prestige = medium_prestige_gain + remove_treasury_or_gold = tiny_treasury_or_gold_value + scope:feudal_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + scope:nomad = { + if = { + limit = { + top_liege != root + } + top_liege = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + } + else = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + culture = { + if = { + limit = { + this != root.culture + } + change_cultural_acceptance = { + target = root.culture + value = -10 + desc = cultural_intolerance_tt + } + } + } + } + if = { + limit = { + scope:feudal_vassal.culture != root.culture + } + + scope:feudal_vassal.culture = { + if = { + limit = { + this != scope:nomad_culture + } + change_cultural_acceptance = { + target = scope:nomad_culture + value = -10 + desc = cultural_intolerance_tt + } + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + option = { # Recruit them + name = hold_court.8280.b + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= massive_treasury_or_gold_value + } + } + remove_treasury_or_gold = major_treasury_or_gold_value + culture = { + if = { + limit = { + this != scope:nomad_culture + } + change_cultural_acceptance = { + target = scope:nomad.culture + value = 10 + desc = cultural_intolerance_tt + } + } + } + scope:feudal_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + scope:nomad = { + if = { + limit = { + top_liege != root + } + top_liege = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + else = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + add_character_modifier = { + modifier = hold_court_8280_nomadic_guard + years = 5 + } + if = { + limit = { + culture != scope:nomad_culture + } + stress_impact = { + paranoid = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_energy = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + culture != scope:nomad_culture + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -15 + culture != scope:nomad_culture + has_trait = arrogant + } + } + } + + option = { # Dismiss + name = hold_court.8280.c + scope:feudal_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + scope:nomad = { + if = { + limit = { top_liege = root } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + scope:feudal_county = { set_county_culture = scope:nomad_culture } + culture = { + if = { + limit = { + this != scope:nomad_culture + } + change_cultural_acceptance = { + target = scope:nomad_culture + value = 5 + desc = cultural_intolerance_tt + } + } + } + if = { + limit = { + culture != scope:nomad_culture + } + stress_impact = { + diligent = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + stress_impact = { + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_energy = 1 + ai_honor = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + culture != scope:nomad_culture + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -15 + culture != scope:nomad_culture + has_trait = paranoid + } + } + } + + after = { + scope:feudal_vassal = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:nomad_same_liege } + scope:nomad_same_liege = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} diff --git a/N3OW/events/activities/pilgrimage_activity/pilgrimage_events.txt b/N3OW/events/activities/pilgrimage_activity/pilgrimage_events.txt new file mode 100644 index 00000000..ad3ccce3 --- /dev/null +++ b/N3OW/events/activities/pilgrimage_activity/pilgrimage_events.txt @@ -0,0 +1,14839 @@ +# Events for Pilgrimages + +namespace = pilgrimage + +################################################################################################################################ +## Pilgrimage Activity System Events +## 0040-0100 +## by Filippa Gannholm Kirsten +################################ +# pilgrimage.0040 - Invalidation +# pilgrimage.0042 - Invalidation because you bury old host back home +# pilgrimage.0500 - Promise your dying religious relative to go on a Pilgrimage +# +############################ +## Generic Journey Events +## 1001-2100 + 6001-6010 +## by Petter Vilberg & Filippa Gannholm Kirsten & Joe Parkin +############################ +# pilgrimage.1100 - Sea: Saint Elmo's Fire +# pilgrimage.1110 - Heathen Raiders +# pilgrimage.1120 - Tour Church +# pilgrimage.1130 - Roadside Shrine +# pilgrimage.1140 - Strength in Numbers +# pilgrimage.2002 - Heathen-hating adherent challenges you +# pilgrimage.2003 - Hire more guards? +# pilgrimage.2004 - Run into a potential friend +# pilgrimage.2005 - A peasant inadvertedly insults you +# pilgrimage.2006 - Your pilgrimage is taking a little detour +# pilgrimage.2008 - Fall ill +# pilgrimage.2009 - Develop pneumonia +# pilgrimage.2010-5 - Meet a Mystic +# pilgrimage.2020-21 - Pilgrimage thieves +# pilgrimage.2030 - Sea: Massive rainbow +# pilgrimage.2040 - Sea: Go fish +# pilgrimage.2050 - Sea: Shipwrecked pilgrims +# +############################ +## 'Temptation' Events +## 2101-2999 +## by Bianca Savazzi & Sean Hughes +############################ +# pilgrimage.2101 - Rakish or Lustful character considers making a pit stop, or perhaps, a detour to the local brothels +# pilgrimage.2501-4 - Persistent Beggar +# pilgrimage.2511 - Cocky Lordling +# +################################ +# Religion-specific Journey Events +# 3001-3999 +# by Sean Hughes +################################ +## 3001-3100: Christianity +# pilgrimage.3001 - Zealous priest giving sermon in freezing rains +# pilgrimage.3002-3 - Naked preacher claiming to have reclaimed the lost innocence of Adam & Eve +# pilgrimage.3004 - Doomsayer claiming the end is nigh! +# +## 3101-3200: Islam +# pilgrimage.3102 - Ziyarat - Why am I taking this pilgrimage? +# +## 3201-3300: Hinduism +# pilgrimage.3201 - Ritual purification in a river +# pilgrimage.3202 - Contemplating the universe +# +## 3301-3400: Buddhism +# pilgrimage.3301 - Critical Wanderer +# pilgrimage.3302 - The Wisdom of Goats +# pilgrimage.3303 - Kalama Sutta +# +## 3401-3500: Dharmic +# pilgrimage.3401 - Brahmacharya Challenged +# +############################ +## DLC Events +## by Chad Uhl +############################ +## 6001-6010: BP1 +# pilgrimage.6001-4 - Sneaking off to a tavern with your pal +# pilgrimage.6005 - You find out your friend is a Non-Believer +# pilgrimage.6006 - You and a friend are on a pilgrimage and your friend is healed in a miracle performed by a wandering priest +# +################################ +# Hajj Arrival Event +# 3101 +################################ +# pilgrimage.3101 - Entering state of Ihram +# +################################ +## Generic Arrival Events +## 4001-4999 +## by Petter Vilberg +################################ +# pilgrimage.4001 - Generic Destination +# pilgrimage.4002 - The Mystic you met on your journey is there! +# pilgrimage.4010 - Obligatory Pilgrimage - Skip Destination Event +# pilgrimage.4020 - Bury old host at Destination +# +################################ +## Holy Site-specific destination arrival events +## 5001-5999 +## by Sean Hughes +################################ +## Christian +# pilgrimage.5001 - Rome +# pilgrimage.5011 - Jerusalem +# pilgrimage.5021 - Constantinople +# pilgrimage.5031 - Alexandria +# +## Jewish +# pilgrimage.5101 - Mount Sinai +# +## Muslim +# pilgrimage.5201 - Medina +# +## Hindu +# pilgrimage.5301 - Varanasi +# pilgrimage.5311 - Ayodhya +# pilgrimage.5321 - Mathura +# pilgrimage.5331 - Haridwar +# pilgrimage.5341 - Kanchipuram +# pilgrimage.5351 - Ujjayini +# pilgrimage.5361 - Dwarka +# +## Buddhism +# pilgrimage.5401 - Bodh Gaya +# pilgrimage.5411 - Kushinagar +# pilgrimage.5421 - Sarnath +# +## Jainism +# pilgrimage.5501 - Shikharj +# +## Zoroastrian +# pilgrimage.5601 - Ushi-darena +# +## Norse Germanic +# pilgrimage.5901 - Paderborn +# +## Tengri +# pilgrimage.5911 - Open Blue Skies +# +## Sanctity of Nature +# pilgrimage.5921 - Sacred Groves +# +################################ +## Remaining at a Holy Site events +## 6500-6999 +## by Filippa Gannholm Kirsten & Veronica Pazos +################################ +# pilgrimage.6500 - Appreciation +# pilgrimage.6510 - Lost in Translation +# pilgrimage.6520 - Time To Go Home Soon? +# pilgrimage.6530-5 - Fishy local guide? +# pilgrimage.6540 - Find some exotic wares +# pilgrimage.6750 - Repent - remove secret/coping trait +# pilgrimage.6760 - Theological debate with facts and logic +# pilgrimage.6770 - Do you wanna buy some cheeky relic? +# pilgrimage.6780 - Recruit skillful courtier +# pilgrimage.6790 - Meet local guru - trait flipping event +# pilgrimage.6800 - Entourage member feels The Calling +# pilgrimage.6810 - Do you wanna buy an indulgence? +# pilgrimage.6820 - Do you wanna buy a pilgrim's guide? - based in the Codex Calixtinus +# pilgrimage.6830 - Admire the holy site in a religious way +# pilgrimage.6840 - Ask a local priest to bless your artifact +# pilgrimage.6850 - A Master Thief +################################ +## Conclusion events +## 7000-7499 +## by Filippa Gannholm Kirsten +################################ +# pilgrimage.7000 - Summarizing our activity +# +################################ +## Return Events +## 9001-9999 +## by Petter Vilberg & Filippa Gannholm Kirsten +################################ +# pilgrimage.9001 - Nice spiritual journey +# pilgrimage.9010 - Bury old host back home +# pilgrimage.9100 - Follow-up to exotic wares event +# + + +################################################################################################################################ +## Pilgrimage Activity System Events +# 0040-0100 +## by Filippa Gannholm Kirsten +################################ +# pilgrimage.0040 - Invalidation +# pilgrimage.0042 - Invalidation because you bury old host back home +# pilgrimage.0500 - Promise your religious relative to go on a Pilgrimage +# + +#Invalidation +pilgrimage.0040 = { + type = character_event + title = pilgrimage.0040.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_variable = moved_capital_to_holy_site } + desc = pilgrimage.0040.desc_moved_capital + } + desc = pilgrimage.0040.desc + } + } + theme = travel_pilgrimage + override_background = { + trigger = { is_imprisoned = yes } + reference = dungeon + } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = moved_capital_to_holy_site } + animation = thinking + } + animation = sadness + } + immediate = { + #If our inherited Pilgrimage invalidated, remove the indicator modifier and bury them at home + if = { + limit = { has_character_modifier = pilgrimage_burial_at_destination_modifier } + remove_character_modifier = pilgrimage_burial_at_destination_modifier + add_character_flag = pilgrimage_burial_interrupted_pilgrimage + } + else = { + add_character_flag = pilgrimage_invalidated + } + } + option = { + name = { + trigger = { has_variable = moved_capital_to_holy_site } + text = pilgrimage.0040.a_moved_capital + } + name = pilgrimage.0040.a + } + after = { + remove_character_flag = pilgrim_group_joined + #Bury the old host + if = { + limit = { has_character_modifier = pilgrimage_burial_at_capital_modifier } + #Trigger burial + trigger_event = { + id = pilgrimage.9010 + days = 5 + } + } + #Our capital was moved to the holy site + if = { + limit = { exists = var:moved_capital_to_holy_site } + remove_variable = moved_capital_to_holy_site + } + } +} + +#Invalidation because you bury old host back home +pilgrimage.0042 = { + type = character_event + title = pilgrimage.0042.t + desc = pilgrimage.0042.desc + theme = travel_pilgrimage + override_background = { reference = army_camp } + left_portrait = { + character = root + animation = sadness + } + lower_left_portrait = { + character = scope:old_pilgrimage_host + } + immediate = { + if = { + limit = { exists = var:old_host_to_be_buried } + var:old_host_to_be_buried = { save_scope_as = old_pilgrimage_host } + } + } + option = { + name = pilgrimage.0042.a + #Trigger burial + trigger_event = { + id = pilgrimage.9010 + days = 5 + } + } +} + +scripted_trigger pilgrimage_0500_valid_holy_site_trigger = { + #... we really shouldn't talk about the holy site we might be _in_ right now / invalid capital_province holy site + NOR = { + this = root.location.barony + AND = { + exists = capital_province + this = capital_province.barony + } + } +} + +#Promise your dying religious relative to go on a Pilgrimage +pilgrimage.0500 = { + type = character_event + title = pilgrimage.0500.t + desc = pilgrimage.0500.desc + theme = death + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:pilgrimage_dying_relative + animation = sick + } + cooldown = { years = 10 } + trigger = { + any_close_family_member = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_best_good_relationship_with_character_trigger = { CHARACTER = root } + opinion = { + target = root + value >= 40 + } + } + OR = { + health <= death_chance_dying_health + has_trait = incapable + has_trait = infirm + } + OR = { + AND = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + ai_zeal >= 50 + } + is_adult = yes + faith = root.faith + has_trait = pilgrim + } + is_available_healthy_adult = yes + #Forbidden from pilgrimages? No pilgrimage for you! + faith = { + NOT = { has_doctrine_parameter = forbidden_from_pilgrimage } + any_holy_site = { + pilgrimage_0500_valid_holy_site_trigger = yes + save_temporary_scope_as = holy_site_check + } + any_holy_site = { + pilgrimage_0500_valid_holy_site_trigger = yes + this != scope:holy_site_check + } + } + #This really should take care of most Hajj/Pilgrim-related trigger checks - if you don't have this trait, you haven't been pilgrimming before + NOR = { + has_trait = pilgrim + has_trait = hajjaj + } + #Only one modifier for _you_ + NOR = { + has_character_modifier = ghost_pilgrimage_promised_modifier + has_character_modifier = hajj_promised_modifier + has_character_modifier = pilgrimage_promised_modifier + } + } + immediate = { + random_close_family_member = { + limit = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_best_good_relationship_with_character_trigger = { CHARACTER = root } + } + OR = { + health <= death_chance_dying_health + has_trait = incapable + has_trait = infirm + } + is_adult = yes + faith = root.faith + has_trait = pilgrim + } + save_scope_as = pilgrimage_dying_relative + } + scope:pilgrimage_dying_relative = { + if = { + limit = { + NOT = { has_character_flag = use_sickness_clothes } + } + add_character_flag = use_sickness_clothes + } + } + #Some loc flavor + faith = { + random_holy_site = { + limit = { pilgrimage_0500_valid_holy_site_trigger = yes } + save_scope_as = first_holy_site + } + random_holy_site = { + limit = { + pilgrimage_0500_valid_holy_site_trigger = yes + this != scope:first_holy_site + } + save_scope_as = second_holy_site + } + } + } + #Hajj it is + option = { + name = pilgrimage.0500.a + scope:pilgrimage_dying_relative = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + custom_tooltip = { + text = pilgrimage.0500.a.tt_pilgrimage + add_character_modifier = pilgrimage_promised_modifier + } + add_piety = miniscule_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + } + } + #Erm... no. + option = { + name = pilgrimage.0500.b + scope:pilgrimage_dying_relative = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = major_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = zealous + } + factor = 0 + } + } + } + after = { + scope:pilgrimage_dying_relative ?= { + if = { + limit = { + has_character_flag = use_sickness_clothes + } + remove_character_flag = use_sickness_clothes + } + } + } +} + +############################ +## Generic Journey Events +# 1001-6100 +## by Petter Vilberg & Filippa Gannholm Kirsten & Joe Parkin +############################ +# pilgrimage.1100 - Sea: Saint Elmo's Fire +# pilgrimage.1110 - Heathen Raiders +# pilgrimage.1120 - Tour Church +# pilgrimage.1130 - Roadside Shrine +# pilgrimage.1140 - Strength in Numbers +# pilgrimage.2002 - Heathen-hating adherent challenges you +# pilgrimage.2003 - Hire more guards? +# pilgrimage.2004 - Run into a potential friend +# pilgrimage.2005 - A peasant inadvertedly insults you +# pilgrimage.2006 - Your pilgrimage is taking a little detour +# pilgrimage.2008 - Fall ill +# pilgrimage.2009 - Develop pneumonia +# pilgrimage.2010-5 - Meet a Mystic +# pilgrimage.2020-21 - Pilgrimage thieves +# pilgrimage.2030 - Sea: Massive rainbow +# pilgrimage.2040 - Sea: Go fish +# pilgrimage.2050 - Sea: Shipwrecked pilgrims +# + +scripted_effect pilgrimage_st_elmo_success_effect = { + random_list = { + 7 = { + show_chance = no + desc = pilgrimage.1100.success + modifier = { add = scope:duel_variety } + send_interface_toast = { + title = pilgrimage.1100.success + current_travel_plan = { + add_destination_progress = { days = 5 } + } + } + } + 7 = { + show_chance = no + desc = pilgrimage.1100.failure + modifier = { + add = { + value = 0 + subtract = scope:duel_variety + } + } + send_interface_toast = { + title = pilgrimage.1100.failure + current_travel_plan = { + delay_travel_plan = { days = 90 } + } + } + } + } +} + +#Sea: Saint Elmo's Fire +# by Joe Parkin +pilgrimage.1100 = { + type = character_event + title = { + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + has_cultural_tradition = tradition_byzantine_succession + has_cultural_tradition = tradition_ep3_roman_ceremonies + } + } + } + desc = pilgrimage.1100.t.greek + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = pilgrimage.1100.t.christian + } + triggered_desc = { + trigger = { + faith = { has_doctrine = unreformed_faith_doctrine } + } + desc = pilgrimage.1100.t.pagan + } + desc = pilgrimage.1100.t + } + } + } + desc = { + desc = pilgrimage.1100.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:panicked_pilgrim } + desc = pilgrimage.1100.companion + } + desc = pilgrimage.1100.alone + } + } + theme = travel_pilgrimage + override_background = { reference = terrain } + right_portrait = { + character = scope:panicked_pilgrim + animation = fear + } + left_portrait = { + character = root + animation = shock + } + cooldown = { years = 10 } + + trigger = { + is_travelling = yes + location = { + has_sea_danger_type = { TRAVEL = root.current_travel_plan } + } + current_travel_plan = { + any_entourage_character = { + count > 4 + } + any_entourage_character = { + NOR = { + this = root + has_trait = brave + has_trait = zealous + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + random_entourage_character = { + limit = { + NOR = { + this = root + has_trait = brave + has_trait = zealous + } + } + weight = { + base = 1 + modifier = { + has_trait = craven + add = 10 + } + modifier = { + has_trait = cynical + add = 10 + } + } + save_scope_as = panicked_pilgrim + } + random_entourage_character = { + limit = { + this != root + } + alternative_limit = { always = yes } + save_scope_as = victim_pilgrim + } + random_entourage_character = { + limit = { + NOR = { + this = root + this = scope:victim_pilgrim + is_spouse_of = root + is_close_family_of = root + is_landed = yes + } + is_lowborn = yes + } + alternative_limit = { + NOR = { + this = root + this = scope:victim_pilgrim + is_spouse_of = root + is_close_family_of = root + is_landed = yes + } + } + alternative_limit = { + NOR = { + this = root + this = scope:victim_pilgrim + } + } + alternative_limit = { + this != root + } + save_scope_as = sacrifice_pilgrim + } + } + save_scope_value_as = { + name = duel_variety + value = { 1 4 } + } + } + + option = { # Look, god guides our path + name = pilgrimage.1100.a + add_piety = minor_piety_gain + scope:panicked_pilgrim = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + if = { + limit = { exists = scope:victim_pilgrim } + random = { + chance = 50 + custom_tooltip = { + text = pilgrimage_random_pilgrim_tt + send_interface_toast = { + title = pilgrimage_fell_overboard_tt + left_icon = scope:victim_pilgrim + scope:victim_pilgrim = { + death = { death_reason = death_drowned } + every_close_family_member = { + custom = every_family_member_tt + limit = { + this != root + } + add_opinion = { + target = root + modifier = accidentally_killed_family_opinion + opinion = -15 + } + } + } + } + } + } + } + pious_type_option_effect = yes + pilgrimage_st_elmo_success_effect = yes + stress_impact = { + craven = minor_stress_impact_gain + cynical = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 1 + } + } + } + + option = { # Climb rigging + name = pilgrimage.1100.b + trigger = { + OR = { + has_trait = lunatic_1 + has_trait = lunatic_genetic + has_trait = possessed_1 + has_trait = possessed_genetic + } + } + flavor = pilgrimage.1100.b.flavor + trait = lunatic_1 + trait = lunatic_genetic + add_piety = medium_piety_gain + duel = { + skill = prowess + value = medium_skill_rating + 50 = { + modifier = { add = scope:duel_variety } + modifier = { + factor = 1.5 + has_trait = athletic + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 5 + } + send_interface_toast = { + title = pilgrimage.1100.b.success.t + left_icon = root + add_character_modifier = { + modifier = pilgrimage_touched_divine_modifier + years = 10 + } + } + } + 30 = { + modifier = { + factor = 1.5 + has_trait = wounded + } + modifier = { + factor = 1.5 + has_trait = one_legged + } + modifier = { + factor = 1.5 + has_trait = one_eyed + } + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = 5 + } + send_interface_toast = { + title = pilgrimage.1100.b.wounded.t + left_icon = root + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + death = { death_reason = death_drowned } + } + } + pilgrimage_st_elmo_success_effect = yes + stress_impact = { + base = major_stress_impact_loss + craven = medium_stress_impact_gain + cynical = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = -1 + ai_zeal = 0.5 + } + } + } + + option = { # Sacrifice + name = pilgrimage.1100.c + trigger = { + faith = { + OR = { + has_doctrine = unreformed_faith_doctrine + has_doctrine_parameter = gruesome_festivals_active + has_doctrine_parameter = human_sacrifice_active + } + } + exists = scope:sacrifice_pilgrim + } + flavor = pilgrimage.1100.c.flavor + add_piety = medium_piety_gain + scope:sacrifice_pilgrim = { + death = { death_reason = death_drowned } + every_close_family_member = { + custom = every_family_member_tt + add_opinion = { + target = root + modifier = executed_close_family + opinion = -15 + } + } + } + pilgrimage_st_elmo_success_effect = yes + stress_impact = { + compassionate = medium_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = -1 + ai_zeal = 0.5 + } + } + } + + option = { # We must turn back! + name = pilgrimage.1100.d + scope:panicked_pilgrim = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + current_travel_plan = { + delay_travel_plan = { days = 90 } + } + stress_impact = { + brave = minor_stress_impact_gain + zealous = medium_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_boldness = -0.5 + } + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +scripted_trigger pilgrim_heathen_raider_trigger = { + # Landless + is_landed = no + # No claims + NOT = { + any_claim = {} + } + # No house + is_lowborn = yes + # Faith is hostile to traveler's + faith = { + faith_hostility_level = { + target = root.faith + value > 1 + } + } + # Is martial gender for own culture/faith + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this } + # Is a military person of some sort + OR = { + number_of_commander_traits > 1 + has_trait = education_martial + } +} + +#Heathen Raiders +# by Joe Parkin +pilgrimage.1110 = { + type = character_event + title = pilgrimage.1110.t + desc = { + desc = pilgrimage.1110.desc + first_valid = { + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = title:b_makka + this = root.involved_activity.activity_location.barony + county.county_controller.religion = scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_heathen_hajj + } + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = title:b_makka + this = root.involved_activity.activity_location.barony + county.county_controller.religion = root.religion + county.county_controller.religion != scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_controlled_hajj + } + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = title:b_jerusalem + this = root.involved_activity.activity_location.barony + county.county_controller.religion = scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_heathen_jerusalem + } + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = title:b_jerusalem + this = root.involved_activity.activity_location.barony + county.county_controller.religion = root.religion + county.county_controller.religion != scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_controlled_jerusalem + } + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = root.involved_activity.activity_location.barony + county.county_controller.religion = scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_heathen + } + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = root.involved_activity.activity_location.barony + county.county_controller.religion = root.religion + county.county_controller.religion != scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_controlled + } + desc = pilgrimage.1110.fallback + } + } + theme = travel_pilgrimage + override_background = { reference = terrain } + right_portrait = { + character = scope:heathen_raider + animation = marshal + } + cooldown = { years = 1 } + + trigger = { + is_travelling = yes + is_location_valid_for_travel_event_on_land = yes + location.county = { + faith = { + faith_hostility_level = { target = root.faith value > 1 } + } + holder = { + NOR = { + this = root + any_liege_or_above = { this = root } + } + } + } + current_travel_plan = { + any_entourage_character = { + this != root + count >= 2 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 0.5 + location.county.faith = { has_doctrine = tenet_dharmic_pacifism } + } + } + + immediate = { + location.county = { save_scope_as = heathen_raider_county } + location.county.holder.top_liege = { save_scope_as = county_liege } + # Save or create a heathen raider + random_list = { + 9 = { + trigger = { # Does a valid heather raider exist in the county? + any_pool_character = { + province = root.location + pilgrim_heathen_raider_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { pilgrim_heathen_raider_trigger = yes } + weight = { + base = 1 + modifier = { + add = 10 + has_trait = reaver + } + } + save_scope_as = heathen_raider + if = { + limit = { + location != root.location + } + hidden_effect = { move_to_pool_at = root.location } + } + } + } + 1 = { + create_character = { + template = new_raider_character + culture = root.location.culture + faith = root.location.faith + dynasty = none + location = root.location + gender_female_chance = scope:county_liege.root_soldier_female_chance + save_scope_as = heathen_raider + } + } + } + scope:heathen_raider = { + add_character_flag = wear_armor + } + # Save potential victim + current_travel_plan = { + random_entourage_character = { + limit = { + this != root + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + alternative_limit = { + this != root + } + weight = { + base = 1 + modifier = { + factor = 2 + prowess < decent_skill_rating + } + modifier = { + factor = 0 + has_trait = wounded + } + } + save_scope_as = victim_pilgrim_1 + } + if = { + limit = { exists = scope:victim_pilgrim_1 } + random_entourage_character = { + limit = { + NOR = { + this = root + this = scope:victim_pilgrim_1 + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + alternative_limit = { + this != root + } + weight = { + base = 1 + modifier = { + factor = 2 + prowess < decent_skill_rating + } + modifier = { + factor = 0 + has_trait = wounded + } + } + save_scope_as = victim_pilgrim_2 + } + } + } + # Does raider faith share the holy site? + involved_activity.activity_location.barony = { + if = { + limit = { is_holy_site_of = scope:heathen_raider.faith } + save_scope_as = shared_holy_site + } + } + save_scope_value_as = { + name = duel_variety + value = { 1 4 } + } + } + # Come on then + option = { + name = pilgrimage.1110.a + duel = { + skill = martial + target = scope:heathen_raider + 20 = { + desc = pilgrimage.1110.a.fled + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = 5 + } + modifier = { + add = { + value = dread + divide = 6 + } + } + modifier = { + current_travel_plan = { num_entourage_characters >= 15 } + factor = 1.5 + } + modifier = { + current_travel_plan = { + num_entourage_characters < 15 + num_entourage_characters > 8 + } + factor = 1.3 + } + modifier = { + current_travel_plan = { + num_entourage_characters < 8 + num_entourage_characters > 4 + } + factor = 1.1 + } + send_interface_toast = { + title = pilgrimage.1110.a.fled + left_icon = scope:heathen_raider + add_dread = minor_dread_gain + add_prestige = minor_prestige_gain + } + } + 20 = { + desc = pilgrimage.1110.a.skirmish + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 5 + } + show_as_tooltip = { add_prestige = miniscule_prestige_gain } + if = { + limit = { exists = scope:victim_pilgrim_2 } + custom_tooltip = two_entourage_members_wounded_tt + } + else = { custom_tooltip = one_entourage_members_wounded_tt } + hidden_effect = { + send_interface_toast = { + title = pilgrimage.1110.a.skirmish + left_icon = scope:victim_pilgrim_1 + right_icon = scope:victim_pilgrim_2 + add_prestige = miniscule_prestige_gain + if = { + limit = { exists = scope:victim_pilgrim_2 } + scope:victim_pilgrim_2 = { + random = { + chance = 50 + modifier = { + add = { + value = 0 + subtract = prowess + } + } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + } + } + if = { + limit = { exists = scope:victim_pilgrim_1 } + scope:victim_pilgrim_1 = { + random = { + chance = 50 + modifier = { + add = { + value = 0 + subtract = prowess + } + } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + } + } + else = { + random = { + chance = 50 + modifier = { + add = { + value = 0 + subtract = prowess + } + } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + } + } + } + } + 5 = { + desc = pilgrimage.1110.a.beaten + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + modifier = { + current_travel_plan = { num_entourage_characters >= 15 } + factor = 0.5 + } + modifier = { + current_travel_plan = { + num_entourage_characters < 15 + num_entourage_characters > 8 + } + factor = 0.7 + } + modifier = { + current_travel_plan = { + num_entourage_characters < 8 + num_entourage_characters > 4 + } + factor = 0.9 + } + show_as_tooltip = { + add_prestige = minor_prestige_loss + pay_short_term_gold = { + target = scope:heathen_raider + gold = { + value = medium_gold_value + max = 50 + } + } + } + if = { + limit = { exists = scope:victim_pilgrim_2 } + custom_tooltip = two_entourage_members_die_tt + } + else = { custom_tooltip = one_entourage_members_die_tt } + hidden_effect = { + send_interface_toast = { + title = pilgrimage.1110.a.beaten + left_icon = scope:victim_pilgrim_1 + right_icon = scope:victim_pilgrim_2 + add_prestige = minor_prestige_loss + pay_short_term_gold = { + target = scope:heathen_raider + gold = { + value = medium_gold_value + max = 50 + } + } + if = { + limit = { exists = scope:victim_pilgrim_2 } + scope:victim_pilgrim_2 = { + random_list = { + 50 = { + modifier = { add = prowess } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + 50 = { + death = { death_reason = death_pilgrimage_bandit_attack } + } + } + } + } + if = { + limit = { exists = scope:victim_pilgrim_1 } + scope:victim_pilgrim_1 = { + random_list = { + 50 = { + modifier = { add = prowess } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + 50 = { + death = { death_reason = death_pilgrimage_bandit_attack } + } + } + } + } + else = { + random_list = { + 50 = { + modifier = { add = prowess } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + 50 = { + death = { death_reason = death_pilgrimage_bandit_attack } + } + } + } + } + } + } + } + add_internal_flag = dangerous + stress_impact = { + craven = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + ai_boldness = 1 + } + } + } + # Leave us in peace + option = { + name = { + trigger = { religion = scope:heathen_raider.religion } + text = pilgrimage.1110.b.religion + } + name = { + trigger = { + NOT = { + faith = { has_doctrine = unreformed_faith_doctrine } + } + scope:heathen_raider.faith = { has_doctrine = unreformed_faith_doctrine } + } + text = pilgrimage.1110.b.unreformed + } + name = { + trigger = { + religion != scope:heathen_raider.religion + NAND = { + NOT = { + faith = { has_doctrine = unreformed_faith_doctrine } + } + scope:heathen_raider.faith = { has_doctrine = unreformed_faith_doctrine } + } + } + text = pilgrimage.1110.b + } + duel = { + skill = diplomacy + target = scope:heathen_raider + 5 = { + desc = pilgrimage.1110.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 5 + } + modifier = { + has_perk = zealous_proselytizer_perk + factor = 2 + } + send_interface_toast = { + title = pilgrimage.1110.c.success + left_icon = scope:heathen_raider + add_piety = minor_piety_gain + } + } + 5 = { + desc = pilgrimage.1110.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + send_interface_toast = { + title = pilgrimage.1110.c.failure + left_icon = scope:heathen_raider + pay_short_term_gold = { + target = scope:heathen_raider + gold = { + value = medium_gold_value + max = 50 + } + } + } + } + } + stress_impact = { + wrathful = minor_stress_impact_gain + zealous = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = -0.5 + } + } + } + # Join me, God is pretty cool + option = { + name = pilgrimage.1110.c + trigger = { + OR = { + AND = { + NOT = { + faith = { has_doctrine = unreformed_faith_doctrine } + } + scope:heathen_raider.faith = { has_doctrine = unreformed_faith_doctrine } + } + scope:heathen_raider.religion = root.religion + } + } + duel = { + skill = learning + target = scope:heathen_raider + 10 = { + desc = pilgrimage.1110.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 5 + } + modifier = { + scope:heathen_raider = { has_trait = cynical } + add = 5 + } + send_interface_toast = { + title = pilgrimage.1110.c.success + left_icon = scope:heathen_raider + scope:heathen_raider = { + hidden_effect = { set_character_faith_with_conversion = root.faith } + set_character_faith = root.faith + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:heathen_raider + NEW_COURT_OWNER = root + } + spawn_army = { + name = event_troop_default_name + levies = 250 + location = root.location + origin = root.location + } + } + } + 10 = { + desc = pilgrimage.1110.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + modifier = { + scope:heathen_raider = { has_trait = zealous } + add = 5 + } + send_interface_toast = { + title = pilgrimage.1110.c.failure + left_icon = scope:heathen_raider + add_prestige = minor_prestige_loss + pay_short_term_gold = { + target = scope:heathen_raider + gold = { + value = medium_gold_value + max = 50 + } + } + } + } + } + stress_impact = { + cynical = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = 0.5 + ai_rationality = 0.5 + } + } + } + + option = { # Take your damned money + name = pilgrimage.1110.d + pay_short_term_gold = { + target = scope:heathen_raider + gold = { + value = medium_gold_value + max = 25 + } + } + stress_impact = { + brave = medium_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 0.5 + } + } + } + after = { + scope:heathen_raider = { + remove_character_flag = wear_armor + } + } +} + +scripted_trigger pilgrim_admire_temple_person_trigger = { + # Landless + is_landed = no + # No claims + NOT = { + any_claim = {} + } + # No house + is_lowborn = yes + # Faith is same as traveler's + faith = root.location.faith + # Is a priestly person of some sort + OR = { + has_trait = education_learning + has_trait = devoted + has_trait = theologian + is_clergy = yes + } + trigger_if = { + limit = { + faith = { has_doctrine_parameter = clergy_must_be_male } + } + is_male = yes + } + trigger_if = { + limit = { + faith = { has_doctrine_parameter = clergy_must_be_female } + } + is_female = yes + } +} + +#Tour Church +# by Joe Parkin +pilgrimage.1120 = { + type = character_event + title = pilgrimage.1120.t + desc = pilgrimage.1120.desc + theme = travel_pilgrimage + override_background = { reference = holy_site_generic } + left_portrait = { + character = scope:temple_person + animation = chaplain + } + lower_right_portrait = scope:temple_liege + cooldown = { years = 1 } + + trigger = { + is_travelling = yes + is_location_valid_for_travel_event_on_land = yes + # Not at the target destination of the pilgrimage + involved_activity.activity_location != root.location + location = { + has_holding_type = church_holding + county = { + development_level >= 5 + faith = { + religion = root.religion + faith_hostility_level = { target = root.faith value <= 1 } + } + holder = { + NOR = { + this = root + any_liege_or_above = { this = root } + } + } + save_temporary_scope_as = temple_faith + } + } + faith = { + faith_hostility_level = { target = scope:temple_faith.faith value <= 1 } + } + } + + weight_multiplier = { + base = 1 + modifier = { + location.barony = { is_holy_site_of = root.faith } + add = 10 + } + modifier = { + location = { has_special_building = yes } + add = 10 + } + modifier = { + add = { + value = location.county.development_level + divide = 4 + } + } + } + + immediate = { + location = { save_scope_as = temple_province } + # Save or create a temple person + random_list = { + 9 = { + trigger = { # Does a valid temple person exist in the county? + any_pool_character = { + province = scope:temple_province + pilgrim_admire_temple_person_trigger = yes + } + } + random_pool_character = { + province = scope:temple_province + limit = { pilgrim_admire_temple_person_trigger = yes } + weight = { + base = 1 + modifier = { + add = 10 + is_clergy = yes + } + } + save_scope_as = temple_person + if = { + limit = { + location != root.location + } + hidden_effect = { move_to_pool_at = root.location } + } + } + } + 1 = { + create_character = { + template = priest_character_template + culture = root.location.culture + faith = root.location.faith + dynasty = none + location = root.location + gender_female_chance = root_faith_clergy_gender_female_chance + save_scope_as = temple_person + } + } + } + location.county.holder.top_liege = { save_scope_as = temple_liege } + save_scope_value_as = { + name = duel_variety + value = { 1 4 } + } + } + + option = { # Architect insights + name = pilgrimage.1120.a + trigger = { has_trait = architect } + trait = architect + add_character_modifier = { + modifier = pilgrimage_temple_architect_modifier + years = 5 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -0.5 + ai_energy = 1 + } + } + } + + option = { # Pray + name = pilgrimage.1120.e + add_piety = miniscule_piety_gain + pious_type_option_effect = yes + stress_impact = { + cynical = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_sociability = 0.5 + ai_zeal = 1 + } + } + } + + option = { # Insult place + name = pilgrimage.1120.c + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:temple_liege + modifier = annoyed_opinion + opinion = -10 + } + stress_impact = { + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.5 + ai_zeal = 0.5 + } + } + } + + option = { # Leave + name = pilgrimage.1120.d + stress_impact = { + patient = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.5 + ai_zeal = 0.5 + } + } + } + after = { + scope:temple_person = { + silent_disappearance_ai_effect = yes + } + } +} + +scripted_trigger pilgrimage_1130_pro_character_trigger = { + faith = root.location.faith + this != root + age > 5 +} + +scripted_trigger pilgrimage_1130_anti_character_trigger = { + faith != root.location.faith + this != root + age > 5 +} + +#Roadside Shrine +# by Joe Parkin +pilgrimage.1130 = { + type = character_event + title = pilgrimage.1130.t + desc = { + desc = pilgrimage.1130.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:shrine_faithist + exists = scope:shrine_mocker + } + desc = pilgrimage.1130.both + } + triggered_desc = { + trigger = { exists = scope:shrine_faithist } + desc = pilgrimage.1130.faithist + } + triggered_desc = { + trigger = { exists = scope:shrine_mocker } + desc = pilgrimage.1130.mocker + } + } + } + theme = travel_pilgrimage + override_background = { reference = terrain } + left_portrait = { + character = scope:shrine_faithist + animation = throne_room_bow_1 + } + right_portrait = { + character = scope:shrine_mocker + animation = eyeroll + } + cooldown = { years = 1 } + + trigger = { + is_travelling = yes + is_location_valid_for_travel_event_on_land = yes + # Not at the target destination of the pilgrimage + involved_activity.activity_location != root.location + location = { + county = { + holder = { + NOR = { + this = root + any_liege_or_above = { this = root } + } + } + save_temporary_scope_as = temple_faith + } + } + current_travel_plan = { + OR = { + any_entourage_character = { pilgrimage_1130_pro_character_trigger = yes } + any_entourage_character = { pilgrimage_1130_anti_character_trigger = yes } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -0.75 + location.county.development_level >= 10 + } + } + + immediate = { + save_scope_as = shrine_visitor + location = { save_scope_as = shrine_province } + current_travel_plan = { + # Save a shrine faithist + if = { + limit = { + any_entourage_character = { pilgrimage_1130_pro_character_trigger = yes } + } + random_entourage_character = { + limit = { + pilgrimage_1130_pro_character_trigger = yes + is_of_major_interest_to_root_trigger = yes + } + alternative_limit = { + pilgrimage_1130_pro_character_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + alternative_limit = { pilgrimage_1130_pro_character_trigger = yes } + weight = { + base = 1 + modifier = { + has_trait = zealous + add = 10 + } + modifier = { + has_trait = cynical + factor = 0 + } + } + save_scope_as = shrine_faithist + } + } + # Save a shrine mocker + if = { + limit = { + any_entourage_character = { pilgrimage_1130_anti_character_trigger = yes } + } + random_entourage_character = { + limit = { + pilgrimage_1130_anti_character_trigger = yes + is_of_major_interest_to_root_trigger = yes + } + limit = { + pilgrimage_1130_anti_character_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + alternative_limit = { pilgrimage_1130_anti_character_trigger = yes } + weight = { + base = 1 + modifier = { + has_trait = arrogant + add = 10 + } + modifier = { + has_trait = humble + factor = 0 + } + } + save_scope_as = shrine_mocker + } + } + } + save_scope_value_as = { + name = duel_variety + value = { 1 4 } + } + } + # Stop to pray + option = { + name = pilgrimage.1130.a + trigger = { location.faith = root.faith } + remove_treasury_or_gold = 5 + add_piety = miniscule_piety_gain + stress_impact = { + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + improvident = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -0.5 + ai_energy = 1 + } + } + } + # Steal de moolah + option = { + name = pilgrimage.1130.b + flavor = pilgrimage.1130.b.flavor + add_gold = { + value = tiny_gold_value + max = 15 + } + if = { + limit = { faith = root.location.faith } + add_piety = medium_piety_loss + } + current_travel_plan = { + every_entourage_character = { + limit = { + faith = root.location.faith + this != root + } + custom = every_root_faith_entourage_member_tt + add_opinion = { + target = root + modifier = shrine_pilferer_opinion + } + } + } + if = { + limit = { exists = scope:shrine_mocker } + reverse_add_opinion = { + target = scope:shrine_mocker + modifier = shrine_pilferer_opinion + opinion = 10 + } + } + if = { + limit = { location.faith = root.faith } + stress_impact = { + base = minor_stress_impact_gain + zealous = medium_stress_impact_gain + just = medium_stress_impact_gain + cynical = minor_stress_impact_loss + greedy = minor_stress_impact_loss + callous = minor_stress_impact_loss + } + } + else = { + stress_impact = { + zealous = minor_stress_impact_gain + just = minor_stress_impact_gain + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_sociability = 0.5 + ai_zeal = 1 + } + } + } + # Desecrate de shrine + option = { + name = pilgrimage.1130.c + trigger = { + location.faith != root.faith + } + flavor = pilgrimage.1130.c.flavor + add_piety = minor_piety_gain + current_travel_plan = { + every_entourage_character = { + limit = { + NOR = { + faith = root.location.faith + this = root + } + has_trait = zealous + } + custom = every_zealous_root_faith_entourage_member_tt + add_opinion = { + target = root + modifier = shrine_desecrater_opinion + opinion = 15 + } + } + every_entourage_character = { + limit = { + faith = root.location.faith + this != root + } + custom = every_province_faith_entourage_member_tt + add_opinion = { + target = root + modifier = shrine_desecrater_opinion + } + } + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_zeal = 0.5 + ai_compassion = -0.5 + } + } + } + # Mock de prayer + option = { + name = pilgrimage.1130.d + trigger = { + exists = scope:shrine_faithist + faith != scope:shrine_faithist.faith + } + flavor = pilgrimage.1130.d.flavor + reverse_add_opinion = { + target = scope:shrine_faithist + modifier = insulted_opinion + opinion = -10 + } + if = { + limit = { exists = scope:shrine_mocker } + progress_towards_friend_effect = { + REASON = friend_mocked_heathen_together + CHARACTER = scope:shrine_mocker + OPINION = default_friend_opinion + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.5 + ai_zeal = 0.5 + } + } + } + # Insult de mocker + option = { + name = pilgrimage.1130.e + trigger = { + exists = scope:shrine_mocker + faith = scope:shrine_province.faith + } + reverse_add_opinion = { + target = scope:shrine_mocker + modifier = insulted_opinion + opinion = -10 + } + if = { + limit = { exists = scope:shrine_faithist } + progress_towards_friend_effect = { + REASON = friend_rebuffed_heathen + CHARACTER = scope:shrine_faithist + OPINION = default_friend_opinion + } + } + stress_impact = { + shy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.5 + ai_zeal = 0.5 + } + } + } + # Leave + option = { + name = { + text = pilgrimage.1130.f + trigger = { faith = scope:shrine_province.faith } + } + name = { + text = pilgrimage.1130.f.other + trigger = { + faith != scope:shrine_province.faith + } + } + if = { + limit = { faith = scope:shrine_province.faith } + add_piety = minor_piety_loss + } + if = { + limit = { exists = scope:shrine_faithist } + reverse_add_opinion = { + target = scope:shrine_faithist + modifier = annoyed_opinion + opinion = -10 + } + } + stress_impact = { + generous = minor_stress_impact_gain + profligate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.5 + ai_zeal = 0.5 + } + } + } +} + +scripted_trigger pilgrim_group_leader_trigger = { + is_available = yes + # Landless + is_landed = no + # No claims + NOT = { + any_claim = {} + } + # No house + is_lowborn = yes + # Faith is same as root's + faith = root.faith + # Dominant gender + trigger_if = { + limit = { + faith = { has_doctrine_parameter = male_dominated_law } + } + is_male = yes + } + trigger_else_if = { + limit = { + faith = { has_doctrine_parameter = female_dominated_law } + } + is_female = yes + } + trigger_else = { always = yes } +} + +#Strength in Numbers +# by Joe Parkin +pilgrimage.1140 = { + type = character_event + title = pilgrimage.1140.t + desc = pilgrimage.1140.desc + theme = travel_pilgrimage + override_background = { reference = terrain_travel } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = zealous } + animation = personality_zealous + } + triggered_animation = { + trigger = { + OR = { + has_trait = lunatic + has_trait = possessed + } + } + animation = personality_irrational + } + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + } + } + animation = personality_coward + } + triggered_animation = { + trigger = { has_trait = callous } + animation = personality_callous + } + animation = personality_content + } + right_portrait = { + character = scope:group_leader + animation = beg + } + cooldown = { years = 1 } + + trigger = { + is_travelling = yes + is_location_valid_for_travel_event_on_land = yes + current_travel_plan = { + # Not just left + next_destination_progress >= 0.2 + # Not super close to arrival + next_destination_progress < 0.75 + } + # Not at the target destination of the pilgrimage + involved_activity.activity_location != root.location + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = location.county.development_level + divide = 4 + } + } + } + + immediate = { + involved_activity.activity_location = { save_scope_as = destination } + # Save a culture for the pilgrim leader + hidden_effect = { + random_list = { + 10 = { + location.culture = { save_scope_as = pilgrim_culture } + } + 10 = { + culture = { save_scope_as = pilgrim_culture } + } + } + } + # Save or create a pilgrim leader + random_list = { + 9 = { + trigger = { # Does a valid pilgrim leader exist in the county? + any_pool_character = { + province = root.location + pilgrim_group_leader_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { pilgrim_group_leader_trigger = yes } + save_scope_as = group_leader + if = { + limit = { + location != root.location + } + hidden_effect = { move_to_pool_at = root.location } + } + } + } + 1 = { + create_character = { + template = generic_peasant_character + culture = root.culture + faith = root.faith + dynasty = none + location = root.location + gender_female_chance = root_faith_dominant_gender_female_chance + save_scope_as = group_leader + } + } + } + scope:group_leader = { add_character_flag = peasant_pilgrim_leader } + save_scope_value_as = { + name = duel_variety + value = { 1 4 } + } + } + # Welcome them + option = { + name = pilgrimage.1140.a + remove_short_term_gold = 10 + add_piety = minor_piety_gain + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:group_leader + NEW_COURT_OWNER = root + } + current_travel_plan = { + add_travel_plan_modifier = { modifier = pilgrim_group_joined_modifier } + } + add_character_flag = pilgrim_group_joined + stress_impact = { + shy = minor_stress_impact_gain + greedy = minor_stress_impact_gain + improvident = minor_stress_impact_gain + callous = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + ai_sociability = 0.5 + ai_greed = -0.5 + } + } + } + # Culture turn away + option = { + name = pilgrimage.1140.b + trigger = { + culture != scope:group_leader.culture + } + flavor = pilgrimage.1140.b.flavor + add_prestige = minor_prestige_gain + culture = { + change_cultural_acceptance = { + target = scope:group_leader.culture + value = minor_cultural_acceptance_loss + desc = cultural_acceptance_rejected_pilgrims + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + humble = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = 0.5 + ai_rationality = -0.5 + } + } + } + # Provision them + option = { + name = pilgrimage.1140.c + add_piety = miniscule_piety_gain + remove_short_term_gold = 20 + stress_impact = { + greedy = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + improvident = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = 0.5 + ai_rationality = -0.5 + } + } + } + # Turn away + option = { + name = pilgrimage.1140.d + flavor = pilgrimage.1140.d.flavor + add_prestige = miniscule_prestige_gain + stress_impact = { + compassionate = minor_stress_impact_gain + improvident = minor_stress_impact_gain + generous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + ai_greed = 0.5 + } + } + } + after = { + scope:group_leader = { + silent_disappearance_ai_effect = yes + } + } +} + +#Heathen-hating adherent challenges you +# by Petter Vilberg +pilgrimage.2002 = { + type = character_event + title = pilgrimage.2002.t + desc = pilgrimage.2002.desc + theme = travel_pilgrimage + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:heathen_hater + animation = anger + } + cooldown = { years = 2 } + trigger = { + is_location_valid_for_travel_event_on_land = yes + religion = { + is_in_family = rf_abrahamic + } + current_travel_plan ?= { + any_entourage_character = { + is_physically_able_ai_adult = yes + NOR = { + this = root + has_trait = cynical + is_courtier_of = root + } + } + } + } + immediate = { + random_dummy_gender_effect = yes + current_travel_plan = { + random_entourage_character = { + limit = { + is_physically_able_ai_adult = yes + NOR = { + this = root + has_trait = cynical + is_courtier_of = root + } + } + weight = { + base = 1 + # Try to find someone relevant + modifier = { + has_trait = zealous + add = 2 + } + modifier = { + has_trait_malicious_trigger = yes + add = 2 + } + } + save_scope_as = heathen_hater + } + } + } + option = { # Zealous: YOU ARE ABSOLUTELY RIGHT + name = pilgrimage.2002.c + trigger = { + has_trait = zealous + } + trait = zealous + pious_type_option_effect = yes + add_piety = minor_piety_gain + add_character_modifier = { + modifier = pilgrimage_disdainful_towards_faiths_modifier + years = 10 + } + scope:heathen_hater = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 30 + } + } + ai_chance = { + base = 500 + } + } + # Are they truly all that bad? + option = { + name = pilgrimage.2002.a + worldly_type_option_effect = yes + add_character_modifier = { + modifier = pilgrimage_sympathetic_towards_faiths_modifier + years = 10 + } + scope:heathen_hater = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + if = { + limit = { + NOT = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + stress_impact = { + zealous = major_stress_impact_gain + } + } + stress_impact = { + craven = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + # Of course + option = { + name = pilgrimage.2002.b + add_character_modifier = { + modifier = pilgrimage_disdainful_towards_faiths_modifier + years = 10 + } + scope:heathen_hater = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + stress_impact = { + cynical = minor_stress_impact_gain + trusting = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_compassion = -1 + } + } + } +} + +scripted_trigger 2002_local_prowess_character_trigger = { + is_available_healthy_ai_adult = yes + prowess >= high_skill_rating + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this } +} +#Hire more guards? +# by Petter Vilberg & Filippa Gannholm Kirsten +pilgrimage.2003 = { + type = character_event + title = pilgrimage.2003.t + desc = pilgrimage.2003.desc + theme = travel_pilgrimage + override_background = { reference = terrain_travel } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:2002_local_warrior + animation = marshal + } + cooldown = { years = 2} + trigger = { + current_travel_plan = { next_destination_progress > 0.5 } + is_location_valid_for_travel_event_on_land = yes + } + weight_multiplier = { + base = 1 + modifier = { + current_travel_plan = { has_travel_option = hire_experienced_mercenaries_option } + add = -0.5 + } + modifier = { + location = { + travel_danger_value = { + target = root.current_travel_plan + value < 20 + } + } + add = 0.2 + } + modifier = { + location = { + travel_danger_value = { + target = root.current_travel_plan + value < 40 + } + } + add = 0.2 + } + modifier = { + location = { + travel_danger_value = { + target = root.current_travel_plan + value < 60 + } + } + add = 0.2 + } + modifier = { + location = { + travel_danger_value = { + target = root.current_travel_plan + value < 80 + } + } + add = 0.2 + } + modifier = { + location = { + travel_danger_value = { + target = root.current_travel_plan + value = 100 + } + } + add = 0.2 + } + } + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + 2002_local_prowess_character_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { 2002_local_prowess_character_trigger = yes } + save_scope_as = 2002_local_warrior + } + } + else = { + create_character = { + template = new_warrior_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + gender_female_chance = root_soldier_female_chance + prowess = { medium_skill_rating high_skill_rating } + save_scope_as = 2002_local_warrior + } + scope:2002_local_warrior = { add_character_flag = created_warrior } + } + } + #Hire more guards + option = { + name = pilgrimage.2003.a + trigger = { + current_travel_plan = { + NOT = { has_travel_option = hire_experienced_mercenaries_option } + } + } + if = { + limit = { + faith = { has_doctrine = tenet_armed_pilgrimages } + } + custom_description_no_bullet = { + text = pilgrimage_piousness_because_i_have_tenet_armed_pilgrimages + pious_type_option_effect = yes + } + } + else_if = { + limit = { + faith = { has_doctrine = tenet_struggle_submission } + } + custom_description_no_bullet = { + text = pilgrimage_piousness_because_i_have_tenet_struggle_submission + pious_type_option_effect = yes + } + } + current_travel_plan = { add_travel_plan_modifier = pilgrim_protection_modifier } + remove_short_term_gold = medium_gold_value + stress_impact = { + humble = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_rationality = 0.5 + } + # Reduced chance the less gold you have compared to the gold required + modifier = { + factor = { + value = short_term_gold + divide = medium_gold_value + } + short_term_gold < medium_gold_value + } + # Don't choose this if you're already in debt + modifier = { + factor = 0 + gold < 0 + } + } + } + #Hire that beefy chonk + option = { + name = pilgrimage.2003.b + if = { + limit = { + faith = { has_doctrine = tenet_warmonger } + } + custom_description_no_bullet = { + text = pilgrimage_piousness_because_i_have_tenet_warmonger + pious_type_option_effect = yes + } + } + remove_short_term_gold = minor_gold_value + recruit_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:2002_local_warrior + NEW_COURT_OWNER = root + } + stress_impact = { + humble = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_rationality = 0.5 + } + # Reduced chance the less gold you have compared to the gold required + modifier = { + factor = { + value = short_term_gold + divide = medium_gold_value + } + short_term_gold < medium_gold_value + } + # Don't choose this if you're already in debt + modifier = { + factor = 0 + gold < 0 + } + } + } + # This journey will remain humble and personal + option = { + name = pilgrimage.2003.c + pious_type_option_effect = yes + give_pilgrim_xp_effect = yes + add_character_modifier = { + modifier = pilgrimage_divine_protection_modifier + years = 10 + } + stress_impact = { + arrogant = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + after = { + if = { + limit = { + NOT = { + current_travel_plan = { + any_entourage_character = { this = scope:2002_local_warrior } + } + } + scope:2002_local_warrior = { has_character_flag = created_warrior } + } + scope:2002_local_warrior = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +scripted_trigger pilgrimage_2004_potential_friend_trigger = { + is_available_ai_adult = yes + faith = root.faith + NOT = { is_courtier_of = root } + location = root.location +} + +#Run into a potential friend +# by Petter Vilberg +pilgrimage.2004 = { + type = character_event + title = pilgrimage.2004.t + desc = pilgrimage.2004.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:potential_friend + animation = happiness + } + cooldown = { years = 2 } + trigger = { + any_relation = { + type = potential_friend + pilgrimage_2004_potential_friend_trigger = yes + } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + random_relation = { + type = potential_friend + limit = { + pilgrimage_2004_potential_friend_trigger = yes + } + save_scope_as = potential_friend + } + } + #PantheonTerm has brought us together! + option = { + name = pilgrimage.2004.a + worldly_type_option_effect = yes + set_relation_friend = { + reason = friend_pilgrimage + target = scope:potential_friend + } + reverse_add_opinion = { + target = scope:potential_friend + modifier = divine_blessing_friendship_opinion + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:potential_friend + NEW_COURT_OWNER = root + } + hidden_effect = { + add_opinion = { + target = scope:potential_friend + modifier = divine_blessing_friendship_opinion + } + } + stress_impact = { + shy = medium_stress_impact_gain + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 500 + modifier = { + OR = { + has_trait = shy + has_trait = paranoid + } + factor = 0 + } + } + } + # I must do this in solitude + option = { + name = pilgrimage.2004.b + pious_type_option_effect = yes + add_piety = minor_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = cynical + has_trait = gregarious + } + factor = 0.1 + } + } + } +} + +#A peasant inadvertedly insults you +# by Petter Vilberg +pilgrimage.2005 = { + type = character_event + title = pilgrimage.2005.t + desc = { + desc = pilgrimage.2005.desc + first_valid = { + triggered_desc = { + trigger = { + location.county.holder = { top_liege = root.top_liege } + } + desc = pilgrimage.2005.desc_close + } + desc = pilgrimage.2005.desc_far + } + desc = pilgrimage.2005.outro + } + theme = travel_pilgrimage + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + triggered_animation = { + trigger = { ai_vengefulness > 0 } + animation = anger + } + animation = shock + } + right_portrait = { + character = scope:rude_pilgrim + animation = laugh + } + cooldown = { years = 2 } + trigger = { + is_location_valid_for_travel_event_on_land = yes + current_travel_plan ?= { + any_entourage_character = { + is_physically_able_ai_adult = yes + this != root + NOT = { is_courtier_of = root } + } + } + } + immediate = { + random_dummy_gender_peasant_effect = yes + current_travel_plan = { + random_entourage_character = { + limit = { + is_physically_able_ai_adult = yes + this != root + NOT = { is_courtier_of = root } + } + weight = { + base = 1 + modifier = { + has_personality_malicious_trigger = yes + add = 100 + } + modifier = { + has_trait_malicious_trigger = yes + add = 10 + } + modifier = { + has_personality_extroverted_trigger = yes + add = 50 + } + modifier = { + has_trait_extroverted_trigger = yes + add = 5 + } + } + save_scope_as = rude_pilgrim + } + } + } + # Take it with some humour + option = { + name = pilgrimage.2005.a + flavor = pilgrimage.2005.a.flavor + worldly_type_option_effect = yes + if = { + limit = { + NOR = { + has_trait = arrogant + has_trait = vengeful + } + } + add_stress = medium_stress_loss + } + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_compassion = 0.5 + } + } + } + # What an insult! String them up! + option = { + name = pilgrimage.2005.b + add_dread = medium_dread_gain + add_piety = minor_piety_loss + scope:rude_pilgrim = { + increase_wounds_effect = { REASON = whipping } + add_opinion = { + target = root + modifier = angry_opinion + opinion = low_negative_opinion + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + sadistic = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + # Find other people to travel with + option = { + name = pilgrimage.2005.c + add_character_modifier = { + modifier = new_pilgrimage_companions_modifier + years = 5 + } + stress_impact = { + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } +} + +#Your pilgrimage is taking a little detour +# by Filippa Gannholm Kirsten +pilgrimage.2006 = { + type = character_event + title = pilgrimage.2006.t + desc = { + desc = pilgrimage.2006.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:caravan_master } + desc = pilgrimage.2006.desc_travel_leader + } + desc = pilgrimage.2006.desc_alone + } + } + theme = travel_pilgrimage + override_background = { reference = wilderness } + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:caravan_master + ai_vengefulness > 50 + NOT = { has_trait = forgiving } + } + animation = disapproval + } + triggered_animation = { + trigger = { ai_boldness < 0 } + animation = worry + } + animation = thinking + } + right_portrait = { + trigger = { exists = scope:other_person } + character = scope:other_person + triggered_animation = { + trigger = { scope:other_person = scope:local_person } + #Peasants herpiderp + animation = personality_irrational + } + animation = stress + } + cooldown = { years = 2 } + trigger = { + #Shouldn't happen immediately + current_travel_plan = { next_destination_progress > 0.2 } + is_location_valid_for_travel_event_on_land = yes + is_character_not_specialized_in_terrain = yes + any_pool_character = { + province = root.location + is_available_ai_adult = yes + has_no_real_status_trigger = yes + } + NOT = { + location ?= capital_province + current_travel_plan = { has_travel_plan_modifier = travel_guide_modifier } + has_character_flag = had_1006_travel_danger_lost_event_recently + } + } + weight_multiplier = { + base = 1 + modifier = { + exists = current_travel_plan.travel_leader + current_travel_plan.travel_leader = { + aptitude:travel_leader_court_position < 10 + } + faith = { + OR = { + trait_is_virtue = forgiving + trait_is_virtue = patient + } + } + add = 1 + } + } + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + #Some cooldown between Lost-themed events + add_character_flag = { + flag = had_2006_lost_pilgrimage_event_recently + months = 3 + } + #Do we have a caravan master? + if = { + limit = { exists = current_travel_plan.travel_leader } + current_travel_plan.travel_leader = { save_scope_as = caravan_master } + } + if = { + limit = { + any_pool_character = { + province = root.location + is_available_ai_adult = yes + has_no_real_status_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_real_status_trigger = yes + } + save_scope_as = local_person + } + } + if = { + limit = { exists = scope:caravan_master } + scope:caravan_master = { save_scope_as = other_person } + } + else = { + scope:local_person = { save_scope_as = other_person } + } + #Are we travel-ept + if = { + limit = { + OR = { + #Are we an experienced pilgrim? + AND = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value >= 50 + } + } + #Or an experienced traveler? + AND = { + has_trait = lifestyle_traveler + OR = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + } + } + #Duh, the sun rises in the east and sets in the west + learning >= high_skill_rating + } + } + add_character_flag = pilgrimage_travel_smart + } + } + #I'm too old for this #¤%# + option = { + name = { + trigger = { + involved_activity = { + NOR = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + has_activity_option = { + category = special_type + option = pilgrimage_type_hajj + } + } + } + } + text = pilgrimage.2006.a + } + name = pilgrimage.2006.a_pious + trigger = { has_character_flag = pilgrimage_travel_smart } + bonus_to_all_types_effect = yes + if = { + limit = { + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = 5 + } + } + else_if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 5 + } + } + else_if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + else = { + stress_impact = { + base = minor_stress_loss + } + } + ai_chance = { + base = 200 + } + } + #Let's accept the situation + option = { + name = { + trigger = { has_trait = cynical } + text = pilgrimage.2006.b_cynical + } + name = pilgrimage.2006.b + current_travel_plan = { + delay_travel_plan = { days = 90 } + } + if = { + limit = { exists = scope:caravan_master } + scope:caravan_master = { + add_opinion = { + target = root + modifier = relieved_opinion + opinion = 20 + } + } + } + pious_type_option_effect = yes + if = { + limit = { + OR = { + AND = { + exists = scope:caravan_master + faith = { trait_is_virtue = forgiving } + } + faith = { trait_is_virtue = patient } + } + } + add_piety = miniscule_piety_gain + } + else_if = { + limit = { + OR = { + AND = { + exists = scope:caravan_master + faith = { trait_is_sin = forgiving } + } + faith = { trait_is_sin = patient } + } + } + add_piety = minor_piety_loss + } + add_character_modifier = { + modifier = pilgrimage_accepting_modifier + years = 5 + } + stress_impact = { + base = minor_stress_impact_loss + patient = minor_stress_impact_loss + humble = minor_stress_impact_loss + impatient = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = impatient + has_trait = cynical + } + add = -50 + } + } + } + #This is unacceptable! + option = { + name = { + trigger = { + NOT = { exists = scope:caravan_master } + } + text = pilgrimage.2006.c + } + name = pilgrimage.2006.c_caravan_master + if = { + limit = { exists = scope:caravan_master } + scope:caravan_master = { + add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -20 + } + } + } + if = { + limit = { + OR = { + AND = { + exists = scope:caravan_master + faith = { trait_is_virtue = vengeful } + } + faith = { trait_is_virtue = impatient } + } + } + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + } + else_if = { + limit = { + OR = { + AND = { + exists = scope:caravan_master + faith = { trait_is_sin = vengeful } + } + faith = { trait_is_sin = impatient } + } + } + add_piety = minor_piety_loss + } + if = { + limit = { exists = scope:caravan_master } + add_dread = minor_dread_gain + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + + } + } + else = { + add_prestige = minor_prestige_loss + stress_impact = { + shy = minor_stress_impact_gain + craven = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = forgiving + has_trait = compassionate + } + factor = 0 + } + modifier = { + faith = { + OR = { + trait_is_virtue = forgiving + trait_is_virtue = patient + } + } + factor = 0 + } + } + } + after = { + remove_character_flag = pilgrimage_travel_smart + mp_resume_travel_plan = yes + } +} + +#Fall ill +# by Petter Vilberg +pilgrimage.2008 = { + type = character_event + title = pilgrimage.2008.t + desc = pilgrimage.2008.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = sick + } + right_portrait = { + trigger = { exists = scope:traveling_court_physician } + character = scope:traveling_court_physician + animation = worry + } + cooldown = { years = 10 } + trigger = { + #Shouldn't happen immediately + current_travel_plan = { next_destination_progress > 0.2 } + involved_activity ?= { has_activity_type = activity_pilgrimage } + can_contract_disease_trigger = { DISEASE = ill } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + play_music_cue = "mx_cue_illness" + show_as_tooltip = { add_trait = ill } + hidden_effect = { + #Adds the trait, sends event "health.2201" to those who care if health is brought too low + contract_disease_effect = { + DISEASE = ill + TREATMENT_EVENT = yes + } + } + current_travel_plan = { + if = { + limit = { + any_entourage_character = { has_court_position = court_physician_court_position } + } + random_entourage_character = { + limit = { has_court_position = court_physician_court_position } + save_scope_as = traveling_court_physician + } + } + } + + } + #Gogo Whole of Body + option = { + name = pilgrimage.2008.whole_of_body + trigger = { has_trait = whole_of_body } + show_as_tooltip = { remove_trait = ill } + hidden_effect = { + recover_from_disease_effect = { DISEASE = ill } + } + ai_chance = { + base = 1000 + } + } + #Gogo Court Physician + option = { + name = pilgrimage.2008.court_physician + trigger = { exists = scope:traveling_court_physician } + show_as_tooltip = { remove_trait = ill } + hidden_effect = { + recover_from_disease_effect = { DISEASE = ill } + } + ai_chance = { + base = 1000 + } + } + #Oh no + option = { + name = pilgrimage.2008.a + custom_tooltip = pilgrimage.2008.a.tt + #Decide whether to go home or continue on + trigger_event = health.1001 + ai_chance = { + base = 100 + } + } +} + +#Develop pneumonia +# by Petter Vilberg +pilgrimage.2009 = { + type = character_event + title = pilgrimage.2009.t + desc = pilgrimage.2009.desc + theme = travel_pilgrimage +# override_background = { reference = army_camp } + left_portrait = { + character = root + animation = sick + } + cooldown = { years = 10 } + trigger = { + has_trait = ill + can_contract_disease_trigger = { DISEASE = pneumonic } + involved_activity ?= { has_activity_type = activity_pilgrimage } + } + immediate = { + show_as_tooltip = { add_trait_force_tooltip = pneumonic } + hidden_effect = { + #Adds the trait, sends event "health.2201" to those who care if health is brought too low + contract_disease_effect = { + DISEASE = pneumonic + TREATMENT_EVENT = no + } + } + } + #Ok, guess I have pneumonia now + option = { + name = pilgrimage.2009.a + ai_chance = { + base = 100 + } + } + after = { + #Decide whether to go home or continue on + trigger_event = health.1001 + } +} + +scripted_trigger pilgrimage_2010_mystic_ruler = { + faith = root.faith + has_trait = lifestyle_mystic + is_available_ai = yes + NOR = { + AND = { # Not your liege + liege ?= root + } + # Not a family member + any_close_or_extended_family_member = { + this = root + } + # Not a direct vassal + any_vassal = { + this = root + } + AND = { # Not your religious head + exists = root.faith.religious_head + this = root.faith.religious_head + } + } + location = root.location +} + +scripted_trigger pilgrimage_2010_mystic_home_ruler = { + faith = root.faith + this != root + exists = capital_province + location = root.location +} + +scripted_effect pilgrimage_2013_outcome_effect = { + if = { + limit = { + NOT = { has_trait = lifestyle_mystic } + } + add_trait = lifestyle_mystic + } + else_if = { + limit = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_mystic + value = 10 + } + } + else_if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_perk_points = 1 + } + else_if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 10 + } + } + else = { + add_piety = medium_piety_gain + } +} + +scripted_effect pilgrimage_2014_outcome_effect = { + random_list = { + 50 = { + show_chance = no + desc = pilgrimage.2014.pilfered.desc + send_interface_toast = { + title = pilgrimage.2014.pilfered.t + left_icon = root + remove_short_term_gold = tiny_gold_value + stress_impact = { base = miniscule_stress_impact_loss } + } + } + 50 = { + show_chance = no + desc = pilgrimage.2014.restful.desc + send_interface_toast = { + title = pilgrimage.2014.restful.t + left_icon = root + stress_impact = { base = minor_stress_impact_loss } + add_character_modifier = { + modifier = pilgrimage_rest_and_good_health_modifier + years = 5 + } + } + } + } +} + +scripted_effect pilgrimage_2015_outcome_effect = { + duel = { + skill = learning + target = scope:2010_mystic + 50 = { + desc = pilgrimage.2015.learning.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3 + } + send_interface_toast = { + title = pilgrimage.2015.learning.t + left_icon = root + right_icon = scope:2010_mystic + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + else = { add_learning_skill = 1 } + + } + } + 50 = { + desc = pilgrimage.2015.piety.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3 + min = 5 + } + send_interface_toast = { + title = pilgrimage.2015.piety.t + left_icon = root + right_icon = scope:2010_mystic + add_piety = miniscule_piety_gain + } + } + } +} + +# Meet a Mystic on your journey +#by Petter Vilberg +pilgrimage.2010 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2010.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = cynical + has_trait = paranoid + has_trait = craven + } + } + animation = personality_cynical + } + triggered_animation = { + trigger = { + OR = { + has_trait = lifestyle_mystic + has_trait = scholar + has_trait = trusting + has_trait = gregarious + } + } + animation = admiration + } + animation = idle + } + right_portrait = { + character = scope:2010_mystic + animation = personality_rational + } + cooldown = { years = 5 } + trigger = { + is_ai = no + NOT = { has_trait = lifestyle_mystic } + religion = { is_in_family = rf_abrahamic } + faith = { + any_faith_ruler = { + OR = { + pilgrimage_2010_mystic_ruler = yes + pilgrimage_2010_mystic_home_ruler = yes + } + } + } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + # Find our Mystic + faith = { + if = { + limit = { + any_faith_ruler = { pilgrimage_2010_mystic_ruler = yes } + } + random_faith_ruler = { + limit = { pilgrimage_2010_mystic_ruler = yes } + save_scope_as = 2010_mystic + } + } + else = { + random_faith_ruler = { + limit = { pilgrimage_2010_mystic_home_ruler = yes } + save_scope_as = mystic_home_owner + } + create_character = { + template = default_mystic_character + location = scope:mystic_home_owner.capital_province + culture = scope:mystic_home_owner.culture + save_scope_as = 2010_mystic + } + } + } + add_character_flag = in_pilgrimage_event_chain + } + # Let's see what this person is up to + option = { + name = pilgrimage.2010.a + custom_tooltip = pilgrimage.2010.a.tt + worldly_type_option_effect = yes + current_travel_plan = { delay_travel_plan = { days = 90 } } + trigger_event = { + id = pilgrimage.2011 + days = 5 + } + } + # Smells of heresy to me! + option = { + name = pilgrimage.2010.b + pious_type_option_effect = yes + add_piety = minor_piety_gain + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 30 + } + } + } + # Mystic gets out with the Pilgrim trait for flavor + hidden_effect = { + scope:2010_mystic = { + if = { + limit = { + NOT = { has_trait = pilgrim } + } + add_trait = pilgrim + } + } + } + } +} + +#The Mystic has a lot to say about your faith +pilgrimage.2011 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2011.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = cynical + has_trait = paranoid + has_trait = craven + } + } + animation = worry + } + animation = thinking + } + right_portrait = { + character = scope:2010_mystic + animation = personality_rational + } + trigger = { + scope:2010_mystic = { + is_available_adult = yes + is_imprisoned = no + } + } + on_trigger_fail = { + trigger_event = pilgrimage.2012 + } + # Tell me more! + option = { + name = pilgrimage.2011.a + custom_tooltip = pilgrimage.2011.a.tt + trigger = { learning >= decent_skill_rating } + show_as_unavailable = { always = yes } + skill = learning + bonus_to_all_types_effect = yes + show_as_tooltip = { pilgrimage_2013_outcome_effect = yes } + trigger_event = { + id = pilgrimage.2013 + days = 5 + } + } + # I'm just going to take a nap + option = { + name = pilgrimage.2011.b + custom_tooltip = pilgrimage.2011.b.tt + show_as_tooltip = { pilgrimage_2014_outcome_effect = yes } + worldly_type_option_effect = yes + trigger_event = { + id = pilgrimage.2014 + days = 5 + } + } + # Engage in vigorous debate + option = { + name = pilgrimage.2011.c + custom_tooltip = pilgrimage.2011.c.tt + show_as_tooltip = { pilgrimage_2015_outcome_effect = yes } + pious_type_option_effect = yes + trigger_event = { + id = pilgrimage.2015 + days = 5 + } + } + after = { + current_travel_plan = { resume_travel_plan = yes } #Paused in the preceding event + } +} + +#Fallback in case something happened in between events +pilgrimage.2012 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2012.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = cynical + has_trait = paranoid + has_trait = craven + } + } + animation = worry + } + animation = thinking + } + right_portrait = { + character = scope:2010_mystic + animation = personality_rational + } + option = { + name = pilgrimage.2012.a + add_character_modifier = { + modifier = pilgrimage_religious_reflections_modifier + years = 5 + } + } + after = { + current_travel_plan = { resume_travel_plan = yes } + remove_character_flag = in_pilgrimage_event_chain + } +} + +#Outcome of engaging +pilgrimage.2013 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2013.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = cynical + has_trait = paranoid + has_trait = craven + } + } + animation = worry + } + animation = thinking + } + right_portrait = { + character = scope:2010_mystic + animation = happiness + } + immediate = { + pilgrimage_2013_outcome_effect = yes + } + #Woo! Mystic! + option = { + name = pilgrimage.2013.a + add_trait = lifestyle_mystic + } + after = { + # Mystic gets out with the Pilgrim trait for flavor + hidden_effect = { + scope:2010_mystic = { + if = { + limit = { + NOT = { has_trait = pilgrim } + } + add_trait = pilgrim + } + } + } + current_travel_plan = { resume_travel_plan = yes } + remove_character_flag = in_pilgrimage_event_chain + } +} + +#Outcome of sleeping +pilgrimage.2014 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2014.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOT = { has_character_modifier = pilgrimage_rest_and_good_health_modifier } + } + animation = worry + } + animation = thinking + } + right_portrait = { + character = scope:2010_mystic + animation = personality_rational + } + immediate = { + pilgrimage_2014_outcome_effect = yes + } + #Alright + option = { + #Someone stole gold! + name = { + trigger = { + NOT = { has_character_modifier = pilgrimage_rest_and_good_health_modifier } + } + text = pilgrimage.2014.a + } + #Very restful + name = pilgrimage.2014.a_restful + } + after = { + # Mystic gets out with the Pilgrim trait for flavor + hidden_effect = { + scope:2010_mystic = { + if = { + limit = { + NOT = { has_trait = pilgrim } + } + add_trait = pilgrim + } + } + } + current_travel_plan = { resume_travel_plan = yes } + remove_character_flag = in_pilgrimage_event_chain + } +} + +#Outcome of debating +pilgrimage.2015 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2015.desc + theme = travel_pilgrimage + left_portrait = { + character = scope:2010_mystic + animation = personality_rational + } + immediate = { + pilgrimage_2015_outcome_effect = yes + } + #Go debate team! + option = { + name = pilgrimage.2015.a + } + after = { + set_local_variable = { + name = debated_mystic + value = yes + } + # Mystic gets out with the Pilgrim trait for flavor + hidden_effect = { + scope:2010_mystic = { + if = { + limit = { + NOT = { has_trait = pilgrim } + } + add_trait = pilgrim + } + } + } + current_travel_plan = { resume_travel_plan = yes } + remove_character_flag = in_pilgrimage_event_chain + } +} + +scripted_trigger pilgrimage_2020_suitable_thief = { + is_healthy = yes + AND = { + age >= 6 + age <= 25 + } + has_trait = greedy + OR = { + has_trait = deceitful + has_trait = cynical + } + OR = { + NOT = { has_trait = zealous } + any_secret = { + type = secret_non_believer + } + } + is_lowborn = yes +} + +#Pilgrimage thieves +# by Filippa Gannholm Kirsten +pilgrimage.2020 = { + type = character_event + title = pilgrimage.2020.t + desc = { + desc = pilgrimage.2020.desc + first_valid = { + triggered_desc = { + trigger = { + scope:thief_to_convert = { is_adult = yes } + } + desc = pilgrimage.2020.desc_adult + } + triggered_desc = { + trigger = { + scope:thief_to_convert = { is_adult = no } + } + desc = pilgrimage.2020.desc_child + } + } + } + theme = travel_pilgrimage + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = cynical } + animation = personality_cynical + } + triggered_animation = { + trigger = { + NOT = { + any_secret = { type = secret_non_believer } + } + has_trait = zealous + } + animation = personality_zealous + } + triggered_animation = { + trigger = { + OR = { + has_trait = wrathful + has_trait = irritable + has_trait = vengeful + } + } + animation = anger + } + animation = personality_coward + } + right_portrait = { + character = scope:thief_to_convert + animation = fear + } + cooldown = { years = 2 } + trigger = { + #Only if you're an established pilgrim + has_trait = pilgrim + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + pilgrimage_2020_suitable_thief = yes + } + } + random_pool_character = { + province = root.location + limit = { pilgrimage_2020_suitable_thief = yes } + save_scope_as = thief_to_convert + } + } + else = { + random_list = { + #50% it's a child + 50 = { + create_character = { + template = child_thief_character + location = root.location + age = { 6 15 } + culture = root.location.county.culture + faith = root.location.county.faith + after_creation = { + set_to_lowborn = yes + } + save_scope_as = thief_to_convert + } + } + #Or a young adult + 50 = { + create_character = { + template = generic_peasant_character + location = root.location + age = { 16 25 } + culture = root.location.county.culture + faith = root.location.county.faith + after_creation = { + set_to_lowborn = yes + } + save_scope_as = thief_to_convert + } + } + } + scope:thief_to_convert = { add_character_flag = created_thief } + } + scope:thief_to_convert = { add_character_flag = use_stealth_clothes } + } + #Have them join you + option = { + name = { + trigger = { + scope:thief_to_convert = { is_adult = no } + } + text = pilgrimage.2020.a_child + } + name = { + trigger = { + scope:thief_to_convert = { is_adult = yes } + } + text = pilgrimage.2020.a + } + #We should be a nice and approachable person + trigger = { + has_trait = pilgrim + OR = { + has_trait = family_first + has_trait = forgiving + } + NOR = { + has_trait = sadistic + has_trait = callous + } + } + flavor = pilgrimage.2020.a.flavor + bonus_to_all_types_effect = yes + if = { + limit = { + faith = { trait_is_virtue = forgiving } + } + add_piety = medium_piety_gain + } + else_if = { + limit = { + faith = { trait_is_virtue = vengeful } + } + add_piety = minor_piety_loss + } + else = { add_piety = minor_piety_gain } + #Hook 'em' + if = { + limit = { + can_add_hook = { + target = scope:thief_to_convert + type = loyalty_hook + } + } + add_hook = { + target = scope:thief_to_convert + type = loyalty_hook + } + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:thief_to_convert + NEW_COURT_OWNER = root + } + scope:thief_to_convert = { + #Add them to your family + if = { + limit = { is_adult = no } + if = { + limit = { + root = { is_male = yes } + } + set_father = root + } + else = { set_mother = root } + set_house = root.house + add_opinion = { + modifier = grateful_child + target = root + opinion = 40 + } + } + else = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 40 + } + } + add_character_flag = recruited_thief + } + stress_impact = { + paranoid = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + } + factor = 0 + } + ai_value_modifier = { + ai_compassion = 2 + ai_honor = 1 + } + } + } + #Try to convert them + option = { + name = pilgrimage.2020.b + trigger = { + religion = { is_in_family = rf_abrahamic } + } + pious_type_option_effect = yes + duel = { + skill = diplomacy + value = average_skill_rating + #Implore them to change their ways + 50 = { + desc = pilgrimage.2020.b.success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + modifier = { + has_perk = zealous_proselytizer_perk + factor = 2 + } + modifier = { + has_trait = zealous + add = 10 + } + modifier = { + has_trait = cynical + add = -10 + } + scope:thief_to_convert = { add_character_flag = convinced_thief } + custom_tooltip = pilgrimage.2020.b.success.tt + hidden_effect = { + current_travel_plan = { delay_travel_plan = { days = 90 } } + } + trigger_event = { + id = pilgrimage.2021 + days = 3 + } + } + #You fail and they run away + 50 = { + desc = pilgrimage.2020.b.failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -5 + min = -5 + } + send_interface_toast = { + title = pilgrimage.2020.b.failure.t + left_icon = root + remove_short_term_gold = minor_gold_value + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + ai_value_modifier = { + ai_zeal = 2 + ai_boldness = 1 + ai_honor = 1 + ai_vengefulness = -2 + } + } + } + #Let them go in peace + option = { + #What will God say about that... + name = { + trigger = { has_trait = cynical } + text = pilgrimage.2020.c_cynical + } + #We all do what we must + name = pilgrimage.2020.c + worldly_type_option_effect = yes + remove_short_term_gold = minor_gold_value + stress_impact = { + greedy = minor_stress_impact_gain + forgiving = medium_stress_impact_loss + cynical = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_boldness = -0.5 + } + } + } + after = { + scope:thief_to_convert = { + if = { + limit = { + has_character_flag = created_thief + NOR = { + has_character_flag = recruited_thief + has_character_flag = convinced_thief + } + } + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + else = { remove_character_flag = use_stealth_clothes } + } + } +} + +pilgrimage.2021 = { + type = character_event + title = pilgrimage.2021.t + desc = pilgrimage.2021.desc + theme = travel_pilgrimage + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = sadistic } + animation = personality_dishonorable + } + animation = thinking + } + right_portrait = { + character = scope:thief_to_convert + animation = shame + } + immediate = { + scope:thief_to_convert = { + remove_character_flag = recruited_thief + remove_character_flag = convinced_thief + } + hidden_effect = { + current_travel_plan = { resume_travel_plan = yes } + } + } + #Convert them to your faith and have them spread the word + option = { + name = pilgrimage.2021.a + pious_type_option_effect = yes + add_character_modifier = { + modifier = pilgrimage_religion_spread_modifier + years = 5 + } + scope:thief_to_convert = { + if = { + limit = { + root.faith != this.faith + } + set_character_faith = root.faith + } + } + stress_impact = { + zealous = medium_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 2 + } + modifier = { + has_trait = cynical + factor = 0 + } + ai_value_modifier = { + ai_zeal = 2 + } + } + } + #Whips always make _me_ feel better + option = { + name = pilgrimage.2021.b + trigger = { + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:judaism_religion + } + OR = { + has_trait = flagellant + has_trait = sadistic + } + scope:thief_to_convert = { is_adult = yes } + } + pious_type_option_effect = yes + add_dread = medium_dread_gain + add_character_modifier = { + modifier = pilgrimage_flogging_spread_modifier + years = 5 + } + scope:thief_to_convert = { + if = { + limit = { + root.faith != this.faith + } + set_character_faith = root.faith + } + add_trait = flagellant + increase_wounds_no_death_effect = { REASON = flagellant } + } + stress_impact = { + flagellant = major_stress_impact_loss + sadistic = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = flagellant + factor = 2 + } + ai_value_modifier = { + ai_zeal = 2 + } + } + } + #Have them work off their sins for you + option = { + name = pilgrimage.2021.c + flavor = pilgrimage.2021.c.flavor + add_character_modifier = { + modifier = pilgrimage_work_work_modifier + years = 5 + } + scope:thief_to_convert = { + if = { + limit = { + can_add_hook = { + target = scope:thief_to_convert + type = loyalty_hook + } + } + add_hook = { + target = scope:thief_to_convert + type = loyalty_hook + } + } + } + add_courtier = scope:thief_to_convert + stress_impact = { + zealous = medium_stress_impact_gain + cynical = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + ai_value_modifier = { + ai_zeal = -2 + } + } + } + after = { + if = { + limit = { + current_travel_plan ?= { is_paused = yes } + } + current_travel_plan = { resume_travel_plan = yes } + } + } +} + +#Sea: Massive rainbow +# by Filippa Gannholm Kirsten +pilgrimage.2030 = { + type = character_event + title = pilgrimage.2030.t + desc = pilgrimage.2030.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = scholar + learning > high_skill_rating + } + } + animation = thinking + } + triggered_animation = { + trigger = { + OR = { + has_activity_intent = zealot_intent + AND = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + } + } + animation = personality_zealous + } + triggered_animation = { + trigger = { has_trait = cynical } + animation = boredom + } + animation = admiration + } + right_portrait = { + character = scope:portrait_entourage_character + animation = disbelief + } + trigger = { + location = { is_sea_province = yes } + current_travel_plan ?= { + any_entourage_character = { + count > 5 + } + any_entourage_character = { + NOT = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + this = root + } + } + } + } + immediate = { + current_travel_plan = { + random_entourage_character = { + limit = { + NOT = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + this = root + } + } + save_scope_as = portrait_entourage_character + } + } + } + #Acshually... + option = { + name = pilgrimage.2030.a + trigger = { + OR = { + has_trait = scholar + learning > high_skill_rating + } + } + flavor = pilgrimage.2030.a.flavor + very_worldly_type_option_effect = yes + current_travel_plan = { + every_entourage_character = { + custom = every_entourage_tt + add_opinion = { + target = root + modifier = pilgrimage_besserwisser_opinion + opinion = -5 + } + } + } + if = { + limit = { + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = 10 + } + } + #Besserwisser gonna besserwiss + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 200 + modifier = { + has_trait = zealous + factor = 0 + } + } + } + #This IS a sign from God! + option = { + name = pilgrimage.2030.b + trigger = { + OR = { + has_activity_intent = zealot_intent + AND = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + } + } + if = { + limit = { has_activity_intent = zealot_intent } + custom_tooltip = available_because_intent_tt + } + flavor = pilgrimage.2030.b.flavor + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 5 + } + } + stress_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + } + } + #Reflectors gonna reflect + option = { + name = pilgrimage.2030.c + trigger = { has_activity_intent = reflection_intent } + custom_tooltip = available_because_intent_tt + bonus_to_all_types_effect = yes + add_piety = miniscule_piety_gain + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + #That's cool, I guess + option = { + name = pilgrimage.2030.d + worldly_type_option_effect = yes + stress_impact = { + arbitrary = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + } + } +} + +#Sea: Go fish +# by Filippa Gannholm Kirsten +pilgrimage.2040 = { + type = character_event + title = pilgrimage.2040.t + desc = pilgrimage.2040.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:portrait_entourage_character + animation = personality_content + } + trigger = { + location = { is_sea_province = yes } + current_travel_plan ?= { + any_entourage_character = { + count > 5 + } + any_entourage_character = { + is_adult = yes + NOT = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + this = root + } + } + } + } + immediate = { + current_travel_plan = { + random_entourage_character = { + limit = { + is_adult = yes + NOT = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + this = root + } + } + save_scope_as = portrait_entourage_character + } + } + } + #Fishing! + option = { + name = pilgrimage.2040.a + worldly_type_option_effect = yes + duel = { + skill = prowess + value = average_skill_rating + #Catch a big fish + 50 = { + desc = pilgrimage.2040.a.success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3 + min = -49 + } + send_interface_toast = { + title = pilgrimage.2040.a.success.t + left_icon = root + if = { + limit = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = medium_stress_impact_loss + } + } + add_prestige = medium_prestige_gain + } + } + #Catch a small fish + 50 = { + desc = pilgrimage.2040.a.less_success.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3 + min = -49 + } + send_interface_toast = { + title = pilgrimage.2040.a.less_success.t + left_icon = root + if = { + limit = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + } + } + add_prestige = minor_prestige_gain + } + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + modifier = { + has_trait = lazy + factor = 0 + } + } + } + #Praying! + option = { + name = pilgrimage.2040.b + trigger = { + OR = { + has_activity_intent = zealot_intent + AND = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + } + } + if = { + limit = { has_activity_intent = zealot_intent } + custom_tooltip = available_because_intent_tt + } + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + factor = 0 + } + } + } + #Nap time! + option = { + name = pilgrimage.2040.c + trigger = { + OR = { + has_activity_intent = reflection_intent + has_trait = lazy + } + NOT = { has_character_modifier = pilgrimage_chill_ship_modifier } + } + if = { + limit = { has_activity_intent = reflection_intent } + custom_tooltip = available_because_intent_tt + } + add_character_modifier = { + modifier = pilgrimage_chill_ship_modifier + years = 5 + } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + } + } + #Nah + option = { + name = pilgrimage.2040.d + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + } + } +} + +#Sea: Shipwrecked pilgrims +# by Filippa Gannholm Kirsten +pilgrimage.2050 = { + type = character_event + title = pilgrimage.2050.t + desc = pilgrimage.2050.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_compassionate + } + right_portrait = { + character = scope:first_pilgrim + animation = pain + } + lower_center_portrait = { + character = scope:second_pilgrim + } + lower_right_portrait = { + character = scope:third_pilgrim + } + trigger = { + location = { is_sea_province = yes } + is_ai = no + } + cooldown = { years = 30 } + immediate = { + # Create pilgrims + hidden_effect = { + create_character = { + template = pool_repopulate_local_flavor + dynasty = none + trait = pilgrim + location = root.location + save_scope_as = first_pilgrim + } + scope:first_pilgrim = { set_to_lowborn = yes } + create_character = { + template = pool_repopulate_local_flavor + age = { 6 10 } + dynasty = none + faith = scope:first_pilgrim.faith + culture = scope:first_pilgrim.culture + location = root.location + save_scope_as = second_pilgrim + } + scope:second_pilgrim = { set_to_lowborn = yes } + create_character = { + template = pool_repopulate_local_flavor + dynasty = none + faith = scope:first_pilgrim.faith + culture = scope:first_pilgrim.culture + trait = pilgrim + location = root.location + save_scope_as = third_pilgrim + } + scope:third_pilgrim = { set_to_lowborn = yes } + } + } + #Come aboard + option = { + name = pilgrimage.2050.a + worldly_type_option_effect = yes + custom_tooltip = pilgrimage.2050.a.tt + #We're not very fond of their culture + if = { + limit = { + root.culture != scope:first_pilgrim.culture + scope:first_pilgrim = { + culture = { + cultural_acceptance = { + target = root.culture + value < low_positive_culture_acceptance + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + compassionate = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + } + } + #We're OK with their culture + else = { + stress_impact = { + base = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + trusting = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + paranoid = minor_stress_impact_gain + } + } + scope:first_pilgrim = { add_to_court_and_entourage_effect = yes } + scope:second_pilgrim = { add_to_court_and_entourage_effect = yes } + scope:third_pilgrim = { add_to_court_and_entourage_effect = yes } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + factor = 0 + } + modifier = { + short_term_gold < minor_gold_value + factor = 0 + } + } + } + #...if you convert + option = { + name = pilgrimage.2050.b + trigger = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + faith != scope:first_pilgrim.faith + } + duel = { + skill = learning + target = scope:first_pilgrim + #Success + 60 = { + desc = pilgrimage.2050.b.success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3 + min = -49 + } + modifier = { + has_perk = zealous_proselytizer_perk + add = 25 + } + modifier = { + has_trait = zealous + add = 25 + } + send_interface_toast = { + title = pilgrimage.2050.b.success.t + left_icon = root + right_icon = scope:first_pilgrim + desc = pilgrimage.2050.b.success.desc + add_piety = medium_piety_gain + very_pious_type_option_effect = yes + } + #Keeping this outside of the toast so as to not cut off the toast + scope:first_pilgrim = { add_to_court_and_entourage_effect = yes } + scope:second_pilgrim = { add_to_court_and_entourage_effect = yes } + scope:third_pilgrim = { add_to_court_and_entourage_effect = yes } + scope:first_pilgrim = { + set_character_faith = root.faith + } + scope:second_pilgrim = { + set_character_faith = root.faith + } + scope:third_pilgrim = { + set_character_faith = root.faith + } + } + #Failure + 40 = { + desc = pilgrimage.2050.b.failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3 + min = -49 + } + send_interface_toast = { + title = pilgrimage.2050.b.failure.t + left_icon = root + add_prestige = medium_prestige_loss + } + scope:first_pilgrim = { death = { death_reason = death_drowned } } + scope:second_pilgrim = { death = { death_reason = death_drowned } } + scope:third_pilgrim = { death = { death_reason = death_drowned } } + } + } + stress_impact = { + humble = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + #... let's just move on + option = { + name = pilgrimage.2050.c + add_dread = minor_dread_gain + current_travel_plan = { + every_entourage_character = { + custom = every_entourage_tt + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -15 + } + } + } + scope:first_pilgrim = { death = { death_reason = death_drowned } } + scope:second_pilgrim = { death = { death_reason = death_drowned } } + scope:third_pilgrim = { death = { death_reason = death_drowned } } + stress_impact = { + paranoid = medium_stress_impact_loss + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + factor = 0 + } + modifier = { + has_trait = trusting + factor = 0 + } + } + } +} + +############################ +## 'Temptation' Events +# 2500-2999 +## by Bianca Savazzi & Sean Hughes +############################ +# pilgrimage.2101 - Rakish or Lustful character considers making a pit stop, or perhaps, a detour to the local brothels +# pilgrimage.2501-4 - Persistent Beggar +# pilgrimage.2511 - Cocky Lordling +# +# + +scripted_effect pilgrimage_2101_save_scopes_effect = { + location = { save_scope_as = brothel_location } + trigger_event = { + id = lover.8102 + days = 30 + } +} + +#Rakish or Lustful character considers making a pit stop, or perhaps, a detour to the local brothels +# by Bianca Savazzi +pilgrimage.2101 = { + type = character_event + title = pilgrimage.2101.t + desc = { + desc = pilgrimage.2101.desc + } + cooldown = { years = 5 } + theme = travel_pilgrimage + override_background = { reference = tavern } + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:naked_tempter + animation = fanning_coyly + } + trigger = { + stress > 0 + OR = { + has_trait = lustful + has_trait = rakish + } + is_location_valid_for_travel_event_on_land = yes + might_cheat_on_every_partner_trigger = yes + } + immediate = { + add_character_flag = { + flag = no_sex_stress_loss + days = 30 + } + random_list = { + 50 = { + # Spawn a temptress for event if.... + trigger = { + OR = { + #lesbian + AND = { + is_female = yes + has_sexuality = homosexual + } + #straight or asexual guy + AND = { + is_male = yes + OR = { + has_sexuality = heterosexual + has_sexuality = asexual + } + } + #asexual woman and homo is ok + AND = { + has_sexuality = asexual + is_female = yes + faith = { has_doctrine = doctrine_homosexuality_accepted } + } + #bisexual + has_sexuality = bisexual + } + } + create_character = { + age = 30 + gender = female + location = root.location + faith = root.location.faith + culture = root.location.culture + dynasty = none + random_traits = no + random_traits_list = { + count = 2 + deceitful = {} + brave = {} + gregarious = {} + ambitious = {} + vengeful = {} + gluttonous = {} + temperate = {} + greedy = {} + generous = {} + lazy = {} + diligent = {} + wrathful = {} + calm = {} + patient = {} + impatient = {} + arrogant = {} + honest = {} + arbitrary = {} + just = {} + paranoid = {} + trusting = {} + compassionate = {} + callous = {} + sadistic = {} + stubborn = {} + fickle = {} + forgiving = {} + } + trait = lustful + trait = rakish + trait = deviant + trait = fecund + trait = beauty_good_3 + save_scope_as = naked_tempter + } + } + 50 = { + # Spawn a tempter for event if.... + trigger = { + OR = { + #gay + AND = { + is_male = yes + has_sexuality = homosexual + } + #straight or asexual woman + AND = { + is_female = yes + OR = { + has_sexuality = asexual + has_sexuality = heterosexual + } + } + #asexual man and homo is ok + AND = { + has_sexuality = asexual + is_male = yes + faith = { has_doctrine = doctrine_homosexuality_accepted } + } + #bisexual + has_sexuality = bisexual + } + } + create_character = { + age = 30 + gender = male + location = root.location + faith = root.location.faith + culture = root.location.culture + dynasty = none + random_traits = no + random_traits_list = { + count = 2 + deceitful = {} + brave = {} + gregarious = {} + ambitious = {} + vengeful = {} + gluttonous = {} + temperate = {} + greedy = {} + generous = {} + lazy = {} + diligent = {} + wrathful = {} + calm = {} + patient = {} + impatient = {} + arrogant = {} + honest = {} + arbitrary = {} + just = {} + paranoid = {} + trusting = {} + compassionate = {} + callous = {} + sadistic = {} + stubborn = {} + fickle = {} + forgiving = {} + } + trait = lustful + trait = rakish + trait = deviant + trait = fecund + trait = beauty_good_3 + save_scope_as = naked_tempter + } + } + } + scope:naked_tempter = { + add_character_flag = is_naked + } + } + #Option A: Visit one brothel + option = { + name = pilgrimage.2101.a + if = { + limit = { + faith = { trait_is_virtue = lustful } + } + pious_type_option_effect = yes + add_piety = minor_piety_gain + } + else_if = { + limit = { + faith = { trait_is_sin = lustful } + } + worldly_type_option_effect = yes + add_piety = medium_piety_loss + } + add_stress = medium_stress_loss + had_sex_with_effect = { + CHARACTER = scope:naked_tempter + PREGNANCY_CHANCE = pregnancy_chance + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:naked_tempter + NEW_COURT_OWNER = root + } + hidden_effect = { + #STD transmission + random_list = { + 50 = { + trigger = { is_attracted_to_men = yes } + had_sex_with_unknown_effect = { GENDER = male } + } + 50 = { + trigger = { is_attracted_to_women = yes } + had_sex_with_unknown_effect = { GENDER = female } + } + } + if = { + limit = { + NOT = { + government_has_flag = government_is_mandala + house ?= { has_house_power_parameter = aspect_of_creation } + } + } + random = { + chance = 33 + pilgrimage_2101_save_scopes_effect = yes + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = 0.5 + ai_greed = -1 + } + modifier = { + NOR = { + is_married = no + any_spouse = { + count = all + save_temporary_scope_as = partner + root = { might_cheat_on_partner_trigger = { PARTNER = scope:partner } } + } + } + factor = 0 + } + } + } + #Option B: Visit ALL brothels! + option = { + name = pilgrimage.2101.b + if = { + limit = { + faith = { trait_is_virtue = lustful } + } + pious_type_option_effect = yes + add_piety = medium_piety_gain + } + else_if = { + limit = { + faith = { trait_is_sin = lustful } + } + worldly_type_option_effect = yes + add_piety = major_piety_loss + } + remove_short_term_gold = tiny_gold_value + rakish_brothel_night_effect = yes + had_sex_with_effect = { + CHARACTER = scope:naked_tempter + PREGNANCY_CHANCE = pregnancy_chance + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:naked_tempter + NEW_COURT_OWNER = root + } + hidden_effect = { + if = { + limit = { + NOT = { + government_has_flag = government_is_mandala + house ?= { has_house_power_parameter = aspect_of_creation } + } + } + random = { + chance = 75 + pilgrimage_2101_save_scopes_effect = yes + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2 + ai_energy = 2 + ai_greed = -2 + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value #AI should not spend money they don't have + } + modifier = { + NOR = { + is_married = no + any_spouse = { + count = all + save_temporary_scope_as = partner + root = { might_cheat_on_partner_trigger = { PARTNER = scope:partner } } + } + } + factor = 0 + } + } + } + #Option C: Stay away from the houses of pleasure + option = { + name = pilgrimage.2101.c + if = { + limit = { + faith = { trait_is_sin = lustful } + } + add_piety = miniscule_piety_gain + pious_type_option_effect = yes + } + else_if = { + limit = { + faith = { trait_is_virtue = lustful } + } + add_piety = minor_piety_loss + } + else = { + add_piety = miniscule_piety_gain + } + stress_impact = { + base = minor_stress_impact_gain + lustful = minor_stress_impact_gain #gets added on top of the base + rakish = medium_stress_impact_gain #gets added on top of the base + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 2 + ai_energy = -1 + } + } + } + after = { + remove_character_flag = no_sex_stress_loss + scope:naked_tempter = { + remove_character_flag = is_naked + } + if = { + limit = { + is_ai = yes + } + scope:naked_tempter = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +scripted_effect generosity_piety_stress_effect = { + if = { + limit = { + faith = { + OR = { + trait_is_virtue = generous + trait_is_virtue = compassionate + } + } + } + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + } + else_if = { + limit = { + faith = { trait_is_sin = generous } + } + add_piety = minor_piety_loss + } + + stress_impact = { + greedy = minor_stress_gain + callous = minor_stress_gain + arrogant = minor_stress_gain + vengeful = minor_stress_gain + } +} + +scripted_effect parsimony_piety_stress_effect = { + if = { + limit = { + faith = { trait_is_sin = generous } + } + add_piety = miniscule_piety_gain + } + else_if = { + limit = { + faith = { + OR = { + trait_is_virtue = generous + trait_is_virtue = compassionate + } + } + } + add_piety = minor_piety_loss + } + + stress_impact = { + generous = medium_stress_gain + compassionate = minor_stress_gain + forgiving = minor_stress_gain + trusting = minor_stress_gain + } +} + +#Persistent Beggar +# by Sean Hughes +pilgrimage.2501 = { + type = character_event + title = pilgrimage.2501.t + desc = { + desc = pilgrimage.2501.desc.opening + first_valid = { + triggered_desc = { + trigger = { faith = { trait_is_virtue = generous } } + desc = pilgrimage.2501.desc.virtue.generous + } + triggered_desc = { + trigger = { faith = { trait_is_sin = generous } } + desc = pilgrimage.2501.desc.sin.generous + } + triggered_desc = { + trigger = { faith = { trait_is_virtue = compassionate } } + desc = pilgrimage.2501.desc.virtue.compassionate + } + } + } + theme = travel_pilgrimage + left_portrait = { + character = root + animation = steward + } + right_portrait = { + character = scope:beggar + animation = beg + outfit_tags = { beggar_rags } + } + cooldown = { years = 5 } + trigger = { + OR = { + AND = { + faith = { trait_is_virtue = generous } + NOT = { has_trait = generous } + OR = { + has_trait = greedy + has_trait = callous + has_trait = arrogant + has_trait = vengeful + } + } + AND = { + faith = { trait_is_virtue = compassionate } + NOT = { has_trait = compassionate } + OR = { + has_trait = greedy + has_trait = callous + has_trait = arrogant + has_trait = vengeful + } + } + AND = { + faith = { trait_is_sin = generous } + has_trait = generous + } + } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + create_character = { + age = 31 + gender_female_chance = 0.5 + trait = education_intrigue_1 + trait = stubborn + diplomacy = 8 + martial = 3 + stewardship = 4 + intrigue = 8 + learning = 1 + random_traits_list = { + count = 2 + compassionate = {} + gregarious = {} + deceitful = {} + generous = {} + content = {} + greedy = {} + just = {} + } + random_traits = yes + location = root.location + faith = root.faith # They 'convert' if they ever join your court. + culture = root.location.culture + save_scope_as = beggar + } + scope:beggar = { + add_character_flag = peasant_outfit + } + } + #Give gold + option = { + name = { + trigger = { + faith = { + OR = { + trait_is_virtue = generous + trait_is_virtue = compassionate + } + } + } + text = pilgrimage.2501.a.virtue + } + name = { + trigger = { + faith = { trait_is_sin = generous } + } + text = pilgrimage.2501.a.sin + } + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + } + pay_short_term_gold = { + target = scope:beggar + gold = minor_gold_value + } + generosity_piety_stress_effect = yes + add_character_flag = { + flag = pilgrimage_2501_gave_gold + days = 3 + } + trigger_event = pilgrimage.2502 + } + #Go away + option = { + name = pilgrimage.2501.b + parsimony_piety_stress_effect = yes + trigger_event = pilgrimage.2502 + } + #Die! + option = { + name = pilgrimage.2501.c.arrogant + trigger = { has_trait = arrogant } + scope:beggar = { + death = { + killer = root + death_reason = death_execution + } + } + add_dread = minor_dread_gain + } +} + +#Beggar wants another favor for their sister +pilgrimage.2502 = { + type = character_event + title = pilgrimage.2502.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = pilgrimage_2501_gave_gold + } + desc = pilgrimage.2502.desc.gave + } + desc = pilgrimage.2502.desc.refused + } + desc = pilgrimage.2502.desc.end + } + theme = travel_pilgrimage + left_portrait = { + character = root + animation = steward + } + right_portrait = { + character = scope:beggar + animation = beg + outfit_tags = { beggar_rags } + } + # Option A: Relent and give the beggar (more) money. + option = { + name = pilgrimage.2502.a + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + } + pay_short_term_gold = { + target = scope:beggar + gold = minor_gold_value + } + generosity_piety_stress_effect = yes + if = { + limit = { + has_character_flag = pilgrimage_2501_gave_gold + } + trigger_event = pilgrimage.2503 + } + else = { + hidden_effect = { + scope:beggar = { + death = { + death_reason = death_vanished + } + } + } + } + } + # Option B (Special): Refuse, losing Generous and gaining Callous + option = { + name = pilgrimage.2502.b + trigger = { + NOT = { has_character_flag = pilgrimage_2501_gave_gold } + faith = { trait_is_sin = generous } + has_trait = generous + NOR = { + has_trait = callous + has_trait = compassionate + has_trait = sadistic + } + } + remove_trait = generous + add_trait = callous + stress_impact = { + base = major_stress_impact_gain + } + hidden_effect = { + scope:beggar = { + death = { + death_reason = death_vanished + } + } + } + } + # Option C: Refuse the beggar's second request, normal effects. + option = { + name = { + trigger = { has_character_flag = pilgrimage_2501_gave_gold } + text = pilgrimage.2502.c.gave + } + name = { + trigger = { + NOT = { + has_character_flag = pilgrimage_2501_gave_gold + } + } + text = pilgrimage.2502.c.refused + } + parsimony_piety_stress_effect = yes + hidden_effect = { + scope:beggar = { + death = { + death_reason = death_vanished + } + } + } + } +} + +#Beggar wants favor for sisters children +pilgrimage.2503 = { + type = character_event + title = pilgrimage.2503.t + desc = pilgrimage.2503.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = steward + } + right_portrait = { + character = scope:beggar + animation = beg + outfit_tags = { beggar_rags } + } + + option = { + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + } + name = pilgrimage.2503.a + pay_short_term_gold = { + target = scope:beggar + gold = minor_gold_value + } + generosity_piety_stress_effect = yes + trigger_event = { + id = pilgrimage.2504 + days = 0 + } + } + + option = { + name = pilgrimage.2503.b + + parsimony_piety_stress_effect = yes + } + +} +#Happy beggar +pilgrimage.2504 = { + type = character_event + title = pilgrimage.2504.t + desc = pilgrimage.2504.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = steward + } + right_portrait = { + character = scope:beggar + animation = beg + outfit_tags = { beggar_rags } + } + #Add trait option + option = { + show_unlock_reason = no + trigger = { + OR = { + is_ai = no + short_term_gold >= medium_gold_value + } + OR = { + # Must be able to replace a personality trait with either Generous... + AND = { + faith = { + trait_is_virtue = generous + } + NOT = { has_trait = generous } + OR = { + has_trait = greedy + has_trait = callous + has_trait = arrogant + has_trait = vengeful + } + } + # ...or with Compassionate + AND = { + faith = { + trait_is_virtue = compassionate + } + NOR = { + has_trait = compassionate + has_trait = sadistic + } + OR = { + has_trait = callous + has_trait = greedy + has_trait = arrogant + has_trait = vengeful + } + } + } + } + name = pilgrimage.2504.a + flavor = pilgrimage.2504.a.flavor + pious_type_option_effect = yes + remove_short_term_gold = medium_gold_value + if = { + limit = { + faith = { + trait_is_virtue = generous + } + NOT = { has_trait = generous } + } + if = { + limit = { has_trait = greedy } + remove_trait = greedy + } + else_if = { + limit = { has_trait = callous } + remove_trait = callous + } + else_if = { + limit = { has_trait = arrogant } + remove_trait = arrogant + } + else_if = { + limit = { has_trait = vengeful } + remove_trait = vengeful + } + stress_impact = { + base = major_stress_impact_gain + } + add_trait_force_tooltip = generous + } + else = { + if = { + limit = { has_trait = callous } + remove_trait = callous + } + else_if = { + limit = { has_trait = greedy } + remove_trait = greedy + } + else_if = { + limit = { has_trait = arrogant } + remove_trait = arrogant + } + else_if = { + limit = { has_trait = vengeful } + remove_trait = vengeful + } + stress_impact = { + base = major_stress_impact_gain + } + add_trait_force_tooltip = compassionate + } + } + #Hook/courtier option + option = { + name = pilgrimage.2504.b + add_courtier = scope:beggar + scope:beggar = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 50 + } + add_trait = loyal + } + add_hook = { + type = loyalty_hook + target = scope:beggar + } + } + #Dismiss them + option = { + name = { + trigger = { + faith = { trait_is_virtue = generous } + } + text = pilgrimage.2504.c.virtue + } + name = { + trigger = { + faith = { trait_is_sin = generous } + } + text = pilgrimage.2504.c.sin + } + very_pious_type_option_effect = yes + add_piety = miniscule_piety_gain + hidden_effect = { + scope:beggar = { + death = { + death_reason = death_vanished + } + } + } + } +} + +scripted_trigger pilgrimage_2511_valid_lordling = { + is_available = yes + ai_compassion < 0 + age >= 13 + highest_held_title_tier < root.highest_held_title_tier + NOR = { + has_trait = shy + has_trait = humble + } + OR = { + has_trait = arrogant + has_trait = arbitrary + has_trait = sadistic + has_trait = wrathful + has_trait = vengeful + } + religion = root.religion + location = root.location +} + +#Cocky Lordling +# by Sean Hughes +pilgrimage.2511 = { + type = character_event + title = pilgrimage.2511.t + desc = { + desc = pilgrimage.2511.desc.start + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + faith = { trait_is_sin = vengeful } + } + desc = pilgrimage.2511.desc.vengeful.christian + } + triggered_desc = { + trigger = { + faith = { trait_is_sin = vengeful } + } + desc = pilgrimage.2511.desc.vengeful + } + triggered_desc = { + trigger = { + faith = { trait_is_sin = wrathful } + } + desc = pilgrimage.2511.desc.wrathful + } + } + } + theme = travel_pilgrimage + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:lordling + animation = anger + } + cooldown = { years = 2 } + trigger = { + OR = { + # Potentially perf-heavy, restricted to players and important AIs. + is_ai = no + highest_held_title_tier >= tier_kingdom + } + # Character personality must conflict at least somewhat with their faith's relevant virtue(s). + faith = { + OR = { + trait_is_sin = wrathful + trait_is_sin = vengeful + } + } + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = arrogant + } + NOR = { + has_trait = forgiving + has_trait = humble + has_trait = calm + } + # Ensure a valid target exists for the event. + location = { + county.holder ?= { + OR = { + pilgrimage_2511_valid_lordling = yes + AND = { + primary_heir ?= { + pilgrimage_2511_valid_lordling = yes + } + } + } + } + } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + # Compile a list of possible lordlings. + location = { + county.holder = { + if = { + limit = { pilgrimage_2511_valid_lordling = yes } + add_to_list = arrogant_lordlings + } + if = { + limit = { exists = primary_heir } + primary_heir = { + if = { + limit = { + pilgrimage_2511_valid_lordling = yes + NOT = { is_in_list = arrogant_lordlings } + } + add_to_list = arrogant_lordlings + } + } + } + every_vassal = { + if = { + limit = { + pilgrimage_2511_valid_lordling = yes + NOT = { is_in_list = arrogant_lordlings } + } + add_to_list = arrogant_lordlings + } + if = { + limit = { exists = primary_heir } + primary_heir = { + if = { + limit = { + pilgrimage_2511_valid_lordling = yes + NOT = { is_in_list = arrogant_lordlings } + } + add_to_list = arrogant_lordlings + } + } + } + } + } + } + random_in_list = { + list = arrogant_lordlings + # Prefer to select characters who are not powerful yet, but could become powerful. + limit = { + any_heir_title = { + tier >= root.highest_held_title_tier + } + } + alternative_limit = { + any_heir_title = { + tier = tier_duchy + } + } + alternative_limit = { + always = yes + } + + weight = { + base = 1 + + # Trait modifiers - between +158 and +0, depending on traits + modifier = { + has_trait = arrogant + add = 100 + } + modifier = { + has_trait = wrathful + add = 33 + } + modifier = { + has_trait = sadistic + add = 25 + } + + # Age modifiers - between +75 (at 13 years old) and +0 (at 28 years old) + modifier = { + add = { + value = 28 + subtract = age + multiply = 5 + min = 0 + } + } + } + + save_scope_as = lordling + } + } + #Fight! + option = { + name = pilgrimage.2511.a + worldly_type_option_effect = yes + add_prestige = minor_prestige_gain + scope:lordling = { + increase_wounds_effect = { REASON = fight } + } + progress_towards_rival_effect = { + CHARACTER = scope:lordling + REASON = rival_pilgrimage_lordling + OPINION = 0 + } + } + #Go 4 athletic + option = { + name = pilgrimage.2511.c + trigger = { + has_traits_that_negate_athletic_trigger = no #Are we already athletic or does any of our traits contradict athletic? + health >= 2.0 + } + add_prestige = minor_prestige_loss + stress_impact = { + base = massive_stress_impact_gain + } + add_trait = athletic + } + #Calm down + option = { + name = pilgrimage.2511.b + pious_type_option_effect = yes + add_prestige = minor_prestige_loss + add_piety = miniscule_piety_gain + stress_impact = { + arrogant = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + } +} + +################################ +# Religion-specific Journey Events +# 3001-3999 +# by Sean Hughes +################################ +# 3001-3100: Christianity +# pilgrimage.3001 - Zealous priest giving sermon in freezing rains +# pilgrimage.3002-3 - Naked preacher claiming to have reclaimed the lost innocence of Adam & Eve +# pilgrimage.3004 - Doomsayer claiming the end is nigh! +# +# 3101-3200: Islam +# pilgrimage.3102 - Ziyarat - Why am I taking this pilgrimage? +# +# 3201-3300: Hinduism +# pilgrimage.3201 - Ritual purification in a river +# pilgrimage.3202 - Contemplating the universe +# +# 3301-3400: Buddhism +# pilgrimage.3301 - Critical Wanderer +# pilgrimage.3302 - The Wisdom of Goats +# pilgrimage.3303 - Kalama Sutta +# +## 3401-3500: Dharmic +# pilgrimage.3401 - Brahmacharya Challenged +# +###3001-3100: Christianity +#Zealous priest giving sermon in freezing rains +# by Sean Hughes +pilgrimage.3001 = { + type = character_event + title = pilgrimage.3001.t + desc = pilgrimage.3001.desc + theme = travel_pilgrimage + override_background = { reference = terrain_travel } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = cynical } + animation = personality_cynical + } + triggered_animation = { + trigger = { has_trait = zealous } + animation = admiration + } + animation = personality_honorable + } + right_portrait = { + character = scope:zealous_priest + animation = personality_zealous + outfit_tags = { bishop_outfit } + } + cooldown = { years = 15 } + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + play_music_cue = "mx_cue_general_crusade_event_2" + random_dummy_gender_clergy_effect = yes + create_character = { + age = 40 + gender = scope:dummy_clergy_gender + location = root.location + faith = root.faith + culture = root.culture + save_scope_as = zealous_priest + } + } + #Listen diligently + option = { + name = pilgrimage.3001.a + pious_type_option_effect = yes + add_piety = medium_piety_gain + if = { + limit = { + NOT = { has_trait = whole_of_body } + } + if = { + limit = { + NOT = { has_trait = ill } + } + random = { + chance = { + value = 35 + add = { + value = health + multiply = -2.5 + } + } + show_as_tooltip = { add_trait = ill } + custom_tooltip = pilgrimage.3001.a.tt + hidden_effect = { + #Adds the trait, sends event "health.2201" to those who care if health is brought too low + contract_disease_effect = { + DISEASE = ill + TREATMENT_EVENT = no + } + } + } + } + else_if = { + limit = { + NOT = { has_trait = pneumonic } + } + random = { + chance = { + value = 15 + add = { + value = health + multiply = -1.5 + } + } + show_as_tooltip = { add_trait = pneumonic } + custom_tooltip = pilgrimage.2009.a.tt + hidden_effect = { + #Adds the trait, sends event "health.2201" to those who care if health is brought too low + contract_disease_effect = { + DISEASE = pneumonic + TREATMENT_EVENT = no + } + } + } + } + } + give_pilgrim_xp_effect = yes + } + #No + option = { + name = pilgrimage.3001.b + add_piety = miniscule_piety_loss + } + after = { + hidden_effect = { + scope:zealous_priest = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +#Naked preacher claiming to have reclaimed the lost innocence of Adam & Eve +# by Sean Hughes +pilgrimage.3002 = { + type = character_event + title = pilgrimage.3002.t + desc = pilgrimage.3002.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = disapproval + } + triggered_animation = { + trigger = { + any_secret = { type = secret_non_believer } + } + animation = thinking + } + animation = disbelief + } + right_portrait = { + character = scope:naked_preacher + animation = personality_zealous + } + cooldown = { years = 30 } + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + faith = { + NOR = { + has_doctrine = tenet_natural_primitivism + has_doctrine = special_doctrine_naked_priests + } + } + NOT = { + any_courtier = { has_character_flag = convinced_naked_preacher } + } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + create_character = { + age = 40 + gender_female_chance = 50 + location = root.location + faith = faith:adamites + culture = root.culture + trait = zealous + random_traits_list = { + count = 2 + calm = {} + brave = {} + gregarious = {} + ambitious = {} + stubborn = {} + arrogant = {} + } + trait = lifestyle_mystic + save_scope_as = naked_preacher + } + scope:naked_preacher = { add_character_flag = is_naked } + } + #Convert to Adamitism + option = { + name = pilgrimage.3002.a + trigger = { + # Should not show up for the AI with strict regional heresies enabled + OR = { + NOT = { has_game_rule = strict_regional_heresy } + is_ai = no + } + } + worldly_type_option_effect = yes + add_piety = massive_piety_loss + set_character_faith = faith:adamites + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:naked_preacher + NEW_COURT_OWNER = root + } + ai_chance = { + base = 1 + modifier = { + add = 9 + has_trait = cynical + has_trait = trusting + } + modifier = { + add = { + value = ai_rationality + multiply = -1 + max = 0 + } + } + modifier = { + add = { + value = ai_zeal + multiply = -1 + min = 0 + } + } + modifier = { + add = 100 + OR = { + ai_rationality <= -100 + has_trait = lunatic + has_trait = possessed + } + } + modifier = { + factor = 0 + any_independent_ruler = { + faith = faith:adamites + } + } + } + debug_log = "Character converting to Adamitism" + } + #Heretic! + option = { + name = pilgrimage.3002.b + pious_type_option_effect = yes + add_piety = minor_piety_gain + ai_chance = { base = 100 } + } + #Convert 'em! + option = { + name = pilgrimage.3002.c + pious_type_option_effect = yes + add_prestige = medium_prestige_loss + duel = { + skill = learning + value = average_skill_rating + 50 = { + desc = pilgrimage.3002.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3 + min = -49 + } + scope:naked_preacher = { add_character_flag = convinced_naked_preacher } + custom_tooltip = pilgrimage.3002.c.success.tt + #Convinced Adamite + trigger_event = pilgrimage.3003 + } + 50 = { + desc = pilgrimage.3002.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3 + min = -49 + } + send_interface_toast = { + title = pilgrimage.3002.c.failure + left_icon = root + add_learning_lifestyle_xp = medium_lifestyle_xp + } + } + } + ai_chance = { + base = 100 + } + } + #Nah + option = { + name = pilgrimage.3002.d + worldly_type_option_effect = yes + add_prestige = minor_prestige_gain + ai_chance = { + base = 100 + } + } + after = { + scope:naked_preacher = { + if = { + limit = { + NOT = { has_character_flag = convinced_naked_preacher } + } + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + if = { + limit = { is_courtier_of = root } + remove_character_flag = is_naked + } + } + } +} + +#Follow-up: Convinced Adamite +# by Filippa Gannholm Kirsten +pilgrimage.3003 = { + type = character_event + title = pilgrimage.3003.t + desc = pilgrimage.3003.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:naked_preacher + animation = disbelief + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + scope:naked_preacher = { set_character_faith = root.faith } + add_learning_lifestyle_xp = major_lifestyle_xp + add_piety = medium_piety_gain + } + #Put on some clothes and join us + option = { + name = pilgrimage.3003.a + flavor = pilgrimage.3003.a.flavor + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:naked_preacher + NEW_COURT_OWNER = root + } + } + #Good for you, now spread the word + option = { + name = pilgrimage.3003.b + add_character_modifier = { + modifier = pilgrimage_religion_spread_modifier + years = 5 + } + } + after = { + scope:naked_preacher = { remove_character_flag = is_naked } + } +} + +#Doomsayer claiming the end is nigh! +# by Sean Hughes +pilgrimage.3004 = { + type = character_event + title = pilgrimage.3004.t + desc = pilgrimage.3004.desc + theme = travel_pilgrimage + override_background = { reference = market } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:doomsayer + animation = personality_zealous + outfit_tags = { monk_outfit } + } + cooldown = { years = 15 } + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + random_dummy_gender_clergy_effect = yes + create_character = { + age = 40 + trait = devoted + gender = scope:dummy_clergy_gender + location = root.location + faith = root.faith + culture = root.culture + save_scope_as = doomsayer + } + } + #Outwit them + option = { + name = pilgrimage.3004.a + trigger = { learning >= high_skill_rating } + pious_type_option_effect = yes + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 10 + } + } + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + add_piety = medium_piety_gain + add_prestige = minor_prestige_value + } + #Entertaining! + option = { + name = pilgrimage.3004.b + worldly_type_option_effect = yes + add_stress = medium_stress_loss + } + #Heretic! + option = { + name = pilgrimage.3004.c + pious_type_option_effect = yes + add_piety = medium_piety_value + } + after = { + hidden_effect = { + if = { + limit = { + is_ai = yes + } + scope:doomsayer = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } + } +} + +###3101-3200: Islam +#Ziyarat - Why am I taking this pilgrimage? +# by Sean Hughes +pilgrimage.3102 = { + type = character_event + title = pilgrimage.3102.t + desc = pilgrimage.3102.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = thinking + } + cooldown = { years = 2 } + trigger = { + religion = religion:islam_religion + is_location_valid_for_travel_event_on_land = yes + } + # See distant places + option = { + name = pilgrimage.3102.a + worldly_type_option_effect = yes + if = { + limit = { + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = 5 + } + } + add_stress = minor_stress_loss + add_piety = miniscule_piety_gain + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + add_character_modifier = { + modifier = pilgrimage_worldly_modifier + years = 10 + } + ai_chance = { + base = 50 + compare_modifier = { + value = stress + multiplier = 2 + } + } + } + # My zeal drives me! + option = { + name = pilgrimage.3102.b + trigger = { + NOT = { has_trait = cynical } + } + pious_type_option_effect = yes + show_as_unavailable = { + has_trait = cynical + } + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 5 + } + } + add_piety = minor_piety_gain + add_character_modifier = { + modifier = dedicated_to_pilgrimage_modifier + years = 10 + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + # I have... questions + option = { + name = pilgrimage.3102.c + trigger = { + NOT = { has_trait = zealous } + } + pious_type_option_effect = yes + show_as_unavailable = { + has_trait = zealous + } + stress_impact = { + base = minor_stress_impact_gain + cynical = minor_stress_impact_loss + + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + add_learning_lifestyle_xp = massive_lifestyle_xp + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + } + } + } +} + +###3201-3300: Hinduism +#Ritual purification in a river +# by Sean Hughes +pilgrimage.3201 = { + type = character_event + title = pilgrimage.3201.t + desc = pilgrimage.3201.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_content + } + cooldown = { years = 2 } + trigger = { + religion = religion:hinduism_religion + is_location_valid_for_travel_event_on_land = yes + } + #Yep yep + option = { + name = pilgrimage.3201.a + pious_type_option_effect = yes + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 5 + } + } + add_prestige = minor_prestige_loss + add_piety = minor_piety_gain + stress_impact = { + arrogant = minor_stress_gain + } + } + #This is beneath me + option = { + name = pilgrimage.3201.b + add_piety = minor_piety_loss + add_prestige = medium_prestige_gain + stress_impact = { + humble = medium_stress_gain + zealous = minor_stress_gain + compassionate = minor_stress_gain + } + } +} + +#Contemplating the universe +pilgrimage.3202 = { + type = character_event + title = pilgrimage.3202.t + desc = { + first_valid = { + triggered_desc = { + trigger = { religion = religion:hinduism_religion } + desc = pilgrimage.3202.desc.hinduism + } + triggered_desc = { + trigger = { religion = religion:buddhism_religion } + desc = pilgrimage.3202.desc.buddhism + } + triggered_desc = { + trigger = { religion = religion:jainism_religion } + desc = pilgrimage.3202.desc.jainism + } + triggered_desc = { + trigger = { faith = { has_doctrine = tenet_sanctity_of_nature } } + desc = pilgrimage.3202.desc.nature + } + } + desc = pilgrimage.3202.desc.end + } + theme = travel_pilgrimage + left_portrait = { + character = root + animation = thinking + } + cooldown = { years = 2 } + trigger = { + OR = { + religion = religion:hinduism_religion + religion = religion:buddhism_religion + religion = religion:jainism_religion + faith = { has_doctrine = tenet_sanctity_of_nature } + } + location = { + OR = { + terrain = forest + terrain = jungle + terrain = taiga + } + } + is_location_valid_for_travel_event_on_land = yes + current_travel_plan = { next_destination_progress < 0.8 } + } + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + } + #Contempllllation + option = { + name = pilgrimage.3202.a + pious_type_option_effect = yes + current_travel_plan = { + delay_travel_plan = { months = 2 } + } + add_learning_lifestyle_xp = major_lifestyle_xp + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 20 + } + } + stress_impact = { + base = minor_stress_loss + calm = minor_stress_loss + patient = minor_stress_loss + impatient = medium_stress_gain + } + } + #Jalla jalla + option = { + name = pilgrimage.3202.b + current_travel_plan = { + add_destination_progress = { weeks = 2 } + } + custom_tooltip = pilgrimage.3202.b.tt + stress_impact = { + zealous = minor_stress_gain + patient = minor_stress_gain + } + } + after = { + mp_resume_travel_plan = yes + } +} + +###3301-3400: Buddhism +#Critical Wanderer +# by Sean Hughes +pilgrimage.3301 = { + type = character_event + title = pilgrimage.3301.t + desc = pilgrimage.3301.desc + theme = pilgrimage_activity + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = gluttonous + has_trait = arrogant + has_trait = greedy + } + } + animation = disapproval + } + animation = personality_coward + } + right_portrait = { + character = scope:wanderer + animation = personality_zealous + outfit_tags = { monk_outfit } + } + cooldown = { years = 5 } + trigger = { + religion = religion:buddhism_religion + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + random_dummy_gender_clergy_effect = yes + create_character = { + age = 80 + gender = scope:dummy_clergy_gender + location = root.location + faith = root.faith + culture = root.culture + save_scope_as = wanderer + } + } + #Show off your learning + option = { + name = pilgrimage.3301.c + bonus_to_all_types_effect = yes + trigger = { learning >= high_skill_rating } + show_as_unavailable = { learning < high_skill_rating } + add_prestige = medium_prestige_gain + add_piety = minor_piety_gain + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 10 + } + } + } + #...alright then + option = { + name = pilgrimage.3301.a + pious_type_option_effect = yes + add_piety = medium_piety_gain + add_prestige = minor_prestige_loss + stress_impact = { + base = minor_stress_gain + temperate = minor_stress_loss + gluttonous = minor_stress_gain + arrogant = minor_stress_gain + greedy = minor_stress_gain + } + } + #My things! + option = { + name = pilgrimage.3301.b + add_piety = minor_piety_loss + stress_impact = { + humble = minor_stress_gain + } + } + after = { + hidden_effect = { + scope:wanderer = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} +#The Wisdom of Goats +# by Laurence Kennedy +pilgrimage.3302 = { + type = character_event + title = pilgrimage.3302.t + desc = pilgrimage.3302.desc + theme = pilgrimage_activity + theme = travel_pilgrimage + override_background = { reference = terrain } + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:mountain_local + animation = personality_zealous + } + cooldown = { years = 5 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + location = { + is_mountainous_or_hilly_trigger = yes + } + religion = religion:buddhism_religion + } + immediate = { + create_character = { + age = 80 + template = default_mystic_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = mountain_local + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a reflection journey + has_activity_intent = reflection_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Judgemental Relection + option = { + name = pilgrimage.3302.a + add_piety = miniscule_piety_gain + stress_impact = { + humble = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + has_trait = cynical + } + } + } + #Humble Relection + option = { + name = pilgrimage.3302.b + pious_type_option_effect = yes + stress_impact = { + arrogant = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = arrogant + has_trait = cynical + } + } + } + #Harvest the salt + option = { + name = pilgrimage.3302.c + flavor = pilgrimage.3302.c.flavor + add_gold = { + value = tiny_gold_value + max = 15 + } + stress_impact = { + base = minor_stress_gain + generous = minor_stress_gain + zealous = minor_stress_gain + greedy = minor_stress_loss + } + } + #gets rid of old man + after = { + scope:mountain_local = { + silent_disappearance_effect = yes + } + } +} +# Kalama Sutta +# by Laurence Kennedy +pilgrimage.3303 = { + type = character_event + title = pilgrimage.3303.t + desc = pilgrimage.3303.desc + theme = travel_pilgrimage + + left_portrait = { + character = root + animation = chaplain + } + right_portrait = { + character = scope:wisdom_seeker + animation = beg + + } + cooldown = { years = 5 } + + trigger = { + #Only for Buddhist + religion = religion:buddhism_religion + #make sure it is a city or castle + is_location_valid_for_travel_event_on_land = yes + location = { + OR = { + has_holding_type = castle_holding + has_holding_type = city_holding + } + #is there a leader there to meet you + province_owner = { + is_available_ai_adult = yes + } + } + } + immediate = { + #set scope for location and find province owner + location = { + save_scope_as = place_to_teach + province_owner = { + save_scope_as = wisdom_seeker + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a reflection journey + has_activity_intent = reflection_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Intellectual/zealous + option = { + name = pilgrimage.3303.a + add_piety = medium_piety_gain + pious_type_option_effect = yes + #Improves the conversion rate of your court champlain + location.county = { + add_county_modifier = { + modifier = buddhist_teachings_conversion_modifier + #giving fifteen years because this might incentivize you to conquer the territory so you can take advantage of this and conversions can take awhile. + years = 15 + } + } + stress_impact = { + humble = minor_stress_impact_gain + cynical = medium_stress_impact_gain + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = cynical + has_trait = humble + } + } + } + #Open minded + option = { + name = pilgrimage.3303.b + flavor = pilgrimage.3303.b.flavor + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = pilgrimage_conversion_modifier + years = 5 + } + stress_impact = { + zealous = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + humble = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + has_trait = arrogant + } + } + } +} +### 3401-3500: Dharmic +# Brahmacharya Challenged +# by Laurence Kennedy +pilgrimage.3401 = { + type = character_event + title = pilgrimage.3401.t + desc = pilgrimage.3401.desc + theme = pilgrimage_activity + theme = travel_pilgrimage + #background for riverside province + override_background = { + trigger = { + location = { + is_riverside_province = yes + } + } + reference = bp3_riverside + } + #background for lakeside province + override_background = { + trigger = { + location = { + is_lakeside_province = yes + } + } + reference = wilderness_wetlands + } + #background for coastal province + override_background = { + trigger = { + location = { + is_coastal = yes + } + } + reference = bp3_coast + } + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:bather + animation = personality_zealous + outfit_tags = { no_clothes } + } + cooldown = { years = 10 } + + trigger = { + #Only for Dharmic + religion = { + OR = { + this = religion:buddhism_religion + this = religion:hinduism_religion + } + } + #make sure you are by a body of water + is_location_valid_for_travel_event_on_land = yes + location = { + OR = { + is_riverside_province = yes + is_lakeside_province = yes + is_coastal = yes + } + } + #find someone in the entourage that you are attracted to + current_travel_plan = { + any_entourage_character = { + root = { + is_attracted_to_gender_of = prev + } + is_physically_able_adult = yes + are_characters_sensible_lovers_trigger = { + INSTIGATING_LOVER = root + TARGET_OF_LOVE = this + } + } + } + + } + immediate = { + #This is for loc to name body of water + location = { + random_neighboring_province = { + limit = { + OR = { + is_river_province = yes + is_lake_province = yes + is_sea_province = yes + } + } + save_scope_as = body_of_water + } + } + #find person to be tempted by + current_travel_plan = { + random_entourage_character = { + limit = { + root = { + is_attracted_to_gender_of = prev + } + is_physically_able_adult = yes + are_characters_sensible_lovers_trigger = { + INSTIGATING_LOVER = root + TARGET_OF_LOVE = this + } + } + save_scope_as = bather + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a reflection journey + has_activity_intent = reflection_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Give in to temptation + option = { + name = pilgrimage.3401.a + add_character_modifier = { + modifier = pilgrimage_seduction_modifier + years = 5 + } + stress_impact = { + chaste = minor_stress_impact_gain + zealous = medium_stress_impact_gain + lustful = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = chaste + has_trait = zealous + } + } + } + #stay resolute in your chastity + option = { + name = pilgrimage.3401.b + flavor = pilgrimage.3401.b.flavor + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + stress_impact = { + lustful = minor_stress_impact_gain + cynical = medium_stress_impact_gain + chaste = medium_stress_impact_loss + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lustful + has_trait = cynical + } + } + } +} + +############################ +## BP1 Events +## by Chad Uhl +############################ +# 6001-6010: BP1 +# pilgrimage.6001-5 - Sneaking off to a tavern with your pal +# pilgrimage.6006 - You find out your friend is a Non-Believer +# pilgrimage.6007 - You and a friend are on a pilgrimage and your friend is healed in a miracle performed by a wandering priest +# +# + +###6001 - 6010: BP1 +scripted_trigger pilgrimage_6001_friend_trigger = { + is_available_ai_adult = yes + faith = root.faith + trigger_if = { + limit = { faith.religion = religion:islam_religion } + has_trait = drunkard + } +} +#Sneaking off to a tavern with your pal +# by Chad Uhl +pilgrimage.6001 = { + type = character_event + title = pilgrimage.6001.t + desc = pilgrimage.6001.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:friend + animation = happiness + } + cooldown = { years = 20 } + trigger = { + has_bp1_dlc_trigger = yes + is_location_valid_for_travel_event_on_land = yes + current_travel_plan = { next_destination_progress > 0.5 } + trigger_if = { + limit = { faith.religion = religion:islam_religion } + has_trait = drunkard + } + any_relation = { + type = friend + pilgrimage_6001_friend_trigger = yes + } + } + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = reduce_stress_intent + factor = 2 + } + } + immediate = { + random_relation = { + type = friend + limit = { pilgrimage_6001_friend_trigger = yes } + save_scope_as = friend + } + } + # Let's chat + option = { + name = pilgrimage.6001.a + worldly_type_option_effect = yes + add_character_flag = in_pilgrimage_event_chain + current_travel_plan = { + delay_travel_plan = { days = 30 } + } + if = { + limit = { + scope:friend = { is_ruler = no } + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:friend + NEW_COURT_OWNER = root + } + } + if = { # Get schwasted at the tavern + limit = { + drinks_alcohol_trigger = yes + scope:friend = { + drinks_alcohol_trigger = yes + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + } + } + trigger_event = { + id = pilgrimage.6002 + days = 5 + } + } + else_if = { + limit = { + NOT = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + scope:friend = { + any_secret = { type = secret_non_believer } + } + } + trigger_event = { + id = pilgrimage.6006 + days = 5 + } + } + else_if = { + limit = { + scope:friend = { + OR = { + # Physical Traits + has_trait = wounded_1 + has_trait = wounded_2 + has_trait = wounded_3 + has_trait = impotent + has_trait = infirm + # Diseases + has_trait = ill + has_trait = bubonic_plague + has_trait = cancer + has_trait = consumption + has_trait = great_pox + has_trait = gout_ridden + has_trait = leper + has_trait = lovers_pox + has_trait = pneumonic + has_trait = smallpox + has_trait = typhus + } + } + } + trigger_event = { + id = pilgrimage.6007 + days = 5 + } + } + else = { # Fallback event + trigger_event = { + id = pilgrimage.6002 + days = 5 + } + } + reverse_add_opinion = { + target = scope:friend + modifier = friendliness_opinion + opinion = 15 + } + involved_activity = { + set_variable = { + name = friend_companion + value = scope:friend + } + } + stress_impact = { + zealous = miniscule_stress_impact_gain + shy = medium_stress_impact_gain + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -0.5 + } + } + } + # Leave me alone + option = { + name = pilgrimage.6001.b + reverse_add_opinion = { + target = scope:friend + modifier = insulted_opinion + opinion = -25 + } + stress_impact = { + gregarious = medium_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_zeal = -0.5 + } + } + } + # Zealous Option, bye bye pal + option = { + name = pilgrimage.6001.c + trigger = { has_trait = zealous } + pious_type_option_effect = yes + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 5 + } + } + reverse_add_opinion = { + target = scope:friend + modifier = insulted_opinion + opinion = -25 + } + remove_relation_friend = scope:friend + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_zeal = 1 + } + } + } +} + +#Tavern, Suggestion +pilgrimage.6002 = { + type = character_event + title = pilgrimage.6001.t + desc = pilgrimage.6002.desc + theme = travel_pilgrimage + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:friend + animation = happiness + } + # Hit up the tavern + option = { + name = pilgrimage.6002.a + custom_tooltip = pilgrimage.6002.a_tt + trigger_event = { + id = pilgrimage.6003 + days = 5 + } + stress_impact = { + zealous = major_stress_impact_gain + temperate = massive_stress_impact_gain + gluttonous = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -0.5 + } + } + } + # Politely decline + option = { + name = pilgrimage.6002.b + remove_character_flag = in_pilgrimage_event_chain + current_travel_plan = { resume_travel_plan = yes } + custom_tooltip = pilgrimage.6002.b_tt + stress_impact = { + zealous = minor_stress_impact_loss + temperate = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -0.5 + } + } + } + # Emphatic no + option = { + name = pilgrimage.6002.c + trigger = { has_trait = zealous } + remove_character_flag = in_pilgrimage_event_chain + current_travel_plan = { resume_travel_plan = yes } + custom_tooltip = pilgrimage.6002.b_tt + pious_type_option_effect = yes + give_pilgrim_xp_effect = yes + stress_impact = { + zealous = minor_stress_impact_loss + temperate = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -0.5 + } + } + } +} + +#Tavern, beginning +pilgrimage.6003 = { + type = character_event + title = pilgrimage.6001.t + desc = pilgrimage.6003.desc + theme = pilgrimage_destination + override_background = { reference = tavern } + left_portrait = { + character = root + animation = drink_goblet + } + right_portrait = { + character = scope:friend + animation = toast_goblet + } + immediate = { + play_music_cue = "mx_cue_in_taberna_instrumental" + } + #More drinks + option = { + name = pilgrimage.6003.a + custom_tooltip = pilgrimage.6003.a_tt + remove_short_term_gold = tiny_gold_value + random_list = { + 50 = { + if = { + limit = { + NOT = { has_trait = lifestyle_reveler } + } + add_trait = lifestyle_reveler + } + else_if = { + limit = { + has_trait = lifestyle_reveler + has_trait_xp = { + trait = lifestyle_reveler + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_reveler + value = 10 + } + } + } + 50 = { + #Nothing happens + } + } + trigger_event = { + id = pilgrimage.6004 + days = 3 + } + } + #Let's not + option = { + name = pilgrimage.6003.b + custom_tooltip = pilgrimage.6003.b.tt + current_travel_plan = { resume_travel_plan = yes } + } +} + +#Tavern, crash +pilgrimage.6004 = { + type = character_event + title = pilgrimage.6001.t + desc = pilgrimage.6004.desc + theme = pilgrimage_destination + override_background = { reference = bp1_wine_cellar } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:friend + animation = shock + } + immediate = { + play_music_cue = "mx_cue_in_taberna_instrumental" + random_list = { + 5 = { + # Empty field, significant chance that nothing happens + } + 1 = { + add_trait = wounded_1 + scope:friend = { add_trait = wounded_1 } + } + 2 = { + add_trait = wounded_1 + } + 2 = { + scope:friend = { add_trait = wounded_1 } + } + } + } + #_even more_ drinks! + option = { + name = pilgrimage.6004.a + custom_tooltip = pilgrimage.6004.a.tt + add_character_modifier = { + modifier = life_of_the_party_modifier + years = 5 + } + random_list = { + 50 = { + if = { + limit = { + NOT = { has_trait = lifestyle_reveler } + } + add_trait = lifestyle_reveler + } + else_if = { + limit = { + has_trait = lifestyle_reveler + has_trait_xp = { + trait = lifestyle_reveler + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_reveler + value = 10 + } + } + } + 50 = { + #Nothing happens + } + } + } + #Ayy + option = { + name = pilgrimage.6004.b + custom_tooltip = pilgrimage.6003.b.tt + current_travel_plan = { resume_travel_plan = yes } + } + after = { + trigger_event = { + id = pilgrimage.6005 + days = 5 + } + } +} + +#Returning to camp +pilgrimage.6005 = { + type = character_event + title = pilgrimage.6001.t + desc = { + desc = pilgrimage.6005.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:mad_inkeeper } + desc = pilgrimage.6005.desc.bad + } + triggered_desc = { + desc = pilgrimage.6005.desc.good + } + } + } + theme = pilgrimage_destination + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:friend + animation = paranoia + } + immediate = { + random_list = { + 3 = { + trigger = { has_character_modifier = life_of_the_party_modifier } + save_scope_as = mad_inkeeper + } + 7 = { + # 70% chance not to happen + } + } + if = { + limit = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:friend } + } + set_relation_best_friend = { + reason = best_friend_pilgrimage + copy_reason = friend + target = scope:friend + } + } + remove_character_flag = in_pilgrimage_event_chain + } + #Woo! Good time! + option = { + name = pilgrimage.6005.a + trigger = { + NOT = { exists = scope:mad_inkeeper } + } + } + #Pay for damages + option = { + name = pilgrimage.6005.b + trigger = { exists = scope:mad_inkeeper } + remove_short_term_gold = medium_gold_value + add_piety = minor_piety_gain + pious_type_option_effect = yes + } + #Nuh-uh + option = { + name = pilgrimage.6005.c + trigger = { exists = scope:mad_inkeeper } + add_prestige = medium_prestige_gain + add_piety = medium_piety_loss + worldly_type_option_effect = yes + } + after = { + if = { + limit = { + current_travel_plan ?= { + is_paused = yes + } + } + current_travel_plan = { resume_travel_plan = yes } + } + } +} + +#You find out your friend is a Non-Believer +# by Chad Uhl +pilgrimage.6006 = { + type = character_event + title = pilgrimage.6001.t + desc = pilgrimage.6006.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:friend + animation = anger + } + immediate = { + scope:friend = { + random_secret = { + type = secret_non_believer + reveal_to = root + save_scope_as = friend_secret + } + } + remove_character_flag = in_pilgrimage_event_chain + } + # Priviledge friendship + option = { + name = pilgrimage.6006.a + worldly_type_option_effect = yes + if = { + limit = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:friend } + } + set_relation_best_friend = { + reason = best_friend_pilgrimage + copy_reason = friend + target = scope:friend + } + } + reverse_add_opinion = { + target = scope:friend + modifier = grateful_opinion + opinion = 50 + } + } + # Priviledge faith + option = { + name = pilgrimage.6006.b + pious_type_option_effect = yes + scope:friend_secret = { expose_secret = root } + reverse_add_opinion = { + target = scope:friend + modifier = exposed_my_secret_opinion + } + add_piety = medium_piety_gain + } + # You become a non-believer + option = { + name = pilgrimage.6006.c + trigger = { + OR = { + has_trait = fickle + has_trait = arbitrary + } + NOR = { + any_secret = { type = secret_non_believer } + has_trait = zealous + } + } + add_secret = { type = secret_non_believer } + random_secret = { + type = secret_non_believer + reveal_to = scope:friend + } + if = { + limit = { can_set_relation_best_friend_trigger = { CHARACTER = scope:friend } } + set_relation_best_friend = { + reason = best_friend_pilgrimage + copy_reason = friend + target = scope:friend + } + } + } + after = { + current_travel_plan = { resume_travel_plan = yes } + } +} + +#You and a friend are on a pilgrimage and your friend is healed in a miracle performed by a wandering priest +# by Chad Uhl +pilgrimage.6007 = { + type = character_event + title = pilgrimage.6007.t + desc = pilgrimage.6007.desc + theme = travel_pilgrimage + left_portrait = { + character = scope:friend + animation = sadness + } + right_portrait = { + character = scope:6007_healer + animation = admiration + outfit_tags = { monk_outfit } + } + cooldown = { years = 10 } + immediate = { + play_music_cue = "mx_cue_sacredrite" + create_character = { + location = root.location + template = priest_character_template + faith = root.faith + culture = root.culture + gender_female_chance = root_faith_clergy_gender_female_chance + save_scope_as = 6007_healer + } + scope:6007_healer = { add_character_flag = no_hat } + } + # Priest makes a learning challenge for healing + option = { + name = pilgrimage.6007.a + pious_type_option_effect = yes + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + scope:6007_healer = { + duel = { + skill = learning + value = extremely_high_skill_rating + 30 = { + desc = pilgrimage.6007.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = pilgrimage.6007.a.success + left_icon = scope:friend + scope:friend = { # Remove relevant trait + if = { + limit = { has_trait = wounded_1 } + remove_trait = wounded_1 + } + else_if = { + limit = { has_trait = wounded_2 } + remove_trait = wounded_2 + } + else_if = { + limit = { has_trait = wounded_3 } + remove_trait = wounded_3 + } + else_if = { + limit = { has_trait = impotent } + remove_trait = impotent + } + else_if = { + limit = { has_trait = infirm } + remove_trait = infirm + } + else_if = { + limit = { has_trait = bubonic_plague } + remove_trait = bubonic_plague + if = { + limit = { is_ai = no } + add_achievement_global_variable_effect = { + VARIABLE = ce1_not_today_achievement_unlocked + VALUE = yes + } + } + } + else_if = { + limit = { has_trait = lovers_pox } + remove_trait = lovers_pox + } + else_if = { + limit = { has_trait = cancer } + remove_trait = cancer + } + else_if = { + limit = { has_trait = consumption } + remove_trait = consumption + } + else_if = { + limit = { has_trait = great_pox } + remove_trait = great_pox + } + else_if = { + limit = { has_trait = gout_ridden } + remove_trait = gout_ridden + } + else_if = { + limit = { has_trait = leper } + remove_trait = leper + } + else_if = { + limit = { has_trait = pneumonic } + remove_trait = pneumonic + } + else_if = { + limit = { has_trait = smallpox } + remove_trait = smallpox + } + else_if = { + limit = { has_trait = typhus } + remove_trait = typhus + } + else = { + remove_trait = ill + } + } + add_character_modifier = { + modifier = pilgrimage_miracle_witness_modifier + } + } + } + } + 70 = { + desc = pilgrimage.6007.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = pilgrimage.6007.a.failure + left_icon = scope:friend + scope:friend = { + add_character_modifier = { + modifier = pilgrimage_botched_miracle_modifier + } + } + } + } + } + } + } + stress_impact = { + trusting = minor_stress_impact_loss + zealous = medium_stress_impact_loss + cynical = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = 2 + } + } + } + #Let's not + option = { + name = pilgrimage.6007.b + add_prestige = minor_prestige_gain + stress_impact = { + trusting = medium_stress_impact_gain + zealous = major_stress_impact_gain + cynical = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -2 + } + } + } + after = { + remove_character_flag = in_pilgrimage_event_chain + current_travel_plan = { resume_travel_plan = yes } + scope:6007_healer = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } +} + +################################ +# Hajj Arrival Event +# 3101 +################################ +# pilgrimage.3101 - Entering state of Ihram + +pilgrimage.3101 = { + type = activity_event + title = pilgrimage.3101.t + desc = pilgrimage.3101.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_content + } + + trigger = { exists = scope:activity } + + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + scope:activity = { + add_activity_log_entry = { + key = hajj_arrived_log + tags = { arrived } + score = 50 + character = root + show_in_conclusion = yes + } + } + } + # Commit to the Irham + option = { + name = pilgrimage.3101.a + pious_type_option_effect = yes + add_piety = minor_piety_gain + stress_impact = { + base = medium_stress_gain + # Stress Loss (minimal) + zealous = medium_stress_loss + temperate = minor_stress_loss + humble = minor_stress_loss + chaste = minor_stress_loss + calm = minor_stress_loss + # Stress Gain (can be substantial) + lustful = medium_stress_gain + arrogant = medium_stress_gain + wrathful = medium_stress_gain + sadistic = medium_stress_gain + vengeful = medium_stress_gain + arbitrary = medium_stress_gain + + hashishiyah = minor_stress_gain + drunkard = minor_stress_gain + rakish = minor_stress_gain + + gluttonous = minor_stress_gain + impatient = minor_stress_gain + deceitful = minor_stress_gain + cynical = minor_stress_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + # I don't have to be that strict + option = { + name = pilgrimage.3101.b + worldly_type_option_effect = yes + add_piety = medium_piety_loss + stress_impact = { + # Stress Gain (major for some traits) + zealous = major_stress_gain + honest = medium_stress_gain + just = medium_stress_gain + # Stress Loss (can be minor to substantial) + lustful = medium_stress_loss + arrogant = medium_stress_loss + + sadistic = minor_stress_loss + vengeful = minor_stress_loss + wrathful = minor_stress_loss + gluttonous = minor_stress_loss + impatient = minor_stress_loss + deceitful = minor_stress_loss + cynical = minor_stress_loss + + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_zeal = -1 + ai_vengefulness = 1 + ai_honor = -1 + } + } + } + after = { + #The Hajj rituals usually play out in 3 days, but we'll utilize the full 3 months for remaining at the Pilgrimage destination + #They also happen in a decided order + trigger_event = { + #Pray at the Place of Abraham + id = hajj.3010 + days = 20 + } + } +} + +################################ +# Generic Arrival Events +# 4001-4999 +# by Petter Vilberg +################################ +# pilgrimage.4001 - Generic Destination +# pilgrimage.4002 - The Mystic you met on your journey is there! +# pilgrimage.4010 - Obligatory Pilgrimage - Skip Destination Events +# pilgrimage.4020 - Bury old host at Destination +# + +#Generic Destination +# by Petter Vilberg +pilgrimage.4001 = { + type = activity_event + title = pilgrimage.4001.t + desc = { + desc = pilgrimage.4001.desc + triggered_desc = { + trigger = { has_trait = cynical } + desc = pilgrimage.4001.cynical_end + } + } + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + artifact = { + target = scope:christian_saint_bone_scope + position = lower_right_portrait + } + trigger = { + } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + christian_saint_bone_creation_effect = yes + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#The Mystic you met on your journey is there! +# by Petter Vilberg +pilgrimage.4002 = { + type = activity_event + title = pilgrimage.4001.t + desc = pilgrimage.4002.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = personality_rational + } + right_portrait = { + character = scope:2010_mystic + animation = ecstasy + } + trigger = { + exists = scope:2010_mystic + OR = { + has_trait = lifestyle_mystic + exists = local_var:debated_mystic + } + scope:2010_mystic = { + is_available_ai = yes + } + } + #Fwiends! + option = { + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4002.a_cynical + } + name = pilgrimage.4002.a + trigger = { + NOT = { has_trait = cynical } + } + progress_towards_friend_effect = { + REASON = friend_pilgrimage + CHARACTER = scope:2010_mystic + OPINION = default_friend_opinion + } + ai_chance = { + base = 100 + } + } + #Hook up + option = { + name = pilgrimage.4002.b + trigger = { + has_trait = lustful + scope:2010_mystic = { + NOR = { + has_trait = chaste + has_trait = celibate + } + is_attracted_to_gender_of = root + might_cheat_on_every_partner_trigger = yes + } + is_attracted_to_gender_of = scope:2010_mystic + might_cheat_on_every_partner_trigger = yes + } + had_sex_with_effect = { + CHARACTER = scope:2010_mystic + PREGNANCY_CHANCE = pregnancy_chance + } + progress_towards_lover_effect = { + CHARACTER = scope:2010_mystic + REASON = lover_mystic_lust + OPINION = default_lover_opinion + } + ai_chance = { + base = 0 + modifier = { + OR = { + is_married = no + any_spouse = { + count = all + save_temporary_scope_as = partner + root = { + might_cheat_on_partner_trigger = { PARTNER = scope:partner } + } + } + } + add = 100 + } + } + } + after = { + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Obligatory Pilgrimage Skip Destination Events +pilgrimage.4010 = { + type = activity_event + title = pilgrimage.4010.t + desc = pilgrimage.4010.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOT = { + any_secret = { type = secret_non_believer } + } + has_trait = zealous + } + animation = stress + } + animation = boredom + } + immediate = { + give_pilgrim_trait_or_xp_effect = yes + } + #Zealous person regrets their decisiooon... + option = { + name = pilgrimage.4010.a + trigger = { + NOT = { + any_secret = { type = secret_non_believer } + } + has_trait = zealous + } + flavor = pilgrimage.4010.a.flavor + custom_tooltip = pilgrimage.4010.a.tt + add_character_flag = pilgrimage_counter_obligatory + if = { + limit = { + NOT = { + any_secret = { type = secret_non_believer } + } + has_trait = zealous + } + stress_impact = { + impatient = medium_stress_impact_gain + zealous = minor_stress_impact_loss + patient = minor_stress_impact_loss + fickle = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + } + } + trigger_event = { + on_action = pilgrimage_destination_events + delayed = yes + } + } + #I'm _done_. Beam me up, Scotty! + option = { + name = pilgrimage.4010.b + flavor = pilgrimage.4010.b.flavor + custom_tooltip = pilgrimage.4010.b.tt + scope:activity = { progress_activity_phase_after = { days = 1 } } + if = { + limit = { + NOT = { + any_secret = { type = secret_non_believer } + } + has_trait = zealous + } + stress_impact = { + zealous = massive_stress_impact_gain + impatient = medium_stress_impact_loss + lazy = minor_stress_impact_gain + } + } + else = { + stress_impact = { + impatient = medium_stress_impact_loss + lazy = minor_stress_impact_gain + } + } + } +} + +#Bury old host at Destination +pilgrimage.4020 = { + type = activity_event + title = pilgrimage.4020.t + desc = { + desc = pilgrimage.4020.desc.intro + first_valid = { + #Dearly departed mother/father + triggered_desc = { + trigger = { + is_close_family_of = scope:old_pilgrimage_host + has_character_flag = pilgrimage_liked_my_predecessor + } + desc = pilgrimage.4020.desc.relation_family_liked + } + #Dearly departed + triggered_desc = { + trigger = { has_character_flag = pilgrimage_liked_my_predecessor } + desc = pilgrimage.4020.desc.relation_liked + } + #Departed mother/father + triggered_desc = { + trigger = { + is_close_family_of = scope:old_pilgrimage_host + } + desc = pilgrimage.4020.desc.relation_family + } + #... dead liege? + desc = pilgrimage.4020.desc.relation_neutral + } + first_valid = { + triggered_desc = { + trigger = { has_character_flag = pilgrimage_liked_my_predecessor } + desc = pilgrimage.4020.desc.liked + } + desc = pilgrimage.4020.desc.neutral + } + } + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = grief + } + right_portrait = { + character = scope:burial_bishop + animation = sadness + } + lower_center_portrait = { + character = scope:old_pilgrimage_host + } + immediate = { + give_pilgrim_trait_or_xp_effect = yes + save_scope_as = root_scope + if = { + limit = { exists = var:old_host_to_be_buried } + var:old_host_to_be_buried = { save_scope_as = old_pilgrimage_host } + } + if = { + limit = { + exists = location.county.holder.cp:councillor_court_chaplain + location.county.holder.cp:councillor_court_chaplain.faith = root.faith + } + location.county.holder.cp:councillor_court_chaplain = { save_scope_as = burial_bishop } + } + else = { + create_character = { + template = priest_character_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = burial_bishop + } + set_variable = created_burial_bishop_var + } + remove_character_modifier = pilgrimage_burial_at_destination_modifier + } + #In the ground ye go + option = { + name = pilgrimage.4020.a + flavor = pilgrimage.4020.a.flavor + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_burial_log + tags = { destination_event } + score = 50 + character = root + target = scope:old_pilgrimage_host + location = root.location + show_in_conclusion = yes + #Effects + root = { + pilgrimage_bury_at_destination_effect = yes + } + } + } + create_character_memory = { + type = pilgrimage_handled_predecessor_remains_memory + participants = { predecessor = scope:old_pilgrimage_host } + } + scope:new_memory = { + set_variable = { + name = pilgrimage_destination + value = scope:activity.activity_location + } + } + } + after = { + if = { + limit = { + is_ai = yes + has_variable = created_burial_bishop_var + } + scope:burial_bishop = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + remove_variable = created_burial_bishop_var + } + set_variable = { + name = pilgrimage_burial_location + value = root.location + } + } +} + +################################ +# Holy Site-specific destination arrival events +# 5001-5999 +# by Sean Hughes +################################ +# Christian +# pilgrimage.5001 - Rome +# pilgrimage.5011 - Jerusalem +# pilgrimage.5021 - Constantinople +# pilgrimage.5031 - Alexandria +# +# Jewish +# pilgrimage.5101 - Mount Sinai +# +# Muslim +# pilgrimage.5201 - Medina +# +# Hindu +# pilgrimage.5301 - Varanasi +# pilgrimage.5311 - Ayodhya +# pilgrimage.5321 - Mathura +# pilgrimage.5331 - Haridwar +# pilgrimage.5341 - Kanchipuram +# pilgrimage.5351 - Ujjayini +# pilgrimage.5361 - Dwarka +# +# Buddhism +# pilgrimage.5401 - Bodh Gaya +# pilgrimage.5411 - Kushinagar +# pilgrimage.5421 - Sarnath +# +# Dharmic +# pilgrimage.5445 - Parikrama +# +# Jainism +# pilgrimage.5501 - Shikharj +# +# Zoroastrian +# pilgrimage.5601 - Ushi-darena +# +# Norse Germanic +# pilgrimage.5901 - Paderborn +# +# Tengri +# pilgrimage.5911 - Open Blue Skies +# +# Sanctity of Nature +# pilgrimage.5921 - Sacred Groves + +###Christian +#Rome +pilgrimage.5001 = { + type = activity_event + title = pilgrimage.5001.t + desc = pilgrimage.5001.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_roma } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Jerusalem +pilgrimage.5011 = { + type = activity_event + title = pilgrimage.5011.t + desc = { + desc = pilgrimage.5011.desc.beginning + first_valid = { + triggered_desc = { + trigger = { religion = religion:islam_religion } + desc = pilgrimage.5011.desc.muslim + } + triggered_desc = { + trigger = { religion = religion:judaism_religion } + desc = pilgrimage.5011.desc.jewish + } + desc = pilgrimage.5011.desc.christian + } + desc = pilgrimage.5011.desc.end + } + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = ecstasy + } + trigger = { scope:activity.activity_location.county = title:c_jerusalem } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Constantinople +pilgrimage.5021 = { + type = activity_event + title = pilgrimage.5021.t + desc = pilgrimage.5021.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_byzantion } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Alexandria +pilgrimage.5031 = { + type = activity_event + title = pilgrimage.5031.t + desc = pilgrimage.5031.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_alexandria } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Jewish +#Mount Sinai +pilgrimage.5101 = { + type = activity_event + title = pilgrimage.5101.t + desc = pilgrimage.5101.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_sinai } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Muslim +#Medina +pilgrimage.5201 = { + type = activity_event + title = pilgrimage.5201.t + desc = pilgrimage.5201.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_medina } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Hindu +#Varanasi +pilgrimage.5301 = { + type = activity_event + title = pilgrimage.5301.t + desc = pilgrimage.5301.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_varanasi } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Ayodhya +pilgrimage.5311 = { + type = activity_event + title = pilgrimage.5311.t + desc = pilgrimage.5311.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_ayodhya } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Mathura +pilgrimage.5321 = { + type = activity_event + title = pilgrimage.5321.t + desc = pilgrimage.5321.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_mathura } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Haridwar +pilgrimage.5331 = { + type = activity_event + title = pilgrimage.5331.t + desc = pilgrimage.5331.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_sthanisvara } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Kanchipuram +pilgrimage.5341 = { + type = activity_event + title = pilgrimage.5341.t + desc = pilgrimage.5341.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_kanchipuram } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Ujjayini +pilgrimage.5351 = { + type = activity_event + title = pilgrimage.5351.t + desc = pilgrimage.5351.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_ujjayini } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Dwarka +pilgrimage.5361 = { + type = activity_event + title = pilgrimage.5361.t + desc = pilgrimage.5361.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_dvaraka } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Buddhism +#Bodh Gaya +pilgrimage.5401 = { + type = activity_event + title = pilgrimage.5401.t + desc = pilgrimage.5401.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_gaya } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Kushinagar +pilgrimage.5411 = { + type = activity_event + title = pilgrimage.5411.t + desc = pilgrimage.5411.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_kusinagara } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Sarnath +pilgrimage.5421 = { + type = activity_event + title = pilgrimage.5421.t + desc = pilgrimage.5421.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { + #Sarnath is literally a mile from Varanasi + scope:activity.activity_location.county = title:c_varanasi + } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} +###Dharmic +#Parikrama +# by Laurence Kennedy +pilgrimage.5445 = { + type = activity_event + title = pilgrimage.5445.t + desc = pilgrimage.5445.desc + theme = pilgrimage_destination + left_portrait = { + character = root + animation = happiness + } + trigger = { + OR = { + religion = religion:hinduism_religion + religion = religion:buddhism_religion + } + } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.5445.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.5445.a_cynical + } + name = pilgrimage.5445.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Jainism +#Shikharj +pilgrimage.5501 = { + type = activity_event + title = pilgrimage.5501.t + desc = pilgrimage.5501.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_radha } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Zoroastrian +#Ushi-darena +pilgrimage.5601 = { + type = activity_event + title = pilgrimage.5601.t + desc = pilgrimage.5601.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_baduspan } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Norse Germanic +#Paderborn +pilgrimage.5901 = { + type = activity_event + title = pilgrimage.5901.t + desc = pilgrimage.5901.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_paderborn } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Tengri +#Open Blue Skies +pilgrimage.5911 = { + type = activity_event + title = pilgrimage.5911.t + desc = pilgrimage.5911.desc + theme = pilgrimage_destination + override_background = { reference = terrain } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Sanctity of Nature +#Sacred Groves +pilgrimage.5921 = { + type = activity_event + title = pilgrimage.5921.t + desc = pilgrimage.5921.desc + theme = pilgrimage_destination + override_background = { reference = wilderness_forest } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +################################ +# Remaining at a Holy Site events +# 6500-6999 +# by Filippa Gannholm Kirsten & Veronica Pazos +################################ +# pilgrimage.6500 - Appreciation +# pilgrimage.6510 - Lost in Translation +# pilgrimage.6520 - Time To Go Home Soon? +# pilgrimage.6530-5 - Fishy local guide? +# pilgrimage.6540 - Find some exotic wares +# pilgrimage.6750 - Repent - remove secret/coping trait +# pilgrimage.6760 - Theological debate with facts and logic +# pilgrimage.6770 - Do you wanna buy some cheeky relic? +# pilgrimage.6780 - Recruit skillful courtier +# pilgrimage.6790 - Meet local guru - trait flipping event +# pilgrimage.6800 - Entourage member feels The Calling +# pilgrimage.6810 - Do you wanna buy an indulgence? +# pilgrimage.6820 - Do you wanna buy a pilgrim's guide? - based in the Codex Calixtinus +# pilgrimage.6830 - Admire the holy site in a religious way +# pilgrimage.6840 - Ask a local priest to bless your artifact +# pilgrimage.6850 - A Master Thief + +#Appreciation +#by Filippa Gannholm Kirsten +pilgrimage.6500 = { + type = activity_event + title = pilgrimage.6500.t + desc = pilgrimage.6500.desc + theme = pilgrimage_destination + override_background = { reference = market } + center_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = cynical } + animation = personality_cynical + } + animation = personality_content + } + right_portrait = { + character = scope:pilgrimage_member + animation = survey_staff + } + cooldown = { years = 1 } + trigger = { + current_travel_plan ?= { + any_entourage_character = { + count > 1 + NOR = { + has_trait = sadistic + has_trait = cynical + has_trait = paranoid + has_trait = craven + has_trait = reclusive + has_trait = callous + } + is_adult = yes + } + } + } + immediate = { + current_travel_plan = { + random_entourage_character = { + limit = { + is_adult = yes + NOR = { + has_trait = sadistic + has_trait = cynical + has_trait = paranoid + has_trait = craven + has_trait = reclusive + has_trait = callous + } + } + save_scope_as = pilgrimage_member + } + } + } + #Let's frolick! + option = { + name = pilgrimage.6500.a + trigger = { + culture = { has_cultural_tradition = tradition_xenophilic } + } + show_as_unavailable = { + custom_tooltip = { text = pilgrimage.6500.a.tt } + NOT = { + culture = { has_cultural_tradition = tradition_xenophilic } + } + } + reason = has_cultrad + worldly_type_option_effect = yes + scope:pilgrimage_member = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + stress_impact = { + base = medium_stress_impact_loss + sadistic = minor_stress_impact_gain + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + craven = minor_stress_impact_gain + reclusive = minor_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + OR = { + has_trait = sadistic + has_trait = cynical + has_trait = paranoid + has_trait = craven + has_trait = reclusive + has_trait = callous + } + factor = 0 + } + } + } + #That's nice + option = { + name = pilgrimage.6500.b + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + stress_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + } + } + #_Technically_ ... + option = { + name = pilgrimage.6500.c + trigger = { has_trait = cynical } + stress_impact = { + cynical = minor_stress_impact_loss + } + scope:pilgrimage_member = { + add_opinion = { + modifier = insulted_opinion + target = root + opinion = -10 + } + } + ai_chance = { + base = 200 + } + } +} + +#Lost in Translation +#by Filippa Gannholm Kirsten +pilgrimage.6510 = { + type = activity_event + title = pilgrimage.6510.t + desc = pilgrimage.6510.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = thinking + } + cooldown = { years = 1 } + #_I'll_ translate it for the unwashed masses + option = { + name = pilgrimage.6510.a + flavor = pilgrimage.6510.a.flavor + trigger = { learning >= medium_skill_rating } + bonus_to_all_types_effect = yes + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_translator_log + tags = { good } + score = 50 + character = root + + #Effects + root = { + add_piety = minor_piety_gain + if = { + limit = { + NOT = { has_trait = scholar } + } + random = { + chance = 5 + add_trait = scholar + } + } + } + } + } + stress_impact = { zealous = miniscule_stress_impact_loss } + ai_chance = { + base = 200 + } + } + #Pla-q-ue... ? + option = { + name = pilgrimage.6510.b + trigger = { learning < medium_skill_rating } + pious_type_option_effect = yes + duel = { + skill = learning + value = average_skill_rating + 50 = { + desc = pilgrimage.6510.b_success.desc + compare_modifier = { + value = scope:duel_value + } + modifier = { + has_trait = diligent + add = 10 + } + modifier = { + has_trait = scholar + add = 10 + } + modifier = { + num_of_known_languages > 1 + add = 10 + } + send_interface_toast = { + left_icon = root + title = pilgrimage.6510.b_success.t + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_translator_log + tags = { good } + score = 50 + character = root + + #Effects + root = { + add_learning_skill = 1 + } + } + } + } + } + 50 = { + desc = pilgrimage.6510.b_failure.desc + compare_modifier = { + value = scope:duel_value + min = 5 + } + send_interface_toast = { + type = event_toast_text_and_effect_bad + left_icon = root + title = pilgrimage.6510.b_failure.t + desc = pilgrimage.6510.b_failure.desc + stress_impact = { base = miniscule_stress_impact_gain } + } + } + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = lazy + has_trait = cynical + has_trait = paranoid + has_trait = craven + has_trait = reclusive + } + factor = 0 + } + modifier = { + learning >= medium_skill_rating + factor = 0 + } + } + } + #Psh who cares + option = { + name = pilgrimage.6510.c + stress_impact = { + lazy = miniscule_stress_impact_loss + shy = miniscule_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + factor = 0 + } + modifier = { + learning >= medium_skill_rating + factor = 0 + } + } + } +} + +#Time To Go Home Soon? +#by Filippa Gannholm Kirsten +pilgrimage.6520 = { + type = activity_event + title = pilgrimage.6520.t + desc = { + desc = pilgrimage.6520.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = zealous + has_trait = vengeful + } + } + desc = pilgrimage.6520.desc_nonforgiving + } + triggered_desc = { + desc = pilgrimage.6520.desc_forgiving + } + } + } + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = vengeful + } + } + animation = anger + } + animation = personality_forgiving + } + right_portrait = { + character = scope:impatient_pilgrim + animation = eyeroll + } + cooldown = { years = 1 } + trigger = { + current_travel_plan ?= { + any_entourage_character = { + count > 1 + OR = { + has_trait = impatient + has_trait = cynical + has_trait = callous + } + has_any_good_relationship_with_root_trigger = yes + } + } + } + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = zealot_intent + factor = 2 + } + } + immediate = { + current_travel_plan ?= { + random_entourage_character = { + limit = { + OR = { + has_trait = impatient + has_trait = cynical + has_trait = callous + } + has_any_good_relationship_with_root_trigger = yes + } + save_scope_as = impatient_pilgrim + } + } + } + #Lecture 'em + option = { + name = pilgrimage.6520.a + trigger = { + OR = { + has_trait = zealous + has_trait = vengeful + } + } + pious_type_option_effect = yes + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_corrective_lecture_log + score = 50 + tags = { destination_event } + character = root + target = scope:impatient_pilgrim + + #Effects + root = { + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 10 + } + } + else = { + add_piety = minor_piety_gain + } + worsen_relationship_effect = { + TARGET = scope:impatient_pilgrim + REASON = pilgrimage_corrective_lecture + } + } + } + } + stress_impact = { + zealous = medium_stress_impact_loss + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + modifier = { + has_trait = wrathful + has_trait = zealous + add = 100 + } + } + } + #Have you tried looking around? + option = { + name = pilgrimage.6520.b + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + stress_impact = { + zealous = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + } + } + #This is fine + option = { + name = pilgrimage.6520.c + worldly_type_option_effect = yes + reverse_add_opinion = { + target = scope:impatient_pilgrim + modifier = humored_opinion + opinion = 10 + } + stress_impact = { + zealous = medium_stress_impact_gain + cynical = minor_stress_impact_loss + lazy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + modifier = { + has_trait = compassionate + add = 100 + } + } + } +} + +scripted_effect 6531_positive_outcome = { + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_hidden_divinity_log + tags = { good } + score = 50 + character = root + show_in_conclusion = yes + #Effects + root = { + add_learning_skill = 1 + give_pilgrim_xp_effect = yes + if = { + limit = { + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = 5 + } + } + } + } + } +} + +scripted_effect 6532_negative_outcome = { + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_robbed_log + tags = { bad } + score = 25 + character = root + + #Effects + root = { + remove_short_term_gold = minor_gold_value + stress_impact = { + base = minor_stress_impact_gain + } + } + } + } +} + +#Fishy local guide? +#by Filippa Gannholm Kirsten +pilgrimage.6530 = { + type = activity_event + title = pilgrimage.6530.t + desc = { + desc = pilgrimage.6530.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:local_guide = { is_adult = yes } + } + desc = pilgrimage.6530.desc_adult + } + triggered_desc = { + trigger = { + scope:local_guide = { is_adult = no } + } + desc = pilgrimage.6530.desc_child + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:warning_character } + desc = pilgrimage.6530.desc_warning + } + triggered_desc = { + trigger = { + learning >= high_skill_rating + scope:local_guide = { has_character_flag = fishy_guide } + } + desc = pilgrimage.6530.desc_learned + } + } + } + theme = pilgrimage_destination + override_background = { reference = market } + left_portrait = { + character = root + #They're trying to fool us and it makes me _angry_ + triggered_animation = { + trigger = { + learning >= high_skill_rating + OR = { + has_trait = wrathful + has_trait = irritable + } + scope:local_guide = { + is_adult = yes + has_character_flag = fishy_guide + } + } + animation = rage + } + #They're trying to fool us and we know it + triggered_animation = { + trigger = { + learning >= high_skill_rating + scope:local_guide = { has_character_flag = fishy_guide } + } + animation = personality_cynical + } + #I don't trust anyone + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + } + } + animation = worry + } + #This is fine, I guess + animation = personality_content + } + right_portrait = { + character = scope:local_guide + triggered_animation = { + trigger = { + is_adult = no + has_character_flag = fishy_guide + root = { learning >= high_skill_rating } + } + animation = shame + } + triggered_animation = { + trigger = { + is_adult = no + } + animation = happiness + } + animation = personality_dishonorable + } + cooldown = { years = 1 } + immediate = { + random_list = { + 4 = { + #An adult + create_character = { + template = generic_peasant_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = local_guide + } + } + 1 = { + #A child + create_character = { + #template = peasant_villager_foundling_character + location = root.location + age = { 5 10 } + random_traits = yes + culture = root.location.county.culture + faith = root.location.county.faith + gender_female_chance = 50 + save_scope_as = local_guide + } + } + } + random_list = { + 1 = { + scope:local_guide = { add_character_flag = fishy_guide } + } + 1 = { + #Is not a fishy guide + } + } + #If we're not particularly learned, find someone who can warn you in the desc + if = { + limit = { + learning < high_skill_rating + current_travel_plan ?= { + any_entourage_character = { + count > 1 + is_adult = yes + learning >= high_skill_rating + } + } + scope:local_guide = { has_character_flag = fishy_guide } + } + current_travel_plan ?= { + random_entourage_character = { + limit = { + is_adult = yes + learning >= high_skill_rating + } + save_scope_as = warning_character + } + } + } + } + #I'll go along + option = { + name = pilgrimage.6530.a + #This should only trigger if: + trigger = { + #We're learned and they're not fishy + trigger_if = { + limit = { learning >= high_skill_rating } + NOT = { + scope:local_guide = { has_character_flag = fishy_guide } + } + } + #Or we're not learned + trigger_else = { always = yes } + } + worldly_type_option_effect = yes + add_character_flag = 6530_went_along_with_guide + #Child outcome isn't really dangerous, show custom tooltip + if = { + limit = { + scope:local_guide = { is_adult = no } + } + custom_tooltip = pilgrimage.6530.a_child.tt + hidden_effect = { + random_list = { + #Wooh, educating roadtrip + 50 = { + #If we're fishy we don't show you divinity + modifier = { + scope:local_guide = { has_character_flag = fishy_guide } + factor = 0 + } + #Divinity event + trigger_event = pilgrimage.6531 + } + #This is a trap + 50 = { + #Non-fishy guides don't lead you to the trap + modifier = { + scope:local_guide = { + NOT = { has_character_flag = fishy_guide } + } + factor = 0 + } + #Child heartstring event + trigger_event = pilgrimage.6533 + } + } + } + } + #Adult outcome should show tooltip outcome + else = { + #If we're learned and they're not fishy this is a done deal + if = { + limit = { + learning >= high_skill_rating + NOT = { + scope:local_guide = { has_character_flag = fishy_guide } + } + } + random_list = { + #Wooh, educating roadtrip + 50 = { + show_chance = no + desc = pilgrimage.6530.divinity.desc + show_as_tooltip = { 6531_positive_outcome = yes } + #Divinity event + trigger_event = pilgrimage.6531 + } + } + } + #But if we're not learned and they might be fishy then who knows + else = { + random_list = { + #Wooh, educating roadtrip + 50 = { + show_chance = no + desc = pilgrimage.6530.divinity.desc + #If we're fishy we don't show you divinity + modifier = { + scope:local_guide = { has_character_flag = fishy_guide } + factor = 0 + } + show_as_tooltip = { 6531_positive_outcome = yes } + #Divinity event + trigger_event = pilgrimage.6531 + } + #This is a trap + 50 = { + show_chance = no + desc = pilgrimage.6530.dangerous.desc + #Non-fishy guides don't lead you to the trap + modifier = { + scope:local_guide = { + NOT = { has_character_flag = fishy_guide } + } + factor = 0 + } + show_as_tooltip = { 6532_negative_outcome = yes } + #Trap event + trigger_event = pilgrimage.6532 + } + } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = craven + factor = 0.5 + } + modifier = { + has_trait = paranoid + factor = 0 + } + modifier = { + OR = { + has_trait = trusting + has_trait = gregarious + } + add = 100 + } + } + } + #You sir, should be ashamed + option = { + name = { + trigger = { + scope:local_guide = { is_adult = no } + } + text = pilgrimage.6530.b_child + } + name = pilgrimage.6530.b + trigger = { + learning >= high_skill_rating + scope:local_guide = { has_character_flag = fishy_guide } + } + flavor = pilgrimage.6530.b.flavor + #Some tasty virtue piety + if = { + limit = { + faith = { + OR = { + trait_is_virtue = forgiving + trait_is_virtue = compassionate + } + } + } + pious_type_option_effect = yes + add_piety = minor_piety_gain + } + else = { + add_piety = miniscule_piety_gain + stress_impact = { base = minor_stress_loss } + } + add_character_modifier = { + modifier = pilgrimage_forgiving_modifier + years = 5 + } + stress_impact = { + forgiving = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + #You sir, need to pay me gold + option = { + name = pilgrimage.6530.c + trigger = { + learning >= high_skill_rating + has_trait = greedy + scope:local_guide = { + has_character_flag = fishy_guide + is_adult = yes + } + } + flavor = pilgrimage.6530.c.flavor + #Some tasty virtue piety + if = { + limit = { + faith = { trait_is_virtue = greedy } + } + pious_type_option_effect = yes + add_piety = minor_piety_gain + } + scope:local_guide = { + pay_short_term_gold = { + target = root + gold = major_gold_value + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = low_negative_opinion + } + } + stress_impact = { + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + #You sir, need to get whipped + option = { + name = pilgrimage.6530.d + trigger = { + learning >= high_skill_rating + has_trait = sadistic + scope:local_guide = { + has_character_flag = fishy_guide + is_adult = yes + } + } + flavor = pilgrimage.6530.d.flavor + #Some tasty virtue piety + if = { + limit = { + faith = { + OR = { + trait_is_virtue = wrathful + trait_is_virtue = irritable + trait_is_virtue = sadistic + trait_is_virtue = flagellant + } + } + } + pious_type_option_effect = yes + add_piety = minor_piety_gain + } + add_dread = medium_dread_gain + scope:local_guide = { + increase_wounds_effect = { REASON = whipping } + add_opinion = { + target = root + modifier = angry_opinion + opinion = low_negative_opinion + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + flagellant = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = forgiving + has_trait = compassionate + } + factor = 0 + } + } + } + #I don't want any part in this + option = { + name = pilgrimage.6530.e + if = { + limit = { + learning >= high_skill_rating + OR = { + has_trait = wrathful + has_trait = irritable + has_trait = sadistic + } + scope:local_guide = { has_character_flag = fishy_guide } + } + stress_impact = { + wrathful = minor_stress_impact_gain + irritable = minor_stress_impact_gain + } + } + ai_chance = { + base = 50 + } + } + after = { + if = { + limit = { + NOT = { has_character_flag = 6530_went_along_with_guide } + } + #Clean up created characters + trigger_event = { + id = pilgrimage.6535 + days = 5 + } + } + } +} + +#Fishy guide not so fishy actually +pilgrimage.6531 = { + type = activity_event + title = pilgrimage.6531.t + desc = { + random_valid = { + desc = pilgrimage.6531.desc_wellspring + desc = pilgrimage.6531.desc_crystal_cavern + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = cynical + any_secret = { type = secret_non_believer } + } + } + desc = pilgrimage.6531.desc_cynical + } + triggered_desc = { + desc = pilgrimage.6531.desc_non_cynical + } + } + } + theme = pilgrimage_destination + override_background = { + trigger = { + NOT = { + root.location = { geographical_region = world_middle_east } + } + } + reference = ep2_hunt_forest_cave + } + override_background = { + trigger = { + root.location = { geographical_region = world_middle_east } + } + reference = wilderness + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + any_secret = { type = secret_non_believer } + } + } + animation = thinking + } + animation = prayer + } + right_portrait = { + character = scope:local_guide + animation = personality_content + } + immediate = { + remove_character_flag = 6530_went_along_with_guide + 6531_positive_outcome = yes + } + #This is quite something! + option = { + name = pilgrimage.6531.a + bonus_to_all_types_effect = yes + ai_chance = { + base = 100 + } + } + after = { + #Clean up created characters + trigger_event = { + id = pilgrimage.6535 + days = 5 + } + } +} + +#Fishy guide _was_ fishy! +pilgrimage.6532 = { + type = activity_event + title = pilgrimage.6532.t + desc = pilgrimage.6532.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOT = { + root.location = { geographical_region = world_middle_east } + } + } + reference = ep2_hunt_foggy_forest + } + override_background = { + trigger = { + root.location = { geographical_region = world_middle_east } + } + reference = terrain_travel + } + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:6532_local_bandit + animation = hunting_knife_start + } + lower_left_portrait = { + trigger = { exists = scope:6532_protector } + character = scope:6532_protector + } + lower_right_portrait = { + character = scope:local_guide + } + immediate = { + remove_character_flag = 6530_went_along_with_guide + if = { + limit = { + any_pool_character = { + province = root.location + 2002_local_prowess_character_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { 2002_local_prowess_character_trigger = yes } + save_scope_as = 6532_local_bandit + } + } + else = { + scope:local_guide = { save_scope_as = value_target } + create_character = { + template = new_warrior_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + gender_female_chance = scope_value_target_soldier_female_chance + prowess = { medium_skill_rating high_skill_rating } + save_scope_as = 6532_local_bandit + } + scope:6532_local_bandit = { add_character_flag = created_bandit } + } + if = { + limit = { + current_travel_plan ?= { + any_entourage_character = { + OR = { + has_court_position = bodyguard_court_position + has_court_position = akolouthos_court_position + is_knight_of = root + } + } + } + } + current_travel_plan ?= { + random_entourage_character = { + limit = { has_court_position = akolouthos_court_position } + alternative_limit = { has_court_position = bodyguard_court_position } + alternative_limit = { is_knight_of = root } + save_scope_as = 6532_protector + } + } + } + if = { + limit = { exists = scope:warning_character } + reverse_add_opinion = { + target = scope:warning_character + modifier = ignored_opinion + opinion = low_negative_opinion + } + } + } + #Bodyguard! Pls! + option = { + name = pilgrimage.6532.a + trigger = { exists = scope:6532_protector } + scope:6532_protector = { + duel = { + skill = prowess + target = scope:6532_local_bandit + 75 = { + desc = pilgrimage.6532.a_success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + type = event_toast_text_good + title = pilgrimage.6532.a_success.t + left_icon = scope:6532_protector + right_icon = scope:6532_local_bandit + desc = pilgrimage.6532.a_success.desc + } + scope:6532_protector = { add_prowess_skill = 1 } + } + 25 = { + desc = pilgrimage.6532.a_failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = pilgrimage.6532.a_failure.t + left_icon = scope:6532_protector + right_icon = scope:6532_local_bandit + scope:6532_protector = { + increase_wounds_effect = { REASON = attacked } + } + } + } + } + } + ai_chance = { + base = 200 + modifier = { + has_perk = zealous_proselytizer_perk + factor = 0 + } + } + } + #By the power of zeal! + option = { + name = pilgrimage.6532.b + trigger = { has_perk = zealous_proselytizer_perk } + show_as_unavailable = { + NOT = { has_perk = zealous_proselytizer_perk } + } + custom_tooltip = pilgrimage.6532.c_success.desc + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_exorcism_log + tags = { good } + score = 50 + character = root + + #Effects + root = { + add_piety = medium_piety_gain + } + } + } + ai_chance = { + base = 200 + } + } + #Attempt to scare them off + option = { + name = pilgrimage.6532.c + duel = { + skills = { learning intrigue } + value = medium_skill_rating + 75 = { + desc = pilgrimage.6532.c_success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + has_trait = possessed + factor = 2 + } + send_interface_toast = { + type = event_toast_effect_good + title = pilgrimage.6532.c_success.t + left_icon = root + right_icon = scope:6532_local_bandit + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_exorcism_log + tags = { good } + score = 50 + character = root + + #Effects + root = { + if = { + limit = { + NOT = { has_perk = zealous_proselytizer_perk } + } + add_perk = zealous_proselytizer_perk + } + else = { + add_piety = medium_piety_gain + } + } + } + } + } + } + 25 = { + desc = pilgrimage.6532.c_failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = pilgrimage.6532.c_failure.t + left_icon = root + right_icon = scope:6532_local_bandit + 6532_negative_outcome = yes + } + } + } + ai_chance = { + base = 100 + modifier = { + exists = scope:6532_protector + factor = 0 + } + modifier = { + has_perk = zealous_proselytizer_perk + factor = 0 + } + } + } + after = { + #Clean up created characters + trigger_event = { + id = pilgrimage.6535 + days = 5 + } + } +} + +#Fishy child breaks down +pilgrimage.6533 = { + type = activity_event + title = pilgrimage.6533.t + desc = pilgrimage.6533.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOT = { + root.location = { geographical_region = world_middle_east } + } + } + reference = ep2_hunt_foggy_forest + } + override_background = { + trigger = { + root.location = { geographical_region = world_middle_east } + } + reference = terrain_travel + } + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:local_guide + animation = sadness + } + immediate = { + remove_character_flag = 6530_went_along_with_guide + } + #Show some compassion + option = { + name = pilgrimage.6533.a + flavor = pilgrimage.6533.a.flavor + bonus_to_all_types_effect = yes + #Some tasty virtue piety + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_helped_child_log + tags = { good } + score = 50 + character = root + + #Effects + root = { + if = { + limit = { + faith = { + OR = { + trait_is_virtue = forgiving + trait_is_virtue = compassionate + } + } + } + add_piety = medium_piety_gain + } + else = { + add_character_modifier = { + modifier = pilgrimage_forgiving_modifier + years = 5 + } + } + pay_short_term_gold = { + target = scope:local_guide + gold = medium_gold_value + } + } + } + } + stress_impact = { + forgiving = major_stress_impact_loss + compassionate = medium_stress_impact_loss + vengeful = minor_stress_impact_gain + callous = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = callous + has_trait = greedy + has_trait = vengeful + } + factor = 0 + } + modifier = { + short_term_gold < medium_gold_value + factor = 0 + } + } + } + #Unacceptable! + option = { + name = pilgrimage.6533.b + flavor = pilgrimage.6533.b.flavor + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + vengeful = major_stress_impact_loss + callous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = forgiving + has_trait = compassionate + has_trait = generous + } + factor = 0 + } + } + } + after = { + #Clean up created characters + trigger_event = { + id = pilgrimage.6535 + days = 5 + } + } +} + +#To avoid people being cleaned up or dying before the chain is completed :angery: +pilgrimage.6535 = { + hidden = yes + immediate = { + if = { + limit = { + scope:local_guide ?= { is_alive = yes } + } + scope:local_guide = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + + if = { + limit = { + scope:6532_local_bandit ?= { + is_alive = yes + has_character_flag = created_bandit + } + } + scope:6532_local_bandit = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +scripted_trigger 6540_wares_vendor_trigger = { + age = { 20 40 } + is_lowborn = yes + stewardship = { + min_template_decent_skill + max_template_decent_skill + } + OR = { + has_trait = education_stewardship_2 + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + } +} + +#Find some exotic wares +#by Filippa Gannholm Kirsten +pilgrimage.6540 = { + type = activity_event + title = pilgrimage.6540.t + desc = pilgrimage.6540.desc + theme = pilgrimage_destination + override_background = { reference = market } + center_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = disapproval + } + animation = betting + } + right_portrait = { + character = scope:6540_vendor + animation = storyteller + } + cooldown = { years = 10 } + trigger = { + #This is more for human flavor + is_ai = no + } + weight_multiplier = { + base = 1 + modifier = { + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_worldly + } + } + factor = 2 + } + } + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + 6540_wares_vendor_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { 6540_wares_vendor_trigger = yes } + save_scope_as = 6540_vendor + } + } + else = { + create_character = { + location = root.location + random_traits_list = { + count = 1 + education_stewardship_1 = {} + education_stewardship_2 = {} + education_stewardship_3 = {} + education_stewardship_4 = {} + } + random_traits = yes + dynasty = none + faith = root.location.county.faith + culture = root.location.county.culture + gender_female_chance = 50 + stewardship = { + min_template_decent_skill + max_template_decent_skill + } + save_scope_as = 6540_vendor + } + scope:6540_vendor = { add_character_flag = created_merchant } + } + } + #Buy the goods + option = { + name = pilgrimage.6540.a + flavor = pilgrimage.6540.a.flavor + worldly_type_option_effect = yes + custom_tooltip = pilgrimage.6540.a.tt + pay_short_term_gold = { + target = scope:6540_vendor + gold = minor_gold_value + } + involved_activity = { + add_activity_log_entry = { + key = pilgrimage_exotic_wares_log + tags = { destination_event } + score = 50 + character = root + + #Effects + root = { + add_character_modifier = { + modifier = pilgrimage_exotic_wares_modifier + } + } + } + } + set_variable = { + name = 6540_exotic_wares_cost + value = minor_gold_value + } + stress_impact = { zealous = minor_stress_impact_gain } + } + #High stewardship; better goods! + option = { + name = pilgrimage.6540.b + flavor = pilgrimage.6540.b.flavor + trigger = { stewardship >= high_skill_rating } + worldly_type_option_effect = yes + custom_tooltip = pilgrimage.6540.a.tt + pay_short_term_gold = { + target = scope:6540_vendor + gold = medium_gold_value + } + involved_activity = { + add_activity_log_entry = { + key = pilgrimage_exotic_wares_log + tags = { destination_event } + score = 50 + character = root + + #Effects + root = { + add_character_modifier = { + modifier = pilgrimage_super_exotic_wares_modifier + } + } + } + } + set_variable = { + name = 6540_exotic_wares_cost + value = medium_gold_value + } + stress_impact = { zealous = minor_stress_impact_gain } + } + #Pass + option = { + name = pilgrimage.6540.c + if = { + limit = { + faith = { + NOT = { trait_is_virtue = greedy } + } + } + pious_type_option_effect = yes + } + stress_impact = { zealous = minor_stress_impact_loss } + } + after = { + if = { + limit = { + OR = { + has_character_modifier = pilgrimage_exotic_wares_modifier + has_character_modifier = pilgrimage_super_exotic_wares_modifier + } + } + set_variable = { + name = 6540_exotic_wares_location + value = root.location + } + } + scope:6540_vendor = { + if = { + limit = { has_character_flag = created_merchant } + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +#Repentance +#by Veronica Pazos +pilgrimage.6750 = { + type = activity_event + title = pilgrimage.6750.t + desc = { + desc = pilgrimage.6750.desc.intro + first_valid = { + triggered_desc = { + trigger = { + any_secret = { is_criminal_for = secret_owner } + } + desc = pilgrimage.6750.desc.secret + } + triggered_desc = { + trigger = { + has_trait = drunkard + } + desc = pilgrimage.6750.desc.drunkard + } + triggered_desc = { + trigger = { + has_trait = hashishiyah + } + desc = pilgrimage.6750.desc.hashishiyah + } + triggered_desc = { + trigger = { + has_trait = rakish + } + desc = pilgrimage.6750.desc.rakish + } + triggered_desc = { + trigger = { + has_trait = irritable + } + desc = pilgrimage.6750.desc.irritable + } + triggered_desc = { + trigger = { + has_trait = flagellant + } + desc = pilgrimage.6750.desc.flagellant + } + triggered_desc = { + trigger = { + has_trait = contrite + } + desc = pilgrimage.6750.desc.contrite + } + triggered_desc = { + trigger = { + has_trait = profligate + } + desc = pilgrimage.6750.desc.profligate + } + triggered_desc = { + trigger = { + has_trait = comfort_eater + } + desc = pilgrimage.6750.desc.comfort_eater + } + triggered_desc = { + trigger = { + has_trait = inappetetic + } + desc = pilgrimage.6750.desc.inappetetic + } + } + desc = pilgrimage.6750.desc.outro + } + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = beg + } + #We don't really need a cooldown since it's once per character + trigger = { + has_dlc_feature = tours_and_tournaments + NOT = { has_variable = had_pilgrimage_event_6750 } + OR = { #you have something to repent + any_secret = { is_criminal_for = secret_owner } + has_a_bad_stress_coping_trait_trigger = yes + } + OR = { #you're in a religious journey + has_activity_intent = zealot_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + immediate = { + set_variable = had_pilgrimage_event_6750 #once per character + location = { save_scope_as = repent_location } + if = { + limit = { + any_secret = { is_criminal_for = secret_owner } + } + random_secret = { + limit = { is_criminal_for = secret_owner } + save_scope_as = repent_trait + } + } + } + #I regret it all + option = { + name = pilgrimage.6750.a + pious_type_option_effect = yes + involved_activity = { + add_activity_log_entry = { + key = pilgrimage_repented_log + tags = { destination_event } + score = 50 + character = root + location = scope:repent_location + show_in_conclusion = yes + #Effects + root = { + add_piety = medium_piety_gain + if = { + limit = { + any_secret = { is_criminal_for = secret_owner } + } + scope:repent_trait = { remove_secret = yes } + } + else_if = { + limit = { has_trait = drunkard } + remove_trait = drunkard + } + else_if = { + limit = { has_trait = hashishiyah } + remove_trait = hashishiyah + } + else_if = { + limit = { has_trait = rakish } + remove_trait = rakish + } + else_if = { + limit = { has_trait = irritable } + remove_trait = irritable + } + else_if = { + limit = { has_trait = flagellant } + remove_trait = flagellant + } + else_if = { + limit = { has_trait = contrite } + remove_trait = contrite + } + else_if = { + limit = { has_trait = profligate } + remove_trait = profligate + } + else_if = { + limit = { has_trait = comfort_eater } + remove_trait = comfort_eater + } + else_if = { + limit = { has_trait = inappetetic } + remove_trait = inappetetic + } + } + } + } + stress_impact = { + base = major_stress_impact_gain + zealous = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_compassion = 1.25 + ai_honor = 1.5 + } + } + } + + #Je ne regrette rien + option = { + name = pilgrimage.6750.b + worldly_type_option_effect = yes + stress_impact = { + base = major_stress_impact_loss + zealous = massive_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } +} + +#Theological Debate +#by Veronica Pazos +pilgrimage.6760 = { + type = activity_event + title = pilgrimage.6760.t + desc = { + desc = pilgrimage.6760.desc.intro + desc = pilgrimage.6760.desc.christian + } + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:bishop_pilgrim + animation = chaplain + } + cooldown = { years = 2 } + + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + OR = { + NOR = { + faith = faith:orthodox + faith = faith:catholic + } + any_secret = { type = secret_non_believer } + } + location.county.holder.cp:councillor_court_chaplain ?= { + faith.religion ?= religion:christianity_religion + OR = { + NOR = { + faith = faith:orthodox + faith = faith:catholic + } + any_secret = { type = secret_non_believer } + } + } + } + + immediate = { + if = { + limit = { exists = location.county.holder.cp:councillor_court_chaplain } + location.county.holder.cp:councillor_court_chaplain = { save_scope_as = bishop_pilgrim } + } + else = { + location.county.holder = { + ordered_courtier_or_guest = { + order_by = { + value = learning + if = { + limit = { has_trait = theologian } + add = 50 + } + if = { + limit = { has_trait = zealous } + add = 20 + } + if = { + limit = { has_trait = cynical } + add = -50 + } + if = { + limit = { + NOR = { + faith = faith:orthodox + faith = faith:catholic + } + faith.religion ?= religion:christianity_religion + } + add = 100 + } + } + save_scope_as = bishop_pilgrim + } + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_lifestyle = learning_lifestyle + } + modifier = { + factor = 2 + OR = { #you're in a religious journey + has_activity_intent = zealot_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #HEATHEN! + option = { + name = pilgrimage.6760.a + pious_type_option_effect = yes + add_piety = medium_piety_gain + scope:bishop_pilgrim = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -50 + } + } + stress_impact = { + calm = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 1.5 + OR = { + has_trait = wrathful + has_trait = vengeful + } + } + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = gregarious + has_trait = cynical + } + } + } + } + #Refute back + option = { + name = pilgrimage.6760.b + duel = { + skill = learning + target = scope:bishop_pilgrim + 50 = { #this is HARD + desc = pilgrimage.6760.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + add = 25 + OR = { + has_trait = theologian + has_trait = zealous + } + } + send_interface_toast = { + title = pilgrimage.6760.b.success + left_icon = root + right_icon = scope:bishop_pilgrim + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_theological_debate_log + tags = { good } + score = 50 + character = root + target = scope:bishop_pilgrim + + #Effects + root = { + if = { + limit = { NOT = { has_perk = zealous_proselytizer_perk } } + add_perk = zealous_proselytizer_perk + } + else = { + add_learning_lifestyle_xp = major_lifestyle_experience + } + } + } + } + } + } + 50 = { + desc = pilgrimage.6760.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = pilgrimage.6760.b.failure + left_icon = root + right_icon = scope:bishop_pilgrim + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_theological_debate_log + tags = { bad } + score = 50 + character = root + target = scope:bishop_pilgrim + + #Effects + root = { add_piety = minor_piety_loss } + } + } + } + } + } + stress_impact = { + calm = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_lifestyle = learning_lifestyle + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = gregarious + has_trait = cynical + } + } + } + } + #Let's just revel + option = { + name = pilgrimage.6760.c + worldly_type_option_effect = yes + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:bishop_pilgrim } + } + set_relation_friend = { + target = scope:bishop_pilgrim + reason = friend_theological_debate + } + } + stress_impact = { + base = medium_stress_impact_loss + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } +} + +scripted_effect pilgrimage_6770_relic_effect = { + if = { + limit = { has_trait = trusting } + add_piety = medium_piety_gain + add_prestige = medium_prestige_gain + } + else = { + add_piety = minor_piety_gain + } +} + +scripted_trigger pilgrimage_6770_trigger = { + age = { 20 60 } + is_lowborn = yes + has_faith = root.faith #We are looking for a relic merchant who sells relics we have an interest in and can use. + stewardship = { + min_template_decent_skill + max_template_decent_skill + } +} + +#Do you wanna buy a cool relic? +#by Veronica Pazos +pilgrimage.6770 = { + type = activity_event + title = pilgrimage.6770.t + desc = { + desc = pilgrimage.6770.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = pilgrimage.6770.desc.christian + } + triggered_desc = { + trigger = { + religion = religion:islam_religion + } + desc = pilgrimage.6770.desc.islam + } + triggered_desc = { + trigger = { + religion = religion:buddhism_religion + } + desc = pilgrimage.6770.desc.buddhist + } + triggered_desc = { + trigger = { + religion = religion:judaism_religion + } + desc = pilgrimage.6770.desc.judaism + } + desc = pilgrimage.6770.desc.fallback + } + desc = pilgrimage.6770.desc.outro + } + theme = pilgrimage_destination + override_background = { reference = market } + center_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:relic_merchant + animation = debating + } + artifact = { + target = scope:merchant_relic + position = lower_center_portrait + } + cooldown = { years = 1 } + immediate = { + location = { save_scope_as = relic_location } + if = { + limit = { + any_pool_character = { + province = root.location + pilgrimage_6770_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { pilgrimage_6770_trigger = yes } + save_scope_as = relic_merchant + } + } + else = { + create_character = { + template = merchant_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.faith #We are interested in relics we can use + save_scope_as = relic_merchant + } + set_variable = created_random_merchant_var + } + hidden_effect_new_object = { + if = { + limit = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + create_artifact_pedestal_reliquary_christian_effect = { OWNER = scope:relic_merchant } + } + else_if = { + limit = { religion = religion:islam_religion } + create_artifact_pedestal_reliquary_islam_effect = { OWNER = scope:relic_merchant } + } + else_if = { + limit = { religion = religion:buddhism_religion } + create_artifact_pedestal_reliquary_buddhism_effect = { OWNER = scope:relic_merchant } + } + else_if = { + limit = { religion = religion:judaism_religion } + create_artifact_pedestal_reliquary_judaism_effect = { OWNER = scope:relic_merchant } + } + else = { + create_artifact_sculpture_religious_effect = { OWNER = scope:relic_merchant } + } + scope:newly_created_artifact = { + save_scope_as = merchant_relic + if = { + limit = { + NOT = { + root = { has_royal_court = yes } + } + } + reforge_artifact = { type = miscellaneous } + } + } + } + } + weight_multiplier = { + base = 1 + } + #Buy + option = { + name = pilgrimage.6770.a + bonus_to_all_types_effect = yes + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_acquired_relic_log + tags = { relic } + score = 50 + character = root + artifact = scope:newly_created_artifact + location = scope:relic_location + show_in_conclusion = yes + # Effects + root = { pilgrimage_6770_relic_effect = yes } + scope:merchant_relic = { set_owner = root } + } + } + pay_short_term_gold = { + target = scope:relic_merchant + gold = { + value = minor_gold_value + max = 10 + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + short_term_gold <= minor_gold_value + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + } + } + } + } + #Barter + option = { + name = pilgrimage.6770.b + worldly_type_option_effect = yes + duel = { + skills = { diplomacy stewardship } + target = scope:relic_merchant + 50 = { + desc = pilgrimage.6770.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = pilgrimage.6770.b.success + left_icon = root + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_acquired_relic_log + tags = { relic } + score = 50 + character = root + artifact = scope:newly_created_artifact + location = scope:relic_location + show_in_conclusion = yes + # Effects + root = { pilgrimage_6770_relic_effect = yes } + scope:merchant_relic = { set_owner = root } + } + } + pay_short_term_gold = { + target = scope:relic_merchant + gold = { + value = minor_gold_value + max = 5 + } + } + } + } + 50 = { + desc = pilgrimage.6770.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = pilgrimage.6770.b.failure + left_icon = root + scope:relic_merchant = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + } + } + } + stress_impact = { + lazy = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + short_term_gold <= minor_gold_value + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = gregarious + } + } + } + } + #Nah + option = { + name = pilgrimage.6770.c + stress_impact = { + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + #Is this... a real piece? + option = { + name = pilgrimage.6770.d + trigger = { learning >= high_skill_rating } + bonus_to_all_types_effect = yes + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = major_lifestyle_experience + } + else = { + add_character_modifier = keen_eye_modifier + } + stress_impact = { + base = major_stress_impact_loss + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + after = { + if = { + limit = { + is_ai = yes + has_variable = created_random_merchant_var #we only kill them if we created them, not if they came from the pool + } + scope:relic_merchant = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + remove_variable = created_random_merchant_var + } + } +} + +#Recruit skillful local +#by Veronica Pazos +pilgrimage.6780 = { + type = activity_event + title = pilgrimage.6780.t + desc = pilgrimage.6780.desc + theme = pilgrimage_destination + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:stolen_courtier + animation = thinking + } + lower_center_portrait = scope:current_employer + cooldown = { years = 1 } + trigger = { + location.county.holder ?= { + is_ai = yes + this != root + OR = { + any_court_position_holder = { + location = root.location + is_physically_able_adult = yes + is_available = yes + is_landed = no + } + any_courtier_or_guest = { + is_physically_able_adult = yes + has_any_high_skill_rating = yes + is_available = yes + } + } + } + } + immediate = { + location.county.holder = { save_scope_as = current_employer } + if = { + limit = { + scope:current_employer = { + any_court_position_holder = { + location = root.location + is_physically_able_adult = yes + is_available = yes + is_landed = no + } + } + } + scope:current_employer = { + random_court_position_holder = { + limit = { + location = root.location + is_physically_able_adult = yes + is_available = yes + is_landed = no + } + save_scope_as = stolen_courtier + } + } + } + else = { + scope:current_employer = { + random_courtier_or_guest = { + limit = { + is_physically_able_adult = yes + has_any_high_skill_rating = yes + is_available = yes + } + save_scope_as = stolen_courtier + } + } + } + } + weight_multiplier = { + base = 1 + } + #My court is so much better than this one + option = { + name = pilgrimage.6780.b + trigger = { diplomacy >= high_skill_rating } + show_as_unavailable = { diplomacy < high_skill_rating } + skill = diplomacy + duel = { + skill = diplomacy + target = scope:current_employer + 50 = { #you convince them + desc = pilgrimage.6780.b.success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = pilgrimage.6780.b.success.t + left_icon = root + right_icon = scope:stolen_courtier + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_recruited_courtier_log + tags = { good } + score = 50 + character = root + target = scope:stolen_courtier + + #Effects + root = { + recruit_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:stolen_courtier + NEW_COURT_OWNER = root + } + } + } + } + } + hidden_effect = { + reverse_add_opinion = { + target = scope:stolen_courtier + modifier = recruited_me_opinion + opinion = 30 + } + } + } + 50 = { #theyre not impressed + desc = pilgrimage.6780.b.failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = pilgrimage.6780.b.failure.t + right_icon = scope:stolen_courtier + desc = pilgrimage.6780.b.failure.desc + } + } + } + if = { + limit = { + OR = { + scope:stolen_courtier = { + is_of_major_or_minor_interest_trigger = { CHARACTER = scope:stolen_courtier } + } + NOT = { has_relation_nemesis = scope:current_employer } + } + } + progress_towards_rival_effect = { + REASON = pilgrimage_poached_courtier + CHARACTER = scope:current_employer + OPINION = -10 + } + } + else = { + scope:current_employer = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + loyal = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = loyal + } + } + } + } + #Hey you wanna come work for me? + option = { + name = pilgrimage.6780.a + pay_short_term_gold = { + target = scope:stolen_courtier + gold = minor_gold_value + } + custom_tooltip = obligation_hook_tt + add_hook = { + type = obligation_hook + target = scope:stolen_courtier + } + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_recruited_courtier_log + tags = { good } + score = 50 + character = root + target = scope:stolen_courtier + + #Effects + root = { + recruit_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:stolen_courtier + NEW_COURT_OWNER = root + } + } + } + } + hidden_effect = { + reverse_add_opinion = { + target = scope:stolen_courtier + modifier = recruited_me_opinion + opinion = 30 + } + } + if = { + limit = { + OR = { + scope:stolen_courtier = { + is_of_major_or_minor_interest_trigger = { CHARACTER = scope:stolen_courtier } + } + NOT = { has_relation_nemesis = scope:current_employer } + } + } + progress_towards_rival_effect = { + REASON = pilgrimage_poached_courtier + CHARACTER = scope:current_employer + OPINION = -10 + } + } + else = { + scope:current_employer = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + honest = minor_stress_impact_gain + loyal = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = honest + has_trait = loyal + } + } + } + } + #I don't care enough + option = { + name = pilgrimage.6780.c + scope:current_employer = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + stress_impact = { + ambitious = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + disloyal = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = deceitful + has_trait = disloyal + } + } + } + } +} + +scripted_trigger pilgrimage_6790_trigger = { + is_available_ai_adult = yes + OR = { + has_trait = lifestyle_mystic + has_trait = theologian + } +} + +#Meet local guru - trait flipping event +#by Veronica Pazos +pilgrimage.6790 = { + type = activity_event + title = pilgrimage.6790.t + desc = pilgrimage.6790.desc + theme = pilgrimage_destination + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:spiritual_mentor + animation = personality_zealous + } + #We don't really need a cooldown since it's once per character + trigger = { + has_dlc_feature = tours_and_tournaments + OR = { #you need to have some spiritual inclination + AND = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value >= 50 + } + } + has_trait = hajjaj + has_trait = lifestyle_mystic + has_trait = theologian + } + num_sinful_traits > 0 #you have something to change + NOT = { has_variable = pilgrimage_6790_var } #once per lifetime + } + immediate = { + set_variable = pilgrimage_6790_var + if = { + limit = { + any_pool_character = { + province = root.location + pilgrimage_6790_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + pilgrimage_6790_trigger = yes + } + save_scope_as = spiritual_mentor + } + } + else = { + create_character = { + template = local_saint_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + save_scope_as = spiritual_mentor + after_creation = { + add_character_flag = mystic_beard_var + } + } + } + } + weight_multiplier = { + base = 1 + } + #Youäve inspired me + option = { + name = pilgrimage.6790.a + trigger = { is_ai = no } + involved_activity = { + add_activity_log_entry = { + key = pilgrimage_changed_ways_log + tags = { good } + score = 50 + character = root + show_in_conclusion = yes + #Effects + root = { + flip_sinful_trait_effect = yes + } + } + } + stress_impact = { + base = massive_stress_impact_gain #you are losing a part of yourself + fickle = medium_stress_impact_loss + zealous = minor_stress_impact_loss + } + } + #I will just listen to your teachings instead + option = { + name = pilgrimage.6790.b + pious_type_option_effect = yes + add_piety = minor_piety_gain + stress_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + #I am PERFECT + option = { + name = pilgrimage.6790.c + worldly_type_option_effect = yes + add_prestige = minor_prestige_gain + stress_impact = { + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + } + modifier = { + factor = 2 + has_trait = arrogant + } + } + } +} + +scripted_trigger pilgrimage_6800_valid_member = { + is_landed = no + is_ruler = no + is_physically_able_ai_adult = yes + faith = root.faith + NOR = { + this = root + is_heir_of = root + is_spouse_of = root + has_trait = cynical + has_trait = celibate + has_trait = devoted + is_courtier_of = $NEW_COURT_OWNER$ + } +} + +scripted_effect pilgrimage_6800_friend_effect = { + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:called_member } + } + set_relation_friend = { + reason = friend_holy_site_monk + target = scope:called_member + } + } + else = { + scope:called_member = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 50 + } + } + } +} + +scripted_effect pilgrimage_6800_rival_effect = { + scope:called_member = { + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = root } + } + progress_towards_rival_effect = { + REASON = rival_no_holy_site_monk + CHARACTER = root + OPINION = -50 + } + } + else = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -50 + } + } + } +} + +scripted_effect pilgrimage_6800_monk_effect = { + add_trait = devoted + add_piety = medium_piety_gain + add_character_flag = need_priest_outfit + every_spouse = { divorce = prev } + every_consort = { remove_concubine = prev } + current_travel_plan = { remove_character = scope:called_member } + if = { + limit = { + scope:called_member = { + is_ruler = no + NOT = { is_courtier_of = scope:holy_site_owner } + } + } + scope:holy_site_owner = { add_courtier = scope:called_member } + } +} + +#Entourage member feels The Calling +#by Veronica Pazos +pilgrimage.6800 = { + type = activity_event + title = pilgrimage.6800.t + desc = pilgrimage.6800.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + center_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:called_member + animation = beg + } + lower_center_portrait = scope:bishop_pilgrim + cooldown = { years = 1 } + trigger = { + location.county.holder ?= { + this != root + save_temporary_scope_as = court_owner_check + } + exists = scope:court_owner_check.cp:councillor_court_chaplain + current_travel_plan ?= { + any_entourage_character = { + pilgrimage_6800_valid_member = { NEW_COURT_OWNER = scope:court_owner_check } + } + } + } + immediate = { + location.county.holder = { save_scope_as = holy_site_owner } + if = { + limit = { exists = scope:holy_site_owner.cp:councillor_court_chaplain } + scope:holy_site_owner.cp:councillor_court_chaplain = { save_scope_as = bishop_pilgrim } + } + current_travel_plan = { + random_entourage_character = { + limit = { + pilgrimage_6800_valid_member = { NEW_COURT_OWNER = scope:holy_site_owner } + } + weight = { + base = 1 + modifier = { + is_close_or_extended_family_of = root + add = 5 + } + modifier = { + has_trait = zealous + add = 5 + } + modifier = { + has_lifestyle = learning_lifestyle + add = 2 + } + modifier = { + has_trait = fickle + add = 1 + } + modifier = { + is_married = yes + add = -5 + } + } + save_scope_as = called_member + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a religious journey + has_activity_intent = zealot_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Sure, go + option = { + name = pilgrimage.6800.a + pious_type_option_effect = yes + scope:called_member = { pilgrimage_6800_monk_effect = yes } + involved_activity = { + add_activity_log_entry = { + key = pilgrimage_the_calling_log + tags = { good } + score = 50 + character = root + target = scope:called_member + location = root.location + + #Effects + root = { + add_piety = medium_piety_gain + } + } + } + stress_impact = { + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + cynical = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = vengeful + has_trait = cynical + } + } + } + } + #We have religious stuff at home too + option = { + name = pilgrimage.6800.b + add_piety = minor_piety_gain + scope:called_member = { + add_trait = celibate + add_piety = medium_piety_gain + add_character_flag = need_priest_outfit + every_spouse = { divorce = prev } #scope:called_member + } + stress_impact = { + cynical = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = cynical + } + } + } + } + #Don't be silly + option = { + name = pilgrimage.6800.c + worldly_type_option_effect = yes + pilgrimage_6800_rival_effect = yes + stress_impact = { + compassionate = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = cynical + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = zealous + } + } + } + } + #Oh, so you wanna stay to PLOT against me + option = { + name = pilgrimage.6800.d + trigger = { has_trait = paranoid } + pilgrimage_6800_rival_effect = yes + stress_impact = { + base = medium_stress_impact_loss #you caught them + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = paranoid + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + #You can stay and ALSO I'll make a donation + option = { + name = pilgrimage.6800.e + flavor = pilgrimage.6800.e.tt + trigger = { has_trait = zealous } + pious_type_option_effect = yes + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 20 + } + add_piety = medium_piety_gain + } + else = { add_piety = major_piety_gain } + scope:called_member = { pilgrimage_6800_monk_effect = yes } + pilgrimage_6800_friend_effect = yes + if = { + limit = { + exists = scope:bishop_pilgrim + can_set_relation_friend_trigger = { CHARACTER = scope:bishop_pilgrim } + } + set_relation_friend = { + reason = friend_holy_site_monk_monk + target = scope:bishop_pilgrim + } + } + else_if = { + limit = { can_set_relation_friend_trigger = { CHARACTER = scope:holy_site_owner } } + scope:holy_site_owner = { + set_relation_friend = { + reason = friend_holy_site_monk_monk + target = scope:bishop_pilgrim + } + } + } + else = { + scope:holy_site_owner = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + } + stress_impact = { + avaricious = major_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + OR = { + has_trait = avaricious + has_trait = greedy + } + } + } + } +} + +scripted_effect pilgrimage_6810_friend_effect = { + if = { + limit = { + exists = scope:my_bishop + can_set_relation_friend_trigger = { CHARACTER = scope:my_bishop } + } + set_relation_friend = { + reason = friend_bought_indulgences + target = scope:my_bishop + } + } + else_if = { #if you can't be friends we make them endorse you + limit = { exists = scope:my_bishop } + scope:my_bishop = { + add_opinion = { + target = prev #we use prev so we can use the effect with your heir too + modifier = pious_opinion + opinion = 30 + } + } + } + else = { + scope:religious_head_scope = { + add_opinion = { + target = prev + modifier = pious_opinion + opinion = 30 + } + } + } +} + +#Do you wanna buy an indulgence? +#by Veronica Pazos +pilgrimage.6810 = { + type = activity_event + title = pilgrimage.6810.t + desc = pilgrimage.6810.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:bishop_pilgrim + animation = steward + } + lower_left_portrait = { + trigger = { exists = scope:my_heir } + character = scope:my_heir + } + lower_right_portrait = scope:religious_head_scope + lower_center_portrait = { + trigger = { exists = scope:my_bishop } + character = scope:my_bishop + } + cooldown = { years = 1 } + trigger = { + faith = { religion_tag = christianity_religion } #this is basically a Christian thing + exists = faith.religious_head #you have a religious head + faith.religious_head = { + this != root #and it's not you + is_available_ai_adult = yes + } + exists = location.county.holder.cp:councillor_court_chaplain #there's also someone around to be handing out these + location.county.holder.cp:councillor_court_chaplain.faith = faith.religious_head.faith #and they're the same faith (and, by extension, yours) + } + immediate = { + faith.religious_head = { save_scope_as = religious_head_scope } + location.county.holder.cp:councillor_court_chaplain = { save_scope_as = bishop_pilgrim } + if = { + limit = { exists = root.player_heir } + player_heir = { save_scope_as = my_heir } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + current_travel_plan ?= { + any_entourage_character = { + this = root.cp:councillor_court_chaplain + } + } + } + cp:councillor_court_chaplain = { save_scope_as = my_bishop } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a religious journey + has_activity_intent = zealot_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Buy one + option = { + name = pilgrimage.6810.a + pious_type_option_effect = yes + pay_short_term_gold = { + target = scope:bishop_pilgrim + gold = { + value = medium_gold_value + max = 25 + } + } + add_piety = minor_piety_gain + pilgrimage_6810_friend_effect = yes + if = { + limit = { + faith = { trait_is_virtue = greedy } + } + stress_impact = { + greedy = medium_stress_impact_loss + } + } + else = { + stress_impact = { + honest = minor_stress_impact_gain + just = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + has_trait = greedy + } + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = just + } + } + modifier = { + factor = 0 + short_term_gold <= medium_gold_value + } + } + } + #Buy one for your heir + option = { + name = pilgrimage.6810.b + trigger = { exists = scope:my_heir } + pious_type_option_effect = yes + pay_short_term_gold = { + target = scope:bishop_pilgrim + gold = { + value = medium_gold_value + max = 25 + } + } + add_piety = minor_piety_gain + scope:my_heir = { pilgrimage_6810_friend_effect = yes } + if = { + limit = { + faith = { trait_is_virtue = greedy } + } + stress_impact = { + greedy = medium_stress_impact_loss + generous = medium_stress_impact_loss + } + } + else = { + stress_impact = { + honest = minor_stress_impact_gain + just = medium_stress_impact_gain + generous = medium_stress_impact_loss + } + } + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = generous + } + modifier = { + factor = 0.5 + OR = { + has_trait = greedy + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = just + } + } + modifier = { + factor = 0 + short_term_gold <= medium_gold_value + } + } + } + #This is immoral + option = { + name = pilgrimage.6810.c + worldly_type_option_effect = yes + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = minor_lifestyle_experience + } + else_if = { + limit = { has_lifestyle = diplomacy_lifestyle } + add_diplomacy_lifestyle_xp = minor_lifestyle_experience + } + stress_impact = { + cynical = medium_stress_impact_loss + deceitful = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = deceitful + has_trait = arbitrary + has_trait = callous + } + } + } + } +} + +scripted_trigger pilgrimage_6820_trigger = { + age = { 20 60 } + is_lowborn = yes + stewardship = { + min_template_decent_skill + max_template_decent_skill + } +} + +#Do you wanna buy a pilgrim's guide? - based in the Codex Calixtinus +#by Veronica Pazos +pilgrimage.6820 = { + type = activity_event + title = pilgrimage.6820.t + desc = pilgrimage.6820.desc + theme = pilgrimage_destination + override_background = { reference = market } + left_portrait = { + character = root + animation = personality_greedy + } + right_portrait = { + character = scope:guide_merchant + animation = beg + } + artifact = { + target = scope:guide_scope + position = lower_center_portrait + } + cooldown = { years = 1 } + trigger = { + #triggered by the on_action + } + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + pilgrimage_6820_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { pilgrimage_6820_trigger = yes } + save_scope_as = guide_merchant + } + } + else = { + create_character = { + template = merchant_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + save_scope_as = guide_merchant + } + set_variable = guide_merchant_var + } + hidden_effect_new_object = { + scope:guide_merchant = { + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = pilgrim_guide_artifact + description = pilgrim_guide_artifact_desc + type = journal + visuals = indian_book + modifier = artifact_monthly_piety_2_modifier + modifier = artifact_diplomacy_1_modifier + save_scope_as = guide_scope + } + } + else = { + create_artifact = { + name = pilgrim_guide_artifact + description = pilgrim_guide_artifact_desc + type = journal + visuals = book + modifier = artifact_monthly_piety_2_modifier + modifier = artifact_diplomacy_1_modifier + save_scope_as = guide_scope + } + } + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_lifestyle = diplomacy_lifestyle + } + modifier = { + factor = 2 + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_worldly + } + } + } + } + #I wanna buy + option = { + name = pilgrimage.6820.a + worldly_type_option_effect = yes + pay_short_term_gold = { + target = scope:guide_merchant + gold = { + value = minor_gold_value + max = 5 + } + } + scope:guide_scope = { + set_owner = { + target = root + history = { + type = purchased + actor = root + recipient = scope:guide_merchant #giver + location = root.location + } + } + } + current_travel_plan ?= { + add_travel_plan_modifier = { modifier = pilgrim_guide_modifier } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = arrogant + } + } + modifier = { + factor = 0 + gold <= medium_gold_value + } + } + } + #You explain the place to them + option = { + name = pilgrimage.6820.b + flavor = pilgrim.6820.b.flavor + trigger = { + learning >= decent_skill_rating + diplomacy >= decent_skill_rating + } + show_as_unavailable = { + learning < decent_skill_rating + diplomacy < decent_skill_rating + } + bonus_to_all_types_effect = yes + add_character_modifier = { + modifier = local_expert_modifier + years = 10 + } + random_list = { + 80 = { } + 20 = { add_diplomacy_skill = 1 } + } + current_travel_plan = { + add_travel_plan_modifier = { + modifier = pilgrim_guide_modifier + } + } + stress_impact = { + humble = medium_stress_impact_gain + } + hidden_effect = { destroy_artifact = scope:guide_scope } # Destroy the trinket if its not bought + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + } + } + } + #I don't need no guide + option = { + name = pilgrimage.6820.c + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + hidden_effect = { destroy_artifact = scope:guide_scope } # Destroy the trinket if its not bought + } + after = { + if = { + limit = { + is_ai = yes + has_variable = guide_merchant_var + } + scope:guide_merchant = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + remove_variable = guide_merchant_var + } + } +} + +#Admire the holy site in a religious way +#by Veronica Pazos +pilgrimage.6830 = { + type = activity_event + title = pilgrimage.6830.t + desc = pilgrimage.6830.desc + theme = pilgrimage_destination + override_background = { reference = temple } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + has_trait = lifestyle_reveler + } + } + animation = boredom + } + animation = personality_zealous + } + artifact = { + trigger = { exists = scope:votive_artifact } + target = scope:votive_artifact + position = lower_center_portrait + } + cooldown = { years = 1 } + trigger = { + has_activity_intent = reflection_intent + NOT = { religion = religion:tengrism_religion } + } + immediate = { + if = { + limit = { + any_character_artifact = { + is_equipped = no + artifact_durability < 50 + NOR = { + rarity = illustrious + rarity = famed + } + } + } + random_character_artifact = { + limit = { + is_equipped = no + artifact_durability < 50 + NOR = { + rarity = illustrious + rarity = famed + } + } + save_scope_as = votive_artifact + } + } + else_if = { + limit = { + any_character_artifact = { + is_equipped = no + NOR = { + rarity = illustrious + rarity = famed + } + } + } + random_character_artifact = { + limit = { + is_equipped = no + NOR = { + rarity = illustrious + rarity = famed + } + } + save_scope_as = votive_artifact + } + } + else_if = { + limit = { + any_character_artifact = { is_equipped = no } + } + random_character_artifact = { + limit = { is_equipped = no } + save_scope_as = votive_artifact + } + } + else = { + random_character_artifact = { save_scope_as = votive_artifact } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a reflection journey + has_activity_intent = reflection_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Pray + option = { + name = pilgrimage.6830.a + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + stress_impact = { + base = medium_stress_impact_loss + arrogant = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = arrogant + has_trait = cynical + } + } + } + #Admire the architecture + option = { + name = pilgrimage.6830.b + worldly_type_option_effect = yes + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = minor_lifestyle_experience + } + random_list = { + 80 = { + add_character_modifier = { + modifier = architectural_interest_modifier + years = 10 + } + } + 20 = { + add_learning_skill = 1 + } + } + stress_impact = { + base = medium_stress_impact_loss + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + #Make a donation + option = { + name = pilgrimage.6830.c + trigger = { + exists = scope:votive_artifact + has_trait = pilgrim #Only pilgrim since you can't level up the hajj trait + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + custom_tooltip = pilgrimage.6830.c.tt + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + add_trait_xp = { + trait = pilgrim + value = 20 + } + hidden_effect = { destroy_artifact = scope:votive_artifact } + stress_impact = { + base = medium_stress_impact_loss + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + modifier = { + factor = 0 + OR = { + scope:votive_artifact = { + rarity = illustrious + } + scope:votive_artifact = { + rarity = famed + } + } + } + modifier = { + factor = 2 + has_trait = zealous + } + } + } +} + +#Ask a local priest to bless your artifact +#by Veronica Pazos +pilgrimage.6840 = { + type = activity_event + title = pilgrimage.6840.t + desc = pilgrimage.6840.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = beg + camera = camera_event_center_pointing_right + } + right_portrait = { + character = scope:blessed_bishop + animation = wedding_priest + } + artifact = { + target = scope:blessed_artifact + position = lower_center_portrait + } + cooldown = { years = 1 } + trigger = { + any_character_artifact = { + category = inventory + } + } + immediate = { + location = { save_scope_as = holy_site_scope } + if = { + limit = { + exists = location.county.holder.cp:councillor_court_chaplain + location.county.holder.cp:councillor_court_chaplain.faith = root.faith + } + location.county.holder.cp:councillor_court_chaplain = { save_scope_as = blessed_bishop } + } + else = { + create_character = { + template = priest_character_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = blessed_bishop + } + set_variable = created_blessed_bishop_var + } + if = { + limit = { + any_character_artifact = { + is_equipped = yes + rarity = illustrious + } + } + random_character_artifact = { + limit = { + is_equipped = yes + rarity = illustrious + } + save_scope_as = blessed_artifact + } + } + else_if = { + limit = { + any_character_artifact = { is_equipped = yes } + } + random_character_artifact = { + limit = { is_equipped = yes } + save_scope_as = blessed_artifact + } + } + else = { #inventory artifacts + random_character_artifact = { + save_scope_as = blessed_artifact + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a religious journey + has_activity_intent = zealot_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Make my artifact more pious + option = { + name = pilgrimage.6840.a + pious_type_option_effect = yes + pay_short_term_gold = { + target = scope:blessed_bishop + gold = { + value = medium_gold_value + max = 15 + } + } + add_piety = miniscule_piety_gain + scope:blessed_artifact = { + add_durability = 10 + custom_tooltip = { + text = pilgrimage.6840.a.tt + add_artifact_modifier = artifact_monthly_piety_gain_mult_1_modifier + } + set_artifact_description = blessed_artifact_desc + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + humble = minor_stress_impact_gain + cynical = minor_stress_impact_gain + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = humble + has_trait = cynical + } + } + modifier = { + factor = 0 + gold < major_gold_value + } + } + } + #Make my artifact stronger + option = { + name = pilgrimage.6840.b + worldly_type_option_effect = yes + pay_short_term_gold = { + target = scope:blessed_bishop + gold = { + value = medium_gold_value + max = 15 + } + } + add_piety = miniscule_piety_gain + scope:blessed_artifact = { + add_durability = 10 + custom_tooltip = { + text = pilgrimage.6840.b.tt + add_artifact_modifier = artifact_monthly_prestige_5_modifier + } + set_artifact_description = blessed_artifact_desc + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + humble = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = humble + has_trait = zealous + } + } + modifier = { + factor = 0 + gold < major_gold_value + } + } + } + #I don't need no blessing + option = { + name = pilgrimage.6840.c + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_zeal = -1 + } + } + } + after = { + if = { + limit = { + is_ai = yes + has_variable = created_blessed_bishop_var + } + scope:blessed_bishop = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + remove_variable = created_blessed_bishop_var + } + } +} +# A Master Thief +# by Laurence Kennedy +pilgrimage.6850 = { + type = activity_event + title = pilgrimage.6850.t + desc = pilgrimage.6850.desc + theme = pilgrimage_destination + override_background = { reference = bedchamber } + + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:fake_thief + animation = assassin + } + center_portrait = { + character = scope:wise_priest + animation = throne_room_writer + } + cooldown = { years = 15 } + + trigger = { + religion = religion:buddhism_religion + } + immediate = { + if = { + #Find yourself a local priest + limit = { + location.county.holder.cp:councillor_court_chaplain ?= { + faith = root.faith + is_available_ai_adult = yes + this != root + } + } + location.county.holder.cp:councillor_court_chaplain = { save_scope_as = wise_priest } + } + else = { + #make a priest + create_character = { + template = priest_character_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = wise_priest + } + } + #make a fake thief + create_character = { + template = generic_peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = fake_thief + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a reflection journey + has_activity_intent = reflection_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Decrease enemy hostile scheme success chance + option = { + name = pilgrimage.6850.a + add_piety = medium_piety_gain + add_character_modifier = { + modifier = light_in_shadow_modifier + years = 5 + } + stress_impact = { + cynical = minor_stress_impact_gain + trusting = medium_stress_impact_gain + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = cynical + has_trait = trusting + } + } + } + #Improve your spymaster's secret discovery chance + option = { + name = pilgrimage.6850.b + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = spymaster_eyes_modifier + years = 5 + } + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + lazy = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = diligent + has_trait = paranoid + } + } + } + #Imprison you court chaplain + option = { + name = pilgrimage.6850.c + trigger = { + cp:councillor_court_chaplain ?= { + is_ai = yes + } + } + rightfully_imprison_character_effect = { + TARGET = cp:councillor_court_chaplain + IMPRISONER = root + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + + stress_impact = { + trusting = minor_stress_impact_gain + just = medium_stress_impact_gain + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = trusting + has_trait = just + } + } + } + after = { + scope:wise_priest = { + if = { + limit = { + is_ai = yes + NOT = { + has_council_position = councillor_court_chaplain + } + } + silent_disappearance_effect = yes + } + } + scope:fake_thief = { + silent_disappearance_effect = yes + } + } +} + +################################ +# Conclusion events +# 7000-7499 +# by Filippa Gannholm Kirsten +################################ +# pilgrimage.7000 - Summarizing our activity +# +# + +#Summarizing our activity +pilgrimage.7000 = { + type = activity_event + title = { + first_valid = { + #Obligatory Pilgrimage + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = pilgrimage_option_fidelity + option = pilgrimage_fidelity_obligatory + } + } + NOT = { has_character_flag = pilgrimage_counter_obligatory } + } + desc = pilgrimage.7000.t_obligatory + } + #Hajj conclusion + triggered_desc = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + } + desc = pilgrimage.7000.t_hajj + } + #Pilgrimage conclusion + desc = pilgrimage.7000.t + } + } + desc = { + first_valid = { + #Obligatory pilgrimage, rush rush go go + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = pilgrimage_option_fidelity + option = pilgrimage_fidelity_obligatory + } + } + NOT = { has_character_flag = pilgrimage_counter_obligatory } + } + desc = pilgrimage.7000.desc_obligatory + } + #Standard pilgrimage + triggered_desc = { + desc = { + #Hajj or Pilgrimage? + first_valid = { + #Hajj conclusion + triggered_desc = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + } + desc = pilgrimage.7000.intro_hajj + } + #Pilgrimage conclusion + desc = pilgrimage.7000.intro + } + #Handle the type + first_valid = { + #Perfect pious + triggered_desc = { + trigger = { + scope:activity = { + OR = { + activity_has_pious_pilgrimage_type_trigger = yes + activity_has_hajj_pilgrimage_type_trigger = yes + } + } + has_character_flag = perfect_pious_reward + } + desc = pilgrimage.7000.desc_perfect_pious + } + #High end pious + triggered_desc = { + trigger = { + scope:activity = { + OR = { + activity_has_pious_pilgrimage_type_trigger = yes + activity_has_hajj_pilgrimage_type_trigger = yes + } + } + has_character_flag = high_pious_reward + } + desc = pilgrimage.7000.desc_high_pious + } + #OK pious + triggered_desc = { + trigger = { + scope:activity = { + OR = { + activity_has_pious_pilgrimage_type_trigger = yes + activity_has_hajj_pilgrimage_type_trigger = yes + } + } + has_character_flag = mid_pious_reward + } + desc = pilgrimage.7000.desc_mid_pious + } + #Lousy pious + triggered_desc = { + trigger = { + scope:activity = { + OR = { + activity_has_pious_pilgrimage_type_trigger = yes + activity_has_hajj_pilgrimage_type_trigger = yes + } + } + has_character_flag = low_pious_reward + } + desc = pilgrimage.7000.desc_low_pious + } + #High end worldly + triggered_desc = { + trigger = { + scope:activity = { activity_has_worldly_pilgrimage_type_trigger = yes } + has_character_flag = perfect_worldly_reward + } + desc = pilgrimage.7000.desc_perfect_worldly + } + #High end worldly + triggered_desc = { + trigger = { + scope:activity = { activity_has_worldly_pilgrimage_type_trigger = yes } + has_character_flag = high_worldly_reward + } + desc = pilgrimage.7000.desc_high_worldly + } + #OK worldly + triggered_desc = { + trigger = { + scope:activity = { activity_has_worldly_pilgrimage_type_trigger = yes } + has_character_flag = mid_worldly_reward + } + desc = pilgrimage.7000.desc_mid_worldly + } + #Lousy worldly + triggered_desc = { + trigger = { + scope:activity = { activity_has_worldly_pilgrimage_type_trigger = yes } + has_character_flag = low_worldly_reward + } + desc = pilgrimage.7000.desc_low_worldly + } + } + #Outro - Did previous host die? Otherwise trivia about your pilgrimage/Hajj history + first_valid = { + #Buried predecessor here + triggered_desc = { + trigger = { has_variable = pilgrimage_death_bury_there } + desc = pilgrimage.7000.outro_buried_predecessor_here + } + #Will bury them at home + triggered_desc = { + trigger = { has_variable = pilgrimage_death_bury_home } + desc = pilgrimage.7000.outro_bury_predecessor_home + } + #First Hajj + triggered_desc = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + any_memory = { + memory_type = completed_hajj_memory + count = 1 + } + } + desc = pilgrimage.7000.outro_first_hajj + } + #Second Hajj + triggered_desc = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + any_memory = { + memory_type = completed_hajj_memory + count = 2 + } + } + desc = pilgrimage.7000.outro_second_hajj + } + #... the rest + triggered_desc = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + any_memory = { + memory_type = completed_hajj_memory + count > 2 + } + } + desc = pilgrimage.7000.outro_multi_hajj + } + #First pilgrimage + triggered_desc = { + trigger = { var:num_pilgrimages_undertaken ?= 1 } + desc = pilgrimage.7000.outro_first + } + #Second pilgrimage + triggered_desc = { + trigger = { + var:num_pilgrimages_undertaken ?= 2 + NOT = { exists = scope:revisited_first_pilgrimage_memory } + } + desc = pilgrimage.7000.outro_second + } + #Second pilgrimage -- which revisited the first pilgrimage site + triggered_desc = { + trigger = { + var:num_pilgrimages_undertaken ?= 2 + exists = scope:revisited_first_pilgrimage_memory + } + desc = pilgrimage.7000.outro_second_revisit + } + #... the rest + triggered_desc = { + trigger = { + exists = var:num_pilgrimages_undertaken + var:num_pilgrimages_undertaken >= 3 + } + desc = pilgrimage.7000.outro_multi + } + } + #Is this a new holy site? (And also not our first pilgrimage) + first_valid = { + triggered_desc = { + trigger = { + any_in_list = { + variable = visited_unique_holy_sites_list + count > 1 + } + has_character_flag = added_new_holy_site + } + desc = pilgrimage.7000.outro_new_holy_site + } + } + } + } + } + } + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:activity = { + has_activity_option = { + category = pilgrimage_option_fidelity + option = pilgrimage_fidelity_obligatory + } + } + NOT = { has_character_flag = pilgrimage_counter_obligatory } + } + animation = disapproval + } + triggered_animation = { + trigger = { + OR = { + has_character_flag = low_pious_reward + has_character_flag = low_worldly_reward + } + } + animation = worry + } + triggered_animation = { + trigger = { has_trait = cynical } + animation = personality_cynical + } + animation = personality_forgiving + } + artifact = { + target = scope:christian_saint_bone_scope + position = lower_center_portrait + } + immediate = { + christian_saint_bone_creation_effect = yes + #Save memory location for loc if this is our second pilgrimage + if = { + limit = { + var:num_pilgrimages_undertaken ?= 2 + any_memory = { + memory_type = completed_pilgrimage + has_variable = first_pilgrimage + #If it's the same place then we revisited the place + var:pilgrimage_destination ?= root.location + } + } + save_scope_as = revisited_first_pilgrimage_memory + } + else = { + #For loc + random_memory = { + limit = { + has_variable = first_pilgrimage + NOT = { var:pilgrimage_destination = root.location } + } + save_scope_as = first_pilgrimage_memory + } + } + #The old host died, saving for loc + if = { + limit = { exists = var:old_host_to_be_buried } + var:old_host_to_be_buried = { save_scope_as = old_pilgrimage_host } + } + + # ACH Repent oath counter + if = { + limit = { + has_variable = repent_oath_pilgrimage_counter + } + change_variable = { + name = repent_oath_pilgrimage_counter + add = 1 + } + } + } + #Alright + option = { + #Hajj alright + name = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + has_trait = cynical + } + text = pilgrimage.7000.a_hajj_cynical + } + #Hajj cynical + name = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + } + text = pilgrimage.7000.a_hajj + } + #Cynical + name = { + trigger = { + OR = { + AND = { + scope:activity = { + has_activity_option = { + category = pilgrimage_option_fidelity + option = pilgrimage_fidelity_obligatory + } + } + NOT = { has_character_flag = pilgrimage_counter_obligatory } + } + has_trait = cynical + } + } + text = pilgrimage.7000.a_cynical + } + #Alright + name = { + trigger = { + NOR = { + AND = { + scope:activity = { + has_activity_option = { + category = pilgrimage_option_fidelity + option = pilgrimage_fidelity_obligatory + } + } + NOT = { has_character_flag = pilgrimage_counter_obligatory } + } + has_trait = cynical + } + } + text = pilgrimage.7000.a + } + custom_tooltip = pilgrimage.7000.a.tt + #Rewards and log entries are resolved in on_end in the Pilgrimage activity setup + show_as_tooltip = { pilgrimage_completed_log_entry_effect = yes } + } + + option = { + name = pilgrimage.7000.b + trigger = { # If it's Pious or Hajj we lower your Gallowsbait + has_ep3_dlc_trigger = yes + has_trait = gallowsbait + has_any_gallowsbait_xp_trigger = yes + OR = { + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_hajj + } + } + } + } + if = { # If you are a devoted Pilgrim you lose it entirely + limit = { + OR = { + AND = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value >= 50 + } + } + has_character_flag = perfect_pious_reward + has_character_flag = high_pious_reward + } + } + remove_trait = gallowsbait + } + else = { # Else we lower it + lower_gallowsbait_xp_effect = { VALUE = -25 } + } + show_as_tooltip = { pilgrimage_completed_log_entry_effect = yes } + } + + after = { + #Party's over; clean up time + clean_up_pilgrimage_type_reward_flags_effect = yes + #If we added a new holy site, remove the flag + remove_character_flag = added_new_holy_site + remove_character_flag = should_get_trait_piety + remove_character_flag = pilgrimage_counter_obligatory + } +} + +################################ +# Return Events +# 9001-9999 +# by Petter Vilberg & Filippa Gannholm Kirsten +################################ +# pilgrimage.9001 - Nice spiritual journey +# pilgrimage.9010 - Bury old host back home +# pilgrimage.9100 - Follow-up to exotic wares event +# + +#Nice spiritual journey +pilgrimage.9001 = { + type = character_event + title = pilgrimage.9001.t + desc = { + desc = pilgrimage.9001.desc_intro + first_valid = { + triggered_desc = { + trigger = { has_variable = pilgrimage_invalidated } + desc = pilgrimage.9001.desc_invalidated + } + triggered_desc = { + trigger = { has_variable = pilgrimage_death_bury_there } + desc = pilgrimage.9001.desc_buried_there + } + desc = pilgrimage.9001.desc + } + } + theme = pilgrimage_return + override_background = { reference = relaxing_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_invalidated } + animation = sadness + } + animation = pondering + } + trigger = { + OR = { + has_variable = has_completed_pilgrimage + has_variable = pilgrimage_invalidated + } + NOR = { + has_variable = pilgrimage_death_turn_back + has_variable = pilgrimage_death_bury_home + has_character_flag = pilgrimage_burial_interrupted_pilgrimage + } + } + immediate = { + play_music_cue = mx_cue_travel_arrival + traveler_lifestyle_rank_up_check_effect = yes + #For loc + if = { + limit = { exists = var:old_host_to_be_buried } + var:old_host_to_be_buried = { save_scope_as = old_pilgrimage_host } + } + if = { + limit = { exists = var:pilgrimage_burial_location } + var:pilgrimage_burial_location = { save_scope_as = burial_location } + } + if = { + limit = { exists = var:pilgrimage_invalidated_illness } + var:pilgrimage_invalidated_illness = { save_scope_as = missed_holy_site } + } + # Cultural Ambassador travel option + if = { + limit = { + current_travel_plan = { + has_travel_option = cultural_ambassador_option + } + } + custom_tooltip = cultural_ambassador_option.tt + } + # Allocates a tiny bit of Horse XP if you have the Hastiluder trait + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_miniscule_value + } + } + } + option = { + name = { + trigger = { has_variable = pilgrimage_invalidated } + text = pilgrimage.9001.a_invalidated + } + name = pilgrimage.9001.a + custom_tooltip = pilgrimage.9001.a.tt + } + after = { + if = { + limit = { has_variable = has_completed_pilgrimage } + remove_variable = has_completed_pilgrimage + } + if = { + limit = { has_variable = pilgrimage_invalidated_illness } + remove_variable = pilgrimage_invalidated_illness + } + remove_character_flag = pilgrimage_invalidated + #Follow-up after old host died; burial at home + if = { + limit = { has_character_modifier = pilgrimage_burial_at_capital_modifier } + trigger_event = { + id = pilgrimage.9010 + days = 10 + } + } + #Follow-up to exotic wares event + if = { + limit = { + OR = { + has_character_modifier = pilgrimage_exotic_wares_modifier + has_character_modifier = pilgrimage_super_exotic_wares_modifier + } + } + trigger_event = { + id = pilgrimage.9100 + days = 5 + } + } + remove_character_flag = pilgrim_group_joined + if = { + limit = { has_variable = pilgrimage_death_bury_there } + remove_variable = pilgrimage_death_bury_there + } + } +} + +#Bury old host back home +pilgrimage.9010 = { + type = character_event + title = pilgrimage.9010.t + desc = { + first_valid = { + #Departed mother/father + triggered_desc = { + trigger = { + is_close_family_of = scope:old_pilgrimage_host + } + desc = pilgrimage.9010.desc.relation_family + } + #Dearly departed + triggered_desc = { + trigger = { has_character_flag = pilgrimage_liked_my_predecessor } + desc = pilgrimage.9010.desc.relation_liked + } + #... dead liege? + desc = pilgrimage.9010.desc.relation_neutral + } + first_valid = { + #Turned back, liked host + triggered_desc = { + trigger = { + has_variable = pilgrimage_death_turn_back + has_character_flag = pilgrimage_liked_my_predecessor + } + desc = pilgrimage.9010.desc.turned_back_liked + } + #Turned back, neutral relation + triggered_desc = { + trigger = { has_variable = pilgrimage_death_turn_back } + desc = pilgrimage.9010.desc.turned_back_neutral + } + #Went to holy site and back, liked host + triggered_desc = { + trigger = { + has_variable = pilgrimage_death_bury_home + has_character_flag = pilgrimage_liked_my_predecessor + NOT = { has_character_flag = pilgrimage_burial_interrupted_pilgrimage } + } + desc = pilgrimage.9010.desc.there_and_back_liked + } + #Went to holy site and back, neutral relation + triggered_desc = { + trigger = { + has_variable = pilgrimage_death_bury_home + NOT = { has_character_flag = pilgrimage_burial_interrupted_pilgrimage } + } + desc = pilgrimage.9010.desc.there_and_back_neutral + } + #Tried to bury them at the holy site but activity invalidated, liked host + triggered_desc = { + trigger = { has_character_flag = pilgrimage_burial_interrupted_pilgrimage } + desc = pilgrimage.9010.desc.invalidated_pilgrimage_liked + } + #Tried to bury them at the holy site but activity invalidated, neutral relation + triggered_desc = { + trigger = { has_character_flag = pilgrimage_burial_interrupted_pilgrimage } + desc = pilgrimage.9010.desc.invalidated_pilgrimage_neutral + } + } + } + theme = pilgrimage_return + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + } + } + reference = temple + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + is_close_family_of = scope:old_pilgrimage_host + has_character_flag = pilgrimage_liked_my_predecessor + } + animation = grief + } + triggered_animation = { + trigger = { has_character_flag = pilgrimage_liked_my_predecessor } + animation = grief + } + animation = sadness + } + right_portrait = { + trigger = { exists = scope:grieving_companion } + character = scope:grieving_companion + animation = sadness + } + lower_center_portrait = { + character = scope:old_pilgrimage_host + } + trigger = { + trigger_if = { + limit = { + has_variable = pilgrimage_death_bury_home + } + always = yes + } + trigger_else = { + always = no + } + } + immediate = { + play_music_cue = mx_cue_travel_arrival + remove_character_modifier = pilgrimage_burial_at_capital_modifier + save_scope_as = root_scope + #For loc + if = { + limit = { exists = var:old_host_to_be_buried } + var:old_host_to_be_buried = { save_scope_as = old_pilgrimage_host } + } + if = { + limit = { exists = var:previous_holy_site } + var:previous_holy_site = { save_scope_as = previous_holy_site } + } + #For atmosphere + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available = yes } + } + cp:councillor_court_chaplain = { save_scope_as = grieving_companion } + } + else = { + random_courtier = { + limit = { is_available_adult = yes } + save_scope_as = grieving_companion + } + } + } + option = { + name = pilgrimage.9010.a + name = { + trigger = { + has_variable = pilgrimage_death_bury_home + has_character_flag = pilgrimage_burial_interrupted_pilgrimage + } + text = pilgrimage.9010.a_interrupted + } + name = { + trigger = { + has_government = landless_adventurer_government + } + text = pilgrimage.9010.a_adventurer + } + flavor = pilgrimage.9010.a.flavor + if = { + limit = { + OR = { + has_variable = pilgrimage_death_turn_back + #If we wanted to bury them at the holy site but our activity was invalidated + AND = { + has_variable = pilgrimage_death_bury_home + has_character_flag = pilgrimage_burial_interrupted_pilgrimage + } + } + } + pilgrimage_turn_back_and_bury_effect = yes + } + if = { + limit = { has_variable = pilgrimage_death_bury_home } + pilgrimage_bury_at_home_effect = yes + } + } + after = { + remove_character_flag = pilgrimage_liked_my_predecessor + remove_character_flag = pilgrimage_burial_interrupted_pilgrimage + remove_variable = old_host_to_be_buried + remove_variable = previous_holy_site + if = { + limit = { has_variable = pilgrimage_death_turn_back } + remove_variable = pilgrimage_death_turn_back + } + if = { + limit = { has_variable = pilgrimage_death_bury_there } + remove_variable = pilgrimage_death_bury_there + } + if = { + limit = { has_variable = pilgrimage_death_bury_home } + create_character_memory = { + type = pilgrimage_handled_predecessor_remains_memory + participants = { predecessor = scope:old_pilgrimage_host } + } + if = { + limit = { exists = scope:new_memory } + scope:new_memory = { + set_variable = { + name = pilgrimage_destination + value = scope:previous_holy_site + } + set_variable = { + name = home + value = root.location #Should be capital_province + } + set_variable = { + name = buried_predecessor_back_home + value = flag:yes + } + } + } + remove_variable = pilgrimage_death_bury_home + } + } +} + +#Follow-up to exotic wares event +pilgrimage.9100 = { + type = character_event + title = pilgrimage.9100.t + desc = { + desc = pilgrimage.9100.desc_intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_variable = 6540_exotic_wares_gift + has_variable = 6540_exotic_wares_super_gift + } + } + desc = pilgrimage.9100.desc_has_gift + } + triggered_desc = { + desc = pilgrimage.9100.desc + } + } + } + theme = pilgrimage_return + override_background = { reference = market } + left_portrait = { + character = root + animation = steward + } + #Sell the wares at a profit + option = { + name = { + trigger = { + OR = { + has_variable = 6540_exotic_wares_gift + has_variable = 6540_exotic_wares_super_gift + } + } + text = pilgrimage.9100.a_has_gift + } + name = { + trigger = { + NOR = { + has_variable = 6540_exotic_wares_gift + has_variable = 6540_exotic_wares_super_gift + } + } + text = pilgrimage.9100.a + } + if = { + limit = { has_character_modifier = pilgrimage_exotic_wares_modifier } + custom_tooltip = pilgrimage.9100.a_double.tt + add_gold = { + value = var:6540_exotic_wares_cost + multiply = 2 + } + } + else_if = { + limit = { has_character_modifier = pilgrimage_super_exotic_wares_modifier } + custom_tooltip = pilgrimage.9100.a_triple.tt + add_gold = { + value = var:6540_exotic_wares_cost + multiply = 3 + } + } + } + #Save them as a powerful personal scheme modifier + option = { + name = pilgrimage.9100.b + trigger = { + NOR = { + has_variable = 6540_exotic_wares_gift + has_variable = 6540_exotic_wares_super_gift + } + } + custom_tooltip = pilgrimage.9100.b.tt + if = { + limit = { has_character_modifier = pilgrimage_exotic_wares_modifier } + set_variable = { + name = 6540_exotic_wares_gift + value = var:6540_exotic_wares_location + } + } + else_if = { + limit = { has_character_modifier = pilgrimage_super_exotic_wares_modifier } + set_variable = { + name = 6540_exotic_wares_super_gift + value = var:6540_exotic_wares_location + } + } + } + after = { + if = { + limit = { has_character_modifier = pilgrimage_exotic_wares_modifier } + remove_character_modifier = pilgrimage_exotic_wares_modifier + } + if = { + limit = { has_character_modifier = pilgrimage_super_exotic_wares_modifier } + remove_character_modifier = pilgrimage_super_exotic_wares_modifier + } + remove_variable = 6540_exotic_wares_location + remove_variable = 6540_exotic_wares_cost + } +} diff --git a/N3OW/events/activities/tour_activity/tour_grounds_events_chad.txt b/N3OW/events/activities/tour_activity/tour_grounds_events_chad.txt new file mode 100644 index 00000000..2e561d2d --- /dev/null +++ b/N3OW/events/activities/tour_activity/tour_grounds_events_chad.txt @@ -0,0 +1,2895 @@ +namespace = tour_grounds_events + +############################ +## Tour Mini-Activity: Tour Grounds +############################ +## Liege Events +## 6000-6999 +## by Chad Uhl +############################ +# tour_grounds_events.6000 - Liege: Orgy with vassal +# tour_grounds_events.6100 - Liege: Visit a Cathedral/Mosque (special building) +# tour_grounds_events.6200 - Liege: Visit some farmlands (buildings) +# tour_grounds_events.6201-4 - Bilateral: Child thief steals your gold in vassal's tradeport (buildings) +# tour_grounds_events.6300 - Liege: Gloryhound Vassal challenges you to a sparring match +##################################################################################### + +###################### +## Liege Events +## 6000-6999 +## by Chad Uhl +###################### + +scripted_trigger has_multiple_consorts_trigger = { + any_consort = { + count > 2 + is_available_ai_adult = yes + } +} + +scripted_effect tour_grounds_events_6000_sex_effect = { + if = { + limit = { sex_opposite_of = scope:stop_host_scope } + # Set up the error blocker for cheating sex, because the vassal couple might be monogamous but are consenting to the experiment here. + save_scope_as = ignore_cheating_error_check + had_sex_with_effect = { + CHARACTER = scope:stop_host_scope + PREGNANCY_CHANCE = seduce_pregnancy_chance + } + } + if = { + limit = { sex_opposite_of = scope:orgy_consort_1 } + # Set up the error blocker for cheating sex, because the vassal couple might be monogamous but are consenting to the experiment here. + ## Aaaand we set it up again because it gets cleaned up in the effect. + save_scope_as = ignore_cheating_error_check + had_sex_with_effect = { + CHARACTER = scope:orgy_consort_1 + PREGNANCY_CHANCE = seduce_pregnancy_chance + } + } + if = { + limit = { + exists = scope:orgy_consort_2 + } + if = { + limit = { sex_opposite_of = scope:orgy_consort_2 } + # Set up the error blocker for cheating sex, because the vassal couple might be monogamous but are consenting to the experiment here. + ## Aaaand we set it up again because it gets cleaned up in the effect x2. + save_scope_as = ignore_cheating_error_check + had_sex_with_effect = { + CHARACTER = scope:orgy_consort_2 + PREGNANCY_CHANCE = seduce_pregnancy_chance + } + } + } + if = { + limit = { + exists = scope:orgy_consort_3 + } + if = { + limit = { sex_opposite_of = scope:orgy_consort_3 } + # Set up the error blocker for cheating sex, because the vassal couple might be monogamous but are consenting to the experiment here. + ## Aaaand we set it up again because it gets cleaned up in the effect x2. + save_scope_as = ignore_cheating_error_check + had_sex_with_effect = { + CHARACTER = scope:orgy_consort_3 + PREGNANCY_CHANCE = seduce_pregnancy_chance + } + } + } + + # Progress towards lover + if = { + limit = { + is_attracted_to_gender_of = scope:stop_host_scope + scope:stop_host_scope = { is_attracted_to_gender_of = root } + } + progress_towards_lover_effect = { + CHARACTER = scope:stop_host_scope + REASON = lover_tour_grounds_orgy + OPINION = default_lover_opinion + } + } + if = { + limit = { + is_attracted_to_gender_of = scope:orgy_consort_1 + scope:orgy_consort_1 = { is_attracted_to_gender_of = root } + } + progress_towards_lover_effect = { + CHARACTER = scope:orgy_consort_1 + REASON = lover_tour_grounds_orgy + OPINION = default_lover_opinion + } + } + if = { + limit = { + exists = scope:orgy_consort_2 + is_attracted_to_gender_of = scope:orgy_consort_2 + scope:orgy_consort_2 = { is_attracted_to_gender_of = root } + } + progress_towards_lover_effect = { + CHARACTER = scope:orgy_consort_2 + REASON = lover_tour_grounds_orgy + OPINION = default_lover_opinion + } + } + if = { + limit = { + exists = scope:orgy_consort_3 + is_attracted_to_gender_of = scope:orgy_consort_3 + scope:orgy_consort_3 = { is_attracted_to_gender_of = root } + } + progress_towards_lover_effect = { + CHARACTER = scope:orgy_consort_3 + REASON = lover_tour_grounds_orgy + OPINION = default_lover_opinion + } + } +} + +# You happen upon your vassal and their partner(s) getting steamy and they invite you to join +tour_grounds_events.6000 = { + type = activity_event + title = tour_grounds_events.6000.t + desc = { + desc = tour_grounds_events.6000.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:orgy_consort_2 + exists = scope:orgy_consort_3 + } + desc = tour_grounds_events.6000.desc.three_consorts + } + desc = tour_grounds_events.6000.desc.one_consort + } + desc = tour_grounds_events.6000.desc.outro + } + theme = tour_grounds + + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = stunned + } + center_portrait = { + character = scope:stop_host_scope + animation = wedding_groom_right + } + right_portrait = { + character = scope:orgy_consort_1 + animation = happiness + camera = camera_event_very_right + } + lower_center_portrait = { + trigger = { exists = scope:orgy_consort_3 } + character = scope:orgy_consort_3 + } + lower_right_portrait = { + trigger = { exists = scope:orgy_consort_2 } + character = scope:orgy_consort_2 + } + + trigger = { + is_adult = yes + exists = scope:stop_host_scope + scope:stop_host_scope = { + is_ai = yes + is_adult = yes + # Vassal or their primary consort is attracted to liege + OR = { + is_attracted_to_gender_of = root + any_consort = { + is_attracted_to_gender_of = root + } + } + # Vassal has a partner/concubine(s) + any_consort = { + is_available_ai_adult = yes + } + } + # No close family members allowed in sexy time, unless you're already incestuous + trigger_if = { + limit = { + NOT = { is_incestuous_trigger = yes } + trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = root } + } + NOT = { is_close_or_extended_family_of = scope:stop_host_scope } + } + NOT = { has_sexuality = asexual } + } + + cooldown = { years = 5 } + + weight_multiplier = { + base = 1 + # weight up if either are deviants + modifier = { + add = 1 + is_deviant_trigger = yes + } + modifier = { + add = 1 + exists = scope:stop_host_scope + scope:stop_host_scope = { + is_deviant_trigger = yes + } + } + # weight up for the vassal having multiple consorts + modifier = { + add = 1 + exists = scope:stop_host_scope + scope:stop_host_scope = { + has_multiple_consorts_trigger = yes + } + } + } + + immediate = { + scope:stop_host_scope = { + # if stop host has 3 consorts, we save them all. otherwise, just the one + random_consort = { + save_scope_as = orgy_consort_1 + add_character_flag = is_naked + } + if = { + limit = { has_multiple_consorts_trigger = yes } + random_consort = { + limit = { + this != scope:orgy_consort_1 + } + save_scope_as = orgy_consort_2 + add_character_flag = is_naked + } + random_consort = { + limit = { + NOR = { + this = scope:orgy_consort_1 + this = scope:orgy_consort_2 + } + } + save_scope_as = orgy_consort_3 + add_character_flag = is_naked + } + } + add_character_flag = is_naked + } + } + + option = { # Join in on the sexy time + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_deviant_trigger = yes } + desc = tour_grounds_events.6000.b + } + desc = tour_grounds_events.6000.a + } + } + } + trigger = { might_cheat_on_every_partner_trigger = yes } + scope:activity = { + add_activity_log_entry = { + key = tourgy_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + tour_grounds_events_6000_sex_effect = yes + } + } + } + + stress_impact = { + shy = medium_stress_impact_gain + temperate = medium_stress_impact_gain + chaste = major_stress_impact_gain + gregarious = minor_stress_impact_loss + lustful = major_stress_impact_loss + deviant = medium_stress_impact_loss + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_boldness = 1 + ai_sociability = 1 + ai_energy = 0.5 + } + modifier = { + add = 50 + OR = { + has_trait = lustful + has_trait = deviant + } + } + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = temperate + has_trait = shy + } + } + } + } + + option = { # Refuse sexy time + name = tour_grounds_events.6000.c + + stress_impact = { + deviant = major_stress_impact_gain + lustful = major_stress_impact_gain + chaste = minor_stress_impact_loss + } + + ai_chance = { + base = 33 + modifier = { + add = 30 + has_trait = chaste + } + } + } + after = { + scope:stop_host_scope = { + remove_character_flag = is_naked + } + scope:orgy_consort_1 = { + remove_character_flag = is_naked + } + scope:orgy_consort_2 ?= { + remove_character_flag = is_naked + } + scope:orgy_consort_3 ?= { + remove_character_flag = is_naked + } + } +} + +scripted_trigger tg_6100_appropriate_loved_one_memory_trigger = { + OR = { + has_memory_type = relative_died + has_memory_type = spouse_died + has_memory_type = friend_died + has_memory_type = soulmate_died + } + any_memory_participant = { + NOR = { + has_relation_rival = root + has_relation_nemesis = root + } + trigger_if = { + limit = { + is_alive = no + exists = killer + } + killer != root + } + } +} + +scripted_trigger tg_6100_not_religious_trigger = { + OR = { + has_trait = cynical + any_secret = { + type = secret_non_believer + } + } +} + +scripted_trigger tg_6100_location_has_cathedral_trigger = { + OR = { + has_building_or_higher = holy_site_cathedral_01 + has_building_or_higher = holy_site_cologne_cathedral_01 + has_building_or_higher = holy_site_canterbury_cathedral_01 + has_building_or_higher = temple_of_uppsala_01 + has_building_or_higher = lund_cathedral_01 + has_building_or_higher = notre_dame_01 + has_building_or_higher = cluny_abbey_01 + has_building_or_higher = beta_giyorgis_01 + has_building_or_higher = holy_wisdom_01 + has_building_or_higher = duomo_florence_01 + has_building_or_higher = wawel_cathedral_01 + } +} + +scripted_trigger tg_6100_location_has_mosque_trigger = { + OR = { + has_building_or_higher = holy_site_imam_ali_mosque_01 + has_building_or_higher = holy_site_great_mosque_of_mecca_01 + has_building_or_higher = holy_site_great_mosque_of_cordoba_01 + has_building_or_higher = holy_site_great_mosque_of_djenne_01 + has_building_or_higher = holy_site_great_mosque_of_samarra_01 + has_building_or_higher = holy_site_prophetic_mosque_01 + has_building_or_higher = damascus_mosque_01 + } +} + +# Christian Cathedral / Mosque +tour_grounds_events.6100 = { + type = activity_event + title = tour_grounds_events.6100.t + desc = { + desc = tour_grounds_events.6100.desc.intro + first_valid = { + triggered_desc = { + trigger = { + tg_6100_not_religious_trigger = yes + } + desc = tour_grounds_events.6100.desc.cynical + } + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = tour_grounds_events.6100.desc.zealous + } + desc = tour_grounds_events.6100.desc + } + } + + theme = tour_grounds + override_background = { reference = temple } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + tg_6100_not_religious_trigger = yes + } + animation = eyeroll + } + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = personality_zealous + } + animation = admiration + } + right_portrait = { + character = scope:stop_host_scope + animation = personality_honorable + } + + trigger = { + # check for a christian cathedral special building + location = { + has_special_building = yes + OR = { + tg_6100_location_has_cathedral_trigger = yes + tg_6100_location_has_mosque_trigger = yes + } + } + # check that the host has the right religion + scope:stop_host_scope = { + trigger_if = { + limit = { + location = { tg_6100_location_has_cathedral_trigger = yes } + } + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + trigger_if = { + limit = { + location = { tg_6100_location_has_mosque_trigger = yes } + } + religion = religion:islam_religion + } + } + } + + cooldown = { years = 5 } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + scope:stop_host_scope = { + has_trait = zealous + } + } + modifier = { + add = 2 + any_memory = { + tg_6100_appropriate_loved_one_memory_trigger = yes + } + } + } + + immediate = { + # save scopes for loc + save_scope_as = root_scope + location = { save_scope_as = tour_grounds_event_location } + + # if root has a memory of a loved one dying, we pull that out to use in an option + if = { + limit = { + any_memory = { + tg_6100_appropriate_loved_one_memory_trigger = yes + } + } + random_memory = { + limit = { tg_6100_appropriate_loved_one_memory_trigger = yes } + save_scope_as = tour_grounds_6100_beloved_memory + random_memory_participant = { + save_scope_as = tour_grounds_6100_beloved_char + } + } + } + } + + option = { # light a candle in memory of a dead loved one + name = tour_grounds_events.6100.a + + trigger = { + location = { tg_6100_location_has_cathedral_trigger = yes } + exists = scope:tour_grounds_6100_beloved_memory + } + + flavor = tour_grounds_events.6100.a.tt + every_vassal_or_below = { + custom = zealot_approves_of_religious_display + vassal_stance = zealot + add_opinion = { + target = prev + modifier = zealot_approves_of_religious_display_opinion + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + add_piety = miniscule_piety_gain + + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_boldness = 0.5 + ai_zeal = 1 + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # pray for a dead loved one + name = tour_grounds_events.6100.b + + trigger = { + location = { tg_6100_location_has_mosque_trigger = yes } + exists = scope:tour_grounds_6100_beloved_memory + } + + flavor = tour_grounds_events.6100.b.tt + every_vassal_or_below = { + custom = zealot_approves_of_religious_display + vassal_stance = zealot + add_opinion = { + target = prev + modifier = zealot_approves_of_religious_display_opinion + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + add_piety = miniscule_piety_gain + + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_boldness = 0.5 + ai_zeal = 1 + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # get a discount on building church holdings + name = tour_grounds_events.6100.c + + add_character_modifier = { + modifier = discounted_church_holding_build_cost_modifier + years = 10 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_rationality = 0.75 + ai_zeal = 0.5 + ai_sociability = 0.5 + } + modifier = { + factor = 0 + has_trait = cynical + } + } + + stress_impact = { + cynical = major_stress_impact_gain + } + } + + option = { # ignore everything and there's a chance they find out your secret + name = tour_grounds_events.6100.d + + trigger = { + tg_6100_not_religious_trigger = yes + } + + duel = { + skills = { intrigue learning } + target = scope:stop_host_scope + 50 = { + desc = tour_grounds_events.6100.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + if = { + limit = { + any_secret = { + type = secret_non_believer + } + } + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6100.d.success + add_character_modifier = { + modifier = played_it_cool_modifier + years = 10 + } + } + } + else = { + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6100.d.success + every_vassal = { + custom = zealot_approves_of_religious_display + vassal_stance = zealot + add_opinion = { + target = prev + modifier = zealot_approves_of_religious_display_opinion + } + } + } + } + } + 50 = { + desc = tour_grounds_events.6100.d.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + if = { + limit = { + any_secret = { + type = secret_non_believer + } + } + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6100.d.failure + random_secret = { + type = secret_non_believer + reveal_to = scope:stop_host_scope + } + } + } + else = { + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6100.d.failure + every_vassal = { + custom = zealot_disapproves_of_cynicism + vassal_stance = zealot + add_opinion = { + target = prev + modifier = zealot_disapproves_of_cynicism_opinion + } + } + } + } + } + } + + stress_impact = { + zealous = medium_stress_impact_gain + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + ai_value_modifier = { + ai_rationality = 0.5 + ai_zeal = 0.1 + } + } + } +} + +# Pastures +# Orchards +# Cereal Fields +# Vassal let's it slip that they've had a bountiful harvest + +# Checks that you, the liege, have the same building as the one you're seeing in your vassal's province +scripted_trigger tg_6200_does_root_have_matching_building_trigger = { + OR = { + AND = { + root.var:building_focus = flag:pastures + capital_province = { has_building_or_higher = pastures_01 } + } + AND = { + root.var:building_focus = flag:orchard + capital_province = { has_building_or_higher = orchards_01 } + } + AND = { + root.var:building_focus = flag:cereal_fields + capital_province = { has_building_or_higher = cereal_fields_01 } + } + AND = { + root.var:building_focus = flag:hill_farms + capital_province = { has_building_or_higher = hill_farms_01 } + } + AND = { + root.var:building_focus = flag:plantations + capital_province = { has_building_or_higher = plantations_01 } + } + } +} + +# If there are multiple valid buildings for the event, pick one to focus on +scripted_effect tg_6200_pick_building_focus_effect = { + random_list = { + 1 = { + trigger = { + location.county = { + any_county_province = { has_building_or_higher = pastures_01 } + } + } + set_variable = { + name = building_focus + value = flag:pastures + } + } + 1 = { + trigger = { + location.county = { + any_county_province = { has_building_or_higher = orchards_01 } + } + } + set_variable = { + name = building_focus + value = flag:orchard + } + } + 1 = { + trigger = { + location.county = { + any_county_province = { has_building_or_higher = cereal_fields_01 } + } + } + set_variable = { + name = building_focus + value = flag:cereal_fields + } + } + 1 = { + trigger = { + location.county = { + any_county_province = { has_building_or_higher = hill_farms_01 } + } + } + set_variable = { + name = building_focus + value = flag:hill_farms + } + } + 1 = { + trigger = { + location.county = { + any_county_province = { has_building_or_higher = plantations_01 } + } + } + set_variable = { + name = building_focus + value = flag:plantations + } + } + } +} + +# Determine the difference in building level between the liege and vassal respectively +scripted_effect tg_6200_determine_building_level_diff_effect = { + if = { + limit = { root.var:building_focus = flag:pastures } + # check vassal building level + root.location = { + switch = { + trigger = has_building + pastures_01 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 1 + } + } + } + pastures_02 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 2 + } + } + } + pastures_03 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 3 + } + } + } + pastures_04 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 4 + } + } + } + pastures_05 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 5 + } + } + } + pastures_06 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 6 + } + } + } + pastures_07 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 7 + } + } + } + pastures_08 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 8 + } + } + } + } + } + # check root building level + root.capital_province = { + switch = { + trigger = has_building + pastures_01 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 1 + } + } + } + pastures_02 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 2 + } + } + } + pastures_03 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 3 + } + } + } + pastures_04 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 4 + } + } + } + pastures_05 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 5 + } + } + } + pastures_06 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 6 + } + } + } + pastures_07 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 7 + } + } + } + pastures_08 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 8 + } + } + } + } + } + } + else_if = { + limit = { root.var:building_focus = flag:orchard } + # check vassal building level + root.location = { + switch = { + trigger = has_building + orchards_01 = { + root = { + set_variable = { + name = vassal_building_level + value = 1 + } + } + } + orchards_02 = { + root = { + set_variable = { + name = vassal_building_level + value = 2 + } + } + } + orchards_03 = { + root = { + set_variable = { + name = vassal_building_level + value = 3 + } + } + } + orchards_04 = { + root = { + set_variable = { + name = vassal_building_level + value = 4 + } + } + } + orchards_05 = { + root = { + set_variable = { + name = vassal_building_level + value = 5 + } + } + } + orchards_06 = { + root = { + set_variable = { + name = vassal_building_level + value = 6 + } + } + } + orchards_07 = { + root = { + set_variable = { + name = vassal_building_level + value = 7 + } + } + } + orchards_08 = { + root = { + set_variable = { + name = vassal_building_level + value = 8 + } + } + } + } + } + # check root building level + root.capital_province = { + switch = { + trigger = has_building + orchards_01 = { + root = { + set_variable = { + name = root_building_level + value = 1 + } + } + } + orchards_02 = { + root = { + set_variable = { + name = root_building_level + value = 2 + } + } + } + orchards_03 = { + root = { + set_variable = { + name = root_building_level + value = 3 + } + } + } + orchards_04 = { + root = { + set_variable = { + name = root_building_level + value = 4 + } + } + } + orchards_05 = { + root = { + set_variable = { + name = root_building_level + value = 5 + } + } + } + orchards_06 = { + root = { + set_variable = { + name = root_building_level + value = 6 + } + } + } + orchards_07 = { + root = { + set_variable = { + name = root_building_level + value = 7 + } + } + } + orchards_08 = { + root = { + set_variable = { + name = root_building_level + value = 8 + } + } + } + } + } + } + else_if = { + limit = { root.var:building_focus = flag:cereal_fields } + # check vassal building level + root.location = { + switch = { + trigger = has_building + cereal_fields_01 = { + root = { + set_variable = { + name = vassal_building_level + value = 1 + } + } + } + cereal_fields_02 = { + root = { + set_variable = { + name = vassal_building_level + value = 2 + } + } + } + cereal_fields_03 = { + root = { + set_variable = { + name = vassal_building_level + value = 3 + } + } + } + cereal_fields_04 = { + root = { + set_variable = { + name = vassal_building_level + value = 4 + } + } + } + cereal_fields_05 = { + root = { + set_variable = { + name = vassal_building_level + value = 5 + } + } + } + cereal_fields_06 = { + root = { + set_variable = { + name = vassal_building_level + value = 6 + } + } + } + cereal_fields_07 = { + root = { + set_variable = { + name = vassal_building_level + value = 7 + } + } + } + cereal_fields_08 = { + root = { + set_variable = { + name = vassal_building_level + value = 8 + } + } + } + } + } + # check root building level + root.capital_province = { + switch = { + trigger = has_building + cereal_fields_01 = { + root = { + set_variable = { + name = root_building_level + value = 1 + } + } + } + cereal_fields_02 = { + root = { + set_variable = { + name = root_building_level + value = 2 + } + } + } + cereal_fields_03 = { + root = { + set_variable = { + name = root_building_level + value = 3 + } + } + } + cereal_fields_04 = { + root = { + set_variable = { + name = root_building_level + value = 4 + } + } + } + cereal_fields_05 = { + root = { + set_variable = { + name = root_building_level + value = 5 + } + } + } + cereal_fields_06 = { + root = { + set_variable = { + name = root_building_level + value = 6 + } + } + } + cereal_fields_07 = { + root = { + set_variable = { + name = root_building_level + value = 7 + } + } + } + cereal_fields_08 = { + root = { + set_variable = { + name = root_building_level + value = 8 + } + } + } + } + } + } + else_if = { + limit = { root.var:building_focus = flag:hill_farms } + # check vassal building level + root.location = { + switch = { + trigger = has_building + hill_farms_01 = { + root = { + set_variable = { + name = vassal_building_level + value = 1 + } + } + } + hill_farms_02 = { + root = { + set_variable = { + name = vassal_building_level + value = 2 + } + } + } + hill_farms_03 = { + root = { + set_variable = { + name = vassal_building_level + value = 3 + } + } + } + hill_farms_04 = { + root = { + set_variable = { + name = vassal_building_level + value = 4 + } + } + } + hill_farms_05 = { + root = { + set_variable = { + name = vassal_building_level + value = 5 + } + } + } + hill_farms_06 = { + root = { + set_variable = { + name = vassal_building_level + value = 6 + } + } + } + hill_farms_07 = { + root = { + set_variable = { + name = vassal_building_level + value = 7 + } + } + } + hill_farms_08 = { + root = { + set_variable = { + name = vassal_building_level + value = 8 + } + } + } + } + } + # check root building level + root.capital_province = { + switch = { + trigger = has_building + hill_farms_01 = { + root = { + set_variable = { + name = root_building_level + value = 1 + } + } + } + hill_farms_02 = { + root = { + set_variable = { + name = root_building_level + value = 2 + } + } + } + hill_farms_03 = { + root = { + set_variable = { + name = root_building_level + value = 3 + } + } + } + hill_farms_04 = { + root = { + set_variable = { + name = root_building_level + value = 4 + } + } + } + hill_farms_05 = { + root = { + set_variable = { + name = root_building_level + value = 5 + } + } + } + hill_farms_06 = { + root = { + set_variable = { + name = root_building_level + value = 6 + } + } + } + hill_farms_07 = { + root = { + set_variable = { + name = root_building_level + value = 7 + } + } + } + hill_farms_08 = { + root = { + set_variable = { + name = root_building_level + value = 8 + } + } + } + } + } + } + else_if = { + limit = { root.var:building_focus = flag:plantations } + # check vassal building level + root.location = { + switch = { + trigger = has_building + plantations_01 = { + root = { + set_variable = { + name = vassal_building_level + value = 1 + } + } + } + plantations_02 = { + root = { + set_variable = { + name = vassal_building_level + value = 2 + } + } + } + plantations_03 = { + root = { + set_variable = { + name = vassal_building_level + value = 3 + } + } + } + plantations_04 = { + root = { + set_variable = { + name = vassal_building_level + value = 4 + } + } + } + plantations_05 = { + root = { + set_variable = { + name = vassal_building_level + value = 5 + } + } + } + plantations_06 = { + root = { + set_variable = { + name = vassal_building_level + value = 6 + } + } + } + plantations_07 = { + root = { + set_variable = { + name = vassal_building_level + value = 7 + } + } + } + plantations_08 = { + root = { + set_variable = { + name = vassal_building_level + value = 8 + } + } + } + } + } + # check root building level + root.capital_province = { + switch = { + trigger = has_building + plantations_01 = { + root = { + set_variable = { + name = root_building_level + value = 1 + } + } + } + plantations_02 = { + root = { + set_variable = { + name = root_building_level + value = 2 + } + } + } + plantations_03 = { + root = { + set_variable = { + name = root_building_level + value = 3 + } + } + } + plantations_04 = { + root = { + set_variable = { + name = root_building_level + value = 4 + } + } + } + plantations_05 = { + root = { + set_variable = { + name = root_building_level + value = 5 + } + } + } + plantations_06 = { + root = { + set_variable = { + name = root_building_level + value = 6 + } + } + } + plantations_07 = { + root = { + set_variable = { + name = root_building_level + value = 7 + } + } + } + plantations_08 = { + root = { + set_variable = { + name = root_building_level + value = 8 + } + } + } + } + } + } + + set_variable = { + name = building_level_diff + value = root.var:root_building_level + } + change_variable = { + name = building_level_diff + divide = root.var:vassal_building_level + } +} + +tour_grounds_events.6200 = { + type = activity_event + title = tour_grounds_events.6200.t + desc = { + desc = tour_grounds_events.6200.desc + first_valid = { + triggered_desc = { + trigger = { root.var:building_focus = flag:pastures } + desc = tour_grounds_events.6200.desc.pastures + } + triggered_desc = { + trigger = { root.var:building_focus = flag:orchard } + desc = tour_grounds_events.6200.desc.orchard + } + triggered_desc = { + trigger = { root.var:building_focus = flag:cereal_fields } + desc = tour_grounds_events.6200.desc.cereal_fields + } + triggered_desc = { + trigger = { root.var:building_focus = flag:hill_farms } + desc = tour_grounds_events.6200.desc.hill_farms + } + triggered_desc = { + trigger = { root.var:building_focus = flag:plantations } + desc = tour_grounds_events.6200.desc.plantations + } + } + desc = tour_grounds_events.6200.outro + } + + cooldown = { years = 5 } + + theme = tour_grounds + override_background = { reference = farmland } + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:stop_host_scope + animation = personality_honorable + } + + trigger = { + # check for pastures/orchards/cereal fields and that root has a matching building in their capital province + location.county = { + any_county_province = { + OR = { + trigger_if = { + limit = { has_building_or_higher = pastures_01 } + root.capital_province = { has_building_or_higher = pastures_01 } + } + trigger_if = { + limit = { has_building_or_higher = orchards_01 } + root.capital_province = { has_building_or_higher = orchards_01 } + } + trigger_if = { + limit = { has_building_or_higher = cereal_fields_01 } + root.capital_province = { has_building_or_higher = cereal_fields_01 } + } + trigger_if = { + limit = { has_building_or_higher = hill_farms_01 } + root.capital_province = { has_building_or_higher = hill_farms_01 } + } + trigger_if = { + limit = { has_building_or_higher = plantations_01 } + root.capital_province = { has_building_or_higher = plantations_01 } + } + } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + # save scopes for loc + save_scope_as = root_scope + location.county = { + random_county_province = { + limit = { + OR = { + has_building_or_higher = pastures_01 + has_building_or_higher = orchards_01 + has_building_or_higher = cereal_fields_01 + has_building_or_higher = hill_farms_01 + has_building_or_higher = plantations_01 + } + } + save_scope_as = tour_grounds_event_location + } + } + capital_province = { save_scope_as = root_capital_scope } + + # Pick which building we want to focus on + tg_6200_pick_building_focus_effect = yes + + if = { + limit = { + # technically shouldn't be necessary, but prevents errors + exists = root.var:building_focus + # check if root has the right building + tg_6200_does_root_have_matching_building_trigger = yes + } + # determine the difference in their building level + tg_6200_determine_building_level_diff_effect = yes + } + } + + option = { # You're pulling in a lot of grain here, time to up the ole tax + name = tour_grounds_events.6200.a + + custom_tooltip = tour_grounds_events.6200.a.tt + + # You attempt to extort your vassal + scope:stop_host_scope = { + trigger_event = { + id = tour_grounds_events.6201 + days = 5 + } + } + + # decrease opinion with parochial vassals + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = angry_opinion + opinion = -20 + target = root + } + } + + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + stress_impact = { + greedy = minor_stress_impact_loss + diligent = minor_stress_impact_loss + content = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = 0.5 + ai_sociability = 0.5 + } + modifier = { + add = 20 + has_trait = greedy + } + modifier = { + add = -30 + OR = { + has_trait = content + has_trait = generous + } + } + } + } + + option = { # + name = tour_grounds_events.6200.b + + # learn the vassal's secret to success + add_character_modifier = { + modifier = bountiful_harvest_modifier + years = 10 + } + + if = { + # check if root has the right building + limit = { + has_lifestyle = stewardship_lifestyle + } + + add_stewardship_lifestyle_xp = major_lifestyle_xp + } + + stress_impact = { + lazy = minor_stress_impact_gain + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_rationality = 0.8 + ai_sociability = 0.8 + } + modifier = { + add = 20 + has_trait = diligent + } + modifier = { + add = -30 + has_trait = lazy + } + } + } + + option = { # Be nice and don't do anything + name = tour_grounds_events.6200.c + + reverse_add_opinion = { + target = scope:stop_host_scope + modifier = pleased_opinion + opinion = 20 + } + + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + stress_impact = { + generous = minor_stress_impact_loss + humble = minor_stress_impact_loss + calm = miniscule_stress_impact_loss + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = -0.5 + ai_sociability = 0.8 + } + } + } + + after = { + if = { + limit = { exists = root.var:building_focus } + remove_variable = building_focus + } + if = { + limit = { exists = root.var:vassal_building_level } + remove_variable = vassal_building_level + } + if = { + limit = { exists = root.var:root_building_level } + remove_variable = root_building_level + } + if = { + limit = { exists = root.var:building_level_diff } + remove_variable = root_building_level + } + } +} + +# follow-up event for vassal +tour_grounds_events.6201 = { + type = character_event + title = tour_grounds_events.6201.t + desc = tour_grounds_events.6201.desc + + theme = tour_grounds + + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:visiting_liege + animation = personality_rational + } + + option = { # accept a tax obligation increase + name = tour_grounds_events.6201.a + trigger = { vassal_contract_obligation_level_can_be_increased = feudal_government_taxes } + # Increase vassal's tax obligation + scope:visiting_liege = { + send_interface_toast = { + title = tour_grounds_events.6201.a.tt + left_icon = scope:visiting_liege + right_icon = scope:stop_host_scope + scope:stop_host_scope = { + vassal_contract_increase_obligation_level = feudal_government_taxes + progress_towards_friend_effect = { + REASON = friend_accepted_tax_increase + CHARACTER = scope:visiting_liege + OPINION = default_friend_opinion + } + } + } + } + + ai_chance = { + base = 0 + } + } + + option = { # give your liege the extra profits + name = tour_grounds_events.6201.b + scope:visiting_liege = { + send_interface_toast = { + title = tour_grounds_events.6201.b.tt + left_icon = scope:visiting_liege + right_icon = scope:stop_host_scope + scope:stop_host_scope = { + pay_short_term_gold = { + target = scope:visiting_liege + gold = medium_gold_value + } + progress_towards_friend_effect = { + REASON = friend_split_profits + CHARACTER = scope:visiting_liege + OPINION = default_friend_opinion + } + } + } + } + + ai_chance = { + base = 0 + } + } + + option = { # deny your liege's demand + name = tour_grounds_events.6201.c + add_treasury_or_gold = medium_treasury_or_gold_value + # give imprisonment reason + scope:visiting_liege = { + send_interface_toast = { + title = tour_grounds_events.6201.c.tt + left_icon = scope:visiting_liege + right_icon = scope:stop_host_scope + add_opinion = { + target = scope:stop_host_scope + modifier = embezzled_opinion + } + } + } + ai_chance = { + base = 100 + } + } +} + +# Tradeport +# Liege: Gold is stolen at Vassal's tradeport +tour_grounds_events.6202 = { + type = activity_event + title = tour_grounds_events.6202.t + desc = tour_grounds_events.6202.desc + + theme = tour_grounds + override_background = { reference = docks } + + left_portrait = { + character = scope:stop_host_scope + animation = shock + } + right_portrait = { + character = scope:tiny_thief + animation = schadenfreude + } + + cooldown = { years = 5 } + + trigger = { + location.county = { + any_county_province = { + has_building_or_higher = common_tradeport_01 + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + save_scope_as = root_scope + location.county = { + random_county_province = { + limit = { has_building_or_higher = common_tradeport_01 } + save_scope_as = event_location + } + } + + # create our tiny little thief to do the thieving + create_character = { + template = child_thief_character + culture = scope:stop_host_scope.culture + faith = scope:stop_host_scope.faith + location = root.location + save_scope_as = tiny_thief + } + + # tiny_thief takes your gold! + remove_short_term_gold = medium_gold_value + + set_variable = { + name = gold_lost + value = medium_gold_value + } + } + + option = { # Fix this, you dumb vassal! + name = tour_grounds_events.6202.a + + custom_tooltip = tour_grounds_events.6202.a.tt + random_list = { + 1 = { + show_chance = no + desc = tour_grounds_events.6202.a.success + custom_tooltip = tour_grounds_events.6202.b.success + } + 1 = { + show_chance = no + desc = tour_grounds_events.6202.a.failure + custom_tooltip = tour_grounds_events.6202.b.failure + } + } + + scope:stop_host_scope = { + trigger_event = { + id = tour_grounds_events.6203 + days = { 1 5 } + } + } + + stress_impact = { + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = 1 + ai_sociability = 0.5 + ai_energy = 0.1 + ai_vengefulness = 0.5 + } + } + } + + option = { # Chase after the tiny_thief yourself + name = tour_grounds_events.6202.b + + duel = { + skills = { prowess intrigue } + target = scope:tiny_thief + 40 = { # You succeed in catching the tiny thief + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = tour_grounds_events.6202.b.success + show_as_tooltip = { + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + add_character_flag = caught_tiny_thief + trigger_event = { + id = tour_grounds_events.6204 + days = { 1 5 } + } + } + 60 = { # You fail to catch them and they are lost forever + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + custom_tooltip = tour_grounds_events.6202.b.failure + send_interface_toast = { + left_icon = root + right_icon = scope:tiny_thief + title = tour_grounds_events.6202.b.failure + } + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = 1 + ai_sociability = 0.5 + ai_energy = 1 + ai_vengefulness = 0.5 + } + } + } + + option = { # Let tiny_thief go + name = tour_grounds_events.6202.c + add_piety = major_piety_gain + every_vassal_or_below = { + vassal_stance = parochial + custom = every_parochial_vassal + add_opinion = { + modifier = disapproving_opinion + target = root + opinion = -10 + } + } + + if = { + limit = { exists = root.var:gold_lost } + remove_variable = gold_lost + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + stress_impact = { + greedy = medium_stress_impact_gain + forgiving = medium_stress_impact_loss + calm = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + ai_vengefulness = -0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = vengeful + has_trait = wrathful + } + } + modifier = { + add = 10 + has_trait = humble + } + } + } +} + +# Vassal: decide what to do about the tiny_thief +tour_grounds_events.6203 = { + type = character_event + title = tour_grounds_events.6203.t + desc = tour_grounds_events.6203.desc + + theme = tour_grounds + override_background = { reference = docks } + + left_portrait = { + character = scope:visiting_liege + animation = anger + } + right_portrait = { + character = scope:tiny_thief + animation = laugh + } + + option = { # Pay your liege their lost gold + name = tour_grounds_events.6203.a + scope:visiting_liege = { + send_interface_toast = { + left_icon = scope:stop_host_scope + right_icon = scope:tiny_thief + title = tour_grounds_events.6203.toast + scope:stop_host_scope = { + pay_short_term_gold = { + target = scope:visiting_liege + gold = scope:visiting_liege.var:gold_lost + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + disloyal = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + ai_energy = -1 + ai_vengefulness = 0.5 + } + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Chase after the tiny_thief yourself + name = tour_grounds_events.6203.b + + duel = { + skills = { prowess intrigue } + target = scope:tiny_thief + 40 = { + desc = tour_grounds_events.6202.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = tour_grounds_events.6202.b.success + left_icon = root + right_icon = scope:tiny_thief + } + scope:visiting_liege = { + trigger_event = { + id = tour_grounds_events.6204 + days = { 1 5 } + } + } + } + 60 = { + desc = tour_grounds_events.6202.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = tour_grounds_events.6202.b.failure + left_icon = root + right_icon = scope:tiny_thief + } + scope:visiting_liege = { + trigger_event = { + id = tour_grounds_events.6205 + days = { 1 5 } + } + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + } + } + } + + option = { # ain't my problem + name = tour_grounds_events.6203.c + + reverse_add_opinion = { + target = scope:visiting_liege + modifier = disappointed_opinion + opinion = -30 + } + + scope:visiting_liege = { + trigger_event = { + id = tour_grounds_events.6205 + days = { 1 5 } + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { + factor = 0 + has_trait = ambitious + } + } + } +} + +# Liege: tiny_thief is caught (either by vassal or liege themself) +tour_grounds_events.6204 = { + type = activity_event + title = tour_grounds_events.6204.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_character_flag = caught_tiny_thief } + desc = tour_grounds_events.6204.desc.caught_by_liege + } + desc = tour_grounds_events.6204.desc.caught_by_vassal + } + } + + theme = tour_grounds + override_background = { reference = docks } + + left_portrait = { + character = scope:stop_host_scope + animation = happiness + } + right_portrait = { + character = scope:tiny_thief + animation = sadness + } + + immediate = { + involved_activity = { save_scope_as = current_activity } + } + + option = { # Take the gold + name = tour_grounds_events.6204.a + add_gold = root.var:gold_lost + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { # Take the tiny_thief under your wing + name = tour_grounds_events.6204.b + + add_courtier = scope:tiny_thief + scope:tiny_thief = { + add_to_activity_without_travel = scope:current_activity + } + current_travel_plan = { + add_companion = scope:tiny_thief + } + + if = { + limit = { num_of_relation_ward < 2 } + set_relation_ward = { + target = scope:tiny_thief + reason = ward_tiny_thief + } + scope:tiny_thief = { + set_default_education = yes + } + } + + every_vassal_or_below = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + modifier = disapproving_opinion + target = root + opinion = -10 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 0.75 + ai_energy = 0.75 + } + } + } + + after = { + if = { + limit = { exists = root.var:gold_lost } + remove_variable = gold_lost + } + if = { + limit = { has_character_flag = caught_tiny_thief } + remove_character_flag = caught_tiny_thief + } + } +} + +# Liege responds to vassal failing to catch the tiny_thief +tour_grounds_events.6205 = { + type = activity_event + title = tour_grounds_events.6205.t + desc = tour_grounds_events.6205.desc + + theme = tour_grounds + override_background = { reference = docks } + + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:stop_host_scope + animation = sadness + } + lower_center_portrait = { + character = scope:tiny_thief + } + + option = { # Demand the gold + name = tour_grounds_events.6205.a + + duel = { + skills = { diplomacy } + target = scope:stop_host_scope + 60 = { + desc = tour_grounds_events.6205.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6205.a.success + show_as_tooltip = { + scope:stop_host_scope = { + pay_short_term_gold = { + target = scope:visiting_liege + gold = scope:visiting_liege.var:gold_lost + } + } + } + } + hidden_effect = { + scope:stop_host_scope = { + send_interface_toast = { + left_icon = scope:stop_host_scope + right_icon = scope:visiting_liege + title = tour_grounds_events.6205.a.success + pay_short_term_gold = { + target = scope:visiting_liege + gold = scope:visiting_liege.var:gold_lost + } + } + } + } + } + 40 = { + desc = tour_grounds_events.6205.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + left_icon = root + right_icon = scope:tiny_thief + title = tour_grounds_events.6205.a.failure + add_prestige = minor_prestige_loss + } + } + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + ai_energy = -1 + ai_vengefulness = 0.5 + } + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Have the vassal whipped + name = tour_grounds_events.6205.b + trigger = { + OR = { + has_trait = sadistic + has_trait = wrathful + dread >= 50 + } + } + + flavor = tour_grounds_events.6205.b.flavor + scope:stop_host_scope = { + increase_wounds_no_death_effect = { REASON = beaten } + } + add_dread = minor_dread_gain + reverse_add_opinion = { + target = scope:stop_host_scope + modifier = whipped_me_opinion + } + + stress_impact = { + sadistic = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_sociability = -0.5 + ai_energy = 0.5 + ai_vengefulness = 1 + } + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + add = 30 + OR = { + has_trait = wrathful + has_trait = sadistic + } + } + } + } + + option = { # Forgive the vassal + name = tour_grounds_events.6205.c + + reverse_add_opinion = { + modifier = forgiven_opinion + years = 10 + target = scope:stop_host_scope + } + + stress_impact = { + base = minor_stress_impact_gain + forgiving = medium_stress_impact_loss + greedy = major_stress_impact_gain + vengeful = medium_stress_impact_gain + calm = minor_stress_impact_loss + sadistic = medium_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + ai_energy = -1 + ai_vengefulness = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = wrathful + has_trait = sadistic + } + } + modifier = { + add = 30 + has_trait = forgiving + } + } + } + + after = { + if = { + limit = { exists = root.var:gold_lost } + remove_variable = gold_lost + } + } +} + +# Liege: Vassal challenges you to an educational sparring match +tour_grounds_events.6300 = { + type = activity_event + title = tour_grounds_events.6300.t + desc = tour_grounds_events.6300.desc + + theme = tour_grounds + override_background = { reference = army_camp } + + left_portrait = { + character = scope:stop_host_scope + animation = personality_bold + } + right_portrait = { + character = scope:target_knight + animation = celebrate_sword + } + lower_center_portrait = { + trigger = { exists = scope:tg_6300_stand_in } + character = scope:tg_6300_stand_in + } + + cooldown = { years = 10 } + + trigger = { + scope:stop_host_scope = { + trigger_if = { + limit = { is_ai = yes } + has_vassal_stance = glory_hound + } + any_knight = { + is_available_ai_adult = yes + location = root.location + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + current_travel_plan = { + any_entourage_character = { + is_knight = yes + } + } + } + } + + immediate = { + save_scope_as = root_scope + location = { save_scope_as = event_location } + # if possible, find a knight in the entourage + if = { + limit = { + current_travel_plan = { + any_entourage_character = { + is_knight = yes + } + } + } + current_travel_plan = { + random_entourage_character = { + limit = { is_knight = yes } + save_scope_as = tg_6300_stand_in + } + } + } + + scope:stop_host_scope = { + random_knight = { + limit = { location = root.location } + save_scope_as = target_knight + } + } + scope:target_knight = { + add_character_flag = wear_armor + } + scope:tg_6300_stand_in ?= { + add_character_flag = wear_armor + } + } + + option = { # Accept the invitation to spar + name = tour_grounds_events.6300.a + flavor = tour_grounds_events.6300.flavor + + duel = { + skills = { prowess martial } + target = scope:target_knight + 50 = { + desc = tour_grounds_events.6300.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + left_icon = root + right_icon = scope:target_knight + title = tour_grounds_events.6300.a.success + # opinion bonus with glory hound vassals + every_vassal_or_below = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = respect_opinion + target = root + opinion = 20 + } + } + if = { + limit = { + scope:activity = { + OR = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 50 = { + desc = tour_grounds_events.6300.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6300.a.failure + # opinion malus with glory hound vassals + every_vassal_or_below = { + vassal_stance = glory_hound + limit = { + is_ai = yes + } + custom = every_glory_hound_vassal + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -20 + } + } + } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + modifier = { + add = 30 + has_trait = brave + } + modifier = { + add = -30 + has_trait = craven + } + } + } + + option = { # Suggest that your knight give a demonstration + name = tour_grounds_events.6300.b + + trigger = { exists = scope:tg_6300_stand_in } + + scope:tg_6300_stand_in = { + duel = { + skills = { prowess martial } + target = scope:target_knight + 50 = { + desc = tour_grounds_events.6300.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6300.b.success + # county modifier for winning + location.county = { + add_county_modifier = { + modifier = prowess_demonstration_modifier + years = 30 + } + } + } + } + } + 50 = { + desc = tour_grounds_events.6300.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6300.b.failure + add_prestige = minor_prestige_loss + } + } + } + } + } + + stress_impact = { + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.1 + } + modifier = { + add = -30 + has_trait = brave + } + modifier = { + add = 30 + has_trait = craven + } + } + } + + option = { # Decline + name = tour_grounds_events.6300.c + every_vassal_or_below = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.4 + ai_sociability = -0.3 + } + modifier = { + add = -20 + has_trait = brave + } + modifier = { + add = 20 + has_trait = craven + } + } + } + after = { + scope:target_knight = { + remove_character_flag = wear_armor + } + scope:tg_6300_stand_in ?= { + remove_character_flag = wear_armor + } + } +} + diff --git a/N3OW/events/activities/tour_activity/tour_phase_cultural_festival.txt b/N3OW/events/activities/tour_activity/tour_phase_cultural_festival.txt new file mode 100644 index 00000000..00c4e90a --- /dev/null +++ b/N3OW/events/activities/tour_activity/tour_phase_cultural_festival.txt @@ -0,0 +1,10202 @@ +# Events for the cultural festival portion of the Tour grand activity + +namespace = cultural_festival + +############################ +## Tour Mini-Activity: Cultural Festival +############################ +## Vassal Events +## 1000-1999 +## by Veronica Pazos +############################ +# +############################ +## Liege Events +## 2000-2999 +## by Veronica Pazos +############################ +# cultural_festival.2000 - Cultural Festival Arrival Event (big variation) +# cultural_festival.2001-2002 - Performer messes up in front of you +# cultural_festival.2010 - King/Queen of Love and Beauty / Grim and Grievance +# cultural_festival.2020 - You enjoy a cultural demonstration based on the time of the year/culture +# cultural_festival.2030 - You tax people that go into the cultural festival +# cultural_festival.2040 - You are horrified by the culture in the cultural festival +# cultural_festival.2050 - Local dance is too scandalous - or not +# cultural_festival.2060 - You bring sophisticated entertainments from the capital to a low-dev county +# cultural_festival.2070 - You encounter a band of mercenaries enjoying the festivities, recruit? +# cultural_festival.2080 - Weird guy offers you a mysterious bag of liquids +# cultural_festival.2090 - Imprison performers on made up accussations +# cultural_festival.2100 - A guild is contributing to the festival +# cultural_festival.2110 - A dog breaks into a performance - Adopt? +# +# +############################ +## Bilateral Events +## 3000-3999 +## by Veronica Pazos +############################ +# cultural_festival.3000-3002 - Big play based on liege +# cultural_festival.3010-3011 - Alcohol/Juice fountain +# cultural_festival.3020-3022 - Host a lavish ceremony to make your vassal formally repledge homage to you +# cultural_festival.3030-3031 - Crown the best pig/cow/local_farm_animal +# cultural_festival.3040-3042 - Sword in the stone +# cultural_festival.3050-3051 - You struggle to stay awake during a boring performance +# cultural_festival.3060-3061 - Take your spouse/vassal's spouse for a dance +# cultural_festival.3070-3071 - Hold a feast of fools-esque ceremony +# +# +############################ +## 4000-4999 +## by Arkadiusz Majewski +############################ +# cultural_festival.4000 - As Liege you end up in a conversation in a language you don't know +# cultural_festival.4100 - Your courtier makes a cultural faux pas +# cultural_festival.4200-4203 - Vassal does a parade, liege attends +# cultural_festival.4300-4312 - Vassal initiates gift exchange custom, both can follow up on the gifts years later + +##################################################################################### + +###################### +## Liege Events +## 2000-2999 +## by Veronica Pazos +###################### + +###################### +## Liege: Arrival event +## 2000 +## by Veronica Pazos +###################### + +cultural_festival.2000 = { + type = activity_event + title = cultural_festival.2000.t + desc = { + desc = cultural_festival.2000.desc.intro + random_valid = { + triggered_desc = { + trigger = { + NOT = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } + has_relation_lover = scope:stop_host_scope + } + desc = cultural_festival.2000.desc.first_time_lovers + } + triggered_desc = { + trigger = { + NOT = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } + has_relation_rival = scope:stop_host_scope + } + desc = cultural_festival.2000.desc.first_time_rivals + } + triggered_desc = { + trigger = { + NOT = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } + opinion = { + target = scope:stop_host_scope + value >= -10 + } + opinion = { + target = scope:stop_host_scope + value <= 15 + } + } + desc = cultural_festival.2000.desc.first_time_neutral + } + triggered_desc = { + trigger = { + NOT = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } + OR = { + opinion = { + target = scope:stop_host_scope + value > 15 + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:stop_host_scope } + } + } + desc = cultural_festival.2000.desc.first_time_good + } + triggered_desc = { + trigger = { + NOT = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } + opinion = { + target = scope:stop_host_scope + value < -10 + } + } + desc = cultural_festival.2000.desc.first_time_bad + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + has_relation_lover = scope:stop_host_scope + } + desc = cultural_festival.2000.desc.again_lovers + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + has_relation_rival = scope:stop_host_scope + } + desc = cultural_festival.2000.desc.again_rivals + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + OR = { + opinion = { + target = scope:stop_host_scope + value > 15 + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:stop_host_scope } + } + } + desc = cultural_festival.2000.desc.again_good + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + opinion = { + target = scope:stop_host_scope + value >= -10 + } + opinion = { + target = scope:stop_host_scope + value <= 15 + } + } + desc = cultural_festival.2000.desc.again_neutral + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + opinion = { + target = scope:stop_host_scope + value < -10 + } + } + desc = cultural_festival.2000.desc.again_bad + } + } + random_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + desc = cultural_festival.2000.desc.majesty + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + desc = cultural_festival.2000.desc.intimidation + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + desc = cultural_festival.2000.desc.again_intimidation + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + desc = cultural_festival.2000.desc.taxation + } + } + } + + theme = tour_arrival + window = tour_arrival_event + + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_relation_lover = scope:stop_host_scope + } + animation = flirtation_left + } + triggered_animation = { + trigger = { + OR = { + opinion = { + target = scope:stop_host_scope + value > 15 + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:stop_host_scope } + } + } + animation = ecstasy + } + triggered_animation = { + trigger = { + OR = { + opinion = { + target = scope:stop_host_scope + value < -10 + } + has_relation_rival = scope:stop_host_scope + } + } + animation = dismissal + } + triggered_animation = { + trigger = { + OR = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + has_trait = ambitious + has_trait = greedy + has_trait = avaricious + } + } + animation = dismissal + } + triggered_animation = { + trigger = { + OR = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + has_trait = callous + has_trait = sadistic + dread >= high_dread + } + } + animation = personality_vengeful + } + animation = personality_rational + } + right_portrait = { + character = scope:stop_host_scope + triggered_animation = { + trigger = { + has_relation_lover = scope:stop_host_scope + } + animation = flirtation + } + triggered_animation = { + trigger = { + scope:stop_host_scope = { + opinion = { + target = scope:stop_host_scope + value > 15 + } + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + } + } + animation = happiness + } + triggered_animation = { + trigger = { + scope:stop_host_scope = { + OR = { + opinion = { + target = scope:stop_host_scope + value < -10 + } + has_relation_rival = root + } + } + } + animation = boredom + } + animation = personality_honorable + } + + immediate = { + if = { + limit = { + root.location.county.holder = { + OR = { + has_relation_friend = root + opinion = { + target = root + value >= low_positive_opinion + } + } + } + } + play_arrival_music_effect = { + WELCOME_LEVEL = welcome + } + } + else = { + play_arrival_music_effect = { + WELCOME_LEVEL = neutral + } + } + } + + option = { + name = cultural_festival.2000.a + custom_tooltip = cultural_festival_begins_tt + if = { + limit = { + root.culture != root.location.culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + } + else = { + root.location.county = { + add_county_modifier = { + modifier = recent_cultural_festival + years = 20 + } + } + } + tour_generic_arrival_effect = yes + } + + after = { + add_to_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } +} + +###################### +## Liege: Performer messes up in front of you, gets injured +## 2001 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2001_has_wrathful_trait = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = wrathful + } +} + +cultural_festival.2001 = { + type = activity_event + title = cultural_festival.2001.t + desc = { + desc = cultural_festival.2001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_variable = child_in_disguise_var + } + desc = cultural_festival.2001.desc.child + } + triggered_desc = { + trigger = { + NOT = { has_variable = child_in_disguise_var } + } + desc = cultural_festival.2001.desc.normal + } + } + } + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + cultural_festival_2001_has_wrathful_trait = yes + } + animation = schadenfreude + } + animation = shock + } + right_portrait = { + character = scope:injured_artist + animation = pain + } + + trigger = { + #triggered in the on_action + } + + weight_multiplier = { + base = 1 + } + + immediate = { + location = { save_scope_as = injured_artist_location } + random_list = { + 35 = { + trigger = { # if host has a child there's a tiny chance they'll be the artist + scope:stop_host_scope = { + any_child = { is_available_ai_adult = yes } + } + } + set_variable = child_in_disguise_var + scope:stop_host_scope = { + random_child = { + limit = { is_available_ai_adult = yes } + increase_wounds_effect = { REASON = fall } + save_scope_as = injured_artist + } + } + } + 65 = { + create_character = { + gender_female_chance = 50 + culture = location.culture + faith = location.faith + random_traits = yes + dynasty = none + age = { 18 50 } + employer = scope:stop_host_scope + save_scope_as = injured_artist + after_creation = { + increase_wounds_effect = { REASON = fall } + } + } + } + } + } + + option = { # So unfortunate + name = cultural_festival.2001.a + stress_impact = { + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + option = { # Help them! + name = cultural_festival.2001.b + remove_short_term_gold = tiny_gold_value + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_helped_injured_artist_modifier + years = 5 + } + } + if = { + limit = { has_variable = child_in_disguise_var } + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + hidden_effect = { + trigger_event = { + id = cultural_festival.2002 + days = { 10 15 } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = sadistic + has_trait = callous + has_trait = wrathful + } + } + } + } + + option = { # Have them whipped + name = cultural_festival.2001.c + trigger = { + cultural_festival_2001_has_wrathful_trait = yes + } + add_dread = medium_dread_gain + scope:injured_artist = { + increase_wounds_effect = { REASON = whipping } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_whipped_injured_artist_modifier + years = 5 + } + } + if = { + limit = { has_variable = child_in_disguise_var } + scope:stop_host_scope = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_whipped_my_kid + OPINION = -30 + } + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + decrease_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + gregarious = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + calm = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = arrogant + has_trait = sadistic + has_trait = callous + has_trait = wrathful + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = calm + has_trait = forgiving + } + } + } + } +} + +# Follow up: The person gives you a reward for your kindness + +scripted_trigger cultural_festival_2002_valid_secret_owner = { + is_adult = yes + is_ai = yes + this != ROOT + any_secret = { + exists = this + NOT = { is_known_by = root } + } +} + +cultural_festival.2002 = { + type = activity_event + title = cultural_festival.2002.t + desc = { + desc = cultural_festival.2002.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = var:secret_var + } + desc = cultural_festival.2002.desc.secret + } + triggered_desc = { + trigger = { + exists = var:hunting_var + } + desc = cultural_festival.2002.desc.hunting + } + triggered_desc = { + trigger = { + exists = var:savings_var + } + desc = cultural_festival.2002.desc.savings + } + } + } + + theme = cultural_festival + + override_background = { reference = market } + + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:injured_artist + animation = beg + } + lower_center_portrait = { + trigger = { has_variable = secret_var } + character = scope:secret_target + } + + trigger = { + location = scope:injured_artist_location #you haven't left for the next stop + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_list = { #we select your reward + 1 = { + trigger = { + scope:activity = { + any_attending_character = { + cultural_festival_2002_valid_secret_owner = yes + } + } + } + set_variable = secret_var + } + 1 = { set_variable = hunting_var } + 1 = { set_variable = savings_var } + } + + if = { #we get the secret scopes + limit = { has_variable = secret_var } + scope:activity = { + random_attending_character = { + limit = { cultural_festival_2002_valid_secret_owner = yes } + save_scope_as = secret_target + random_secret = { + limit = { NOT = { is_known_by = root } } + save_scope_as = secret_secret + } + } + } + } + } + + option = { # Thanks! + name = cultural_festival.2002.a + if = { + limit = { has_variable = secret_var } + scope:secret_secret = { reveal_to = root } + } + else_if = { + limit = { has_variable = hunting_var } + add_character_modifier = { #skirmishers_damage_mult + modifier = terrain_knowledge_modifier + years = 10 + } + } + else = { + add_treasury_or_gold = { + value = minor_treasury_or_gold_value + max = 10 + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + option = { # I can't accept this + name = cultural_festival.2002.b + add_piety = medium_piety_gain + stress_impact = { + arrogant = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = sadistic + has_trait = callous + has_trait = wrathful + } + } + } + } + + after = { + remove_variable = secret_var + remove_variable = hunting_var + remove_variable = savings_var + } +} + +###################### +## Liege: You're being crowned the Ugliest/Prettiest person +## 2010 +## by Veronica Pazos +###################### + +cultural_festival.2010 = { + type = activity_event + title = cultural_festival.2010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_conventionally_ugly_trigger = yes + } + desc = cultural_festival.2010.desc_bad + } + triggered_desc = { + trigger = { + has_conventionally_attractive_trigger = yes + } + desc = cultural_festival.2010.desc_good + } + } + } + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_conventionally_ugly_trigger = yes + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = vengeful + has_trait = callous + has_trait = sadistic + } + } + animation = rage + } + triggered_animation = { + trigger = { + has_conventionally_ugly_trigger = yes + NOR = { + has_trait = arrogant + has_trait = wrathful + has_trait = vengeful + has_trait = callous + has_trait = sadistic + } + } + animation = grief + } + animation = ecstasy + } + right_portrait = { + character = scope:stop_host_scope + triggered_animation = { + trigger = { + has_conventionally_ugly_trigger = yes + } + animation = schadenfreude + } + animation = happiness + } + + trigger = { + is_landed_or_landless_administrative = yes + NOT = { has_variable = was_monarch_good_bad_var } + OR = { + AND = { + has_conventionally_attractive_trigger = yes #you're pretty + scope:stop_host_scope = { #and the host doesn't hate you + NOT = { has_relation_rival = root } + } + } + AND = { + has_conventionally_ugly_trigger = yes #or not pretty + scope:stop_host_scope = { #and the host has something against you + OR = { + has_relation_rival = root + has_relation_potential_rival = root + AND = { + has_hook_of_type = { + target = root + type = weak_blackmail_hook + } + opinion = { + target = root + value >= medium_negative_opinion + } + } + has_hook_of_type = { + target = root + type = strong_blackmail_hook + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:stop_host_scope = { + has_relation_soulmate = root + } + } + modifier = { + factor = 2 + scope:stop_host_scope = { + has_relation_nemesis = root + } + } + modifier = { + factor = 1.5 + scope:stop_host_scope = { + has_relation_lover = root + } + } + modifier = { + factor = 1.5 + OR = { + has_trait = arrogant #more likely to happen if you care about this stuff + has_trait = gregarious + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = humble #less likely to happen if you don't like this + has_trait = shy + } + } + } + + immediate = { + set_variable = was_monarch_good_bad_var #so you don't get the same event again + } + + option = { # you're the king/queen of beauty - yass king/queen + name = cultural_festival.2010.a + trigger = { + has_conventionally_attractive_trigger = yes + } + scope:activity = { + add_activity_log_entry = { + key = crowned_monarch_of_beauty_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + if = { + limit = { is_male = yes } + give_nickname = nick_monarch_of_beauty_and_noblesse_masc + } + else = { + give_nickname = nick_monarch_of_beauty_and_noblesse + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = king_of_beauty_modifier + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + arrogant = minor_stress_impact_loss #you like this even more! + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + } + } + } + + option = { # you're king/queen of the homely - sigh + name = cultural_festival.2010.b + trigger = { + has_conventionally_ugly_trigger = yes + } + scope:activity = { + add_activity_log_entry = { + key = crowned_monarch_of_ugly_log + tags = { bad } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + if = { + limit = { is_male = yes } + give_nickname = nick_monarch_of_grim_and_grievance_masc + } + else = { + give_nickname = nick_monarch_of_grim_and_grievance + } + add_opinion = { + target = scope:stop_host_scope + modifier = insult_opinion + opinion = -50 + } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + + } + } + } + + option = { #you're the king/queen of the homely - rage + name = cultural_festival.2010.c + trigger = { + has_conventionally_ugly_trigger = yes + } + scope:activity = { + add_activity_log_entry = { + key = crowned_monarch_of_ugly_log + tags = { bad } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + if = { + limit = { has_relation_nemesis = scope:stop_host_scope } + add_opinion = { + target = scope:stop_host_scope + modifier = insult_opinion + opinion = -50 + } + } + else_if = { + limit = { has_relation_rival = scope:stop_host_scope } + set_relation_nemesis = { #this is bad enough to make you nemesis + target = scope:stop_host_scope + copy_reason = rival + reason = nemesis_monarch_of_grim_and_grievance + } + } + else = { + progress_towards_rival_effect = { + CHARACTER = scope:stop_host_scope + REASON = rival_king_of_ugly + OPINION = -10 + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = king_of_ugly_modifier + years = 5 + } + } + } + } + } + duel = { + skill = prowess + target = scope:stop_host_scope + 50 = { #you win + desc = cultural_festival.2010.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = cultural_festival.2010.c.success + left_icon = root + right_icon = scope:stop_host_scope + scope:stop_host_scope = { + increase_wounds_effect = { + REASON = fight + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 50 = { + desc = cultural_festival.2010.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = cultural_festival.2010.c.failure + left_icon = root + increase_wounds_effect = { + REASON = fight + } + } + } + } + stress_impact = { + content = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = forgiving + has_trait = calm + } + } + } + } +} + +###################### +## Liege: You enjoy a cultural demonstration +## 2020 +## by Veronica Pazos +###################### + +cultural_festival.2020 = { + type = activity_event + title = cultural_festival.2020.t + desc = { + desc = cultural_festival.2020.desc.intro + first_valid = { + triggered_desc = { #Christmas + trigger = { + OR = { + location.faith.religion = religion:eastern_orthodox_religion + location.faith.religion = religion:catholic_religion + location.faith.religion = religion:protestant_religion + } + OR = { #we take the broader Christmaside season + current_month = 11 + current_month = 12 + current_month = 1 + } + } + desc = cultural_festival.2020.desc.christmas + } + triggered_desc = { #Eid al-Fitr + trigger = { + location.faith.religion = religion:islam_religion + OR = { + current_month = 3 + current_month = 4 + current_month = 5 + } + } + desc = cultural_festival.2020.desc.eid + } + triggered_desc = { #Midsommar + trigger = { + root.culture = { NOT = { has_cultural_pillar = heritage_north_germanic } } + location.culture = { has_cultural_pillar = heritage_north_germanic } + OR = { + current_month = 5 + current_month = 6 + current_month = 7 + current_month = 8 + } + } + desc = cultural_festival.2020.desc.midsommar + } + triggered_desc = { #Regular Summer Solstice + trigger = { + NOT = { + location.culture = { has_cultural_pillar = heritage_north_germanic } + } + OR = { + current_month = 5 + current_month = 6 + current_month = 7 + current_month = 8 + } + } + desc = cultural_festival.2020.desc.summer_solstice + } + triggered_desc = { #Harvest Festival + trigger = { + OR = { + current_month = 9 + current_month = 10 + current_month = 11 + } + } + desc = cultural_festival.2020.desc.harvest + } + desc = cultural_festival.2020.desc.generic + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:stop_host_scope + animation = personality_forgiving + } + + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + location.culture = { NOT = { has_variable = cultural_festival_culture_var } } #you haven't seen this festival in a while + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + } + + immediate = { + location.culture = { + set_variable = { + name = cultural_festival_culture_var + days = 1825 # 5 years + } + save_scope_as = festival_culture_scope + } + } + + option = { # I love this culture! + name = cultural_festival.2020.a + if = { + limit = { + location.culture != root.culture #they're not of your same culture + } + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = major_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = enjoyed_culture_modifier + years = 10 + } + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + lifestyle_reveler = minor_stress_impact_gain + drunkard = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lifestyle_reveler + has_trait = drunkard + has_trait = stubborn + } + } + } + } + + option = { # I like the festival itself + name = { + trigger = { + drinks_alcohol_trigger = yes + is_adult = yes + scope:stop_host_scope = { + drinks_alcohol_trigger = yes + } + } + text = cultural_festival.2020.b.drink + } + name = { + trigger = { + OR = { + drinks_alcohol_trigger = no + AND = { + drinks_alcohol_trigger = yes + scope:stop_host_scope = { + drinks_alcohol_trigger = no + } + } + } + } + text = cultural_festival.2020.b.no_drink + } + add_character_modifier = { #stress gain - + modifier = festival_tis_the_season + years = 10 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + base = major_stress_impact_loss + lifestyle_reveler = minor_stress_impact_loss + drunkard = minor_stress_impact_loss + callous = minor_stress_impact_gain + temperate = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = temperate + has_trait = content + } + } + } + } +} + +###################### +## Liege: Taxes? +## 2030 +## by Veronica Pazos +###################### + +cultural_festival.2030 = { + type = activity_event + title = cultural_festival.2030.t + desc = cultural_festival.2030.desc + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = greedy + has_trait = avaricious + } + } + animation = personality_greedy + } + animation = personality_rational + } + right_portrait = { + character = scope:stop_host_scope + animation = worry + } + + trigger = { + is_landed_or_landless_administrative = yes + location.county ?= { + development_level >= bad_development_level + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + location.county = { development_level >= medium_development_level } + } + } + + option = { # Tax the people + name = cultural_festival.2030.a + add_treasury_or_gold = medium_treasury_or_gold_value + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_taxation_modifier + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + decrease_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = generous + } + } + } + } + + option = { # Let them go + name = cultural_festival.2030.b + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = no_taxation_modifier + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = greedy + has_trait = avaricious + } + } + } + } + + option = { # Tax them MORE + name = cultural_festival.2030.c + trigger = { + OR = { + has_trait = greedy + has_trait = avaricious + } + } + add_treasury_or_gold = major_treasury_or_gold_value + location.county = { + change_development_level = -1 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + stress_impact = { + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = greedy + has_trait = avaricious + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = just + has_trait = generous + } + } + } + } +} + +###################### +## Liege: You're horrified by this (lack of) culture +## 2040 +## by Veronica Pazos +###################### + +cultural_festival.2040 = { + type = activity_event + title = cultural_festival.2040.t + desc = cultural_festival.2040.desc + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:stop_host_scope + animation = worry + } + + trigger = { + is_landed_or_landless_administrative = yes + is_available_in_activity_trigger = yes + location.county.culture != root.culture #this is not your culture + exists = root.capital_county + location = { + county = { + culture != root.capital_county.culture #this is not the capital's culture + } + } + } + + immediate = { + location.county.culture = { save_scope_as = festival_culture_scope } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + root.culture = { + cultural_acceptance = { + target = scope:stop_host_scope.culture + value < hybridization_threshold_value + } + } + } + } + + option = { # This is AWFUL + name = cultural_festival.2040.a + if = { + limit = { + location.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = minor_cultural_acceptance_loss + desc = cultural_acceptance_insulted_festival + } + } + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = no_culture_modifier + years = 10 + } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = helped_culture_modifier + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = humble + } + } + } + } + + option = { # It's not that bad + name = cultural_festival.2040.b + if = { + limit = { + location.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = appreciated_culture_modifier + years = 5 + } + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + zealous = minor_stress_impact_gain + callous = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = callous + has_trait = arrogant + } + } + } + } + + option = { # I'll show them what a good culture actually looks like + name = cultural_festival.2040.c + trigger = { + has_trait = arrogant + } + duel = { + skill = diplomacy + value = average_skill_level + 50 = { + desc = cultural_festival.2040.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = cultural_festival.2040.c.success + left_icon = root + if = { + limit = { + location.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_insulted_festival + } + } + } + add_prestige = minor_prestige_gain + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 50 = { + desc = cultural_festival.2040.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = cultural_festival.2040.c.failure + left_icon = root + add_prestige = medium_prestige_loss + } + } + } + stress_impact = { + gregarious = minor_stress_impact_gain + temperate = minor_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = temperate + has_trait = shy + } + } + } + } +} + +###################### +## Liege: Local dance is too scandalous for you +## 2050 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2050_scandalous_trigger = { + culture = { NOT = { has_cultural_tradition = tradition_modest } } #they need to not be modest AND + NOR = { #their liege is into this + has_trait = chaste + has_trait = celibate + } + OR = { + faith = { #there are many ways you can be scandalous + OR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = deviancy_accepted + NOT = { trait_is_sin = lustful } + trait_is_sin = chaste + trait_is_sin = celibate + } + } + } +} + +scripted_trigger cultural_festival_2050_modest_trigger = { + faith = { trait_is_sin = lustful } #this is a sin + OR = { + culture = { has_cultural_tradition = tradition_modest } #you can just be modest + faith = { #or you don't have these tenets + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = deviancy_accepted + } + } + } +} + +cultural_festival.2050 = { + type = activity_event + title = cultural_festival.2050.t + desc = { + desc = cultural_festival.2050.desc_intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = lustful + has_trait = deviant + } + } + desc = cultural_festival.2050.desc_lustful + } + triggered_desc = { + trigger = { + NOR = { + has_trait = lustful + has_trait = deviant + } + } + desc = cultural_festival.2050.desc_fallback + } + } + desc = cultural_festival.2050.desc_outro + } + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:stop_host_scope + animation = ecstasy + } + + trigger = { + is_landed_or_landless_administrative = yes + is_available_in_activity_trigger = yes + location != root.capital_county.title_province #this is not happening in your capital + scope:stop_host_scope = { + cultural_festival_2050_scandalous_trigger = yes #they're scandalous + } + cultural_festival_2050_modest_trigger = yes #you're not + # Probably best not for kids to be involved in this event at all + scope:stop_host_scope = { is_adult = yes } + scope:visiting_liege = { is_adult = yes } + } + + immediate = { + location.culture ?= { save_scope_as = festival_culture_scope } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = lustful + scope:stop_host_scope = { + OR = { + has_trait = lustful + has_trait = deviant + } + } + } + } + } + + option = { # OH MY GOD + name = cultural_festival.2050.a + scope:activity = { + add_activity_log_entry = { + key = culture_shock_log + tags = { bad } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + culture = { #Decrease + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = minor_cultural_acceptance_loss + desc = cultural_acceptance_insulted_festival + } + } + } + } + } + stress_impact = { + lustful = minor_stress_impact_gain + deviant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = chaste + has_trait = celibate + has_trait = zealous + } + } + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = deviant + } + } + } + } + + option = { # I shall defend their culture + name = cultural_festival.2050.b + scope:activity = { + add_activity_log_entry = { + key = culture_exchange_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = medium_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + add_piety = minor_piety_loss + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + stress_impact = { + shy = minor_stress_impact_gain + chaste = medium_stress_impact_gain + celibate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = chaste + has_trait = celibate + has_trait = zealous + } + } + } + } + + option = { # This is amazing! + name = cultural_festival.2050.c + trigger = { + has_trait = lustful + has_trait = deviant + } + scope:activity = { + add_activity_log_entry = { + key = culture_exchange_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = medium_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 35 + } + } + add_piety = medium_piety_loss + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + zealous = medium_stress_impact_gain + chaste = major_stress_impact_gain + celibate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = lustful + has_trait = deviant + } + } + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = chaste + has_trait = celibate + has_trait = zealous + } + } + } + } +} + +###################### +## Liege: You bring sophisticated entertainments from the capital +## 2060 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2060_arrogant_trigger = { + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = vengeful + has_trait = sadistic + has_trait = callous + has_trait = stubborn + } +} + +cultural_festival.2060 = { + type = activity_event + title = cultural_festival.2060.t + desc = cultural_festival.2060.desc + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:stop_host_scope + triggered_animation = { + trigger = { + scope:stop_host_scope = { cultural_festival_2060_arrogant_trigger = yes } + } + animation = dismissal + } + animation = ecstasy + } + artifact = { + target = scope:sophisticated_artifact + position = lower_center_portrait + } + + trigger = { + is_landed_or_landless_administrative = yes + location.county ?= { + development_level <= bad_development_level + } + any_character_artifact = { #you bring something with you + is_equipped = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + location.county = { + development_level <= terrible_development_level + } + } + modifier = { + factor = 1.5 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + } + + immediate = { + random_character_artifact = { + limit = { + is_equipped = no + trigger_if = { + limit = { + scope:stop_host_scope = { + highest_held_title_tier > tier_kingdom #No point in giving a court artifact if this is a character without a court. + } + } + ep1_artifact_is_court_artifact_trigger = no + } + rarity = common + } + alternative_limit = { + is_equipped = no + trigger_if = { + limit = { + scope:stop_host_scope = { + highest_held_title_tier > tier_kingdom #No point in giving a court artifact if this is a character without a court. + } + } + ep1_artifact_is_court_artifact_trigger = no + } + rarity = masterwork + } + alternative_limit = { + is_equipped = no + trigger_if = { + limit = { + scope:stop_host_scope = { + highest_held_title_tier > tier_kingdom #No point in giving a court artifact if this is a character without a court. + } + } + ep1_artifact_is_court_artifact_trigger = no + } + rarity = famed + } + alternative_limit = { + is_equipped = no + trigger_if = { + limit = { + scope:stop_host_scope = { + highest_held_title_tier > tier_kingdom #No point in giving a court artifact if this is a character without a court. + } + } + ep1_artifact_is_court_artifact_trigger = no + } + } + save_scope_as = sophisticated_artifact + } + if = { + limit = { + scope:stop_host_scope = { + any_sponsored_inspiration = { + count > 0 + inspiration_owner.location = root.location + } + } + } + scope:stop_host_scope = { + random_sponsored_inspiration = { + limit = { + inspiration_owner.location = root.location + } + inspiration_owner = { + save_scope_as = inspired_character + } + } + } + } + } + + option = { # Give it to them + name = cultural_festival.2060.a + scope:activity = { + add_activity_log_entry = { + key = gave_away_artifact_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + artifact = scope:sophisticated_artifact + root.location.county = { + change_development_progress = 2 + } + scope:sophisticated_artifact = { + set_owner = scope:stop_host_scope + } + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + } + } + stress_impact = { + callous = minor_stress_impact_gain + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = callous + } + } + } + } + + option = { # Ask to have it back + name = cultural_festival.2060.b + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = generous + } + } + } + } + + option = { # Find a local to craft a similar artifact + name = cultural_festival.2060.c + trigger = { + exists = scope:inspired_character + exists = scope:inspired_character.inspiration + } + pay_short_term_gold = { + target = scope:inspired_character + gold = minor_gold_value + } + location.county = { + change_development_progress = 2 + } + scope:inspired_character = { + inspiration = { + change_inspiration_progress = 20 + } + } + stress_impact = { + callous = minor_stress_impact_gain + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = callous + } + } + } + } +} + +###################### +## Liege: You encounter a band of mercenaries enjoying the festivities, recruit? +## 2070 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2070_valid_mercenary = { + is_available_healthy_ai_adult = yes + prowess >= high_skill_rating + trigger_if = { + limit = { #your vassal and you can use these mercenaries + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:stop_host_scope } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + is_female = yes + } + trigger_else = { + is_female = no + } +} + +cultural_festival.2070 = { + type = activity_event + title = cultural_festival.2070.t + desc = cultural_festival.2070.desc + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = deceitful + has_trait = disloyal + has_trait = schemer + } + } + animation = scheme + } + triggered_animation = { + trigger = { + OR = { + has_trait = gregarious + has_trait = lifestyle_reveler + has_trait = drunkard + } + } + animation = toast_goblet + } + animation = personality_honorable + } + right_portrait = { + character = scope:retired_mercenary + animation = drink_goblet + } + lower_center_portrait = scope:stop_host_scope + cooldown = { years = 2 } + + trigger = { + location.county ?= { county_control <= medium_county_control } + } + + immediate = { + #if there's an appropiate pool character pick them + if = { + limit = { + any_pool_character = { + province = root.location + cultural_festival_2070_valid_mercenary = yes + } + } + random_pool_character = { + province = root.location + limit = { cultural_festival_2070_valid_mercenary = yes } + save_scope_as = retired_mercenary + } + } + #otherwise create new character + else = { + create_character = { + template = retired_mercenary + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + dynasty = none + save_scope_as = retired_mercenary + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + location.county = { county_control < low_county_control } + } + } + + option = { # hire them to keep the area controlled + name = cultural_festival.2070.a + pay_short_term_gold = { + target = scope:retired_mercenary + gold = minor_gold_value + } + add_character_modifier = { + modifier = festival_hired_mercenaries #county_control + years = 10 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + drunkard = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = drunkard + has_trait = gregarious + } + } + } + } + + option = { # challenge them to a game, if you win they must serve you for free, if they win you pay them double + name = cultural_festival.2070.b + random_list = { + 50 = { + send_interface_toast = { + title = cultural_festival.2070.b.success + left_icon = scope:retired_mercenary + add_character_modifier = { + modifier = festival_luck_mercenaries + years = 10 + } + if = { + limit = { + scope:activity = { + OR = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 50 = { + send_interface_toast = { + title = cultural_festival.2070.b.failure + left_icon = scope:retired_mercenary + pay_short_term_gold = { + target = scope:retired_mercenary + gold = minor_gold_value + } + } + } + } + stress_impact = { + drunkard = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = drunkard + has_trait = gregarious + } + } + } + } + + option = { # challenge them to a game, if you win they must serve you for free, if they win you pay them double - but you cheat + name = cultural_festival.2070.c + trigger = { + OR = { + has_trait = deceitful + has_trait = schemer + } + } + duel = { + skill = intrigue + target = scope:retired_mercenary + 70 = { + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + send_interface_toast = { + title = cultural_festival.2070.b.success + left_icon = scope:retired_mercenary + add_character_modifier = { + modifier = festival_luck_mercenaries + years = 10 + } + if = { + limit = { + scope:activity = { + OR = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + send_interface_toast = { + title = cultural_festival.2070.c.failure + left_icon = scope:retired_mercenary + pay_short_term_gold = { + target = scope:retired_mercenary + gold = minor_gold_value + } + #they also beat you up + increase_wounds_no_death_effect = { REASON = fight } + } + } + } + stress_impact = { + drunkard = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = drunkard + has_trait = gregarious + has_trait = honest + } + } + } + } + + option = { # have a nice one, gents + name = cultural_festival.2070.d + add_character_modifier = { + modifier = festival_drank_with_mercenaries + years = 10 + } + stress_impact = { + temperate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = temperate + } + } + } +} + +###################### +## Liege: You encounter a mysterious merchant +## 2080 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2080_merchant = { + is_ai = yes + is_adult = yes + is_landed_or_landless_administrative = no + is_lowborn = yes + is_councillor = no + NOT = { is_courtier_of = root } + NOR = { + has_trait = zealous + has_trait = cynical + } +} + +cultural_festival.2080 = { + type = activity_event + title = cultural_festival.2080.t + desc = cultural_festival.2080.desc + + theme = cultural_festival + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:mysterious_merchant + animation = ecstasy + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = arbitrary + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + cultural_festival_2080_merchant = yes + } + } + random_pool_character = { + province = root.location + limit = { cultural_festival_2080_merchant = yes } + save_scope_as = mysterious_merchant + } + } + else = { + create_character = { + template = merchant_template + location = root.location + dynasty = none + faith = root.location.faith + culture = root.location.culture + save_scope_as = mysterious_merchant + } + } + } + + option = { # Buy the red liquid + name = cultural_festival.2080.a + remove_short_term_gold = 1 #symbolic prize, you're buying one bottle + custom_tooltip = { + text = cultural_festival.2080.tt + random_list = { + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.a.health + add_character_modifier = festival_2080_red_health + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.a.prowess + add_character_modifier = festival_2080_red_prowess + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.a.fertility + add_character_modifier = festival_2080_red_fertility + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.a.prowess_bad + add_character_modifier = festival_2080_red_prowess_bad + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.a.fertility_bad + add_character_modifier = festival_2080_red_fertility_bad + } + } + } + } + stress_impact = { + greedy = miniscule_stress_impact_gain + avaricious = miniscule_stress_impact_gain + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 1.25 + has_trait = arbitrary + } + modifier = { + factor = 0.5 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + modifier = { + factor = 0 + OR = { + gold <= tiny_gold_value + has_trait = craven + has_trait = paranoid + } + } + } + } + + option = { # Buy the green liquid + name = cultural_festival.2080.b + remove_short_term_gold = 1 + custom_tooltip = { + text = cultural_festival.2080.tt + random_list = { + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.b.health_bad + add_character_modifier = festival_2080_blue_health_bad + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.b.stress + add_character_modifier = festival_2080_blue_stress + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.b.stress_bad + add_character_modifier = festival_2080_blue_stress_bad + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.b.attraction + add_character_modifier = festival_2080_blue_attraction + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.b.stress_loss + add_character_modifier = festival_2080_blue_stress_loss + } + } + } + } + stress_impact = { + greedy = miniscule_stress_impact_gain + avaricious = miniscule_stress_impact_gain + cynical = minor_stress_impact_gain + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 1.25 + has_trait = arbitrary + } + modifier = { + factor = 0.5 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + modifier = { + factor = 0 + OR = { + gold <= tiny_gold_value + has_trait = craven + has_trait = paranoid + } + } + } + } + + option = { # Leave + name = cultural_festival.2080.c + stress_impact = { + brave = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = trusting + } + } + } + } +} + +###################### +## Liege: Make a point of arresting performers on made-up allegations +## 2090 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2090_peasant = { + is_ai = yes + is_adult = yes + is_landed_or_landless_administrative = no + is_lowborn = yes + is_councillor = no + NOT = { is_courtier_of = root } +} + +scripted_trigger cultural_festival_2090_faction = { + exists = yes + NOT = { exists = faction_war } + faction_is_type = peasant_faction + faction_leader ?= { + location = root.location + } +} + +cultural_festival.2090 = { + type = activity_event + title = cultural_festival.2090.t + desc = cultural_festival.2090.desc + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:arrested_performer + animation = fear + } + lower_right_portrait = { + trigger = { exists = scope:faction_leader_scope } + character = scope:faction_leader_scope + } + + trigger = { + OR = { + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + has_trait = callous + has_trait = sadistic + dread >= high_dread + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + modifier = { + factor = 2 + any_targeting_faction = { + faction_type = peasant_faction + exists = yes + NOT = { exists = faction_war } + } + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + cultural_festival_2090_peasant = yes + } + } + random_pool_character = { + province = root.location + limit = { cultural_festival_2090_peasant = yes } + save_scope_as = arrested_performer + } + } + else = { + create_character = { + template = generic_peasant_character + location = root.location + dynasty = none + culture = root.location.culture + faith = root.location.faith + save_scope_as = arrested_performer + } + } + if = { + limit = { + any_targeting_faction = { + cultural_festival_2090_faction = yes + } + } + random_targeting_faction = { + limit = { cultural_festival_2090_faction = yes } + save_scope_as = faction_scope + faction_leader = { save_scope_as = faction_leader_scope } + } + } + } + + option = { # Arrest them + name = cultural_festival.2090.a + scope:activity = { + add_activity_log_entry = { + key = arrested_performers_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + add_dread = medium_dread_gain + scope:cultural_festival_scope = { #lose popular opinion + add_county_modifier = { + modifier = festival_arrested_artists + years = 5 + } + } + if = { + limit = { + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + else = { + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } + + option = { # They're actually factioning against you + name = cultural_festival.2090.b + trigger = { + any_targeting_faction = { + cultural_festival_2090_faction = yes + } + } + scope:activity = { + add_activity_log_entry = { + key = arrested_faction_leader_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + rightfully_imprison_character_effect = { + TARGET = scope:faction_leader_scope + IMPRISONER = root + } + scope:faction_leader_scope = { + leave_faction_with_cooldown_effect = { + FACTION = scope:faction_scope + YEARS = 10 + } + } + scope:cultural_festival_scope = { #lose popular opinion + add_county_modifier = { + modifier = festival_arrested_artists + years = 5 + } + } + if = { + limit = { + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + else = { + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } + + option = { # Nahh + name = cultural_festival.2090.c + add_dread = minor_dread_loss + scope:cultural_festival_scope = { #get popular opinion + add_county_modifier = { + modifier = festival_no_prisoners + years = 5 + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + } +} + +###################### +## Liege: You see a guild contributing to the festival +## 2100 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2100_courtier = { + is_ai = yes + is_adult = yes + is_courtier_of = root +} + +cultural_festival.2100 = { + type = activity_event + title = cultural_festival.2100.t + desc = cultural_festival.2100.desc + + theme = cultural_festival + cooldown = { years = 2 } + + override_background = { reference = market } + + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:inspired_courtier + animation = admiration + } + + trigger = { + scope:activity = { + any_attending_character = { + cultural_festival_2100_courtier = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + } + + immediate = { + location = { save_scope_as = guild_location } + scope:activity = { + random_attending_character = { + limit = { cultural_festival_2100_courtier = yes } + weight = { + base = 1 + modifier = { + add = 5 + has_any_good_relationship_with_root_trigger = yes #someone you potentially care about + } + modifier = { + add = 2 + has_any_high_skill_rating = no #someone we can make useful + } + modifier = { + add = -2 + is_councillor = yes + } + } + save_scope_as = inspired_courtier + } + } + } + + option = { # Support them + name = cultural_festival.2100.a + remove_short_term_gold = { + value = medium_gold_value + max = 100 + } + location.county = { + change_development_progress = medium_development_progress_gain + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = ambitious + } + NOT = { can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } } + } + } + } + + option = { # You get inspired + name = cultural_festival.2100.b + add_character_modifier = { + modifier = discounted_guild_holding_build_cost_modifier + years = 10 + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } + + option = { # Courtier gets inspired + name = cultural_festival.2100.c + scope:inspired_courtier = { + duel = { + skill = stewardship + value = high_skill_rating + 50 = { #they get the trait + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = cultural_festival.2100.c.success + root = { + send_interface_toast = { + title = cultural_festival.2100.c.success + left_icon = scope:inspired_courtier + scope:inspired_courtier = { add_trait = architect } + } + } + } + 50 = { #they improve their skills + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = cultural_festival.2100.c.failure + root = { + send_interface_toast = { + title = cultural_festival.2100.c.failure + left_icon = scope:inspired_courtier + scope:inspired_courtier = { add_stewardship_skill = 2 } + } + } + } + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + } +} + +###################### +## Liege: A puppy disrupts the performance +## 2110 +## by Veronica Pazos +###################### + +cultural_festival.2110 = { + type = activity_event + title = cultural_festival.2110.t + desc = { + desc = cultural_festival.2110.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + desc = cultural_festival.2110.desc.callous + } + } + desc = cultural_festival.2110.desc.outro + } + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = dismissal + } + animation = personality_compassionate + } + lower_right_portrait = { + trigger = { exists = scope:my_heir } + character = scope:my_heir + } + + trigger = { + NOT = { any_owned_story = { type = story_cycle_pet_dog } } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = compassionate + } + } + + immediate = { + if = { + limit = { + any_child = { + is_adult = no + is_ai = yes + } + } + random_child = { + limit = { + is_adult = no + is_ai = yes + } + save_scope_as = my_heir + } + } + } + + option = { # Adopt!!! + name = cultural_festival.2110.a + scope:activity = { + add_activity_log_entry = { + key = adopted_a_puppy_log + tags = { good } + character = scope:visiting_liege + root = { + start_dog_story_cycle_effect = yes + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = ambitious + } + NOT = { can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } } + } + } + } + + option = { # Get it for your heir + name = cultural_festival.2110.b + trigger = { + exists = scope:my_heir + } + if = { + limit = { + NOT = { has_relation_friend = scope:my_heir } + } + set_relation_friend = { + target = scope:my_heir + reason = friend_festival_puppy + } + } + else = { + add_opinion = { + target = scope:my_heir + modifier = grateful_opinion + opinion = 20 + } + } + scope:my_heir = { + start_dog_story_cycle_effect = yes + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } + + option = { # Pet the dog! Pet the dog! + name = cultural_festival.2110.c + trigger = { + has_activity_intent = reduce_stress_intent + } + custom_tooltip = available_because_intent_tt + stress_impact = { + base = major_stress_impact_loss #your reward + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } + + option = { # Kick the dog + name = cultural_festival.2110.d + custom_tooltip = cultural_festival_2110_d_tt + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + scope:activity = { + every_attending_character = { + custom = cultural_festival_2110_d_opinion_tt + limit = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -5 + } + } + } + random = { + chance = 10 + increase_wounds_effect = { REASON = wild_animal } + } + stress_impact = { + base = major_stress_impact_loss #your reward + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { # Ignore + name = cultural_festival.2110.e + add_prestige = miniscule_prestige_gain #you maintain your composure + stress_impact = { + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } +} + +##################################################################################### + +###################### +## Bilateral Events +## 3000-3999 +## by Veronica Pazos +###################### + +###################### +## Bilateral: Big play based on liege +## 3000-3002 +## by Veronica Pazos +###################### + +# Vassal: Do you want to make a big play based on your visiting liege? +cultural_festival.3000 = { + type = activity_event + title = cultural_festival.3000.t + desc = cultural_festival.3000.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = admiration + } + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + is_available_in_activity_trigger = yes + scope:visiting_liege = { + can_receieve_good_available_compliment_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = lifestyle_poet #you're interested in theatre kinda + } + } + + option = { # I sure do! + name = cultural_festival.3000.a + custom_tooltip = cultural_festival.3000.a.tt + remove_treasury_or_gold = medium_treasury_or_gold_value + trigger_event = { id = cultural_festival.3001 days = 3 } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_treasury_or_gold < medium_treasury_or_gold_value + } + } + } + } + + option = { # Not really + name = cultural_festival.3000.b + stress_impact = { + generous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = gregarious + } + } + } + } +} + +# Vassal: Choose how to depict the liege +cultural_festival.3001 = { + type = activity_event + title = cultural_festival.3001.t + desc = cultural_festival.3001.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:liege_actor + animation = beg + } + + immediate = { + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:visiting_liege } + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:visiting_liege } + randomize_good_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:visiting_liege } + create_character = { + age = { 20 50 } + location = root.location + random_traits = yes + faith = location.faith + culture = location.culture + dynasty = none + gender_female_chance = { + if = { + limit = { scope:visiting_liege = { is_female = yes } } + add = 100 + } + else = { + add = 0 + } + } + save_scope_as = liege_actor + } + } + + #Compassionate + option = { + trigger = { has_character_flag = available_compliment_compassionate } + name = cultural_festival.3001.compassionate + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = compassionate COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #bold + option = { + trigger = { has_character_flag = available_compliment_bold } + name = cultural_festival.3001.bold + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = bold COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #honorable + option = { + trigger = { has_character_flag = available_compliment_honorable } + name = cultural_festival.3001.honorable + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = honorable COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #greed + option = { + trigger = { has_character_flag = available_compliment_greedy } + name = cultural_festival.3001.greed + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = greed COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #rational + option = { + trigger = { has_character_flag = available_compliment_rational } + name = cultural_festival.3001.rational + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = rational COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #zealous + option = { + trigger = { has_character_flag = available_compliment_zealous } + name = cultural_festival.3001.zealous + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = zealous COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #energetic + option = { + trigger = { has_character_flag = available_compliment_energetic } + name = cultural_festival.3001.energetic + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = energetic COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #forgiving + option = { + trigger = { has_character_flag = available_compliment_forgiving } + name = cultural_festival.3001.forgiving + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = forgiving COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #beautiful + option = { + trigger = { has_character_flag = available_compliment_beautiful } + name = cultural_festival.3001.beautiful + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = beautiful COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #strong + option = { + trigger = { has_character_flag = available_compliment_strong } + name = cultural_festival.3001.strong + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = strong COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #extroverted + option = { + trigger = { has_character_flag = available_compliment_extroverted } + name = cultural_festival.3001.extroverted + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = extroverted COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #dominant + option = { + trigger = { has_character_flag = available_compliment_dominant } + name = cultural_festival.3001.dominant + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = dominant COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + option = { # Represent them like a buffoon + name = cultural_festival.3001.negative + flavor = cultural_festival.3001.negative.flavor + add_character_modifier = { + modifier = dressed_liege_like_buffon_modifier + years = 5 + } + scope:visiting_liege = { set_variable = buffoon_costume_var } + stress_impact = { + craven = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = compassionate + } + } + modifier = { + factor = 2 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + after = { + clear_available_compliments_effect = yes + scope:visiting_liege = { trigger_event = { id = cultural_festival.3002 days = 3 } } + } +} + +scripted_effect cultural_festival.3002.add_hook = { + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.3002.a.toast + left_icon = scope:visiting_liege + add_hook = { + target = root + type = favor_hook + } + } + } +} + +# Liege: You see the play +cultural_festival.3002 = { + type = activity_event + title = cultural_festival.3002.t + desc = { + desc = cultural_festival.3002.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:good + } + desc = cultural_festival.3002.desc.good + } + triggered_desc = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:neutral + } + desc = cultural_festival.3002.desc.neutral + } + triggered_desc = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:bad + } + desc = cultural_festival.3002.desc.bad + } + triggered_desc = { + trigger = { + has_variable = buffoon_costume_var + } + desc = cultural_festival.3002.desc.buffoon + } + } + } + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:good + } + animation = admiration + } + triggered_animation = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:neutral + } + animation = personality_rational + } + triggered_animation = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:bad + } + animation = disgust + } + triggered_animation = { + trigger = { + has_variable = buffoon_costume_var + } + animation = anger + } + } + right_portrait = { + character = scope:liege_actor + animation = personality_honorable + triggered_outfit = { + trigger = { + root = { has_variable = buffoon_costume_var } + } + remove_default_outfit = yes + outfit_tags = { jester_outfit } + } + } + lower_center_portrait = scope:stop_host_scope + immediate = { + scope:liege_actor = { + add_character_flag = wear_armor + } + } + + option = { # Compliment is good, pay + name = cultural_festival.3002.a + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:good + } + scope:activity = { + add_activity_log_entry = { + key = enjoyed_good_play_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.3002.a.toast + left_icon = scope:visiting_liege + root = { + add_opinion = { + modifier = grateful_opinion + target = scope:stop_host_scope + opinion = 50 + } + } + } + } + add_prestige = minor_prestige_gain + scope:stop_host_scope = { + every_held_county = { + add_county_modifier = { #everyone loves you + modifier = festival_good_play + years = 5 + } + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = humble + has_trait = paranoid + } + add = -50 + } + } + } + + option = { # Meh + name = cultural_festival.3002.b + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:neutral + } + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.3002.b.toast + left_icon = scope:visiting_liege + root = { + add_opinion = { + modifier = grateful_opinion + target = scope:stop_host_scope + opinion = 10 + } + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.25 + has_trait = arrogant + } + } + } + + option = { # This is awful + name = cultural_festival.3002.c + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:bad + } + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.3002.c.toast + left_icon = scope:visiting_liege + root = { + add_opinion = { + modifier = insulted_opinion + target = scope:stop_host_scope + opinion = -15 + } + } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { #everyone thinks you're kinda lame + modifier = festival_bad_play + years = 5 + } + } + stress_impact = { + base = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = arrogant + } + } + } + + option = { # You're a buffoon + name = cultural_festival.3002.d + trigger = { + has_variable = buffoon_costume_var + } + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.3002.d.toast + left_icon = scope:visiting_liege + root = { + progress_towards_rival_effect = { + CHARACTER = scope:stop_host_scope + REASON = rival_buffoon_play + OPINION = -30 + } + } + } + } + stress_impact = { + forgiving = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = humble + } + } + } + } + + option = { # I don't really care about this, but Im gonna pretend I do + name = cultural_festival.3002.e + trigger = { + exists = scope:compliment_outcome + NOT = { scope:compliment_outcome = flag:good } + scope:stop_host_scope = { + can_add_hook = { + target = root + type = favor_hook + } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { #everyone loves you, kinda + modifier = festival_neutral_play + years = 5 + } + } + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + cultural_festival.3002.add_hook = yes + if = { + limit = { has_variable = buffoon_costume_var } + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + callous = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + arrogant = minor_stress_impact_gain #you actually care about this stuff + gregarious = minor_stress_impact_gain #you also care + } + } + ai_chance = { + base = 50 + modifier = { + factor = 0.25 + OR = { + has_trait = arrogant + has_trait = gregarious + } + } + } + } + after = { + scope:liege_actor = { + remove_character_flag = wear_armor + } + } +} + +###################### +## Bilateral: Make a fountain run with wine +## 3010-3011 +## by Veronica Pazos +###################### + +# Vassal: Do you want to make your fountain run with wine? +cultural_festival.3010 = { + type = activity_event + title = cultural_festival.3010.t + desc = cultural_festival.3010.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_rational + } + override_background = { reference = garden } + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + is_available_in_activity_trigger = yes + scope:visiting_liege = { + drinks_alcohol_trigger = yes #you heard that they like this + NOT = { has_variable = fountain_event_var } #we set a 5 year cooldown for the liege too + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 1.5 + any_child = { } + } + modifier = { + factor = 1.25 + OR = { + has_trait = gregarious + has_trait = drunkard + } + } + } + + option = { # I sure do! + name = cultural_festival.3010.a + scope:activity = { + add_activity_log_entry = { + key = wine_fountain_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + } + } + remove_short_term_gold = minor_gold_value + add_prestige = minor_prestige_gain + if = { + limit = { faith_forbids_alcohol_trigger = no } + hidden_effect = { + every_pool_character = { + province = root.location + limit = { drinks_alcohol_trigger = yes } + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 5 + } + } + location = { + every_character_in_location = { #people love this + limit = { + drinks_alcohol_trigger = yes + this != root + } + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 5 + } + } + } + } + location.county = { + holder = { + every_courtier = { + custom = custom.every_courtier + limit = { + location = root.location + faith_forbids_alcohol_trigger = no + } + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 5 + } + } + } + add_county_modifier = { + modifier = alcohol_fountain_modifier + years = 5 + } + } + } + scope:visiting_liege = { + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 20 + } + set_variable = { + name = fountain_event_var + years = 5 + } + set_variable = alcohol_fountain_var + trigger_event = { id = cultural_festival.3011 days = 3 } + } + if = { + limit = { + has_trait = zealous + faith_forbids_alcohol_trigger = yes + } + add_stress = medium_stress_gain + } + stress_impact = { + greedy = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = temperate + short_term_gold < medium_gold_value + AND = { + has_trait = zealous + faith_forbids_alcohol_trigger = yes + } + } + } + } + } + + option = { # Maybe just juice? + name = cultural_festival.3010.b + scope:activity = { + add_activity_log_entry = { + key = juice_fountain_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + } + } + remove_short_term_gold = tiny_gold_value + if = { #if you have children they love this + limit = { + any_child = { + is_adult = no + count > 0 + } + } + every_child = { + limit = { is_adult = no } + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 15 + } + } + } + location.county = { + add_county_modifier = { + modifier = juice_fountain_modifier + years = 5 + } + } + scope:visiting_liege = { + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 10 + } + set_variable = { + name = fountain_event_var + years = 5 + } + set_variable = juice_fountain_var + trigger_event = { id = cultural_festival.3011 days = 3 } + } + stress_impact = { + greedy = minor_stress_impact_gain + drunkard = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + has_trait = greedy + } + modifier = { + factor = 0 + has_trait = drunkard + } + } + } + + option = { # Not really + name = cultural_festival.3010.c + stress_impact = { + avaricious = minor_stress_impact_gain #you want to climb the ladder + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = avaricious + has_trait = gregarious + } + } + } + } +} + +# Liege: You encounter this cool alcohol/juice fountain +cultural_festival.3011 = { + type = activity_event + title = cultural_festival.3011.t + desc = { + desc = cultural_festival.3011.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_variable = alcohol_fountain_var + } + desc = cultural_festival.3011.desc.alcohol + } + triggered_desc = { + trigger = { + has_variable = juice_fountain_var + } + desc = cultural_festival.3011.desc.juice + } + } + desc = cultural_festival.3011.desc.outro + } + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = callous + } + } + animation = disbelief + } + animation = admiration + } + right_portrait = { + character = scope:stop_host_scope + animation = happiness + } + override_background = { reference = garden } + + option = { # drink together + name = cultural_festival.3011.a + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = drank_together_modifier + years = 5 + } + } + if = { + limit = { has_variable = alcohol_fountain_var } + stress_impact = { + base = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = temperate + } + } + } + } + + option = { # make a wish + name = cultural_festival.3011.b + add_character_modifier = { + modifier = festival_wishing_well_modifier + years = 5 + } + if = { + limit = { has_variable = alcohol_fountain_var } + stress_impact = { + cynical = minor_stress_impact_gain + drunkard = minor_stress_impact_gain + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = drunkard + has_trait = cynical + } + } + } + } + + after = { + remove_variable = alcohol_fountain_var + remove_variable = juice_fountain_var + } +} + +###################### +## Bilateral: Host a lavish ceremony to make your vassal formally repledge homage to you +## 3020-3022 +## by Veronica Pazos +###################### + +# Liege: Do you want to host this ceremony? +cultural_festival.3020 = { + type = activity_event + title = cultural_festival.3020.t + desc = cultural_festival.3020.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_rational + } + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + government_has_flag = government_is_feudal + is_available_in_activity_trigger = yes + scope:stop_host_scope = { is_ai = yes } + OR = { + can_add_hook = { + target = scope:stop_host_scope + type = loyalty_hook + } + scope:stop_host_scope = { vassal_contract_obligation_level_can_be_increased = feudal_government_taxes } + scope:stop_host_scope = { vassal_contract_obligation_level_can_be_increased = feudal_government_levies } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:stop_host_scope = { + subject_contract_is_blocked_from_modification = yes + } + } + modifier = { + factor = 2 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + } + + option = { # I sure do! + name = cultural_festival.3020.a + custom_tooltip = cultural_festival.3020.a.tt + trigger_event = { id = cultural_festival.3021 days = 3 } + stress_impact = { + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + } + } + } + + option = { # Let's just relax instead + name = cultural_festival.3020.b + scope:stop_host_scope = { + every_held_county = { + add_county_modifier = { + modifier = festival_no_homage_modifier + years = 5 + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + has_trait = arrogant + } + } + } +} + +# Liege: What do you ask for? +cultural_festival.3021 = { + type = activity_event + title = cultural_festival.3021.t + desc = cultural_festival.3021.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:stop_host_scope + animation = personality_honorable + } + override_background = { reference = throne_room } + + option = { # Give me money + name = cultural_festival.3021.a + custom_tooltip = cultural_festival.3021.a.tt + trigger = { scope:stop_host_scope = { vassal_contract_obligation_level_can_be_increased = feudal_government_taxes } } + scope:activity = { + add_activity_log_entry = { + key = vassal_homage_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + scope:stop_host_scope = { + vassal_contract_increase_obligation_level = feudal_government_taxes + set_variable = homage_money_var + } + } + } + stress_impact = { + brave = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = greedy + } + } + } + + option = { # Give me levies + name = cultural_festival.3021.b + custom_tooltip = cultural_festival.3021.a.tt + trigger = { scope:stop_host_scope = { vassal_contract_obligation_level_can_be_increased = feudal_government_levies } } + scope:activity = { + add_activity_log_entry = { + key = vassal_homage_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + scope:stop_host_scope = { + vassal_contract_increase_obligation_level = feudal_government_levies + set_variable = homage_levies_var + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_lifestyle = martial_lifestyle + martial >= high_skill_rating + has_trait = brave + } + } + } + } + + option = { # Give me hook + name = cultural_festival.3021.c + flavor = cultural_festival.3021.c.flavor + trigger = { + can_add_hook = { + target = scope:stop_host_scope + type = loyalty_hook + } + } + scope:activity = { + add_activity_log_entry = { + key = vassal_homage_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + add_hook = { + target = scope:stop_host_scope + type = loyalty_hook + } + scope:stop_host_scope = { + set_subject_contract_modification_blocked = yes + set_variable = homage_hook_var + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + brave = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 1.25 + OR = { + has_lifestyle = intrigue_lifestyle + intrigue >= high_skill_rating + has_trait = deceitful + } + } + } + } + + option = { # Let's be friends + name = cultural_festival.3021.d + scope:activity = { + add_activity_log_entry = { + key = vassal_homage_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + progress_towards_friend_effect = { + REASON = friend_homage_ceremony + CHARACTER = scope:stop_host_scope + OPINION = 50 + } + } + } + } + scope:stop_host_scope = { + set_variable = homage_friends_var + } + stress_impact = { + greedy = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = forgiving + } + } + modifier = { + factor = 0 + OR = { + has_trait = deceitful + has_trait = greedy + has_trait = callous + has_trait = sadistic + } + } + } + } + + after = { + scope:stop_host_scope = { + trigger_event = { id = cultural_festival.3022 days = 3 } + } + } +} + +# Vassal: What do you think of this? + +scripted_effect cultural_festival.3022.vassal_contract_modified_effect = { + scope:visiting_liege = { + send_interface_toast = { + title = cultural_festival.3022.annoyed + left_icon = root + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = annoyed_opinion + opinion = -10 + } + } + } + } +} + +cultural_festival.3022 = { + type = activity_event + title = cultural_festival.3022.t + desc = { + desc = cultural_festival.3022.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_variable = homage_friends_var + } + desc = cultural_festival.3022.desc.friends + } + triggered_desc = { + trigger = { + has_variable = homage_hook_var + } + desc = cultural_festival.3022.desc.hook + } + triggered_desc = { + trigger = { + has_variable = homage_levies_var + } + desc = cultural_festival.3022.desc.levies + } + triggered_desc = { + trigger = { + has_variable = homage_money_var + } + desc = cultural_festival.3022.desc.money + } + } + } + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_variable = homage_money_var + has_variable = homage_levies_var + has_variable = homage_hook_var + } + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = arrogant + } + } + animation = anger + } + triggered_animation = { + trigger = { + OR = { + has_variable = homage_money_var + has_variable = homage_levies_var + has_variable = homage_hook_var + } + } + animation = stress + } + animation = happiness + } + right_portrait = { + character = scope:visiting_liege + animation = personality_honorable + } + override_background = { reference = throne_room } + + option = { # You had to give money + name = cultural_festival.3022.a + custom_tooltip = cultural_festival.3022.money + trigger = { has_variable = homage_money_var } + cultural_festival.3022.vassal_contract_modified_effect = yes + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # You had to give levies + name = cultural_festival.3022.b + custom_tooltip = cultural_festival.3022.levies + trigger = { has_variable = homage_levies_var } + cultural_festival.3022.vassal_contract_modified_effect = yes + ai_chance = { + base = 100 + } + } + + option = { # You had to give a strong hook + name = cultural_festival.3022.a + custom_tooltip = cultural_festival.3022.hook + trigger = { has_variable = homage_hook_var } + cultural_festival.3022.vassal_contract_modified_effect = yes + stress_impact = { + deceitful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Friendship + name = cultural_festival.3022.d + trigger = { has_variable = homage_friends_var } + scope:visiting_liege = { + send_interface_toast = { + title = cultural_festival.3022.d.friends + left_icon = root + scope:stop_host_scope = { + progress_towards_friend_effect = { + REASON = friend_homage_ceremony + CHARACTER = scope:visiting_liege + OPINION = 50 + } + } + } + } + stress_impact = { + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + after = { + remove_variable = homage_money_var + remove_variable = homage_levies_var + remove_variable = homage_hook_var + remove_variable = homage_friends_var + } +} + +###################### +## Bilateral: Crown the best pig/cow/local_farm_animal +## 3030-3031 +## by Veronica Pazos +###################### + +# Vassal: Do you want to set up a local_farm_animal contest? +cultural_festival.3030 = { + type = activity_event + title = cultural_festival.3030.t + desc = cultural_festival.3030.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:local_farmer + animation = happiness + } + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + is_available_in_activity_trigger = yes + } + + immediate = { + scope:stop_host_scope = { select_local_farm_animal_effect = yes } #let's find the animal to judge + create_character = { + template = generic_peasant_character + location = root.location + dynasty = none + faith = root.faith + culture = root.culture + save_scope_as = local_farmer + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + location.county = { + development_level <= bad_development_level + } + } + modifier = { + factor = 2 + location = { terrain = farmlands } + } + } + + option = { # I sure do! + name = cultural_festival.3030.a + remove_treasury_or_gold = minor_treasury_or_gold_value + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = farm_contest_modifier + years = 5 + } + } + scope:visiting_liege = { trigger_event = { id = cultural_festival.3031 days = 3 } } + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain #you think this is stupid + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_treasury_or_gold < medium_treasury_or_gold_value + } + } + } + } + + option = { # Nahhhh + name = cultural_festival.3030.b + remove_variable = local_farm_animal + stress_impact = { + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + has_trait = gregarious + } + } + } + after = { + scope:local_farmer = { + silent_disappearance_ai_effect = yes + } + } +} + +# Liege: Crown the best local_farm_animal +cultural_festival.3031 = { + type = activity_event + title = cultural_festival.3031.t + desc = cultural_festival.3031.desc + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = cynical + } + } + animation = disbelief + } + animation = personality_rational + } + right_portrait = { + character = scope:stop_host_scope + animation = happiness + } + + immediate = { + location.culture = { save_scope_as = festival_culture_scope } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_relation_rival = root + can_set_relation_nemesis_trigger = { CHARACTER = root } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + has_relation_rival = root + can_set_relation_nemesis_trigger = { CHARACTER = root } + } + save_scope_as = farm_animal_rival + } + } + } + } + + option = { # This one - the liege's, but it's ugly + name = cultural_festival.3031.a + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 20 + } + } + add_character_modifier = { + modifier = underdog_animal_contest_modifier + years = 5 + } + stress_impact = { + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # This one - the favourite, but not the liege's + name = cultural_festival.3031.b + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = favourite_animal_contest_modifier + years = 10 + } + } + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + stress_impact = { + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # This one - the diff culture one + name = cultural_festival.3031.c + trigger = { + location.culture != root.culture #if the county culture is not your culture + } + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_farm_contest + } + } + scope:stop_host_scope = { #it's still not their animal + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + stress_impact = { + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # This is ridiculous + name = cultural_festival.3031.d + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = mocked_animal_fair_modifier + years = 10 + } + } + stress_impact = { + callous = medium_stress_impact_loss + sadistic = major_stress_impact_loss + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { # If your rival is around, pick them as the best farm_animal + name = cultural_festival.3031.e + custom_tooltip = cultural_festival.3031.e.tt + trigger = { + scope:activity = { + any_attending_character = { + has_relation_rival = root + can_set_relation_nemesis_trigger = { CHARACTER = root } + } + } + } + #you become nemesis, this is highly humiliating + set_relation_nemesis = { + reason = nemesis_animal_contest + target = scope:farm_animal_rival + } + stress_impact = { + base = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + callous = medium_stress_impact_loss + sadistic = major_stress_impact_loss + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = arrogant + has_trait = callous + has_trait = vengeful + } + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + } + } + + after = { + remove_variable = local_farm_animal + if = { + limit = { + scope:stop_host_scope = { has_variable = local_farm_animal } + } + remove_variable = local_farm_animal + } + } +} + +###################### +## Bilateral: Sword in the stone +## 3040-3042 +## by Veronica Pazos +###################### + +# Vassal: Do you want to set up a sword in a stone +cultural_festival.3040 = { + type = activity_event + title = cultural_festival.3040.t + desc = cultural_festival.3040.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = cp:councillor_marshal + animation = disapproval + } + artifact = { + target = scope:sword_in_the_stone_scope + position = lower_center_portrait + } + override_background = { reference = courtyard } + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + exists = cp:councillor_marshal + any_character_artifact = { #do you have an artifact that could be buried in a stone? + OR = { + artifact_type = axe + artifact_type = spear + artifact_type = dagger + artifact_type = sword + } + } + } + + immediate = { + cp:councillor_marshal = { save_scope_as = marshal } + random_character_artifact = { + limit = { + OR = { + artifact_type = axe + artifact_type = spear + artifact_type = dagger + artifact_type = sword + } + } + save_scope_as = sword_in_the_stone_scope + } + } + + weight_multiplier = { + base = 1 + modifier = { #more likely to happen if you actually have a sword + factor = 2 + any_character_artifact = { artifact_type = sword } + } + } + + option = { # I sure do! + name = cultural_festival.3040.a + flavor = cultural_festival.3040.flavor + custom_tooltip = cultural_festival.3040.a.tt + add_prestige = medium_prestige_gain #this is a really cool activity + scope:visiting_liege = { + trigger_event = { + id = cultural_festival.3041 + days = 3 + } + } + stress_impact = { + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = arrogant + } + } + } + } + + option = { # Nahhhh + name = cultural_festival.3040.b + stress_impact = { + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = gregarious + } + } + } +} + +# Liege: Do you want to take this sword out of the stone? +cultural_festival.3041 = { + type = activity_event + title = cultural_festival.3041.t + desc = cultural_festival.3041.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:stop_host_scope + animation = personality_bold + } + artifact = { + target = scope:sword_in_the_stone_scope + position = lower_center_portrait + } + + option = { # Try to get it out + name = cultural_festival.3041.a + trigger = { NOT = { has_trait = giant } } + duel = { + skill = prowess + value = high_skill_rating + 50 = { #you get the sword + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = cultural_festival.3041.a.success + send_interface_toast = { + title = cultural_festival.3041.a.success + left_icon = root + right_icon = scope:sword_in_the_stone_scope + scope:activity = { + add_activity_log_entry = { + key = got_sword_in_stone_log + tags = { good } + character = scope:visiting_liege + artifact = scope:sword_in_the_stone_scope + scope:sword_in_the_stone_scope = { + set_owner = root + if = { + limit = { + root = { + can_equip_artifact = scope:sword_in_the_stone_scope + } + } + equip_artifact_to_owner_replace = yes + } + } + root = { add_prestige = medium_prestige_gain } + if = { + limit = { + scope:activity = { + OR = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + scope:stop_host_scope = { #we also send them a toast if you got the artifact + send_interface_toast = { + title = cultural_festival.3041.a.success.vassal + left_icon = scope:visiting_liege + right_icon = scope:sword_in_the_stone_scope + scope:visiting_liege = { #but they like you + add_opinion = { + target = scope:stop_host_scope + modifier = grateful_opinion + opinion = 20 + } + } + } + } + } + 50 = { #you can't make it + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = cultural_festival.3041.a.failure + send_interface_toast = { + title = cultural_festival.3041.a.failure + left_icon = root + right_icon = scope:sword_in_the_stone_scope + add_prestige = minor_prestige_loss + } + set_variable = couldnt_get_sword_var + scope:stop_host_scope = { + trigger_event = { + id = cultural_festival.3042 + days = 3 + } + } + } + } + stress_impact = { + weak = minor_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = weak + has_trait = content + has_trait = humble + } + } + } + } + + option = { # Let the host win + name = cultural_festival.3041.b + progress_towards_friend_effect = { + REASON = friend_sword_in_stone + CHARACTER = scope:stop_host_scope + OPINION = 15 + } + scope:stop_host_scope = { #now they get a chance to take it out + trigger_event = { + id = cultural_festival.3042 + days = 3 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + callous = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = callous + } + } + } + } + + option = { #You're a giant, you get this immediately + name = cultural_festival.3041.c + trigger = { has_trait = giant } + scope:sword_in_the_stone_scope = { + set_owner = root + if = { + limit = { + root = { + can_equip_artifact = scope:sword_in_the_stone_scope + } + } + equip_artifact_to_owner_replace = yes + } + } + add_prestige = minor_prestige_gain + if = { + limit = { + scope:activity = { + OR = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + scope:stop_host_scope = { #we also send them a toast if you got the artifact + send_interface_toast = { + title = cultural_festival.3041.a.success.vassal + left_icon = scope:visiting_liege + right_icon = scope:sword_in_the_stone_scope + scope:visiting_liege = { #but they like you + add_opinion = { + target = scope:stop_host_scope + modifier = grateful_opinion + opinion = 20 + } + } + } + } + } +} + +# Vassal: Do /you/ want to take the sword out? +cultural_festival.3042 = { + type = activity_event + title = cultural_festival.3042.t + desc = { + desc = cultural_festival.3042.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:visiting_liege = { has_variable = couldnt_get_sword_var } + } + desc = cultural_festival.3042.desc.failed + } + desc = cultural_festival.3042.desc.pretended + } + } + + theme = cultural_festival + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:visiting_liege + animation = admiration + } + artifact = { + target = scope:sword_in_the_stone_scope + position = lower_center_portrait + } + + option = { # Try to get it out + name = cultural_festival.3042.a + duel = { + skill = prowess + value = high_skill_rating + 50 = { #you get the sword + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = cultural_festival.3041.a.success #we can reuse the loc for this + send_interface_toast = { + title = cultural_festival.3041.a.success + left_icon = root + right_icon = scope:sword_in_the_stone_scope + add_prestige = medium_prestige_gain + } + } + 50 = { #you can't make it + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = cultural_festival.3041.a.failure + send_interface_toast = { + title = cultural_festival.3041.a.failure + left_icon = root + right_icon = scope:sword_in_the_stone_scope + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + weak = minor_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = weak + has_trait = content + has_trait = humble + } + } + } + } + + option = { # Ignore it + name = cultural_festival.3042.b + stress_impact = { + brave = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = brave + } + } + } + } +} + +###################### +## Bilateral: Struggle to stay awake during a boring performance +## 3050-3051 +## by Veronica Pazos +###################### + +# Liege: Do you try to stay awake to not insult your host? +cultural_festival.3050 = { + type = activity_event + title = cultural_festival.3050.t + desc = cultural_festival.3050.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:stop_host_scope + animation = happiness + } + cooldown = { years = 2 } + + trigger = { + #triggered by the monthly_pulse + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = impatient + } + } + + option = { # try + name = cultural_festival.3050.a + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + scope:cultural_festival_scope = { #people also like this + add_county_modifier = { + modifier = festival_enjoyed_local_performance + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + base = minor_stress_impact_gain #this is kinda stressful to you + impatient = minor_stress_impact_gain #to make it major + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = impatient + } + } + } + + option = { # you don't even care + name = cultural_festival.3050.b + custom_tooltip = cultural_festival.3050.b.tt + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + hidden_effect = { + random_list = { + 60 = { #the host notices + modifier = { + add = 10 + scope:stop_host_scope = { + has_trait = deceitful #they know you're lying + } + } + scope:stop_host_scope = { trigger_event = { id = cultural_festival.3051 days = 3 } } + } + 40 = { #they don't notice + modifier = { + add = 15 + has_trait = deceitful + } + modifier = { + add = -10 + has_trait = honest + } + } + } + } + stress_impact = { + base = medium_stress_impact_loss + shy = minor_stress_impact_gain + honest = minor_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = honest + has_trait = patient + } + } + } + } +} + +# Vassal: You notice liege falling asleep +cultural_festival.3051 = { + type = activity_event + title = cultural_festival.3051.t + desc = cultural_festival.3051.desc + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = wrathful + has_trait = callous + has_trait = vengeful + } + } + animation = rage + } + animation = disbelief + } + right_portrait = { + character = scope:visiting_liege + animation = boredom + } + + option = { # b r u h + name = cultural_festival.3051.a + scope:visiting_liege = { + send_interface_toast = { + title = cultural_festival.3051.a.toast + left_icon = scope:stop_host_scope + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = insult_opinion + opinion = -15 + } + } + } + } + stress_impact = { + forgiving = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = impatient + } + } + } + } + + option = { # I kinda get it + name = cultural_festival.3051.b + stress_impact = { #you get stressed + base = minor_stress_impact_gain + humble = medium_stress_impact_loss + arrogant = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 75 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = patient + } + } + } + } +} + +###################### +## Bilateral: Take someone to dance +## 3060-3061 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_3060_valid_pool_character = { + is_available_ai_adult = yes + is_attracted_to_gender_of = root + root = { is_attracted_to_gender_of = prev } +} + +# Liege: Do you wanna dance with your spouse or with the vassal's? +cultural_festival.3060 = { + type = activity_event + title = cultural_festival.3060.t + desc = { + desc = cultural_festival.3060.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:my_spouse + } + desc = cultural_festival.3060.desc.spouse + } + triggered_desc = { + trigger = { + exists = scope:vassal_spouse + } + desc = cultural_festival.3060.desc.vassal + } + } + } + + theme = cultural_festival + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:my_spouse + animation = happiness + trigger = { exists = scope:my_spouse } + } + lower_center_portrait = { + character = scope:stop_host_scope + trigger = { #they'll only be there if you're trying to dance with their spouse + exists = scope:vassal_spouse + scope:stop_host_scope != scope:my_spouse + } + } + lower_right_portrait = { + character = scope:vassal_spouse + trigger = { + exists = scope:vassal_spouse + scope:vassal_spouse != root + } + } + + cooldown = { years = 2 } + + trigger = { + OR = { # Only for adults and teenagers + is_adult = yes + # Pre-pubescent children are considered asexual, but adult asexuals should be allowed to get this event + NOT = { has_sexuality = asexual } + } + OR = { + scope:stop_host_scope = { #Host has a spouse in our location + any_spouse = { + location = root.location + } + } + any_spouse = { #Our own spouse is in this location + location = root.location + } + } + } + + immediate = { + random_spouse = { #if your spouse is here we grab them + limit = { location = root.location } + save_scope_as = my_spouse + } + scope:stop_host_scope = { #Host has a spouse in our location + random_spouse = { + limit = { + location = root.location + } + save_scope_as = vassal_spouse + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + any_spouse = { #Our own spouse is in this location + location = root.location + } + } + modifier = { + factor = 2 + scope:stop_host_scope = { + any_spouse = { + location = root.location + } + } + } + } + + option = { # I wanna dance with my spouse, obviously + name = cultural_festival.3060.a + trigger = { + exists = scope:my_spouse + } + scope:my_spouse = { + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 20 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + base = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + loyal = medium_stress_impact_loss + lazy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = callous + } + } + } + } + + option = { # I wanna dance with YOUR spouse, obviously + name = cultural_festival.3060.b + trigger = { + exists = scope:vassal_spouse + scope:vassal_spouse != root + } + custom_tooltip = cultural_festival.3060.b.tt + if = { + limit = { + NOR = { + has_trait = celibate + has_trait = chaste + } + } + duel = { + target = scope:vassal_spouse + skill = diplomacy + 50 = { + desc = cultural_festival.3060.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:vassal_spouse = { + OR = { + has_trait = lustful + has_trait = seducer + } + } + factor = 2 + } + modifier = { + OR = { + has_trait = lustful + has_trait = seducer + } + factor = 2 + } + send_interface_toast = { + title = cultural_festival.3060.b.success + left_icon = scope:vassal_spouse + progress_towards_lover_effect = { + CHARACTER = scope:vassal_spouse + REASON = lover_festival_dancing + OPINION = 5 + } + } + } + 50 = { + desc = cultural_festival.3060.b.failure + #nothing happens + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:vassal_spouse = { + OR = { + has_trait = celibate + has_trait = chaste + } + } + factor = 3 + } + send_interface_toast = { + title = cultural_festival.3060.b.failure + left_icon = scope:vassal_spouse + } + } + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + hidden_effect = { + scope:stop_host_scope = { trigger_event = { id = cultural_festival.3061 days = 3 } } + } + stress_impact = { + lustful = minor_stress_impact_loss + seducer = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + loyal = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = loyal + } + } + } + + option = { # I wanna dance with all the locals + name = cultural_festival.3060.c + trigger = { #if one of the spouses doesn't exist, we open this option + OR = { + NOT = { exists = scope:my_spouse } + NOT = { exists = scope:vassal_spouse } + } + } + if = { + limit = { exists = scope:my_spouse } + scope:my_spouse = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_danced_with_local_modifier + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + stress_impact = { + base = minor_stress_impact_loss + lazy = minor_stress_impact_gain + callous = minor_stress_impact_gain + loyal = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = loyal + has_trait = lazy + has_trait = callous + } + } + } + } + + option = { # I hate dancing + name = cultural_festival.3060.d + add_dread = minor_dread_gain + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + stress_impact = { + lazy = minor_stress_impact_loss + callous = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + seducer = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = lazy + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = seducer + } + } + } + } +} + +# Vassal: Your liege has chosen your spouse for a dance +cultural_festival.3061 = { + type = activity_event + title = cultural_festival.3061.t + desc = { + desc = cultural_festival.3060.desc.intro #we reuse the intro + desc = cultural_festival.3061.desc + } + + theme = cultural_festival + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:visiting_liege + animation = flirtation + } + lower_center_portrait = scope:vassal_spouse + + option = { # How dare they???? + name = cultural_festival.3061.a + scope:visiting_liege = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + send_interface_toast = { + title = cultural_festival.3061.a.toast + left_icon = scope:stop_host_scope + scope:stop_host_scope = { + progress_towards_rival_effect = { + CHARACTER = scope:visiting_liege + REASON = rival_danced_with_spouse + OPINION = 0 + } + } + } + } + stress_impact = { + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = forgiving + } + } + } + + option = { # Who wouldn't! + name = cultural_festival.3061.b + add_character_modifier = { + modifier = festival_flattered_spouse_modifier + years = 5 + } + scope:vassal_spouse = { + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + has_trait = wrathful + has_trait = callous + } + } + } + } +} + +###################### +## Bilateral: Hold a Feast of Fools-esque ceremony +## 3070-3071 +## by Veronica Pazos +###################### + +scripted_effect cultural_festival.3070.bishop_angry_effect = { + if = { + limit = { + scope:bishop = { + NOR = { + has_trait = cynical + has_trait = gregarious + } + } + } + scope:bishop = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + } +} + +# Vassal: Do you want to hold a Feast of Fools? +cultural_festival.3070 = { + type = activity_event + title = cultural_festival.3070.t + desc = cultural_festival.3070.desc + + theme = cultural_festival + override_background = { reference = courtyard } + left_portrait = { + character = root + animation = personality_rational + } + lower_right_portrait = scope:rival_jester + lower_center_portrait = scope:sinful_jester + lower_left_portrait = { + trigger = { + exists = scope:bishop + scope:bishop = { + NOR = { + has_trait = cynical + has_trait = gregarious + } + } + } + character = scope:bishop + } + cooldown = { years = 2 } + + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } #this is a deeply Christian thing + location = { + any_character_in_location = { + this != scope:visiting_liege + num_sinful_traits >= 1 + is_adult = yes + save_temporary_scope_as = jester_1 + } + any_character_in_location = { + this != scope:jester_1 + this != scope:visiting_liege + OR = { + has_relation_potential_rival = root + has_relation_rival = root + has_relation_nemesis = root + root = { + opinion = { + target = prev #the character + value < 0 + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 1.5 + location = { + any_character_in_location = { + OR = { + has_relation_rival = root + has_relation_potential_rival = root + } + } + } + } + modifier = { + factor = 2 + location = { + any_character_in_location = { + has_relation_nemesis = root + } + } + } + modifier = { + government_has_flag = government_is_theocracy + NOR = { + has_trait = cynical + any_secret = { type = secret_non_believer } + } + factor = 0.1 + } + } + + immediate = { + if = { #if you have a nemesis here, we pick them + limit = { + location = { + any_character_in_location = { + this != scope:visiting_liege + has_relation_nemesis = root + } + } + } + location = { + random_character_in_location = { + limit = { + this != scope:visiting_liege + has_relation_nemesis = root + } + save_scope_as = rival_jester + } + } + } + else_if = { #if you have a rival here, we pick them + limit = { + location = { + any_character_in_location = { + this != scope:visiting_liege + has_relation_rival = root + } + } + } + location = { + random_character_in_location = { + limit = { + this != scope:visiting_liege + has_relation_rival = root + } + save_scope_as = rival_jester + } + } + } + else_if = { #if you have a potential rival here, we pick them + limit = { + location = { + any_character_in_location = { + this != scope:visiting_liege + has_relation_potential_rival = root + } + } + } + location = { + random_character_in_location = { + limit = { + this != scope:visiting_liege + has_relation_potential_rival = root + } + save_scope_as = rival_jester + } + } + } + else = { #we grab someone that you dislike + location = { + random_character_in_location = { + limit = { + this != scope:visiting_liege + root = { + opinion = { + target = prev #the character + value < 0 + } + } + } + weight = { + base = 100 + modifier = { + add = 100 + is_powerful_vassal = yes + } + } + save_scope_as = rival_jester + } + } + } + location = { + random_character_in_location = { + limit = { + num_sinful_traits >= 1 + is_adult = yes + this != scope:rival_jester + this != scope:visiting_liege + } + save_scope_as = sinful_jester + } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + } + } + } + + option = { # pick someone you dislike + name = cultural_festival.3070.a + if = { #become potential rivals + limit = { + scope:rival_jester = { + NOR = { + has_relation_potential_rival = root + has_relation_rival = root + has_relation_nemesis = root + } + } + } + scope:rival_jester = { + set_relation_potential_rival = { + target = root + reason = rival_feast_of_fools + } + } + } + else_if = { #become rivals if potential rivals + limit = { + scope:rival_jester = { + has_relation_potential_rival = root + } + } + scope:rival_jester = { + set_relation_rival = { + target = root + reason = rival_feast_of_fools + } + } + } + else_if = { #become nemesis if rivals + limit = { + scope:rival_jester = { + has_relation_rival = root + } + } + scope:rival_jester = { + set_relation_nemesis = { + target = root + reason = rival_feast_of_fools + } + } + } + else = { #they get hostile scheme power against you if nemesis + scope:rival_jester = { + set_variable = { + name = festival_nemesis_fool_var + value = scope:stop_host_scope + } + } + } + scope:rival_jester = { + if = { + limit = { is_male = no } + give_nickname = nick_monarch_of_fools + } + else = { + give_nickname = nick_monarch_of_fools_masc + } + add_character_modifier = { #attraction malus + modifier = festival_king_of_fools_modifier + years = 10 + } + save_scope_as = final_jester + } + every_held_county = { + add_county_modifier = { + modifier = festival_feast_of_fools_county_modifier + years = 5 + } + } + add_piety = minor_piety_loss + cultural_festival.3070.bishop_angry_effect = yes + scope:visiting_liege = { trigger_event = { id = cultural_festival.3071 days = 3 } } + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = forgiving + has_trait = compassionate + } + } + } + } + + option = { # pick someone with a sinful trait + name = cultural_festival.3070.b + if = { # become potential rivals + limit = { + scope:sinful_jester = { + NOR = { + has_relation_potential_rival = root + has_relation_rival = root + has_relation_nemesis = root + } + } + } + scope:sinful_jester = { + set_relation_potential_rival = { + target = root + reason = rival_feast_of_fools + } + } + } + else = { + scope:sinful_jester = { + add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -20 + } + } + } + scope:sinful_jester = { + if = { + limit = { is_male = no } + give_nickname = nick_monarch_of_fools + } + else = { + give_nickname = nick_monarch_of_fools_masc + } + add_character_modifier = { #attraction malus + modifier = festival_king_of_fools_modifier + years = 10 + } + save_scope_as = final_jester + } + every_held_county = { + add_county_modifier = { + modifier = festival_feast_of_fools_county_modifier + years = 5 + } + } + add_piety = minor_piety_loss + #bishop doesn't really care that much since they're sinful + scope:visiting_liege = { trigger_event = { id = cultural_festival.3071 days = 3 } } + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + } + } + + option = { # pick the liege + name = cultural_festival.3070.c + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + dread >= high_dread + } + opinion = { # you don't super like this person + target = liege + value <= 10 + } + can_set_relation_rival_trigger = { CHARACTER = scope:visiting_liege } + } + if = { + limit = { + scope:visiting_liege = { is_ai = yes } + } + set_relation_rival = { + target = scope:visiting_liege + reason = rival_feast_of_fools + } + } + every_held_county = { + add_county_modifier = { + modifier = festival_feast_of_fools_county_modifier + years = 5 + } + } + add_piety = minor_piety_loss + cultural_festival.3070.bishop_angry_effect = yes + scope:visiting_liege = { + save_scope_as = final_jester + set_variable = im_the_jester_var + trigger_event = { id = cultural_festival.3071 days = 3 } + } + stress_impact = { + compassionate = minor_stress_impact_gain + just = medium_stress_impact_gain + loyal = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = loyal + } + } + modifier = { + factor = 2 + has_trait = callous + opinion = { + target = liege + value <= 0 + } + } + } + } + + option = { # absolutely not + name = cultural_festival.3070.d + add_piety = minor_piety_gain + if = { + limit = { + scope:bishop = { + NOR = { + has_trait = cynical + has_trait = gregarious + } + } + } + scope:bishop = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = vengeful + } + } + } + } +} + +# Liege: You observe a Feast of Fools +cultural_festival.3071 = { + type = activity_event + title = cultural_festival.3071.t + desc = { + desc = cultural_festival.3071.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_variable = im_the_jester_var + } + desc = cultural_festival.3071.desc_jester + } + desc = cultural_festival.3071.desc_fallback + } + } + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_variable = im_the_jester_var + NOR = { + has_trait = compassionate + has_trait = forgiving + has_trait = gregarious + has_trait = lifestyle_reveler + } + } + animation = anger + } + animation = happiness + } + right_portrait = { + trigger = { + root != scope:final_jester + } + character = scope:final_jester + triggered_animation = { + trigger = { + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = callous + has_trait = sadistic + } + } + animation = anger + } + animation = boredom + outfit_tags = { jester_outfit } + } + lower_center_portrait = scope:stop_host_scope + + option = { # great stuff + name = cultural_festival.3071.a + scope:activity = { + add_activity_log_entry = { + key = festival_of_fools_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + if = { #cultural acceptance if you're not the same culture + limit = { + scope:stop_host_scope.culture != root.culture + } + root.culture = { + change_cultural_acceptance = { + target = scope:stop_host_scope.culture + value = major_cultural_acceptance_gain + desc = cultural_acceptance_feast_of_fools + } + } + } + else = { #popular opinion + scope:stop_host_scope = { + every_held_county = { + add_county_modifier = { + modifier = festival_feast_of_fools_county_modifier + years = 10 + } + } + } + } + add_piety = medium_piety_loss + } + } + } + stress_impact = { + base = minor_stress_impact_loss + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + diligent = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = diligent + } + } + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { # blasphemous + name = cultural_festival.3071.b + add_piety = medium_piety_gain + if = { #if your priest is with you they like this + limit = { + current_travel_plan = { + any_entourage_character = { + has_council_position = councillor_court_chaplain + } + } + } + current_travel_plan = { + random_entourage_character = { + limit = { + has_council_position = councillor_court_chaplain + } + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + } + } + stress_impact = { + cynical = minor_stress_impact_gain + lifestyle_reveler = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = lifestyle_reveler + has_trait = gregarious + } + } + } + } + + option = { # hire the guy + name = cultural_festival.3071.c + trigger = { + root != scope:final_jester + can_appoint_char_to_court_position = { + CHAR = scope:final_jester + COURT_POS = court_jester_court_position + } + } + scope:final_jester = { set_variable = king_of_fools_var } #75% discount forever + recruit_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:final_jester + NEW_COURT_OWNER = root + } + court_position_grant_effect = { + POS = court_jester + CANDIDATE = scope:final_jester + EMPLOYER = root + } + stress_impact = { + avaricious = minor_stress_impact_gain + greedy = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = avaricious + has_trait = greedy + has_trait = zealous + } + } + } + } + + option = { # how dare you??? + name = cultural_festival.3071.d + trigger = { + root = scope:final_jester + } + scope:activity = { + add_activity_log_entry = { + key = festival_of_fools_bad_log + tags = { bad } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + if = { + limit = { #if you're rivals but not nemesis become nemesis + has_relation_rival = scope:stop_host_scope + NOT = { has_relation_nemesis = scope:stop_host_scope} + } + set_relation_nemesis = { + target = scope:stop_host_scope + reason = rival_feast_of_fools + } + } + else = { + set_relation_rival = { + target = scope:stop_host_scope + reason = rival_feast_of_fools + } + } + } + } + } + stress_impact = { + base = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + calm = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = calm + has_trait = forgiving + } + } + } + } +} + +###################### +## Liege: You end up in a conversation in a language you don't know +## 4000 +## by Arkadiusz Majewski +###################### + +scripted_trigger unknown_language_character_trigger = { #pick someone you don't understand + is_physically_able_ai_adult = yes + culture = location.county.culture + NOT = { knows_language_of_culture = scope:visiting_liege.culture } +} + +scripted_trigger bilingual_character_trigger = { #pick someone that can understand both of you + is_physically_able_ai_adult = yes + knows_language_of_culture = scope:visiting_liege.culture + knows_language_of_culture = scope:local_character_scope.culture + NOT = { has_any_relation_trigger = { CHARACTER = scope:stop_host_scope } } +} + +cultural_festival.4000 = { #Liege: You end up in a conversation in a language you don't know + type = activity_event + title = cultural_festival.4000.t + desc = cultural_festival.4000.desc + + theme = cultural_festival + + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:local_translator_scope + animation = worry + } + center_portrait = { + character = scope:local_character_scope + animation = disbelief + } + + cooldown = { years = 5 } + + trigger = { #look for a character that you don't understand + scope:stop_host_scope = { + any_courtier_or_guest = { + unknown_language_character_trigger = yes + save_temporary_scope_as = unknown_language_character_scope + } + } + NOT = { knows_language_of_culture = scope:unknown_language_character_scope.culture } + } + + immediate = { + scope:stop_host_scope = { + random_courtier_or_guest = { #pick someone you don't understand + limit = { + unknown_language_character_trigger = yes + } + save_scope_as = local_character_scope + } + } + if = { + limit = { + scope:stop_host_scope = { + any_courtier_or_guest = { + bilingual_character_trigger = yes + } + } + } + scope:stop_host_scope = { + random_courtier_or_guest = { #pick someone that can understand both of you in vassals court + limit = { + bilingual_character_trigger = yes + } + save_scope_as = local_translator_scope + } + } + } + else_if = { #if above fails, pick someone that can understand both of you in your entourage + limit = { + current_travel_plan = { + any_entourage_character = { + bilingual_character_trigger = yes + } + } + } + current_travel_plan = { + random_entourage_character = { + limit = { + bilingual_character_trigger = yes + } + save_scope_as = local_translator_scope + } + } + } + else = { #if above still fails, just create them + create_character = { + template = scholar_character + location = scope:stop_host_scope.location + faith = location.county.faith + culture = location.county.culture + dynasty = none + save_scope_as = local_translator_scope + } + hidden_effect = { + scope:local_translator_scope = { + learn_language_of_culture = root.culture + } + } + } + } + + option = { #hire one of them as a translator + name = cultural_festival.4000.a + add_character_modifier = { #gain bonus to learning languages + modifier = interpreter_option_modifier + years = 5 + } + pay_short_term_gold = { #pay them to join + target = scope:local_translator_scope + gold = minor_gold_value + } + if = { #recruit them to court if you can + limit = { + scope:local_translator_scope = { + NOT = { + is_courtier_of = scope:visiting_liege + } + } + } + scope:local_translator_scope = { + add_to_court_and_entourage_effect = yes + } + } + scope:cultural_festival_scope = { #gain popular opinion + add_county_modifier = { + modifier = appreciated_culture_modifier + years = 5 + } + } + stress_impact = { + ambitious = minor_stress_impact_loss + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = lazy + short_term_gold < minor_gold_value + } + } + } + } + option = { #pretend to understand the convesation + name = cultural_festival.4000.b + duel = { + skill = intrigue + target = scope:local_translator_scope + 50 = { + desc = cultural_festival.4000.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = cultural_festival.4000.b.success + left_icon = scope:local_translator_scope + scope:cultural_festival_scope = { #gain popular opinion + add_county_modifier = { + modifier = appreciated_culture_modifier + years = 5 + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + 50 = { + desc = cultural_festival.4000.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = cultural_festival.4000.b.failure + left_icon = scope:local_translator_scope + scope:cultural_festival_scope = { #lose popular opinion + add_county_modifier = { + modifier = no_culture_modifier + years = 5 + } + } + } + } + } + stress_impact = { + deceitful = medium_stress_impact_loss + shy = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = craven + } + } + } + } + option = { #go away + name = cultural_festival.4000.c + stress_impact = { + base = minor_stress_impact_loss + shy = minor_stress_impact_loss + craven = minor_stress_impact_loss + brave = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = brave + } + } + } + } +} + +###################### +## Bilateral: Your courtier made a cultural faux pas +## 4100 +## by Arkadiusz Majewski +###################### + +cultural_festival.4100 = { #Your courtier made a cultural faux pas + type = activity_event + title = cultural_festival.4100.t + desc = cultural_festival.4100.desc + + theme = cultural_festival + + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:offended_character_scope + animation = shock + } + center_portrait = { + character = scope:inconsiderate_character_scope + animation = fear + } + + cooldown = { years = 5 } + + trigger = { + OR = { + AND = { + root = scope:visiting_liege + any_courtier_or_guest = { #find someone in your court that could commit a faux pas + age > 5 + culture != scope:stop_host_scope.culture + } + } + AND = { + root = scope:stop_host_scope + any_courtier_or_guest = { #find someone in your court that could commit a faux pas + age > 5 + culture != scope:visiting_liege.culture + } + } + } + } + + immediate = { + if = { #set who is offended by the faux pas, either liege or vassal + limit = { + root = scope:visiting_liege + } + scope:stop_host_scope = { + save_scope_as = offended_character_scope + } + } + else = { + scope:visiting_liege = { + save_scope_as = offended_character_scope + } + } + random_courtier_or_guest = { #find someone in your court that could commit a faux pas + limit = { + age > 5 + culture != scope:offended_character_scope.culture + } + save_scope_as = inconsiderate_character_scope + } + scope:offended_character_scope = { + add_opinion = { + target = scope:inconsiderate_character_scope + modifier = insult_opinion + opinion = -20 + } + } + } + + option = { #try to convince everyone it's just a misunderstanding using diplomacy skill + name = cultural_festival.4100.a + duel = { + skill = diplomacy + target = scope:offended_character_scope + 50 = { #on success gain opinion with both characters; gain cultural acceptance and increase tour success + desc = cultural_festival.4100.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + factor = 2 + has_activity_intent = altruism_intent + } + send_interface_toast = { + title = cultural_festival.4100.a.success + left_icon = scope:offended_character_scope + scope:inconsiderate_character_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + scope:offended_character_scope = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + if = { + limit = { root.culture != scope:offended_character_scope.culture } + root.culture = { + change_cultural_acceptance = { + target = scope:offended_character_scope.culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + } + if = { + limit = { root = scope:visiting_liege } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 50 = { #on fail gain opinion with offender, but lose with offended; lose cultural acceptance and decrease tour success + desc = cultural_festival.4100.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = cultural_festival.4100.a.failure + left_icon = scope:offended_character_scope + scope:inconsiderate_character_scope = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + scope:offended_character_scope = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -10 + } + } + if = { + limit = { root.culture != scope:offended_character_scope.culture } + root.culture = { + change_cultural_acceptance = { + target = scope:offended_character_scope.culture + value = miniscule_negative_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + } + } + } + } + stress_impact = { + compassionate = minor_stress_impact_loss + honest = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = compassionate + has_trait = honest + } + modifier = { + add = -20 + has_trait = callous + } + } + } + + option = { #make the offender pay for their mistakes, gain opinion with offended + name = cultural_festival.4100.b + scope:inconsiderate_character_scope = { + add_opinion = { + target = root + modifier = shamed_me_opinion + opinion = -20 + } + pay_short_term_gold = { + target = scope:offended_character_scope + gold = minor_gold_value + } + } + scope:offended_character_scope = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + stress_impact = { + vengeful = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + factor = 10 + has_relation_rival = scope:inconsiderate_character_scope + has_relation_nemesis = scope:inconsiderate_character_scope + } + modifier = { + add = 10 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + modifier = { + add = -20 + has_trait = compassionate + } + } + } + + option = { #compensate in offenders name with gold; gain opinion with both + name = cultural_festival.4100.c + scope:inconsiderate_character_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + pay_short_term_gold = { + target = scope:offended_character_scope + gold = minor_gold_value + } + scope:offended_character_scope = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + stress_impact = { + compassionate = minor_stress_impact_loss + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_relation_rival = scope:inconsiderate_character_scope + has_relation_nemesis = scope:inconsiderate_character_scope + short_term_gold < minor_gold_value + } + } + modifier = { + add = 10 + OR = { + has_trait = generous + has_trait = compassionate + } + } + modifier = { + add = -20 + has_trait = greedy + } + } + } +} + +###################### +## Bilateral: Vassal prepares a parade, Liege participates in the parade +## 4200-4203 +## by Arkadiusz Majewski +###################### + +scripted_effect parade_liege_enjoyment_effect = { #rewards for liege if liege likes the parade + if = { + limit = { + scope:stop_host_scope.var:parade_type = flag:military_parade + } + scope:visiting_liege = { + add_character_modifier = { + modifier = festival_military_parade_best_modifier + years = 5 + } + } + } + else_if = { + limit = { + scope:stop_host_scope.var:parade_type = flag:civil_parade + } + scope:visiting_liege = { + add_character_modifier = { + modifier = festival_civil_parade_best_modifier + years = 5 + } + } + } + else = { + scope:visiting_liege = { + add_character_modifier = { + modifier = festival_religious_parade_best_modifier + years = 5 + } + } + } + if = { + limit = { scope:visiting_liege.culture != location.county.culture } + scope:visiting_liege.culture = { + change_cultural_acceptance = { + target = scope:stop_host_scope.location.county.culture + value = major_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + } + scope:visiting_liege = { + add_opinion = { + target = scope:stop_host_scope + modifier = impressed_opinion + opinion = 10 + } + } +} + +scripted_effect parade_liege_dissatisfaction_effect = { #rewards for liege if liege dislikes the parade + if = { + limit = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + } + add_piety = minor_piety_gain + } + else = { + add_prestige = minor_prestige_gain + } + scope:visiting_liege = { + add_opinion = { + target = scope:stop_host_scope + modifier = bored_opinion + opinion = -10 + } + add_character_flag = parade_liege_dissatisfaction_flag + } +} + +scripted_effect liege_parade_enjoyment_custom_tt_effect = { #custom tooltip hint for player how likely the liege is to like the parade + if = { + limit = { scope:liege_parade_enjoyment_value > 2 } + custom_tooltip = cultural_festival.4200.tt.liege_likes + } + else_if = { + limit = { scope:liege_parade_enjoyment_value >= 0 } + custom_tooltip = cultural_festival.4200.tt.liege_indifferent + } + else = { + custom_tooltip = cultural_festival.4200.tt.liege_dislikes + } +} + +scripted_effect positive_opinion_after_parade_effect = { + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = flattered_opinion + opinion = 10 + } + } +} + +scripted_effect negative_opinion_after_parade_effect = { + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = frustrated_opinion + opinion = -10 + } + } +} + +scripted_effect parade_end_effect = { #rewards for vassal dependent on parade type and if liege liked the parade + if = { + limit = { + var:parade_type = flag:military_parade + } + if = { + limit = { + var:liege_parade_enjoyment >= 3 + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_military_parade_best_modifier + years = 5 + } + } + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + if = { + limit = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + negative_opinion_after_parade_effect = yes + } + else = { + positive_opinion_after_parade_effect = yes + } + } + else_if = { + limit = { + OR = { + var:liege_parade_enjoyment >= 0 + scope:visiting_liege = { NOT = { has_character_flag = parade_liege_dissatisfaction_flag } } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_military_parade_best_modifier + years = 5 + } + } + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_military_parade_modifier + years = 5 + } + } + dynasty ?= { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + negative_opinion_after_parade_effect = yes + } + } + else_if = { + limit = { + var:parade_type = flag:civil_parade + } + if = { + limit = { + var:liege_parade_enjoyment >= 3 + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_civil_parade_best_modifier + years = 5 + } + } + add_prestige = minor_prestige_gain + if = { + limit = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + negative_opinion_after_parade_effect = yes + } + else = { + positive_opinion_after_parade_effect = yes + } + } + else_if = { + limit = { + OR = { + var:liege_parade_enjoyment >= 0 + scope:visiting_liege = { NOT = { has_character_flag = parade_liege_dissatisfaction_flag } } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_civil_parade_best_modifier + years = 5 + } + } + add_prestige = minor_prestige_gain + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_civil_parade_modifier + years = 5 + } + } + add_prestige = miniscule_prestige_gain + negative_opinion_after_parade_effect = yes + } + } + else_if = { + limit = { + var:parade_type = flag:religious_parade + } + if = { + limit = { + var:liege_parade_enjoyment >= 3 + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_religious_parade_best_modifier + years = 5 + } + } + add_piety = minor_piety_gain + if = { + limit = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + negative_opinion_after_parade_effect = yes + } + else = { + positive_opinion_after_parade_effect = yes + } + } + else_if = { + limit = { + OR = { + var:liege_parade_enjoyment >= 0 + scope:visiting_liege = { NOT = { has_character_flag = parade_liege_dissatisfaction_flag } } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_religious_parade_best_modifier + years = 5 + } + } + add_piety = minor_piety_gain + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_religious_parade_modifier + years = 5 + } + } + add_piety = miniscule_piety_gain + negative_opinion_after_parade_effect = yes + } + } +} + +scripted_effect clear_parade_variables_effect = { #clear all variables and flags + remove_variable = parade_type + remove_variable = parade_quality + remove_variable = liege_parade_type + remove_variable = liege_parade_enjoyment + if = { + limit = { + scope:visiting_liege = { + has_character_flag = parade_liege_dissatisfaction_flag + } + } + scope:visiting_liege = { + remove_character_flag = parade_liege_dissatisfaction_flag + } + } +} + +cultural_festival.4200 = { #Vassal: Do a parade, pick a type + type = activity_event + title = cultural_festival.4200.t + desc = cultural_festival.4200.desc + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + cooldown = { years = 5 } + + trigger = { + scope:visiting_liege = { + NOT = { has_character_flag = had_cultural_parade } + } + any_courtier = { + is_available_ai_adult = yes + } + } + + immediate = { + set_variable = { #used later to determine outcomes, descriptions and ai chance + name = liege_parade_enjoyment + value = 0 + } + random_list = { #decide which parade the liege likes by setting a var, used later to determine outcomes, descriptions and ai chance + 1 = { + modifier = { + add = 10 + scope:visiting_liege = { OR = { highest_skill = martial highest_skill = intrigue } } + } + modifier = { + add = 10 + scope:visiting_liege = { OR = { has_lifestyle = martial_lifestyle has_lifestyle = intrigue_lifestyle } } + } + set_variable = { + name = liege_parade_type + value = flag:military_parade + } + } + 1 = { + modifier = { + add = 10 + scope:visiting_liege = { OR = { highest_skill = diplomacy highest_skill = stewardship } } + } + modifier = { + add = 10 + scope:visiting_liege = { OR = { has_lifestyle = diplomacy_lifestyle has_lifestyle = stewardship_lifestyle } } + } + modifier = { + add = 10 + scope:visiting_liege.culture != location.county.culture + } + set_variable = { + name = liege_parade_type + value = flag:civil_parade + } + } + 1 = { + modifier = { + add = 10 + scope:visiting_liege = { highest_skill = learning } + } + modifier = { + add = 10 + scope:visiting_liege = { has_lifestyle = learning_lifestyle } + } + modifier = { + add = 10 + scope:visiting_liege.faith != location.county.faith + } + modifier = { + add = 10 + scope:visiting_liege = { has_trait = zealous } + } + set_variable = { + name = liege_parade_type + value = flag:religious_parade + } + } + } + scope:visiting_liege = { #makes sure that event does not trigger for liege with multiple vassals during the same tour + add_character_flag = { + flag = had_cultural_parade + days = 3650 + } + } + } + + option = { #pick military parade, set liege enjoyment according to parade type they like + name = cultural_festival.4200.a + if = { + limit = { var:liege_parade_type = flag:military_parade } + custom_tooltip = cultural_festival.4200.tt.liege_likes + change_variable = { + name = liege_parade_enjoyment + add = 2 + } + } + else_if = { + limit = { var:liege_parade_type = flag:religious_parade } + custom_tooltip = cultural_festival.4200.tt.liege_indifferent + } + else_if = { + limit = { var:liege_parade_type = flag:civil_parade } + custom_tooltip = cultural_festival.4200.tt.liege_dislikes + change_variable = { + name = liege_parade_enjoyment + add = -2 + } + } + set_variable = { + name = parade_type + value = flag:military_parade + } + stress_impact = { + base = minor_stress_impact_loss + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + var:liege_parade_type = flag:military_parade + } + } + } + + option = { #pick civil parade, set liege enjoyment according to parade type they like + name = cultural_festival.4200.b + if = { + limit = { var:liege_parade_type = flag:civil_parade } + custom_tooltip = cultural_festival.4200.tt.liege_likes + change_variable = { + name = liege_parade_enjoyment + add = 2 + } + } + else_if = { + limit = { var:liege_parade_type = flag:military_parade } + custom_tooltip = cultural_festival.4200.tt.liege_indifferent + } + else_if = { + limit = { var:liege_parade_type = flag:religious_parade } + custom_tooltip = cultural_festival.4200.tt.liege_dislikes + change_variable = { + name = liege_parade_enjoyment + add = -2 + } + } + set_variable = { + name = parade_type + value = flag:civil_parade + } + stress_impact = { + base = minor_stress_impact_loss + just = minor_stress_impact_loss + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + var:liege_parade_type = flag:civil_parade + } + } + } + + option = { #pick religious parade, set liege enjoyment according to parade type they like + name = cultural_festival.4200.c + if = { + limit = { var:liege_parade_type = flag:religious_parade } + custom_tooltip = cultural_festival.4200.tt.liege_likes + change_variable = { + name = liege_parade_enjoyment + add = 2 + } + } + else_if = { + limit = { var:liege_parade_type = flag:civil_parade } + custom_tooltip = cultural_festival.4200.tt.liege_indifferent + } + else_if = { + limit = { var:liege_parade_type = flag:military_parade } + custom_tooltip = cultural_festival.4200.tt.liege_dislikes + change_variable = { + name = liege_parade_enjoyment + add = -2 + } + } + set_variable = { + name = parade_type + value = flag:religious_parade + } + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + var:liege_parade_type = flag:religious_parade + } + } + } + after = { + trigger_event = cultural_festival.4201 + } +} + +cultural_festival.4201 = { #Vassal: Choose the quality of the parade + type = activity_event + title = cultural_festival.4201.t + desc = { + first_valid = { + triggered_desc = { + trigger = { var:parade_type = flag:military_parade } + desc = cultural_festival.4201.desc_military + } + triggered_desc = { + trigger = { var:parade_type = flag:civil_parade } + desc = cultural_festival.4201.desc_civil + } + triggered_desc = { + trigger = { var:parade_type = flag:religious_parade } + desc = cultural_festival.4201.desc_religious + } + } + desc = cultural_festival.4201.desc_end + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:coordinator_scope + animation = thinking + } + + immediate = { + if = { #set proper councillor as the parade coordinator + limit = { + var:parade_type = flag:military_parade + exists = cp:councillor_marshal + } + cp:councillor_marshal = { + save_scope_as = coordinator_scope + } + } + else_if = { + limit = { + var:parade_type = flag:civil_parade + exists = cp:councillor_steward + } + cp:councillor_steward = { + save_scope_as = coordinator_scope + } + } + else_if = { + limit = { + var:parade_type = flag:religious_parade + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = coordinator_scope + } + } + else = { + random_courtier = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = coordinator_scope + } + } + set_variable = { #used later to determine outcomes and descriptions + name = parade_quality + value = 0 + } + } + + option = { #make the best parade possible + name = { + trigger = { var:parade_type = flag:military_parade } + text = cultural_festival.4201.a.military + } + name = { + trigger = { var:parade_type = flag:civil_parade } + text = cultural_festival.4201.a.civil + } + name = { + trigger = { var:parade_type = flag:religious_parade } + text = cultural_festival.4201.a.religious + } + save_temporary_scope_value_as = { #value needed to set proper custom tooltip hinting how it will affect your liege + name = liege_parade_enjoyment_value + value = { value = var:liege_parade_enjoyment add = 3 } + } + liege_parade_enjoyment_custom_tt_effect = yes + remove_treasury_or_gold = major_treasury_or_gold_value + change_variable = { + name = parade_quality + add = 3 + } + change_variable = { + name = liege_parade_enjoyment + add = var:parade_quality + } + stress_impact = { + arrogant = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + humble = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = gluttonous + } + } + modifier = { + add = 10 + AND = { + has_trait = zealous + var:parade_type = flag:religious_parade + } + } + modifier = { + factor = 0 + short_term_treasury_or_gold < major_treasury_or_gold_value + } + } + } + + option = { #make an ok parade + name = cultural_festival.4201.b + save_temporary_scope_value_as = { #value needed to set proper custom tooltip hinting how it will affect your liege + name = liege_parade_enjoyment_value + value = { value = var:liege_parade_enjoyment add = 2 } + } + liege_parade_enjoyment_custom_tt_effect = yes + remove_treasury_or_gold = minor_treasury_or_gold_value + change_variable = { + name = parade_quality + add = 2 + } + change_variable = { + name = liege_parade_enjoyment + add = var:parade_quality + } + stress_impact = { + temperate = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = temperate + } + modifier = { + factor = 0 + short_term_treasury_or_gold < minor_treasury_or_gold_value + } + } + } + + option = { #make a poor parade + name = cultural_festival.4201.c + save_temporary_scope_value_as = { #value needed to set proper custom tooltip hinting how it will affect your liege + name = liege_parade_enjoyment_value + value = { value = var:liege_parade_enjoyment add = -1 } + } + liege_parade_enjoyment_custom_tt_effect = yes + add_prestige = miniscule_prestige_loss + change_variable = { + name = parade_quality + add = -1 + } + change_variable = { + name = liege_parade_enjoyment + add = var:parade_quality + } + stress_impact = { + base = minor_stress_impact_loss + greedy = minor_stress_impact_loss + cynical = minor_stress_impact_loss + humble = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = greedy + has_trait = cynical + has_trait = humble + } + } + modifier = { + add = 10 + AND = { + has_trait = cynical + var:parade_type = flag:religious_parade + } + } + } + } + + after = { + scope:visiting_liege = { + trigger_event = { + id = cultural_festival.4202 + days = 1 + } + } + } +} + +cultural_festival.4202 = { #Liege: Attend the parade and like it or not + type = activity_event + title = cultural_festival.4202.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:military_parade + scope:stop_host_scope.var:parade_quality > 2 + } + desc = cultural_festival.4202.desc_military_best + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:military_parade + scope:stop_host_scope.var:parade_quality >= 0 + } + desc = cultural_festival.4202.desc_military_good + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:military_parade + scope:stop_host_scope.var:parade_quality < 0 + } + desc = cultural_festival.4202.desc_military_worst + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:civil_parade + scope:stop_host_scope.var:parade_quality > 2 + } + desc = cultural_festival.4202.desc_civil_best + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:civil_parade + scope:stop_host_scope.var:parade_quality >= 0 + } + desc = cultural_festival.4202.desc_civil_good + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:civil_parade + scope:stop_host_scope.var:parade_quality < 0 + } + desc = cultural_festival.4202.desc_civil_worst + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.var:parade_quality > 2 + } + desc = cultural_festival.4202.desc_religious_best + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.var:parade_quality >= 0 + } + desc = cultural_festival.4202.desc_religious_good + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.var:parade_quality < 0 + } + desc = cultural_festival.4202.desc_religious_worst + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.faith != scope:visiting_liege.faith + scope:stop_host_scope.var:parade_quality >= 0 + } + desc = cultural_festival.4202.desc_religious_different_faith_good + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.faith = scope:visiting_liege.faith + scope:stop_host_scope.var:parade_quality >= 0 + } + desc = cultural_festival.4202.desc_religious_same_faith_good + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.faith != scope:visiting_liege.faith + scope:stop_host_scope.var:parade_quality < 0 + } + desc = cultural_festival.4202.desc_religious_different_faith_bad + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.faith = scope:visiting_liege.faith + scope:stop_host_scope.var:parade_quality < 0 + } + desc = cultural_festival.4202.desc_religious_same_faith_bad + } + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:coordinator_scope + animation = happiness + } + + option = { #you enjoy the parade, for ai liege_parade_enjoyment var decides + name = { + trigger = { has_activity_intent = reduce_stress_intent } + text = cultural_festival.4202.a.revelry + } + name = cultural_festival.4202.a + parade_liege_enjoyment_effect = yes + if = { + limit = { has_activity_intent = reduce_stress_intent } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + base = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 100 + scope:stop_host_scope.var:liege_parade_enjoyment >= 0 + } + } + } + + option = { #you don't enjoy the parade, for ai liege_parade_enjoyment var decides + name = cultural_festival.4202.b + parade_liege_dissatisfaction_effect = yes + stress_impact = { + base = minor_stress_impact_loss + callous = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 100 + scope:stop_host_scope.var:liege_parade_enjoyment < 0 + } + modifier = { + factor = 0 + has_activity_intent = reduce_stress_intent + } + } + } + + after = { + scope:stop_host_scope = { + trigger_event = { id = cultural_festival.4203 days = 1 } + } + } +} + +cultural_festival.4203 = { #Vassal: Summary of the parade + type = activity_event + title = cultural_festival.4203.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + desc = cultural_festival.4203.desc_failure + } + desc = cultural_festival.4203.desc_success + } + } + + theme = cultural_festival + + left_portrait = { + character = root + triggered_animation = { + trigger = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + animation = anger + } + animation = happiness + } + + right_portrait = { + character = scope:visiting_liege + triggered_animation = { + trigger = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + animation = disapproval + } + animation = admiration + } + + immediate = { #display what was the liege reaction to the parade, based on option chosen in previous event + if = { + limit = { + scope:visiting_liege = { + has_character_flag = parade_liege_dissatisfaction_flag + } + } + show_as_tooltip = { + parade_liege_dissatisfaction_effect = yes + } + } + else = { + show_as_tooltip = { + parade_liege_enjoyment_effect = yes + } + } + } + + option = { #effect is determined by previous actions, mainly liege_parade_enjoyment or overide by player + name = { + trigger = { scope:visiting_liege = { NOT = { has_character_flag = parade_liege_dissatisfaction_flag } } } + text = cultural_festival.4203.a.success + } + name = { + trigger = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + text = cultural_festival.4203.a.failure + } + parade_end_effect = yes + if = { + limit = { scope:visiting_liege = { NOT = { has_character_flag = parade_liege_dissatisfaction_flag } } } + stress_impact = { + base = major_stress_impact_loss + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + } + } + } + + after = { + clear_parade_variables_effect = yes + } +} + +###################### +## Bilateral: Vassal and Liege exchange gifts; later they can decide to check up on them +## 4300-4312 +## by Arkadiusz Majewski +###################### + +scripted_effect create_cultural_artifact_effect = { #create a random artifact to possibly give as a gift + random_list = { + 10 = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:no + } + } + 10 = { + create_artifact_armor_effect = { + OWNER = root + CREATOR = root + SET_ARMOR_TYPE = flag:no + } + } + 10 = { + create_artifact_regalia_effect = { + OWNER = root + SMITH = root + } + } + 10 = { + create_artifact_crown_effect = { + OWNER = root + SMITH = root + } + } + 10 = { + create_artifact_brooch_effect = { + OWNER = root + SMITH = root + } + } + 10 = { + create_artifact_book_effect = { + OWNER = root + CREATOR = root + SET_SUBJECT = flag:no + SET_TOPIC = flag:no + } + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_cultural_gift_desc + } +} + +scripted_effect choose_gift_effect = { #used only in tooltip to show the gift receiver what happened + if = { + limit = { exists = $CHOSEN_GIFT$ } + if = { + limit = { $CHOSEN_GIFT$ = flag:gift_existing_artifact } + scope:existing_artifact = { + set_owner = root + } + } + else_if = { + limit = { $CHOSEN_GIFT$ = flag:gift_newly_created_artifact } + scope:newly_created_artifact = { + set_owner = root + } + } + else_if = { + limit = { $CHOSEN_GIFT$ = flag:gift_gold } + $GIFT_GIVER$ = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + } + } +} + +scripted_effect create_giving_gift_memory_effect = { #create a memory of giving a gift + create_character_memory = { + type = gave_cultural_gift_memory + participants = { + gift_receiver = $GIFT_RECEIVER$ + } + } + if = { + limit = { exists = scope:new_memory } + scope:new_memory = { + set_variable = { + name = gift_type + value = scope:gifted_artifact + } + if = { + limit = { exists = var:gift_type } + #To prevent 'unused except in loc' errors + } + } + } +} + +scripted_effect give_artifact_gift_opinion_effect = { + if = { + limit = { root = scope:visiting_liege } + scope:visiting_liege = { + add_opinion = { + target = scope:stop_host_scope + modifier = gift_artifact_opinion + opinion = 30 + } + } + } + else = { + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = gift_artifact_opinion + opinion = 30 + } + } + } +} + +scripted_effect give_gold_gift_opinion_effect = { + if = { + limit = { root = scope:visiting_liege } + scope:visiting_liege = { + add_opinion = { + target = scope:stop_host_scope + modifier = gift_opinion + opinion = 15 + } + } + } + else = { + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = gift_opinion + opinion = 15 + } + } + } +} + +scripted_trigger vassal_gift_giving_memory_trigger = { #check if vassal remembers giving liege a gift + has_memory_type = gave_cultural_gift_memory + any_memory_participant = { + this = scope:visiting_liege + } +} + +scripted_effect equip_gifted_artifact_effect = { #equip the gift if possible + if = { + limit = { can_equip_artifact = scope:gifted_artifact } + custom_tooltip = cultural_festival.4301.a.tt + scope:gifted_artifact = { + equip_artifact_to_owner_replace = yes + } + } +} + +scripted_effect delete_new_artifact_effect = { #destroy newly created artifact if it wasn't picked as a gift + destroy_artifact = scope:newly_created_artifact +} + +cultural_festival.4300 = { #Vassal: Decide which gift to give + type = activity_event + title = cultural_festival.4300.t + desc = { + desc = cultural_festival.4300.desc + triggered_desc = { + trigger = { exists = scope:existing_artifact } + desc = cultural_festival.4300.desc_existing_artifact + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:visiting_liege + animation = boredom + } + + artifact = { + trigger = { exists = scope:existing_artifact } + target = scope:existing_artifact + position = lower_left_portrait + } + + artifact = { + trigger = { exists = scope:newly_created_artifact } + target = scope:newly_created_artifact + position = lower_center_portrait + } + + cooldown = { years = 5 } + + trigger = { #check if you have a memory of giving your liege a gift + root = { + NOT = { + any_memory = { + vassal_gift_giving_memory_trigger = yes + } + } + } + } + + immediate = { + if = { #look for any insignificant artifact you have and save it as something to gift + limit = { + has_any_artifact = yes + any_character_artifact = { + category = inventory + } + } + random_character_artifact = { + limit = { + category = inventory + NOT = { has_variable = historical_unique_artifact } + } + save_scope_as = existing_artifact + } + } + hidden_effect = { #create new artifact and save it as something to gift + create_cultural_artifact_effect = yes + } + add_character_flag = { #to make sure to not trigger 4310 in the same tour you gave the gift + flag = gave_gift_recently_flag + days = 1825 + } + } + + option = { #gift an already nonsignificant existing artifact from root inventory + trigger = { + exists = scope:existing_artifact + } + name = cultural_festival.4300.a + scope:existing_artifact = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_variable = { + name = gifted_artifact + value = yes + days = 1825 + } + set_owner = { + target = scope:visiting_liege + history = { + location = scope:stop_host_scope.location + actor = scope:stop_host_scope + recipient = scope:visiting_liege + type = given + } + } + save_scope_as = gifted_artifact + } + save_scope_value_as = { #used later to determine outcomes and description + name = vassal_chosen_gift + value = flag:gift_existing_artifact + } + create_giving_gift_memory_effect = { GIFT_RECEIVER = scope:visiting_liege } #remember that you gave a gift to liege, used later to trigger a follow up event + show_as_tooltip = { + give_artifact_gift_opinion_effect = yes + } + hidden_effect = { #delete the newly created artifact, because it wasn't gifted away + delete_new_artifact_effect = yes + } + scope:visiting_liege = { + trigger_event = cultural_festival.4301 + } + custom_tooltip = cultural_festival.4300.tt + stress_impact = { + compassionate = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { #gift the newly created artifact + name = cultural_festival.4300.b + remove_short_term_gold = minor_gold_value + scope:newly_created_artifact = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_variable = { + name = gifted_artifact + value = yes + days = 1825 + } + set_owner = { + target = scope:visiting_liege + history = { + location = scope:visiting_liege.location + actor = scope:stop_host_scope + recipient = scope:visiting_liege + type = given + } + } + save_scope_as = gifted_artifact + } + save_scope_value_as = { #used later to determine outcomes and description + name = vassal_chosen_gift + value = flag:gift_newly_created_artifact + } + create_giving_gift_memory_effect = { GIFT_RECEIVER = scope:visiting_liege } #remember that you gave a gift to liege, used later to trigger a follow up event + show_as_tooltip = { + give_artifact_gift_opinion_effect = yes + } + scope:visiting_liege = { + trigger_event = cultural_festival.4301 + } + custom_tooltip = cultural_festival.4300.tt + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 5 + modifier = { + factor = 0 + has_trait = greedy + short_term_gold < minor_gold_value + } + } + } + + option = { #gift just gold + name = cultural_festival.4300.c + pay_short_term_gold = { + target = scope:visiting_liege + gold = minor_gold_value + } + save_scope_value_as = { #used later to determine outcomes and description + name = vassal_chosen_gift + value = flag:gift_gold + } + show_as_tooltip = { + give_gold_gift_opinion_effect = yes + } + hidden_effect = { #delete the newly created artifact, because it wasn't gifted away + delete_new_artifact_effect = yes + } + scope:visiting_liege = { + trigger_event = cultural_festival.4301 + } + custom_tooltip = cultural_festival.4300.tt + stress_impact = { + cynical = minor_stress_impact_loss + generous = major_stress_impact_loss + greedy = major_stress_impact_gain + } + ai_chance = { #this should be the least likely option when player is the gift receiver to ensure the follow up event triggering for them + base = 1 + modifier = { + factor = 0 + has_trait = greedy + short_term_gold < minor_gold_value + } + } + } + + option = { #no, i don't think I will + name = cultural_festival.4300.d + hidden_effect = { + delete_new_artifact_effect = yes + } + stress_impact = { + cynical = major_stress_impact_loss + generous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = cynical + } + } + } +} + +cultural_festival.4301 = { #Liege: Get the gift from vassal and decide to keep it or destroy it + type = activity_event + title = cultural_festival.4301.t + desc = { + desc = cultural_festival.4301.desc + first_valid = { + triggered_desc = { + trigger = { scope:vassal_chosen_gift = flag:gift_gold } + desc = cultural_festival.4301.desc_gold + } + desc = cultural_festival.4301.desc_artifact + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:stop_host_scope + animation = happiness + } + + artifact = { + trigger = { exists = scope:gifted_artifact } + target = scope:gifted_artifact + position = lower_center_portrait + } + + immediate = { #display root what was the gift + show_as_tooltip = { + choose_gift_effect = { + CHOSEN_GIFT = scope:vassal_chosen_gift + GIFT_GIVER = scope:stop_host_scope + } + } + give_artifact_gift_opinion_effect = yes + } + + option = { #keep it, equip it if possible + name = cultural_festival.4301.a + trigger = { NOT = { scope:vassal_chosen_gift = flag:gift_gold } } + equip_gifted_artifact_effect = yes + scope:gifted_artifact = { + set_variable = { + name = received_as_cultural_gift + value = scope:vassal_chosen_gift + } + } + stress_impact = { + trusting = minor_stress_impact_loss + humble = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = honest + has_trait = just + } + } + modifier = { + add = 100 + OR = { + has_relation_friend = scope:stop_host_scope + has_relation_best_friend = scope:stop_host_scope + has_relation_lover = scope:stop_host_scope + has_relation_soulmate = scope:stop_host_scope + } + } + } + } + + option = { #get rid of the gift, quietly + name = cultural_festival.4301.b + trigger = { NOT = { scope:vassal_chosen_gift = flag:gift_gold } } + destroy_artifact = scope:gifted_artifact + add_gold = minor_gold_value + stress_impact = { + trusting = minor_stress_impact_gain + humble = minor_stress_impact_gain + paranoid = major_stress_impact_loss + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 50 + has_trait = paranoid + } + modifier = { + add = 10 + OR = { + has_trait = deceitful + has_trait = cynical + } + } + modifier = { + add = 100 + OR = { + has_relation_rival = scope:stop_host_scope + has_relation_nemesis = scope:stop_host_scope + } + } + } + } + + option = { #yay, you got gold! + name = cultural_festival.4301.c + trigger = { scope:vassal_chosen_gift = flag:gift_gold } + give_gold_gift_opinion_effect = yes + stress_impact = { + greedy = major_stress_impact_loss + paranoid = minor_stress_impact_loss + } + ai_chance = { #actually, doesn't matter as it is the only option if you got gifted gold + base = 1 + } + } + + after = { + trigger_event = cultural_festival.4302 + custom_tooltip = cultural_festival.4301.tt + } +} + +cultural_festival.4302 = { #Liege: Pick the gift for Vassal, mirror of cultural_festival.4300 + type = activity_event + title = cultural_festival.4302.t + desc = { + desc = cultural_festival.4302.desc + triggered_desc = { + trigger = { exists = scope:existing_artifact } + desc = cultural_festival.4302.desc_existing_artifact + } + first_valid = { + triggered_desc = { + trigger = { scope:vassal_chosen_gift = flag:gift_gold } + desc = cultural_festival.4302.desc_gifted_gold + } + desc = cultural_festival.4302.desc_gold + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:stop_host_scope + animation = happiness + } + + artifact = { + trigger = { exists = scope:existing_artifact } + target = scope:existing_artifact + position = lower_left_portrait + } + + artifact = { + trigger = { exists = scope:newly_created_artifact } + target = scope:newly_created_artifact + position = lower_center_portrait + } + + immediate = { + if = { + limit = { + root = { + has_any_artifact = yes + any_character_artifact = { + category = inventory + NOT = { has_variable = historical_unique_artifact } + NOT = { has_variable = received_as_cultural_gift } #make sure you don't give back the thing you just got + } + } + } + random_character_artifact = { + limit = { + category = inventory + artifact_owner = root + NOT = { has_variable = historical_unique_artifact } + NOT = { has_variable = received_as_cultural_gift } + } + save_scope_as = existing_artifact + } + } + hidden_effect = { + create_cultural_artifact_effect = yes + } + add_character_flag = { #to make sure to not trigger 4310 in the same tour you gave the gift + flag = gave_gift_recently_flag + days = 720 + } + } + + option = { #gift an already existing nonsignificant artifact from root inventory + trigger = { + exists = scope:existing_artifact + } + name = cultural_festival.4302.a + scope:existing_artifact = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_variable = { + name = gifted_artifact + value = yes + days = 1825 + } + set_owner = { + target = scope:stop_host_scope + history = { + location = scope:stop_host_scope.location + actor = scope:visiting_liege + recipient = scope:stop_host_scope + type = given + } + } + save_scope_as = gifted_artifact + } + save_scope_value_as = { + name = liege_chosen_gift + value = flag:gift_existing_artifact + } + create_giving_gift_memory_effect = { GIFT_RECEIVER = scope:stop_host_scope } + show_as_tooltip = { + give_artifact_gift_opinion_effect = yes + } + hidden_effect = { + delete_new_artifact_effect = yes + } + scope:stop_host_scope = { + trigger_event = cultural_festival.4303 + } + stress_impact = { + compassionate = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { #gift the newly created artifact + name = cultural_festival.4302.b + remove_short_term_gold = minor_gold_value + scope:newly_created_artifact = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_variable = { + name = gifted_artifact + value = yes + days = 1825 + } + set_owner = { + target = scope:stop_host_scope + history = { + location = scope:stop_host_scope.location + actor = scope:visiting_liege + recipient = scope:stop_host_scope + type = given + } + } + save_scope_as = gifted_artifact + } + save_scope_value_as = { + name = liege_chosen_gift + value = flag:gift_newly_created_artifact + } + create_giving_gift_memory_effect = { GIFT_RECEIVER = scope:stop_host_scope } + show_as_tooltip = { + give_artifact_gift_opinion_effect = yes + } + scope:stop_host_scope = { + trigger_event = cultural_festival.4303 + } + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 5 + modifier = { + factor = 0 + has_trait = greedy + short_term_gold < minor_gold_value + } + } + } + + option = { #gift just gold + name = cultural_festival.4302.c + pay_short_term_gold = { + target = scope:stop_host_scope + gold = minor_gold_value + } + save_scope_value_as = { + name = liege_chosen_gift + value = flag:gift_gold + } + show_as_tooltip = { + give_gold_gift_opinion_effect = yes + } + hidden_effect = { + delete_new_artifact_effect = yes + } + scope:stop_host_scope = { + trigger_event = cultural_festival.4303 + } + stress_impact = { + cynical = minor_stress_impact_loss + generous = major_stress_impact_loss + greedy = major_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + factor = 0 + has_trait = greedy + short_term_gold < minor_gold_value + } + } + } + + option = { #no, I don't think I will + name = cultural_festival.4302.d + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.4302.d + left_icon = scope:visiting_liege + add_opinion = { + target = scope:visiting_liege + modifier = rude_opinion + } + } + } + hidden_effect = { + delete_new_artifact_effect = yes + } + stress_impact = { + cynical = major_stress_impact_loss + generous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = cynical + } + } + } +} + +cultural_festival.4303 = { #Vassal: Get the gift from liege, mirror of cultural_festival.4301 + type = activity_event + title = cultural_festival.4303.t + desc = { + desc = cultural_festival.4303.desc + first_valid = { + triggered_desc = { + trigger = { scope:liege_chosen_gift = flag:gift_gold } + desc = cultural_festival.4303.desc_gold + } + desc = cultural_festival.4303.desc_artifact + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:visiting_liege + animation = happiness + } + + artifact = { + trigger = { exists = scope:gifted_artifact } + target = scope:gifted_artifact + position = lower_center_portrait + } + + immediate = { + show_as_tooltip = { + choose_gift_effect = { + CHOSEN_GIFT = scope:liege_chosen_gift + GIFT_GIVER = scope:visiting_liege + } + } + give_artifact_gift_opinion_effect = yes + } + + option = { + name = cultural_festival.4303.a + trigger = { NOT = { scope:liege_chosen_gift = flag:gift_gold } } + equip_gifted_artifact_effect = yes + set_variable = { + name = received_as_cultural_gift + value = scope:liege_chosen_gift + } + stress_impact = { + trusting = minor_stress_impact_loss + humble = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = honest + has_trait = just + } + } + modifier = { + add = 100 + OR = { + has_relation_friend = scope:stop_host_scope + has_relation_best_friend = scope:stop_host_scope + has_relation_lover = scope:stop_host_scope + has_relation_soulmate = scope:stop_host_scope + } + } + } + } + + option = { + name = cultural_festival.4303.b + trigger = { NOT = { scope:liege_chosen_gift = flag:gift_gold } } + destroy_artifact = scope:gifted_artifact + add_gold = minor_gold_value + stress_impact = { + trusting = minor_stress_impact_gain + humble = minor_stress_impact_gain + paranoid = major_stress_impact_loss + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 50 + has_trait = paranoid + } + modifier = { + add = 10 + OR = { + has_trait = deceitful + has_trait = cynical + } + } + modifier = { + add = 100 + OR = { + has_relation_rival = scope:stop_host_scope + has_relation_nemesis = scope:stop_host_scope + } + } + } + } + + option = { + name = cultural_festival.4303.c + trigger = { scope:liege_chosen_gift = flag:gift_gold } + give_gold_gift_opinion_effect = yes + stress_impact = { + greedy = major_stress_impact_loss + paranoid = minor_stress_impact_loss + } + ai_chance = { + base = 1 + } + } +} + +scripted_trigger liege_gift_giving_memory_trigger = { #check if liege remembers giving vassal a gift + has_memory_type = gave_cultural_gift_memory + any_memory_participant = { + this = scope:stop_host_scope + } +} + +scripted_effect displayed_proper_gift_effect = { #progress towards friend and gain of cultural acceptance if possible + scope:gift_receiver = { + send_interface_toast = { + title = cultural_festival.4311.proper_gift_taost + left_icon = scope:gift_receiver + right_icon = scope:giving_gift_memory_owner + scope:giving_gift_memory_owner = { + progress_towards_friend_effect = { + CHARACTER = scope:gift_receiver + OPINION = 30 + REASON = friend_respected_foreign_culture + } + } + scope:visiting_liege = { + increase_tour_success_effect = { POINTS = 1 } + } + if = { + limit = { scope:gift_receiver.culture != scope:giving_gift_memory_owner.culture } + scope:gift_receiver.culture = { + change_cultural_acceptance = { + target = scope:giving_gift_memory_owner.culture + value = major_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + } + } + } +} + +scripted_effect displayed_no_gift_effect = { #progress towards rivalry and loss of cultural acceptance if possible + scope:gift_receiver = { + send_interface_toast = { + title = cultural_festival.4311.no_gift_toast + left_icon = scope:gift_receiver + right_icon = scope:giving_gift_memory_owner + scope:giving_gift_memory_owner = { + progress_towards_rival_effect = { + CHARACTER = scope:gift_receiver + OPINION = -30 + REASON = rival_abused_subjects_hospitality + } + } + if = { + limit = { scope:gift_receiver.culture != scope:giving_gift_memory_owner.culture } + scope:gift_receiver.culture = { + change_cultural_acceptance = { + target = scope:giving_gift_memory_owner.culture + value = major_cultural_acceptance_loss + desc = cultural_acceptance_embraced_festival + } + } + } + } + } +} + +scripted_effect set_var_gift_liege_response_effect = { #sets proper flag for var:gift_liege_response + set_variable = { + name = gift_liege_response + value = $FLAG$ + } +} + +scripted_effect liege_failed_hook_effect = { #add hook, loyalty trait or prestige if possible + scope:gift_receiver = { + send_interface_toast = { + title = cultural_festival.4311.liege_failed_toast + left_icon = scope:gift_receiver + right_icon = scope:giving_gift_memory_owner + if = { + limit = { + scope:giving_gift_memory_owner = { + can_add_hook = { + target = scope:gift_receiver + type = loyalty_hook + } + } + } + scope:giving_gift_memory_owner = { + add_hook = { + target = scope:gift_receiver + type = loyalty_hook + } + add_prestige = miniscule_prestige_gain + } + } + else = { + if = { + limit = { scope:stop_host_scope = { NOT = { has_trait = loyal } } } + scope:stop_host_scope = { + add_trait = loyal + } + } + add_prestige = medium_prestige_gain + } + scope:visiting_liege = { + if = { + limit = { + involved_activity ?= { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } +} + +cultural_festival.4310 = { #Decide if you want to ask to see the gifts + type = activity_event + title = cultural_festival.4310.t + desc = cultural_festival.4310.desc + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:gift_receiver + animation = boredom + } + + cooldown = { years = 5 } + + trigger = { + OR = { + AND = { + root = scope:visiting_liege + any_memory = { + liege_gift_giving_memory_trigger = yes + } + NOT = { has_character_flag = gave_gift_recently_flag } #to make sure to not trigger in the same tour you gave the gift + } + AND = { + root = scope:stop_host_scope + any_memory = { + vassal_gift_giving_memory_trigger = yes + } + NOT = { has_character_flag = gave_gift_recently_flag } #to make sure to not trigger in the same tour you gave the gift + } + } + } + + immediate = { + random_memory = { + limit = { + OR = { + AND = { + root = scope:visiting_liege + liege_gift_giving_memory_trigger = yes + } + AND = { + root = scope:stop_host_scope + vassal_gift_giving_memory_trigger = yes + } + } + } + save_scope_as = giving_gift_memory + } + scope:giving_gift_memory.memory_participant:gift_receiver = { save_scope_as = gift_receiver } + if = { + limit = { exists = scope:giving_gift_memory.var:gift_type } + scope:giving_gift_memory.var:gift_type = { save_scope_as = gifted_artifact } + } + save_scope_as = giving_gift_memory_owner + } + + option = { #Where is my gift? Is it safe, is it all right? + name = cultural_festival.4310.a + custom_tooltip = cultural_festival.4310.a.tt + scope:gift_receiver = { + trigger_event = { + id = cultural_festival.4311 + days = 1 + } + } + stress_impact = { + arrogant = major_stress_impact_loss + paranoid = minor_stress_impact_loss + content = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + } + } + + option = { #Don't ask about it + name = cultural_festival.4310.b + add_piety = miniscule_piety_gain + stress_impact = { + arrogant = major_stress_impact_gain + paranoid = minor_stress_impact_gain + content = minor_stress_impact_loss + shy = minor_stress_impact_loss + } + ai_chance = { #set to 0, because it guarantees trigger of the next event for player + base = 0 + } + } +} + +cultural_festival.4311 = { #Respond to gift accordingly, if you still have the gifts or not + type = activity_event + title = cultural_festival.4311.t + desc = { + desc = cultural_festival.4311.desc + triggered_desc = { + trigger = { NOT = { exists = scope:old_gift } } + desc = cultural_festival.4311.desc.lost_gift + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:old_gift } + desc = cultural_festival.4311.desc.old_gift + } + triggered_desc = { + trigger = { exists = scope:decoy_gift } + desc = cultural_festival.4311.desc.decoy_gift + } + } + triggered_desc = { + trigger = { OR = { NOT = { exists = scope:decoy_gift } NOT = { exists = scope:old_gift } } } + desc = cultural_festival.4311.desc.no_gift + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:giving_gift_memory_owner + animation = happiness + } + + artifact = { + trigger = { exists = scope:old_gift } + target = scope:old_gift + position = lower_center_portrait + } + + artifact = { + trigger = { exists = scope:decoy_gift } + target = scope:decoy_gift + position = lower_right_portrait + } + + immediate = { + if = { + limit = { + has_any_artifact = yes + any_character_artifact = { has_variable = received_as_cultural_gift } + } + random_character_artifact = { + limit = { + has_variable = received_as_cultural_gift + } + save_scope_as = old_gift + } + } + else_if = { + limit = { + has_any_artifact = yes + } + random_character_artifact = { + save_scope_as = decoy_gift + } + } + } + + option = { #show the gift you got, if you still have it around + name = cultural_festival.4311.a + trigger = { exists = scope:old_gift } + show_as_tooltip = { + random_list = { + 50 = { + show_chance = no + desc = cultural_festival.4311.a.success + displayed_proper_gift_effect = yes + } + 50 = { + show_chance = no + desc = cultural_festival.4311.a.failure + liege_failed_hook_effect = yes + } + } + } + set_var_gift_liege_response_effect = { FLAG = flag:show_real_gift_flag } + stress_impact = { + deceitful = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + honest = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = honest + } + modifier = { + add = -10 + OR = { + has_trait = deceitful + has_trait = paranoid + } + } + } + } + + option = { #show a decoy gift, if you have any other artifact + name = cultural_festival.4311.b + trigger = { exists = scope:decoy_gift } + duel = { + skill = intrigue + target = scope:giving_gift_memory_owner + 50 = { #you win + desc = cultural_festival.4311.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + set_var_gift_liege_response_effect = { FLAG = flag:decoy_gift_succeeded_flag } + show_as_tooltip = { + displayed_proper_gift_effect = yes + } + } + 50 = { + desc = cultural_festival.4311.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + set_var_gift_liege_response_effect = { FLAG = flag:decoy_gift_failed_flag } + show_as_tooltip = { + displayed_no_gift_effect = yes + } + } + } + stress_impact = { + deceitful = major_stress_impact_loss + cynical = minor_stress_impact_loss + honest = major_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = deceitful + has_trait = cynical + } + } + modifier = { + add = -10 + has_trait = honest + } + } + } + + option = { #try to convince that they never gave you anything + name = cultural_festival.4311.c + trigger = { OR = { NOT = { exists = scope:decoy_gift } NOT = { exists = scope:old_gift } } } + duel = { + skill = diplomacy + target = scope:giving_gift_memory_owner + 50 = { #you win + desc = cultural_festival.4311.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + show_as_tooltip = { + displayed_proper_gift_effect = yes + } + set_var_gift_liege_response_effect = { FLAG = flag:no_gift_succeeded_flag } + } + 50 = { + desc = cultural_festival.4311.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + set_var_gift_liege_response_effect = { FLAG = flag:no_gift_failed_flag } + show_as_tooltip = { + displayed_no_gift_effect = yes + } + } + } + stress_impact = { + stubborn = minor_stress_impact_loss + deceitful = major_stress_impact_loss + cynical = minor_stress_impact_loss + honest = major_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = deceitful + has_trait = cynical + has_trait = stubborn + } + } + modifier = { + add = -10 + has_trait = honest + } + } + } + + option = { #tell them you no longer have it + name = cultural_festival.4311.d + trigger = { NOT = { exists = scope:old_gift } } + set_var_gift_liege_response_effect = { FLAG = flag:liege_lost_gift_flag } + show_as_tooltip = { + add_prestige = minor_prestige_loss + } + stress_impact = { + deceitful = minor_stress_impact_gain + honest = major_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = honest + } + modifier = { + add = -10 + has_trait = deceitful + } + } + } + + after = { + scope:giving_gift_memory_owner = { + trigger_event = cultural_festival.4312 + } + } +} + +cultural_festival.4312 = { #Vassal: Liege shows you a gift, or not + type = activity_event + title = cultural_festival.4312.t + desc = { + desc = cultural_festival.4312.desc + first_valid = { + triggered_desc = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag } + desc = cultural_festival.4312.desc.decoy_gift_succeeded + } + triggered_desc = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag } + desc = cultural_festival.4312.desc.decoy_gift_failed + } + triggered_desc = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag } + desc = cultural_festival.4312.desc.no_gift_succeeded + } + triggered_desc = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag } + desc = cultural_festival.4312.desc.no_gift_failed + } + triggered_desc = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag } + desc = cultural_festival.4312.desc.liege_lost_gift + } + desc = cultural_festival.4312.desc.show_real_gift_flag + } + } + + theme = cultural_festival + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag + } + } + animation = disbelief + } + triggered_animation = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag + } + } + animation = anger + } + triggered_animation = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag } + animation = sadness + } + animation = happiness + } + + right_portrait = { + character = scope:gift_receiver + triggered_animation = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag + } + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag + } + } + animation = worry + } + triggered_animation = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag } + animation = sadness + } + animation = happiness + } + + artifact = { + trigger = { exists = scope:old_gift } + target = scope:old_gift + position = lower_center_portrait + } + + artifact = { + trigger = { exists = scope:decoy_gift } + target = scope:decoy_gift + position = lower_right_portrait + } + + option = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:show_real_gift_flag + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag + } + } + name = { #you appreciate them holding on to your gift, display only if gift receiver shown you the real gift + trigger = { + exists = scope:old_gift + scope:gift_receiver.var:gift_liege_response = flag:show_real_gift_flag + } + text = cultural_festival.4312.a + } + name = { #you appreciate them holding on to your gift, display only if gift receiver succeed in showing you a decoy + trigger = { scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag } + text = cultural_festival.4312.a.decoy_success + } + displayed_proper_gift_effect = yes + stress_impact = { + base = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag + scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag + } + } + name = { #you call their bluff, player only, display only if gift receiver succeed in showing you a decoy + trigger = { scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag } + text = cultural_festival.4312.b.decoy_success_holup + } + name = { #you're mad that they tried to trick you, display only if gift receiver failed in showing you a decoy + trigger = { scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag } + text = cultural_festival.4312.b.decoy_fail + } + name = { #you call their bluff, player only, display only if gift receiver succeed in convincing you about not giving a gift at all + trigger = { scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag } + text = cultural_festival.4312.b.nogift_success_holup + } + name = { #you're mad that they tried to trick you, display only if gift receiver failed in convincing you about not giving a gift at all + trigger = { scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag } + text = cultural_festival.4312.b.nogift_fail + } + name = { #you call their bluff, player only, display only if gift receiver said they lost it + trigger = { scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag } + text = cultural_festival.4312.b.holup + } + displayed_no_gift_effect = yes + stress_impact = { + wrathful = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + just = minor_stress_impact_loss + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { #has to be 0 in those cases, so that the tooltips and duel checks for the Player in previous event were telling the truth + factor = 0 + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag + } + } + } + } + + option = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:show_real_gift_flag #you want something in return, display only if gift receiver shown you the real gift + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag #you play along, display only if gift receiver failed in showing you a decoy + scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag #you play along, display only if gift receiver failed in convincing you about not giving a gift at all + } + } + name = cultural_festival.4312.c + liege_failed_hook_effect = yes + stress_impact = { + callous = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + content = minor_stress_impact_gain + just = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { #has to be 0 in those cases, so that the tooltips and duel checks for the Player in previous event were telling the truth + factor = 0 + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag + } + } + } + } + + option = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag + } + } + name = { #you are told you never gave them anything, display only if gift receiver succeed in convincing you about not giving a gift at all + trigger = { scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag } + text = cultural_festival.4312.d.nogift_success + } + name = { #it's a pity, but it happens, display only if gift receiver said they lost it + trigger = { scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag } + text = cultural_festival.4312.d + } + scope:gift_receiver = { + send_interface_toast = { + title = cultural_festival.4312.d + left_icon = scope:gift_receiver + right_icon = scope:giving_gift_memory_owner + } + add_prestige = minor_prestige_loss + } + stress_impact = { + wrathful = minor_stress_impact_gain + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + content = minor_stress_impact_loss + just = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 1 + } + } + + after = { + if = { + limit = { + exists = scope:gift_receiver.var:gift_liege_response + } + scope:gift_receiver = { + remove_variable = gift_liege_response + } + } + } +} diff --git a/N3OW/events/activities/tour_activity/tour_travel_events.txt b/N3OW/events/activities/tour_activity/tour_travel_events.txt new file mode 100644 index 00000000..c9480143 --- /dev/null +++ b/N3OW/events/activities/tour_activity/tour_travel_events.txt @@ -0,0 +1,2766 @@ +# Events for the travel portion of the Tour grand activity + +namespace = tour_travel + +############################ +## Tour Travel Events +## 1000-2999 +## by James Beaumont +############################ +# tour_travel.1001 - Local peasants are talking about how much they hate the royals +# tour_travel.1002 - Pass by a particularly pretty commoner by the roadside +# tour_travel.1003 - A peasant does not show you proper ettiquette +# tour_travel.1004 - You decide to wash the feet of locals, royal touch +# tour_travel.1005 - Locals beg for your royal touch, royal touch +# tour_travel.1006 - Distribute alms in front of a local temple +# +# +############################ +## Tour Travel Events +## 3000-3999 +## by Veronica Pazos +############################ +# tour_travel.3110-3111 - Danger! Local ruler invites you to a banquet to steal from you +# tour_travel.3120 - Visit a local inn! +# tour_travel.3130 - A peasant complains they've lost their job +# tour_travel.3140 - Visit a local brothel! +# +# + + +##################################################################################### + +############################ +## Tour Travel Events +## 1000-2999 +## by James Beaumont +############################ + +# Local peasants are talking about how much they hate the royals +tour_travel.1001 = { + type = character_event + title = tour_travel.1001.title + desc = { + desc = tour_travel.1001.desc.intro + random_valid = { + triggered_desc = { + trigger = { + NOT = { knows_language_of_culture = scope:angry_county_scope.culture } + } + desc = tour_travel.1001.desc.mid.wrong_language + } + triggered_desc = { + trigger = { + culture != scope:angry_county_scope.culture + } + desc = tour_travel.1001.desc.mid.wrong_culture + } + triggered_desc = { + trigger = { + faith != scope:angry_county_scope.faith + } + desc = tour_travel.1001.desc.mid.wrong_faith + } + triggered_desc = { + trigger = { + root.primary_title = { + any_claimant = { + house != root.house + } + } + } + desc = tour_travel.1001.desc.mid.pretender + } + triggered_desc = { + trigger = { + has_active_diarchy = yes + diarchy_swing >= 50 + } + desc = tour_travel.1001.desc.mid.powerful_diarch + } + desc = tour_travel.1001.desc.mid.just_plain_dislike_em + } + first_valid = { + triggered_desc = { + trigger = { + should_be_naked_trigger = yes + } + desc = tour_travel.1001.desc.outro.nudist + } + desc = tour_travel.1001.desc.outro + } + } + + theme = travel_tour + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:angry_peasant + animation = rage + outfit_tags = { beggar_rags } + } + cooldown = { years = 2 } + trigger = { + is_location_valid_for_travel_event_on_land = yes + faith_forbids_alcohol_trigger = no # It should make sense that there is a tavern in this county + root.location.county = { county_opinion <= -5 } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + root.location.county = { + county_opinion <= -5 + NOT = { + root = { + knows_language_of_culture = prev.culture + } + } + } + } + } + + immediate = { + root.location = { + save_scope_as = angry_county_scope + save_scope_as = background_wilderness_scope # For theme + } + create_character = { + location = scope:angry_county_scope + template = drunken_peasant_character + culture = scope:angry_county_scope.culture + faith = scope:angry_county_scope.faith + save_scope_as = angry_peasant + } + if = { + limit = { + root.primary_title = { + any_claimant = { + house != root.house + } + } + } + root.primary_title = { + random_claimant = { + limit = { + house != root.house + } + save_scope_as = claimant_character_scope + } + } + } + } + + option = { # Punch your way out! + name = tour_travel.1001.a + trigger = { + is_adult = yes + } + duel = { + skill = prowess + target = scope:angry_peasant + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + add_prestige = minor_prestige_gain + scope:angry_county_scope.county = { + add_county_modifier = { + modifier = liege_respected_fighter_modifier + years = 10 + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + increase_wounds_effect = { REASON = fight } + } + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + death = { + killer = scope:angry_peasant + death_reason = death_fight + } + } + } + if = { + limit = { is_alive = yes } + stress_impact = { + brave = minor_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = craven + } + modifier = { + add = -50 + NOR = { + has_trait = arrogant + has_trait = brave + } + root.prowess < scope:angry_peasant.prowess + } + } + } + + option = { # Bribe them with lower taxes + name = tour_travel.1001.b + scope:angry_county_scope.county = { + add_county_modifier = { + modifier = reduced_taxes_modifier + years = 10 + } + } + stress_impact = { + callous = minor_stress_impact_gain + craven = minor_stress_impact_loss + greedy = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Attempt to convince them you're not you + name = tour_travel.1001.c + duel = { + skill = intrigue + target = scope:angry_peasant + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + add_prestige = minor_prestige_gain + if = { + limit = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + hidden_effect = { + random_list = { + 80 = { + + } + 20 = { + give_nickname = nick_the_nameless + } + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + increase_wounds_effect = { REASON = fight } + } + } + stress_impact = { + brave = major_stress_impact_gain + honest = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = brave + } + } + } + } + after = { + scope:angry_peasant = { silent_disappearance_effect = yes } + } +} + +# Pass by a particularly pretty commoner by the roadside +tour_travel.1002 = { + type = character_event + title = tour_travel.1002.title + desc = tour_travel.1002.desc + + theme = travel_tour + left_portrait = { + character = root + animation = love + } + right_portrait = { + character = scope:pretty_peasant + animation = flirtation + outfit_tags = { beggar_rags } + } + cooldown = { years = 2 } + trigger = { + is_location_valid_for_travel_event_on_land = yes + is_available_travelling_adult = yes + NOT = { has_trait = celibate } + location = { is_sea_province = no } + sexually_liberal_trigger = yes + might_cheat_on_every_partner_trigger = yes + NOT = { has_sexuality = asexual } + } + weight_multiplier = { + base = 1 + modifier = { # Can still happen for others, but rarely + factor = 0.1 + NOT = { + has_activity_intent = lechery_intent + } + } + } + + immediate = { + add_character_flag = { + flag = no_sex_stress_loss + days = 30 + } + root.location.county = { + save_scope_as = pretty_peasant_county_scope + save_scope_as = background_wilderness_scope + } + create_character = { + location = scope:pretty_peasant_county_scope.title_province + template = beautiful_peasant_character + culture = scope:pretty_peasant_county_scope.culture + faith = scope:pretty_peasant_county_scope.faith + age = age_compared_to_root_minus_ten_always_adult + gender_female_chance = root_attraction_based_female_chance + save_scope_as = pretty_peasant + } + random_list = { + 10 = { + trigger = { + OR = { + AND = { + ROOT = { is_male = yes } + scope:pretty_peasant = { is_female = yes } + } + AND = { + ROOT = { is_female = yes } + scope:pretty_peasant = { is_male = yes } + } + } + } + scope:pretty_peasant = { set_sexuality = heterosexual } + } + 10 = { + scope:pretty_peasant = { set_sexuality = bisexual } + } + 10 = { + trigger = { + OR = { + AND = { + ROOT = { is_male = yes } + scope:pretty_peasant = { is_male = yes } + } + AND = { + ROOT = { is_female = yes } + scope:pretty_peasant = { is_female = yes } + } + } + } + scope:pretty_peasant = { set_sexuality = homosexual } + } + } + } + + option = { # She/he must be mine! + name = tour_travel.1002.a + set_relation_lover = scope:pretty_peasant + had_sex_with_effect = { + CHARACTER = scope:pretty_peasant + PREGNANCY_CHANCE = 50 + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:pretty_peasant + NEW_COURT_OWNER = root + } + scope:pretty_peasant = { + add_character_flag = { + flag = blocked_from_leaving + years = 5 + } + } + if = { + limit = { + OR = { + would_be_sinful_adulterer_trigger = yes + relation_with_character_is_sodomy_in_faith_trigger = { + CHARACTER = scope:pretty_peasant + FAITH = root.faith + } + } + } + stress_impact = { + craven = minor_stress_impact_gain + honest = medium_stress_impact_gain + chaste = major_stress_impact_gain + lustful = major_stress_impact_loss + zealous = major_stress_impact_gain + } + } + else = { + stress_impact = { + craven = minor_stress_impact_gain + honest = medium_stress_impact_gain + chaste = major_stress_impact_gain + lustful = major_stress_impact_loss + } + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = chaste + } + modifier = { + add = -50 + would_be_sinful_adulterer_trigger = yes + relation_with_character_is_sodomy_in_faith_trigger = { + CHARACTER = scope:pretty_peasant + FAITH = root.faith + } + has_trait = zealous + } + } + } + + option = { # Pass them by + name = tour_travel.1002.b + scope:pretty_peasant = { silent_disappearance_effect = yes } + stress_impact = { + callous = minor_stress_impact_gain + craven = minor_stress_impact_loss + honest = minor_stress_impact_loss + disloyal = minor_stress_impact_gain + lustful = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = lustful + } + } + } +} + +# A peasant does not show you proper ettiquette +tour_travel.1003 = { + type = character_event + title = tour_travel.1003.title + desc = tour_travel.1003.desc + + theme = travel_tour + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:rude_peasant + animation = fear + outfit_tags = { beggar_rags } + } + cooldown = { years = 2 } + trigger = { + has_activity_intent = justice_intent + is_location_valid_for_travel_event_on_land = yes + root.location.county = { + county_opinion <= -5 + county_control <= 90 + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = sadistic + } + modifier = { + factor = 0.5 + has_trait = compassionate + + } + } + + immediate = { + root.location.county = { + save_scope_as = angry_county_scope + save_scope_as = background_wilderness_scope # For theme + } + create_character = { + location = scope:angry_county_scope.title_province + template = peasant_character + culture = scope:angry_county_scope.culture + faith = scope:angry_county_scope.faith + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + save_scope_as = rude_peasant + } + } + + option = { # She/he must be punished. + name = tour_travel.1003.a + add_tyranny = minor_tyranny_gain + add_dread = medium_dread_gain + scope:angry_county_scope = { + change_county_control = 5 + add_county_modifier = { + modifier = scared_of_liege_modifier + years = 10 + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + arrogant = minor_stress_impact_loss + base = minor_stress_impact_gain + just = minor_stress_impact_gain + humble = major_stress_impact_gain + forgiving = major_stress_impact_gain + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = humble + has_trait = forgiving + has_trait = compassionate + } + } + } + } + + option = { # Punish them *a lot* + name = tour_travel.1003.b + trigger = { + has_trait = torturer + } + add_tyranny = medium_tyranny_gain + add_dread = major_dread_gain + scope:angry_county_scope = { + change_county_control = 20 + add_county_modifier = { + modifier = terrified_of_liege_modifier + years = 10 + } + } + scope:rude_peasant = { + death = { + killer = root + death_reason = death_torture + } + } + stress_impact = { + sadistic = major_stress_impact_loss + arrogant = minor_stress_impact_loss + base = minor_stress_impact_gain + just = minor_stress_impact_gain + humble = major_stress_impact_gain + forgiving = major_stress_impact_gain + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = arrogant + has_trait = arbitrary + } + } + } + } + + option = { # Let it slide + name = tour_travel.1003.c + add_prestige = minor_prestige_loss + add_dread = medium_dread_loss + stress_impact = { + forgiving = minor_stress_impact_loss + callous = minor_stress_impact_gain + craven = minor_stress_impact_loss + arbitrary = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = arrogant + has_trait = arbitrary + } + } + } + } + after = { + if = { + limit = { + scope:rude_peasant = { is_alive = yes } + } + scope:rude_peasant = { silent_disappearance_effect = yes } + } + } +} + +# You decide to wash the feet of locals, royal touch +tour_travel.1004 = { + type = character_event + title = tour_travel.1004.title + desc = { + desc = tour_travel.1004.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = tour_travel.1004.desc.outro.christian + } + desc = tour_travel.1004.desc.outro + } + } + + theme = travel_tour + cooldown = { years = 2 } + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:diseased_peasant + animation = flirtation + outfit_tags = { beggar_rags } + } + trigger = { + is_location_valid_for_travel_event_on_land = yes + has_activity_intent = altruism_intent + faith = { religion_tag = christianity_religion } + is_governor = no + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { # This is heavily based on Christian things so other faiths should not necessarily be excluded, but should be less likely to see it. + factor = 0.1 + NOT = { + religion = { is_in_family = rf_abrahamic } + } + } + modifier = { # The faith should not be selfish + factor = 0 + faith = { + OR = { + trait_is_virtue = callous + trait_is_virtue = sadistic + trait_is_virtue = arrogant + } + } + } + } + + immediate = { + root.location = { + select_root_vegetable_effect = yes + county = { + save_scope_as = diseased_county_scope + save_scope_as = background_wilderness_scope # For theme + } + } + create_character = { + location = scope:diseased_county_scope.title_province + template = diseased_peasant_character + culture = scope:diseased_county_scope.culture + faith = scope:diseased_county_scope.faith + gender_female_chance = 50 + save_scope_as = diseased_peasant + } + } + + option = { # Wash the dirty dirty feet of the diseased peasant + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_deviant_trigger = yes } + desc = tour_travel.1004.a.tarantino + } + desc = tour_travel.1004.a + } + } + } + add_prestige = minor_prestige_loss + add_piety = medium_piety_gain + random = { + chance = 5 + show_as_tooltip = { add_trait = ill } + hidden_effect = { + trigger_event = { + id = health.1001 + days = { 3 10 } + } + } + } + scope:diseased_county_scope = { + change_county_control = 5 + add_county_modifier = { + modifier = sacred_touch + years = 10 + } + } + stress_impact = { + base = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + deviant = major_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + } + } + + option = { # I could do this every day + name = tour_travel.1004.b + trigger = { + is_deviant_trigger = yes + matching_gender_and_sexuality_trigger = { CHARACTER_1 = scope:diseased_peasant CHARACTER_2 = root } + } + add_prestige = medium_prestige_loss + add_piety = medium_piety_gain + random = { + chance = 5 + show_as_tooltip = { add_trait = ill } + hidden_effect = { + trigger_event = { + id = health.1001 + days = { 3 10 } + } + } + } + scope:diseased_county_scope = { + change_county_control = 5 + add_county_modifier = { + modifier = sacred_touch + years = 10 + } + } + set_relation_lover = scope:diseased_peasant + add_courtier = scope:diseased_peasant + stress_impact = { + base = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + deviant = massive_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = arrogant + has_trait = paranoid + } + } + } + } + + option = { # Just a light touch on the forehead + name = tour_travel.1004.c + add_piety = minor_piety_gain + scope:diseased_county_scope = { + change_county_control = 2 + add_county_modifier = { + modifier = sacred_touch + years = 2 + } + } + stress_impact = { + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0.5 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } + + option = { # I will not be reduced to touching filthy peasants + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_vegetarian_trigger = yes } + desc = tour_travel.1004.d.two_veg + } + desc = tour_travel.1004.d.meat + } + } + } + add_piety = minor_piety_loss + stress_impact = { + forgiving = minor_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } + after = { + if = { + limit = { + scope:diseased_peasant = { + is_alive = yes + employer != root + } + } + scope:diseased_peasant = { silent_disappearance_effect = yes } + } + } +} + +# Locals beg for your royal touch, royal touch +tour_travel.1005 = { + type = character_event + title = tour_travel.1005.title + desc = tour_travel.1005.desc + + theme = travel_tour + left_portrait = { + character = root + animation = personality_compassionate + } + cooldown = { years = 2 } + trigger = { + is_location_valid_for_travel_event_on_land = yes + has_activity_intent = altruism_intent + faith = { religion_tag = christianity_religion } + is_governor = no + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 2 + has_trait = zealous + } + } + + immediate = { + root.location.county = { + save_scope_as = county_to_bless_scope + } + } + + option = { # Hand out blessed coins + name = tour_travel.1005.a + remove_short_term_gold = medium_gold_value + add_piety = medium_piety_gain + scope:county_to_bless_scope = { + add_county_modifier = { + modifier = sacred_touch + years = 10 + } + } + stress_impact = { + profligate = medium_stress_impact_loss + greedy = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + modifier = { + add = -50 + short_term_gold < medium_gold_value + } + } + } + + option = { # Sprinkle the locals with blessed water + name = tour_travel.1005.b + add_piety = minor_piety_gain + scope:county_to_bless_scope = { + change_county_control = 5 + add_county_modifier = { + modifier = sacred_touch + years = 5 + } + } + stress_impact = { + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + } + } + + option = { # Ride ahead! + name = tour_travel.1005.c + add_piety = minor_piety_loss + stress_impact = { + greedy = minor_stress_impact_loss + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } +} + +# Distribute alms in front of a local temple +tour_travel.1006 = { + type = character_event + title = tour_travel.1006.title + desc = tour_travel.1006.desc + + theme = travel_tour + override_background = { + reference = temple + } + + left_portrait = { + character = root + animation = personality_compassionate + } + cooldown = { years = 2 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + root.location.barony = { + title_province = { has_holding_type = church_holding } + } + has_activity_intent = altruism_intent + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 2 + has_trait = zealous + } + } + + immediate = { + root.location.barony = { + county = { save_scope_as = county_to_bless_scope } + holder = { save_scope_as = county_holder_to_bless_scope } + save_scope_as = church_barony_scope # For loc + } + } + + option = { # Hand out blessed coins + name = tour_travel.1006.a + remove_short_term_gold = medium_gold_value + add_piety = medium_piety_gain + scope:county_to_bless_scope = { + add_county_modifier = { + modifier = alms_distributed + years = 10 + } + } + stress_impact = { + profligate = medium_stress_impact_loss + greedy = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + modifier = { + add = -50 + short_term_gold < medium_gold_value + } + } + } + + option = { # Give them nothing + name = tour_travel.1006.b + add_piety = minor_piety_loss + stress_impact = { + greedy = minor_stress_impact_loss + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } + + option = { # Have the peasants thrown off the steps + name = tour_travel.1006.c + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + } + } + add_piety = medium_piety_loss + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + greedy = minor_stress_impact_loss + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } +} + +############################ +## Wise Woman chain +## 1007-1009 +############################ +# An attendee in your procession suggests seeing the Wise Woman/Man of CountyName +tour_travel.1007 = { + type = character_event + title = tour_travel.1007.title + desc = { + desc = tour_travel.1007.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_any_illness = yes + } + desc = tour_travel.1007.desc.mid.ill + } + triggered_desc = { + trigger = { + has_trait = pregnant + } + desc = tour_travel.1007.desc.mid.pregnant + } + triggered_desc = { + trigger = { + OR = { + has_trait = depressed + has_trait = lunatic + has_trait = possessed + } + } + desc = tour_travel.1007.desc.mid.psychological + } + triggered_desc = { + trigger = { + OR = { + has_trait = wounded + has_trait = maimed + has_trait = infirm + } + } + desc = tour_travel.1007.desc.mid.weakened + } + triggered_desc = { + trigger = { + has_trait = beauty_bad + } + desc = tour_travel.1007.desc.mid.ugly + } + } + desc = tour_travel.1007.desc.outro + } + + theme = travel_tour + left_portrait = { + character = root + + triggered_animation = { + trigger = { + has_any_illness = yes + } + animation = pain + } + animation = personality_rational + } + right_portrait = { + character = scope:superstituous_courtier_scope + animation = personality_compassionate + } + cooldown = { years = 2 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + root.location.barony = { + county = { + development_level <= 5 + } + title_province = { + OR = { # The location is somewhat remote + terrain = wetlands + terrain = forest + terrain = jungle + terrain = taiga + terrain = mountains + terrain = desert + terrain = desert_mountains + terrain = steppe + } + } + } + OR = { # There is something "wrong" with you or you're gregnant + has_any_illness = yes + has_trait = pregnant + has_trait = depressed + has_trait = lunatic + has_trait = possessed + has_trait = wounded + has_trait = maimed + has_trait = infirm + has_trait = beauty_bad + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_any_illness = yes + } + } + + immediate = { + random_courtier = { + save_scope_as = superstituous_courtier_scope + } + root.location.barony = { + save_scope_as = wise_woman_barony_scope # For loc + save_scope_as = background_wilderness_scope # For theme + } + create_character = { + location = scope:wise_woman_barony_scope.title_province + template = wise_woman_character + culture = scope:wise_woman_barony_scope.culture + faith = scope:wise_woman_barony_scope.faith + save_scope_as = wise_woman_scope + } + } + + option = { # Go see the wise woman + name = tour_travel.1007.a + remove_short_term_gold = minor_gold_value + custom_tooltip = { + text = go_see_wise_woman_tt + random_list = { + 65 = { # The wise woman is good and helpful + modifier = { # You're a cynic and less likely to believe her + has_trait = cynical + add = -25 + } + trigger_event = tour_travel.1008 + } + 35 = { # The wise woman is a total crackpot + trigger_event = tour_travel.1009 + } + } + } + stress_impact = { + stubborn = minor_stress_impact_gain # I'm fine! + craven = minor_stress_impact_gain # I'm afraid of doctors! + shy = minor_stress_impact_gain # I'm afraid of everyone! + paranoid = medium_stress_impact_gain + cynical = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + if = { + limit = { + NOT = { + faith = { has_doctrine_parameter = witchcraft_accepted } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = stubborn + has_trait = craven + has_trait = shy + has_trait = paranoid + has_trait = cynical + has_trait = arrogant + AND = { + NOT = { faith = { has_doctrine_parameter = witchcraft_accepted } } + has_trait = zealous + } + } + } + modifier = { + add = -50 + short_term_gold < minor_gold_value + } + } + } + + option = { # F that + name = tour_travel.1007.b + stress_impact = { + base = minor_stress_impact_gain + humble = minor_stress_impact_gain + brave = medium_stress_impact_gain + trusting = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = brave + has_trait = trusting + has_trait = gregarious + } + } + } + } +} +# You feel helped by the wise woman +scripted_effect positive_wise_woman_healing_effect = { + if = { + limit = { + has_any_illness = yes + } + add_character_modifier = healed_by_wise_woman_modifier + } + else_if = { + limit = { + has_trait = pregnant + } + add_character_modifier = tended_by_wise_woman_modifier + } + else_if = { + limit = { + OR = { + has_trait = depressed + has_trait = lunatic + has_trait = possessed + } + } + add_character_modifier = balanced_by_wise_woman_modifier + } + else_if = { + limit = { + has_trait = beauty_bad + } + add_character_modifier = makeover_from_wise_woman_modifier + } +} +tour_travel.1008 = { + type = character_event + title = tour_travel.1008.title + desc = { + desc = tour_travel.1008.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_any_illness = yes + } + desc = tour_travel.1008.desc.mid.ill + } + triggered_desc = { + trigger = { + has_trait = pregnant + } + desc = tour_travel.1008.desc.mid.pregnant + } + triggered_desc = { + trigger = { + OR = { + has_trait = depressed + has_trait = lunatic + has_trait = possessed + } + } + desc = tour_travel.1008.desc.mid.psychological + } + triggered_desc = { + trigger = { + OR = { + has_trait = wounded + has_trait = maimed + has_trait = infirm + } + } + desc = tour_travel.1008.desc.mid.weakened + } + triggered_desc = { + trigger = { + has_trait = beauty_bad + } + desc = tour_travel.1008.desc.mid.ugly + } + } + desc = tour_travel.1008.desc.outro + } + + theme = travel_tour + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:wise_woman_scope + animation = personality_rational + } + + immediate = { + if = { + limit = { + employs_court_position = court_physician_court_position + } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = current_physician + } + } + } + + option = { # Go see the wise woman + name = tour_travel.1008.a + positive_wise_woman_healing_effect = yes + stress_impact = { + base = medium_stress_impact_loss + cynical = minor_stress_impact_gain # This breaks my idea of what medicine is + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + + } + } + } + + option = { # Recruit her as your physician + name = tour_travel.1008.b + positive_wise_woman_healing_effect = yes + remove_treasury_or_gold = minor_treasury_or_gold_value + add_courtier = scope:wise_woman_scope + court_position_grant_effect = { + POS = court_physician + CANDIDATE = scope:wise_woman_scope + EMPLOYER = root + } + stress_impact = { + base = medium_stress_impact_loss + cynical = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = greedy + } + } + modifier = { + add = 50 + NOT = { employs_court_position = court_physician_court_position } + } + modifier = { + add = -50 + short_term_treasury_or_gold < minor_treasury_or_gold_value + } + } + } +} +# You feel that the Wise Woman did nothing +tour_travel.1009 = { + type = character_event + title = tour_travel.1009.title + desc = { + desc = tour_travel.1009.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_character_modifier = hurt_by_wise_woman_modifier + } + desc = tour_travel.1009.desc.mid.ill + } + triggered_desc = { + trigger = { + has_character_modifier = bad_makeover_from_wise_woman_modifier + } + desc = tour_travel.1009.desc.mid.ugly + } + desc = tour_travel.1009.desc.mid.nothing + } + desc = tour_travel.1009.desc.outro + } + + theme = travel_tour + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:wise_woman_scope + animation = personality_irrational + } + + immediate = { + random_list = { + 50 = { + # Wise Woman actively hurts you + if = { + limit = { + OR = { + has_any_illness = yes + has_trait = depressed + has_trait = lunatic + has_trait = possessed + has_trait = pregnant + has_trait = wounded + has_trait = maimed + has_trait = infirm + } + } + add_character_modifier = hurt_by_wise_woman_modifier + } + else_if = { + limit = { + has_trait = beauty_bad + } + add_character_modifier = bad_makeover_from_wise_woman_modifier + } + } + 50 = { + # Nothing happens + } + } + } + + option = { + name = tour_travel.1009.a + stress_impact = { + base = medium_stress_impact_loss + cynical = major_stress_impact_loss + } + ai_chance = { + base = 50 + } + } + + option = { # Have her executed! + name = tour_travel.1009.b + scope:wise_woman_scope = { + death = { + killer = root + death_reason = death_execution + } + } + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + just = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = just + } + } + } + } +} + +################################################## +# Visit an inn along the way +# by Veronica Pazos +# 3120 +################################################## + +scripted_trigger tour_travel_3120_valid_vassal = { + is_available_ai_adult = yes + any_memory = { } +} + +tour_travel.3120 = { + type = character_event + title = tour_travel.3120.t + desc = { + desc = tour_travel.3120.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_variable = inn_artifact_var } + desc = tour_travel.3120.desc.artifact + } + desc = tour_travel.3120.desc.fallback + } + } + + theme = travel_tour + override_background = { + reference = bp1_crossroads_inn + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = impatient + has_trait = arrogant + } + } + animation = boredom + } + animation = drink_goblet + } + cooldown = { years = 5 } + + right_portrait = { + character = scope:vassal_inn + animation = throne_room_conversation_1 + } + artifact = { + target = scope:vassal_artifact + position = lower_center_portrait + trigger = { has_variable = inn_artifact_var } + } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + has_activity_intent = reduce_stress_intent + is_adult = yes + any_pool_character = { + province = root.location + tour_travel_3120_valid_vassal = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + } + } + + immediate = { + random_pool_character = { + province = root.location + limit = { tour_travel_3120_valid_vassal = yes } + weight = { + base = 1 + modifier = { + add = 2 + is_powerful_vassal = yes + } + modifier = { + add = 2 + has_any_high_skill_rating = yes + } + modifier = { + add = 1 + any_memory = { has_memory_category = major } + } + } + save_scope_as = vassal_inn + random_memory = { + weight = { + base = 1 + modifier = { + add = 1 + has_memory_category = major + } + } + save_scope_as = vassal_memory + } + } + scope:vassal_inn = { get_quirk_character_effect = yes } #localization + if = { + limit = { + scope:vassal_inn = { any_character_artifact = { exists = yes } } + } + random = { + chance = 50 + set_variable = inn_artifact_var + scope:vassal_inn = { + random_character_artifact = { save_scope_as = vassal_artifact } + } + } + } + } + + option = { # I like you join me + name = tour_travel.3120.a + duel = { + skill = diplomacy + target = scope:vassal_inn + 50 = { #they join you! + desc = tour_travel.3120.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = tour_travel.3120.a.success + left_icon = scope:vassal_inn + add_courtier = scope:vassal_inn + } + } + 50 = { #they refuse + desc = tour_travel.3120.a.failure + send_interface_toast = { + title = tour_travel.3120.a.failure + left_icon = scope:vassal_inn + scope:vassal_inn = { + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 5 + } + } + } + } + } + + stress_impact = { + profligate = medium_stress_impact_loss + greedy = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + } + } + + option = { # I wanna learn from you + name = tour_travel.3120.b + if = { + limit = { + scope:vassal_inn = { intrigue >= high_skill_rating } + } + add_intrigue_skill = 1 + } + else_if = { + limit = { + scope:vassal_inn = { diplomacy >= high_skill_rating } + } + add_diplomacy_skill = 1 + } + else_if = { + limit = { + scope:vassal_inn = { martial >= high_skill_rating } + } + add_martial_skill = 1 + } + else_if = { + limit = { + scope:vassal_inn = { learning >= high_skill_rating } + } + add_learning_skill = 1 + } + else_if = { + limit = { + scope:vassal_inn = { stewardship >= high_skill_rating } + } + add_stewardship_skill = 1 + } + else = { + add_random_skill_point_effect = yes + } + stress_impact = { + greedy = minor_stress_impact_loss + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } + + option = { # They give you something + name = tour_travel.3120.c + trigger = { + has_variable = inn_artifact_var + } + scope:vassal_artifact = { + set_owner = root + } + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } + + after = { + remove_variable = inn_artifact_var + } +} + +################################################## +# A peasant complains about not having a job +# by Veronica Pazos +# 3130 +################################################## + +scripted_trigger tour_travel_3130_valid_vassal = { + is_available_ai_adult = yes +} + +scripted_trigger tour_travel_3130_valid_location = { + OR = { + has_building_or_higher = hunting_grounds_01 + has_building_or_higher = royal_garden_01 + has_building_or_higher = regimental_grounds_01 + has_building_or_higher = caravanserai_01 + has_building_or_higher = watermills_01 + has_building_or_higher = windmills_01 + } +} + +tour_travel.3130 = { + type = character_event + title = tour_travel.3130.t + desc = { + desc = tour_travel.3130.desc.intro + random_valid = { + triggered_desc = { + trigger = { + location = { + OR = { + has_building_or_higher = hunting_grounds_01 + has_building_or_higher = royal_garden_01 + has_building_or_higher = regimental_grounds_01 + } + } + } + desc = tour_travel.3130.desc.no_farms + } + triggered_desc = { + trigger = { + location = { + OR = { + has_building_or_higher = caravanserai_01 + has_building_or_higher = watermills_01 + has_building_or_higher = windmills_01 + } + } + } + desc = tour_travel.3130.desc.no_jobs + } + } + desc = tour_travel.3130.desc.outro + } + + theme = travel_tour + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = impatient + has_trait = arrogant + } + } + animation = dismissal + } + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = humble + has_trait = generous + } + } + animation = personality_compassionate + } + animation = personality_rational + } + right_portrait = { + character = scope:complaining_peasant + animation = beg + } + cooldown = { years = 2 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + location = { tour_travel_3130_valid_location = yes } + any_pool_character = { + province = root.location + tour_travel_3130_valid_vassal = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_activity_intent = justice_intent + } + } + + immediate = { + random_pool_character = { + province = root.location + limit = { tour_travel_3130_valid_vassal = yes } + save_scope_as = complaining_peasant + } + } + + option = { # Im sorry have some money + name = tour_travel.3130.a + pay_short_term_gold = { + target = scope:complaining_peasant + gold = minor_gold_value + } + if = { + limit = { + has_activity_intent = altruism_intent + } + add_piety = medium_piety_gain + } + add_piety = minor_piety_gain + stress_impact = { + profligate = medium_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = sadistic + has_trait = callous + } + } + modifier = { + factor = 2 + OR = { + has_activity_intent = altruism_intent + has_trait = profligate + } + } + } + } + + option = { # You can come work my lands + name = tour_travel.3130.b + trigger = { + has_activity_intent = justice_intent + } + custom_tooltip = available_because_intent_tt + capital_province.county = { + add_county_modifier = { + modifier = peasant_influx_modifier + years = 10 + } + } + add_hook = { + type = loyalty_hook + target = scope:complaining_peasant + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + modifier = { + factor = 2 + has_activity_intent = justice_intent + } + } + } + + option = { # F you lol + name = tour_travel.3130.c + + stress_impact = { + generous = medium_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_activity_intent = altruism_intent + } + } + } + } +} + +################################################## +# Stop to visit a brothel +# by Veronica Pazos +# 3140 +################################################## + +scripted_trigger tour_travel_3140_valid_character = { + is_available_ai_adult = yes + is_attracted_to_gender_of = root + root = { is_attracted_to_gender_of = prev } + is_married = no + NOT = { has_sexuality = asexual } + NOR = { + has_trait = chaste + has_trait = celibate + } +} + +tour_travel.3140 = { + type = character_event + title = tour_travel.3140.t + desc = tour_travel.3140.desc + + theme = travel_tour + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = impatient + has_trait = arrogant + } + } + animation = flirtation_left + } + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = humble + has_trait = generous + } + } + animation = personality_compassionate + } + animation = personality_rational + } + right_portrait = { + character = scope:brothel_worker + animation = flirtation + } + override_background = { reference = bp1_crossroads_inn } + cooldown = { months = 3 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + has_activity_intent = lechery_intent + is_adult = yes + NOT = { has_sexuality = asexual } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = lustful + has_trait = rakish + } + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + tour_travel_3140_valid_character = yes + } + } + random_pool_character = { + province = root.location + limit = { tour_travel_3140_valid_character = yes } + save_scope_as = brothel_worker + } + } + else = { + create_character = { + template = generic_peasant_character + gender_female_chance = root_sexuality_female_chance + location = root.location + culture = root.location.culture + faith = root.location.faith + dynasty = none + save_scope_as = brothel_worker + } + } + scope:brothel_worker = { get_quirk_character_effect = yes } #localization + } + + option = { # Go + name = tour_travel.3140.a + add_piety = minor_piety_loss + add_character_modifier = { + modifier = brothel_stop_modifier + months = 3 + } + hidden_effect = { + random_list = { + 50 = { + trigger = { + is_attracted_to_men = yes + } + had_sex_with_unknown_effect = { + GENDER = male + } + } + 50 = { + trigger = { + is_attracted_to_women = yes + } + had_sex_with_unknown_effect = { + GENDER = female + } + } + } + } + stress_impact = { + base = medium_stress_impact_loss + lustful = medium_stress_impact_loss + chaste = major_stress_impact_gain + celibate = massive_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = celibate + } + } + modifier = { + factor = 0.5 + has_trait = zealous + } + } + } + + option = { # Don't go + name = tour_travel.3140.b + add_piety = minor_piety_gain + stress_impact = { + lustful = medium_stress_impact_gain + rakish = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = rakish + } + } + } + } +} + +################################################## +# Danger! Ghino di Tacco-ish local ruler invites you to a banquet before stealing from you, then he confesses there are not that many options here to survive and needs money for his family and subjects. Changed the story so much that's almost unrecognisible, apologies. +# by Veronica Pazos +# 3110-3111 +################################################## +tour_travel.3110 = { + type = character_event + title = tour_travel.3110.t + desc = tour_travel.3110.desc + theme = travel_danger + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:ghino_di_tacco_scope + animation = happiness + } + override_background = { reference = corridor_day } + cooldown = { years = 2 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + location = { + province_owner ?= { + is_available_ai_adult = yes + NOR = { + this = root + is_liege_or_above_of = root + } + } + } + OR = { + NOT = { exists = scope:activity } + scope:activity = { + NOT = { has_activity_type = activity_tour } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + location = { save_scope_as = ghino_di_tacco_location } + location.province_owner = { save_scope_as = ghino_di_tacco_scope } + traveler_danger_xp_effect = { + MIN = 3 + MAX = 6 + } + } + + #Accept invite + option = { + name = tour_travel.3110.a + custom_tooltip = tour_travel.3110.a.tt + play_music_cue = mx_cue_banquet + trigger_event = tour_travel.3111 + stress_impact = { + comfort_eater = minor_stress_loss + drunkard = minor_stress_loss + lifestyle_reveler = medium_stress_loss + shy = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = shy + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + #Deny + option = { + name = tour_travel.3110.b + reverse_add_opinion = { + target = scope:ghino_di_tacco_scope + modifier = insult_opinion + opinion = -20 + } + stress_impact = { + trusting = medium_stress_impact_gain + gregarious = major_stress_impact_gain + gluttonous = major_stress_impact_gain + lifestyle_reveler = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + has_trait = trusting + } + modifier = { + factor = 0 + has_trait = gluttonous + } + modifier = { + factor = 0 + has_trait = gregarious + } + modifier = { + factor = 0 + has_trait = lifestyle_reveler + } + } + } + + #Accept and I shall provide the entertainment + option = { + name = tour_travel.3110.c + custom_tooltip = tour_travel.3110.a.tt + play_music_cue = mx_cue_banquet + trigger = { + current_travel_plan = { + any_entourage_character = { + has_court_position = court_jester_court_position + } + } + } + add_prestige = minor_prestige_gain + trigger_event = tour_travel.3111 + stress_impact = { + comfort_eater = minor_stress_loss + drunkard = minor_stress_loss + humble = minor_stress_impact_gain + shy = minor_stress_impact_gain + temperate = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + add = -25 + has_trait = humble + } + modifier = { + add = -50 + has_trait = shy + } + modifier = { + add = -50 + has_trait = temperate + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + after = { + mp_resume_travel_plan = yes + } +} + +scripted_trigger has_breaking_down_trait_trigger = { + OR = { + has_trait = craven + has_trait = contrite + has_trait = honest + has_trait = just + has_trait = loyal + has_trait = gallant + has_any_good_relationship_with_root_trigger = yes + } +} + +#Gentleman breaks down and confesses his plan +tour_travel.3111 = { + type = character_event + title = tour_travel.3111.t + desc = { + desc = tour_travel.3111.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = yes } + } + desc = tour_travel.3111.desc_breaking_down + } + triggered_desc = { + trigger = { + scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = no } + } + desc = tour_travel.3111.desc_committed + } + } + } + + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = yes } + OR = { + has_trait = wrathful + has_trait = callous + has_trait = vengeful + } + } + animation = anger + } + triggered_animation = { + trigger = { + scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = yes } + } + animation = worry + } + animation = toast_goblet + } + right_portrait = { + character = scope:ghino_di_tacco_scope + triggered_animation = { + trigger = { + has_breaking_down_trait_trigger = yes + } + animation = grief + } + animation = toast_goblet + } + override_background = { reference = feast } + cooldown = { years = 10 } + + immediate = { + play_music_cue = mx_cue_banquet + } + + #Forgive and donate + option = { + name = tour_travel.3111.a + trigger = { + scope:ghino_di_tacco_scope = { + has_breaking_down_trait_trigger = yes + } + } + pay_short_term_gold = { + target = scope:ghino_di_tacco_scope + gold = minor_gold_value + } + scope:ghino_di_tacco_location = { + add_province_modifier = { + modifier = generous_donations_modifier + years = 10 + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + callous = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + factor = 0 + has_trait = avaricious + } + modifier = { + factor = 0 + has_trait = wrathful + } + modifier = { + factor = 0 + has_trait = callous + } + modifier = { + factor = 0 + has_trait = vengeful + } + } + } + + #Forgive but leave + option = { + name = tour_travel.3111.b + trigger = { + scope:ghino_di_tacco_scope = { + has_breaking_down_trait_trigger = yes + } + } + reverse_add_opinion = { + target = scope:ghino_di_tacco_scope + modifier = grateful_opinion + opinion = 20 + } + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + generous = medium_stress_impact_gain + callous = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0.25 + has_trait = compassionate + } + modifier = { + factor = 0.25 + has_trait = generous + } + modifier = { + factor = 0.5 + has_trait = forgiving + } + modifier = { + factor = 0 + has_trait = avaricious + } + modifier = { + factor = 0 + has_trait = wrathful + } + modifier = { + factor = 0 + has_trait = callous + } + modifier = { + factor = 0 + has_trait = vengeful + } + } + } + + #Demand a compensation + option = { + name = tour_travel.3111.c + trigger = { + scope:ghino_di_tacco_scope = { + has_breaking_down_trait_trigger = yes + } + } + scope:ghino_di_tacco_scope = { + pay_short_term_gold = { + target = root + gold = tiny_gold_value + } + } + progress_towards_rival_effect = { + REASON = rival_stole_from_me_banquet + CHARACTER = scope:ghino_di_tacco_scope + OPINION = default_rival_opinion + } + stress_impact = { + humble = minor_stress_impact_gain + calm = medium_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + generous = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0.25 + has_trait = humble + } + modifier = { + factor = 0.25 + has_trait = calm + } + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = forgiving + } + modifier = { + factor = 0 + has_trait = generous + } + } + } + + #You ask your guards to arrest him + option = { + name = tour_travel.3111.d + trigger = { + current_travel_plan = { + has_travel_option = hire_experienced_mercenaries_option + } + } + imprison_character_effect = { + TARGET = scope:ghino_di_tacco_scope + IMPRISONER = root + } + add_dread = minor_dread_gain + stress_impact = { + just = medium_stress_impact_gain + calm = major_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + generous = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = just + } + modifier = { + factor = 0 + has_trait = calm + } + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = forgiving + } + modifier = { + factor = 0 + has_trait = generous + } + } + } + + #He steals from you gottem + option = { + name = tour_travel.3111.e + trigger = { + scope:ghino_di_tacco_scope = { + has_breaking_down_trait_trigger = no + } + } + duel = { + skill = intrigue + target = scope:ghino_di_tacco_scope + 30 = { #you notice he's trying to steal + desc = tour_travel.3111.e.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = tour_travel.3111.e.success + left_icon = scope:ghino_di_tacco_scope + progress_towards_rival_effect = { + REASON = rival_stole_from_me_banquet + CHARACTER = scope:ghino_di_tacco_scope + OPINION = default_rival_opinion + } + } + } + 70 = { #he steals from you + desc = tour_travel.3111.e.failure + send_interface_toast = { + title = tour_travel.3111.e.failure + left_icon = scope:ghino_di_tacco_scope + pay_short_term_gold = { + target = scope:ghino_di_tacco_scope + gold = minor_gold_value + } + } + } + } + stress_impact = { + base = medium_stress_impact_gain + forgiving = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + #default/fallback option + } + } +} diff --git a/N3OW/events/activities/tournaments/veronica_local_events_2.txt b/N3OW/events/activities/tournaments/veronica_local_events_2.txt new file mode 100644 index 00000000..213e7ade --- /dev/null +++ b/N3OW/events/activities/tournaments/veronica_local_events_2.txt @@ -0,0 +1,1859 @@ +namespace = ep2_locale_events + +# You flex to impress someone +# by Veronica Pazos + +scripted_trigger ep2_locale_events_5020_valid_lover = { + this != root + is_ai = yes + is_alive = yes + OR = { + has_relation_lover = root + is_spouse_of = root + } + activity_is_valid_tournament_contestant = no +} + +ep2_locale_events.5020 = { + type = activity_event + title = ep2_locale_events.5020.t + desc = ep2_locale_events.5020.desc + theme = tournament_grounds + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:impressed_lover + animation = flirtation + } + lower_center_portrait = scope:impressed_rival + cooldown = { years = 1 } + + trigger = { + activity_is_competing_trigger = yes + scope:activity = { + has_active_locale = tournament_locale_tournament_grounds + any_attending_character = { # lover + ep2_locale_events_5020_valid_lover = yes + } + any_guest_subset_current_phase = { # rival + name = contestant + is_ai = yes + is_healthy = yes + this != root + } + } + activity_tournament_prowess_contest_trigger = yes + } + + immediate = { + if = { + limit = { + has_activity_intent = woo_attendee_intent + intent_target ?= { is_alive = yes } + } + intent_target = { save_scope_as = impressed_lover } + } + else = { + scope:activity = { + random_attending_character = { + limit = { ep2_locale_events_5020_valid_lover = yes } + weight = { + base = 1 + modifier = { + add = 100 + is_spouse_of = root + } + modifier = { + add = 2 + has_relation_soulmate = root + } + } + save_scope_as = impressed_lover + } + } + } + scope:activity = { + random_guest_subset_current_phase = { + name = contestant + limit = { + is_ai = yes + is_healthy = yes + this != root + activity_is_competing_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 100 + has_relation_rival = root + } + activity_recurring_character_weight_modifier = { VALUE = 50 } + } + save_scope_as = impressed_rival + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + has_activity_intent = win_contest_intent + has_activity_intent = woo_attendee_intent + } + } + } + + # Impress your lover + option = { + name = ep2_locale_events.5020.a + duel = { + skill = prowess + value = average_skill_rating + 50 = { + desc = ep2_locale_events.5020.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = ep2_locale_events.5020.a.success + left_icon = root + right_icon = scope:impressed_lover + if = { + limit = { + NOT = { has_relation_wedding_good_fertility = scope:impressed_lover } + } + custom_tooltip = { + text = ep2_locale_events.5020.a.success.tt + set_relation_wedding_good_fertility = scope:impressed_lover + } + } + else = { + add_character_modifier = { + modifier = tournament_ground_flexing + years = 10 + } + } + } + } + 50 = { + desc = ep2_locale_events.5020.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = ep2_locale_events.5020.a.failure + left_icon = root + right_icon = scope:impressed_lover + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + callous = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = callous + has_trait = vengeful + has_trait = sadistic + } + } + } + } + + # Impress your rival + option = { + name = ep2_locale_events.5020.b + duel = { + skill = prowess + target = scope:impressed_rival + 50 = { + desc = ep2_locale_events.5020.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = ep2_locale_events.5020.b.success + left_icon = root + right_icon = scope:impressed_rival + scope:impressed_rival = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + } + } + 50 = { + desc = ep2_locale_events.5020.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = ep2_locale_events.5020.b.failure + left_icon = root + right_icon = scope:impressed_rival + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + calm = medium_stress_impact_gain + humble = medium_stress_impact_gain + lustful = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = calm + has_trait = forgiving + has_trait = lustful + } + } + } + } + + # I'm doing this for MYSELF + option = { + name = ep2_locale_events.5020.c + trigger = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + lustful = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + has_trait = lustful + } + } + } + } +} + +# Two moons appear in the sky, based on the accounts of John of Worcester 1106 +# by Veronica Pazos + +scripted_effect ep2_locale_events_1520_superstitious_effect = { + if = { + limit = { + NOT = { has_character_modifier = bp1_superstition_modifier } + is_ai = no + } + random = { + chance = 50 + send_interface_toast = { + title = ep2_locale_events.1520.superstitious + left_icon = root + add_character_modifier = bp1_superstition_modifier + } + } + } +} + +ep2_locale_events.1520 = { + type = activity_event + title = ep2_locale_events.1520.t + desc = ep2_locale_events.1520.desc + theme = tournament_locale_temple + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = cynical } + animation = disbelief + } + animation = admiration + } + right_portrait = { + character = scope:tournament_priest + animation = shock + } + cooldown = { years = 5 } + override_background = { reference = temple } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_religious_building + } + NOT = { has_variable = had_1520_var } #once in a lifetime + } + + immediate = { + set_variable = had_1520_var + if = { + limit = { + scope:activity = { + exists = var:tournament_priest + var:tournament_priest = { is_alive = yes } + } + } + scope:activity = { + var:tournament_priest = { save_scope_as = tournament_priest } + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + this != root + is_ai = yes + is_adult = yes + NOT = { has_trait = cynical } + } + weight = { + base = 1 + modifier = { + add = 5 + has_trait = zealous + } + modifier = { + add = 5 + has_trait = paranoid + } + } + save_scope_as = tournament_priest + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = paranoid + has_trait = zealous + } + } + } + + # It means that I'll win + option = { + name = ep2_locale_events.1520.a + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + } + else = { + add_martial_lifestyle_xp = major_lifestyle_xp + } + ep2_locale_events_1520_superstitious_effect = yes + stress_impact = { + humble = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_lifestyle = martial_lifestyle + has_activity_intent = win_contest_intent + } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = cynical + } + } + } + } + + # It means that I'm gonna get money - round as a coin! + option = { + name = ep2_locale_events.1520.b + add_stewardship_lifestyle_xp = major_lifestyle_xp + ep2_locale_events_1520_superstitious_effect = yes + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = greedy + has_trait = avaricious + has_lifestyle = stewardship_lifestyle + } + } + modifier = { + factor = 0 + has_trait = generous + } + } + } + + # It's two beheaded people + option = { + name = ep2_locale_events.1520.c + add_intrigue_lifestyle_xp = major_lifestyle_xp + ep2_locale_events_1520_superstitious_effect = yes + stress_impact = { + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + has_lifestyle = intrigue_lifestyle + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = calm + } + } + } + } + + # I know what this is + option = { + name = ep2_locale_events.1520.d + trigger = { + learning >= high_skill_rating + } + show_as_unavailable = { + learning < high_skill_rating + } + add_character_modifier = tournament_astronomy_modifier #forever + stress_impact = { + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + learning >= high_skill_rating + } + modifier = { + factor = 0 + has_trait = ambitious + } + } + } + + # It means nothing + option = { + name = ep2_locale_events.1520.e + stress_impact = { + base = medium_stress_impact_loss + cynical = major_stress_impact_loss + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = cynical + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } +} + +# People at the camp are falling ill +# by Veronica Pazos + +ep2_locale_events.3010 = { + type = activity_event + title = ep2_locale_events.3010.t + desc = ep2_locale_events.3010.desc + theme = tournament_locale_camp + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + has_trait = callous + has_trait = sadistic + } + } + animation = schadenfreude + } + animation = disbelief + } + right_portrait = { + character = scope:alerted_physician + animation = disgust + } + cooldown = { years = 1 } + override_background = { reference = army_camp } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_visitor_camp + any_attending_character = { + this != root + activity_is_valid_tournament_contestant = yes + count >= 2 #there's someone to investigate, and someone to approve in the follow up + } + } + } + + immediate = { + if = { + limit = { + scope:activity = { + any_attending_character = { + this != ROOT + has_court_position = court_physician_court_position + } + } + } + scope:activity = { + random_attending_character = { + limit = { + this != ROOT + has_court_position = court_physician_court_position + } + save_scope_as = alerted_physician + } + } + } + else = { + scope:activity = { + ordered_attending_character = { + limit = { + this != root + } + order_by = { + value = learning + if = { + limit = { + has_trait = lifestyle_physician + } + add = 15 + } + if = { + limit = { + has_trait = whole_of_body + } + add = 10 + } + if = { + limit = { + has_trait = lifestyle_herbalist + } + add = 5 + } + } + save_scope_as = alerted_physician + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:activity = { + any_attending_character = { + this != ROOT + has_court_position = court_physician_court_position + } + } + } + } + + # There must be an explanation + option = { + name = ep2_locale_events.3010.a + scope:alerted_physician = { + duel = { + skill = learning + value = average_skill_rating + 50 = { + desc = ep2_locale_events.3010.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = ep2_locale_events.3010.a.success + right_icon = scope:alerted_physician + custom_tooltip = { + text = ep2_locale_events.3010.a.success.tt + trigger_event = ep2_locale_events.3011 + } + } + } + } + 50 = { + desc = ep2_locale_events.3010.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = ep2_locale_events.3010.a.failure + right_icon = scope:alerted_physician + } + } + } + } + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + } + } + + # It's a curse! + option = { + name = ep2_locale_events.3010.b + flavor = ep2_locale_events.3010.b.flavor + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + else = { + add_character_modifier = { + modifier = tournament_not_cursed_modifier + years = 10 + } + } + add_piety = minor_piety_loss + stress_impact = { + cynical = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = compassionate + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = calm + has_trait = paranoid + } + } + } + } + + # If paranoid you think someone is sabotaging the tournament and coming for you + option = { + name = ep2_locale_events.3010.c + trigger = { has_trait = paranoid } + add_character_modifier = { + modifier = tournament_not_cursed_modifier + years = 10 + } + stress_impact = { + paranoid = major_stress_impact_loss #you caught them + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = cynical + } + } + } + } + + # Well, not my problem + option = { + name = ep2_locale_events.3010.d + if = { + limit = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + add_dread = minor_dread_gain + } + stress_impact = { + base = minor_stress_impact_loss + callous = major_stress_impact_loss + sadistic = major_stress_impact_loss + gregarious = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + } + } + } + } +} + +#You discover people dumping their waste into the stream + +scripted_effect ep2_locale_events_3011_warning_effect = { + if = { + limit = { + scope:activity = { + any_attending_character = { + this != root + activity_is_valid_tournament_contestant = yes + } + } + } + scope:activity = { + random_attending_character = { + limit = { + this != root + activity_is_valid_tournament_contestant = yes + } + weight = { + base = 1 + modifier = { + add = 100 + is_powerful_vassal_of = root + } + modifier = { + add = 50 + is_vassal_of = root + } + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + save_scope_as = vassal_1 + } + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + this != root + activity_is_valid_tournament_contestant = yes + this != scope:vassal_1 + } + } + } + scope:activity = { + random_attending_character = { + limit = { + this != root + activity_is_valid_tournament_contestant = yes + this != scope:vassal_1 + } + weight = { + base = 1 + modifier = { + add = 100 + is_powerful_vassal_of = root + } + modifier = { + add = 50 + is_vassal_of = root + } + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + save_scope_as = vassal_2 + } + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + this != root + activity_is_valid_tournament_contestant = yes + this != scope:vassal_1 + this != scope:vassal_2 + } + } + } + scope:activity = { + random_attending_character = { + limit = { + this != root + activity_is_valid_tournament_contestant = yes + this != scope:vassal_1 + this != scope:vassal_2 + } + weight = { + base = 1 + modifier = { + add = 100 + is_powerful_vassal_of = root + } + modifier = { + add = 50 + is_vassal_of = root + } + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + save_scope_as = vassal_3 + } + } + } +} + +ep2_locale_events.3011 = { + type = activity_event + title = ep2_locale_events.3011.t + desc = ep2_locale_events.3011.desc + theme = tournament_locale_camp + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = schadenfreude + } + animation = disgust + } + right_portrait = { + character = scope:alerted_physician + animation = laugh + } + override_background = { reference = army_camp } + + # Tell them to stop + option = { + name = ep2_locale_events.3011.a + ep2_locale_events_3011_warning_effect = yes + stress_impact = { + ambitious = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = callous + has_trait = sadistic + has_trait = just + } + } + } + } + + # Let them go on so you can win + option = { + name = { + trigger = { + scope:activity = { + any_guest_subset_current_phase = { #participating + name = contestant + this = root + } + } + } + text = ep2_locale_events.3011.b.contestant + } + name = { + trigger = { exists = scope:contest_champion } + text = ep2_locale_events.3011.b.champion + } + name = { + trigger = { + scope:activity = { + NOT = { + any_guest_subset_current_phase = { + name = contestant + this = root + } + } + } + NOT = { exists = scope:contest_champion } + } + text = ep2_locale_events.3011.b + } + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + else_if = { + limit = { + exists = scope:contest_champion + scope:contest_champion = { activity_is_competing_trigger = yes } + } + scope:contest_champion = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + } + else = { + if = { + limit = { has_lifestyle = intrigue_lifestyle } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + add_character_modifier = { + modifier = tournament_not_cursed_modifier + years = 20 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = ambitious + } + } + modifier = { + factor = 1.5 + has_trait = arrogant + } + } + } +} + +# Do you wanna buy new horseshoes? +# by Veronica Pazos + +ep2_locale_events.3510 = { + type = activity_event + title = ep2_locale_events.3510.t + desc = ep2_locale_events.3510.desc + theme = tournament_locale_forge + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:farrier + animation = marshal + } + artifact = { + target = scope:horseshoe_artifact + position = lower_center_portrait + } + cooldown = { years = 1 } + override_background = { reference = armory } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_artisans + OR = { + has_current_phase = tournament_phase_joust + has_current_phase = tournament_phase_melee + has_current_phase = tournament_phase_horse_race + } + exists = var:tournament_farrier + var:tournament_farrier = { is_alive = yes } + } + } + + immediate = { + scope:activity = { + var:tournament_farrier = { save_scope_as = farrier } + } + hidden_effect = { + scope:farrier = { + create_artifact = { + name = good_luck_horseshoe_artifact + description = good_luck_horseshoe_artifact_desc + type = miscellaneous + visuals = small_box + modifier = artifact_stress_gain_2_modifier + save_scope_as = horseshoe_artifact + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:activity = { + any_guest_subset_current_phase = { #you're participating + name = contestant + this = root + } + } + } + } + + # Buy them for you + option = { + name = ep2_locale_events.3510.a + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + } + else = { + add_martial_lifestyle_xp = medium_lifestyle_xp + if = { + limit = { is_ai = no } + random_list = { + 10 = { + send_interface_toast = { + title = ep2_locale_events.3510.a.prowess + left_icon = root + add_prowess_skill = 1 + } + } + 5 = { + send_interface_toast = { + title = ep2_locale_events.3510.a.martial + left_icon = root + add_martial_skill = 1 + } + } + 10 = { + send_interface_toast = { + title = ep2_locale_events.3510.a.prestige + left_icon = root + add_prestige = minor_prestige_gain + } + } + } + } + } + pay_short_term_gold = { + target = scope:farrier + gold = { + value = minor_gold_value + max = 15 + } + } + stress_impact = { + humble = medium_stress_impact_gain + greedy = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = greedy + has_trait = generous + } + } + } + } + + # Buy them for your knights + option = { + name = ep2_locale_events.3510.b + add_character_modifier = { + modifier = tournament_new_horseshoes_modifier + years = 20 + } + every_active_accolade = { + custom = custom.every_acclaimed_knight + add_glory = minor_glory_gain + } + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + pay_short_term_gold = { + target = scope:farrier + gold = { + value = medium_gold_value + max = 25 + } + } + stress_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = arrogant + has_trait = greedy + } + } + modifier = { + factor = 1.5 + OR = { + has_trait = generous + has_trait = gregarious + } + } + } + } + + # They're good luck! + option = { + name = ep2_locale_events.3510.c + scope:horseshoe_artifact = { set_owner = root } + pay_short_term_gold = { + target = scope:farrier + gold = { + value = minor_gold_value + max = 5 + } + } + stress_impact = { + paranoid = medium_stress_impact_loss + cynical = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = ambitious + } + } + modifier = { + factor = 1.5 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + # Nah + option = { + name = ep2_locale_events.3510.d + stress_impact = { + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + } + modifier = { + factor = 0.5 + OR = { + has_trait = arrogant + has_trait = ambitious + } + } + } + } +} + +# Visit to the local churchyard +# by Veronica Pazos + +ep2_locale_events.1530 = { + type = activity_event + title = ep2_locale_events.1530.t + desc = { + desc = ep2_locale_events.1530.desc.intro + first_valid = { + triggered_desc = { + trigger = { + age <= 25 + } + desc = ep2_locale_events.1530.desc.young + } + triggered_desc = { + trigger = { + age >= 26 + age <= 40 + } + desc = ep2_locale_events.1530.desc.middle + } + triggered_desc = { + trigger = { + age > 40 + } + desc = ep2_locale_events.1530.desc.old + } + } + } + theme = tournament_locale_temple + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + has_trait = callous + } + } + animation = boredom + } + triggered_animation = { + trigger = { + has_trait = deviant + } + animation = flirtation_left + } + animation = personality_honorable + } + cooldown = { years = 1 } + override_background = { reference = temple } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_religious_building + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + learning >= high_skill_rating + } + modifier = { + factor = 2 + scope:activity = { has_current_phase = tournament_phase_recital } + } + modifier = { + factor = 1.5 + piety_level >= medium_piety_level + } + } + + # Try to find an ancestor + option = { + name = ep2_locale_events.1530.a + trigger = { exists = dynasty } + random_list = { + 10 = { #you find someone + desc = ep2_locale_events.1530.a.success + show_chance = no + modifier = { + factor = 2 + location.culture = root.culture + } + modifier = { + factor = 2 + exists = dynasty + dynasty.dynasty_prestige_level <= low_dynasty_prestige_level + } + send_interface_toast = { + title = ep2_locale_events.1530.a.success + left_icon = root + dynasty ?= { add_dynasty_prestige = medium_dynasty_prestige_value } + } + } + 20 = { #you don't + desc = ep2_locale_events.1530.a.failure + show_chance = no + modifier = { + factor = 2 + dynasty.dynasty_prestige_level >= high_dynasty_prestige_level + } + send_interface_toast = { + title = ep2_locale_events.1530.a.failure + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + modifier = { + factor = 0 + prestige <= minor_prestige_value + } + } + } + + # Reflect + option = { + name = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + text = ep2_locale_events.1530.b.christian + } + name = { + trigger = { NOT = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } } + text = ep2_locale_events.1530.b.fallback + } + add_piety = medium_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = arrogant + } + } + modifier = { + factor = 2 + piety_level >= medium_piety_level + } + } + } + + # Practice for a recital + option = { + name = ep2_locale_events.1530.c + trigger = { + scope:activity = { has_current_phase = tournament_phase_recital } + activity_is_competing_trigger = yes + } + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + stress_impact = { + lifestyle_poet = medium_stress_impact_loss + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = ambitious + has_trait = arrogant + has_trait = lifestyle_poet + } + } + modifier = { + factor = 0 + has_trait = zealous + } + } + } + + # If you're a deviant you... well + option = { + name = ep2_locale_events.1530.d + trigger = { has_trait = deviant } + stress_impact = { + base = major_stress_impact_loss + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + modifier = { + factor = 2 + has_trait = deviant + } + modifier = { + factor = 0.5 + OR = { + has_trait = compassionate + has_trait = calm + has_trait = ambitious + } + } + } + } +} + +# Ask the weaponsmith to improve your weapon +# by Veronica Pazos + +ep2_locale_events.4540 = { + type = activity_event + title = ep2_locale_events.4540.t + desc = { + desc = ep2_locale_events.4540.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + any_guest_subset_current_phase = { #you're participating + name = contestant + this = root + } + } + } + desc = ep2_locale_events.4540.desc.contestant + } + triggered_desc = { + trigger = { + scope:activity = { + NOT = { + any_guest_subset_current_phase = { + name = contestant + this = root + } + } + } + } + desc = ep2_locale_events.4540.desc.fallback + } + } + desc = ep2_locale_events.4540.desc.outro + } + theme = tournament_locale_forge + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:weaponsmith + animation = marshal + } + artifact = { + target = scope:my_weapon + position = lower_center_portrait + } + cooldown = { years = 1 } + override_background = { reference = armory } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_artisans + exists = var:tournament_weaponsmith + var:tournament_weaponsmith = { is_alive = yes } + } + any_character_artifact = { #you have a weapon + artifact_slot_type = primary_armament + } + } + + immediate = { + scope:activity = { + var:tournament_weaponsmith = { save_scope_as = weaponsmith } + } + if = { + limit = { #equipped artifacts first + any_equipped_character_artifact = { + artifact_slot_type = primary_armament + } + } + random_equipped_character_artifact = { + limit = { + artifact_slot_type = primary_armament + } + save_scope_as = my_weapon + } + } + else_if = { #then unequipped but illustrious + limit = { + any_character_artifact = { + artifact_slot_type = primary_armament + rarity = illustrious + } + } + random_character_artifact = { + limit = { + artifact_slot_type = primary_armament + rarity = illustrious + } + save_scope_as = my_weapon + } + } + else = { #then random + random_character_artifact = { + limit = { artifact_slot_type = primary_armament } + save_scope_as = my_weapon + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:activity = { + any_guest_subset_current_phase = { #you're participating + name = contestant + this = root + } + } + } + } + + # Sharpen sword + option = { + name = ep2_locale_events.4540.a + custom_tooltip = ep2_locale_events.4540.a.tt + pay_short_term_gold = { + target = scope:weaponsmith + gold = { + value = medium_gold_value + max = 20 + } + } + scope:my_weapon = { + set_artifact_description = ep2_locale_events_artifact_sharp_desc + add_artifact_modifier = artifact_tournament_sharpened_blade_modifier + } + stress_impact = { + greedy = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = greedy + } + } + } + } + + # Inscribe a carving - prayer + option = { + name = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + text = ep2_locale_events.4540.b.christian + } + name = { + trigger = { + NOT = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + } + text = ep2_locale_events.4540.b.fallback + } + pay_short_term_gold = { + target = scope:weaponsmith + gold = { + value = medium_gold_value + max = 20 + } + } + scope:my_weapon = { + set_artifact_description = ep2_locale_events_artifact_prayer_desc + add_artifact_modifier = artifact_monthly_piety_7_modifier + } + stress_impact = { + cynical = medium_stress_impact_gain + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = greedy + has_trait = arrogant + } + } + } + } + + # Inscribe your motto + option = { + name = ep2_locale_events.4540.c + pay_short_term_gold = { + target = scope:weaponsmith + gold = { + value = medium_gold_value + max = 20 + } + } + scope:my_weapon = { + set_artifact_description = ep2_locale_events_artifact_motto_desc + add_artifact_modifier = artifact_monthly_prestige_7_modifier + } + stress_impact = { + greedy = medium_stress_impact_gain + humble = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = zealous + has_trait = humble + } + } + } + } + + # Nah Im fine + option = { + name = ep2_locale_events.4540.d + stress_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = arrogant + } + } + } + } +} + +# Bet on a game of cards, based on a 15th c. card game / Repeatable +# by Veronica Pazos + +scripted_trigger ep2_locale_events_1060_valid_gambler = { + this != ROOT + is_physically_able_ai_adult = yes + NOT = { has_trait = temperate } +} + +scripted_effect ep2_locale_events_1060_betting_effect = { + random_list = { + 50 = { + desc = ep2_locale_events.1060.a.success + show_chance = no + send_interface_toast = { + title = ep2_locale_events.1060.a.success + left_icon = root + add_gold = { + value = tiny_gold_value + max = 5 + multiply = 2 + } + } + } + 50 = { + desc = ep2_locale_events.1060.a.failure + show_chance = no + send_interface_toast = { + title = ep2_locale_events.1060.a.failure + left_icon = root + } + } + } + pay_short_term_gold = { + target = scope:tournament_gambler + gold = { + value = tiny_gold_value + max = 5 + } + } +} + +ep2_locale_events.1060 = { + type = activity_event + title = ep2_locale_events.1060.t + desc = ep2_locale_events.1060.desc + theme = tournament_locale_tavern + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = diligent + has_trait = temperate + has_trait = zealous + } + } + animation = dismissal + } + animation = laugh + } + right_portrait = { + character = scope:tournament_gambler + animation = chess_cocky + } + override_background = { reference = tavern } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_tavern + any_attending_character = { + ep2_locale_events_1060_valid_gambler = yes + } + } + } + + immediate = { + scope:activity = { + random_attending_character = { + limit = { + ep2_locale_events_1060_valid_gambler = yes + } + weight = { + base = 1 + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 2 + has_trait = profligate + } + } + save_scope_as = tournament_gambler + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 2 + has_activity_intent = reduce_stress_intent + } + } + + # Bet that you have a higher card + option = { + name = ep2_locale_events.1060.a + ep2_locale_events_1060_betting_effect = yes + stress_impact = { + base = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + greedy = medium_stress_impact_gain + temperate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = temperate + has_trait = greedy + has_trait = zealous + can_make_expensive_purchase_trigger = { PRICE = minor_gold_value } + } + } + } + } + + # Bet that you have a lower card + option = { + name = ep2_locale_events.1060.b + ep2_locale_events_1060_betting_effect = yes + stress_impact = { + base = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + greedy = medium_stress_impact_gain + temperate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = temperate + has_trait = greedy + has_trait = zealous + can_make_expensive_purchase_trigger = { PRICE = minor_gold_value } + } + } + } + } + + # Don't bet + option = { + name = ep2_locale_events.1060.c + add_piety = minor_piety_gain + stress_impact = { + arbitrary = medium_stress_impact_gain + profligate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = zealous + has_trait = humble + } + } + } + } +} diff --git a/N3OW/events/artifacts/artifact_events.txt b/N3OW/events/artifacts/artifact_events.txt new file mode 100644 index 00000000..21c64d65 --- /dev/null +++ b/N3OW/events/artifacts/artifact_events.txt @@ -0,0 +1,4314 @@ + +namespace = artifact + +# An artifact has changed owners. +artifact.0011 = { + scope = artifact + hidden = yes + + trigger = { + NOT = { has_variable = suppress_artifact_notifications } + } + + immediate = { + save_scope_as = this_artifact + if = { + limit = { + scope:old_owner = { is_alive = yes } + } + scope:old_owner = { + send_interface_toast = { + type = msg_artifact_lost + title = artifact.0011.t + left_icon = scope:owner + right_icon = scope:this_artifact + custom_tooltip = artifact.0011.tooltip + } + } + } + + scope:owner = { + trigger_event = { + id = artifact.0012 + days = 0 + } + } + hidden_effect = { + if = { + limit = { has_variable = desecrated_artifact_var } + remove_variable = desecrated_artifact_var + } + } + } +} + +artifact.0012 = { + hidden = yes + + immediate = { + scope:owner = { + send_interface_toast = { + type = msg_artifact_gained + right_icon = scope:this_artifact + } + } + } +} + + + +# An artifact has been destroyed through damage! +artifact.0021 = { + scope = artifact + hidden = yes + + immediate = { + save_scope_as = this_artifact + if = { + limit = { + exists = scope:owner + scope:owner = { is_alive = yes } + } + scope:owner = { + send_interface_toast = { + title = artifact.0021.t + right_icon = scope:this_artifact + destroy_artifact = scope:this_artifact + } + } + } + } +} + +################################################## +# The Bell Tolls / Peace and Quiet +# by Ewan Cowhig Croft +# 0101 - 0110 +################################################## + +# The Bells of Santiago de Compostela get a new lease on life. +artifact.0101 = { + scope = artifact + hidden = yes + + trigger = { + has_variable = artefact_santiago_bells + } + + immediate = { + # Islamic conversions. + if = { + limit = { + has_artifact_modifier = bells_of_santiago_modifier + scope:owner = { + OR = { + religion = religion:islam_religion + # Non-Christian Islamic syncretics also have a vested interest in getting in on this. + AND = { + faith = { has_doctrine = tenet_islamic_syncretism } + NOT = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + } + } + } + } + # Reforge into an aquamanile, for the first time. + if = { + limit = { var:artefact_santiago_bells = 0 } + scope:owner = { save_scope_as = reforger } + # We're using the miscellaneous category. + if = { + limit = { artifact_type = miscellaneous_when_not_court } + reforge_artifact = { + modifier = former_bells_of_santiago_modifier + template = fp2_santiago_aquamanile_template + type = miscellaneous_when_not_court + visuals = fp2_santiago_aquamanile + name = fp2_santiago_aquamanile + description = fp2_santiago_aquamanile_desc + } + } + # We're into court artefacts. + else = { + reforge_artifact = { + modifier = former_bells_of_santiago_modifier + template = fp2_santiago_aquamanile_template + type = jug + visuals = fp2_santiago_aquamanile + name = fp2_santiago_aquamanile + description = fp2_santiago_aquamanile_desc + } + } + change_variable = { + name = artefact_santiago_bells + add = 1 + } + } + # Reforge back into an aquamanile after them dastardly Christians de-jug'd it. + else_if = { + limit = { var:artefact_santiago_bells >= 1 } + scope:owner = { save_scope_as = reforger } + # We're using the miscellaneous category. + if = { + limit = { artifact_type = miscellaneous_when_not_court } + reforge_artifact = { + modifier = former_bells_of_santiago_modifier + template = fp2_santiago_aquamanile_template + type = miscellaneous_when_not_court + visuals = fp2_santiago_aquamanile + name = fp2_santiago_aquamanile + description = fp2_santiago_aquamanile_melted_desc + } + } + # We're into court artefacts. + else = { + reforge_artifact = { + modifier = former_bells_of_santiago_modifier + template = fp2_santiago_aquamanile_template + type = jug + visuals = fp2_santiago_aquamanile + name = fp2_santiago_aquamanile + description = fp2_santiago_aquamanile_melted_desc + } + } + change_variable = { + name = artefact_santiago_bells + add = 1 + } + # If we're high enough up the melting chain, start a tally. + if = { + limit = { var:artefact_santiago_bells >= 5 } + set_artifact_description = fp2_santiago_aquamanile_melted_tally_desc + } + } + } + # Christian conversions. + else_if = { + limit = { + has_artifact_modifier = former_bells_of_santiago_modifier + scope:owner = { + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + # Non-Islamic Christian syncretics also have a vested interest in getting in on this. + AND = { + faith = { has_doctrine = tenet_christian_syncretism } + NOT = { religion = religion:islam_religion } + } + } + } + } + # Reforge back into bells. + scope:owner = { save_scope_as = reforger } + # We're using the miscellaneous category. + if = { + limit = { artifact_type = miscellaneous_when_not_court } + reforge_artifact = { + modifier = bells_of_santiago_modifier + visuals = fp2_santiago_bells + template = fp2_santiago_bells_template + type = miscellaneous_when_not_court + name = fp2_santiago_bells + description = fp2_santiago_bells_melted_desc + } + } + # We're into court artefacts. + else = { + reforge_artifact = { + modifier = bells_of_santiago_modifier + visuals = fp2_santiago_bells + template = fp2_santiago_bells_template + type = sculpture + name = fp2_santiago_bells + description = fp2_santiago_bells_melted_desc + } + } + change_variable = { + name = artefact_santiago_bells + add = 1 + } + # If we're high enough up the melting chain, start a tally. + if = { + limit = { var:artefact_santiago_bells >= 4 } + set_artifact_description = fp2_santiago_bells_melted_tally_desc + } + } + } +} + +# An artifact is about to change owner from succession +# Handles damage taken, and notification for the inheritor +artifact.0031 = { + scope = artifact + hidden = yes + + immediate = { + save_scope_as = this_artifact + if = { + limit = { + has_variable = artifact_succession_title #Is this an artifact that should follow a title? + var:artifact_succession_title = { is_title_created = yes } #Does the title the artifact should follow exist? + scope:old_owner = var:artifact_succession_title.previous_holder #Is the old owner of the artifact also the holder of the title the artifact should follow? + NOR = { + AND = { + has_variable = banner_dynasty + var:banner_dynasty != scope:owner.dynasty + } + AND = { + has_variable = banner_house + var:banner_house != scope:owner.house + } + } + } + var:artifact_succession_title = { + holder = { + save_scope_as = new_owner + } + } + set_owner = { #The artifact goes to the heir to the title it should follow. In a fraction of a tick this will be the new title holder. + target = scope:new_owner + history = { + type = inherited + recipient = scope:new_owner + } + } + } + else_if = { + limit = { exists = var:banner_house.house_head } + set_owner = { + target = var:banner_house.house_head + history = { + type = inherited + recipient = var:banner_house.house_head + } + } + } + else_if = { #this effect fires before the dynasty head change, but after the scope:old_owner death, so scope:old_owner can be still a dynast + limit = { exists = var:banner_dynasty.dynast } + if = { + limit = { + scope:old_owner != var:banner_dynasty.dynast + } + var:banner_dynasty.dynast = { save_scope_as = new_banner_owner } + } + else = { #hence this + scope:old_owner.house.house_head = { + save_scope_as = new_banner_owner + } + } + set_owner = { + target = scope:new_banner_owner + history = { + type = inherited + recipient = scope:new_banner_owner + } + } + } + if = { + limit = { + NOR = { + #An equipped court artifact of previous owner + has_variable = equipped_court_succession + #A historicool artifact + has_variable = historical_unique_artifact + #Inherited with special title + has_variable = artifact_succession_title + #Inherited from close relative + scope:old_owner = { is_close_family_of = scope:owner } + #Inherited by election + AND = { + exists = scope:old_owner.primary_title + scope:old_owner.primary_title = { has_title_law_flag = elective_succession_law } + } + # Succession caused the heir to change primary + trigger_if = { + limit = { exists = scope:old_primary } + scope:old_primary = scope:owner.primary_title + } + trigger_else = { + always = yes + } + } + } + if = { + limit = { + scope:old_owner = { + OR = { + is_close_or_extended_family_of = scope:owner + is_great_grandchild_of = scope:owner + is_great_grandparent_of = scope:owner + } + } + artifact_durability > 1 # We want to avoid destroying an artifact with an already low durability + } + # Remove 50% of remaining durability + add_durability = { + value = artifact_durability + multiply = -0.50 + } + } + else_if = { + limit = { + NOT = { has_variable = artifact_succession_title } + } + random_list = { + 25 = { + # Remove 50% of remaining durability + add_durability = { + value = artifact_durability + multiply = -0.50 + } + } + 25 = { + # Remove 75% of remaining durability + add_durability = { + value = artifact_durability + multiply = -0.75 + } + } + 50 = { + # Remove 100% of remaining durability (do not destroy yet, will cause errors!) + set_variable = destroy_me + } + } + } + } + # Cleanup variables of equipped court artifacts + if = { + limit = { + has_variable = equipped_court_succession + } + remove_variable = equipped_court_succession + } + if = { + # If the artifact has no durability left, destroy it now. + limit = { + OR = { + exists = var:destroy_me + artifact_durability <= 0 + } + } + destroy_artifact = root + # NOTE: We must not run ANY script after we destroy an artifact, or we will cause errors + } + else_if = { + limit = { + NAND = { + exists = scope:owner.last_played_character + scope:owner.last_played_character = scope:old_owner + } + } + scope:owner = { + send_interface_toast = { + type = msg_artifact_gained + right_icon = scope:this_artifact + } + } + hidden_effect = { + if = { + limit = { has_variable = desecrated_artifact_var } + remove_variable = desecrated_artifact_var + } + } + } + } +} + +artifact.1000 = { + scope = artifact + hidden = yes + + immediate = { + if = { + #You took too long and your treasure map broke from decay! + limit = { has_variable = 1025_treasure_map } + save_scope_as = decayed_artifact + scope:owner = { trigger_event = ep3_contract_event.0040 } + } + else_if = { + # Artifact is a character artifact (not a court artifact) + limit = { + category = inventory + exists = scope:owner + scope:owner = { + has_royal_court = yes + is_alive = yes + } + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = regalia + artifact_slot_type = helmet + } + } + save_scope_as = this_artifact + scope:owner = { + trigger_event = { + id = artifact.1001 + days = 0 + } + } + } + else = { + trigger_event = { + id = artifact.0021 + days = 0 + } + } + } +} + +scripted_effect reforge_as_court_artifact_effect = { + hidden_effect_new_object = { + if = { + limit = { + artifact_type = axe + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = axe_court + decaying = no + } + } + else_if = { + limit = { + artifact_type = hammer + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = hammer_court + decaying = no + } + } + else_if = { + limit = { + artifact_type = spear + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = spear_court + decaying = no + } + } + else_if = { + limit = { + artifact_type = mace + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = mace_court + decaying = no + } + } + else_if = { + limit = { + artifact_type = dagger + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = dagger_court + decaying = no + } + } + else_if = { + limit = { + artifact_type = sword + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = sword_court + decaying = no + } + } + else_if = { + limit = { + artifact_slot_type = armor + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = armor_court + decaying = no + } + } + else_if = { + limit = { + artifact_slot_type = helmet + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = crown_court + decaying = no + } + } + else_if = { + limit = { + artifact_slot_type = regalia + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = regalia_court + decaying = no + } + } + else = { + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = small_box + decaying = no + } + } + + add_scaled_artifact_modifier_grandeur_small_effect = yes + add_scaled_artifact_modifier_prestige_effect = yes + } +} + +artifact.1001 = { + type = character_event + title = artifact.1001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.1001.desc.antiquarian + } + desc = artifact.1001.desc.servant + } + first_valid = { + triggered_desc = { + trigger = { scope:this_artifact = { artifact_slot_type = primary_armament } } + desc = artifact.1001.desc.weapon + } + desc = artifact.1001.desc.other + } + } + theme = stewardship_wealth_focus + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = war_over_tie + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + immediate = { + random_dummy_gender_servant_effect = yes #needed for loc + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + } + } + random_court_position_holder = { + type = antiquarian_court_position + save_scope_as = antiquarian + } + } + } + + option = { + name = artifact.1001.a + # Flag that this is free for DLC artefacts that could become courtly ones... + if = { + limit = { exists = scope:this_artifact.var:dlc_potential_court_artefact } + custom_tooltip = artifact.1001.a.tt.free + } + # ... or else costs a nominal fee. + else = { remove_short_term_gold = medium_gold_value } + scope:this_artifact = { + reforge_as_court_artifact_effect = yes + } + send_interface_toast = { + title = artifact.0012.t + left_icon = scope:this_artifact + show_as_tooltip = { + scope:this_artifact = { + set_owner = root + } + } + } + custom_tooltip = artifact.1001.a.tt + ai_chance = { + base = 100 + modifier = { + factor = 0 + scope:this_artifact = { + rarity = common + } + } + modifier = { + factor = 0 + is_at_war = yes + } + modifier = { + factor = 0 + gold < medium_gold_value + } + } + } + + option = { + name = artifact.1001.b + show_as_tooltip = { destroy_artifact = scope:this_artifact } + scope:this_artifact = { trigger_event = artifact.0021 } + ai_chance = { + base = 100 + modifier = { + add = -95 + scope:this_artifact = { + OR = { + rarity = illustrious + rarity = famed + } + } + } + } + } +} + +# Outcome of challenge to a duel for artifact + +scripted_effect artifact_2002_apply_effect = { + if = { + limit = { + scope:target = { + can_be_claimed_by = scope:sc_loser + } + } + scope:sc_loser = { + if = { + limit = { + OR = { + has_variable = remove_claim_flag + has_personal_artifact_claim = scope:target + } + } + if = { + limit = { + NOT = { has_variable = remove_claim_flag } + } + set_variable = remove_claim_flag + } + remove_personal_artifact_claim = scope:target + } + } + } + scope:target = { + if = { + limit = { + OR = { + has_variable = set_owner_flag + artifact_owner = scope:sc_loser + } + } + if = { + limit = { + NOT = { has_variable = set_owner_flag } + } + set_variable = set_owner_flag + } + set_owner = { + target = scope:sc_victor + history = { + actor = scope:sc_loser + recipient = scope:sc_victor + type = won_in_duel + } + } + } + } +} +artifact.2001 = { + hidden = yes + + immediate = { + # Fire the follow-up stuff; delay this by a day so the toasts appear _after_ the final event. + trigger_event = { + id = artifact.2002 + days = 1 + } + } +} + +artifact.2002 = { + hidden = yes + + immediate = { + artifact_2002_apply_effect = yes + # Send out a toast to the victor. + scope:sc_victor = { + send_interface_toast = { + title = perk_interaction.0101.victor_toast.t + left_icon = scope:sc_loser + right_icon = scope:target + show_as_tooltip = { artifact_2002_apply_effect = yes } + } + } + # And to the loser. + scope:sc_loser = { + send_interface_toast = { + title = perk_interaction.0101.loser_toast.t + left_icon = scope:sc_victor + right_icon = scope:target + show_as_tooltip = { artifact_2002_apply_effect = yes } + } + if = { + limit = { has_variable = remove_claim_flag } + remove_variable = remove_claim_flag + } + } + scope:target = { + if = { + limit = { has_variable = set_owner_flag } + remove_variable = set_owner_flag + } + } + } +} + +### Degraded Artifacts Events ### + +# Reuse Materials + +artifact.3000 = { + type = character_event + title = artifact.3000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:antiquarian + scope:antiquarian = { has_court_position = armorer_camp_officer } + } + desc = artifact.3000.desc.armorer_intro + } + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.3000.desc.antiquarian_intro + } + desc = artifact.3000.desc.servant_intro + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.3000.desc.antiquarian + } + desc = artifact.3000.desc.servant + } + } + theme = stewardship_wealth_focus + cooldown = { years = 5 } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = war_over_win + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + trigger = { + trigger_if = { + limit = { exists = scope:artifact } + scope:artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_type = cabinet + artifact_type = chest + artifact_type = throne + artifact_type = sculpture + artifact_type = regalia + } + } + } + trigger_else = { + any_character_artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_type = cabinet + artifact_type = chest + artifact_type = throne + artifact_type = sculpture + artifact_type = regalia + } + } + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:artifact } + } + random_character_artifact = { + limit = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_type = cabinet + artifact_type = chest + artifact_type = throne + artifact_type = sculpture + artifact_type = regalia + } + } + save_scope_as = this_artifact + save_scope_as = artifact + } + } + else = { + scope:artifact = { + save_scope_as = this_artifact + } + } + if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + } + + # Option A: reuse + option = { + name = artifact.3000.a + if = { + limit = { + scope:this_artifact = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + } + } + } + add_character_modifier = artifact_3000_reusing_artifact_weapon_modifier + } + else_if = { + limit = { + scope:this_artifact = { + OR = { + artifact_type = cabinet + artifact_type = chest + artifact_type = throne + artifact_type = sculpture + } + } + } + add_character_modifier = artifact_3000_reusing_artifact_wood_modifier + } + else_if = { + limit = { + scope:this_artifact = { + artifact_type = regalia + } + } + add_character_modifier = artifact_3000_reusing_artifact_jewels_modifier + } + destroy_artifact = scope:this_artifact + ai_chance = { + base = 100 + } + } + + # Option B: you can still save it + option = { + name = artifact.3000.b + if = { + limit = { exists = scope:antiquarian } + scope:this_artifact = { + add_durability = { + value = artifact_durability + multiply = 7 + max = 60 + } + } + } + else = { + scope:this_artifact = { + add_durability = { + value = artifact_durability + multiply = 4 + max = 50 + } + } + } + remove_short_term_gold = { + value = scope:this_artifact.artifact_durability + multiply = 1.5 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + gold < scope:this_artifact.artifact_durability + add = -100 + } + } + } + + #Option C: get angry + option = { + name = artifact.3000.c + if = { + limit = { + exists = scope:antiquarian + } + scope:antiquarian = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + calm = minor_stress_impact_gain + trusting = minor_stress_impact_gain + irritable = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + } + } + } +} + +artifact.3001 = { + type = character_event + title = artifact.3001.t + desc = artifact.3001.desc + theme = stewardship_wealth_focus + right_portrait = { + character = scope:inspiration_owner + animation = happiness + } + + weight_multiplier = { + base = 1 + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + scope:inspiration_owner = { + is_available_ai_adult = yes + } + OR = { + AND = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + scope:inspiration_sponsor = { + has_character_modifier = artifact_3000_reusing_artifact_weapon_modifier + } + } + AND = { + has_inspiration_type = artisan_inspiration + scope:inspiration_sponsor = { + has_character_modifier = artifact_3000_reusing_artifact_wood_modifier + } + } + AND = { + has_inspiration_type = smith_inspiration + scope:inspiration_sponsor = { + has_character_modifier = artifact_3000_reusing_artifact_jewels_modifier + } + } + } + } + } + + option = { + name = artifact.3001.a + if = { + limit = { + scope:inspiration = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + } + has_character_modifier = artifact_3000_reusing_artifact_weapon_modifier + } + add_gold = { + value = scope:inspiration.inspiration_gold_invested + multiply = 0.4 + } + remove_character_modifier = artifact_3000_reusing_artifact_weapon_modifier + } + else_if = { + limit = { + scope:inspiration = { + has_inspiration_type = artisan_inspiration + } + has_character_modifier = artifact_3000_reusing_artifact_wood_modifier + } + add_gold = { + value = scope:inspiration.inspiration_gold_invested + multiply = 0.3 + } + remove_character_modifier = artifact_3000_reusing_artifact_wood_modifier + } + else_if = { + limit = { + scope:inspiration = { + has_inspiration_type = smith_inspiration + } + has_character_modifier = artifact_3000_reusing_artifact_jewels_modifier + } + add_gold = { + value = scope:inspiration.inspiration_gold_invested + multiply = 0.3 + } + remove_character_modifier = artifact_3000_reusing_artifact_jewels_modifier + } + } +} + +# Sell it for gold + +artifact.3010 = { + type = character_event + title = artifact.3010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:antiquarian + scope:antiquarian = { has_court_position = armorer_camp_officer } + } + desc = artifact.3000.desc.armorer_intro + } + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.3000.desc.antiquarian_intro + } + desc = artifact.3000.desc.servant_intro + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.3010.desc.antiquarian + } + desc = artifact.3010.desc.servant + } + } + theme = stewardship_wealth_focus + cooldown = { years = 5 } + left_portrait = { + character = ROOT + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = war_over_win + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + trigger_if = { + limit = { exists = scope:artifact } + scope:artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + trigger_else = { + any_character_artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:artifact } + } + random_character_artifact = { + limit = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + save_scope_as = this_artifact + save_scope_as = artifact + } + } + else = { + scope:artifact = { + save_scope_as = this_artifact + } + } + if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + } + + # Option A: sell to a scrap collector + option = { + name = artifact.3010.a + if = { + limit = { + exists = scope:antiquarian + } + add_gold = { + value = scope:this_artifact.artifact_wealth_quality_average_value + multiply = 3.5 + } + } + else = { + add_gold = { + value = scope:this_artifact.artifact_wealth_quality_average_value + multiply = 2.5 + } + } + hidden_effect = { destroy_artifact = scope:this_artifact } + custom_tooltip = artifact.3010.a.tt + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + # Option B: keep it + option = { + name = artifact.3010.b + ai_chance = { + base = 100 + } + } +} + +# The Antiquarian changes the Type of Artifact + +artifact.3020 = { + type = character_event + title = artifact.3020.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:antiquarian = { has_court_position = armorer_camp_officer } + } + desc = artifact.3000.desc.armorer_intro + } + desc = artifact.3000.desc.antiquarian_intro + } + desc = artifact.3020.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 5 } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = war_over_tie + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + trigger_if = { + limit = { exists = scope:artifact } + scope:artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + } + trigger_else = { + any_character_artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + } + trigger_if = { + limit = { has_government = landless_adventurer_government } + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + trigger_else = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:artifact } + } + random_character_artifact = { + limit = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + save_scope_as = this_artifact + save_scope_as = artifact + } + } + else = { + scope:artifact = { + save_scope_as = this_artifact + } + } + if = { + limit = { has_government = landless_adventurer_government } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + hidden_effect = { + save_scope_as = owner #for loc + scope:antiquarian = { + create_artifact = { + name = keepsake_trinket_name + description = keepsake_trinket_description + type = miscellaneous + visuals = small_box + modifier = artifact_monthly_prestige_2_modifier + save_scope_as = keepsake_trinket + } + } + if = { + limit = { + scope:this_artifact = { artifact_slot_type = primary_armament } + } + scope:keepsake_trinket = { + add_artifact_modifier = artifact_prowess_1_modifier + } + } + else_if = { + limit = { + scope:this_artifact = { artifact_slot_type = armor } + } + scope:keepsake_trinket = { + add_artifact_modifier = artifact_scheme_resistance_add_1_modifier + } + } + else_if = { + limit = { + scope:this_artifact = { artifact_slot_type = helmet } + } + scope:keepsake_trinket = { + add_artifact_modifier = artifact_parochial_vassal_opinion_1_modifier + } + } + else_if = { + limit = { + scope:this_artifact = { artifact_slot_type = regalia } + } + scope:keepsake_trinket = { + add_artifact_modifier = artifact_monthly_dynasty_prestige_1_modifier + } + } + } + } + + # Option A: Make it a trinket + option = { + name = artifact.3020.a + scope:keepsake_trinket = { + set_owner = root + } + hidden_effect = { destroy_artifact = scope:this_artifact } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + # Option B: repair it! + option = { + name = artifact.3020.b + if = { + limit = { exists = scope:antiquarian } + scope:this_artifact = { + add_durability = { + value = artifact_durability + multiply = 7 + max = 60 + } + } + } + remove_short_term_gold = { + value = scope:this_artifact.artifact_durability + multiply = 1.5 + } + hidden_effect = { destroy_artifact = scope:keepsake_trinket } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } +} + +# The Antiquarian tries a new preservation technique + +artifact.3030 = { + type = character_event + title = artifact.3030.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:antiquarian = { has_court_position = armorer_camp_officer } + } + desc = artifact.3000.desc.armorer_intro + } + desc = artifact.3000.desc.antiquarian_intro + } + desc = artifact.3030.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 5 } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = war_over_win + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + trigger_if = { + limit = { exists = scope:artifact } + scope:artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + trigger_else = { + any_character_artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + trigger_if = { + limit = { has_government = landless_adventurer_government } + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + trigger_else = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:artifact } + } + random_character_artifact = { + limit = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + save_scope_as = this_artifact + save_scope_as = artifact + } + } + else = { + scope:artifact = { + save_scope_as = this_artifact + } + } + if = { + limit = { has_government = landless_adventurer_government } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + } + + # Option A: try the technique + option = { + name = artifact.3030.a + scope:antiquarian = { + duel = { + skill = learning + value = high_skill_rating + 10 = { + #big success + compare_modifier = { + value = scope:duel_value + multiplier = medium_positive_duel_skill_multiplier #+50 when extremely skilled meets avarage + min = -20 + } + desc = artifact.3030.a.bigsuccess + root = { + send_interface_toast = { + title = artifact.3030.a.bigsuccess.t + scope:this_artifact = { + add_durability = { + value = artifact_max_durability + subtract = artifact_durability + } + set_max_durability = { + value = artifact_max_durability + add = { + value = artifact_max_durability + multiply = 0.3 + } + } + } + } + } + } + 40 = { + #success + desc = artifact.3030.a.success + compare_modifier = { + value = scope:duel_value + multiplier = low_positive_duel_skill_multiplier #+25 when extremely skilled meets avarage + } + root = { + send_interface_toast = { + title = artifact.3030.a.success.t + scope:this_artifact = { + add_durability = { + value = artifact_durability + multiply = 10 + max = artifact_max_durability + } + } + } + } + } + 40 = { + #failure + desc = artifact.3030.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = low_negative_duel_skill_multiplier #+-25 when extremely skilled meets avarage + } + root = { + send_interface_toast = { + title = artifact.3030.a.failure.t + scope:this_artifact = { + add_durability = { + value = artifact_durability + multiply = -1 + add = 1 + } + } + } + } + } + 10 = { + #big failure + desc = artifact.3030.a.bigfailure + compare_modifier = { + value = scope:duel_value + multiplier = medium_negative_duel_skill_multiplier #-50 when extremely skilled meets avarage + } + root = { + send_interface_toast = { + title = artifact.3030.a.bigfailure.t + destroy_artifact = scope:this_artifact + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.75 + } + } + } + + # Option B: NO + option = { + name = artifact.3030.b + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.75 + } + } + } +} + +# A vassal offers to pay for the reforging in exchange for something + +artifact.3040 = { + type = character_event + title = artifact.3040.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.3040.desc.antiquarian + } + desc = artifact.3040.desc.no_antiquarian + } + } + theme = stewardship_wealth_focus + cooldown = { years = 5 } + left_portrait = scope:antiquarian + right_portrait = { + character = scope:vassal + animation = schadenfreude + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + trigger_if = { + limit = { exists = scope:artifact } + scope:artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + trigger_else = { + any_character_artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + any_vassal = { + gold >= major_gold_value + is_available_ai_adult = yes + can_add_hook = { + type = favor_hook + target = root + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:artifact } + } + random_character_artifact = { + limit = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + save_scope_as = this_artifact + save_scope_as = artifact + } + } + else = { + scope:artifact = { + save_scope_as = this_artifact + } + } + random_vassal = { + limit = { + gold >= major_gold_value + is_available_ai_adult = yes + can_add_hook = { + type = favor_hook + target = root + } + } + save_scope_as = vassal + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + } + + # Option A: accept the offer, owe a favor + option = { + name = artifact.3040.a + scope:vassal = { + remove_short_term_gold = scope:this_artifact.reforge_artifact_cost + add_hook = { + type = favor_hook + target = root + } + } + scope:this_artifact = { + add_durability = { + value = artifact_max_durability + max = artifact_max_durability + } + } + ai_chance = { + base = 100 + } + } + + #Option B: use a favor + option = { + name = artifact.3040.b + trigger = { + has_hook_of_type = { + type = favor_hook + target = scope:vassal + } + } + scope:vassal = { + remove_short_term_gold = scope:this_artifact.reforge_artifact_cost + } + remove_hook = { + type = favor_hook + target = scope:vassal + } + scope:this_artifact = { + add_durability = { + value = artifact_max_durability + max = artifact_max_durability + } + } + ai_chance = { + base = 200 + } + } + + # Option C: refuse + option = { + name = artifact.3040.c + scope:vassal = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -0.5 + } + } + } +} + +# A high-quality artifact is reaching 0 durability + +artifact.3050 = { + scope = artifact + hidden = yes + + trigger = { + artifact_durability <= define:NInventory|ARTIFACT_VERY_LOW_DURABILITY + artifact_wealth_quality_average_value >= 75 + } + + immediate = { + save_scope_as = this_artifact + scope:owner = { + send_interface_message = { + type = event_stewardship_good_with_text + left_icon = scope:this_artifact + title = artifact.3050.t + desc = artifact.3050.desc + } + } + } +} + + +### Artifact modifiers events ### + +# Cursed artifact + +scripted_trigger artifact_4000_cursed_history_trigger = { + #One of the following has to be true: + OR = { + AND = { + has_variable = stolen_artifact + var:stolen_artifact >= 5 + } + AND = { + previous_owner ?= { + is_alive = no + exists = killer + } + OR = { + AND = { + exists = previous_owner_level_2 + previous_owner_level_2 = { + is_alive = no + exists = killer + } + } + AND = { + exists = previous_owner_level_3 + previous_owner_level_3 = { + is_alive = no + exists = killer + } + } + } + } + has_variable = ghost_cabinet + } + NOR = { + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = artifact_named_crown_var + has_variable = artifact_killer_var + has_variable = artifact_armor_var + has_variable = historical_unique_artifact + } +} + +scripted_trigger artifact_4000_cursed_creepy_trigger = { + OR = { + ep1_artifact_durability_lower_equal_percent_trigger = { PERCENT = 0.49 } + artifact_age >= 50 + } + NOR = { + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = artifact_named_crown_var + has_variable = artifact_killer_var + has_variable = artifact_armor_var + has_variable = historical_unique_artifact + } +} + +artifact.4000 = { + type = character_event + title = artifact.4000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4000.desc.antiquarian_intro + } + desc = artifact.4000.desc.servant_intro + } + first_valid = { + triggered_desc = { + trigger = { #stolen + has_variable = stolen_artifact + var:stolen_artifact >= 5 + } + desc = artifact.4000.desc.stolen + } + triggered_desc = { + trigger = { #assassinated + exists = scope:this_artifact.previous_owner + scope:this_artifact.previous_owner = { + is_alive = no + exists = killer + } + OR = { + AND = { + exists = scope:this_artifact.previous_owner_level_2 + scope:this_artifact.previous_owner_level_2 = { + is_alive = no + exists = killer + } + } + AND = { + exists = scope:this_artifact.previous_owner_level_3 + scope:this_artifact.previous_owner_level_3 = { + is_alive = no + exists = killer + } + } + } + } + desc = artifact.4000.desc.assassinated + } + triggered_desc = { + trigger = { #ghost + has_variable = ghost_cabinet + } + desc = artifact.4000.desc.ghost + } + desc = artifact.4000.desc.fallback + } + desc = artifact.4000.desc.end + } + theme = stewardship_wealth_focus + cooldown = { years = 15 } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + trigger = { exists = scope:antiquarian } + character = scope:antiquarian + animation = personality_irrational + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + trigger = { + OR = { + any_character_artifact = { #it has creepy history + artifact_4000_cursed_history_trigger = yes + } + AND = { #it's old and you are creepy + dread >= 75 + any_character_artifact = { + artifact_4000_cursed_creepy_trigger = yes + } + } + } + } + + immediate = { + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + random_character_artifact = { + limit = { + artifact_4000_cursed_history_trigger = yes + } + alternative_limit = { + artifact_4000_cursed_creepy_trigger = yes + } + save_scope_as = this_artifact + } + } + + #Option A: call for a holy man + option = { + name = artifact.4000.a + trigger_event = { + id = artifact.4001 + days = 35 + } + remove_short_term_gold = minor_gold_value + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: embrace the cursed reputation + option = { + name = artifact.4000.b + scope:this_artifact = { + set_variable = { + name = cursed_artifact_accepted_var + years = 30 + } + } + ai_chance = { + base = 90 + modifier = { + add = 50 + has_trait = sadistic + } + modifier = { + add = 50 + has_trait = callous + } + modifier = { + add = 100 + has_trait = torturer + } + } + } + + after = { + scope:this_artifact = { + set_artifact_name = artifact.4000.cursed_name + set_artifact_description = artifact.4000.cursed_desc + set_variable = { + name = cursed_artifact_var + } + add_artifact_modifier = cursed_artifact_modifier + } + } +} + +artifact.4001 = { # Holy man intervention + type = character_event + title = artifact.4001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4001.desc.antiquarian_intro + } + desc = artifact.4001.desc.servant_intro + } + desc = artifact.4001.desc + } + theme = stewardship_wealth_focus + left_portrait = { + character = ROOT + animation = worry + } + right_portrait = { + character = scope:holy_man + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + scope:this_artifact = { + artifact_owner = root + NOT = { has_variable = attempted_blessing_var } + } + } + + immediate = { + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + create_character = { + location = root.capital_province + culture = root.culture + template = local_saint_template + save_scope_as = holy_man + } + scope:this_artifact = { + set_variable = { + name = attempted_blessing_var + years = 15 + } + } + } + + option = { + name = artifact.4001.a + scope:holy_man = { + duel = { + skill = learning + value = high_skill_rating + 50 = { + desc = artifact.4001.a.success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + root = { + send_interface_toast = { + title = artifact.4001.a.success + left_icon = scope:this_artifact + scope:this_artifact = { + remove_artifact_modifier = cursed_artifact_modifier + remove_variable = cursed_artifact_var + } + } + } + } + 50 = { + desc = artifact.4001.a.failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + root = { + send_interface_toast = { + title = artifact.4001.a.failure + left_icon = scope:this_artifact + } + } + } + } + } + } + after = { + scope:holy_man = { + silent_disappearance_effect = yes + } + } +} + +artifact.4002 = { #you own a cursed artifact + type = character_event + title = artifact.4002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4002.desc.antiquarian_intro + } + desc = artifact.4002.desc.servant_intro + } + desc = artifact.4002.desc + } + theme = stewardship_wealth_focus + left_portrait = { + character = ROOT + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + has_variable = cursed_artifact_var + NOR = { + has_variable = attempted_blessing_var + has_variable = cursed_artifact_accepted_var + has_variable = artifact_named_crown_var + has_variable = artifact_killer_var + has_variable = artifact_armor_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + random_character_artifact = { + limit = { + has_variable = cursed_artifact_var + NOR = { + has_variable = attempted_blessing_var + has_variable = cursed_artifact_accepted_var + has_variable = artifact_named_crown_var + has_variable = artifact_killer_var + has_variable = artifact_armor_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + } + } + save_scope_as = this_artifact + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + } + #Option A: call for a holy man + option = { + name = artifact.4000.a + trigger_event = { + id = artifact.4001 + days = 35 + } + remove_short_term_gold = minor_gold_value + scope:this_artifact = { + set_variable = { + name = attempted_blessing_var + years = 15 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: embrace the cursed reputation + option = { + name = artifact.4000.b + scope:this_artifact = { + set_variable = { + name = cursed_artifact_accepted_var + years = 30 + } + } + if = { + limit = { + scope:this_artifact = { + has_artifact_modifier = cursed_artifact_modifier + } + } + scope:this_artifact = { + remove_artifact_modifier = cursed_artifact_modifier + add_artifact_modifier = very_cursed_artifact_modifier + } + } + ai_chance = { + base = 90 + modifier = { + add = 50 + has_trait = sadistic + } + modifier = { + add = 50 + has_trait = callous + } + modifier = { + add = 100 + has_trait = torturer + } + } + } +} + +# Killer weapon + +scripted_trigger artifact_4010_valid_weapon_trigger = { + artifact_slot_type = primary_armament + has_variable = artifact_battles_won_var + OR = { + AND = { + NOT = { has_variable = artifact_killer_var } + var:artifact_battles_won_var >= 15 + } + AND = { + has_variable = artifact_killer_var + var:artifact_killer_var = 15 + var:artifact_battles_won_var >= 30 + } + AND = { + has_variable = artifact_killer_var + var:artifact_killer_var = 30 + var:artifact_battles_won_var >= 50 + } + AND = { + has_variable = artifact_killer_var + var:artifact_killer_var = 50 + var:artifact_battles_won_var >= 100 + } + } + NOR = { + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + has_variable = artifact_duel_weapon_var + } +} + +artifact.4010 = { + type = character_event + title = artifact.4010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4010.desc.antiquarian_intro + } + desc = artifact.4010.desc.servant_intro + } + desc = artifact.4010.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 10 } + left_portrait = { + character = ROOT + animation = happiness + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + artifact_4010_valid_weapon_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_character_artifact = { + artifact_4010_valid_weapon_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 30 + } + add = 1 + } + modifier = { + any_character_artifact = { + artifact_4010_valid_weapon_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 50 + } + add = 2 + } + modifier = { + any_character_artifact = { + artifact_4010_valid_weapon_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 100 + } + add = 5 + } + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + immediate = { + random_character_artifact = { + limit = { + artifact_slot_type = primary_armament + has_variable = artifact_battles_won_var + NOR = { + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + has_variable = cursed_artifact_var + has_variable = artifact_duel_weapon_var + } + trigger_if = { + limit = { + NOT = { has_variable = artifact_killer_var } + } + var:artifact_battles_won_var >= 15 + } + trigger_else_if = { + limit = { + has_variable = artifact_killer_var + var:artifact_killer_var = 15 + } + var:artifact_battles_won_var >= 30 + } + trigger_else_if = { + limit = { + has_variable = artifact_killer_var + var:artifact_killer_var = 30 + } + var:artifact_battles_won_var >= 50 + } + trigger_else = { + var:artifact_battles_won_var >= 100 + } + } + save_scope_as = this_artifact + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + scope:this_artifact = { + if = { + limit = { + NOT = { has_variable = artifact_killer_var } + } + set_variable = { + name = artifact_killer_var + value = 15 + } + set_artifact_name = artifact_killer_1_name + set_artifact_description = artifact_killer_1_desc + add_artifact_modifier = artifact_killer_1_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_killer_var + var:artifact_killer_var = 15 + } + change_variable = { + name = artifact_killer_var + add = 15 + } + set_artifact_name = artifact_killer_2_name + set_artifact_description = artifact_killer_2_desc + add_artifact_modifier = artifact_killer_2_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_killer_var + var:artifact_killer_var = 30 + } + change_variable = { + name = artifact_killer_var + add = 20 + } + set_artifact_name = artifact_killer_3_name + set_artifact_description = artifact_killer_3_desc + add_artifact_modifier = artifact_killer_3_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_killer_var + var:artifact_killer_var = 50 + } + change_variable = { + name = artifact_killer_var + add = 50 + } + set_artifact_name = artifact_killer_4_name + set_artifact_description = artifact_killer_4_desc + add_artifact_modifier = artifact_killer_4_artifact_modifier + } + } + } + + option = { + name = artifact.4010.a + } +} + +# Glorious armor + +scripted_trigger artifact_4020_valid_armor_trigger = { + artifact_slot_type = armor + has_variable = artifact_battles_won_var + OR = { + AND = { + NOT = { has_variable = artifact_armor_var } + var:artifact_battles_won_var >= 15 + } + AND = { + has_variable = artifact_armor_var + var:artifact_armor_var = 15 + var:artifact_battles_won_var >= 30 + } + AND = { + has_variable = artifact_armor_var + var:artifact_armor_var = 30 + var:artifact_battles_won_var >= 50 + } + AND = { + has_variable = artifact_armor_var + var:artifact_armor_var = 50 + var:artifact_battles_won_var >= 100 + } + } + NOR = { + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + } +} + +artifact.4020 = { + type = character_event + title = artifact.4020.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4010.desc.antiquarian_intro + } + desc = artifact.4010.desc.servant_intro + } + desc = artifact.4020.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 10 } + left_portrait = { + character = ROOT + animation = happiness + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + artifact_4020_valid_armor_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_character_artifact = { + artifact_4020_valid_armor_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 30 + } + add = 1 + } + modifier = { + any_character_artifact = { + artifact_4020_valid_armor_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 50 + } + add = 2 + } + modifier = { + any_character_artifact = { + artifact_4020_valid_armor_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 100 + } + add = 5 + } + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + immediate = { + random_character_artifact = { + limit = { + artifact_slot_type = armor + has_variable = artifact_battles_won_var + NOR = { + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + has_variable = cursed_artifact_var + } + trigger_if = { + limit = { + NOT = { has_variable = artifact_armor_var } + } + var:artifact_battles_won_var >= 15 + } + trigger_else_if = { + limit = { + has_variable = artifact_armor_var + var:artifact_armor_var = 15 + } + var:artifact_battles_won_var >= 30 + } + trigger_else_if = { + limit = { + has_variable = artifact_armor_var + var:artifact_armor_var = 30 + } + var:artifact_battles_won_var >= 50 + } + trigger_else = { + var:artifact_battles_won_var >= 100 + } + } + save_scope_as = this_artifact + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + scope:this_artifact = { + if = { + limit = { + NOT = { has_variable = artifact_armor_var } + } + set_variable = { + name = artifact_armor_var + value = 15 + } + set_artifact_name = artifact_armor_1_name + set_artifact_description = artifact_armor_1_desc + add_artifact_modifier = artifact_armor_1_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_armor_var + var:artifact_armor_var = 15 + } + change_variable = { + name = artifact_armor_var + add = 15 + } + set_artifact_name = artifact_armor_2_name + set_artifact_description = artifact_armor_2_desc + add_artifact_modifier = artifact_armor_2_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_armor_var + var:artifact_armor_var = 30 + } + change_variable = { + name = artifact_armor_var + add = 20 + } + set_artifact_name = artifact_armor_3_name + set_artifact_description = artifact_armor_3_desc + add_artifact_modifier = artifact_armor_3_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_armor_var + var:artifact_armor_var = 50 + } + change_variable = { + name = artifact_armor_var + add = 50 + } + set_artifact_name = artifact_armor_4_name + set_artifact_description = artifact_armor_4_desc + add_artifact_modifier = artifact_armor_4_artifact_modifier + } + } + } + + option = { + name = artifact.4010.a + } +} + +# Official crown +scripted_trigger artifact_4030_valid_empire_crown = { + artifact_slot_type = helmet + AND = { + root = { highest_held_title_tier = tier_empire } + previous_owner ?= { highest_held_title_tier = tier_empire } + exists = previous_owner_level_2 + previous_owner_level_2 = { highest_held_title_tier = tier_empire } + exists = previous_owner_level_3 + previous_owner_level_3 = { highest_held_title_tier = tier_empire } + } + NOR = { + has_variable = artifact_named_crown_var + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + } +} + +scripted_trigger artifact_4030_valid_people_crown = { + artifact_slot_type = helmet + AND = { + root = { + primary_title = { save_temporary_scope_as = crown_title } + } + previous_owner ?= { has_primary_title = scope:crown_title } + exists = previous_owner_level_2 + previous_owner_level_2 = { has_primary_title = scope:crown_title } + exists = previous_owner_level_3 + previous_owner_level_3 = { has_primary_title = scope:crown_title } + } + NOR = { + has_variable = artifact_named_crown_var + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + } +} + +artifact.4030 = { + type = character_event + title = artifact.4030.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4030.desc.antiquarian_intro + } + desc = artifact.4030.desc.servant_intro + } + first_valid = { + triggered_desc = { + trigger = { + root = { highest_held_title_tier = tier_empire } + exists = scope:this_artifact.previous_owner + scope:this_artifact.previous_owner = { highest_held_title_tier = tier_empire } + exists = scope:this_artifact.previous_owner_level_2 + scope:this_artifact.previous_owner_level_2 = { highest_held_title_tier = tier_empire } + exists = scope:this_artifact.previous_owner_level_3 + scope:this_artifact.previous_owner_level_3 = { highest_held_title_tier = tier_empire } + } + desc = artifact.4030.desc_emperor + } + desc = artifact.4030.desc_kingdom + } + } + theme = stewardship_wealth_focus + cooldown = { years = 30 } + left_portrait = { + character = ROOT + animation = happiness + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + OR = { + artifact_4030_valid_empire_crown = yes + artifact_4030_valid_people_crown = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + immediate = { + primary_title = { + save_scope_as = primary_title_scope + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + random_character_artifact = { + limit = { + OR = { + artifact_4030_valid_empire_crown = yes + artifact_4030_valid_people_crown = yes + } + } + save_scope_as = this_artifact + } + scope:this_artifact = { + set_variable = artifact_named_crown_var + if = { + limit = { + artifact_4030_valid_empire_crown = yes + } + set_artifact_name = artifact_emperors_crown_name + set_artifact_description = artifact_emperors_crown_desc + add_artifact_modifier = artifact_emperors_crown_artifact_modifier + } + else = { #3 generations of owners have the same main title + set_artifact_name = artifact_crown_special_name + set_artifact_description = artifact_crown_special_desc + add_artifact_modifier = artifact_crown_artifact_modifier + } + } + } + + option = { + name = artifact.4010.a + } +} + +scripted_trigger artifact_4040_relevant_courtier_trigger = { + OR = { + prowess >= 20 + has_trait = education_martial_3 + has_trait = education_martial_4 + has_trait = education_martial_5 + has_trait = lifestyle_blademaster + has_trait = berserker + has_trait = varangian + has_trait = desert_warrior + has_trait = winter_soldier + has_trait = jungle_stalker + has_trait = rough_terrain_expert + has_trait = forest_fighter + has_trait = open_terrain_expert + has_trait = reaver + } +} + +# Helpful courtier improves artifact +artifact.4040 = { + type = character_event + title = artifact.4040.t + desc = artifact.4040.desc + theme = stewardship_wealth_focus + cooldown = { years = 30 } + left_portrait = { + character = ROOT + animation = happiness + } + right_portrait = { + character = scope:helpful + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + OR = { + artifact_slot_type = armor + artifact_slot_type = primary_armament + } + NOR = { + has_variable = cursed_artifact_var + has_variable = artifact_improved_var + } + } + OR = { + any_courtier_or_guest = { + artifact_4040_relevant_courtier_trigger = yes + } + any_knight = { + artifact_4040_relevant_courtier_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + random_character_artifact = { + limit = { + OR = { + artifact_slot_type = armor + artifact_slot_type = primary_armament + } + NOR = { + has_variable = cursed_artifact_var + has_variable = artifact_improved_var + } + } + save_scope_as = this_artifact + } + if = { + limit = { + any_courtier_or_guest = { + artifact_4040_relevant_courtier_trigger = yes + } + } + random_courtier_or_guest = { + limit = { + artifact_4040_relevant_courtier_trigger = yes + } + save_scope_as = helpful + } + } + else = { + random_knight = { + limit = { + artifact_4040_relevant_courtier_trigger = yes + } + save_scope_as = helpful + } + } + } + + #Option A: accept + option = { + name = artifact.4040.a + scope:this_artifact = { + set_variable = { + name = artifact_improved_var + years = 100 + } + } + if = { + limit = { + scope:helpful = { + can_add_hook = { + target = root + type = favor_hook + } + } + } + scope:helpful = { + add_hook = { + target = root + type = favor_hook + } + } + } + else = { + pay_short_term_gold = { + target = scope:helpful + gold = minor_gold_value + } + } + custom_tooltip = artifact.4040.a.tt + hidden_effect = { + if = { + limit = { + scope:helpful = { + has_trait = reaver + } + scope:this_artifact = { + NOR = { + has_artifact_modifier = artifact_raid_speed_2_modifier + has_artifact_modifier = artifact_raid_speed_3_modifier + has_artifact_modifier = artifact_raid_speed_4_modifier + } + } + } + scope:this_artifact = { + add_artifact_modifier = artifact_raid_speed_2_modifier + } + } + else_if = { + limit = { + scope:helpful = { + has_trait = open_terrain_expert + } + scope:this_artifact = { + NOT = { + has_artifact_modifier = artifact_heavy_cavalry_toughness_2_modifier + } + } + } + scope:this_artifact = { + add_artifact_modifier = artifact_heavy_cavalry_toughness_2_modifier + } + } + else_if = { + limit = { + scope:helpful = { + OR = { + has_trait = forest_fighter + has_trait = jungle_stalker + has_trait = desert_warrior + has_trait = winter_soldier + has_trait = berserker + } + } + scope:this_artifact = { + NOR = { + has_artifact_modifier = artifact_heavy_infantry_toughness_2_modifier + has_artifact_modifier = artifact_heavy_infantry_toughness_3_modifier + } + } + } + scope:this_artifact = { + add_artifact_modifier = artifact_heavy_infantry_toughness_2_modifier + } + } + else_if = { + limit = { + scope:helpful = { + has_trait = rough_terrain_expert + has_trait = lifestyle_blademaster + } + scope:this_artifact = { + NOR = { + has_artifact_modifier = artifact_knight_effectiveness_2_modifier + has_artifact_modifier = artifact_knight_effectiveness_3_modifier + has_artifact_modifier = artifact_knight_effectiveness_4_modifier + } + } + } + scope:this_artifact = { + add_artifact_modifier = artifact_knight_effectiveness_2_modifier + } + } + else_if = { + limit = { + scope:this_artifact = { + NOR = { + has_artifact_modifier = artifact_prowess_4_modifier + has_artifact_modifier = artifact_prowess_5_modifier + has_artifact_modifier = artifact_prowess_6_modifier + } + } + } + scope:this_artifact = { + add_artifact_modifier = artifact_prowess_4_modifier + } + } + else = { + scope:this_artifact = { + add_artifact_modifier = artifact_heavy_infantry_toughness_3_modifier + } + } + } + ai_chance = { + base = 150 + } + } + + #Option B: refuse + option = { + name = artifact.4040.b + ai_chance = { + base = 50 + modifier = { + has_trait = arrogant + add = 50 + } + } + } +} + +# Stress damage +artifact.4050 = { + type = character_event + title = artifact.4050.t + desc = artifact.4050.desc + theme = stewardship_wealth_focus + cooldown = { years = 20 } + left_portrait = { + character = root + animation = rage + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + is_landed = yes + OR = { + AND = { + has_trait = irritable + stress_level >= 1 + } + AND = { + has_trait = wrathful + stress_level >= 2 + } + AND = { + NOT = { has_trait = calm } + stress_level >= 3 + } + } + any_character_artifact = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = helmet + artifact_slot_type = regalia + artifact_slot_type = book + artifact_slot_type = pedestal + artifact_slot_type = miscellaneous + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + immediate = { + random_character_artifact = { + limit = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = helmet + artifact_slot_type = regalia + artifact_slot_type = book + artifact_slot_type = pedestal + artifact_slot_type = miscellaneous + } + } + save_scope_as = this_artifact + } + scope:this_artifact = { + # Remove 50% of remaining durability + add_durability = { + value = artifact_durability + multiply = -0.50 + } + } + } + + option = { + name = artifact.4050.a + stress_impact = { + base = medium_stress_impact_loss + wrathful = major_stress_impact_loss + irritable = massive_stress_impact_loss + } + } +} + +#Blessed artifact + +scripted_trigger artifact_4060_valid_artifact_trigger = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = helmet + artifact_slot_type = regalia + artifact_slot_type = sculpture + artifact_slot_type = armor + artifact_slot_type = throne + } + NOR = { + has_variable = cursed_artifact_var + has_variable = artifact_named_crown_var + has_variable = artifact_killer_var + has_variable = artifact_armor_var + has_variable = blessed_artifact_var + } +} + +artifact.4060 = { + type = character_event + title = artifact.4060.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4001.desc.antiquarian_intro + } + desc = artifact.4001.desc.servant_intro + } + desc = artifact.4060.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 30 } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:holy_man + animation = personality_zealous + } + lower_right_portrait = { + trigger = { exists = scope:antiquarian } + character = scope:antiquarian + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + artifact_4060_valid_artifact_trigger = yes + } + piety_level >= 3 + NOT = { + has_trait = arbitrary + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + random_character_artifact = { + limit = { + artifact_4060_valid_artifact_trigger = yes + } + save_scope_as = this_artifact + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + create_character = { + location = root.capital_province + culture = root.culture + template = local_saint_template + save_scope_as = holy_man + } + } + + #Option A: accept the blessing + option = { + name = artifact.4060.a + scope:this_artifact = { + set_variable = blessed_artifact_var + add_artifact_modifier = blessed_artifact_modifier + set_artifact_name = artifact_4060_blessed_artifact_name + set_artifact_description = artifact_4060_blessed_artifact_desc + } + remove_short_term_gold = medium_gold_value + stress_impact = { + cynical = major_stress_impact_gain + greedy = major_stress_impact_gain + zealous = major_stress_impact_loss + } + } + + #Option B: refuse + option = { + name = artifact.4060.b + stress_impact = { + cynical = major_stress_impact_loss + zealous = major_stress_impact_gain + } + } +} + +# Desecrated relic + +scripted_trigger artifact_4070_valid_relic_trigger = { + has_variable = relic + trigger_if = { + limit = { + var:relic = flag:christian + } + previous_owner ?= { + NOT = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + } + } + trigger_else_if = { + limit = { + var:relic = flag:islamic + } + previous_owner ?= { + NOT = { faith.religion = religion:islam_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:buddhism + } + previous_owner ?= { + NOT = { faith.religion = religion:buddhism_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:zoroastr + } + previous_owner ?= { + NOT = { faith.religion = religion:zoroastrianism_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:jainism + } + previous_owner ?= { + NOT = { faith.religion = religion:jainism_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:judaism + } + previous_owner ?= { + NOT = { faith.religion = religion:judaism_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:germanic + } + previous_owner ?= { + NOT = { faith.religion = religion:germanic_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:slavic + } + previous_owner ?= { + NOT = { faith.religion = religion:slavic_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:boog + } + previous_owner ?= { + NOT = { faith.religion = religion:west_african_roog_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:hinduism + } + previous_owner ?= { + NOT = { faith.religion = religion:hinduism_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:finno_ugric_religion + } + previous_owner ?= { + NOT = { faith.religion = religion:finno_ugric_religion } + } + } + trigger_else = { + always = no #Can't be a desecrated relic with no associated religion + } +} + +artifact.4070 = { + type = character_event + title = artifact.4070.t + desc = artifact.4070.desc + theme = stewardship_wealth_focus + cooldown = { years = 15 } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:chaplain + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + is_landed = yes + cp:councillor_court_chaplain ?= { is_available_ai_adult = yes } + any_character_artifact = { + artifact_4070_valid_relic_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_ai_adult = yes } + } + cp:councillor_court_chaplain = { + save_scope_as = chaplain + } + } + random_character_artifact = { + limit = { + artifact_4070_valid_relic_trigger = yes + } + save_scope_as = this_artifact + } + scope:this_artifact = { + add_artifact_modifier = desecrated_artifact_modifier + set_variable = desecrated_artifact_var + } + } + + #Option A: religious cerimony + option = { + name = artifact.4070.a + remove_short_term_gold = major_gold_value + scope:this_artifact = { + remove_artifact_modifier = desecrated_artifact_modifier + remove_variable = desecrated_artifact_var + } + add_piety = medium_piety_gain + ai_chance = { + base = 105 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { + gold < major_gold_value + factor = 0 + } + } + } + + #Option B: just superstition + option = { + name = artifact.4070.b + add_piety = medium_piety_loss + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = -1 + } + } + } +} + +# Many duels won + +scripted_trigger artifact_4080_valid_weapon_trigger = { + artifact_slot_type = primary_armament + has_variable = artifact_duel_var + OR = { + AND = { + NOT = { has_variable = artifact_duel_weapon_var } + var:artifact_duel_var >= 5 + } + AND = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 5 + var:artifact_duel_var >= 10 + } + AND = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 10 + var:artifact_duel_var >= 20 + } + AND = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 20 + var:artifact_duel_var >= 30 + } + } + NOR = { + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + has_variable = artifact_killer_var + } +} + +artifact.4080 = { + type = character_event + title = artifact.4080.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4010.desc.antiquarian_intro + } + desc = artifact.4010.desc.servant_intro + } + desc = artifact.4080.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 10 } + left_portrait = { + character = ROOT + animation = happiness + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + artifact_4080_valid_weapon_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_character_artifact = { + artifact_4080_valid_weapon_trigger = yes + has_variable = artifact_duel_var + var:artifact_duel_var > 10 + } + add = 1 + } + modifier = { + any_character_artifact = { + artifact_4080_valid_weapon_trigger = yes + has_variable = artifact_duel_var + var:artifact_duel_var > 20 + } + add = 2 + } + modifier = { + any_character_artifact = { + artifact_4080_valid_weapon_trigger = yes + has_variable = artifact_duel_var + var:artifact_duel_var > 30 + } + add = 5 + } + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + immediate = { + random_character_artifact = { + limit = { + artifact_4080_valid_weapon_trigger = yes + } + save_scope_as = this_artifact + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + scope:this_artifact = { + if = { + limit = { + NOT = { has_variable = artifact_duel_weapon_var } + } + set_variable = { + name = artifact_duel_weapon_var + value = 5 + } + set_artifact_name = artifact_duel_weapon_1_name + set_artifact_description = artifact_duel_weapon_1_desc + add_artifact_modifier = artifact_duel_weapon_1_modifier + } + else_if = { + limit = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 5 + } + change_variable = { + name = artifact_duel_weapon_var + add = 5 + } + set_artifact_name = artifact_duel_weapon_2_name + set_artifact_description = artifact_duel_weapon_2_desc + add_artifact_modifier = artifact_duel_weapon_2_modifier + } + else_if = { + limit = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 10 + } + change_variable = { + name = artifact_duel_weapon_var + add = 10 + } + set_artifact_name = artifact_duel_weapon_3_name + set_artifact_description = artifact_duel_weapon_3_desc + add_artifact_modifier = artifact_duel_weapon_3_modifier + } + else_if = { + limit = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 20 + } + change_variable = { + name = artifact_duel_weapon_var + add = 10 + } + set_artifact_name = artifact_duel_weapon_4_name + set_artifact_description = artifact_duel_weapon_4_desc + add_artifact_modifier = artifact_duel_weapon_4_modifier + } + } + } + + option = { + name = artifact.4010.a + } +} + +artifact.4090 = { #Embed a relic in pommel by Daniel Moore + type = character_event + title = artifact.4090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4090.desc.antiquarian + } + desc = artifact.4090.desc + } + } + theme = stewardship_wealth_focus + cooldown = { years = 10 } + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { + target = scope:this_artifact + position = lower_left_portrait + } + + artifact = { + target = scope:that_artifact + position = lower_right_portrait + } + + + trigger = { + any_character_artifact = { + artifact_slot_type = primary_armament + NOT = { + has_variable = added_relic + } + } + + any_character_artifact = { + exists = var:relic + } + OR = { + employs_court_position = antiquarian_court_position + employs_court_position = armorer_camp_officer + } + } + + immediate = { + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + } + } + random_court_position_holder = { + type = antiquarian_court_position + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + + random_character_artifact = { + limit = { + artifact_slot_type = primary_armament + NOT = { + has_variable = added_relic + } + } + save_scope_as = this_artifact + } + + random_character_artifact = { + limit = { + exists = var:relic + } + save_scope_as = that_artifact + } + } + + option = { + name = artifact.4090.a + scope:this_artifact = { + set_artifact_name = relic_weapon_name + set_artifact_description = artifact_weapon_relic_desc + set_variable = added_relic + hidden_effect = { + copy_artifact_modifiers = scope:that_artifact + set_artifact_rarity = illustrious + } + } + + send_interface_toast = { + title = artifact.4090.a.tt + left_icon = root + right_icon = scope:this_artifact + custom_tooltip = embedded_not_destroyed_tooltip + } + + scope:that_artifact = { + hidden_effect = { + destroy_artifact = this + } + } + + stress_impact = { + zealous = minor_stress_gain + lazy = minor_stress_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + } + } + } + + + option = { + name = artifact.4090.b + add_piety = 100 + stress_impact = { + zealous = minor_stress_loss + lazy = minor_stress_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + +} + +# Your soldier found a banner after winning a battle! +artifact.6000 = { + scope = combat_side + hidden = yes + + trigger = { + side_primary_participant = { + has_royal_court = yes + } + enemy_side.side_primary_participant = { + is_landed = yes # We don't want to collect banners from peasant revolts... + } + } + + weight_multiplier = { + base = 1 + modifier = { + side_primary_participant = { + has_royal_court = yes + has_court_type = court_warlike + } + add = 1 + } + modifier = { + side_primary_participant = { + exists = side_primary_participant.dynasty + dynasty = { has_dynasty_perk = fp1_pillage_legacy_4 } + } + add = 1 + } + } + + immediate = { + if = { + limit = { + exists = enemy_side.side_commander + } + enemy_side.side_commander = { + save_scope_as = enemy_commander + } + } + if = { + limit = { + exists = side_commander + } + side_commander = { + save_scope_as = friendly_commander + } + } + enemy_side.side_primary_participant = { + save_scope_as = enemy_battle_owner + } + combat.location = { + save_scope_as = combat_location + } + + side_primary_participant = { + trigger_event = { id = artifact.6001 } + } + } +} + +artifact.6001 = { + type = character_event + title = artifact.6001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:friendly_commander = { this = root } + } + desc = artifact.6001.desc.commander + } + desc = artifact.6001.desc + } + first_valid = { + triggered_desc = { + trigger = { has_character_flag = found_banner_looting } + desc = artifact.6001.desc.looting + } + desc = artifact.6001.desc.killed_defender + } + } + theme = battle + left_portrait = { + character = scope:friendly_commander + animation = celebrate_sword + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + # based on where the scope is set, they might not exist when the event is fired + exists = scope:enemy_commander + exists = scope:friendly_commander + } + + immediate = { + hidden_effect = { + set_variable = { + name = epic_battle_location + value = scope:combat_location + } + random_list = { # Pick a random desc + 10 = { # Soldier found it while looting + add_character_flag = found_banner_looting + } + 10 = { # Taken from a valiant last stand + add_character_flag = found_banner_killing_defenders + } + } + random_list = { # Pick a CoA for the banner... + 10 = { # ... From the enemy commander + trigger = { + scope:enemy_commander = { + is_ruler = yes + } + } + set_variable = { + name = epic_loser + value = scope:enemy_commander + } + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:enemy_commander + TARGET = scope:enemy_commander.primary_title + } + } + 30 = { # ... From the opposing leader (army owner) + set_variable = { + name = epic_loser + value = scope:enemy_battle_owner + } + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:enemy_commander + TARGET = scope:enemy_battle_owner.primary_title + } + } + } + } + } + + option = { # Add it to the collection! + name = artifact.6001.a + scope:enemy_battle_owner = { + send_interface_toast = { + title = artifact.6001.toast + left_icon = root + right_icon = scope:newly_created_artifact + show_as_tooltip = { + scope:newly_created_artifact = { + set_owner = { target = root } + } + } + add_personal_artifact_claim = scope:newly_created_artifact + add_prestige = minor_prestige_loss + } + } + } + + option = { # We don't need this useless trinket! + name = artifact.6001.b + + add_prestige = minor_prestige_gain + destroy_artifact = scope:newly_created_artifact + } + + after = { + remove_character_flag = found_banner_looting + remove_character_flag = found_banner_killing_defenders + remove_variable = epic_battle_location + remove_variable = epic_loser + } +} + +artifact.7000 = { + type = character_event + title = artifact.7000.t + desc = artifact.7000.desc + theme = prison + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:skull_boiler + triggered_animation = { + trigger = { + scope:skull_boiler = { + NOT = { + has_court_position = executioner_court_position + } + } + } + animation = disbelief + } + triggered_animation = { + trigger = { + scope:skull_boiler = { + has_court_position = executioner_court_position + } + } + animation = personality_vengeful + } + } + lower_left_portrait = scope:skull_to_boil + + cooldown = { years = 10 } + + trigger = { + any_courtier = { + is_available_ai_adult = yes + } + } + + immediate = { + random_courtier = { + limit = { + is_available_ai_adult = yes + has_court_position = executioner_court_position + } + alternative_limit = { + is_available_ai_adult = yes + OR = { + has_court_position = antiquarian_court_position + has_court_position = court_physician_court_position + } + } + alternative_limit = { + is_available_ai_adult = yes + } + save_scope_as = skull_boiler + } + } + + option = { + name = artifact.7000.a + + custom_tooltip = artifact.7000.a.boil_skull + + scope:skull_boiler = { + if = { + limit = { + has_court_position = executioner_court_position + } + } + else_if = { + limit = { + OR = { + has_court_position = antiquarian_court_position + has_court_position = court_physician_court_position + } + } + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -30 + } + } + else = { + add_opinion = { + target = root + modifier = absolutely_horrified_opinion + } + } + } + + hidden_effect_new_object = { + create_artifact_pedestal_human_skull_effect = { + OWNER = root + CREATOR = scope:skull_boiler + DESKULLED = scope:skull_to_boil + } + scope:newly_created_artifact = { + set_artifact_description = artifact_rival_skull + } + } + } + + option = { + name = artifact.7000.b + + } +} diff --git a/N3OW/events/court_events/01_ep3_court_events_3.txt b/N3OW/events/court_events/01_ep3_court_events_3.txt new file mode 100644 index 00000000..125fd7cb --- /dev/null +++ b/N3OW/events/court_events/01_ep3_court_events_3.txt @@ -0,0 +1,3474 @@ +namespace = court_events + +# High court fashion: foreign rulers admire and envy you as the peak of class and elegance, can you capitalize on this reputation? +court_events.3000 = { + type = court_event + title = court_events.3000.t + desc = court_events.3000.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:chancellor + roles = { + scope:chancellor = { + group = event_group + animation = debating + } + root = { + group = event_group + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + scope:steward = { + group = event_group + animation = personality_content + } + } + } + + trigger = { + exists = cp:councillor_chancellor + exists = cp:councillor_steward + amenity_level = { + target = court_fashion + value >= 4 + } + NOT = { + any_neighboring_top_liege_realm_owner = { + has_royal_court = yes + amenity_level = { + target = court_fashion + value > 4 + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + amenity_level = { + target = court_fashion + value = 5 + } + add = 0.5 + } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_chancellor = { + court_event_character_flag_effect = yes + save_scope_as = chancellor + } + cp:councillor_steward = { + court_event_character_flag_effect = yes + save_scope_as = steward + } + } + + # Option A: Increase opinion abroad + option = { + name = court_events.3000.a + add_character_modifier = { + modifier = court_fashion_foreign_modifier + years = 20 + } + stress_impact = { + arrogant = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_sociability = 0.5 + } + } + } + + # Option B: Spread culture + option = { + name = court_events.3000.b + add_character_modifier = { + modifier = court_fashion_culture_modifier + years = 20 + } + stress_impact = { + gregarious = minor_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_boldness = -0.5 + } + } + } + + # Option C: sell fashion + option = { + name = court_events.3000.c + add_character_modifier = { + modifier = court_fashion_sell_modifier + years = 20 + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + after = { + clear_court_event_participation = yes + scope:chancellor = { clear_court_event_participation = yes } + scope:steward = { clear_court_event_participation = yes } + } +} + +# Low court food: Someone complains that it's always the same soup every day +court_events.3010 = { + type = court_event + title = court_events.3010.t + desc = court_events.3010.desc + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:courtier + roles = { + scope:courtier = { + group = event_group + animation = beg + } + root = { + group = event_group + animation = thinking + } + } + } + + trigger = { + amenity_level = { + target = court_food_quality + value <= 2 + } + any_courtier_or_guest = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + } + + weight_multiplier = { + base = 1 + modifier = { + amenity_level = { + target = court_food_quality + value <= 1 + } + add = 0.5 + } + modifier = { + any_courtier_or_guest = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + has_trait = gluttonous + } + add = 0.5 + } + modifier = { + any_courtier_or_guest = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + has_trait = comfort_eater + } + add = 0.5 + } + } + + immediate = { + court_event_character_flag_effect = yes + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + OR = { + has_trait = gluttonous + has_trait = comfort_eater + } + } + alternative_limit = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + save_scope_as = courtier + } + scope:courtier = { court_event_character_flag_effect = yes } + } + + # Option A: Hire chefs + option = { + name = court_events.3010.a + trigger = { + NOT = { government_has_flag = government_is_tribal } + } + remove_short_term_gold = minor_gold_value + set_amenity_level = { type = court_food_quality value = 3 } + custom_tooltip = cheaper_food_for_15_years + add_character_flag = { + flag = court_cheaper_food + years = 15 + } + stress_impact = { + greedy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + humble = medium_stress_impact_gain + temperate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + modifier = { + has_trait = paranoid + factor = 0 + } + } + } + + # Option B: it's healthy and pious! + option = { + name = court_events.3010.b + add_character_modifier = { + modifier = healthy_and_modest_diet_modifier + years = 15 + } + stress_impact = { + arrogant = medium_stress_impact_gain + gluttonous = major_stress_impact_gain + comfort_eater = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + } + modifier = { + has_trait = lifestyle_physician + add = 50 + } + modifier = { + has_trait = whole_of_body + add = 50 + } + modifier = { + has_trait = paranoid + factor = 0.5 + } + } + } + # Option C: it's for my safety + option = { + name = court_events.3010.c + flavor = court_events.3010.c.tt + add_character_modifier = { + modifier = cant_poison_soup_modifier + years = 15 + } + stress_impact = { + gregarious = medium_stress_impact_gain + trusting = major_stress_impact_gain + gluttonous = major_stress_impact_gain + comfort_eater = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + } + modifier = { + has_trait = paranoid + add = 200 + } + modifier = { + has_trait = trusting + factor = 0 + } + } + } + after = { + clear_court_event_participation = yes + scope:courtier = { clear_court_event_participation = yes } + } +} + +# Low court lodgings: crappy living conditions increase the spread of sickness, what do you do? +court_events.3020 = { + type = court_event + title = court_events.3020.t + desc = { + desc = court_events.3020.desc + triggered_desc = { + trigger = { + exists = scope:physician + } + desc = court_events.3020.desc_physician + } + triggered_desc = { + trigger = { + exists = scope:architect + } + desc = court_events.3020.desc_architect + } + } + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:courtier + roles = { + scope:courtier = { + group = event_group + animation = beg + } + root = { + group = event_group + animation = thinking + } + scope:physician ?= { + group = event_group + animation = physician + } + } + } + + trigger = { + amenity_level = { + target = court_lodging_standards + value <= 2 + } + any_courtier_or_guest = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + NOR = { + has_court_position = court_physician_court_position + has_court_position = royal_architect_court_position + } + } + } + + weight_multiplier = { + base = 0.5 + modifier = { + add = 0.5 + amenity_level = { + target = court_lodging_standards + value <= 1 + } + } + modifier = { + add = 0.5 + court_position:court_physician_court_position ?= { + aptitude = { + court_position = court_physician_court_position + value >= 3 + } + } + } + modifier = { + add = 1 + capital_province = { + any_province_epidemic = { } + } + } + modifier = { + add = 0.5 + capital_county = { + any_neighboring_county = { + has_province_with_epidemic = { intensity = any } + } + } + } + } + + immediate = { + court_event_character_flag_effect = yes + if = { + limit = { + employs_court_position = court_physician_court_position + court_position:court_physician_court_position = { + is_available_ai_adult = yes + NOT = { has_court_position = royal_architect_court_position } + } + } + court_position:court_physician_court_position = { + save_scope_as = physician + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = royal_architect_court_position + court_position:royal_architect_court_position = { + is_available_ai_adult = yes + NOT = { has_court_position = court_physician_court_position } + } + } + court_position:royal_architect_court_position = { + save_scope_as = architect + court_event_character_flag_effect = yes + } + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + NOR = { + has_court_position = court_physician_court_position + has_court_position = royal_architect_court_position + } + } + save_scope_as = courtier + court_event_character_flag_effect = yes + } + if = { + limit = { + exists = scope:physician + NOT = { exists = scope:architect } + } + scope:physician = { save_scope_as = expert } + } + if = { + limit = { + exists = scope:architect + NOT = { exists = scope:physician } + } + scope:architect = { save_scope_as = expert } + } + } + + # Option A: improve lodgings and epidemics resistance + option = { + name = court_events.3020.a + trigger = { + NOR = { + government_has_flag = government_is_tribal + employs_court_position = court_physician_court_position + employs_court_position = royal_architect_court_position + } + } + remove_short_term_gold = minor_gold_value + if = { + limit = { + NOT = { government_has_flag = government_is_tribal } + } + set_amenity_level = { type = court_lodging_standards value = 3 } + } + capital_province = { + add_province_modifier = { + modifier = lodgings_epidemics_resistance_modifier + years = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 1 + } + } + } + + # Option B: physician or architect - improve lodgings and epidemics resistance better + option = { + name = court_events.3020.b + trigger = { + NOT = { government_has_flag = government_is_tribal } + OR = { + employs_court_position = court_physician_court_position + employs_court_position = royal_architect_court_position + } + NAND = { + employs_court_position = court_physician_court_position + employs_court_position = royal_architect_court_position + } + } + remove_short_term_gold = minor_gold_value + if = { + limit = { + NOT = { government_has_flag = government_is_tribal } + } + set_amenity_level = { type = court_lodging_standards value = 3 } + custom_tooltip = cheaper_lodgings_for_15_years + } + capital_province = { + add_province_modifier = { + modifier = lodgings_epidemics_resistance_modifier_1 + years = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_rationality = 1 + ai_compassion = 0.5 + } + } + } + + # Option C: physician and architect - improve lodgings and epidemics resistance cheaper and better + option = { + name = court_events.3020.c + trigger = { + employs_court_position = court_physician_court_position + employs_court_position = royal_architect_court_position + } + if = { + limit = { + NOT = { government_has_flag = government_is_tribal } + } + set_amenity_level = { type = court_lodging_standards value = 3 } + custom_tooltip = cheaper_lodgings_for_15_years_1 + } + capital_province = { + add_province_modifier = { + modifier = lodgings_epidemics_resistance_modifier_2 + years = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_rationality = 1 + ai_compassion = 0.5 + } + } + } + + # Option D: it's fiiiine + option = { + name = court_events.3020.d + capital_province = { + add_province_modifier = { + modifier = lodgings_epidemics_no_resistance_modifier + years = 15 + } + } + stress_impact = { + base = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = -0.5 + } + } + } + after = { + clear_court_event_participation = yes + scope:physician ?= { clear_court_event_participation = yes } + scope:architect ?= { clear_court_event_participation = yes } + scope:courtier = { clear_court_event_participation = yes } + } +} + +# High court lodgings: an inspired character improves their inspiration +court_events.3030 = { + type = court_event + title = court_events.3030.t + desc = court_events.3030.desc + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:inspiration_owner + roles = { + scope:inspiration_owner = { + group = event_group + animation = ecstasy + } + root = { + group = event_group + animation = happiness + } + } + } + + trigger = { + has_royal_court = yes + exists = scope:inspiration + scope:inspiration_owner = { + is_available_ai_adult = yes + inspiration = { #Since they're away adventuring + NOT = { has_inspiration_type = adventure_inspiration } + } + NOR = { + has_character_flag = fund_weapon_inspiration_event_cooldown + has_character_flag = fund_armor_inspiration_event_cooldown + has_character_flag = fund_book_inspiration_event_cooldown + has_character_flag = fund_weaver_inspiration_event_cooldown + has_character_flag = fund_adventure_inspiration_event_cooldown + has_character_flag = fund_artisan_inspiration_event_cooldown + has_character_flag = fund_smith_inspiration_event_cooldown + has_character_flag = fund_alchemy_inspiration_event_cooldown + has_character_flag = fund_research_inspiration_event_cooldown + has_character_flag = fund_bow_inspiration_event_cooldown + } + } + amenity_level = { + target = court_lodging_standards + value >= 4 + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + amenity_level = { + target = court_lodging_standards + value >= 5 + } + } + } + + immediate = { + court_event_character_flag_effect = yes + scope:inspiration_owner = { + if = { + limit = { + inspiration = { has_inspiration_type = weapon_inspiration } + } + add_character_flag = { + flag = fund_weapon_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = armor_inspiration } + } + add_character_flag = { + flag = fund_armor_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = book_inspiration } + } + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = weaver_inspiration } + } + add_character_flag = { + flag = fund_weaver_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = adventure_inspiration } + } + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = artisan_inspiration } + } + add_character_flag = { + flag = fund_artisan_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = smith_inspiration } + } + add_character_flag = { + flag = fund_smith_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = alchemy_inspiration } + } + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = research_inspiration } + } + add_character_flag = { + flag = fund_research_inspiration_event_cooldown + days = { 30 60 } + } + } + court_event_character_flag_effect = yes + } + } + + # Option A: + option = { + name = court_events.3030.a + trigger = { + has_royal_court = yes + amenity_level = { + target = court_lodging_standards + value < 5 + } + } + set_amenity_level = { type = court_lodging_standards value = 5 } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + inspiration = { change_inspiration_progress = 2 } + } + stress_impact = { + base = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + # Option B: + option = { + name = court_events.3030.b + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + inspiration = { change_inspiration_progress = 1 } + } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + after = { + clear_court_event_participation = yes + scope:inspiration_owner = { clear_court_event_participation = yes } + } +} + +# Low court servants: the current war in X has displaced many refugees, so you can hire them at court as higher-level servants for cheaper +court_events.3040 = { + type = court_event + title = court_events.3040.t + desc = court_events.3040.desc + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:steward + roles = { + scope:steward = { + group = event_group + animation = thinking + } + root = { + group = event_group + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + } + } + + trigger = { + exists = cp:councillor_steward + amenity_level = { + target = court_servants + value <= 2 + } + is_at_war = no + any_neighboring_top_liege_realm_owner = { + is_at_war = yes + any_realm_county = { + any_county_province = { + is_occupied = yes + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + amenity_level = { + target = court_servants + value <= 1 + } + add = 1 + } + modifier = { + any_neighboring_top_liege_realm_owner = { + is_at_war = yes + any_realm_border_county = { + any_neighboring_county = { + holder.top_liege = root + } + any_county_province = { + is_occupied = yes + } + } + } + add = 1 + } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + random_neighboring_top_liege_realm_owner = { + limit = { + is_at_war = yes + any_realm_county = { + any_county_province = { + is_occupied = yes + } + } + } + save_scope_as = neighbor + random_realm_county = { + limit = { + any_county_province = { + is_occupied = yes + } + } + random_county_province = { + limit = { + is_occupied = yes + } + save_scope_as = occupied_prov + } + } + } + scope:neighbor.primary_title = { save_scope_as = war_realm } + } + + # Option A: let them in + option = { + name = court_events.3040.a + every_realm_border_county = { + limit = { + any_neighboring_county = { + holder.top_liege = scope:neighbor + } + } + add_county_modifier = { + modifier = court_war_immigration_modifier + years = 15 + } + } + stress_impact = { + paranoid = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + # Option B: hire them as servants + option = { + name = court_events.3040.b + trigger = { + NOT = { government_has_flag = government_is_tribal } + } + set_amenity_level = { type = court_servants value = 3 } + custom_tooltip = cheaper_servants_for_15_years + add_character_flag = court_cheaper_servants + stress_impact = { + content = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -25 + has_trait = content + } + modifier = { + add = -50 + has_trait = paranoid + } + modifier = { + add = -50 + has_trait = humble + } + } + } + + # Option C: no thanks + option = { + name = court_events.3040.c + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + after = { + clear_court_event_participation = yes + scope:steward = { clear_court_event_participation = yes } + } +} + +# High court food: everyone wants to eat at your court +court_events.3050 = { + type = court_event + title = court_events.3050.t + desc = court_events.3050.desc + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:chancellor + roles = { + scope:chancellor = { + group = event_group + animation = happiness + } + root = { + group = event_group + animation = thinking + } + } + } + + trigger = { + exists = cp:councillor_chancellor + amenity_level = { + target = court_food_quality + value >= 5 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_chancellor = { + court_event_character_flag_effect = yes + save_scope_as = chancellor + } + } + + # Option A: improve domestic affairs + option = { + name = court_events.3050.a + custom_tooltip = court_events.3050.a.tt + add_character_flag = { + flag = food_improves_opinion + years = 15 + } + stress_impact = { + gregarious = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + # Option B: improve your feasts + option = { + name = court_events.3050.b + custom_tooltip = court_events.3050.b.tt + add_character_flag = { + flag = food_improves_feasts + years = 15 + } + stress_impact = { + shy = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + after = { + clear_court_event_participation = yes + scope:chancellor = { clear_court_event_participation = yes } + } +} + +# High court servants: can't keep track of who is who +court_events.3060 = { + type = court_event + title = court_events.3060.t + desc = court_events.3060.desc + theme = court + cooldown = { years = 15 } + court_scene = { + button_position_character = scope:spymaster + roles = { + scope:spymaster = { + group = event_group + animation = spymaster + } + root = { + group = event_group + animation = scheme + } + } + } + + trigger = { + exists = cp:councillor_spymaster + amenity_level = { + target = court_servants + value >= 5 + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_lifestyle = intrigue_lifestyle + add = 1 + } + modifier = { + has_trait = education_intrigue + add = 1 + } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_spymaster = { + court_event_character_flag_effect = yes + save_scope_as = spymaster + } + } + + # Option A: So much potential + option = { + name = court_events.3060.a + flavor = court_events.3060.a.tt + add_character_modifier = { + modifier = spies_behind_every_corner_modifier + years = 15 + } + stress_impact = { + honest = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } + + # Option B: Put them to work instead + option = { + name = court_events.3060.b + add_character_modifier = { + modifier = servants_aplenty_cleaning_modifier + years = 15 + } + stress_impact = { + deceitful = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + after = { + clear_court_event_participation = yes + scope:spymaster = { clear_court_event_participation = yes } + } +} + +# Low court fashion: A foreign ruler that is traveling through your capital complains about your courtiers and yourself looking like commoners +court_events.3070 = { + type = court_event + title = court_events.3070.t + desc = court_events.3070.desc + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:guest + roles = { + scope:guest = { + group = event_group + animation = dismissal + } + root = { + group = event_group + animation = eyeroll + } + } + } + + immediate = { + court_event_character_flag_effect = yes + scope:guest = { court_event_character_flag_effect = yes } + } + + # Option A: Accept advise + option = { + name = court_events.3070.a + trigger = { + NOT = { government_has_flag = government_is_tribal } + } + remove_short_term_gold = minor_gold_value + set_amenity_level = { type = court_fashion value = 3 } + custom_tooltip = cheaper_fashion_for_15_years + add_character_flag = { + flag = court_cheaper_fashion + years = 15 + } + stress_impact = { + arrogant = major_stress_impact_gain + greedy = medium_stress_impact_gain + humble = medium_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 0.5 + ai_vengefulness = 0.5 + } + } + } + + # Option B: Embrace humility + option = { + name = court_events.3070.b + add_character_modifier = { + modifier = humble_appearance_modifier + years = 15 + } + stress_impact = { + arrogant = medium_stress_impact_gain + eccentric = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + } + } + } + + #Option C: how dare you?? + option = { + name = court_events.3070.c + if = { + limit = { + NOT = { + amenity_level = { + target = court_fashion + value = 2 + } + } + } + set_amenity_level = { type = court_fashion value = 2 } + } + custom_tooltip = free_fashion_for_15_years + add_character_flag = { + flag = court_free_fashion + years = 15 + } + stress_impact = { + humble = major_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + after = { + clear_court_event_participation = yes + scope:guest = { clear_court_event_participation = yes } + } +} + +# Event triggered by the traveler +court_events.3071 = { + type = character_event + hidden = yes + + trigger = { + is_landed = yes + is_ai = yes + is_adult = yes + is_location_valid_for_travel_event_on_land = yes + OR = { + has_royal_court = yes + top_liege ?= { has_royal_court = yes } + } + location.county.holder.top_liege.capital_province = root.location + location.county.holder.top_liege = { + has_royal_court = yes + is_adult = yes + amenity_level = { + target = court_fashion + value <= 2 + } + } + trigger_if = { + limit = { + has_royal_court = yes + } + amenity_level = { + target = court_fashion + value > 2 + } + } + trigger_else_if = { + limit = { + top_liege ?= { has_royal_court = yes } + } + top_liege = { + amenity_level = { + target = court_fashion + value > 2 + } + } + } + trigger_else = { + always = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + location.county.holder.top_liege = { + amenity_level = { + target = court_fashion + value <= 1 + } + } + add = 0.5 + } + modifier = { + has_royal_court = yes + add = 0.5 + } + modifier = { + top_liege ?= { + amenity_level = { + target = court_fashion + value > 3 + } + } + add = 0.5 + } + modifier = { + top_liege ?= { + amenity_level = { + target = court_fashion + value > 4 + } + } + add = 0.5 + } + } + + immediate = { + root = { save_scope_as = guest } + location.county.holder.top_liege = { + trigger_event = { + id = court_events.3070 + days = 1 + } + } + } +} + +# Diplo court: A famous poet comes to your court offering their services +scripted_trigger 3080_valid_poet_trigger = { + is_available_ai_adult = yes + OR = { + has_trait = lifestyle_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 80 + } + } + diplomacy >= 18 + } +} + +court_events.3080 = { + type = court_event + title = court_events.3080.t + desc = court_events.3080.desc + theme = court + cooldown = { years = 30 } + court_scene = { + button_position_character = scope:poet + roles = { + scope:poet = { + group = event_group + animation = obsequious_bow + } + root = { + group = event_group + animation = thinking + } + } + } + + trigger = { + has_court_type = court_diplomatic + NOT = { employs_court_position = court_poet_court_position } + can_employ_court_position_type = court_poet_court_position + court_grandeur_current_level > court_grandeur_minimum_expected_level + } + + weight_multiplier = { + base = 1 + modifier = { + court_grandeur_current_level >= 2_levels_above_expected_level + add = 0.5 + } + modifier = { + court_grandeur_current_level >= 3_levels_above_expected_level + add = 0.5 + } + modifier = { + court_grandeur_current_level >= 4_levels_above_expected_level + add = 0.5 + } + modifier = { + court_grandeur_current_level >= 5_levels_above_expected_level + add = 0.5 + } + modifier = { + court_grandeur_current_level >= 6_levels_above_expected_level + add = 0.5 + } + } + + immediate = { + court_event_character_flag_effect = yes + random_pool_character = { + province = root.location + limit = { + 3080_valid_poet_trigger = yes + } + save_scope_as = poet + } + if = { + limit = { + NOT = { exists = scope:poet } + } + location.county = { + random_neighboring_county = { + culture = { + save_scope_as = poet_culture + } + } + } + create_character = { + location = root.location + template = ep3_poet_toned_down_template + culture = scope:poet_culture + save_scope_as = poet + } + } + hidden_effect = { + scope:poet = { + court_event_character_flag_effect = yes + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + if = { + limit = { + NOT = { has_trait = eccentric } + } + add_trait = eccentric + } + } + add_courtier = scope:poet + } + } + + # Option A: hire for speeches + option = { + name = court_events.3080.a + court_position_grant_effect = { + POS = court_poet + CANDIDATE = scope:poet + EMPLOYER = root + } + add_character_modifier = { + modifier = ghost_writer_at_court_modifier + years = 20 + } + stress_impact = { + humble = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + # Option B: hire for diplo schemes + option = { + name = court_events.3080.b + court_position_grant_effect = { + POS = court_poet + CANDIDATE = scope:poet + EMPLOYER = root + } + add_character_modifier = { + modifier = poet_for_diplo_schemes_modifier + years = 20 + } + stress_impact = { + honest = medium_stress_impact_gain + content = medium_stress_impact_gain + loyal = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + modifier = { + has_trait = deceitful + add = 50 + } + } + } + + # Option C: hire for seduction + option = { + name = court_events.3080.c + court_position_grant_effect = { + POS = court_poet + CANDIDATE = scope:poet + EMPLOYER = root + } + add_character_modifier = { + modifier = poet_for_seduction_schemes_modifier + years = 20 + } + stress_impact = { + chaste = major_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = -0.5 + } + modifier = { + has_trait = lustful + factor = 2 + } + modifier = { + has_trait = rakish + factor = 3 + } + modifier = { + has_trait = chaste + factor = 0 + } + } + } + + # Option D: no thanks + option = { + name = court_events.3080.d + scope:poet = { select_and_move_to_pool_effect = yes } + stress_impact = { + lifestyle_poet = massive_stress_impact_gain + generous = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + after = { + clear_court_event_participation = yes + scope:poet = { + clear_court_event_participation = yes + if = { + limit = { + NOT = { has_court_position = court_poet_court_position } + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } +} + +# Martial court: One of your young children dreams of being a great warrior and wants you to teach them to ride a horse +scripted_trigger 3090_valid_child_trigger = { + is_available_ai_child = yes + age >= 6 + age <= 12 + NOR = { + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + has_trait = craven + has_trait = shy + has_trait = lazy + has_trait = content + } + OR = { + has_trait = rowdy + has_trait = bossy + } + location = root.location + is_landed = no +} + +court_events.3090 = { + type = court_event + title = court_events.3090.t + desc = court_events.3090.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:child + roles = { + scope:child = { + group = event_group + animation = beg + } + root = { + group = event_group + animation = thinking + } + } + } + + trigger = { + has_court_type = court_warlike + any_child = { + 3090_valid_child_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_child = { + 3090_valid_child_trigger = yes + is_heir_of = root + } + add = 1 + } + modifier = { + any_child = { + 3090_valid_child_trigger = yes + has_trait = ambitious + } + add = 0.5 + } + modifier = { + any_child = { + 3090_valid_child_trigger = yes + has_trait = brave + } + add = 0.5 + } + modifier = { + any_child = { + 3090_valid_child_trigger = yes + has_focus = education_martial + } + add = 0.5 + } + + modifier = { + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + add = 1 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + add = 1 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value > 0 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value < 50 + } + add = 0.5 + } + modifier = { + has_trait = family_first + add = 1 + } + modifier = { + has_trait = callous + factor = 0 + } + modifier = { + has_trait = sadistic + factor = 0 + } + } + + immediate = { + random_child = { + limit = { + 3090_valid_child_trigger = yes + } + weight = { + base = 1 + modifier = { + is_heir_of = root + add = 50 + } + modifier = { + has_trait = ambitious + add = 15 + } + modifier = { + has_trait = brave + add = 15 + } + modifier = { + has_focus = education_martial + add = 15 + } + } + save_scope_as = child + court_event_character_flag_effect = yes + } + court_event_character_flag_effect = yes + } + + # Option A: teach + option = { + name = court_events.3090.a + scope:child = { + if = { + limit = { + has_focus = education_martial + } + education_point_acquisition_additional_points_effect = { LEVEL = low } + } + add_prowess_skill = 1 + add_character_modifier = { + modifier = court_confident_rider_modifier + years = 50 + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + } + stress_impact = { + lazy = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 0.5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + add = 100 + } + } + } + + # Option B: when you grow up + option = { + name = court_events.3090.b + flavor = court_events.3090.b.tt + custom_tooltip = court_events.3090.b.tt_effect + scope:child = { + add_stewardship_skill = 1 + set_variable = { + name = promised_me_a_pony + value = root + } + if = { + limit = { + NOT = { + has_focus = education_martial + } + } + education_point_acquisition_additional_points_effect = { LEVEL = low } + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + stress_impact = { + impatient = medium_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + has_trait = impatient + add = -50 + } + } + } + + # Option C: no + option = { + name = court_events.3090.c + scope:child = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + stress_impact = { + brave = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_energy = -1 + } + modifier = { + has_trait = brave + add = -25 + } + } + } + after = { + clear_court_event_participation = yes + scope:child = { clear_court_event_participation = yes } + } +} + +court_events.3091 = { + type = character_event + title = court_events.3090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:parent = { is_alive = no } + } + desc = court_events.3091.desc_no_parent + } + desc = court_events.3091.desc + } + } + theme = family + override_background = { reference = garden } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:parent = { is_alive = yes } + } + animation = jockey_victory + } + animation = jockey_walk + camera = camera_event_horse_right + } + right_portrait = { + character = scope:parent + triggered_animation = { + trigger = { + scope:parent = { is_alive = yes } + } + animation = admiration + } + animation = dead + } + + trigger = { + has_variable = promised_me_a_pony + } + + immediate = { + var:promised_me_a_pony = { save_scope_as = parent } + root = { save_scope_as = child } + scope:parent = { + if = { + limit = { + is_alive = yes + } + trigger_event = court_events.3092 + } + } + create_story = story_cycle_martial_lifestyle_warhorse + } + + option = { + name = court_events.3091.a + } +} + +court_events.3092 = { + type = character_event + title = court_events.3090.t + desc = court_events.3092.desc + theme = family + override_background = { reference = garden } + + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:child + animation = jockey_victory + camera = camera_event_horse_right + } + + immediate = { + show_as_tooltip = { + scope:child = { + create_story = story_cycle_martial_lifestyle_warhorse + } + } + } + + option = { + name = court_events.3092.a + scope:child = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + } +} + +# Boost to learning your court language if you don't know it +court_events.3100 = { + type = court_event + title = court_events.3100.t + desc = court_events.3100.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:chancellor + roles = { + scope:chancellor = { + group = event_group + animation = chancellor + } + root = { + group = event_group + animation = personality_cynical + } + } + } + + trigger = { + NOT = { knows_court_language_of = root } + has_royal_court = yes + OR = { + any_courtier = { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + is_available_ai_adult = yes + } + cp:councillor_chancellor ?= { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + is_available_ai_adult = yes + } + } + is_available_healthy_adult = yes + NOT = { + any_scheme = { type = learn_language } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_courtier = { + has_character_flag = court_linguist_flag + root = { + has_court_language_of_culture = prev.culture + } + } + add = 1 + } + modifier = { + add = { + value = { + every_close_family_member = { + limit = { + NOT = { knows_court_language_of = root } + } + add = 1 + } + } + } + } + } + + immediate = { + random_courtier = { + limit = { + has_character_flag = court_linguist_flag + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + is_available_ai_adult = yes + } + save_scope_as = chancellor + } + if = { + limit = { + NOT = { exists = scope:chancellor } + cp:councillor_chancellor ?= { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + is_available_ai_adult = yes + } + } + cp:councillor_chancellor = { save_scope_as = chancellor } + } + else = { + random_courtier = { + limit = { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + is_available_ai_adult = yes + } + weight = { + base = 1 + modifier = { + has_court_position = court_tutor_court_position + add = 20 + } + modifier = { + is_close_family_of = root + add = 10 + } + modifier = { + has_trait = scholar + add = 10 + } + modifier = { + has_trait = loyal + add = 5 + } + modifier = { + has_trait = diligent + add = 5 + } + modifier = { + has_trait = gregarious + add = 5 + } + } + save_scope_as = chancellor + } + } + scope:chancellor = { court_event_character_flag_effect = yes } + if = { + limit = { + employs_court_position = court_tutor_court_position + court_position:court_tutor_court_position = { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + } + } + court_position:court_tutor_court_position = { save_scope_as = linguist } + } + else_if = { + limit = { + any_courtier = { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + } + } + random_courtier = { + limit = { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + } + save_scope_as = linguist + } + } + court_event_character_flag_effect = yes + } + + # Option A: start studying + option = { + name = court_events.3100.a + custom_tooltip = { + text = court_events.3100.a.tt + start_scheme = { + type = learn_language + target_character = scope:chancellor + } + random_scheme = { + type = learn_language + add_scheme_modifier = { type = pressured_to_learn_court_language_modifier } + } + } + start_scheme = { + type = learn_language + target_character = scope:chancellor + } + random_scheme = { + type = learn_language + add_scheme_modifier = { type = pressured_to_learn_court_language_modifier } + } + stress_impact = { + arrogant = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = 25 + } + modifier = { + has_trait = diligent + add = 25 + } + } + } + + # Option B: has linguist/tutor - teach the whole family/faster + option = { + name = court_events.3100.b + trigger = { + exists = scope:linguist + } + start_scheme = { + type = learn_language + target_character = scope:linguist + } + random_scheme = { + type = learn_language + add_scheme_modifier = { type = linguist_help_for_court_language_modifier } + } + every_close_family_member = { + limit = { + NOT = { knows_court_language_of = root } + location = root.location + is_adult = yes + is_ai = yes + } + start_scheme = { + type = learn_language + target_character = scope:linguist + } + random_scheme = { + type = learn_language + add_scheme_modifier = { type = linguist_help_for_court_language_modifier } + } + } + every_close_family_member = { + limit = { + NOT = { knows_court_language_of = root } + location = root.location + is_adult = no + is_ai = yes + } + learn_court_language_of = root + } + stress_impact = { + arrogant = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 250 + } + } + + # Option C: it's not the time for this + option = { + name = court_events.3100.c + add_prestige = medium_prestige_gain + stress_impact = { + humble = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 75 + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = diligent + add = -25 + } + } + } + + after = { + clear_court_event_participation = yes + scope:chancellor = { clear_court_event_participation = yes } + } +} + +# Stewardship court: a vassal's construction program is challenging you +scripted_trigger court_3110_valid_vassal_trigger = { + is_landed = yes + is_available_ai_adult = yes + capital_county.title_province = { + OR = { + combined_building_level > root.capital_county.title_province.combined_building_level + num_buildings > root.capital_county.title_province.num_buildings + } + has_ongoing_construction = yes + } + OR = { + has_trait = arrogant + has_trait = architect + has_trait = honest + has_trait = gregarious + has_trait = disloyal + has_focus = stewardship_domain_focus + } + highest_held_title_tier >= tier_county +} + +court_events.3110 = { + type = court_event + title = court_events.3110.t + desc = court_events.3110.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:steward + roles = { + scope:steward = { + group = event_group + animation = worry + } + root = { + group = event_group + animation = disapproval + } + } + } + + trigger = { + has_royal_court = yes + has_court_type = court_administrative + OR = { + has_focus = stewardship_wealth_focus + has_focus = stewardship_domain_focus + has_focus = stewardship_duty_focus + } + any_vassal = { + court_3110_valid_vassal_trigger = yes + } + exists = cp:councillor_steward + NOT = { has_character_flag = had_court_events_3115 } + } + + weight_multiplier = { + base = 1 + modifier = { + has_focus = stewardship_domain_focus + add = 0.5 + } + modifier = { + capital_county.title_province = { + has_ongoing_construction = yes + } + add = 1 + } + modifier = { + employs_court_position = royal_architect_court_position + add = 1 + } + } + + immediate = { + add_character_flag = { + flag = had_court_events_3110 + years = 25 + } + court_event_character_flag_effect = yes + random_vassal = { + limit = { + court_3110_valid_vassal_trigger = yes + } + save_scope_as = vassal + } + if = { + limit = { + employs_court_position = royal_architect_court_position + } + court_position:royal_architect_court_position = { + save_scope_as = steward + save_scope_as = architect + } + } + else = { + cp:councillor_steward = { + save_scope_as = steward + } + } + scope:steward = { court_event_character_flag_effect = yes } + } + + # Option A: Build MORE! + option = { + name = court_events.3110.a + if = { + limit = { + exists = scope:architect + } + custom_tooltip = court_events.3110.architect + capital_county = { + add_county_modifier = { + modifier = architect_building_program_county_modifier + years = 20 + } + } + } + else = { + duel = { + skill = stewardship + value = average_skill_rating + 50 = { + desc = court_events.3110.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + has_trait = architect + add = 50 + } + modifier = { + has_trait = diligent + add = 10 + } + modifier = { + has_trait = ambitious + add = 10 + } + send_interface_toast = { + type = event_toast_effect_good + title = court_events.3110.a.success.tt + left_icon = root + capital_county = { + add_county_modifier = { + modifier = building_program_county_modifier + years = 20 + } + } + } + } + 50 = { + desc = court_events.3110.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + modifier = { + has_trait = greedy + add = 20 + } + modifier = { + has_trait = lazy + add = 10 + } + modifier = { + has_trait = humble + add = 10 + } + send_interface_toast = { + type = event_toast_effect_bad + title = court_events.3110.a.failure.tt + left_icon = root + add_prestige = medium_prestige_loss + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + } + } + } + stress_impact = { + greedy = major_stress_impact_gain + humble = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 0.5 + } + modifier = { + has_trait = humble + add = -50 + } + modifier = { + has_trait = lazy + add = -25 + } + modifier = { + has_trait = architect + add = 100 + } + } + } + + # Option B: Tax MORE! + option = { + name = court_events.3110.b + flavor = court_events.3110.b.tt + duel = { + skill = diplomacy + target = scope:vassal + 50 = { + desc = court_events.3110.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + type = event_toast_effect_good + title = court_events.3110.b.success.tt + left_icon = scope:vassal + scope:vassal = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + } + if = { + limit = { + government_allows = administrative + } + scope:vassal = { + change_influence = medium_influence_loss + } + change_influence = medium_influence_gain + } + else = { + scope:vassal = { + add_prestige = medium_prestige_loss + } + add_prestige = medium_prestige_gain + } + } + } + 50 = { + desc = court_events.3110.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + + send_interface_toast = { + type = event_toast_effect_bad + title = court_events.3110.b.failure.tt + left_icon = scope:vassal + if = { + limit = { + government_allows = administrative + } + scope:vassal = { + change_influence = medium_influence_gain + } + change_influence = medium_influence_loss + } + else = { + scope:vassal = { + add_prestige = medium_prestige_gain + } + add_prestige = medium_prestige_loss + } + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + architect = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -0.5 + } + modifier = { + has_trait = zealous + add = -25 + } + } + } + + # Option C: I don't care + option = { + name = court_events.3110.c + add_prestige = miniscule_prestige_loss + stress_impact = { + ambitious = major_stress_impact_gain + arrogant = medium_stress_impact_gain + architect = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + modifier = { + has_trait = ambitious + add = -75 + } + modifier = { + has_trait = arrogant + add = -50 + } + } + } + + after = { + clear_court_event_participation = yes + scope:steward = { clear_court_event_participation = yes } + } +} + +# Admin court version: a vassal's construction program intheir estate is challenging you +scripted_trigger court_3115_valid_vassal_trigger = { + government_allows = administrative + this = house.house_head + domicile ?= { + is_domicile_type = estate + num_domicile_buildings > root.domicile.num_domicile_buildings + external_domicile_building_slots >= root.domicile.external_domicile_building_slots + free_external_domicile_building_slots < root.domicile.free_external_domicile_building_slots + } + is_available_ai_adult = yes + OR = { + has_trait = arrogant + has_trait = architect + has_trait = honest + has_trait = gregarious + has_trait = disloyal + has_focus = stewardship_domain_focus + has_trait_xp = { + trait = governor + value >= 60 + } + } +} + +court_events.3115 = { + type = court_event + title = court_events.3110.t + desc = court_events.3115.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:relative + roles = { + scope:relative = { + group = event_group + animation = worry + } + root = { + group = event_group + animation = disapproval + } + } + } + + trigger = { + has_royal_court = yes + government_allows = administrative + this = house.house_head + domicile ?= { is_domicile_type = estate } + OR = { + has_focus = stewardship_wealth_focus + has_focus = stewardship_domain_focus + has_focus = stewardship_duty_focus + } + any_vassal = { + court_3110_valid_vassal_trigger = yes + } + any_courtier_or_guest = { + house = root.house + location = root.location + is_available_ai_adult = yes + } + NOT = { has_character_flag = had_court_events_3110 } + } + + weight_multiplier = { + base = 1 + modifier = { + has_focus = stewardship_domain_focus + add = 0.5 + } + modifier = { + any_vassal = { + court_3110_valid_vassal_trigger = yes + house = { is_dominant_family = yes } + } + add = 1 + } + modifier = { + any_vassal = { + court_3110_valid_vassal_trigger = yes + house = { is_powerful_family = yes } + } + add = 0.5 + } + modifier = { + house = { + is_powerful_family = no + } + add = 0.5 + } + } + + immediate = { + add_character_flag = { + flag = had_court_events_3115 + years = 25 + } + court_event_character_flag_effect = yes + random_vassal = { + limit = { + court_3110_valid_vassal_trigger = yes + } + save_scope_as = vassal + } + + random_courtier_or_guest = { + limit = { + house = root.house + location = root.location + is_available_ai_adult = yes + } + save_scope_as = relative + } + scope:relative = { court_event_character_flag_effect = yes } + } + + # Option A: Build MORE! + option = { + name = court_events.3110.a + duel = { + skill = stewardship + value = average_skill_rating + 50 = { + desc = court_events.3110.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + has_trait = architect + add = 50 + } + modifier = { + has_trait = diligent + add = 10 + } + modifier = { + has_trait = ambitious + add = 10 + } + send_interface_toast = { + type = event_toast_effect_good + title = court_events.3110.a.success.tt + left_icon = root + add_character_modifier = { + modifier = estate_building_program_modifier + years = 20 + } + } + } + 50 = { + desc = court_events.3110.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + modifier = { + has_trait = greedy + add = 20 + } + modifier = { + has_trait = lazy + add = 10 + } + modifier = { + has_trait = humble + add = 10 + } + send_interface_toast = { + type = event_toast_effect_bad + title = court_events.3110.a.failure.tt + left_icon = root + change_influence = medium_influence_loss + } + } + } + stress_impact = { + greedy = major_stress_impact_gain + humble = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 0.5 + } + modifier = { + has_trait = humble + add = -50 + } + modifier = { + has_trait = lazy + add = -25 + } + modifier = { + has_trait = architect + add = 100 + } + } + } + + # Option B: Tax MORE! + option = { + name = court_events.3110.b + flavor = court_events.3110.b.tt + duel = { + skill = diplomacy + target = scope:vassal + 50 = { + desc = court_events.3110.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + type = event_toast_effect_good + title = court_events.3110.b.success.tt + left_icon = scope:vassal + scope:vassal = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + } + scope:vassal = { + change_influence = major_influence_loss + } + change_influence = major_influence_gain + } + } + 50 = { + desc = court_events.3110.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + + send_interface_toast = { + type = event_toast_effect_bad + title = court_events.3110.b.failure.tt + left_icon = scope:vassal + scope:vassal = { + change_influence = medium_influence_gain + } + change_influence = medium_influence_loss + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + architect = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -0.5 + } + } + } + + # Option C: I don't care + option = { + name = court_events.3110.c + change_influence = miniscule_influence_loss + stress_impact = { + ambitious = major_stress_impact_gain + arrogant = medium_stress_impact_gain + architect = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + modifier = { + has_trait = ambitious + add = -75 + } + modifier = { + has_trait = arrogant + add = -50 + } + } + } + + after = { + clear_court_event_participation = yes + scope:steward = { clear_court_event_participation = yes } + } +} + +# An inspired person is cringing at your crappy common artifact +scripted_trigger 3120_valid_artifact_to_improve_trigger = { + NOR = { + has_variable = banner_house + has_variable = banner_dynasty + rarity = illustrious + rarity = famed + } +} + +scripted_trigger 3120_smithsy_artifact_trigger = { + OR = { + artifact_type = necklace_pedestal + artifact_type = brooch + artifact_type = brooch_pedestal + artifact_type = necklace + artifact_type = helmet + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_type = regalia + artifact_type = goblet + artifact_type = wall_shield + } +} + +scripted_trigger 3120_artisan_artifact_trigger = { + OR = { + artifact_type = sculpture + artifact_type = box + artifact_type = chest + artifact_type = cabinet + artifact_type = throne + } +} + +court_events.3120 = { + type = court_event + title = court_events.3120.t + desc = court_events.3120.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:inspired + roles = { + scope:inspired = { + group = event_group + animation = disgust + } + root = { + group = event_group + animation = worry + } + } + } + + trigger = { + has_royal_court = yes + any_courtier_or_guest = { + is_available = yes + OR = { + AND = { + inspiration ?= { + NOR = { + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + has_inspiration_type = book_inspiration + } + } + } + AND = { + has_completed_inspiration = yes + var:created_artifact_type ?= { + NOR = { + this = flag:adventure + this = flag:alchemy + this = flag:book + } + } + } + } + trigger_if = { + limit = { + OR = { + inspiration ?= { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + has_inspiration_type = smith_inspiration + } + } + var:created_artifact_type ?= { + OR = { + this = flag:weapon + this = flag:armor + this = flag:smith + } + } + } + } + root = { + any_character_artifact = { + 3120_valid_artifact_to_improve_trigger = yes + 3120_smithsy_artifact_trigger = yes + } + } + } + trigger_else_if = { + limit = { + OR = { + inspiration ?= { has_inspiration_type = weaver_inspiration } + var:created_artifact_type ?= { this = flag:weaver } + } + } + root = { + any_character_artifact = { + 3120_valid_artifact_to_improve_trigger = yes + artifact_type = tapestry + } + } + } + trigger_else_if = { + limit = { + OR = { + inspiration ?= { has_inspiration_type = artisan_inspiration } + var:created_artifact_type ?= { this = flag:artisan } + } + } + root = { + any_character_artifact = { + 3120_valid_artifact_to_improve_trigger = yes + 3120_artisan_artifact_trigger = yes + } + } + } + trigger_else = { + always = no + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_courtier_or_guest = { + has_court_position = court_artificer_court_position + } + add = 1 + } + } + + immediate = { + court_event_character_flag_effect = yes + random_courtier = { + limit = { + is_available = yes + OR = { + AND = { + exists = inspiration + inspiration ?= { + NOR = { + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + has_inspiration_type = book_inspiration + } + } + } + AND = { + has_completed_inspiration = yes + var:created_artifact_type ?= { + NOR = { + this = flag:adventure + this = flag:alchemy + this = flag:book + } + } + } + } + } + weight = { + base = 1 + modifier = { + has_court_position = court_artificer_court_position + add = 100 + } + } + save_scope_as = inspired + } + if = { + limit = { + scope:inspired = { + OR = { + inspiration ?= { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + has_inspiration_type = smith_inspiration + } + } + var:created_artifact_type ?= { + OR = { + this = flag:weapon + this = flag:armor + this = flag:smith + } + } + } + } + } + random_character_artifact = { + limit = { + 3120_valid_artifact_to_improve_trigger = yes + 3120_smithsy_artifact_trigger = yes + } + weight = { + base = 1 + modifier = { + rarity = common + add = 20 + } + } + save_scope_as = artifact + } + } + else_if = { + limit = { + scope:inspired = { + OR = { + inspiration ?= { has_inspiration_type = weaver_inspiration } + var:created_artifact_type ?= { this = flag:weaver } + } + } + } + random_character_artifact = { + limit = { + 3120_valid_artifact_to_improve_trigger = yes + artifact_type = tapestry + } + weight = { + base = 1 + modifier = { + rarity = common + add = 20 + } + } + save_scope_as = artifact + } + } + else = { + random_character_artifact = { + limit = { + 3120_valid_artifact_to_improve_trigger = yes + 3120_artisan_artifact_trigger = yes + } + weight = { + base = 1 + modifier = { + rarity = common + add = 20 + } + } + save_scope_as = artifact + } + } + scope:inspired = { court_event_character_flag_effect = yes } + } + + # Option A: do it + option = { + name = court_events.3120.a + pay_short_term_gold = { + target = scope:inspired + gold = minor_gold_value + } + scope:artifact = { + custom_tooltip = court_events.3120.a.tt + hidden_effect = { + random_list = { + pick = 2 + unique = yes + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_monthly_minor_prestige_6_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_monthly_prestige_6_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_short_reign_duration_mult_4_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_court_grandeur_baseline_add_4_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_dynasty_opinion_5_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_monthly_prestige_add_5_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_vassal_limit_1_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_courtier_and_guest_opinion_5_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_domain_tax_mult_2_modifier } + } + } + } + } + 20 = { + trigger = { + artifact_durability < define:NInventory|ARTIFACT_LOW_DURABILITY + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + scope:artifact = { + add_durability = { + value = { + value = scope:artifact.artifact_max_durability + subtract = scope:artifact.artifact_durability + } + } + } + } + } + } + 20 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + scope:artifact = { + set_max_durability = { + value = { + value = scope:artifact.artifact_max_durability + add = { + value = scope:artifact.artifact_max_durability + divide = 100 + multiply = 20 + } + } + } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + scope:artifact = { + set_max_durability = { + value = { + value = scope:artifact.artifact_max_durability + add = { + value = scope:artifact.artifact_max_durability + divide = 100 + multiply = 35 + } + } + } + } + } + } + } + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + has_trait = humble + add = -25 + } + modifier = { + gold <= minor_gold_value + factor = 0 + } + } + } + + # Option B: think about your own stuff + option = { + name = court_events.3120.b + trigger = { exists = scope:inspired.inspiration } + scope:inspired = { + if = { + limit = { + NOT = { inspiration.inspiration_sponsor = root } + } + root = { sponsor_inspiration = scope:inspired.inspiration } + } + change_artifact_quality_effect = { AMOUNT = 5 } + inspiration = { change_inspiration_progress = 2 } + } + stress_impact = { + compassionate = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_compassion = -0.5 + } + } + } + + # Option C: show me you can still do better + option = { + name = court_events.3120.c + trigger = { + scope:inspired = { + has_completed_inspiration = yes + NOT = { exists = inspiration } + } + } + scope:inspired = { + if = { + limit = { + var:created_artifact_type ?= { + OR = { + this = flag:weapon + this = flag:armor + this = flag:smith + } + } + } + random_list = { + 30 = { + create_inspiration = { type = weapon_inspiration } + custom_tooltip = gains_weapon_inspiration_tt + } + 30 = { + create_inspiration = { type = armor_inspiration } + custom_tooltip = gains_armor_inspiration_tt + } + 30 = { + create_inspiration = { type = smith_inspiration } + custom_tooltip = gains_smith_inspiration_tt + } + } + } + else_if = { + limit = { + var:created_artifact_type ?= { + this = flag:weaver + } + } + create_inspiration = { type = weaver_inspiration } + custom_tooltip = gains_weaver_inspiration_tt + } + else = { + create_inspiration = { type = artisan_inspiration } + custom_tooltip = gains_artisan_inspiration_tt + } + } + stress_impact = { + shy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = 0.5 + } + modifier = { + has_trait = shy + add = -25 + } + modifier = { + has_trait = callous + add = -25 + } + } + } + + # Option D: nevermind + option = { + name = court_events.3120.d + add_prestige = miniscule_prestige_loss + stress_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_energy = -1 + } + modifier = { + has_trait = ambitious + add = -50 + } + modifier = { + has_trait = arrogant + add = -50 + } + modifier = { + has_trait = generous + add = -50 + } + } + } + after = { + clear_court_event_participation = yes + scope:inspired = { clear_court_event_participation = yes } + } +} diff --git a/N3OW/events/court_events/court_events_general.txt b/N3OW/events/court_events/court_events_general.txt new file mode 100644 index 00000000..43a4a128 --- /dev/null +++ b/N3OW/events/court_events/court_events_general.txt @@ -0,0 +1,14384 @@ +namespace = court + +################################################## +# # RANGES +# 0001 - 0099 Misc Events +# 0100 - 0999 James +# 2001 - 2999 Ewan +# 3000 - 4000 Bianca +# 4001 - 5000 Isabella +# 5001 - 5999 Linnea +# 6000 - 6999 Claudia +# 7000 - 8000 George +# 8001 - 8999 Joe +# 9000 - 9999 Oltner +# +################################################## + + + +################################################## +# Example + +################################################## +# 0001 - 0010 Example Event +################################################## + +################################################## +# Example Event +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# Example court event for studying. +#court.0001 = { +# # Court-type events only appear in the Royal Court view, and are optional to interact with. +# type = court_event +# # Desc and theming rules are as normal, but since there's no background, there's no need for background overrides. +# title = court.0001.t +# desc = court.0001.desc +# theme = court +# # Main portraits are unnecessary: we define this stuff via the court_scene block instead. +# # Secondary portraits may be used as usual. +# lower_left_portrait = scope:character_c +# +# # Court events should be fired from one of their on_actions, but since this is an example, it's left orphaned. +# orphan = yes +# +# # Here, we define how the event appears inside the court view. +# ## This block exists in the root scope, so you can just define anyone you'd normally have access to/set up in the immediate block here. +# court_scene = { +# # Define which character will have the button for starting the event appear over the top of 'em. +# button_position_character = scope:character_a +# # Roles defined in \ck3\game\gfx\court_scene\character_roles\, if you want to change them or add new ones. +# roles = { +# # First, we take each scoped relevant scoped character. +# scope:character_a = { +# # Then we define their role, where they're positioned in the scene. The first character defines always takes the first slot and so on. Slot 1 and 2 look at each other. Slot 3 is beside Slot 2 and facing Slot 1 as well. +# group = event_group +# # Next, we select their animation override (if applicable: you can leave it to the generic default/role default if defined, though generally you'll want to define this). +# +# # This can be a scripted animation block for animation selection based on triggers +# # scripted_animation = { +# # triggered_animation = { +# # trigger = { +# # scope:ruler = { +# # is_female = no +# # } +# # } +# # +# # both syntaxes are supported +# # animation = { rage anger sadness } # randomly chooses one of these animations +# # animation = sadness # selects just one animation +# # You can set a default animation if all triggers fail. Convention is to always have some always-valid trigger and not use this field if using triggered animations. +# animation = anger +# } +# scope:character_b = { +# group = event_group +# animation = rage +# } +# # Characters who are not physically present are referred to only via copy links or lower portraits, so we don't bother putting them here. +# } +# } +# +# weight_multiplier = { +# base = 1 +# +# # Court weightings: plug in a court type that should see this event more often. +# ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } +# } +# +# immediate = { +# # As with portraits, we do our general character setup stuff in this event. +# random_courtier_or_guest = { save_scope_as = character_a } +# random_courtier_or_guest = { +# limit = { +# this != scope:character_a +# } +# save_scope_as = character_b +# } +# } +# +# # Court events, as with all events, require at least one option to display. +# option = { +# name = court.0001.a +# } +#} + + + +################################################## +# James + +################################################## +# 0107 Court tutor reading a boring book to your ward +# 0108 Copyright-friendly foreign Prince/Princess arrives in your court +# 0109 Executioner multiclasses to physician +# 0111 Intervention for your sex addiction +# 0112 Executioner tries their hand at interior decoration +################################################## + +##################################### +# Boring book # +# by James Beaumont # +# 0107 # +##################################### + +# Tutor reads a boring book to a ward +court.0107 = { + type = court_event + title = court.0107.t + desc = court.0107.desc + + theme = court + court_scene = { + button_position_character = scope:tutor + roles = { + scope:tutor = { + group = event_group + animation = anger + } + scope:unruly_child = { + group = event_group + animation = boredom + } + } + } + + cooldown = { years = 5 } + + trigger = { + employs_court_position = court_tutor_court_position + is_available_adult = yes + court_position:court_tutor_court_position = { + is_available_ai_adult = yes + has_court_event_flag = no + } + any_child = { + is_available_child = yes + age >= 6 + has_court_event_flag = no + } + } + + # More likely to trigger if the tutor likes writing things + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + court_position:court_tutor_court_position = { has_trait = journaller } + } + modifier = { + add = 0.5 + court_position:court_tutor_court_position = { + OR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + } + modifier = { + add = -0.5 + court_position:court_tutor_court_position = { + OR = { + has_trait = intellect_bad_1 + has_trait = intellect_bad_2 + has_trait = intellect_bad_3 + } + } + } + } + + immediate = { + random_court_position_holder = { + type = court_tutor_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = tutor + court_event_character_flag_effect = yes + } + random_child = { + limit = { + is_available_child = yes + age >= 6 + OR = { + has_trait = bossy + has_trait = rowdy + } + } + alternative_limit = { + is_available_child = yes + age >= 6 + } + save_scope_as = unruly_child + court_event_character_flag_effect = yes + } + } + + # Option A: Scold the child for being brazen + option = { + name = court.0107.a + progress_towards_friend_effect = { + REASON = friend_upheld_educational_tactics + CHARACTER = scope:tutor + OPINION = default_friend_opinion + } + progress_towards_rival_effect = { + CHARACTER = scope:unruly_child + REASON = rival_child_scolded + OPINION = default_rival_opinion + } + custom_tooltip = court.0107.a.tt.1 + hidden_effect = { + scope:unruly_child = { + education_point_acquisition_effect = yes + } + } + custom_tooltip = court.0107.a.tt.2 + scope:tutor = { + add_character_flag = { + flag = court_0107_tutor + years = 20 + } + } + stress_impact = { + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } + + #Option B: Buy the book yourself + option = { + name = court.0107.b + trigger = { + scope:tutor = { has_education_rank_trigger = { RANK = 2 OPERATOR = greater } } + } + add_opinion = { + target = scope:tutor + modifier = flattered_opinion + opinion = 15 + } + pay_short_term_gold = { + target = scope:tutor + gold = medium_gold_value + } + custom_tooltip = court.0107.b.tt + if = { + limit = { + scope:tutor = { + has_trait = education_martial + } + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:tutor + SET_SUBJECT = flag:martial + SET_TOPIC = flag:no + } + } + else_if = { + limit = { + scope:tutor = { + has_trait = education_stewardship + } + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:tutor + SET_SUBJECT = flag:stewardship + SET_TOPIC = flag:no + } + } + else_if = { + limit = { + scope:tutor = { + has_trait = education_diplomacy + } + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:tutor + SET_SUBJECT = flag:diplomacy + SET_TOPIC = flag:no + } + } + else_if = { + limit = { + scope:tutor = { + has_trait = education_intrigue + } + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:tutor + SET_SUBJECT = flag:intrigue + SET_TOPIC = flag:no + } + } + else_if = { + limit = { + scope:tutor = { + has_trait = education_learning + } + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:tutor + SET_SUBJECT = flag:learning + SET_TOPIC = flag:no + } + } + custom_tooltip = buy_book_artifact + scope:newly_created_artifact = { + save_scope_as = this_artifact + } + scope:tutor = { + save_scope_as = old_owner + } + hidden_effect = { + send_interface_toast = { + title = artifact.0012.t + left_icon = scope:this_artifact + right_icon = scope:old_owner + custom_tooltip = artifact.0012.tooltip + } + } + stress_impact = { + intellect_good_1 = minor_stress_impact_loss + intellect_good_2 = minor_stress_impact_loss + intellect_good_3 = minor_stress_impact_loss + scholar = minor_stress_impact_loss + greedy = minor_stress_impact_gain + intellect_bad_1 = minor_stress_impact_gain + intellect_bad_2 = medium_stress_impact_gain + intellect_bad_3 = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + short_term_gold < medium_gold_value + factor = 0 + } + } + } + + #Option C: Suggest another book - opt out + option = { + name = court.0107.c + add_opinion = { + target = scope:tutor + modifier = insult_opinion + opinion = -15 + } + progress_towards_friend_effect = { + REASON = friend_saved_from_boredom + CHARACTER = scope:unruly_child + OPINION = default_friend_opinion + } + stress_impact = { + compassionate = minor_stress_impact_loss + diligent = minor_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + after = { + scope:tutor = { + clear_court_event_participation = yes + } + scope:unruly_child = { + clear_court_event_participation = yes + } + } +} + +##################################### +# A Spectacular Courtier # +# by James Beaumont # +# 0108 # +##################################### + +scripted_effect spawn_foreign_prince_effect = { + random_kingdom = { + limit = { + holder ?= { + is_ai = yes + NOT = { + in_diplomatic_range = root + } + } + } + holder = { save_scope_as = foreign_realm_target } + } + scope:available_child = { + if = { + limit = { is_female = no } + create_character = { + location = root.capital_province + template = prince_ali_template + gender = female + culture = scope:foreign_realm_target.culture + faith = scope:foreign_realm_target.faith + save_scope_as = foreign_prince + } + } + else = { + create_character = { + location = root.capital_province + template = prince_ali_template + gender = male + culture = scope:foreign_realm_target.culture + faith = scope:foreign_realm_target.faith + save_scope_as = foreign_prince + } + } + } + scope:foreign_prince = { + random_list = { + 50 = { set_sexuality = heterosexual } + 50 = { set_sexuality = bisexual } + } + random_list = { + 3 = { add_gold = 100 } + 3 = { add_gold = 250 } + 3 = { add_gold = 500 } + 3 = { add_gold = 750 } + 3 = { add_gold = 1000 } + } + set_relation_lover = { reason = lover_magnificently_seduced target = scope:available_child involved_character = root } + give_nickname = nick_fabulous_she_he + visit_court_of = root + } +} + +# Foreign Prince comes to propose to an available daughter/son +court.0108 = { + type = court_event + title = court.0108.t + desc = court.0108.desc + + theme = court + court_scene = { + button_position_character = scope:sceptical_courtier + roles = { + scope:sceptical_courtier = { + group = event_group + animation = personality_cynical + } + scope:available_child = { + group = event_group + animation = love + } + scope:foreign_prince = { + group = event_group + animation = flirtation_left + } + } + } + + cooldown = { years = 50 } + + trigger = { + is_available_adult = yes + is_valid_for_east_asian_events_trigger = no + any_child = { + is_available_ai_adult = yes + allowed_more_spouses = yes + is_concubine = no + OR = { + has_sexuality = heterosexual + has_sexuality = bisexual + } + has_court_event_flag = no + } + any_kingdom = { + holder ?= { + is_ai = yes + NOT = { + in_diplomatic_range = root + } + } + } + court_grandeur_current_level >= medium_court_grandeur_level + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + root.faith = { + OR = { + religion_tag = islam_religion + has_doctrine_parameter = islamic_syncretic_actor_opinion_active + } + } + } + } + + immediate = { + hidden_effect = { + if = { + limit = { + any_court_position_holder = { + has_trait = cynical + is_available_adult = yes + } + } + random_court_position_holder = { + limit = { + has_trait = cynical + is_available_adult = yes + } + save_scope_as = sceptical_courtier + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + any_courtier = { + has_trait = cynical + is_available_adult = yes + } + } + random_courtier = { + limit = { + has_trait = cynical + is_available_adult = yes + } + save_scope_as = sceptical_courtier + court_event_character_flag_effect = yes + } + } + else = { + random_courtier = { + limit = { is_available_adult = yes } + save_scope_as = sceptical_courtier + court_event_character_flag_effect = yes + } + } + random_child = { + limit = { + is_available_ai_adult = yes + allowed_more_spouses = yes + is_concubine = no + OR = { #They need to be attracted to the Prince + has_sexuality = heterosexual + has_sexuality = bisexual + } + } + save_scope_as = available_child + court_event_character_flag_effect = yes + } + spawn_foreign_prince_effect = yes + } + } + + # Option A: Get them married! + option = { + name = court.0108.a + scope:foreign_prince = { + pay_short_term_gold = { + target = root + gold = 50_percent_of_owned_gold + } + } + scope:available_child = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 40 + } + } + progress_towards_friend_effect = { + REASON = friend_approved_marriage_proposal + CHARACTER = scope:foreign_prince + OPINION = default_friend_opinion + } + progress_towards_rival_effect = { + CHARACTER = scope:sceptical_courtier + REASON = rival_concerns_dismissed + OPINION = default_rival_opinion + } + if = { + limit = { + has_ep2_dlc_trigger = yes + } + create_grand_wedding_betrothal = { + SPOUSE_1 = scope:available_child + SPOUSE_2 = scope:foreign_prince + HOST = root + PROMISEE = scope:foreign_realm_target + } + } + else_if = { + limit = { + scope:available_child = { + is_female = no + } + } + scope:available_child = { marry = scope:foreign_prince } + } + else = { + scope:available_child = { marry_matrilineal = scope:foreign_prince } + } + change_current_court_grandeur = minor_court_grandeur_gain + stress_impact = { + paranoid = major_stress_impact_gain + cynical = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + trusting = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 2 + ai_vengefulness = -0.5 + } + } + } + + #Option B: Imprison the Prince + option = { + name = court.0108.b + scope:foreign_prince = { + pay_short_term_gold = { + target = root + gold = 80_percent_of_owned_gold + } + } + progress_towards_rival_effect = { + CHARACTER = scope:foreign_prince + REASON = rival_foreign_prince + OPINION = default_rival_opinion + } + progress_towards_rival_effect = { + CHARACTER = scope:available_child + REASON = rival_disallowed_marrying + OPINION = default_rival_opinion + } + progress_towards_friend_effect = { + REASON = friend_believed_claim + CHARACTER = scope:sceptical_courtier + OPINION = default_friend_opinion + } + rightfully_imprison_character_effect = { + TARGET = scope:foreign_prince + IMPRISONER = root + } + stress_impact = { + compassionate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + sadistic = minor_stress_impact_loss + cynical = major_stress_impact_loss + paranoid = major_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 1 + } + } + } + + #Option C: Send them away + option = { + name = court.0108.c + scope:available_child = { + add_opinion = { + modifier = hurt_opinion + target = root + opinion = -25 + } + } + scope:foreign_prince = { + hidden_effect = { select_and_move_to_pool_effect = yes } + } + show_as_tooltip = { + remove_courtier_or_guest = scope:foreign_prince + } + ai_chance = { + base = 10 + } + } + after = { + scope:available_child = { + clear_court_event_participation = yes + } + scope:sceptical_courtier = { + clear_court_event_participation = yes + } + } +} + +##################################### +# An Anatomical Expert # +# by James Beaumont # +# 0109 # +##################################### + +# Executioner knows medicine, wants to be a doctor +court.0109 = { + type = court_event + title = court.0109.t + desc = court.0109.desc + + theme = court + court_scene = { + button_position_character = scope:executioner + roles = { + scope:executioner = { + group = event_group + animation = personality_rational + } + scope:learned_courtier = { + group = event_group + animation = admiration + } + } + } + + cooldown = { years = 20 } + + trigger = { + employs_court_position = executioner_court_position + court_position:executioner_court_position = { + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { has_court_position = court_physician_court_position } + save_temporary_scope_as = executioner_temp + } + any_courtier = { + exists = yes + is_available_adult = yes + learning >= 10 + has_court_event_flag = no + NOR = { + has_court_position = executioner_court_position + this = scope:executioner_temp + } + } + is_available_adult = yes + } + + # More likely to trigger if the executioner is smart and cares about other humans + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + court_position:executioner_court_position = { has_trait = scholar } + } + modifier = { + add = 0.5 + court_position:executioner_court_position = { has_trait = compassionate } + } + modifier = { + add = 0.5 + court_position:executioner_court_position = { has_trait = education_learning } + } + modifier = { + add = 0.5 + court_position:executioner_court_position = { has_trait = lifestyle_herbalist } + } + modifier = { + add = 0.5 + court_position:executioner_court_position = { has_trait = lifestyle_physician } + } + modifier = { + add = 0.5 + court_position:executioner_court_position = { + OR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + } + modifier = { + add = -0.5 + court_position:executioner_court_position = { + OR = { + has_trait = intellect_bad_1 + has_trait = intellect_bad_2 + has_trait = intellect_bad_3 + } + } + } + #Executioner less likely to help the sick and needy if they don't care about the sick and needy + modifier = { + add = -0.5 + court_position:executioner_court_position = { has_trait = sadistic } + } + modifier = { + add = -0.5 + court_position:executioner_court_position = { has_trait = callous } + } + } + + immediate = { + random_court_position_holder = { + type = executioner_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { has_court_position = court_physician_court_position } + } + save_scope_as = executioner + court_event_character_flag_effect = yes + if = { + limit = { + NOT = { has_trait = lifestyle_physician } + } + add_trait = lifestyle_physician + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_physician + LEVEL_1 = yes + LEVEL_3 = yes + } + } + } + if = { + limit = { + cp:councillor_court_chaplain = { + exists = yes + learning >= 10 + is_available_ai_adult = yes + NOR = { + has_court_position = executioner_court_position + this = scope:executioner + } + } + } + cp:councillor_court_chaplain = { + save_scope_as = learned_courtier + court_event_character_flag_effect = yes + } + } + else = { + random_courtier = { + limit = { + learning >= 10 + is_available_adult = yes + has_court_event_flag = no + NOR = { + has_court_position = executioner_court_position + this = scope:executioner + } + } + save_scope_as = learned_courtier + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = court_physician_court_position + court_position:court_physician_court_position = { + this != scope:executioner + } + } + random_court_position_holder = { + type = court_physician_court_position + limit = { this != scope:executioner } + save_scope_as = current_physician + } + } + } + + # Option A: Employ executioner as physician + option = { + name = court.0109.a + progress_towards_friend_effect = { + REASON = friend_hired_physician + CHARACTER = scope:executioner + OPINION = 0 + } + reverse_add_opinion = { + target = scope:executioner + modifier = grateful_opinion + opinion = 25 + } + revoke_court_position = { + recipient = scope:executioner + court_position = executioner_court_position + } + + court_position_grant_effect = { POS = court_physician CANDIDATE = scope:executioner EMPLOYER = root } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + modifier = { + factor = 2 + scope:executioner = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + } + } + + #Option C: Learn from the executioner + option = { + name = court.0109.c + trigger = { + OR = { + has_trait = scholar + has_trait = education_learning + has_lifestyle = learning_lifestyle + } + } + if = { + limit = { + scope:executioner = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + add_learning_lifestyle_xp = major_lifestyle_xp + } + else_if = { + limit = { + scope:executioner = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 50 + } + } + } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + else = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + stress_impact = { + arrogant = medium_stress_impact_gain + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + #Option D: Tell them to continue tending to the sick and needy + option = { + name = court.0109.d + primary_title.title_capital_county = { + change_development_progress = medium_development_progress_gain + } + reverse_add_opinion = { + target = scope:executioner + modifier = disappointed_opinion + opinion = -5 + } + scope:executioner = { + give_nickname = nick_health_god_mercy + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + } + } + after = { + scope:learned_courtier = { + clear_court_event_participation = yes + } + scope:executioner = { + clear_court_event_participation = yes + } + } +} + +##################################### +# A Relic of Revenge # +# by James Beaumont # +# 0111 # +##################################### + +# Executioner wants to turn the skull of your rival into an artefact +scripted_trigger enticingly_skulled_prisoner = { + is_ai = yes + is_adult = yes + OR = { + has_relation_rival = root + NOT = { has_faith = root.faith } + has_hook = root + num_sinful_traits >= 2 + } +} + +court.0111 = { + type = court_event + title = court.0111.t + desc = court.0111.desc + + theme = court + court_scene = { + button_position_character = scope:executioner + roles = { + scope:executioner = { + group = event_group + animation = scheme + } + scope:antiquarian = { + group = event_group + animation = anger + } + } + } + + cooldown = { years = 50 } + + trigger = { + employs_court_position = executioner_court_position + employs_court_position = antiquarian_court_position + court_position:executioner_court_position = { + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { + has_court_position = antiquarian_court_position + } + } + court_position:antiquarian_court_position = { + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { + has_court_position = executioner_court_position + } + } + any_prisoner = { enticingly_skulled_prisoner = yes } + } + + # More likely to trigger if the executioner is kind of evil + weight_multiplier = { + base = 3 + modifier = { + add = 1 + court_position:executioner_court_position = { + has_trait = sadistic + } + } + modifier = { + add = 1 + court_position:executioner_court_position = { + has_trait = callous + } + } + } + + immediate = { + if = { + limit = { + court_position:executioner_court_position = { + is_available_ai_adult = yes + NOT = { + has_court_position = antiquarian_court_position + } + } + } + court_position:executioner_court_position = { + save_scope_as = executioner + court_event_character_flag_effect = yes + } + } + if = { + limit = { + court_position:antiquarian_court_position = { + is_available_ai_adult = yes + NOT = { + has_court_position = executioner_court_position + } + } + } + court_position:antiquarian_court_position = { + save_scope_as = antiquarian + court_event_character_flag_effect = yes + } + } + random_prisoner = { + limit = { enticingly_skulled_prisoner = yes } + save_scope_as = rival + } + } + + # Option A: Give me their skull + option = { + name = court.0111.a + progress_towards_friend_effect = { + REASON = friend_took_side_in_dispute + CHARACTER = scope:executioner + OPINION = default_friend_opinion + } + reverse_add_opinion = { + target = scope:antiquarian + modifier = disgusted_opinion + opinion = -30 + } + save_scope_as = owner + if = { + limit = { + scope:rival = { + OR = { + has_relation_rival = root + has_hook = root + } + } + } + create_artifact = { + name = artifact_pedestal_skull_of_the_enemy_name + description = artifact_pedestal_skull_of_the_enemy_description + visuals = human_skull + type = pedestal + modifier = artifact_dread_baseline_add_2_modifier + save_scope_as = newly_created_artifact + } + } + + else_if = { + limit = { + scope:rival = { + OR = { + NOT = { has_faith = root.faith } + num_sinful_traits >= 2 + } + } + } + create_artifact = { + name = artifact_pedestal_skull_of_the_apostate_name + description = artifact_pedestal_skull_of_the_apostate_description + visuals = human_skull + type = pedestal + modifier = artifact_dread_baseline_add_2_modifier + save_scope_as = newly_created_artifact + } + } + + hidden_effect = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_dread_gain_mult_3_modifier + add_artifact_modifier = artifact_intrigue_per_stress_level_1_modifier + } + } + scope:newly_created_artifact = { + save_scope_as = this_artifact + } + scope:rival = { + save_scope_as = old_owner + } + hidden_effect = { + send_interface_toast = { + title = artifact.0012.t + left_icon = scope:this_artifact + right_icon = scope:old_owner + custom_tooltip = artifact.0012.tooltip + } + } + scope:rival = { + death = { + death_reason = death_skull_removed + killer = scope:executioner + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = major_stress_impact_gain + forgiving = major_stress_impact_gain + arbitrary = minor_stress_impact_loss + callous = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = -1 + } + } + } + + #Option B: Refuse the "artifact" + option = { + name = court.0111.b + reverse_add_opinion = { + target = scope:executioner + modifier = disappointed_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:antiquarian + modifier = relieved_opinion + opinion = 15 + } + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = medium_stress_impact_gain + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + ai_zeal = -0.5 + } + } + } + after = { + scope:executioner = { + clear_court_event_participation = yes + } + scope:antiquarian = { + clear_court_event_participation = yes + } + } +} + +##################################### +# A Closeted Cadaver # +# by James Beaumont # +# 0112 # +##################################### + +# Someone has been hiding a cadaver in the closet + +scripted_trigger valid_lady_in_waiting_like_character_trigger = { + is_available_ai_adult = yes + has_court_event_flag = no + trigger_if = { + limit = { + root = { is_female = yes } + } + is_female = yes + } + trigger_else = { + is_male = yes + } + OR = { + has_trait = sadistic + has_trait = callous + has_trait = wrathful + has_trait = craven + has_trait = paranoid + } + OR = { + has_court_position = lady_in_waiting_court_position + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + NOT = { + is_close_family_of = root + } +} + +court.0112 = { + type = court_event + title = court.0112.t + desc = court.0112.desc + + theme = court + court_scene = { + button_position_character = scope:guilty_courtier + roles = { + scope:guilty_courtier = { + group = event_group + animation = fear + } + } + } + + cooldown = { years = 20 } + + trigger = { + any_courtier = { + valid_lady_in_waiting_like_character_trigger = yes + } + any_pool_character = { + province = root.capital_province + is_available_ai_adult = yes + NOT = { exists = scope:inspiration } + } + is_available_adult = yes + } + + weight_multiplier = { + base = 0.5 + modifier = { + amenity_level = { + target = court_fashion + value > medium_amenity_level + } + add = 0.5 + } + modifier = { + add = 0.5 + employs_court_position = lady_in_waiting_court_position + } + } + + immediate = { + random_courtier = { + limit = { + valid_lady_in_waiting_like_character_trigger = yes + has_court_position = lady_in_waiting_court_position + } + alternative_limit = { + valid_lady_in_waiting_like_character_trigger = yes + } + save_scope_as = guilty_courtier + court_event_character_flag_effect = yes + } + hidden_effect = { + random_pool_character = { + limit = { + is_available_ai_adult = yes + NOT = { exists = scope:inspiration } + } + province = root.capital_province + save_scope_as = corpse + } + unknown_murder_effect = { + VICTIM = scope:corpse + MURDERER = scope:guilty_courtier + REASON = death_murder + } + if = { + limit = { + any_character_artifact = { + OR = { + has_variable = cabinet + has_variable = big_chest + } + NOT = { has_variable = ghost_cabinet } + } + } + random_character_artifact = { + limit = { + OR = { + has_variable = cabinet + has_variable = big_chest + } + NOT = { has_variable = ghost_cabinet } + } + set_variable = { + name = ghost_cabinet + years = 50 + } + } + } + } + } + + # Option A: I'll forget I saw this, for the good of fashion + option = { + name = court.0112.a + scope:guilty_courtier = { + random_secret = { + type = secret_murder + limit = { + secret_target = scope:corpse + NOT = { any_secret_knower = { this = root } } + } + disable_exposure_by = root + } + } + hidden_effect = { + create_artifact_regalia_effect = { + OWNER = root + SMITH = scope:guilty_courtier + } + } + custom_tooltip = get_regalia_artifact + scope:newly_created_artifact = { + save_scope_as = this_artifact + } + scope:guilty_courtier = { + save_scope_as = old_owner + } + hidden_effect = { + send_interface_toast = { + title = artifact.0012.t + left_icon = scope:this_artifact + right_icon = scope:old_owner + custom_tooltip = artifact.0012.tooltip + } + } + reverse_add_opinion = { + target = scope:guilty_courtier + modifier = grateful_opinion + opinion = 50 + } + stress_impact = { + zealous = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + just = major_stress_impact_gain + trusting = minor_stress_impact_loss + callous = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = 0.5 + ai_honor = -0.5 + } + } + } + + #Option B: Expose the murder + option = { + name = court.0112.b + reverse_add_opinion = { + target = scope:guilty_courtier + modifier = hate_opinion + opinion = -50 + } + scope:guilty_courtier = { + random_secret = { + type = secret_murder + limit = { + secret_target = scope:corpse + NOT = { any_secret_knower = { this = root } } + } + expose_secret = root + } + } + stress_impact = { + greedy = major_stress_impact_gain + vengeful = minor_stress_impact_gain + wrathful = medium_stress_impact_gain + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = -0.5 + ai_honor = 0.5 + } + } + } + + #Option C: Leave without saying anything + option = { + name = court.0112.c + reverse_add_opinion = { + target = scope:guilty_courtier + modifier = scared_opinion + opinion = -15 + } + scope:guilty_courtier = { + random_secret = { + type = secret_murder + limit = { + secret_target = scope:corpse + NOT = { any_secret_knower = { this = root } } + } + reveal_to = root + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = -0.5 + ai_honor = -0.5 + } + } + } + after = { + scope:guilty_courtier = { + clear_court_event_participation = yes + } + } +} + + + +################################################## +# Ewan + +################################################## +# 2201 - 2210 A Slice of the Pie - Your heirs debate the merits of partition. At length. +# 2401 - 2410 Second-Hand Glamour - Your lacklustre approach to fashion sees courtiers turn elsewhere. +################################################## + + ################################################## + # MAJESTY SUB-SECTION + +################################################## +# A Slice of the Pie +# by Ewan Cowhig Croft +# 2201 - 2210 +################################################## + +scripted_trigger court_2201_valid_basic_heir_child_trigger = { + exists = root.dynasty + dynasty ?= root.dynasty + # Must be available, and at least a teenager. + is_available_ai = yes + OR = { + is_adult = yes + child_is_teen_trigger = yes + } + # Finally, has to be chilling in the capital. + location = root.capital_province +} + +scripted_trigger court_2201_valid_eldest_heir_child_trigger = { + # Basic checks. + court_2201_valid_basic_heir_child_trigger = yes + # Is the eldest heir of root. + save_temporary_scope_as = eldest_heir_temp + root = { + player_heir_position = { + value = 0 #player heir + target = scope:eldest_heir_temp + } + } +} + +scripted_trigger court_2201_valid_younger_heir_child_trigger = { + # Basic checks. + court_2201_valid_basic_heir_child_trigger = yes + # Is getting *some* kind of inheritance through partition. + any_heir_title = { + holder ?= root + } + # Is *NOT* the eldest heir of root. + save_temporary_scope_as = younger_heir_temp + root = { + player_heir_position = { + value >= 1 + target = scope:younger_heir_temp + } + } +} + +court.2201 = { + type = court_event + title = court.2201.t + desc = court.2201.desc + theme = court + + cooldown = { years = 10 } + + court_scene = { + button_position_character = scope:eldest_heir + roles = { + scope:eldest_heir = { + group = event_group + animation = anger + } + scope:younger_heir = { + group = event_group + animation = dismissal + } + } + } + + trigger = { + # DLC check. + has_royal_court = yes + # Standard checks. + is_available_adult = yes + is_landed = yes + # Is using a form of partition succession. + has_partition_succession_realm_law_trigger = yes + # Has a suitable eldest heir/child. + any_player_heir = { + court_2201_valid_eldest_heir_child_trigger = yes + has_court_event_flag = no + } + # Has a suitable younger heir/child. + any_player_heir = { + court_2201_valid_younger_heir_child_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + # Grab our heirs. + random_player_heir = { + limit = { court_2201_valid_eldest_heir_child_trigger = yes } + save_scope_as = eldest_heir + court_event_character_flag_effect = yes + } + random_player_heir = { + limit = { court_2201_valid_younger_heir_child_trigger = yes } + save_scope_as = younger_heir + court_event_character_flag_effect = yes + } + } + + # Entitled to more, scope:eldest_heir? How about *nothing*! + option = { + name = court.2201.a + + # Disinherit scope:eldest_heir for free. + scope:eldest_heir = { + disinherit_effect = { DISINHERITOR = root } + } + # Friendship & hook with scope:younger_heir. + progress_towards_friend_effect = { + REASON = friend_disinherited_other_child + CHARACTER = scope:younger_heir + OPINION = 50 + } + if = { + limit = { + can_add_hook = { + target = scope:younger_heir + type = favor_hook + } + } + add_hook = { + target = scope:younger_heir + type = favor_hook + } + } + # Insta-rivalry with scope:eldest_heir and between the siblings. + scope:eldest_heir = { + if = { + limit = { + can_set_relation_rival_even_if_teen_trigger = { CHARACTER = root } + } + set_relation_rival = { + target = root + reason = rival_parent_rivalry + } + } + if = { + limit = { + can_set_relation_nemesis_even_if_teen_trigger = { CHARACTER = scope:younger_heir } + } + set_relation_nemesis = { + reason = nemesis_parent_rivalry + copy_reason = rival + target = scope:younger_heir + } + } + else_if = { + limit = { + can_set_relation_rival_even_if_teen_trigger = { CHARACTER = scope:younger_heir } + } + set_relation_rival = { + target = scope:younger_heir + reason = rival_inter_heir_rivalry + } + } + else = { + add_opinion = { + target = scope:younger_heir + modifier = hate_opinion + opinion = -50 + } + reverse_add_opinion = { + target = scope:younger_heir + modifier = hate_opinion + opinion = -50 + } + } + } + + stress_impact = { + vengeful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + irritable = minor_stress_impact_loss + forgiving = medium_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = 0.25 + } + } + } + + # Sad to say, scope:younger_heir, GetSheHe makes a good point. + option = { + name = court.2201.b + + # Disinherit scope:younger_heir for free. + scope:younger_heir = { + disinherit_effect = { DISINHERITOR = root } + } + # Friendship & hook with scope:eldest_heir. + progress_towards_friend_effect = { + REASON = friend_disinherited_other_child + CHARACTER = scope:eldest_heir + OPINION = 50 + } + if = { + limit = { + can_add_hook = { + target = scope:eldest_heir + type = favor_hook + } + } + add_hook = { + target = scope:eldest_heir + type = favor_hook + } + } + # Insta-rivalry with scope:younger_heir and between the siblings. + scope:younger_heir = { + if = { + limit = { + can_set_relation_rival_even_if_teen_trigger = { CHARACTER = root } + } + set_relation_rival = { + target = root + reason = rival_parent_rivalry + } + } + if = { + limit = { + can_set_relation_nemesis_even_if_teen_trigger = { CHARACTER = scope:eldest_heir } + } + set_relation_nemesis = { + reason = nemesis_parent_rivalry + copy_reason = rival + target = scope:eldest_heir + } + } + else_if = { + limit = { + can_set_relation_rival_even_if_teen_trigger = { CHARACTER = scope:eldest_heir } + } + set_relation_rival = { + target = scope:eldest_heir + reason = rival_inter_heir_rivalry + } + } + else = { + add_opinion = { + target = scope:eldest_heir + modifier = hate_opinion + opinion = -50 + } + reverse_add_opinion = { + target = scope:eldest_heir + modifier = hate_opinion + opinion = -50 + } + } + } + + stress_impact = { + vengeful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + irritable = minor_stress_impact_loss + forgiving = medium_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_compassion = -0.5 + } + } + } + + # They're siblings, I'm sure they'll get along fine without me. + option = { + name = court.2201.c + trigger = { + NOT = { has_trait = family_first } + } + + # Hidden potential rivalry in the future. + hidden_effect = { + scope:eldest_heir = { + progress_towards_rival_effect = { + CHARACTER = scope:younger_heir + REASON = rival_argued_succession + OPINION = -20 + } + } + } + # And some diplomacy lifestyle XP for your wisdom. + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + + stress_impact = { + trusting = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_rationality = -0.25 + ai_energy = -0.5 + } + } + } + + after = { + scope:younger_heir = { + clear_court_event_participation = yes + } + scope:eldest_heir = { + clear_court_event_participation = yes + } + } +} + + ################################################## + # FOREIGN GUESTS SUB-SECTION + +################################################## +# Second-Hand Glamour +# by Ewan Cowhig Croft +# 2401 - 2410 +################################################## + +scripted_trigger court_2401_valid_neighbouring_ruler_trigger = { + # Isn't at war with root. + NOT = { + is_at_war_with = root + } + # Has a royal court, and therefore amenities. + has_royal_court = yes + # Is more fashionable. + amenity_level = { + target = court_fashion + value > medium_amenity_level + } +} + +scripted_trigger court_2401_valid_scope_seller_trigger = { + OR = { + has_trait_malicious_trigger = yes + has_trait_dominant_trigger = yes + } +} + +court.2401 = { + type = court_event + title = court.2401.t + desc = court.2401.desc + theme = court + + cooldown = { years = 15 } + + court_scene = { + button_position_character = scope:seller + roles = { + scope:seller = { + group = event_group + animation = flirtation + } + } + } + + trigger = { + # DLC check. + has_royal_court = yes + # Standard checks. + is_available_adult = yes + is_landed = yes + # Low fashion amenity. + amenity_level = { + target = court_fashion + value <= medium_amenity_level + } + # Any neighbour with a better fashion amenity. + any_neighboring_and_across_water_realm_same_rank_owner = { court_2401_valid_neighbouring_ruler_trigger = yes } + # Available courtier to become scope:seller. + any_courtier = { + court_2401_valid_scope_seller_trigger = yes + is_available_ai_adult = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + amenity_level = { + target = court_fashion + value <= low_amenity_level + } + add = 1 + } + modifier = { + any_neighboring_and_across_water_realm_same_rank_owner = { + court_2401_valid_neighbouring_ruler_trigger = yes + amenity_level = { + target = court_fashion + value >= high_amenity_level + } + } + add = 1 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + # Grab an appropriate neighbouring realm. + random_neighboring_and_across_water_realm_same_rank_owner = { + limit = { court_2401_valid_neighbouring_ruler_trigger = yes } + save_scope_as = grander_ruler + } + # Grab a scope:seller. + random_courtier = { + limit = { + court_2401_valid_scope_seller_trigger = yes + is_available_ai_adult = yes + } + weight = { + base = 1 + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + } + save_scope_as = seller + court_event_character_flag_effect = yes + } + } + + # My, those *do* look enticing... + option = { + name = court.2401.a + trigger = { + can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } + } + + # Pay gold to copy the fashions. + pay_short_term_gold = { + target = scope:seller + gold = medium_gold_value + } + # Gain some corresponding CGV. + change_current_court_grandeur = major_court_grandeur_gain + # Increase your amenities + add_amenity_level = { type = court_fashion value = 1 } + # And opinion. + reverse_add_opinion = { + target = scope:seller + modifier = pleased_opinion + opinion = 30 + } + # But lose a little prestige. + add_prestige = minor_prestige_loss + + stress_impact = { + humble = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_vengefulness = -0.25 + ai_greed = -0.5 + } + } + } + + # Get those out of here! We don't need foreign nonsense in my court! + option = { + name = court.2401.b + + # Gain prestige! + add_prestige = medium_prestige_gain + # But upset scope:seller + reverse_add_opinion = { + target = scope:seller + modifier = angry_opinion + opinion = -30 + } + #And loss a little CGV. + change_current_court_grandeur = minor_court_grandeur_loss + #But gain tiny legitimacy + add_legitimacy = miniscule_legitimacy_gain + + stress_impact = { + arrogant = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_sociability = -0.25 + } + } + } + + # Who cares what people wear? + option = { + name = court.2401.c + + # Gain a little consolation prestige. + add_prestige = miniscule_prestige_gain + + stress_impact = { + lazy = miniscule_stress_impact_loss + shy = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + humble = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_vengefulness = -0.25 + ai_energy = -0.5 + } + } + } + after = { + scope:seller = { + clear_court_event_participation = yes + } + } +} + + + +################################################## +# Bianca + +################################################## +# 3040 - 3049 Homesick MotherFather +# 3060 - 3069 A Feline Hunter +################################################## + +##################################### +# A courtier's inspired work # +# by Bianca Savazzi # +# 3010 # +##################################### + +#scripted_effect court_3010_inspired_work_neutral_toast_effect = { +# hidden_effect = { +# send_interface_toast = { +# title = court.3010.t +# right_icon = scope:inspired_writer +# custom_tooltip = court.3010.c.neutral +# } +# } +#} +#scripted_effect court_3010_inspired_work_stress_toast_effect = { +# if = { +# limit = { +# OR = { +# has_trait = arrogant +# has_trait = wrathful +# has_trait = impatient +# has_trait = sadistic +# } +# } +# stress_impact = { +# arrogant = medium_stress_impact_gain +# wrathful = medium_stress_impact_gain +# impatient = medium_stress_impact_gain +# sadistic = medium_stress_impact_gain +# } +# } +# else = { add_stress = minor_stress_gain } +# +# hidden_effect = { +# root = { +# send_interface_toast = { +# title = court.3010.t +# right_icon = scope:inspired_writer +# custom_tooltip = court.3010.c.stress +# show_as_tooltip = { +# scope:inspired_writer = { +# if = { +# limit = { +# OR = { +# has_trait = arrogant +# has_trait = wrathful +# has_trait = impatient +# has_trait = sadistic +# } +# } +# stress_impact = { +# arrogant = major_stress_impact_gain +# wrathful = major_stress_impact_gain +# impatient = major_stress_impact_gain +# sadistic = major_stress_impact_gain +# } +# } +# else = { add_stress = medium_stress_gain } +# } +# } +# } +# } +# } +#} + +scripted_trigger court_3010_inspired_work_courtier_trigger = { + is_available_ai_adult = yes + NOR = { + exists = scope:inspiration + exists = inspiration + } + NOR = { + has_trait = blind + has_relation_rival = root + has_relation_potential_rival = root + has_relation_nemesis = root + } + learning >= 10 + diplomacy >= 12 +} + +## An inspired courtier +court.3011 = { + type = character_event + title = court.3010.t + desc = { + desc = court.3011.desc.opening + first_valid = { + triggered_desc = { + trigger = { + scope:inspired_writer = { + OR = { + has_trait = shy + has_trait = chaste + } + } + } + desc = court.3011.desc.shy_or_chaste + } + triggered_desc = { + trigger = { + scope:inspired_writer = { + OR = { + has_trait = adventurer + has_trait = pilgrim + has_trait = lifestyle_traveler + } + } + } + desc = court.3011.desc.adventurer_or_pilgrim + } + triggered_desc = { + desc = court.3011.desc.generic_fallback + } + } + desc = court.3011.desc.ending + } + theme = court + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:inspired_writer + animation = happiness + } + + trigger = { + has_ep1_dlc_trigger = yes + NOT = { has_trait = blind } + has_royal_court = yes + any_courtier_or_guest = { + court_3010_inspired_work_courtier_trigger = yes + } + } + + immediate = { + random_courtier_or_guest = { + limit = { + court_3010_inspired_work_courtier_trigger = yes + } + save_scope_as = inspired_writer + } + } + + # Option A: Encourage them to keep writing + option = { + name = court.3011.a + custom_tooltip = court.3011.c.tt.gain_inspiration + scope:inspired_writer = { create_inspiration = book_inspiration } + progress_towards_friend_effect = { + REASON = friend_believed_in_my_writing + CHARACTER = scope:inspired_writer + OPINION = 20 + } + stress_impact = { + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + # Option C: You tell them to stop + option = { + name = court.3011.c + custom_tooltip = court.3011.c.tt.hurt + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:inspired_writer + modifier = cruelty_opinion + opinion = -20 + } + stress_impact = { + gregarious = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_sociability = -1 + } + } + } +} +# +###################################### +## Lady-in-Waiting Events # +## by Bianca Savazzi # +## 3031 # +###################################### +# +## Court position smooths things over with people +court.3031 = { + type = court_event + title = court.3031.t + desc = court.3031.desc + theme = court + cooldown = { years = 15 } + court_scene = { + button_position_character = scope:liw + roles = { + scope:liw = { + group = event_group + animation = happiness + } + root = { + group = event_group + animation = personality_rational + } + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + trigger = { + has_court_event_flag = no + OR = { + AND = { + employs_court_position = lady_in_waiting_court_position + any_court_position_holder = { + type = lady_in_waiting_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + AND = { + employs_court_position = cultural_emissary_court_position + any_court_position_holder = { + type = cultural_emissary_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + AND = { + employs_court_position = chief_eunuch_court_position + any_court_position_holder = { + type = chief_eunuch_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + AND = { + employs_court_position = court_poet_court_position + any_court_position_holder = { + type = court_poet_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + } + any_vassal = { + count > 0 + vassal_stance = minority + } + any_vassal = { + count > 0 + vassal_stance = barons_and_minor_landholders + } + any_sub_realm_county = { + culture = { + NOR = { + this = root.culture + this = root.capital_county.culture + } + } + } + } + + immediate = { + court_event_character_flag_effect = yes + random_court_position_holder = { + type = lady_in_waiting_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = liw + } + if = { + limit = { + NOT = { exists = scope:liw } + } + random_court_position_holder = { + type = cultural_emissary_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = liw + } + } + if = { + limit = { + NOT = { exists = scope:liw } + } + random_court_position_holder = { + type = chief_eunuch_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = liw + } + } + if = { + limit = { + NOT = { exists = scope:liw } + } + random_court_position_holder = { + type = court_poet_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = liw + } + } + scope:liw = { + court_event_character_flag_effect = yes + assign_quirk_effect = yes + } + random_sub_realm_county = { + limit = { + culture = { + NOR = { + this = root.culture + this = root.capital_county.culture + } + } + } + save_scope_as = reference_county + } + root = { save_scope_as = root_scope } + } + + # Option A: Minority vassals + option = { + name = court.3031.a + every_vassal = { + vassal_stance = minority + custom = every_minority_vassal + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + # Option B: Baron vassals + option = { + name = court.3031.b + every_vassal = { + vassal_stance = barons_and_minor_landholders + custom = every_baron_vassal + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + } + } + } + + # Option C: Minority culture + option = { + name = court.3031.c + every_sub_realm_county = { + limit = { + culture = scope:reference_county.culture + } + change_county_control = 5 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + # Option D: Nah + option = { + name = court.3031.d + add_prestige = miniscule_prestige_gain + stress_impact = { + ambitious = minor_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + has_trait = lazy + add = 10 + } + modifier = { + has_trait = content + add = 10 + } + } + } + after = { + clear_court_event_participation = yes + scope:liw = { + clear_court_event_participation = yes + } + } +} +# +##################################### +# Homesick MotherFather # +# by Bianca Savazzi # +# 3040 - 3041 # +##################################### + +# Your parent of a different culture is caught feeling homesick +court.3040 = { + type = court_event + title = court.3040.t + desc = court.3040.desc + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:homesick_parent + roles = { + scope:homesick_parent = { + group = event_group + animation = sadness + } + root = { + group = event_group + animation = personality_rational + } + } + } + lower_left_portrait = scope:jester + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + trigger = { + has_court_event_flag = no + any_parent = { + has_court_event_flag = no + is_courtier_of = root + culture != root.culture + save_temporary_scope_as = temp_parent_scope + } + capital_province.culture = root.culture + } + + immediate = { + court_event_character_flag_effect = yes + random_parent = { + limit = { + has_court_event_flag = no + is_courtier_of = root + culture != root.culture + } + save_scope_as = homesick_parent + court_event_character_flag_effect = yes + } + if = { + limit = { + any_pool_character = { + province = root.location + culture = scope:homesick_parent.culture + diplomacy >= 8 + is_available_ai_adult = yes + } + } + random_pool_character = { + province = root.location + limit = { + culture = scope:homesick_parent.culture + diplomacy >= 8 + is_available_ai_adult = yes + } + save_scope_as = jester + } + } + else = { + create_character = { + template = jester_template + location = root.location + culture = scope:homesick_parent.culture + faith = scope:homesick_parent.faith + save_scope_as = jester + } + } + + if = { + limit = { + OR = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = antiquarian_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = wet_nurse_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = keeper_of_swans_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = court_gardener_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = lady_in_waiting_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = court_tutor_court_position + } + } + } + random_list = { + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = antiquarian_court_position + } + } + scope:homesick_parent = { add_character_flag = antiquarian } + } + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = wet_nurse_court_position + } + } + scope:homesick_parent = { add_character_flag = wet_nurse } + } + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = keeper_of_swans_court_position + } + } + scope:homesick_parent = { add_character_flag = swans } + } + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = court_gardener_court_position + } + } + scope:homesick_parent = { add_character_flag = gardener } + } + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = lady_in_waiting_court_position + } + } + scope:homesick_parent = { add_character_flag = liw } + } + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = court_tutor_court_position + } + } + scope:homesick_parent = { add_character_flag = tutor } + } + } + } + } + + # Option A: increase amenities + option = { + name = court.3040.a + trigger = { + # The culture of origin has higher court grandeur's courts + scope:homesick_parent.culture = { + any_culture_duchy = { + holder.top_liege ?= { + has_royal_court = yes + court_grandeur_current > root.court_grandeur_current + } + } + } + #Your amenities are not all top level + OR = { + amenity_level = { + target = court_fashion + value < max_amenity_level + } + amenity_level = { + target = court_lodging_standards + value < max_amenity_level + } + amenity_level = { + target = court_food_quality + value < max_amenity_level + } + amenity_level = { + target = court_servants + value < max_amenity_level + } + } + } + custom_tooltip = court.3040.a.tt + hidden_effect = { + random_list = { + 25 = { + trigger = { + amenity_level = { + target = court_fashion + value < max_amenity_level + } + } + send_interface_toast = { + title = court.3040.a.tt_2 + left_icon = scope:homesick_parent + add_amenity_level = { + type = court_fashion + value = 1 + } + } + } + 25 = { + trigger = { + amenity_level = { + target = court_lodging_standards + value < max_amenity_level + } + } + send_interface_toast = { + title = court.3040.a.tt_2 + left_icon = scope:homesick_parent + add_amenity_level = { + type = court_lodging_standards + value = 1 + } + } + } + 25 = { + trigger = { + amenity_level = { + target = court_food_quality + value < max_amenity_level + } + } + send_interface_toast = { + title = court.3040.a.tt_2 + left_icon = scope:homesick_parent + add_amenity_level = { + type = court_food_quality + value = 1 + } + } + } + 25 = { + trigger = { + amenity_level = { + target = court_servants + value < max_amenity_level + } + } + send_interface_toast = { + title = court.3040.a.tt_2 + left_icon = scope:homesick_parent + add_amenity_level = { + type = court_servants + value = 1 + } + } + } + } + } + scope:homesick_parent = { + add_opinion = { + target = root + modifier = listened_opinion + } + } + stress_impact = { + greedy = major_stress_impact_gain + humble = medium_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + + ai_value_modifier = { + ai_greed = -1 + } + } + } + + # Option B: available job + option = { + name = court.3040.b + trigger = { + scope:homesick_parent = { + OR = { + has_character_flag = antiquarian + has_character_flag = wet_nurse + has_character_flag = swans + has_character_flag = gardener + has_character_flag = liw + has_character_flag = tutor + } + } + } + if = { + limit = { + scope:homesick_parent = { has_character_flag = antiquarian } + } + court_position_grant_effect = { POS = antiquarian CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + else_if = { + limit = { + scope:homesick_parent = { has_character_flag = wet_nurse } + } + court_position_grant_effect = { POS = wet_nurse CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + else_if = { + limit = { + scope:homesick_parent = { has_character_flag = swans } + } + court_position_grant_effect = { POS = keeper_of_swans CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + else_if = { + limit = { + scope:homesick_parent = { has_character_flag = gardener } + } + court_position_grant_effect = { POS = court_gardener CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + else_if = { + limit = { + scope:homesick_parent = { has_character_flag = liw } + } + court_position_grant_effect = { POS = lady_in_waiting CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + else_if = { + limit = { + scope:homesick_parent = { has_character_flag = tutor } + } + court_position_grant_effect = { POS = court_tutor CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + scope:homesick_parent = { + add_opinion = { + target = root + modifier = listened_opinion + } + } + stress_impact = { + lazy = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + + modifier = { + has_trait = lazy + add = -25 + } + modifier = { + has_trait = content + add = -25 + } + } + } + + # Option C: parent's culture's jester + option = { + name = court.3040.c + flavor = court.3040.c.tt + trigger = { + exists = scope:jester + } + add_courtier = scope:jester + court_position_grant_effect = { POS = court_jester CANDIDATE = scope:jester EMPLOYER = root } + stress_impact = { + gregarious = minor_stress_impact_loss + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + + modifier = { + has_trait = shy + add = -50 + } + } + } + + # Option D: Don't care, go sulk elsewhere + option = { + name = court.3040.d + scope:homesick_parent = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -10 + } + } + add_prestige = miniscule_prestige_gain + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + after = { + clear_court_event_participation = yes + scope:homesick_parent = { + clear_court_event_participation = yes + remove_character_flag = antiquarian + remove_character_flag = wet_nurse + remove_character_flag = swans + remove_character_flag = gardener + remove_character_flag = liw + remove_character_flag = tutor + } + if = { + limit = { + is_ai = yes + scope:jester = { + NOT = { has_court_position = court_jester_court_position } + } + } + scope:jester = { silent_disappearance_effect = yes } + } + } +} + + + +##################################### +# A Feline Hunter # +# by Bianca Savazzi # +# 3060 - 3061 # +##################################### + +# Court Cat +court.3060 = { + type = court_event + title = court.3060.t + desc = court.3060.desc + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:cat_finder + roles = { + scope:cat_finder = { + group = event_group + animation = happiness + } + } + } + + weight_multiplier = { + base = 0.5 + + modifier = { + has_royal_court = yes + court_grandeur_current_level > 0 + add = { + value = 1 + divide = court_grandeur_current_level + } + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + trigger = { + NOR = { + any_owned_story = { type = story_cycle_pet_cat } + has_character_modifier = cat_story_modifier + } + OR = { + any_vassal = { + is_available_ai_adult = yes + has_court_event_flag = no + } + any_courtier = { + is_available_ai_adult = yes + has_court_event_flag = no + } + } + } + + immediate = { + #Pick cat finder + if = { + limit = { + employs_court_position = master_of_hunt_court_position + any_court_position_holder = { + type = master_of_hunt_court_position #Primary choice as they are also used for dog option + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = master_of_hunt_court_position + limit = { + is_available_ai_adult = yes + } + save_scope_as = cat_finder + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + any_vassal = { + is_available_ai_adult = yes + } + } + random_vassal = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = cat_finder + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + any_courtier = { + is_available_ai_adult = yes + } + } + random_courtier = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = cat_finder + court_event_character_flag_effect = yes + } + } + } + + # Option A: Adopt! + option = { + name = court.3060.a + start_cat_story_cycle_effect = yes + hidden_effect = { add_character_modifier = rat_hunting_cat_modifier } + + ai_chance = { + base = 20 + + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + # Option D: No cat + option = { + name = court.3060.d + scope:cat_finder = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -2 + } + } + } + after = { + scope:cat_finder = { + clear_court_event_participation = yes + } + } +} + + + + +################################################## +# Isabella + +################################################## +# 4750 - 4751 Your court poet is writing a heroic book +################################################## + + +################################################## +# I Need a Hero +# by Isabella Welch +# 4750 - 4759 +################################################## + +scripted_trigger pope_joan_trigger = { + faith = faith:catholic + is_female = yes + any_held_title = { is_head_of_faith = no } +} + +scripted_trigger lady_godiva_trigger = { + OR = { + root.culture = culture:anglo_saxon + root.culture = { + any_parent_culture = { this = culture:anglo_saxon } + } + root.culture = culture:english + root.culture = { + any_parent_culture = { this = culture:english } + } + } +} + +scripted_trigger sinbad_trigger = { + capital_province = { + OR = { + geographical_region = world_middle_east + geographical_region = world_africa_east + geographical_region = world_africa_north + } + } +} + +scripted_trigger caligula_trigger = { + OR = { + has_trait = sadistic + has_trait = torturer + has_focus = intrigue_intimidation_focus + has_trait = deviant + has_trait = lunatic_1 + } + OR = { + has_title = title:k_italy + has_title = title:k_romagna + has_title = title:k_sardinia + has_title = title:e_italy + is_roman_emperor_excluding_byzantium_trigger = yes + capital_province = { + geographical_region = world_europe_west_britannia + geographical_region = world_europe_west_germania + geographical_region = world_europe_west_francia + geographical_region = world_europe_west_iberia + geographical_region = world_europe_west + geographical_region = world_europe_south_italy + geographical_region = world_europe_south + } + culture = { has_cultural_pillar = heritage_byzantine } + } +} + +scripted_trigger nasreddin_trigger = { + OR = { + culture = culture:uyghur + culture = culture:afghan + root.culture = { + has_cultural_pillar = heritage_indo_aryan + has_cultural_pillar = heritage_dravidian + } + capital_province = { + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_middle_east_arabia + geographical_region = world_india + geographical_region = world_asia_minor + } + } + current_year >1230 +} + +scripted_trigger valmiki_trigger = { + root.culture = { + has_cultural_pillar = heritage_indo_aryan + } +} + +court.4750 = { + type = court_event + title = court.4750.t + desc = court.4750.desc + theme = court + + trigger = { + has_court_event_flag = no + can_employ_court_position_type = court_poet_court_position + trigger_if = { + limit = { + is_ai = yes + } + any_pool_character = { + province = root.location + OR = { + diplomacy >= 14 + has_trait = lifestyle_poet + } + is_available_ai_adult = yes + } + } + } + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:poet + roles = { + scope:poet = { + group = event_group + animation = happiness + } + root = { + group = event_group + animation = personality_bold + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + court_event_character_flag_effect = yes + if = { + limit = { + any_pool_character = { + province = root.location + OR = { + diplomacy >= 14 + has_trait = lifestyle_poet + } + is_available_ai_adult = yes + } + } + random_pool_character = { + province = root.location + limit = { + OR = { + diplomacy >= 14 + has_trait = lifestyle_poet + } + is_available_ai_adult = yes + } + save_scope_as = poet + } + if = { + limit = { + scope:poet = { + NOT = { has_trait = lifestyle_poet } + } + } + scope:poet = { add_trait = lifestyle_poet } + } + } + else = { + create_character = { + template = poet_template + location = root.location + save_scope_as = poet + } + scope:poet = { add_character_flag = created } + } + scope:poet = { + court_event_character_flag_effect = yes + } + } + + option = { + name = court.4750.a + add_character_flag = pope_joan + trigger = { + pope_joan_trigger = yes + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = -0.5 + } + } + } + + option = { + name = court.4750.b + add_character_flag = lady_godiva + trigger = { + lady_godiva_trigger = yes + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { + name = court.4750.c + add_character_flag = sinbad + add_character_flag = ruler_character + trigger = { + sinbad_trigger = yes + lady_godiva_trigger = no + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.25 + ai_rationality = -0.5 + } + } + } + option = { + name = court.4750.d + add_character_flag = caligula + trigger = { + caligula_trigger = yes + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_rationality = -0.5 + } + } + } + + option = { + name = court.4750.e + add_character_flag = nasreddin + add_character_flag = ruler_character + trigger = { + nasreddin_trigger = yes + lady_godiva_trigger = no + pope_joan_trigger = no + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.75 + ai_rationality = 0.5 + } + } + } + + option = { + name = court.4750.f + add_character_flag = valmiki + trigger = { + valmiki_trigger = yes + lady_godiva_trigger = no + pope_joan_trigger = no + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.75 + ai_rationality = 0.5 + } + } + } + option = { + name = court.4750.g + add_character_flag = ruler_hero + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.75 + } + } + } + + option = { + name = court.4750.h + add_character_flag = rejected_poet + stress_impact = { + lifestyle_poet = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_greed = -0.75 + } + } + } + + after = { + if = { + limit = { NOT = { has_character_flag = rejected_poet } } + trigger_event = { + id = court.4751 + days = 90 + } + } + else = { + scope:poet = { + if = { + limit = { + has_character_flag = created + } + silent_disappearance_effect = yes + } + } + } + clear_court_event_participation = yes + scope:poet ?= { + clear_court_event_participation = yes + } + remove_character_flag = rejected_poet + } +} + +scripted_effect court_4751_flag_removal_effect = { + remove_character_flag = ruler_character + remove_character_flag = pope_joan + remove_character_flag = ruler_hero + remove_character_flag = lady_godiva + remove_character_flag = sinbad + remove_character_flag = caligula + remove_character_flag = nasreddin + remove_character_flag = valmiki +} + +court.4751 = { + type = character_event + title = court.4750.t + desc = { + desc = court.4751.intro + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = pope_joan + } + desc = court.4751.topic.pope_joan + } + triggered_desc = { + trigger = { + has_character_flag = lady_godiva + } + desc = court.4751.topic.lady_godiva + } + triggered_desc = { + trigger = { + has_character_flag = sinbad + } + desc = court.4751.topic.sinbad + } + triggered_desc = { + trigger = { + has_character_flag = caligula + } + desc = court.4751.topic.caligula + } + triggered_desc = { + trigger = { + has_character_flag = nasreddin + } + desc = court.4751.topic.nasreddin + } + triggered_desc = { + trigger = { + has_character_flag = valmiki + } + desc = court.4751.topic.valmiki + } + triggered_desc = { + trigger = { + has_character_flag = ruler_hero + } + desc = court.4751.topic.ruler_hero + } + } + desc = court.4751.topic.unexpected + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = ruler_character + } + desc = court.4751.ruler_character + } + triggered_desc = { + trigger = { + has_character_flag = pope_joan + } + desc = court.4701.pope_joan_desc + } + triggered_desc = { + trigger = { + has_character_flag = ruler_hero + } + desc = court.4701.ruler_hero_desc + } + } + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = lady_godiva + } + desc = court.4751.topic.lady_godiva_desc + } + triggered_desc = { + trigger = { + has_character_flag = sinbad + } + desc = court.4751.topic.sinbad_desc + } + triggered_desc = { + trigger = { + has_character_flag = caligula + } + desc = court.4751.topic.caligula_desc + } + triggered_desc = { + trigger = { + has_character_flag = nasreddin + } + desc = court.4751.topic.nasreddin_desc + } + triggered_desc = { + trigger = { + has_character_flag = valmiki + } + desc = court.4751.topic.valmiki_desc + } + } + } + theme = diplomacy_majesty_focus + + left_portrait = { + character = root + animation = reading + } + right_portrait = { + character = scope:poet + animation = interested + } + + trigger = { + scope:poet = { + is_alive = yes + is_available = yes + liege = root + } + is_available = yes + } + on_trigger_fail = { + court_4751_flag_removal_effect = yes + } + + immediate = { + hidden_effect = { + if = { + limit = { + has_character_flag = pope_joan + scope:poet = { NOT = { has_trait = zealous } } + } + scope:poet = { + add_secret = { + type = secret_non_believer + } + } + faith.religious_head = { + save_scope_as = current_head_of_faith + } + } + } + + save_scope_as = owner + } + + option = { + name = court.4751.a + trigger = { + has_character_flag = pope_joan + is_attracted_to_gender_of = scope:poet + } + if = { + limit = { + can_set_relation_potential_lover_trigger = { CHARACTER = scope:poet } + } + set_relation_potential_lover = scope:poet + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = pope_joan_book_name + description = pope_joan_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_piety_2_modifier + save_scope_as = pope_joan_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = pope_joan_book_name + description = pope_joan_book_desc + type = book + visuals = book + modifier = artifact_monthly_piety_2_modifier + save_scope_as = pope_joan_book + save_scope_as = artifact + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:poet + COURT_POS = court_poet_court_position + } + } + court_position_grant_effect = { POS = court_poet CANDIDATE = scope:poet EMPLOYER = root } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.75 + ai_rationality = -0.5 + ai_zeal = -0.75 + } + } + } + + option = { + name = court.4751.b + trigger = { + has_character_flag = pope_joan + root != scope:current_head_of_faith + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = pope_joan_book_name + description = pope_joan_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_piety_2_modifier + save_scope_as = pope_joan_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = pope_joan_book_name + description = pope_joan_book_desc + type = book + visuals = book + modifier = artifact_monthly_piety_2_modifier + save_scope_as = pope_joan_book + save_scope_as = artifact + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:poet + COURT_POS = court_poet_court_position + } + } + court_position_grant_effect = { POS = court_poet CANDIDATE = scope:poet EMPLOYER = root } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.75 + ai_rationality = -0.5 + ai_zeal = 0.75 + } + } + } + + option = { + name = court.4751.c + flavor = court.4751.c.tt + add_character_modifier = { + modifier = compared_to_lady_godiva + years = 5 + } + trigger = { + has_character_flag = lady_godiva + } + if = { + limit = { + any_relation = { + type = potential_lover + } + } + random_relation = { + type = potential_lover + save_scope_as = potential_lover + } + progress_towards_lover_effect = { + CHARACTER = scope:potential_lover + REASON = lover_court_godiva + OPINION = 0 + } + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = lady_godiva_book_name + description = lady_godiva_book_desc + type = book + visuals = indian_book + modifier = artifact_attraction_opinion_3_modifier + save_scope_as = lady_godiva_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = lady_godiva_book_name + description = lady_godiva_book_desc + type = book + visuals = book + modifier = artifact_attraction_opinion_3_modifier + save_scope_as = lady_godiva_book + save_scope_as = artifact + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:poet + COURT_POS = court_poet_court_position + } + } + court_position_grant_effect = { POS = court_poet CANDIDATE = scope:poet EMPLOYER = root } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } + + option = { + name = court.4751.e + trigger = { + has_character_flag = nasreddin + } + add_character_modifier = { + modifier = compared_to_nasreddin + years = 5 + } + create_artifact = { + name = nasreddin_book_name + description = nasreddin_book_desc + type = book + visuals = book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = nasreddin_book + save_scope_as = artifact + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = nasreddin_book_name + description = nasreddin_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = nasreddin_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = nasreddin_book_name + description = nasreddin_book_desc + type = book + visuals = book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = nasreddin_book + save_scope_as = artifact + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:poet + COURT_POS = court_poet_court_position + } + } + court_position_grant_effect = { POS = court_poet CANDIDATE = scope:poet EMPLOYER = root } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.75 + } + } + } + + option = { + name = court.4751.f + trigger = { + NOT = { + has_character_flag = pope_joan + } + } + if = { + limit = { has_character_flag = valmiki } + add_character_modifier = { + modifier = compared_to_valmiki + years = 5 + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = valmiki_book_name + description = valmiki_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = valmiki_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = valmiki_book_name + description = valmiki_book_desc + type = book + visuals = book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = valmiki_book + save_scope_as = artifact + } + } + } + if = { + limit = { has_character_flag = caligula } + add_character_modifier = { + modifier = compared_to_caligula + years = 5 + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = caligula_book_name + description = caligula_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = caligula_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = caligula_book_name + description = caligula_book_desc + type = book + visuals = book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = caligula_book + save_scope_as = artifact + } + } + } + if = { + limit = { has_character_flag = ruler_hero } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = ruler_hero_book_name + description = ruler_hero_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = ruler_hero_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = ruler_hero_book_name + description = ruler_hero_book_desc + type = book + visuals = book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = ruler_hero_book + save_scope_as = artifact + } + } + } + if = { + limit = { + has_character_flag = sinbad + } + add_character_modifier = { + modifier = compared_to_sinbad + years = 5 + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = sinbad_book_name + description = sinbad_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_martial_lifestyle_xp_1_modifier + save_scope_as = sinbad_hero_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = sinbad_book_name + description = sinbad_book_desc + type = book + visuals = book + modifier = artifact_monthly_martial_lifestyle_xp_1_modifier + save_scope_as = sinbad_hero_book + save_scope_as = artifact + } + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:poet + COURT_POS = court_poet_court_position + } + } + court_position_grant_effect = { POS = court_poet CANDIDATE = scope:poet EMPLOYER = root } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 0.75 + } + } + } + option = { + name = court.4751.h + scope:poet = { + add_opinion = { + modifier = insulted_opinion + target = root + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.75 + } + } + } + + after = { + if = { + limit = { + scope:poet = { + NOT = { has_court_position = court_poet_court_position } + } + is_ai = yes + } + scope:poet = { silent_disappearance_effect = yes } + } + court_4751_flag_removal_effect = yes + } +} + + +################################################## +# Linnea + +################################################## +# 5030 - 5039 Playtime +# 5040 - 5049 Pranking Spree +# 5055 - 5059 Colorful Talent +# 5060 - 5069 The Gallant Knight +# 5070 - 5074 Dedicated Tutor +# 5075 - 5079 Gift From Neigh-bor +################################################## + +##################################### +# Playtime # +# by Linnéa Thimrén # +##################################### + +#A child is struggling to focus on ruling +court.5030 = { + type = court_event + title = court.5030.t + desc = { + desc = court.5030.desc_opening + first_valid = { + triggered_desc = { + trigger = { age <= 10 } + desc = court.5030.desc_young + } + desc = court.5030.desc + } + desc = court.5030.desc_ending + } + theme = court + + court_scene = { + button_position_character = scope:child + roles = { + scope:child = { + group = event_group + animation = boredom + } + } + } + + trigger = { + NOT = { has_character_flag = had_event_court_5030 } + age >= 4 + age <= 13 + any_courtier = { + age >= 3 + age <= 13 + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ## Admin courts are extra boring. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5030 + years = 10 + } + set_favorite_toy_effect = yes + random_courtier = { + limit = { + age >= 3 + age <= 13 + } + weight = { + base = 1 + modifier = { #More likely to pick someone closer in age + add = 5 + age >= root.age_dif_child_down + age <= root.age_dif_child_up + } + } + save_scope_as = child + court_event_character_flag_effect = yes + set_favorite_toy_effect = yes + } + } + + option = { #Join in the game + name = court.5030.a + add_prowess_skill = 1 + if = { + limit = { + NOT = { has_relation_friend = scope:child } + } + progress_towards_friend_effect = { + REASON = friend_played_with_child + CHARACTER = scope:child + OPINION = default_friend_opinion + } + } + else = { + scope:child = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 15 + } + } + } + add_stress = minor_stress_loss + } + + option = { #I have to be serious. + name = court.5030.b + add_stewardship_skill = 1 + scope:child = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -10 + } + } + + add_stress = medium_stress_gain + } + after = { + scope:child = { + clear_court_event_participation = yes + } + } +} + + + +##################################### +# Colorful Talent # +# by Linnéa Thimrén # +##################################### + +scripted_trigger court_5055_child_painter_trigger = { + is_available_ai_child = yes + age >= 6 + NOT = { is_player_heir_of = root } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } +} + +#A young courtier is exploring their artistic side - encourage or dissuade? +court.5055 = { + type = court_event + title = court.5055.t + desc = court.5055.desc + theme = court + + court_scene = { + button_position_character = scope:painter + roles = { + scope:painter = { + group = event_group + animation = admiration + } + } + } + cooldown = { years = 25 } + + trigger = { + is_available_adult = yes + any_courtier = { + court_5055_child_painter_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ## More likely at courts with more time for non-active pursuits. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_courtier = { + limit = { + court_5055_child_painter_trigger = yes + } + save_scope_as = painter + court_event_character_flag_effect = yes + } + } + + option = { #Make them stop + name = court.5055.a + scope:painter = { + add_martial_skill = 1 + add_stewardship_skill = 1 + } + } + + option = { #Encourage them + name = court.5055.b + scope:painter = { + add_diplomacy_skill = 1 + add_intrigue_skill = 1 + } + } + after = { + scope:painter = { + clear_court_event_participation = yes + } + } +} + + +##################################### +# The Gallant Knight # +# by Linnéa Thimrén # +##################################### + +scripted_trigger court_5060_knight_trigger = { + is_knight_of = root + basic_is_available_ai = yes + NOT = { has_character_flag = was_the_target_of_event_court_5060 } + exists = var:number_of_impressive_knight_things +} + +#A knight has excelled during recent battles (injured or killed enemies) and you are expected to reward them +court.5060 = { + type = court_event + title = court.5060.t + desc = court.5060.desc + theme = court + + court_scene = { + button_position_character = scope:knight + roles = { + scope:knight = { + group = event_group + animation = personality_honorable + } + } + } + + trigger = { + NOT = { has_character_flag = had_event_court_5060 } + age >= 10 + has_variable_list = impressive_knights + any_in_list = { + variable = impressive_knights + court_5060_knight_trigger = yes + has_court_event_flag = no + } + any_held_title = { + title_tier = county + this != root.capital_county + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + any_in_list = { + variable = impressive_knights + court_5060_knight_trigger = yes + var:number_of_impressive_knight_things >= 2 + } + } + modifier = { + add = 1 + any_in_list = { + variable = impressive_knights + court_5060_knight_trigger = yes + var:number_of_impressive_knight_things >= 4 + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5060 + years = 10 + } + random_in_list = { + variable = impressive_knights + limit = { + court_5060_knight_trigger = yes + } + add_character_flag = { + flag = was_the_target_of_event_court_5060 + years = 10 + } + + weight = { + base = 1 + modifier = { + is_acclaimed = yes + add = 2 + } + modifier = { + add = { + add = var:number_of_impressive_knight_things + multiply = 2 + } + } + } + save_scope_as = knight + court_event_character_flag_effect = yes + } + } + + option = { # Accolade + name = court.5060.c + trigger = { + scope:knight = { + is_acclaimed = yes + } + } + scope:knight = { + accolade_major_glory_gain_with_checks_effect = yes + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = gregarious + add = 25 + } + } + } + + option = { #Give minor title + trigger = { + OR = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = bodyguard_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = champion_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = akolouthos_court_position + } + } + } + # employ them as champion or bodyguard + name = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = akolouthos_court_position + } + } + text = court.5060.d.akolouthos + } + name = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = champion_court_position + } + } + text = court.5060.d.champion + } + name = { + trigger = { + NOT = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = bodyguard_court_position + } + } + } + text = court.5060.d.bodyguard + } + + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = akolouthos_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:knight + POSITION = akolouthos + } + } + else_if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = champion_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:knight + POSITION = champion + } + } + else_if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = bodyguard_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:knight + POSITION = bodyguard + } + } + scope:knight = { + accolade_minor_glory_gain_with_checks_effect = yes + } + stress_impact = { + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + add = 50 + } + } + } + + option = { #Pat on the shoulder - opt out + name = court.5060.a + scope:knight = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + ai_chance = { + base = 50 + modifier = { + has_trait = arrogant + add = 25 + } + modifier = { + has_trait = vengeful + add = 25 + } + modifier = { + has_trait = greedy + add = 25 + } + } + } + after = { + scope:knight = { + clear_court_event_participation = yes + } + } +} + +#Maintenance event for the impressive knight variables - variables decrease over time or is removed +court.5061 = { + hidden = yes + + trigger = { + exists = var:number_of_impressive_knight_things + } + + immediate = { + if = { + limit = { + liege = { + has_variable_list = impressive_knights + any_in_list = { + variable = impressive_knights + this = root + } + } + } + change_variable = { + name = number_of_impressive_knight_things + subtract = 1 + } + if = { + limit = { + var:number_of_impressive_knight_things = 0 + } + remove_variable = number_of_impressive_knight_things + liege = { + remove_list_variable = { + name = impressive_knights + target = root + } + } + } + else = { + trigger_event = { + id = court.5061 + years = 4 + } + } + } + else = { + remove_variable = number_of_impressive_knight_things + } + } +} + +##################################### +# Dedicated Tutor # +# by Linnéa Thimrén # +##################################### + +#Court tutor asks for more funds +court.5070 = { + type = court_event + title = court.5070.t + desc = court.5070.desc + theme = court + + court_scene = { + button_position_character = scope:court_tutor + roles = { + scope:court_tutor = { + group = event_group + animation = admiration + } + } + } + + trigger = { + NOT = { has_character_flag = had_event_court_5070 } + age >= 10 + short_term_gold > medium_gold_value + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_available_ai = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5070 + years = 15 + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { + is_available_ai = yes + } + save_scope_as = court_tutor + court_event_character_flag_effect = yes + } + } + + option = { #Pay to improve the education of all your wards + name = court.5070.b + custom_tooltip = court.5070.b.tt + every_courtier = { + limit = { + is_adult = no + any_relation = { + type = guardian + this = root + } + } + hidden_effect = { + education_point_acquisition_additional_points_effect = { LEVEL = mid } + } + } + + remove_short_term_gold = medium_gold_value + scope:court_tutor = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + ai_chance = { + base = 50 + } + } + + option = { #nah + name = court.5070.a + scope:court_tutor = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -10 + } + } + ai_chance = { + base = 10 + modifier = { + gold < medium_gold_value + add = 200 + } + modifier = { + has_trait = greedy + add = 30 + } + } + } + + after = { + scope:court_tutor = { + clear_court_event_participation = yes + } + clear_court_event_participation = yes + } +} + +##################################### +# Gift From Neigh-bor # +# by Linnéa Thimrén # +##################################### + +# You receive a gift of two palfreys +scripted_trigger court_5075_neighbor_trigger = { + NOR = { + has_relation_potential_rival = root + has_relation_rival = root + is_at_war_with = root + is_available_ai_adult = yes + } + OR = { + # They are friendly towards you + has_relation_potential_friend = root + has_relation_friend = root + is_close_or_extended_family_of = root + # They have reason to fear you + root = { + has_dread_level_towards = { + target = prev + level = 1 + } + } + root = { + has_dread_level_towards = { + target = prev + level = 2 + } + } + current_military_strength < root.current_strength_ninety_percent_value + # They feel indebted + has_opinion_modifier = { + modifier = gift_opinion + target = root + } + root = { + has_hook = prev + } + } +} + +court.5075 = { + type = court_event + title = court.5075.t + desc = { + desc = court.5075.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:master_of_the_horse + } + desc = court.5075.desc_horse_master + } + desc = court.5075.desc + } + desc = court.5075.desc_ending + } + theme = court + override_background = { + reference = courtyard + } + + court_scene = { + button_position_character = scope:master_of_the_horse + roles = { + scope:neighbor = { + group = event_group + animation = admiration + } + scope:master_of_the_horse = { + group = event_group + animation = happiness + } + } + } + + trigger = { + NOT = { has_character_flag = had_event_court_5075 } + age >= 14 + OR = { + AND = { + top_liege = this + any_neighboring_top_liege_realm_owner = { + court_5075_neighbor_trigger = yes + has_court_event_flag = no + } + } + AND = { + top_liege != this + any_neighboring_realm_same_rank_owner = { + court_5075_neighbor_trigger = yes + has_court_event_flag = no + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { #More likely to trigger if you have a Master of the Horse + add = 0.5 + employs_court_position = master_of_horse_court_position + any_court_position_holder = { + type = master_of_horse_court_position + is_available_ai = yes + has_court_event_flag = no + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5075 + years = 10 + } + if = { + limit = { + top_liege = this + } + random_neighboring_top_liege_realm_owner = { + limit = { + court_5075_neighbor_trigger = yes + } + save_scope_as = neighbor + court_event_character_flag_effect = yes + } + } + else = { + random_neighboring_realm_same_rank_owner = { + limit = { + court_5075_neighbor_trigger = yes + } + save_scope_as = neighbor + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = master_of_horse_court_position + any_court_position_holder = { + type = master_of_horse_court_position + is_available_ai = yes + } + } + random_court_position_holder = { + type = master_of_horse_court_position + limit = { + is_available_ai = yes + } + save_scope_as = master_of_the_horse + court_event_character_flag_effect = yes + } + } + + random_dummy_gender_effect = yes #for horse gender + } + + option = { # give them to the court + name = court.5075.a + change_current_court_grandeur = medium_court_grandeur_gain + if = { + limit = { + government_allows = administrative + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + scope:neighbor = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + brave = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Warhorse + name = court.5075.c + trigger = { + NOT = { + any_owned_story = { type = story_cycle_martial_lifestyle_warhorse } + } + } + add_prestige = medium_prestige_gain + duel = { + skill = prowess + value = average_skill_rating + 15 = { # You tame the horse + desc = court.5075.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = court.5075.c.success + left_icon = root + start_warhorse_story_cycle_effect = yes + } + #To assign the correct gender to the horse + random_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + if = { + limit = { scope:dummy_gender = { is_female = yes } } + assign_horse_gender_effect = { GENDER = female } + } + else = { + assign_horse_gender_effect = { GENDER = male } + } + } + } + 6 = { # The horse kicks your ass + desc = court.5075.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = court.5075.c.failure + left_icon = root + increase_wounds_effect = { + REASON = horse_riding_accident + } + } + } + } + scope:neighbor = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + stress_impact = { + craven = major_stress_impact_gain + paranoid = medium_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 200 + } + } + + option = { # Opt out - Sell them + name = court.5075.b + add_gold = medium_gold_value + scope:neighbor = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + } + stress_impact = { + greedy = medium_stress_impact_loss + } + ai_chance = { + base = 75 + } + } + + after = { + scope:neighbor = { + clear_court_event_participation = yes + } + scope:master_of_the_horse ?= { + clear_court_event_participation = yes + } + } +} + +################################################## +# Claudia + +################################################## +# 6000 - 6009 Secret History +# 6010 - 6019 Prophet in the Halls +# 6020 - 6029 Possession at Court +# 6030 - 6039 The Ballad of the Garlic King +# 6040 - 6049 Scrounger Life +# 6050 - 6059 Saucy Readings +# 6060 - 6069 The Joys of Wine +# 6070 - 6079 The Value of Letters +# 6080 The Munificence of X +# 6090 The Art of Rhetoric +################################################## + +######################### +# Secret History # +# by Claudia Baldassi # +# 6000-6003 # +######################### + +scripted_trigger court_6000_has_valid_secret_trigger = { + NOT = { is_known_by = root } + OR = { + secret_type = secret_lover + secret_type = secret_deviant + secret_type = secret_murder + } +} + +# A book detailing the nefarious deeds of your predecessor and their court is being circulated at your court. # + +court.6000 = { + type = court_event + title = court.6000.t + desc = { + desc = court.6000.desc_opening + first_valid = { + triggered_desc = { + trigger = { + scope:courtier = { + is_close_or_extended_family_of = root + } + } + desc = court.6000.desc_family + } + desc = court.6000.desc_liege + } + desc = court.6000.desc_ending + } + theme = court + + court_scene = { + button_position_character = scope:courtier + roles = { + scope:courtier = { + group = event_group + animation = shame + } + root = { + group = event_group + animation = shock + } + } + } + + trigger = { + has_court_event_flag = no + primary_title.tier >= tier_duchy + exists = primary_title.previous_holder + primary_title.previous_holder = { + is_alive = no + dynasty = root.dynasty + prestige_level >= 3 + highest_held_title_tier >= tier_duchy + } + age >= 14 + any_courtier = { + count >= 2 + age >= 14 + has_court_event_flag = no + } + any_courtier = { + learning >= 12 + intrigue >= 7 + is_adult = yes + } + NOR = { + has_trait = blind + has_character_flag = court_6000_cooldown + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + court_event_character_flag_effect = yes + add_character_flag = { + flag = court_6000_cooldown + years = 20 + } + random_courtier = { + limit = { + learning >= 12 + intrigue >= 7 + is_adult = yes + } + save_scope_as = author + } + random_courtier_or_guest = { + limit = { + age >= 14 + this != scope:author + } + save_scope_as = courtier + court_event_character_flag_effect = yes + } + if = { + limit = { + primary_title.previous_holder = { + this != root + } + } + primary_title.previous_holder = { + save_scope_as = predecessor + } + } + if = { + limit = { + exists = cp:councillor_spymaster + } + cp:councillor_spymaster = { + save_scope_as = spymaster + } + } + } + + # Option A: Outrageous! Investigate who wrote it (has spymaster) + option = { + trigger = { + exists = scope:spymaster + } + name = court.6000.a + custom_tooltip = court.6000.a.tt + add_stress = minor_stress_gain + scope:spymaster = { + set_council_task = { + task_type = task_find_secrets + target = root + } + } + trigger_event = { + id = court.6001 + days = { 96 196 } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = 0.5 + ai_vengefulness = 1 + } + } + } + + # Option E: Outrageous, but without a sypmaster + option = { + name = court.6000.a + trigger = { + NOT = { + exists = cp:councillor_spymaster + } + } + add_stress = minor_stress_gain + custom_tooltip = court.6000.e.tt + trigger_event = { + id = court.6004 + days = { 96 196 } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = 0.5 + ai_vengefulness = 1 + } + } + } + + # Option D: Opt out - You really don't care + option = { + name = court.6000.d + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_loss } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } + + after = { + scope:courtier = { + clear_court_event_participation = yes + } + clear_court_event_participation = yes + } +} + +court.6001 = { + type = character_event + hidden = yes + + immediate = { + scope:spymaster = { + duel = { + skill = intrigue + target = scope:author + 50 = { #success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + trigger_event = court.6002 + } + 50 = { #failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + trigger_event = court.6003 + } + } + } + } +} + +court.6002 = { + title = court.6000.t + type = character_event + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:spymaster + } + desc = court.6002.desc + } + desc = court.6002.b.desc_opening + } + desc = court.6002.b.desc_ending + } + theme = court + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:author + animation = shame + } + + # Option A: Force to recant + option = { + name = court.6002.a + flavor = court.6002.a.tt + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + add_dread = medium_dread_gain + custom_tooltip = court.6002.a.tt2 + add_character_flag = { + flag = court_of_no_secrets + years = 15 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + #Option D: forgive the author + option = { + name = court.6002.d + change_current_court_grandeur = minor_court_grandeur_gain + scope:author = { + create_inspiration = book_inspiration + add_opinion = { + target = root + modifier = forgiven_opinion + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + } + } + } +} + +court.6003 = { + title = court.6000.t + type = character_event + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:spymaster + } + desc = court.6003.desc + } + desc = court.6002.b.desc_opening + } + desc = court.6003.b.desc_ending + } + theme = court + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + trigger = { + exists = scope:spymaster + } + character = scope:spymaster + animation = shame + } + + #Option B: disappointed + option = { + name = court.6003.b + add_intrigue_lifestyle_xp = medium_lifestyle_xp + add_stress = medium_stress_gain + } +} + +court.6004 = { + type = character_event + hidden = yes + + immediate = { + duel = { + skill = intrigue + target = scope:author + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + trigger_event = court.6002 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + trigger_event = court.6003 + } + } + } +} + +############################# +# Prophet in the Halls # +# by Claudia Baldassi # +# 6010-6011 # +############################# + +scripted_trigger court_6010_valid_preacher_trigger = { + is_available_ai_adult = yes + has_trait = zealous + faith = scope:target_county.faith +} + +# A guest of a different faith has been preaching their beliefs at court a bit too enthusiastically. # + +court.6010 = { + type = court_event + title = court.6010.t + desc = court.6010.desc + theme = court + + court_scene = { + button_position_character = scope:preacher + roles = { + scope:preacher = { + group = event_group + animation = personality_zealous + } + root = { + group = event_group + animation = disapproval + } + } + } + + cooldown = { years = 20 } + + trigger = { + has_court_event_flag = no + cp:councillor_court_chaplain ?= { + is_performing_council_task = task_conversion + councillor_task_target = { + NOR = { + faith = root.faith + faith = root.capital_county.faith + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_court_chaplain = { save_scope_as = chaplain } + scope:chaplain.councillor_task_target.county = { save_scope_as = target_county } + + random_courtier_or_guest = { + limit = { + court_6010_valid_preacher_trigger = yes + } + save_scope_as = preacher + } + if = { + limit = { + NOT = { exists = scope:preacher } + } + create_character = { + location = root.location + template = preacher_template + faith = scope:target_county.faith + culture = scope:target_county.culture + save_scope_as = preacher + } + } + scope:preacher = { court_event_character_flag_effect = yes } + # Save the preacher's "liege" + scope:target_county.holder ?= { + save_scope_as = preacher_liege + } + every_realm_county = { + limit = { + faith = scope:preacher.faith + } + add_to_list = preacher_faith_counties + } + save_scope_value_as = { + name = preacher_faith_counties_size + value = list_size:preacher_faith_counties + } + } + + #OPTION C: Imprison them + option = { + name = court.6010.c + rightfully_imprison_character_effect = { + TARGET = scope:preacher + IMPRISONER = root + } + if = { + limit = { + exists = scope:preacher_liege + scope:preacher_liege = { + this != root + faith = scope:preacher.faith + is_ai = yes + } + } + custom_tooltip = court.6010.c.tt + trigger_event = { + id = court.6011 + days = 5 + } + } + custom_tooltip = court.6010.c.tt2 + set_variable = { + name = 6010_harsh_conversion + value = scope:preacher.faith + years = 20 + } + every_in_list = { + list = preacher_faith_counties + custom = court.6010.a_every_county + change_county_control = -15 + } + every_courtier_or_guest = { + limit = { + faith = scope:preacher.faith + } + custom = court_6010_all_courtiers_and_guests_faith + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #OPTION A: Let them be + option = { + name = court.6010.a + #you are tolerant and open-minded + change_current_court_grandeur = medium_court_grandeur_gain + custom_tooltip = court.6010.c.tt3 + set_variable = { + name = 6010_tolerant_conversion + value = scope:preacher.faith + years = 20 + } + every_in_list = { + list = preacher_faith_counties + custom = court.6010.a_every_county + change_county_control = 15 + } + every_courtier_or_guest = { + limit = { + faith = scope:preacher.faith + } + custom = court_6010_all_courtiers_and_guests_faith + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + stress_impact = { + zealous = major_stress_impact_gain + patient = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + } + } + } + + after = { + clear_court_event_participation = yes + scope:preacher = { + clear_court_event_participation = yes + } + } +} + +court.6011 = { + type = letter_event + opening = { + desc = court.6011.desc_opening + } + desc = court.6011.desc_prisoner + sender = scope:preacher_liege + + #Option A: sorry for the diplomatic blunder - offer repayment + option = { + name = court.6011.a + trigger = { + can_make_expensive_purchase_trigger = { + PRICE = root.minor_gold_value + } + } + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + pay_short_term_gold = { + target = scope:preacher_liege + gold = minor_gold_value + } + scope:preacher_liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = -25 + } + modifier = { + has_trait = arrogant + add = -25 + } + modifier = { + has_trait = zealous + add = -25 + } + modifier = { + has_trait = humble + add = 50 + } + } + } + + #Option B: reiterate that their religion is not welcome at your court + option = { + name = court.6011.b + add_piety = medium_piety_gain + scope:preacher_liege = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + stress_impact = { + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = compassionate + add = -25 + } + modifier = { + has_trait = zealous + add = 25 + } + modifier = { + has_trait = arrogant + add = 25 + } + } + } +} + +############################# +# Possession at Court # +# by Claudia Baldassi # +# 6020 # +############################# + +# A possessed courtier is scaring your more religion-oriented courtiers. # + +court.6020 = { + type = court_event + title = court.6020.t + desc = { + desc = court.6020.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:court_chaplain + } + desc = court.6020.desc_chaplain + } + desc = court.6020.desc_no_chaplain + } + desc = court.6020.desc_middle + first_valid = { + triggered_desc = { + trigger = { + exists = scope:court_physician + } + desc = court.6020.desc_physician + } + desc = court.6020.desc_no_physician + } + desc = court.6020.desc_ending + } + theme = court + + court_scene = { + button_position_character = scope:possessed_char + roles = { + scope:possessed_char = { + group = event_group + animation = worry + } + scope:court_chaplain = { + group = event_group + animation = disgust + } + scope:court_physician = { + group = event_group + animation = disbelief + } + } + } + + trigger = { + any_courtier_or_guest = { + OR = { + has_trait = possessed_1 + has_trait = possessed_genetic + } + has_court_event_flag = no + } + NOT = { + has_character_flag = court_6020_cooldown + } + # Chaplain & physician don't both have to exist, but can't be the same thing. + cp:councillor_court_chaplain ?= { + NOT = { has_court_position = court_physician_court_position } + } + has_court_type = court_scholarly + } + + weight_multiplier = { + base = 0.5 + modifier = { + exists = cp:councillor_court_chaplain + add = 0.5 + } + modifier = { + employs_court_position = court_physician_court_position + add = 0.5 + } + modifier = { + has_trait = lifestyle_physician + add = 0.5 + } + modifier = { + has_trait = theologian + add = 0.5 + } + modifier = { + has_trait = whole_of_body + add = 0.5 + } + } + + immediate = { + add_character_flag = { + flag = court_6020_cooldown + years = 20 + } + random_courtier_or_guest = { + limit = { + has_trait = possessed + } + save_scope_as = possessed_char + court_event_character_flag_effect = yes + } + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + court_event_character_flag_effect = yes + } + } + if = { + limit = { + court_physician_available_trigger = yes + } + save_court_physician_as_effect = { SCOPE_NAME = court_physician } + scope:court_physician = { + court_event_character_flag_effect = yes + } + } + } + + # Option A: Court chaplain exorcizes them - limited to christians + option = { + name = court.6020.a + trigger = { + exists = scope:court_chaplain + OR = { scope:court_chaplain.religion = religion:eastern_orthodox_religion scope:court_chaplain.religion = religion:catholic_religion scope:court_chaplain.religion = religion:protestant_religion } + OR = { root.religion = religion:eastern_orthodox_religion root.religion = religion:catholic_religion root.religion = religion:protestant_religion } + } + add_piety = minor_piety_gain + scope:court_chaplain = { + duel = { + skill = learning + target = scope:possessed_char + 10 = { + desc = court.6020.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + send_interface_toast = { + title = court.6020.a.success + custom_tooltip = court.6020.a.success.tt + change_current_court_grandeur = major_court_grandeur_gain + } + } + 15 = { + desc = court.6020.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = court.6020.a.failure + custom_tooltip = court.6020.a.failure.tt + change_current_court_grandeur = medium_court_grandeur_loss + } + } + } + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = -1 + } + } + } + + # Option B: it is a sign of the favor of the gods - limited to non-monotheistic + option = { + name = court.6020.b + trigger = { + NOR = { + root.religion = { is_in_family = rf_abrahamic } + scope:court_chaplain ?= { + religion = { + is_in_family = rf_abrahamic + } + } + has_trait = cynical + faith = { + OR = { + trait_is_sin = possessed_1 + trait_is_sin = possessed_genetic + } + } + } + } + add_piety = medium_piety_gain + scope:possessed_char = { + add_character_modifier = possessed_prophetic_visions + } + custom_tooltip = court.6020.b.tt + change_current_court_grandeur = medium_court_grandeur_gain + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = -1 + } + } + } + + # Option E: it's just a disease - court physician + option = { + name = court.6020.e + trigger = { + exists = scope:court_physician + } + if = { + limit = { + OR = { + root.religion = religion:islam_religion + root.religion = { is_in_family = rf_eastern } + } + } + add_learning_lifestyle_xp = major_lifestyle_xp + } + change_current_court_grandeur = major_court_grandeur_gain + scope:possessed_char = { + add_character_modifier = court_possessed_improved_condition_modifier + } + scope:possessed_char = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 60 + } + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = 1 + } + } + } + + # Option F: opt out - don't bother me + option = { + name = court.6020.f + add_prestige = minor_prestige_loss + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 75 + modifier = { + has_trait = lazy + add = 50 + } + } + } + + after = { + scope:possessed_char = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:court_chaplain } + scope:court_chaplain = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:court_physician } + scope:court_physician = { + clear_court_event_participation = yes + } + } + } +} + +######################### +# Saucy Readings # +# by Claudia Baldassi # +# 6050 # +######################### + +scripted_trigger court_6050_valid_courtier_trigger = { + is_available_ai_adult = yes + has_court_event_flag = no + NOR = { + has_trait = chaste + is_councillor_of = root + } + NOT = { + faith = { trait_is_virtue = lustful } + } + might_cheat_on_every_partner_trigger = yes +} + +# Some "compromising" literature is circulating at court # + +court.6050 = { + type = court_event + title = court.6050.t + desc = { + desc = court.6050.desc_opening + first_valid = { + triggered_desc = { + trigger = { + OR = { + root.culture = { has_cultural_pillar = language_greek } + root.culture = { has_cultural_pillar = heritage_byzantine } + } + } + desc = court.6050.desc_byz + } + triggered_desc = { + trigger = { + OR = { + root.culture = { has_cultural_pillar = language_arabic } + root.culture = { has_cultural_pillar = language_iranian } + root.culture = { has_cultural_pillar = heritage_iranian } + root.culture = { has_cultural_pillar = heritage_arabic } + } + } + desc = court.6050.desc_islam + } + triggered_desc = { + trigger = { + OR = { + root.culture = { has_cultural_pillar = language_french } + root.culture = { has_cultural_pillar = language_occitano_romance } + root.culture = { has_cultural_pillar = heritage_latin } + } + + } + desc = court.6050.desc_sonetti + } + triggered_desc = { + trigger = { + OR = { + root.culture = { has_cultural_pillar = language_anglic } + root.culture = { has_cultural_pillar = language_saxon } + } + } + desc = court.6050.desc_chaucer + } + triggered_desc = { + trigger = { always = yes } + desc = court.6050.desc_generic #fallback option (mostly for other christians) + } + } + desc = court.6050.desc_ending + } + theme = court + + court_scene = { + button_position_character = scope:courtier + roles = { + scope:courtier = { + group = event_group + animation = throne_room_writer + } + root = { + group = event_group + animation = shock + } + scope:court_chaplain = { + group = event_group + animation = disapproval + } + } + } + + trigger = { + has_court_event_flag = no + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + has_court_event_flag = no + } + is_adult = yes + NOT = { + faith = { trait_is_virtue = lustful } + } + any_courtier = { court_6050_valid_courtier_trigger = yes } + } + + weight_multiplier = { + base = 1 + modifier = { + has_lifestyle = intrigue_lifestyle + add = 0.5 + } + modifier = { + has_lifestyle = learning_lifestyle + add = 0.5 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + court_event_character_flag_effect = yes + } + random_courtier = { + limit = { + has_trait = lustful + court_6050_valid_courtier_trigger = yes + } + alternative_limit = { court_6050_valid_courtier_trigger = yes } + save_scope_as = courtier + court_event_character_flag_effect = yes + } + } + + # Option B: purify them all with fire! + option = { + name = court.6050.b + flavor = court.6050.b.tt + add_dread = major_dread_gain + add_piety = major_piety_gain + custom_tooltip = court.6050.b.tt.2 + add_character_flag = { + flag = burned_indecent_books + years = 20 + } + scope:court_chaplain = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + patient = medium_stress_impact_gain + scholar = major_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + has_trait = compassionate + add = -25 + } + modifier = { + has_trait = patient + add = -25 + } + modifier = { + has_trait = scholar + add = -50 + } + modifier = { + has_trait = cynical + add = -50 + } + } + } + + # Option C: culture is culture - let them read + option = { + name = court.6050.c + add_learning_lifestyle_xp = major_lifestyle_xp + if = { + limit = { + has_court_type = court_scholarly + } + change_current_court_grandeur = major_court_grandeur_gain + } + else = { + change_current_court_grandeur = minor_court_grandeur_gain + } + custom_tooltip = court.6050.c.tt + add_character_flag = { + flag = supported_indecent_books + years = 20 + } + + stress_impact = { + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + } + } + } + + # Option D: you really get into it + option = { + name = court.6050.d + add_intrigue_lifestyle_xp = major_lifestyle_xp + add_character_modifier = { + modifier = confident_lover + years = 15 + } + scope:court_chaplain = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + stress_impact = { + chaste = major_stress_impact_gain + zealous = major_stress_impact_gain + celibate = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + } + modifier = { + has_trait = chaste + add = -100 + } + modifier = { + has_trait = celibate + add = -200 + } + } + } + + #Option F: opt out - move on + option = { + name = court.6050.f + add_piety = minor_piety_gain + stress_impact = { + zealous = medium_stress_impact_gain + chaste = medium_stress_impact_gain + fickle = medium_stress_impact_loss + lazy = medium_stress_impact_loss + } + ai_chance = { + base = 75 + modifier = { + has_trait = zealous + add = -25 + } + modifier = { + has_trait = chaste + add = -25 + } + modifier = { + has_trait = lazy + add = 25 + } + } + } + after = { + clear_court_event_participation = yes + scope:courtier = { + clear_court_event_participation = yes + } + scope:court_chaplain = { + clear_court_event_participation = yes + } + } +} + +######################### +# The Joys of Wine # +# by Claudia Baldassi # +# 6060 # +######################### + +# Your chaplain preaches against wine; your physician (and the court drunkard!) disagrees # + +court.6060 = { + type = court_event + title = court.6060.t + desc = { + desc = court.6060.desc_opening + triggered_desc = { + trigger = { + exists = scope:courtier_drunkard + } + desc = court.6060.desc_drunkard_courtier + } + desc = court.6060.desc_ending + } + theme = court + + court_scene = { + button_position_character = scope:court_chaplain + roles = { + scope:court_chaplain = { + group = event_group + animation = disapproval + } + scope:courtier_drunkard = { + group = event_group + animation = rage + } + scope:court_physician = { + group = event_group + animation = anger + } + } + } + + trigger = { + is_adult = yes + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + AND = { + religion = religion:islam_religion + culture = { has_cultural_pillar = heritage_iranian } + } + } + employs_court_position = court_physician_court_position + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + NOT = { has_court_position = court_physician_court_position } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + } + save_court_physician_as_effect = { SCOPE_NAME = court_physician } + scope:court_physician = { + court_event_character_flag_effect = yes + } + if = { + limit = { + any_courtier_or_guest = { + has_trait = drunkard + NOR = { + this = scope:court_physician + this = scope:court_chaplain + } + } + } + random_courtier_or_guest = { + limit = { + has_trait = drunkard + NOR = { + this = scope:court_physician + this = scope:court_chaplain + } + } + save_scope_as = courtier_drunkard + court_event_character_flag_effect = yes + } + } + } + + #Option A: side with the chaplain + option = { + name = court.6060.a + add_character_modifier = { + modifier = court_no_wine_modifier + days = 3650 + } + add_piety = medium_piety_gain + scope:court_chaplain = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + scope:court_physician = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + if = { + limit = { + exists = scope:courtier_drunkard + } + scope:courtier_drunkard = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + gluttonous = major_stress_impact_gain + lifestyle_reveler = major_stress_impact_gain + drunkard = massive_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + add = -25 + } + modifier = { + has_trait = gluttonous + add = -50 + } + modifier = { + has_trait = lifestyle_reveler + add = -75 + } + modifier = { + has_trait = drunkard + add = -100 + } + } + } + + #Option B: side with the physician + option = { + name = court.6060.b + add_character_modifier = { + modifier = court_moderate_drinking_modifier + days = 3650 + } + add_prestige = medium_prestige_gain + scope:court_physician = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + scope:court_chaplain = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + if = { + limit = { + exists = scope:courtier_drunkard + } + scope:courtier_drunkard = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + gluttonous = medium_stress_impact_gain + lifestyle_reveler = medium_stress_impact_gain + drunkard = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + add = -25 + } + modifier = { + has_trait = gluttonous + add = -25 + } + modifier = { + has_trait = lifestyle_reveler + add = -25 + } + modifier = { + has_trait = drunkard + add = -75 + } + modifier = { + has_trait = lifestyle_physician + add = 75 + } + modifier = { + has_trait = temperate + add = 75 + } + } + } + + #Option C: side with the drunkard + option = { + name = court.6060.c + flavor = court.6060.c.tt + trigger = { + exists = scope:courtier_drunkard + } + add_character_modifier = { + modifier = rivers_of_wine_modifier + years = 10 + } + custom_tooltip = court.6060.c.tt.2 + if = { + limit = { + can_be_drunkard = yes + } + random = { + chance = 25 + add_trait = drunkard + } + } + scope:courtier_drunkard = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + if = { + limit = { + NOT = { has_relation_friend = scope:courtier_drunkard } + } + progress_towards_friend_effect = { + REASON = friend_took_side_in_dispute + CHARACTER = scope:courtier_drunkard + OPINION = 0 + } + } + scope:court_chaplain = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + scope:court_physician = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + stress_impact = { + base = medium_stress_impact_loss + zealous = medium_stress_impact_gain + temperate = major_stress_impact_gain + lifestyle_physician = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = drunkard + add = 100 + } + modifier = { + has_trait = zealous + add = -25 + } + modifier = { + has_trait = temperate + add = -50 + } + modifier = { + has_trait = lifestyle_physician + add = -50 + } + } + } + + after = { + if = { + limit = { + exists = scope:courtier_drunkard + } + scope:courtier_drunkard = { + clear_court_event_participation = yes + } + } + scope:court_chaplain = { + clear_court_event_participation = yes + } + scope:court_physician = { + clear_court_event_participation = yes + } + } +} + +############################# +# The Value of Letters # +# by Claudia Baldassi # +# 6070-6072 # +############################# + +# Your courtiers are dissatisfied with you being completely illiterate. How do you react? # + +court.6070 = { + type = court_event + title = court.6070.t + desc = court.6070.desc + theme = court + + court_scene = { + button_position_character = scope:tutor_6070 + roles = { + scope:tutor_6070 = { + group = event_group + animation = personality_rational + } + root = { + group = event_group + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = stubborn + } + } + animation = personality_bold + } + triggered_animation = { + trigger = { + NOR = { + has_trait = arrogant + has_trait = stubborn + } + } + animation = shame + } + animation = shame + } + } + } + + trigger = { + has_court_event_flag = no + OR = { + learning < low_skill_rating + has_trait = intellect_bad + has_trait = dull + } + NOT = { + has_trait = blind + } + is_adult = yes + OR = { + exists = cp:councillor_court_chaplain + AND = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + court_event_character_flag_effect = yes + if = { + limit = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = tutor_6070 + court_event_character_flag_effect = yes + } + } + else = { + cp:councillor_court_chaplain = { + save_scope_as = tutor_6070 + court_event_character_flag_effect = yes + } + } + } + + #Option A: Get your court chaplain/court tutor to teach you (or try to...) + option = { + name = court.6070.a + random_list = { + 1 = { + desc = court.6070.a.success + modifier = { + factor = 2 + scope:tutor_6070.learning > root.learning + } + modifier = { + factor = 3 + has_trait = diligent + } + modifier = { + factor = 3 + scope:tutor_6070 = { has_trait = scholar } + } + modifier = { + factor = 2 + scope:tutor_6070 = { + has_education_learning_trigger = yes + } + } + modifier = { + factor = 1.5 + has_trait = patient + } + modifier = { + factor = 2 + has_trait = ambitious + } + modifier = { + factor = 1.5 + has_trait = intellect_good_1 + } + modifier = { + factor = 2 + has_trait = intellect_good_2 + } + modifier = { + factor = 3 + has_trait = intellect_good_3 + } + trigger_event = { + id = court.6071 + days = 100 + } + custom_tooltip = court.6070.a.tt.1 + show_as_tooltip = { + add_stress = minor_stress_loss + add_prestige = medium_prestige_gain + add_learning_skill = 1 + } + } + 1 = { + desc = court.6070.a.failure + modifier = { + factor = 2 + scope:tutor_6070.learning <= root.learning + } + modifier = { + factor = 4 + has_trait = lazy + } + modifier = { + factor = 2 + has_trait = fickle + } + modifier = { + factor = 2 + has_trait = impatient + } + modifier = { + factor = 2 + has_trait = content + } + modifier = { + factor = 4 + has_trait = irritable + } + modifier = { + factor = 1.5 + has_trait = intellect_bad_1 + } + modifier = { + factor = 2 + has_trait = intellect_bad_2 + } + modifier = { + factor = 3 + has_trait = intellect_bad_3 + } + modifier = { + factor = 2 + has_trait = dull + } + trigger_event = { + id = court.6072 + days = 100 + } + custom_tooltip = court.6070.a.tt.2 + show_as_tooltip = { + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + } + } + } + ai_chance = { + base = 150 + modifier = { + has_trait = diligent + add = 25 + } + modifier = { + has_trait = lazy + add = -50 + } + modifier = { + has_trait = content + add = -25 + } + modifier = { + has_trait = ambitious + add = 50 + } + } + } + + #Option B: Yes, and you are proud of it! + option = { + name = court.6070.b + trigger = { + OR = { + has_trait = arrogant + has_trait = stubborn + } + } + every_courtier_or_guest = { + limit = { + learning >= low_skill_rating + } + custom = every_courtier_or_guest_6070_learning + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + change_current_court_grandeur = medium_court_grandeur_loss + stress_impact = { + base = medium_stress_impact_loss + diligent = medium_stress_impact_gain + ambitious = major_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + has_trait = ambitious + add = -75 + } + modifier = { + has_trait = diligent + add = -25 + } + } + } + + after = { + clear_court_event_participation = yes + scope:tutor_6070 = { + clear_court_event_participation = yes + } + } +} + +court.6071 = { + type = character_event + title = court.6070.t + desc = court.6071.desc + theme = court + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:tutor_6070 + animation = happiness + } + + immediate = { + if = { + limit = { + scope:tutor_6070 = { + OR = { + is_alive = no + NOT = { + is_courtier_of = root + } + } + } + } + if = { + limit = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = tutor_6070 + } + } + else_if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = tutor_6070 + } + } + else_if = { + limit = { + any_courtier_or_guest = { + is_available_ai_adult = yes + learning > low_skill_rating + } + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + learning > low_skill_rating + } + save_scope_as = tutor_6070 + } + } + else = { + create_character = { + location = root.location + template = scholar_character + save_scope_as = tutor_6070 + } + } + } + } + + #Option B: my tutor deserves compensation + option = { + name = court.6071.b + add_prestige = medium_prestige_gain + add_learning_skill = 2 + pay_short_term_gold = { + gold = minor_gold_value + target = scope:tutor_6070 + } + scope:tutor_6070 = { + add_character_flag = court_language_teacher + } + custom_tooltip = court.6071.b.tt + reverse_add_opinion = { + target = scope:tutor_6070 + modifier = grateful_opinion + opinion = 20 + } + stress_impact = { + base = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + } +} + +court.6072 = { + type = character_event + title = court.6070.t + desc = court.6072.desc + theme = court + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:tutor_6070 + animation = disapproval + } + + artifact = { + position = lower_left_portrait + target = scope:newly_created_artifact + trigger = { exists = scope:newly_created_artifact } + } + + immediate = { + hidden_effect = { + scope:tutor_6070 = { + create_artifact = { + name = court_fancy_seal_modifier + description = court_fancy_seal_modifier_desc + type = miscellaneous + visuals = small_box + modifier = artifact_diplomacy_1_modifier + save_scope_as = newly_created_artifact + } + } + } + } + + #Option B: you use a seal instead of signing + option = { + name = court.6072.b + flavor = court.6072.b.tt + scope:newly_created_artifact = { + set_owner = { + target = root + history = { + type = given + actor = scope:tutor_6070 + recipient = root + } + } + } + } +} + +######################### +# The Munificence of X # +# 6080 # +# Claudia Baldassi # +######################### + +# A traveling ruler is spending a lot of money in your court and is making you look bad (Mansa Musa's pilgrimage) - do you attempt to match the visitor's generosity or profit from it? # + +scripted_trigger court_6080_valid_visitor_trigger = { + is_available_healthy_ai_adult = yes + is_travelling = yes + top_liege = this + OR = { + has_trait = generous + has_trait = improvident + has_trait = profligate + } + NOR = { + has_trait = greedy + this = root + } + gold >= 100 +} + +court.6080 = { + type = court_event + title = court.6080.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + # The visiting ruler is your liege on a Tour + is_vassal_of = scope:6080_visitor + scope:6080_visitor = { involved_activity ?= { has_activity_type = activity_tour } } + } + desc = court.6080.desc_liege + } + desc = court.6080.desc + } + desc = court.6080.desc_middle + triggered_desc = { + trigger = { + exists = scope:beneficiary_2 + } + desc = court.6080.desc_2 + } + triggered_desc = { + trigger = { + exists = scope:beneficiary_child + } + desc = court.6080.desc_3 + } + desc = court.6080.desc_end + } + theme = court + + court_scene = { + button_position_character = scope:6080_visitor + roles = { + scope:6080_visitor = { + group = event_group + animation = personality_compassionate + } + scope:beneficiary_1 = { + group = event_group + animation = admiration + } + scope:beneficiary_2 = { + group = event_group + animation = admiration + } + } + } + + trigger = { + any_sub_realm_county = { + holder = root + any_county_province = { + any_character_in_location = { + court_6080_valid_visitor_trigger = yes + } + } + } + any_courtier_or_guest = { + is_available_ai_adult = yes + has_court_event_flag = no + } + } + + immediate = { + random_sub_realm_county = { + limit = { + holder = root + any_county_province = { + any_character_in_location = { + court_6080_valid_visitor_trigger = yes + } + } + } + random_county_province = { + limit = { + any_character_in_location = { + court_6080_valid_visitor_trigger = yes + } + } + random_character_in_location = { + limit = { + court_6080_valid_visitor_trigger = yes + } + save_scope_as = 6080_visitor + } + } + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = beneficiary_1 + court_event_character_flag_effect = yes + } + if = { + limit = { + any_courtier_or_guest = { + is_available_ai_adult = yes + has_court_event_flag = no + this != scope:beneficiary_1 + } + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + this != scope:beneficiary_1 + } + save_scope_as = beneficiary_2 + court_event_character_flag_effect = yes + } + } + if = { + limit = { + any_courtier_or_guest = { + is_available_ai_child = yes + has_court_event_flag = no + age >= 3 + } + } + random_courtier_or_guest = { + limit = { + is_available_ai_child = yes + has_court_event_flag = no + } + save_scope_as = beneficiary_child + } + } + scope:6080_visitor = { + pay_short_term_gold = { + target = scope:beneficiary_1 + gold = tiny_gold_value + } + } + if = { + limit = { + exists = scope:beneficiary_2 + } + scope:6080_visitor = { + pay_short_term_gold = { + target = scope:beneficiary_2 + gold = tiny_gold_value + } + } + } + } + + #Option A: I can be even more generous! + option = { + name = court.6080.a + pay_short_term_gold = { + target = scope:beneficiary_1 + gold = minor_gold_value + } + reverse_add_opinion = { + target = scope:beneficiary_1 + modifier = grateful_opinion + opinion = 30 + } + if = { + limit = { + exists = scope:beneficiary_2 + } + pay_short_term_gold = { + target = scope:beneficiary_2 + gold = minor_gold_value + } + reverse_add_opinion = { + target = scope:beneficiary_2 + modifier = grateful_opinion + opinion = 30 + } + } + if = { + limit = { + exists = scope:beneficiary_child + } + reverse_add_opinion = { + target = scope:beneficiary_child + modifier = grateful_opinion + opinion = 30 + } + } + change_current_court_grandeur = medium_court_grandeur_gain + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + stress_impact = { + content = medium_stress_impact_gain + humble = major_stress_impact_gain + greedy = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + modifier = { + has_trait = ambitious + add = 25 + } + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = content + add = -25 + } + modifier = { + gold < medium_gold_value + factor = 0 + } + } + } + + #Option B: shamelessly ask for money too + option = { + name = court.6080.b + duel = { + target = scope:6080_visitor + skill = intrigue + 50 = { + desc = court.6080.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = court.6080.b.success.tt + scope:6080_visitor = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + } + } + } + 50 = { + desc = court.6080.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = court.6080.b.failure.tt + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + generous = major_stress_impact_gain + improvident = massive_stress_impact_gain + profligate = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -0.5 + } + } + } + + #Option D: Better him spending than me + option = { + name = court.6080.d + change_current_court_grandeur = miniscule_court_grandeur_gain + stress_impact = { + greedy = minor_stress_impact_loss + generous = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = 10 + } + modifier = { + has_trait = content + add = 25 + } + } + } + after = { + scope:6080_visitor = { + clear_court_event_participation = yes + } + scope:beneficiary_1 = { + clear_court_event_participation = yes + } + if = { + limit = { + exists = scope:beneficiary_2 + } + scope:beneficiary_2 = { + clear_court_event_participation = yes + } + } + } +} + +######################### +# The Art of Rhetoric # +# 6090 # +# Claudia Baldassi # +######################### + +# Your Court Poet is giving a lecture to your children on the finer arts of rhetoric and they aren't having any of it # + +court.6090 = { + type = court_event + title = court.6090.t + desc = { + desc = court.6090.desc + first_valid = { + triggered_desc = { + trigger = { + scope:6090_poet = { + OR = { + has_court_position = court_poet_court_position + has_court_position = court_tutor_court_position + } + } + } + desc = court.6090.desc.cp + } + desc = court.6090.desc.teacher + } + desc = court.6090.desc.middle + triggered_desc = { + trigger = { + exists = scope:6090_child_c + } + desc = court.6090.desc_other + } + desc = court.6090.desc_end + } + theme = court + + court_scene = { + button_position_character = scope:6090_poet + roles = { + scope:6090_poet = { + group = event_group + animation = beg + } + scope:6090_child_a = { + group = event_group + animation = dismissal + } + scope:6090_child_b = { + group = event_group + animation = dismissal + } + } + } + + trigger = { + any_child = { + count >= 2 + is_available_ai_child = yes + has_court_event_flag = no + age >= 8 + location = root.location + } + } + + weight_multiplier = { + base = 1 + modifier = { + employs_court_position = court_poet_court_position + any_court_position_holder = { + type = court_poet_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + add = 1 + } + modifier = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + add = 1 + } + } + + immediate = { + random_court_position_holder = { + type = court_poet_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = 6090_poet + } + if = { + limit = { + NOT = { exists = scope:6090_poet } + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = 6090_poet + } + } + if = { + limit = { + NOT = { exists = scope:6090_poet } + } + random_pool_character = { + province = root.location + limit = { + diplomacy >= 14 + } + save_scope_as = 6090_poet + } + } + if = { + limit = { + NOT = { exists = scope:6090_poet } + } + create_character = { + location = root.location + template = poet_template + save_scope_as = 6090_poet + } + scope:6090_poet = { add_character_flag = created_character } + } + scope:6090_poet = { court_event_character_flag_effect = yes } + every_child = { + limit = { + is_available_ai_child = yes + age >= 8 + location = root.location + } + add_to_list = rhetoric_children + } + ordered_in_list = { + list = rhetoric_children + order_by = age + max = 3 + check_range_bounds = no + if = { + limit = { + NOT = { exists = scope:6090_child_a } + } + save_scope_as = 6090_child_a + court_event_character_flag_effect = yes + } + else_if = { + limit = { + NOT = { exists = scope:6090_child_b } + } + save_scope_as = 6090_child_b + court_event_character_flag_effect = yes + } + else = { + save_scope_as = 6090_child_c + court_event_character_flag_effect = yes + } + } + } + + #Option A: Reprimand them + option = { + name = court.6090.a + scope:6090_poet = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + scope:6090_child_a = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + if = { + limit = { + scope:6090_poet = { + OR = { + has_court_position = court_poet_court_position + has_court_position = court_tutor_court_position + } + } + } + add_diplomacy_skill = 2 + } + else = { + add_diplomacy_skill = 1 + } + } + scope:6090_child_b = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + if = { + limit = { + scope:6090_poet = { + OR = { + has_court_position = court_poet_court_position + has_court_position = court_tutor_court_position + } + } + } + add_diplomacy_skill = 2 + } + else = { + add_diplomacy_skill = 1 + } + } + if = { + limit = { + exists = scope:6090_child_c + } + scope:6090_child_c = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + if = { + limit = { + scope:6090_poet = { + OR = { + has_court_position = court_poet_court_position + has_court_position = court_tutor_court_position + } + } + } + add_diplomacy_skill = 2 + } + else = { + add_diplomacy_skill = 1 + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = diligent + add = 100 + } + modifier = { + has_trait = lazy + add = -50 + } + modifier = { + has_trait = arrogant + add = -50 + } + } + } + + #Option C: Side with them - court poet is booooring + option = { + name = court.6090.c + flavor = court.6090.c.tt + scope:6090_child_a = { + add_prowess_skill = 1 + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + scope:6090_child_b = { + add_prowess_skill = 1 + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + if = { + limit = { + exists = scope:6090_child_c + } + scope:6090_child_c = { + add_prowess_skill = 1 + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + } + scope:6090_poet = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -30 + } + } + stress_impact = { + ambitious = medium_stress_impact_gain + diligent = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = ambitious + add = -25 + } + modifier = { + has_trait = diligent + add = -75 + } + modifier = { + has_trait = lazy + add = 25 + } + modifier = { + has_trait = callous + add = 25 + } + } + } + after = { + scope:6090_poet = { + clear_court_event_participation = yes + if = { + limit = { + root = { is_ai = yes } + has_character_flag = created_character + } + silent_disappearance_effect = yes + } + } + scope:6090_child_a = { + clear_court_event_participation = yes + } + scope:6090_child_b = { + clear_court_event_participation = yes + } + scope:6090_child_c ?= { + clear_court_event_participation = yes + } + } +} + + + + +################################################## +# George + +################################################## +# 7300 Where's the Lamb Sauce? +# 7600 Wild at Heart +# 7610 Child asks for a destrier +# 7649 Courtier has harmed their bird +# 7700 Chief Eunuch trains a pigeon to steal things +################################################## + +######################### +# Where's the Lamb Sauce? +# by George Luff +# 7300 +######################### + +scripted_trigger court_7300_court_food_taster_trigger = { + has_court_position = food_taster_court_position + is_available_healthy_ai_adult = yes +} + +## Food Taster QUITS +court.7300 = { + type = court_event + title = court.7300.t + desc = court.7300.desc + theme = court + + court_scene = { + button_position_character = scope:taster + roles = { + scope:taster = { + group = event_group + animation = disgust + } + root = { + group = event_group + animation = worry + } + } + } + + cooldown = { years = 25 } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + trigger = { + has_court_event_flag = no + # Employs a food taster + any_court_position_holder = { + court_7300_court_food_taster_trigger = yes + has_court_event_flag = no + } + # The level of food amenities are crap + amenity_level = { + target = court_food_quality + value <= medium_amenity_level + } + NOT = { + government_has_flag = government_is_tribal + } + } + + immediate = { + court_event_character_flag_effect = yes + # Save Food Taster + random_court_position_holder = { + limit = { + court_7300_court_food_taster_trigger = yes + } + save_scope_as = taster + court_event_character_flag_effect = yes + } + } + + # invest more in food + option = { + name = court.7300.a + add_amenity_level = { type = court_food_quality value = 1 } + add_character_modifier = { + modifier = incentivized_food_taster + years = 15 + } + scope:taster = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + stress_impact = { + gluttonous = medium_stress_impact_loss + greedy = major_stress_impact_gain + generous = medium_stress_impact_loss + } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 0.5 + ai_compassion = 1 + ai_greed = -1 + } + } + } + + # Let things be + option = { + name = court.7300.b + scope:taster = { + add_opinion = { + modifier = disgusted_opinion + target = root + opinion = -15 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + stubborn = medium_stress_impact_loss + callous = medium_stress_impact_loss + } + ai_chance = { + base = 20 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + } + } + + after = { + clear_court_event_participation = yes + scope:taster = { + clear_court_event_participation = yes + } + } +} + + +######################### +# Wild at Heart +# by George Luff +# 7600 +######################### + +scripted_trigger active_child_trigger = { + age >= 7 + age <= 15 + is_landed = no + location = root.location + is_available_healthy_ai_child = yes + NOT = { has_character_flag = child_goes_hunting } +} + +court.7600 = { + type = court_event + title = court.7600.t + desc = court.7600.desc + theme = court + + court_scene = { + button_position_character = scope:child + roles = { + scope:child = { + group = event_group + animation = ecstasy + } + scope:huntmaster = { + group = event_group + animation = happiness + } + } + } + + cooldown = { years = 15 } + + weight_multiplier = { + base = 1 + + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + trigger = { + any_child = { + active_child_trigger = yes + has_court_event_flag = no + } + employs_court_position = master_of_hunt_court_position + any_court_position_holder = { + type = master_of_hunt_court_position + is_available_healthy_ai_adult = yes + has_court_event_flag = no + } + NOT = { + culture = { has_cultural_tradition = tradition_vegetarianism } + } + } + + immediate = { + random_child = { + limit = { + active_child_trigger = yes + } + weight ={ + base = 1 + modifier = { + has_trait = rowdy + add = 2 + } + modifier = { + has_trait = curious + add = 1 + } + } + save_scope_as = child + court_event_character_flag_effect = yes + add_character_flag = child_goes_hunting + select_local_animal_effect = { TYPE = harmless } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + random_court_position_holder = { + type = master_of_hunt_court_position + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = huntmaster + court_event_character_flag_effect = yes + } + } + + # Ban the outings + option = { + name = court.7600.a + scope:child = { + add_learning_skill = 2 + add_opinion = { + modifier = hate_opinion + target = root + opinion = -30 + } + } + stress_impact = { + lifestyle_hunter = major_stress_impact_gain + brave = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + craven = medium_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = -1 + } + modifier = { + has_trait = lifestyle_hunter + factor = 0 + } + } + } + + # Approve the outings + option = { + name = court.7600.c + scope:child = { + add_prowess_skill = 1 + add_opinion = { + modifier = love_opinion + target = root + opinion = 15 + } + } + scope:huntmaster = { + custom_tooltip = 7600_taking_child_to_hunt.tt + add_character_flag = 7600_taking_child_to_hunt + if = { + limit = { + has_trait = lifestyle_hunter + } + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = 5 + } + } + else = { + add_trait = lifestyle_hunter + } + } + stress_impact = { + lifestyle_hunter = medium_stress_impact_loss + craven = medium_stress_impact_gain + scholar = minor_stress_impact_gain + theologian = minor_stress_impact_gain + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = 1 + } + modifier = { + has_trait = paranoid + factor = 0 + } + } + } + after = { + scope:huntmaster = { + clear_court_event_participation = yes + } + scope:child = { + clear_court_event_participation = yes + } + } +} + + +######################### +# Spymaster trains a pigeon to steal things +# by George Luff +# 7700 +######################### + +scripted_trigger pigeon_assistance_scheme_trigger = { + OR = { + scheme_type = fabricate_hook + scheme_type = abduct + scheme_type = sway + scheme_type = murder + scheme_type = convert_to_witchcraft + } +} + +court.7700 = { + type = court_event + title = court.7700.t + desc = court.7700.desc + theme = court + court_scene = { + button_position_character = scope:spymaster + roles = { + scope:spymaster = { + group = event_group + animation = scheme + } + } + } + cooldown = { years = 25 } + + weight_multiplier = { + base = 1 + + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + trigger = { + cp:councillor_spymaster ?= { + is_available_ai_adult = yes + has_court_event_flag = no + } + any_scheme = { + pigeon_assistance_scheme_trigger = yes + } + } + + immediate = { + cp:councillor_spymaster = { + save_scope_as = spymaster + court_event_character_flag_effect = yes + } + random_scheme = { + limit = { + pigeon_assistance_scheme_trigger = yes + } + save_scope_as = scheme + } + scope:spymaster = { + add_character_modifier = { + modifier = pigeon_thief + years = 10 + } + } + } + + # Just this once, ok? + option = { + name = court.7700.b + # You've told them you need help, they are in on it now! + try_to_force_assign_character_to_random_agent_slot_effect = { + SCHEME = scope:scheme + CHAR = scope:spymaster + YEARS = 10 + } + add_character_modifier = { + modifier = profiting_from_pigeon_thievery + years = 10 + } + stress_impact = { + honest = massive_stress_impact_gain + just = major_stress_impact_gain + compassionate = medium_stress_impact_gain + brave = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + ai_compassion = -0.5 + } + } + } + + # Turn the spymaster away + option = { + name = court.7700.d + add_prestige = minor_prestige_gain + stress_impact = { + deceitful = major_stress_impact_gain + vengeful = major_stress_impact_gain + fickle = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_honor = 1 + } + } + } + after = { + scope:spymaster = { + clear_court_event_participation = yes + } + } +} + + + + + + + + + + +################################################## +# Joe Parkin + +# 8001 - Trampled Underfoot +# 8010 - Underequipped +# 8020 - Sartorial Sting +# 8030 - Pawful of Pooches +# 8040 - Aristocratic Pretensions +# 8050 - A Little Bird +# 8070 - Feeling Useful +# 8080 - Maternal Reproach +# 8090 - Building Blocks +# 8120 - Novel Perspectives +# 8140 - Royal Lapse +# 8150 - Prandial Excess +# 8160 - Foremost Knight + +######################### +# Trampled Underfoot # +# by Joe Parkin # +######################### + +scripted_trigger court_8001_child_trigger = { + is_available = yes + is_healthy = yes + age > 3 + age < 12 + has_any_focus = yes + NOT = { has_variable = court_8001_child_flag } + location = root.location +} + +scripted_effect court_8001_skill_effect = { + duel = { + skill = $SKILL$ + value = decent_skill_rating + 5 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -49 + } + min = 1 + desc = court.8001.a.success + send_interface_toast = { + left_icon = scope:child_1 + title = court.8001.a.lesson_tt + scope:child_1 = { add_$SKILL$_skill = 2 } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 2 + desc = court.8001.a.success + send_interface_toast = { + left_icon = scope:child_1 + title = court.8001.a.lesson_tt + scope:child_1 = { add_$SKILL$_skill = 1 } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = court.8001.a.failure + } + } + stress_impact = { + base = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + callous = minor_stress_impact_gain + } +} + +court.8001 = { + type = court_event + title = court.8001.t + desc = { + desc = court.8001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:child_1 = { has_focus = education_diplomacy } + } + desc = court.8001.desc.diplomacy + } + triggered_desc = { + trigger = { + scope:child_1 = { has_focus = education_martial } + } + desc = court.8001.desc.martial + } + triggered_desc = { + trigger = { + scope:child_1 = { has_focus = education_stewardship } + } + desc = court.8001.desc.stewardship + } + triggered_desc = { + trigger = { + scope:child_1 = { has_focus = education_intrigue } + } + desc = court.8001.desc.intrigue + } + triggered_desc = { + trigger = { + scope:child_1 = { has_focus = education_learning } + } + desc = court.8001.desc.learning + } + desc = court.8001.desc.fallback + } + desc = court.8001.desc.closing + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:gardener + roles = { + root = { + group = event_group + animation = war_over_tie + } + scope:gardener = { + group = event_group + animation = rage + } + scope:child_1 = { + group = event_group + animation = shame + } + } + } + + trigger = { + any_courtier_or_guest = { + count >= 1 + court_8001_child_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + employs_court_position = court_gardener_court_position + any_court_position_holder = { + type = court_gardener_court_position + is_available_healthy_ai_adult = yes + has_court_event_flag = no + } + add = 2 + } + modifier = { + has_trait = lifestyle_gardener + add = 2 + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_court_position_holder = { + type = court_gardener_court_position + limit = { is_available_healthy_ai_adult = yes } + save_scope_as = gardener + } + if = { + limit = { + NOT = { exists = scope:gardener } + } + create_character = { + location = root.location + template = gardener_template + save_scope_as = gardener + } + scope:gardener = { add_character_flag = created_character } + } + scope:gardener = { + court_event_character_flag_effect = yes + } + random_courtier_or_guest = { + limit = { + court_8001_child_trigger = yes + OR = { + is_child_of = root + any_relation = { + type = guardian + this = root + } + } + } + alternative_limit = { court_8001_child_trigger = yes } + save_scope_as = child_1 + court_event_character_flag_effect = yes + set_variable = { + name = court_8001_child_flag + days = 3650 + } + } + } + + option = { # Encourage the child's interests + name = court.8001.a.diplomacy + trigger = { + scope:child_1 = { has_focus = education_diplomacy } + } + skill = diplomacy + court_8001_skill_effect = { SKILL = diplomacy } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Encourage the child's interests + name = court.8001.a.martial + trigger = { + scope:child_1 = { has_focus = education_martial } + } + skill = martial + court_8001_skill_effect = { SKILL = martial } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Encourage the child's interests + name = court.8001.a.stewardship + trigger = { + scope:child_1 = { has_focus = education_stewardship } + } + skill = stewardship + court_8001_skill_effect = { SKILL = stewardship } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Encourage the child's interests + name = court.8001.a.intrigue + trigger = { + scope:child_1 = { has_focus = education_intrigue } + } + skill = intrigue + court_8001_skill_effect = { SKILL = intrigue } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Encourage the child's interests + name = court.8001.a.learning + trigger = { + scope:child_1 = { has_focus = education_learning } + } + skill = learning + court_8001_skill_effect = { SKILL = learning } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Replant them + name = court.8001.c + scope:child_1 = { + random = { + chance = 20 + modifier = { + scope:gardener = { has_court_position = court_gardener_court_position } + add = 5 + } + modifier = { + scope:gardener = { has_trait = lifestyle_gardener } + add = 10 + } + modifier = { + has_trait = diligent + add = 10 + } + modifier = { + has_trait = lazy + add = -10 + } + root = { + send_interface_toast = { + left_icon = scope:child_1 + title = court.8001.c.gardener_tt + scope:child_1 = { add_trait = lifestyle_gardener } + } + } + } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -20 + } + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + stress_impact = { + just = minor_stress_impact_loss + diligent = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Dismiss the gardener's protests (opt out) + name = court.8001.e + reverse_add_opinion = { + target = scope:gardener + modifier = annoyed_opinion + opinion = -20 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + } + } + + after = { + scope:gardener = { + clear_court_event_participation = yes + if = { + limit = { + root = { is_ai = yes } + has_character_flag = created_character + } + silent_disappearance_effect = yes + } + } + scope:child_1 = { + clear_court_event_participation = yes + } + + } +} + +######################### +# Underequipped # +# by Joe Parkin # +######################### + +scripted_trigger court_8010_underequipped_trigger = { + is_available_healthy_ai_adult = yes + OR = { + NOT = { + any_character_artifact = { artifact_slot_type = primary_armament } + } + any_character_artifact = { + count = all + artifact_slot_type = primary_armament + OR = { + var:quality < 25 + ep1_artifact_durability_lower_equal_percent_trigger = { PERCENT = 0.24 } # could be replaced by checking LOW_DURATION + } + } + } +} + +court.8010 = { + type = court_event + title = court.8010.t + desc = { + desc = court.8010.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:underequipped = { + OR = { + has_court_position = bodyguard_court_position + has_court_position = akolouthos_court_position + } + } + } + desc = court.8010.desc.bodyguard + } + triggered_desc = { + trigger = { + scope:underequipped = { has_court_position = champion_court_position } + } + desc = court.8010.desc.champion + } + desc = court.8010.desc.knight + } + first_valid = { + triggered_desc = { + trigger = { + scope:underequipped = { + OR = { + has_trait = brave + has_trait = wrathful + has_trait = arrogant + has_trait = impatient + has_trait = ambitious + } + } + } + desc = court.8010.desc.bold + } + desc = court.8010.desc.meek + } + desc = court.8010.desc.body + random_valid = { + triggered_desc = { + trigger = { + scope:underequipped = { + OR = { + has_court_position = bodyguard_court_position + has_court_position = akolouthos_court_position + is_knight_of = root + } + } + } + desc = court.8010.desc.bodyguard_end + } + triggered_desc = { + trigger = { + scope:underequipped = { has_court_position = champion_court_position } + } + desc = court.8010.desc.champion_end + } + } + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:underequipped + roles = { + scope:underequipped = { + group = event_group + animation = sadness + } + root = { + group = event_group + animation = idle + } + } + } + + trigger = { + has_court_event_flag = no + OR = { + any_court_position_holder = { + type = bodyguard_court_position + court_8010_underequipped_trigger = yes + has_court_event_flag = no + location = root.location + } + any_court_position_holder = { + type = champion_court_position + court_8010_underequipped_trigger = yes + has_court_event_flag = no + location = root.location + } + any_court_position_holder = { + type = akolouthos_court_position + court_8010_underequipped_trigger = yes + has_court_event_flag = no + location = root.location + } + any_knight = { + court_8010_underequipped_trigger = yes + has_court_event_flag = no + is_landed = no + location = root.location + } + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + court_event_character_flag_effect = yes + hidden_effect = { + random_list = { + 4 = { + trigger = { + any_court_position_holder = { + type = bodyguard_court_position + court_8010_underequipped_trigger = yes + location = root.location + } + } + random_court_position_holder = { + type = bodyguard_court_position + limit = { + court_8010_underequipped_trigger = yes + location = root.location + } + save_scope_as = underequipped + court_event_character_flag_effect = yes + } + } + 4 = { + trigger = { + any_court_position_holder = { + type = champion_court_position + court_8010_underequipped_trigger = yes + location = root.location + } + } + random_court_position_holder = { + type = champion_court_position + limit = { + court_8010_underequipped_trigger = yes + location = root.location + } + save_scope_as = underequipped + court_event_character_flag_effect = yes + } + } + 8 = { + trigger = { + any_court_position_holder = { + type = akolouthos_court_position + court_8010_underequipped_trigger = yes + location = root.location + } + } + random_court_position_holder = { + type = akolouthos_court_position + limit = { + court_8010_underequipped_trigger = yes + location = root.location + } + save_scope_as = underequipped + court_event_character_flag_effect = yes + } + } + 1 = { + trigger = { + any_knight = { + court_8010_underequipped_trigger = yes + location = root.location + is_landed = no + } + } + random_knight = { + limit = { + court_8010_underequipped_trigger = yes + location = root.location + is_landed = no + } + save_scope_as = underequipped + court_event_character_flag_effect = yes + } + } + } + } + random_dummy_gender_effect = yes #To feed to the weapon effect since we don't have a creator + scope:underequipped = { set_signature_weapon_effect = yes } #To create an artifact of the "signature weapon" type + if = { + limit = { + any_character_artifact = { + count > 1 + artifact_slot_type = primary_armament + } + } + ordered_character_artifact = { + limit = { + is_equipped = no + artifact_slot_type = primary_armament + } + order_by = { + value = 0 + subtract = var:quality + } + save_scope_as = my_weapon + } + } + } + + option = { # Have a sword made + name = court.8010.a + change_current_court_grandeur = medium_court_grandeur_gain + remove_short_term_gold = medium_gold_value + custom_tooltip = court.8010.a.tt + hidden_effect = { + scope:underequipped = { + if = { + limit = { var:signature_weapon = flag:axe } + create_artifact_weapon_effect = { + OWNER = scope:underequipped + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_axe + } + } + else_if = { + limit = { var:signature_weapon = flag:hammer } + create_artifact_weapon_effect = { + OWNER = scope:underequipped + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_hammer + } + } + else_if = { + limit = { var:signature_weapon = flag:spear } + create_artifact_weapon_effect = { + OWNER = scope:underequipped + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_spear + } + } + else_if = { + limit = { var:signature_weapon = flag:mace } + create_artifact_weapon_effect = { + OWNER = scope:underequipped + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_mace + } + } + else = { #For swords, but also as fallback - no daggers here + create_artifact_weapon_effect = { + OWNER = scope:underequipped + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_sword + } + } + } + if = { + limit = { exists = scope:newly_created_artifact } # To avoid errors + send_interface_toast = { + title = court.8010.a.equipped_tt + left_icon = scope:underequipped + right_icon = scope:newly_created_artifact + scope:newly_created_artifact = { + set_owner = { + target = scope:underequipped + history = { + location = root.capital_province + actor = root + recipient = scope:underequipped + type = given + } + } + } + } + } + } + scope:underequipped = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + stress_impact = { + greedy = major_stress_impact_gain # It's too expensive + callous = medium_stress_impact_gain # So? + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Give lesser owned sword + name = court.8010.c + trigger = { exists = scope:my_weapon } + add_prestige = major_prestige_gain + scope:underequipped = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + send_interface_toast = { + title = court.8010.c.equipped_tt + left_icon = scope:underequipped + right_icon = scope:my_weapon + scope:my_weapon = { + set_owner = { + target = scope:underequipped + history = { + location = root.capital_province + actor = root + recipient = scope:underequipped + type = given + } + } + } + } + stress_impact = { + greedy = major_stress_impact_gain # My precious?! + arrogant = medium_stress_impact_gain # My swords are too strong for you traveler + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_compassion = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + } + } + + option = { # Give a sword from the armory (opt out) + name = court.8010.d + change_current_court_grandeur = minor_court_grandeur_loss + custom_tooltip = court.8010.d.tt + scope:underequipped = { + if = { + limit = { + any_character_artifact = { + is_equipped = yes + artifact_slot_type = primary_armament + ep1_artifact_durability_lower_equal_percent_trigger = { PERCENT = 0.99 } + } + } + random_character_artifact = { + limit = { + is_equipped = yes + artifact_slot_type = primary_armament + ep1_artifact_durability_lower_equal_percent_trigger = { PERCENT = 0.49 } + } + add_durability = { + value = artifact_max_durability + multiply = 0.25 + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = paranoid + } + + } + } + + after = { + clear_court_event_participation = yes + scope:underequipped = { + clear_court_event_participation = yes + } + } +} + +######################### +# Sartorial Sting # +# by Joe Parkin # +######################### + +court.8020 = { + type = court_event + title = court.8020.t + desc = court.8020.desc + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:couture_spouse + roles = { + scope:couture_spouse = { + group = event_group + animation = anger + } + scope:couture_guest = { + group = event_group + animation = schadenfreude + } + } + } + + trigger = { + amenity_level = { target = court_fashion value <= medium_amenity_level } + is_married = yes + primary_spouse = { + is_alive = yes + has_court_event_flag = no + } + any_pool_guest = { + is_available_ai_adult = yes + has_court_event_flag = no + } + + NOT = { + government_has_flag = government_is_tribal # No changing amenities above what's legal for tribals + } + } + + weight_multiplier = { + base = 1 + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + primary_spouse = { + save_scope_as = couture_spouse + court_event_character_flag_effect = yes + } + random_pool_guest = { + limit = { is_available_ai_adult = yes } + weight = { + base = 1 + modifier = { + factor = 20 + culture != root.culture + } + modifier = { + factor = 10 + sex_same_as = root.primary_spouse + } + } + save_scope_as = couture_guest + court_event_character_flag_effect = yes + } + primary_spouse = { + progress_towards_rival_effect = { + CHARACTER = scope:couture_guest + REASON = rival_couture_criticised + OPINION = 0 + } + } + } + + option = { # Make an effort + name = court.8020.b + set_amenity_level = { type = court_fashion value = high_amenity_level } + remove_short_term_gold = minor_gold_value + capital_county = { + add_county_modifier = { + modifier = fashion_industry_county_modifier + years = 25 + } + } + stress_impact = { + greedy = medium_stress_impact_gain # It's too espensive + content = medium_stress_impact_gain # What's wrong with our clothes? + humble = medium_stress_impact_gain # These clothes are good enough + improvident = medium_stress_impact_loss # Shopping! + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = content + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { + gold < minor_gold_value + factor = 0 + } + } + } + + option = { # Laugh it off (opt out) + name = court.8020.a + add_prestige = minor_prestige_gain + change_current_court_grandeur = minor_court_grandeur_loss + primary_spouse = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + stress_impact = { + base = minor_stress_impact_loss + arrogant = medium_stress_impact_gain # How dare they mock us + wrathful = medium_stress_impact_gain # Why I 'oughta + vengeful = medium_stress_impact_gain # They said what?! + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -2 + ai_rationality = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + } + } + + after = { + scope:couture_guest = { + clear_court_event_participation = yes + } + scope:couture_spouse = { + clear_court_event_participation = yes + } + } +} + +######################### +# Pawful of Pooches # +# by Joe Parkin # +######################### + +scripted_trigger court_8030_child_trigger = { + age >= 6 + is_adult = no + is_available = yes + NOT = { has_character_modifier = dog_story_modifier } +} + +court.8030 = { + type = court_event + title = court.8030.t + desc = { + desc = court.8030.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:child_2 } + desc = court.8030.desc.two + } + desc = court.8030.desc.one + } + desc = court.8030.desc.body + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:huntmaster + roles = { + scope:huntmaster = { + group = event_group + animation = happiness + } + scope:child_1 = { + group = event_group + animation = beg + } + scope:child_2 = { + group = event_group + animation = interested + } + } + } + + trigger = { + employs_court_position = master_of_hunt_court_position + any_court_position_holder = { + type = master_of_hunt_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + any_child = { + court_8030_child_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_court_position_holder = { + type = master_of_hunt_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = huntmaster + court_event_character_flag_effect = yes + } + random_child = { + limit = { court_8030_child_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 2 + has_trait = curious + } + modifier = { + factor = 2 + has_trait = charming + } + modifier = { + factor = 2 + has_focus = education_diplomacy + } + } + save_scope_as = child_1 + court_event_character_flag_effect = yes + } + if = { + limit = { + any_child = { + court_8030_child_trigger = yes + this != scope:child_1 + } + } + random_child = { + limit = { + court_8030_child_trigger = yes + this != scope:child_1 + } + weight = { + base = 1 + modifier = { + factor = 2 + has_trait = curious + } + modifier = { + factor = 2 + has_trait = charming + } + modifier = { + factor = 2 + has_focus = education_diplomacy + } + } + save_scope_as = child_2 + court_event_character_flag_effect = yes + } + } + } + + option = { + name = court.8030.a + change_current_court_grandeur = medium_court_grandeur_gain + add_character_modifier = { + modifier = hunting_pooches_modifier + years = 10 + } + stress_impact = { + lifestyle_hunter = major_stress_impact_loss + greedy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + family_first = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_energy = 1 + ai_honor = 1 + } + modifier = { #Weight up. + add = 30 + has_trait = lifestyle_hunter + } + } + } + + option = { + name = court.8030.b + scope:child_1 = { + start_dog_story_cycle_effect = yes + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + if = { + limit = { exists = scope:child_2 } + scope:child_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + stress_impact = { + lifestyle_hunter = medium_stress_impact_gain + just = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = 1 + } + modifier = { #Weight up. + add = -15 + has_trait = lifestyle_hunter + } + modifier = { #Weight up. + add = -5 + has_trait = just + } + modifier = { #Weight up. + add = -15 + has_trait = callous + } + } + } + + option = { + name = court.8030.c + trigger = { exists = scope:child_2 } + scope:child_2 = { + start_dog_story_cycle_effect = yes + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + scope:child_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + stress_impact = { + lifestyle_hunter = medium_stress_impact_gain + just = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = 1 + } + modifier = { #Weight up. + add = -15 + has_trait = lifestyle_hunter + } + modifier = { #Weight up. + add = -5 + has_trait = just + } + modifier = { #Weight up. + add = -15 + has_trait = callous + } + } + } + + option = { + name = court.8030.d + trigger = { + NOT = { has_character_modifier = dog_story_modifier } + } + start_dog_story_cycle_effect = yes + scope:child_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + if = { + limit = { exists = scope:child_2 } + scope:child_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + } + stress_impact = { + lifestyle_hunter = medium_stress_impact_gain + just = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 2 + ai_compassion = 1 + } + modifier = { #Weight up. + add = -15 + has_trait = lifestyle_hunter + } + modifier = { #Weight up. + add = -5 + has_trait = just + } + modifier = { #Weight up. + add = -15 + has_trait = generous + } + } + } + after = { + scope:huntmaster = { + clear_court_event_participation = yes + } + scope:child_1 = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:child_2 } + scope:child_2 = { + clear_court_event_participation = yes + } + } + } +} +############################ +# Aristocratic Pretensions # +# by Joe Parkin # +############################ + +scripted_trigger court_8040_courtier_trigger = { + is_available_healthy_ai_adult = yes + any_held_title = { count = 0 } + NOR = { + is_close_family_of = root + has_trait = content + has_trait = humble + is_hostage = yes + } + trigger_if = { + limit = { is_female = yes } + root = { faith_dominant_gender_female_or_equal = yes } + } + trigger_else = { faith_dominant_gender_male_or_equal = yes } +} + +scripted_effect court_8040_grant_effect = { + send_interface_toast = { + left_icon = scope:new_noble + title = court.8040.grant_tt + root = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:new_noble = { + if = { + limit = { scope:worst_title.tier = tier_barony } + add_opinion = { + target = root + modifier = received_title_barony + opinion = 30 + } + } + else = { + add_opinion = { + target = root + modifier = received_title_county + opinion = 50 + } + } + } + if = { + limit = { + can_add_hook = { + target = scope:new_noble + type = indebted_hook + } + } + add_hook = { + target = scope:new_noble + type = indebted_hook + } + } + scope:new_noble = { + add_character_flag = { + flag = joining_faction_block + years = 20 + } + } + custom_tooltip = joining_faction_block_tt + every_in_list = { + list = court_8040_list + limit = { + this != scope:new_noble + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + } +} + +scripted_effect court_8040_desc_effect = { + if = { + limit = { + has_any_court_position = yes + NOT = { exists = scope:position_holder } + } + save_scope_as = position_holder + } + else_if = { + limit = { + is_knight = yes + NOT = { exists = scope:knight } + } + save_scope_as = knight + } + else_if = { + limit = { + is_close_or_extended_family_of = root + NOT = { exists = scope:relative } + } + save_scope_as = relative + } + else_if = { + limit = { + has_trait = ambitious + NOT = { exists = scope:ambitious } + } + save_scope_as = ambitious + } + else_if = { + limit = { + has_trait = arrogant + NOT = { exists = scope:arrogant } + } + save_scope_as = arrogant + } + else_if = { + limit = { + is_lowborn = yes + NOT = { exists = scope:lowborn } + } + save_scope_as = lowborn + } + else_if = { + limit = { + is_lowborn = no + NOT = { exists = scope:gentry } + } + save_scope_as = gentry + } + else = { + if = { + limit = { NOT = { exists = scope:generic_1 } } + save_scope_as = generic_1 + } + else_if = { + limit = { NOT = { exists = scope:generic_2 } } + save_scope_as = generic_2 + } + else = { save_scope_as = generic_3 } + } +} + +court.8040 = { + type = court_event + title = court.8040.t + desc = { + desc = court.8040.desc.intro + triggered_desc = { + trigger = { exists = scope:position_holder } + desc = court.8040.desc.position_holder + } + triggered_desc = { + trigger = { exists = scope:knight } + desc = court.8040.desc.knight + } + triggered_desc = { + trigger = { exists = scope:relative } + desc = court.8040.desc.relative + } + triggered_desc = { + trigger = { exists = scope:ambitious } + desc = court.8040.desc.ambitious + } + triggered_desc = { + trigger = { exists = scope:arrogant } + desc = court.8040.desc.arrogant + } + triggered_desc = { + trigger = { exists = scope:lowborn } + desc = court.8040.desc.lowborn + } + triggered_desc = { + trigger = { exists = scope:gentry } + desc = court.8040.desc.gentry + } + triggered_desc = { + trigger = { exists = scope:generic_1 } + desc = court.8040.desc.generic_1 + } + triggered_desc = { + trigger = { exists = scope:generic_2 } + desc = court.8040.desc.generic_2 + } + triggered_desc = { + trigger = { exists = scope:generic_3 } + desc = court.8040.desc.generic_3 + } + desc = court.8040.desc.body + } + theme = court + override_background = { reference = throne_room } + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:courtier_3 + roles = { + scope:courtier_1 = { + group = event_group + animation = personality_irrational + } + scope:courtier_2 = { + group = event_group + animation = personality_coward + } + scope:courtier_3 = { + group = event_group + animation = personality_dishonorable + } + } + } + + trigger = { + has_royal_court = yes + any_courtier = { + count >= 3 + court_8040_courtier_trigger = yes + has_court_event_flag = no + } + OR = { + any_held_title = { + title_tier = barony + is_capital_barony = no + is_leased_out = no + this != root.capital_barony + } + any_held_title = { + count >= 4 + title_tier = county + is_landless_type_title = no + } + } + domain_limit_available < 0 + } + + weight_multiplier = { + base = 1 + modifier = { + is_ai = yes + factor = 0.5 + } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + ordered_courtier = { # Find 3 courtiers and determine their flaws + limit = { court_8040_courtier_trigger = yes } + max = 3 + check_range_bounds = no + order_by = prestige + if = { + limit = { NOT = { exists = scope:courtier_1 } } + save_scope_as = courtier_1 + court_event_character_flag_effect = yes + court_8040_desc_effect = yes + } + else_if = { + limit = { NOT = { exists = scope:courtier_2 } } + save_scope_as = courtier_2 + court_event_character_flag_effect = yes + court_8040_desc_effect = yes + } + else = { + save_scope_as = courtier_3 + court_event_character_flag_effect = yes + court_8040_desc_effect = yes + } + add_to_list = court_8040_list + if = { + limit = { NOT = { exists = scope:button } } + save_scope_as = button # For button character + } + } + if = { # Find a valid barony to give away + limit = { + any_held_title = { + title_tier = barony + is_capital_barony = no + is_leased_out = no + this != root.capital_barony + } + } + ordered_held_title = { + title_tier = barony + limit = { + is_capital_barony = no + is_leased_out = no + this != root.capital_barony + } + order_by = { + value = 0 + subtract = title_province.combined_building_level + } + save_scope_as = worst_title + } + } + else = { # Find a valid county to give away + ordered_held_title = { + title_tier = county + limit = { + this != root.capital_county + is_landless_type_title = no + } + order_by = { + value = 0 + subtract = development_level + } + save_scope_as = worst_title + } + } + } + + option = { # Best courtier wins - fight + name = court.8040.d + flavor = court.8040.d.flavor_tt + random_list = { + 2 = { + desc = court.8040.d.courtier_1_tt + modifier = { + add = scope:courtier_1.prowess + } + scope:courtier_1 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + 2 = { + desc = court.8040.d.courtier_2_tt + modifier = { + add = scope:courtier_2.prowess + } + scope:courtier_2 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + 2 = { + desc = court.8040.d.courtier_3_tt + modifier = { + add = scope:courtier_3.prowess + } + scope:courtier_3 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + } + every_in_list = { + list = court_8040_list + increase_wounds_no_death_effect = { REASON = duel } + } + hidden_effect = { court_8040_grant_effect = yes } + stress_impact = { + lifestyle_blademaster = medium_stress_impact_loss # Yay fighty slash + viking = medium_stress_impact_loss # Yay fighty slash + varangian = medium_stress_impact_loss # Yay fighty slash + berserker = medium_stress_impact_loss # Yay fighty slash + brave = medium_stress_impact_loss # Yay fighty slash + greedy = medium_stress_impact_gain # But, titles + diligent = medium_stress_impact_gain # But, I like managing stuff + arrogant = medium_stress_impact_gain # But, my titles + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 2 + ai_greed = -0.5 + } + modifier = { #Weight up for stress. + add = 15 + has_trait = lifestyle_blademaster + } + modifier = { #Weight up for stress. + add = 15 + has_trait = viking + } + modifier = { #Weight up for stress. + add = 15 + has_trait = varangian + } + modifier = { #Weight up for stress. + add = 15 + has_trait = berserker + } + modifier = { #Weight up for stress. + add = 15 + has_trait = berserker + } + modifier = { #Weight up for stress. + add = 15 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + } + } + + option = { # Best courtier wins - persuasion + name = court.8040.e + change_current_court_grandeur = medium_court_grandeur_gain + random_list = { + 2 = { + desc = court.8040.e.courtier_1_tt + modifier = { + add = scope:courtier_1.diplomacy + } + scope:courtier_1 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + 2 = { + desc = court.8040.e.courtier_2_tt + modifier = { + add = scope:courtier_2.diplomacy + } + scope:courtier_2 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + 2 = { + desc = court.8040.e.courtier_3_tt + modifier = { + add = scope:courtier_3.diplomacy + } + scope:courtier_3 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + } + stress_impact = { + lifestyle_poet = medium_stress_impact_loss # Poetry duels are my jam + gregarious = medium_stress_impact_loss # Having fun with friends was the real reward + diplomat = medium_stress_impact_loss # Solving problems with words is the coolest + greedy = medium_stress_impact_gain # But, titles + diligent = medium_stress_impact_gain # But, I like managing stuff + arrogant = medium_stress_impact_gain # But, my titles + } + hidden_effect = { court_8040_grant_effect = yes } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = -0.5 + } + modifier = { #Weight up for stress. + add = 15 + has_trait = lifestyle_poet + } + modifier = { #Weight up for stress. + add = 15 + has_trait = gregarious + } + modifier = { #Weight up for stress. + add = 15 + has_trait = diplomat + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + } + } + + option = { # You get nothing! + name = court.8040.f + add_prestige = minor_prestige_gain + every_in_list = { + list = court_8040_list + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + stress_impact = { + generous = medium_stress_impact_gain # But I have so much to give + lazy = medium_stress_impact_gain # I would rather have someone else do it + humble = medium_stress_impact_gain # Who am I to deny them? + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_greed = 1 + } + modifier = { # Weight up for NO family members. + factor = 2 + NOR = { + scope:courtier_1 = { is_close_or_extended_family_of = root } + scope:courtier_2 = { is_close_or_extended_family_of = root } + scope:courtier_3 = { is_close_or_extended_family_of = root } + } + } + modifier = { # Weight up for NO dynasty members. + factor = 2 + NOR = { + scope:courtier_1.dynasty = root.dynasty + scope:courtier_2.dynasty = root.dynasty + scope:courtier_3.dynasty = root.dynasty + } + } + modifier = { # Weight up for NO opinion. + factor = 2 + NOR = { + opinion = { + target = scope:courtier_1 + value >= 50 + } + opinion = { + target = scope:courtier_2 + value >= 50 + } + opinion = { + target = scope:courtier_3 + value >= 50 + } + } + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + } + } + after = { + scope:courtier_1 = { + clear_court_event_participation = yes + } + scope:courtier_2 = { + clear_court_event_participation = yes + } + scope:courtier_3 = { + clear_court_event_participation = yes + } + } +} + +######################### +# A Little Bird # +# by Joe Parkin # +######################### + +scripted_trigger court_8050_secrets_trigger = { + is_ai = yes + has_any_secrets = yes + any_secret = { + NOT = { + any_secret_knower = { this = root } + } + } +} + +court.8050 = { + type = court_event + title = court.8050.t + desc = court.8050.desc + theme = court + override_background = { reference = throne_room } + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:servant + roles = { + ROOT = { + group = event_group + animation = throne_room_conversation_4 + } + scope:servant = { + group = event_group + animation = throne_room_conversation_1 + } + } + } + + trigger = { + has_royal_court = yes + has_court_event_flag = no + OR = { + any_vassal = { + court_8050_secrets_trigger = yes + has_court_event_flag = no + } + any_courtier_or_guest = { + court_8050_secrets_trigger = yes + has_court_event_flag = no + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + } + amenity_level = { + target = court_servants + value > high_amenity_level + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + amenity_level = { + target = court_servants + value = max_amenity_level + } + } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + court_event_character_flag_effect = yes + every_vassal = { + limit = { court_8050_secrets_trigger = yes } + add_to_list = court_8050_secret_list + } + every_courtier_or_guest = { + limit = { + court_8050_secrets_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + add_to_list = court_8050_secret_list + } + random_in_list = { + list = court_8050_secret_list + weight = { + base = 1 + modifier = { + factor = primary_title.tier + } + modifier = { + factor = 2 + any_secret = { + any_secret_knower = { count > 2 } + } + } + modifier = { + factor = 3 + is_landed = yes + } + } + save_scope_as = vassal + random_secret = { + limit = { + NOT = { + any_secret_knower = { this = root } + } + } + weight = { + modifier = { + factor = 2 + any_secret_knower = { count > 2 } + } + } + save_scope_as = vassal_secret + reveal_to = root + } + } + if = { + limit = { + any_in_list = { + list = court_8050_secret_list + this != scope:vassal + } + } + random_in_list = { + list = court_8050_secret_list + limit = { this != scope:vassal } + save_scope_as = vassal_2 + random_secret = { + limit = { + NOT = { + any_secret_knower = { this = root } + } + } + weight = { + modifier = { + factor = 2 + any_secret_knower = { count > 2 } + } + } + save_scope_as = secret_2 + } + } + } + hidden_effect = { + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + gender_female_chance = root_soldier_female_chance + save_scope_as = servant + } + } + } + + option = { # What else have you heard? + name = court.8050.b + trigger = { exists = scope:secret_2 } + add_prestige = minor_prestige_loss + custom_tooltip = court.8050.b.tt + hidden_effect = { + send_interface_toast = { + title = court.8050.b.tt_secret + left_icon = scope:vassal_2 + scope:secret_2 = { reveal_to = root } + } + } + scope:servant = { silent_disappearance_effect = yes } + stress_impact = { + schemer = medium_stress_impact_loss + trusting = medium_stress_impact_gain # What if people spy on me too?! + honest = medium_stress_impact_gain # This isn't above board + humble = medium_stress_impact_gain # It is not my business + lazy = medium_stress_impact_gain # Sounds like effort + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -2 + ai_energy = 2 + } + modifier = { # Weight down for stress. + add = 15 + has_trait = schemer + } + modifier = { # Weight down for stress. + add = -15 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -15 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Keep me informed + name = court.8050.c + remove_short_term_gold = minor_gold_value + add_character_modifier = { + modifier = servant_informants_modifier + years = 5 + } + custom_tooltip = court.8050.c.tt + scope:servant = { silent_disappearance_effect = yes } + stress_impact = { + schemer = medium_stress_impact_loss # Sweet, sweet scheming + trusting = medium_stress_impact_gain # What if people spy on me too?! + honest = medium_stress_impact_gain # This isn't above board + humble = medium_stress_impact_gain # It is not my business + lazy = medium_stress_impact_gain # Sounds like effort + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -2 + ai_energy = 2 + } + modifier = { # Weight down for stress. + add = 15 + has_trait = schemer + } + modifier = { # Weight down for stress. + add = -15 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -15 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Thanks for your service (opt out) + name = court.8050.a + stress_impact = { + deceitful = medium_stress_impact_gain # I could have learned so much more... + arrogant = medium_stress_impact_gain # I don't surround myself with commoners + paranoid = medium_stress_impact_gain # What do they know about me instead?? + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { # Weight down for stress. + add = -15 + has_trait = deceitful + } + modifier = { # Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -15 + has_trait = paranoid + } + } + } + + after = { + clear_court_event_participation = yes + scope:servant ?= { + clear_court_event_participation = yes + } + } +} + + +######################### +# Building Blocks # +# by Joe Parkin # +######################### + +scripted_trigger court_8090_barony_trigger = { + tier = tier_barony + is_leased_out = no + title_province.free_building_slots > 0 + county != scope:my_county +} + +court.8090 = { + type = court_event + title = court.8090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:architect = { has_court_position = royal_architect_court_position } + } + desc = court.8090.desc.intro + } + desc = court.8090.desc.intro_alt + } + desc = court.8090.desc.intro_end + first_valid = { + triggered_desc = { + trigger = { + exists = scope:chaplain + scope:chaplain = scope:architect + } + desc = court.8090.desc.religious + } + desc = court.8090.desc.castle + } + desc = court.8090.desc.outro + first_valid = { + triggered_desc = { + trigger = { exists = scope:chaplain } + desc = court.8090.desc.chaplain + } + desc = court.8090.desc.fallback + } + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:architect + roles = { + scope:architect = { + group = event_group + animation = throne_room_chancellor + } + scope:steward = { + group = event_group + animation = throne_room_conversation_3 + } + } + } + + trigger = { + has_royal_court = yes + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + has_court_event_flag = no + } + any_held_title = { + title_tier = barony + is_leased_out = no + title_province.free_building_slots > 0 + title_province.county = { + any_county_province = { + has_holding = no + } + } + } + } + + weight_multiplier = { + base = 1 + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + modifier = { + add = 1 + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + has_trait = compassionate + } + } + modifier = { + any_court_position_holder = { + type = royal_architect_court_position + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { this = root.cp:councillor_steward } + } + add = 2 + } + } + + immediate = { + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + random_court_position_holder = { + type = royal_architect_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = architect + } + if = { + limit = { + NOT = { exists = scope:architect } + } + random_pool_character = { + province = root.location + limit = { + stewardship > 12 + is_adult = yes + } + save_scope_as = architect + hidden_effect = { add_trait = architect } + } + } + if = { + limit = { + NOT = { exists = scope:architect } + } + create_character = { + location = root.location + template = foreign_architect_template + save_scope_as = architect + } + scope:architect = { + add_character_flag = created_character + } + } + scope:architect = { court_event_character_flag_effect = yes } + ordered_held_title = { # Save barony with least buildings + title_tier = barony + limit = { + is_leased_out = no + title_province.free_building_slots > 0 + } + order_by = { + value = 0 + subtract = title_province.combined_building_level + } + save_scope_as = my_barony + county = { save_scope_as = my_county } + scope:my_barony.title_province = { add_random_building_variable_effect = yes } + } + scope:my_county = { + ordered_county_province = { # Save church in same county + limit = { + has_holding_type = church_holding + free_building_slots > 0 + } + order_by = free_building_slots + barony = { save_scope_as = temple_barony } + scope:temple_barony.title_province = { add_random_building_variable_effect = yes } + } + random_county_province = { # Save an empty province in the same county + limit = { + has_holding = no + } + save_scope_as = empty_holding + } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + NOT = { cp:councillor_court_chaplain = scope:architect } + trigger_if = { + limit = { + NOT = { exists = scope:temple_barony } + } + any_held_title = { + title_tier = county + any_county_province = { + has_holding_type = church_holding + free_building_slots > 0 + } + } + } + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + if = { + limit = { + NOT = { exists = scope:temple_barony } + } + random_held_title = { + title_tier = county + limit = { + any_county_province = { + has_holding_type = church_holding + free_building_slots > 0 + } + } + random_county_province = { + limit = { + has_holding_type = church_holding + free_building_slots > 0 + } + barony = { save_scope_as = temple_barony } + add_random_building_variable_effect = yes + } + } + } + } + } + + option = { # For my barony + name = court.8090.a + remove_treasury_or_gold = court_8090_half_building_cost_value + scope:my_barony.title_province = { add_random_building_construct_effect = yes } + stress_impact = { + architect = medium_stress_impact_loss # A good idea + lazy = medium_stress_impact_gain # Too much work + greedy = medium_stress_impact_gain # It will cost _how_ much? + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_energy = 1 + } + modifier = { #Weight up. + add = 15 + has_trait = architect + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { + gold < court_8090_half_building_cost_value + factor = 0 + } + } + } + + option = { # For the church + name = court.8090.b + trigger = { + exists = scope:chaplain + exists = scope:temple_barony + } + add_piety = minor_piety_value + remove_treasury_or_gold = court_8090_half_building_cost_value + reverse_add_opinion = { + target = scope:chaplain + modifier = pleased_opinion + opinion = 10 + } + scope:temple_barony.title_province = { add_random_building_construct_effect = yes } + stress_impact = { + architect = minor_stress_impact_loss # A good idea + cynical = medium_stress_impact_gain # God needs no house + greedy = medium_stress_impact_gain # It will cost _how_ much? + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 2 + } + modifier = { #Weight up. + add = 5 + has_trait = architect + } + modifier = { #Weight down for stress. + add = -15 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { + gold < court_8090_half_building_cost_value + factor = 0 + } + } + } + + option = { # Architect can do better + name = court.8090.c + trigger = { + scope:architect = { has_court_position = royal_architect_court_position } + is_ai = no + } + flavor = court.8090.c.tt + remove_treasury_or_gold = hold_court_holding_cost_architect_cheaper_value + scope:empty_holding = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = hold_court_holding_cost_architect_cheaper_value + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + + option = { # For the people (opt out) + name = court.8090.d + scope:my_barony.county = { + add_county_modifier = { + modifier = court_8090_commoners_modifier + years = 25 + } + } + stress_impact = { + architect = medium_stress_impact_gain # But my castle! + callous = major_stress_impact_gain # The people? Pah + diligent = major_stress_impact_gain # I can do it + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = architect + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = diligent + } + } + } + + after = { + if = { + limit = { + exists = scope:my_barony + scope:my_barony.title_province = { has_variable = random_building_variable } + } + scope:my_barony.title_province = { remove_variable = random_building_variable } + } + if = { + limit = { + exists = scope:temple_barony + scope:temple_barony.title_province = { has_variable = random_building_variable } + } + scope:temple_barony.title_province = { remove_variable = random_building_variable } + } + scope:steward = { + clear_court_event_participation = yes + } + scope:architect = { + clear_court_event_participation = yes + if = { + limit = { + root = { + is_ai = yes + } + has_character_flag = created_character + } + silent_disappearance_effect = yes + } + } + } +} + + +######################### +# Royal Lapse # +# by Joe Parkin # +######################### + +court.8140 = { + type = court_event + title = court.8140.t + desc = court.8140.desc + theme = court + cooldown = { years = 10 } + orphan = yes + court_scene = { + button_position_character = scope:vassal_1 + roles = { + scope:vassal_1 = { + group = event_group + animation = throne_room_kneel_2 + } + scope:vassal_2 = { + group = event_group + animation = throne_room_conversation_4 + } + } + } + + trigger = { + has_a_stress_coping_trait_trigger = yes + stress_level >= 1 + OR = { + exists = cp:councillor_court_chaplain + exists = cp:councillor_steward + exists = court_position:seneschal_court_position + exists = court_position:travel_leader_court_position + } + OR = { + exists = cp:councillor_marshal + exists = court_position:master_of_hunt_court_position + exists = court_position:master_of_horse_court_position + exists = court_position:court_physician_court_position + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_two_stress_coping_traits_trigger = yes + } + modifier = { + factor = stress_level + stress_level >= 1 + } + } + + immediate = { + random_list = { + 1 = { + cp:councillor_court_chaplain ?= { save_scope_as = vassal_1 } #prayer + } + 1 = { + cp:councillor_steward ?= { save_scope_as = vassal_1 } #feast + } + 2 = { + court_position:seneschal_court_position ?= { save_scope_as = vassal_1 } #feast + } + 2 = { + court_position:travel_leader_court_position ?= { save_scope_as = vassal_1 } #travel + } + } + random_list = { + 1 = { + cp:councillor_marshal ?= { save_scope_as = vassal_2 } #hunt + } + 2 = { + court_position:master_of_hunt_court_position ?= { save_scope_as = vassal_2 } #hunt + } + 2 = { + trigger = { + NOT = { + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + } + } + court_position:master_of_horse_court_position ?= { save_scope_as = vassal_2 } #horse + } + 2 = { + court_position:court_physician_court_position ?= { save_scope_as = vassal_2 } #fresh air + } + } + } + + option = { # Engage in stress coping + name = court.8140.b + flavor = court.8140.b.flavor_tt + change_current_court_grandeur = medium_court_grandeur_loss + scope:vassal_1 = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + scope:vassal_2 = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + stress_impact = { + base = massive_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_energy = -1 + } + modifier = { + add = -30 + has_trait = diligent + } + } + } + + option = { # vassal_1 proposal + name = { + trigger = { #prayer + scope:vassal_1 = cp:councillor_court_chaplain + } + text = court.8140.c.1 + } + name = { + trigger = { #feast + OR = { + scope:vassal_1 = cp:councillor_steward + scope:vassal_1 = court_position:seneschal_court_position + } + } + text = court.8140.c.2 + } + name = { + trigger = { #travel + scope:vassal_1 = court_position:travel_leader_court_position + } + text = court.8140.c.3 + } + flavor = court.8140.c.flavor_tt + if = { #prayer + limit = { + scope:vassal_1 = cp:councillor_court_chaplain + } + add_piety = major_piety_gain + custom_tooltip = court.8140.c.tt.2 + add_character_flag = { + flag = court_event_discount_pilgrimage + years = 10 + } + } + else_if = { #feats + limit = { + OR = { + scope:vassal_1 = cp:councillor_steward + scope:vassal_1 = court_position:seneschal_court_position + } + } + custom_tooltip = court.8140.c.tt + add_character_flag = { + flag = court_event_discount_feast + years = 5 + } + } + else = { #travel + add_character_modifier = { + modifier = enjoy_the_travel_modifier + years = 25 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { # vassal_2 proposal + name = { + trigger = { #hunt + OR = { + scope:vassal_2 = cp:councillor_marshal + scope:vassal_2 = court_position:master_of_hunt_court_position + } + } + text = court.8140.d.1 + } + name = { + trigger = { #horse + scope:vassal_2 = court_position:master_of_horse_court_position + } + text = court.8140.d.2 + } + name = { + trigger = { #fresh air + scope:vassal_2 = court_position:court_physician_court_position + } + text = court.8140.d.3 + } + flavor = court.8140.d.flavor_tt + if = { #hunt + limit = { + OR = { + scope:vassal_2 = cp:councillor_marshal + scope:vassal_2 = court_position:master_of_hunt_court_position + } + } + custom_tooltip = court.8140.d.tt + add_character_flag = { + flag = court_event_discount_hunt + years = 5 + } + } + else_if = { + limit = { + scope:vassal_2 = court_position:master_of_horse_court_position + } + start_warhorse_story_cycle_effect = yes + } + else = { + add_character_modifier = { + modifier = healthy_strolls_modifier + years = 25 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { # Make an effort (opt out) + name = court.8140.a + flavor = court.8140.a.flavor_tt + change_current_court_grandeur = medium_court_grandeur_gain + stress_impact = { + base = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { + add = -15 + has_trait = fickle + } + modifier = { + add = -15 + has_trait = callous + } + modifier = { + add = -15 + has_trait = arbitrary + } + modifier = { + add = -15 + has_trait = lazy + } + } + } + + after = { + scope:vassal_1 = { + clear_court_event_participation = yes + } + scope:vassal_2 = { + clear_court_event_participation = yes + } + } +} + +######################### +# Prandial Excess # +# by Joe Parkin # +######################### + +scripted_trigger court_8150_foodie_trigger = { + NOR = { + has_trait = temperate + has_trait = inappetetic + } +} + +scripted_trigger court_8150_vassal_trigger = { + is_available_ai_adult = yes + court_8150_foodie_trigger = yes + trigger_if = { + limit = { exists = scope:chaplain } + this != scope:chaplain + } + trigger_if = { + limit = { exists = scope:food_taster } + this != scope:food_taster + } + trigger_if = { + limit = { exists = scope:high_almoner } + this != scope:high_almoner + } + trigger_if = { + limit = { exists = scope:vassal_1 } + this != scope:vassal_1 + } + trigger_if = { + limit = { exists = scope:vassal_2 } + this != scope:vassal_2 + } +} + +court.8150 = { + type = court_event + title = court.8150.t + desc = { + desc = court.8150.desc.intro + triggered_desc = { + trigger = { exists = scope:food_taster } + desc = court.8150.desc.taster + } + desc = court.8150.desc.body + first_valid = { + triggered_desc = { + trigger = { + exists = scope:high_almoner + exists = scope:chaplain + } + desc = court.8150.desc.almoner_chaplain + } + triggered_desc = { + trigger = { exists = scope:chaplain } + desc = court.8150.desc.chaplain + } + triggered_desc = { + trigger = { exists = scope:high_almoner } + desc = court.8150.desc.almoner + } + } + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:vassal_1 + roles = { + scope:vassal_1 = { + group = event_group + animation = throne_room_conversation_1 + } + scope:vassal_2 = { + group = event_group + animation = throne_room_conversation_2 + } + scope:vassal_3 = { + group = event_group + animation = throne_room_conversation_3 + } + } + } + + trigger = { + NOT = { + faith = { has_doctrine = tenet_ritual_celebrations } + } + amenity_level = { target = court_food_quality value >= high_amenity_level } + OR = { + AND = { + is_married = yes + primary_spouse = { + court_8150_vassal_trigger = yes + has_court_event_flag = no + } + any_courtier_or_guest = { + count >= 2 + court_8150_foodie_trigger = yes + has_court_event_flag = no + } + } + any_courtier_or_guest = { + count >= 3 + court_8150_foodie_trigger = yes + has_court_event_flag = no + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + amenity_level = { target = court_food_quality value > very_high_amenity_level } + } + modifier = { + add = 1 + employs_court_position = high_almoner_court_position + } + modifier = { + add = 1 + employs_court_position = food_taster_court_position + } + } + + immediate = { + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + NOR = { + has_trait = gluttonous + faith = { has_doctrine = tenet_hedonistic } + faith = { has_doctrine = tenet_carnal_exaltation } + } + } + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + if = { + limit = { + employs_court_position = high_almoner_court_position + any_court_position_holder = { + type = high_almoner_court_position + is_available_ai_adult = yes + NOR = { + has_trait = gluttonous + faith = { has_doctrine = tenet_hedonistic } + faith = { has_doctrine = tenet_carnal_exaltation } + } + trigger_if = { + limit = { exists = scope:chaplain } + this != scope:chaplain + } + } + } + random_court_position_holder = { + type = high_almoner_court_position + limit = { + is_available_healthy_ai_adult = yes + NOR = { + has_trait = gluttonous + faith = { has_doctrine = tenet_hedonistic } + faith = { has_doctrine = tenet_carnal_exaltation } + } + trigger_if = { + limit = { exists = scope:chaplain } + this != scope:chaplain + } + } + save_scope_as = high_almoner + } + } + if = { + limit = { + employs_court_position = food_taster_court_position + any_court_position_holder = { + type = food_taster_court_position + is_available_healthy_ai_adult = yes + } + } + random_court_position_holder = { + type = food_taster_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = food_taster + hidden_effect = { change_current_weight = 25 } + } + } + if = { + limit = { + is_married = yes + primary_spouse = { court_8150_vassal_trigger = yes } + } + primary_spouse = { save_scope_as = vassal_1 } + } + else = { + random_courtier_or_guest = { + limit = { court_8150_vassal_trigger = yes } + weight = { + modifier = { + factor = 2 + has_any_court_position = yes + } + modifier = { + factor = 10 + has_trait = gluttonous + } + modifier = { + factor = 5 + has_trait = greedy + } + modifier = { + factor = 2 + is_courtier = yes + } + } + save_scope_as = vassal_1 + court_event_character_flag_effect = yes + hidden_effect = { change_current_weight = 15 } + } + } + random_courtier_or_guest = { + limit = { court_8150_vassal_trigger = yes } + weight = { + modifier = { + factor = 2 + has_any_court_position = yes + } + modifier = { + factor = 10 + has_trait = gluttonous + } + modifier = { + factor = 5 + has_trait = greedy + } + modifier = { + factor = 2 + is_courtier = yes + } + } + save_scope_as = vassal_2 + court_event_character_flag_effect = yes + hidden_effect = { change_current_weight = 15 } + } + random_courtier_or_guest = { + limit = { court_8150_vassal_trigger = yes } + weight = { + modifier = { + factor = 2 + has_any_court_position = yes + } + modifier = { + factor = 10 + has_trait = gluttonous + } + modifier = { + factor = 5 + has_trait = greedy + } + modifier = { + factor = 2 + is_courtier = yes + } + } + save_scope_as = vassal_3 + court_event_character_flag_effect = yes + hidden_effect = { change_current_weight = 15 } + } + hidden_effect = { + random_list = { + 2 = { + trigger = { exists = scope:vassal_1 } + scope:vassal_1 = { save_scope_as = demander } + } + 2 = { + trigger = { exists = scope:vassal_2 } + scope:vassal_2 = { save_scope_as = demander } + } + 2 = { + trigger = { exists = scope:vassal_3 } + scope:vassal_3 = { save_scope_as = demander } + } + } + } + } + + option = { # Chow down + name = court.8150.a + change_current_court_grandeur = major_court_grandeur_gain + if = { + limit = { + exists = scope:food_taster + } + custom_tooltip = court.8150.a.tt + scope:food_taster = { + add_character_flag = food_taster_mettle_tested + } + } + if = { + limit = { exists = scope:chaplain } + reverse_add_opinion = { + modifier = disgusted_opinion + target = scope:chaplain + opinion = -10 + } + } + if = { + limit = { exists = scope:high_almoner } + reverse_add_opinion = { + modifier = disgusted_opinion + target = scope:high_almoner + opinion = -10 + } + } + hidden_effect = { change_current_weight = 20 } + stress_impact = { + lifestyle_reveler = medium_stress_impact_loss + comfort_eater = medium_stress_impact_loss + gluttonous = minor_stress_impact_loss + temperate = major_stress_impact_gain + inappetetic = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + } + modifier = { #Weight up for stress. + add = 50 + has_trait = lifestyle_reveler + } + modifier = { #Weight up for stress. + add = 30 + has_trait = comfort_eater + } + modifier = { #Weight up for stress. + add = 15 + has_trait = gluttonous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = temperate + } + modifier = { #Weight down for stress. + add = -30 + has_trait = inappetetic + } + } + } + + option = { # Stop foodies + name = court.8150.c + add_legitimacy = miniscule_legitimacy_gain + if = { + limit = { + NOT = { + faith = { has_doctrine = tenet_hedonistic } + } + } + add_piety = medium_piety_gain + } + if = { + limit = { exists = scope:chaplain } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:chaplain + opinion = 10 + } + } + if = { + limit = { + exists = scope:high_almoner + } + custom_tooltip = court.8150.b.tt + scope:high_almoner = { + add_character_flag = plenty_to_donate_almoner + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + } + stress_impact = { + gluttonous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + profligate = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = gluttonous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = profligate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = cynical + } + modifier = { + add = 50 + has_trait = temperate + } + } + } + + after = { + scope:vassal_1 = { + clear_court_event_participation = yes + } + if = { + limit = { + exists = scope:vassal_2 + } + scope:vassal_2 = { + clear_court_event_participation = yes + } + } + if = { + limit = { + exists = scope:vassal_3 + } + scope:vassal_3 = { + clear_court_event_participation = yes + } + } + } +} + +######################### +# Foremost Knight # +# by Joe Parkin # +######################### + +scripted_trigger court_8160_knight_trigger = { + is_landed = no + is_available_ai_adult = yes + can_start_single_combat_trigger = yes + NOR = { + has_trait = humble + has_trait = craven + has_trait = shy + } +} + +court.8160 = { + type = court_event + title = court.8160.t + desc = { + desc = court.8160.desc.intro + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:knight_1 + roles = { + scope:knight_1 = { + group = event_group + animation = rage + } + scope:knight_2 = { + group = event_group + animation = anger + } + } + } + + trigger = { + any_knight = { + court_8160_knight_trigger = yes + has_court_event_flag = no + save_temporary_scope_as = temp_knight + } + any_knight = { + court_8160_knight_trigger = yes + has_court_event_flag = no + NOR = { + this = scope:temp_knight + is_close_or_extended_family_of = scope:temp_knight + has_relation_friend = scope:temp_knight + } + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + every_knight = { + limit = { court_8160_knight_trigger = yes } + add_to_list = knight_list + } + ordered_in_list = { + list = knight_list + order_by = prowess + save_scope_as = knight_1 + court_event_character_flag_effect = yes + assign_quirk_effect = yes + } + ordered_in_list = { + list = knight_list + limit = { + NOR = { + this = scope:knight_1 + is_close_or_extended_family_of = scope:knight_1 + has_relation_friend = scope:knight_1 + } + court_8160_knight_trigger = yes + } + order_by = prowess + save_scope_as = knight_2 + court_event_character_flag_effect = yes + assign_quirk_effect = yes + if = { + limit = { + NOT = { has_relation_rival = scope:knight_1 } + } + set_relation_rival = { + target = scope:knight_1 + reason = rival_age_old_rivalry + } + } + } + } + + option = { # employ them both + name = court.8160.a + trigger = { + OR = { + any_court_position_holder = { + type = bodyguard_court_position + count < 1 + } + AND = { + any_court_position_holder = { + type = bodyguard_court_position + count < 2 + } + NOT = { employs_court_position = champion_court_position } + } + AND = { + any_court_position_holder = { + type = bodyguard_court_position + count < 2 + } + NOT = { employs_court_position = akolouthos_court_position } + can_employ_court_position_type = akolouthos_court_position + } + } + } + court_position_grant_effect = { POS = bodyguard CANDIDATE = scope:knight_1 EMPLOYER = root } + if = { + limit = { + any_court_position_holder = { + type = bodyguard_court_position + count = 1 + } + } + court_position_grant_effect = { POS = bodyguard CANDIDATE = scope:knight_2 EMPLOYER = root } + } + else_if = { + limit = { + NOT = { employs_court_position = champion_court_position } + } + court_position_grant_effect = { POS = champion CANDIDATE = scope:knight_2 EMPLOYER = root } + } + else = { + court_position_grant_effect = { POS = akolouthos CANDIDATE = scope:knight_2 EMPLOYER = root } + } + custom_tooltip = court.8160.a.tt + scope:knight_1 = { add_character_flag = competing_knight_position } + scope:knight_2 = { add_character_flag = competing_knight_position } + stress_impact = { + wrathful = medium_stress_impact_gain + fickle = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_sociability = 0.5 + } + } + } + + + option = { # Make it a safe duel + name = court.8160.b + change_current_court_grandeur = minor_court_grandeur_gain + show_as_tooltip = { + random_list = { + 2 = { + modifier = { factor = scope:knight_1.prowess } + show_chance = no + desc = court.8160.a.tt_knight_1 + scope:knight_1 = { add_prestige = minor_prestige_gain } + scope:knight_2 = { + increase_wounds_effect = { REASON = duel } + } + } + 2 = { + modifier = { factor = scope:knight_2.prowess } + show_chance = no + desc = court.8160.a.tt_knight_2 + scope:knight_2 = { add_prestige = minor_prestige_gain } + scope:knight_1 = { + increase_wounds_effect = { REASON = duel } + } + } + } + } + configure_start_single_combat_effect = { + SC_INITIATOR = scope:knight_2 + SC_ATTACKER = scope:knight_2 + SC_DEFENDER = scope:knight_1 + FATALITY = no + FIXED = no + LOCALE = throne_room + OUTPUT_EVENT = court.8162 + INVALIDATION_EVENT = fp1_tbc.0102 + } + stress_impact = { + craven = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } + + option = { # Do not allow duel + name = court.8160.d + add_character_modifier = { + modifier = fostering_competitiveness_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:knight_1 + modifier = disappointed_opinion + opinion = -5 + } + reverse_add_opinion = { + target = scope:knight_2 + modifier = disappointed_opinion + opinion = -5 + } + stress_impact = { + arbitrary = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_rationality = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + } + } + after = { + scope:knight_1 = { + clear_court_event_participation = yes + } + scope:knight_2 = { + clear_court_event_participation = yes + } + } +} + +court.8162 = { + hidden = yes + + immediate = { + scope:sc_victor.liege = { + send_interface_toast = { + title = hold_court.8031.t + left_icon = scope:sc_victor + right_icon = scope:sc_loser + scope:sc_victor = { + add_prestige = minor_prestige_gain + custom_tooltip = court.8162.tt + add_character_flag = best_knight_position + } + } + } + } +} + + +######################### +# Pariah of Court # +# by Joe Parkin # +######################### + +scripted_trigger kinslayer_crime_trigger = { + AND = { + liege.faith = { + NOR = { + has_doctrine = doctrine_kinslaying_accepted + has_doctrine = doctrine_kinslaying_shunned + } + } + OR = { + has_trait = kinslayer_1 + has_trait = kinslayer_2 + has_trait = kinslayer_3 + } + } +} + +scripted_trigger cannibal_crime_trigger = { + AND = { + NOT = { + liege.faith = { has_doctrine = tenet_ritual_cannibalism } + } + has_trait = cannibal + } +} + +scripted_trigger witch_crime_trigger = { + AND = { + liege.faith = { has_doctrine_parameter = witchcraft_illegal } + has_trait = witch + } +} + +scripted_trigger deviant_crime_trigger = { + AND = { + liege.faith = { has_doctrine_parameter = deviancy_illegal } + has_trait = deviant + } +} + +scripted_trigger sodomite_crime_trigger = { + AND = { + liege.faith = { has_doctrine = doctrine_homosexuality_crime } + is_male = yes + has_trait = sodomite + } +} + +scripted_trigger incest_crime_trigger = { + AND = { + liege.faith = { + NOT = { has_doctrine = doctrine_consanguinity_unrestricted } + } + has_trait = incestuous + } +} + +scripted_trigger adultery_crime_trigger = { + AND = { + OR = { + AND = { + liege.faith = { has_doctrine = doctrine_adultery_women_crime } + is_female = yes + } + AND = { + liege.faith = { has_doctrine = doctrine_adultery_men_crime } + is_male = yes + } + } + OR = { + has_trait = adulterer + has_trait = fornicator + } + } +} + +scripted_trigger excommunicated_crime_trigger = { + AND = { + faith = liege.faith + has_trait = excommunicated + } +} + +scripted_trigger faith_crime_trigger = { + AND = { + faith = { + faith_hostility_level = { + target = ROOT.faith + value >= faith_hostile_level + } + } + } +} + +scripted_trigger is_illegal_criminal_trigger = { + exists = liege.faith + OR = { + kinslayer_crime_trigger = yes + cannibal_crime_trigger = yes + witch_crime_trigger = yes + deviant_crime_trigger = yes + sodomite_crime_trigger = yes + incest_crime_trigger = yes + adultery_crime_trigger = yes + excommunicated_crime_trigger = yes + faith_crime_trigger = yes + has_trait = denounced + } +} + +scripted_trigger court_8170_criminal_trigger = { + is_imprisoned = no + is_landed = no + is_illegal_criminal_trigger = yes + NOR = { + has_relation_lover = root + has_relation_soulmate = root + } +} + +scripted_effect court_8170_torture_etc_end_effect = { + if = { + limit = { has_relation_friend = scope:criminal } + stress_impact = { base = major_stress_impact_gain } + } + if = { + limit = { is_close_family_of = scope:criminal } + stress_impact = { base = medium_stress_impact_gain } + } + if = { + limit = { is_extended_family_of = scope:criminal } + stress_impact = { base = minor_stress_impact_gain } + } + if = { + limit = { has_relation_rival = scope:criminal } + stress_impact = { base = medium_stress_impact_loss } + } + stress_impact = { + compassionate = major_stress_impact_gain + } +} + +scripted_effect court_8170_torture_etc_setup_effect = { + change_current_court_grandeur = medium_court_grandeur_gain + add_legitimacy = miniscule_legitimacy_gain + add_character_modifier = { + modifier = fast_hard_justice_modifier + years = 10 + } + rightfully_imprison_character_effect = { + TARGET = scope:criminal + IMPRISONER = root + } + #Needed for the scripted effects below + root = { save_scope_as = actor } + scope:criminal = { save_scope_as = recipient } +} + +court.8170 = { + type = court_event + title = court.8170.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:criminal = { + OR = { + kinslayer_crime_trigger = yes + cannibal_crime_trigger = yes + witch_crime_trigger = yes + } + } + } + desc = court.8170.desc.intro_scary + } + triggered_desc = { + trigger = { + scope:criminal = { + OR = { + deviant_crime_trigger = yes + sodomite_crime_trigger = yes + incest_crime_trigger = yes + adultery_crime_trigger = yes + } + } + } + desc = court.8170.desc.intro_sordid + } + triggered_desc = { + trigger = { + scope:criminal = { + OR = { + excommunicated_crime_trigger = yes + faith_crime_trigger = yes + } + } + } + desc = court.8170.desc.intro_religious + } + desc = court.8170.desc.intro_fallback + } + desc = court.8170.desc.body + first_valid = { + triggered_desc = { + trigger = { + scope:criminal = { is_close_or_extended_family_of = ROOT } + } + desc = court.8170.desc.family + } + triggered_desc = { + trigger = { + scope:criminal = { is_pool_guest = yes } + } + desc = court.8170.desc.guest + } + desc = court.8170.desc.fallback + } + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:criminal + roles = { + scope:criminal = { + group = event_group + animation = shame + } + } + } + + trigger = { + NOT = { court_8170_criminal_trigger = yes } + any_courtier_or_guest = { + court_8170_criminal_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_courtier_or_guest = { + is_close_or_extended_family_of = root + court_8170_criminal_trigger = yes + } + add = 1 + } + modifier = { + any_courtier_or_guest = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + court_8170_criminal_trigger = yes + } + add = 0.5 + } + } + + immediate = { + random_courtier_or_guest = { + limit = { + is_close_or_extended_family_of = root + court_8170_criminal_trigger = yes + } + alternative_limit = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + court_8170_criminal_trigger = yes + } + alternative_limit = { + is_courtier = yes + court_8170_criminal_trigger = yes + } + alternative_limit = { court_8170_criminal_trigger = yes } + save_scope_as = criminal + court_event_character_flag_effect = yes + } + } + + option = { # Let them stay: dark deals to protect you + name = { + text = court.8170.a.family + trigger = { + scope:criminal = { is_close_or_extended_family_of = root } + } + } + name = { + text = court.8170.a.other + trigger = { + NOT = { + scope:criminal = { is_close_or_extended_family_of = root } + } + } + } + change_current_court_grandeur = medium_court_grandeur_loss + add_character_modifier = { + modifier = harbors_criminals_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:criminal + modifier = grateful_opinion + opinion = 10 + } + stress_impact = { + just = major_stress_impact_gain + vengeful = medium_stress_impact_gain + diligent = medium_stress_impact_gain + honest = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = just + add = -75 + } + modifier = { + has_trait = diligent + add = -50 + } + modifier = { + has_trait = honest + add = -50 + } + ai_value_modifier = { + ai_zeal = -0.5 + ai_vengefulness = -1 + } + } + } + + option = { # Big deal of punishing them: blind + name = court.8170.c1 + trigger = { + scope:criminal = { NOT = { has_trait = blind } } + culture = { has_cultural_parameter = can_blind_prisoners } + } + court_8170_torture_etc_setup_effect = yes + blind_recipient_effect = yes + # House Feud + add_character_flag = house_feud_blinding_flag + house_feud_torture_event_effect = yes + court_8170_torture_etc_end_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + option = { #castrate + name = court.8170.c2 + trigger = { + scope:criminal = { + NOT = { has_trait = eunuch } + is_male = yes + culture = { + has_cultural_parameter = can_castrate_prisoners + } + } + } + court_8170_torture_etc_setup_effect = yes + castrate_recipient_effect = yes + # House Feud + add_character_flag = house_feud_castration_flag + house_feud_torture_event_effect = yes + court_8170_torture_etc_end_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + option = { #execute + name = court.8170.c3 + court_8170_torture_etc_setup_effect = yes + execute_prisoner_effect = { + VICTIM = scope:recipient + EXECUTIONER = scope:actor + } + if = { + limit = { + scope:actor.capital_county = { + NOT = { has_county_modifier = held_public_execution_modifier } + } + } + scope:actor = { + capital_county = { + add_county_modifier = { + modifier = held_public_execution_modifier + days = 1850 + } + } + custom_tooltip = public_execution_control_effect + hidden_effect = { + every_held_title = { + title_tier = county + change_county_control = executioner_control_value + } + } + } + } + court_8170_torture_etc_end_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + option = { # Kick out - opt out + name = court.8170.d + change_current_court_grandeur = minor_court_grandeur_gain + if = { + limit = { has_relation_friend = scope:criminal } + stress_impact = { base = medium_stress_impact_gain } + } + if = { + limit = { is_close_family_of = scope:criminal } + stress_impact = { base = minor_stress_impact_gain } + } + if = { + limit = { is_extended_family_of = scope:criminal } + stress_impact = { base = miniscule_stress_impact_gain } + } + if = { + limit = { has_relation_rival = scope:criminal } + stress_impact = { base = medium_stress_impact_loss } + } + stress_impact = { + compassionate = minor_stress_impact_gain + } + hidden_effect = { + scope:criminal = { select_and_move_to_pool_effect = yes } + } + show_as_tooltip = { remove_courtier_or_guest = scope:criminal } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + after = { + scope:criminal ?= { + clear_court_event_participation = yes + } + } +} + +######################### +# Secrets and Lies # +# by Joe Parkin # +######################### + +scripted_trigger court_8180_secret_trigger = { + exists = secret_owner + is_criminal_for = secret_owner + any_secret_knower = { this = root } + NOT = { secret_target ?= root } +} + +scripted_trigger court_8180_relation_trigger = { + is_available_ai_adult = yes + any_secret = { court_8180_secret_trigger = yes } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } +} + +court.8180 = { + type = court_event + title = court.8180.t + desc = court.8180.desc.intro + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:criminal + roles = { + scope:criminal = { + group = event_group + animation = worry + } + } + } + + trigger = { + any_courtier_or_guest = { + court_8180_relation_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + cp:councillor_spymaster.intrigue >= 15 + add = 1 + } + modifier = { + cp:councillor_spymaster ?= { is_performing_council_task = task_find_secrets } + add = 1 + } + } + + immediate = { + random_courtier_or_guest = { + limit = { + court_8180_relation_trigger = yes + has_court_event_flag = no + } + save_scope_as = criminal + court_event_character_flag_effect = yes + random_secret = { + limit = { court_8180_secret_trigger = yes } + save_scope_as = criminal_secret + } + } + save_scope_as = knower # custom_loc + save_scope_as = actor # blackmail interaction + scope:criminal = { save_scope_as = recipient } # blackmail interaction + scope:criminal_secret = { save_scope_as = target } # blackmail interaction + } + + option = { # Blackmail + name = court.8180.b + trigger = { + NOT = { has_hook = scope:criminal } + } + blackmail_interaction_effect = yes + scope:criminal = { + add_character_modifier = { + modifier = liege_scrutiny_modifier + years = 20 + } + } + stress_impact = { + forgiving = major_stress_impact_gain + honest = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + lazy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.5 + } + } + } + + option = { # Punish + name = court.8180.c + change_current_court_grandeur = minor_court_grandeur_loss + scope:criminal_secret = { expose_secret = root } + hidden_effect = { + rightfully_imprison_character_effect = { + TARGET = scope:criminal + IMPRISONER = root + } + } + show_as_tooltip = { + imprison = { target = scope:criminal type = house_arrest } + } + add_character_modifier = { + modifier = court_without_secrets_modifier + years = 15 + } + custom_tooltip = court.6002.a.tt2 + stress_impact = { + arbitrary = minor_stress_impact_gain + cynical = minor_stress_impact_gain + deceitful = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_zeal = 0.5 + } + } + } + + option = { # Do nothing - opt out + name = court.8180.e + stress_impact = { + base = minor_stress_impact_loss + lazy = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + zealous = medium_stress_impact_gain + diligent = medium_stress_impact_gain + deceitful = major_stress_impact_gain + } + ai_chance = { + base = 75 + } + } + after = { + scope:criminal = { + clear_court_event_participation = yes + } + } +} + + + + + +################################################## +# Oltner + +################################################## +# 9000 - 9009 A Knight's Declaration +# 9100 - 9109 Epicurean Entertainment +# 9300 - 9309 Overt Overindulgence +# 9400 - 9409 Pie-based Shenanigans +# 9500 - 9509 A Little Language +################################################## + +######################### +# A Knight's Declaration +# by Alexander Oltner +######################### + +scripted_trigger suitably_flirty_knight = { + is_available_adult = yes + is_courtier_of = root + is_attracted_to_gender_of = root.primary_spouse + can_start_scheme = { + type = courting + target_character = root.primary_spouse + } + NOR = { + has_trait = chaste + has_trait = celibate + has_relation_lover = root.primary_spouse + } + would_attempt_to_seduce_married_trigger = yes + would_attempt_to_seduce_trigger = { CHARACTER = root.primary_spouse } + might_cheat_on_every_partner_trigger = yes +} + +# A Knight's Declaration +court.9000 = { + type = court_event + title = court.9000.t + desc = court.9000.desc + theme = court + + court_scene = { + button_position_character = scope:flirty_knight + roles = { + scope:flirty_knight = { + group = event_group + animation = flirtation_left + } + scope:flirty_spouse = { + group = event_group + animation = flirtation + } + } + } + + cooldown = { + years = 10 + } + + trigger = { + is_available_adult = yes + is_married = yes + any_knight = { + suitably_flirty_knight = yes + has_court_event_flag = no + save_temporary_scope_as = attraction_check + } + primary_spouse = { + is_available_adult = yes + has_court_event_flag = no + is_courtier_of = root + is_attracted_to_gender_of = scope:attraction_check + NOR = { + has_trait = chaste + has_trait = celibate + has_relation_lover = scope:attraction_check + } + } + } + + weight_multiplier = { + base = 1 + + modifier = { + root.primary_spouse = { might_cheat_on_every_partner_trigger = yes } + add = 1 + } + modifier = { + culture = { has_cultural_tradition = tradition_chivalry } + add = 2 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + primary_spouse = { + save_scope_as = flirty_spouse + court_event_character_flag_effect = yes + } + random_knight = { + limit = { + suitably_flirty_knight = yes + } + weight = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = lustful + has_trait = seducer + } + } + modifier = { + add = 10 + has_trait = lifestyle_poet + } + } + hidden_effect = { + if = { + limit = { + NOT = { + has_trait = lifestyle_poet + } + } + add_trait = lifestyle_poet + } + } + save_scope_as = flirty_knight + court_event_character_flag_effect = yes + + # Set up a subject gender. + select_poem_subject_gender_effect = { + SUBJECT = flag:specific + SUBJECT_TARGET = scope:flirty_spouse + } + # Roll for theme. + select_poem_theme_romance_effect = yes + } + } + + option = { # Stop this at once! + name = court.9000.b + + custom_tooltip = court_9000_b_tt + + add_prestige = minor_prestige_loss + add_character_modifier = { + modifier = detractor_of_courtly_love_modifier + years = 20 + } + custom_tooltip = court_9000.b.tt + scope:flirty_spouse = { + add_opinion = { + target = root + modifier = rude_opinion + opinion = -20 + } + } + scope:flirty_knight = { + hidden_effect = { + random = { + chance = 35 + start_scheme = { + type = courting + target_character = scope:flirty_spouse + } + } + } + } + + stress_impact = { + trusting = massive_stress_impact_gain + forgiving = medium_stress_impact_gain + chaste = medium_stress_impact_gain + calm = medium_stress_impact_gain + shy = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = trusting + has_trait = forgiving + } + } + } + } + + option = { # Let it go on! + name = court.9000.c + + custom_tooltip = court_9000_c_tt + + change_current_court_grandeur = major_court_grandeur_gain + add_character_modifier = { + modifier = promoter_of_courtly_love_modifier + years = 20 + } + custom_tooltip = court_9000.c.tt + scope:flirty_knight = { + create_inspiration = book_inspiration + hidden_effect = { + start_scheme = { + type = courting + target_character = scope:flirty_spouse + } + } + } + + stress_impact = { + paranoid = massive_stress_impact_gain + arrogant = major_stress_impact_gain + vengeful = medium_stress_impact_gain + lustful = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = paranoid + has_trait = arrogant + has_trait = vengeful + } + } + } + } + after = { + scope:flirty_knight = { + clear_court_event_participation = yes + } + scope:flirty_spouse = { + clear_court_event_participation = yes + } + } +} + +# A Knight's Dedication +court.9001 = { + type = court_event + title = court.9001.t + desc = court.9001.desc + theme = court + + court_scene = { + button_position_character = scope:flirty_knight + roles = { + scope:flirty_knight = { + group = event_group + animation = flirtation_left + } + scope:flirty_spouse = { + group = event_group + animation = flirtation + } + } + } + + cooldown = { + years = 30 + } + + trigger = { + is_available_adult = yes + is_married = yes + primary_spouse = { + is_available_adult = yes + has_court_event_flag = no + is_courtier_of = root + NOT = { + has_relation_soulmate = root + } + might_cheat_on_every_partner_trigger = yes + + any_targeting_scheme = { + scheme_owner = { + is_available_adult = yes + is_courtier_of = root + has_court_event_flag = no + save_temporary_scope_as = attraction_check + } + scheme_type = courting + } + + is_attracted_to_gender_of = scope:attraction_check + } + } + + weight_multiplier = { + base = 1 + modifier = { + culture = { has_cultural_tradition = tradition_chivalry } + add = 2 + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + save_scope_as = root_for_loc + primary_spouse = { + save_scope_as = flirty_spouse + court_event_character_flag_effect = yes + random_targeting_scheme = { + limit = { + scheme_owner = { + is_available_adult = yes + is_courtier_of = root + scope:flirty_spouse = { + is_attracted_to_gender_of = prev + } + } + scheme_type = courting + } + scheme_owner = { + save_scope_as = flirty_knight + court_event_character_flag_effect = yes + } + } + } + } + + option = { # Duel them + name = court.9001.a + + trigger = { + can_start_single_combat_trigger = yes + scope:flirty_knight = { + can_be_warrior_trigger = { ARMY_OWNER = root } + can_start_single_combat_trigger = yes + } + } + custom_tooltip = court.9001.a.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:flirty_knight + FATALITY = no + FIXED = no + LOCALE = throne_room + OUTPUT_EVENT = court.9003 + INVALIDATION_EVENT = court.9002 + } + add_prestige = medium_prestige_gain + ai_chance = { + base = 25 + modifier = { + factor = 0.1 + OR = { + has_trait = trusting + has_trait = forgiving + has_trait = chaste + } + } + } + } + + option = { # Banish the knight + name = court.9001.b + + add_gold = 5 + + scope:flirty_knight = { + banish_effect = { BANISHER = root } + hidden_effect = { + if = { + limit = { + any_scheme = { + type = courting + scheme_target_character = scope:flirty_spouse + } + } + random_scheme = { + type = courting + limit = { + scheme_target_character = scope:flirty_spouse + } + end_scheme = yes + } + } + } + } + if = { + limit = { + NOR = { + has_character_modifier = detractor_of_courtly_love_modifier + has_character_modifier = promoter_of_courtly_love_modifier + } + } + add_character_modifier = { + modifier = detractor_of_courtly_love_modifier + years = 20 + } + custom_tooltip = court_9000.b.tt + } + else = { + add_hook = { + target = scope:flirty_spouse + type = loyalty_hook + } + } + + scope:flirty_spouse = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_banished_knight + OPINION = 0 + } + + add_opinion = { + modifier = how_could_you_opinion + target = root + } + } + + stress_impact = { + trusting = massive_stress_impact_gain + forgiving = medium_stress_impact_gain + chaste = medium_stress_impact_gain + calm = medium_stress_impact_gain + shy = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = trusting + has_trait = forgiving + has_trait = chaste + } + } + } + } + + option = { # Let it go on! + name = court.9001.c + + change_current_court_grandeur = major_court_grandeur_gain + if = { + limit = { + NOR = { + has_character_modifier = promoter_of_courtly_love_modifier + has_character_modifier = detractor_of_courtly_love_modifier + } + } + add_character_modifier = { + modifier = promoter_of_courtly_love_modifier + years = 20 + } + custom_tooltip = court_9000.c.tt + } + else = { add_prestige = medium_prestige_gain } + + stress_impact = { + paranoid = massive_stress_impact_gain + arrogant = major_stress_impact_gain + vengeful = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = paranoid + has_trait = arrogant + has_trait = vengeful + } + } + } + } + after = { + scope:flirty_knight = { + clear_court_event_participation = yes + } + scope:flirty_spouse = { + clear_court_event_participation = yes + } + } +} + +# Invalidated +court.9002 = { + hidden = yes + + immediate = { + # Inform both parties that the duel has invalidated. + scope:root_for_loc = { + send_interface_toast = { + title = court.9002.trigger_failure + left_icon = scope:flirty_knight + } + } + } +} + +# Outcome +court.9003 = { + hidden = yes + + immediate = { + if = { + limit = { + scope:root_for_loc = scope:sc_victor + } + trigger_event = { id = court.9004 } + } + else = { + trigger_event = { id = court.9005 } + } + } +} + +# Won +court.9004 = { + type = character_event + title = court.9004.t + desc = court.9004.desc + theme = education + left_portrait = { + character = scope:flirty_spouse + animation = dismissal + } + right_portrait = { + character = scope:flirty_knight + animation = pain + } + + trigger = { + + } + + immediate = { + + } + + option = { # Leave my spouse alone! + name = court.9004.a + + scope:flirty_knight = { + if = { + limit = { + any_scheme = { + type = courting + scheme_target_character = scope:flirty_spouse + } + } + random_scheme = { + type = courting + limit = { + scheme_target_character = scope:flirty_spouse + } + end_scheme = yes + } + } + if = { + limit = { + has_relation_lover = scope:flirty_spouse + } + remove_relation_lover = scope:flirty_spouse + } + if = { + limit = { + has_relation_potential_lover = scope:flirty_spouse + } + remove_relation_potential_lover = scope:flirty_spouse + } + if = { + limit = { + has_relation_soulmate = scope:flirty_spouse + } + remove_relation_soulmate = scope:flirty_spouse + } + create_inspiration = book_inspiration + } + if = { + limit = { + can_add_hook = { + target = scope:flirty_knight + type = loyalty_hook + } + } + add_hook = { + type = loyalty_hook + target = scope:flirty_knight + } + } + + add_character_modifier = { + modifier = knight_of_love_modifier + years = 20 + } + scope:flirty_spouse = { + add_opinion = { + target = scope:flirty_knight + modifier = disappointed_opinion + opinion = -40 + } + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 40 + } + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = root } + } + set_relation_lover = { reason = lover_dueled_for_love target = root involved_character = scope:flirty_knight } + } + } + + ai_chance = { + base = 100 + } + } +} + +# Beaten +court.9005 = { + type = character_event + title = court.9005.t + desc = court.9005.desc + theme = family + left_portrait = { + character = scope:flirty_spouse + animation = flirtation_left + } + right_portrait = { + character = scope:flirty_knight + animation = flirtation + } + override_background = { reference = study } + + trigger = { + + } + + immediate = { + + } + + option = { + name = court.9005.a + + scope:flirty_knight = { + hidden_effect = { + if = { + limit = { + has_relation_lover = scope:flirty_spouse + } + remove_relation_lover = scope:flirty_spouse + } + if = { + limit = { + has_relation_potential_lover = scope:flirty_spouse + } + remove_relation_potential_lover = scope:flirty_spouse + } + if = { + limit = { + has_relation_soulmate = scope:flirty_spouse + } + remove_relation_soulmate = scope:flirty_spouse + } + } + } + + scope:flirty_spouse = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -40 + } + add_opinion = { + modifier = impressed_opinion + target = scope:flirty_knight + opinion = 40 + } + if = { + limit = { + can_set_relation_soulmate_trigger = { CHARACTER = scope:flirty_knight } + } + set_relation_soulmate = { reason = soulmate_won_love_in_duel copy_reason = lover target = scope:flirty_knight } + } + else_if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:flirty_knight } + } + set_relation_lover = { reason = lover_dueled_for_love target = scope:flirty_knight involved_character = root } + } + } + add_character_modifier = { + modifier = fought_for_courtly_love_modifier + years = 20 + } + add_prestige = major_prestige_loss + if = { + limit = { + scope:flirty_knight = { + government_allows = administrative + } + } + scope:flirty_knight = { + change_influence = medium_influence_gain + } + } + else = { + scope:flirty_knight = { add_prestige = major_prestige_gain } + } + + ai_chance = { + base = 100 + } + } +} + +######################### +# Epicurean Entertainment +# by Alexander Oltner +######################### + +# Your courtiers love your expensive food! +court.9100 = { + type = court_event + title = court.9100.t + desc = court.9100.desc + theme = court + + court_scene = { + button_position_character = scope:food_lover_1 + roles = { + scope:food_lover_1 = { + group = event_group + animation = ecstasy + } + scope:food_lover_2 = { + group = event_group + animation = admiration + } + scope:food_lover_3 = { + group = event_group + animation = personality_greedy + } + } + } + + cooldown = { + years = 10 + } + + trigger = { + is_available = yes + age >= 10 + amenity_level = { target = court_food_quality value >= 3 } + any_courtier_or_guest = { + is_available_ai_adult = yes + has_court_event_flag = no + NOR = { + has_trait = temperate + has_trait = inappetetic + has_relation_rival = root + } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + count >= 3 + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + hidden_effect = { + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + NOR = { + has_trait = temperate + has_trait = inappetetic + has_relation_rival = root + } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + weight = { + base = 1 + modifier = { + add = 100 + loves_food_trigger = yes + } + modifier = { + add = 50 + has_relation_potential_friend = root + } + modifier = { + add = 30 + is_of_major_interest_to_root_trigger = yes + } + } + save_scope_as = food_lover_1 + court_event_character_flag_effect = yes + change_current_weight = 15 + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + NOR = { + has_trait = temperate + has_trait = inappetetic + has_relation_rival = root + } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + this != scope:food_lover_1 + } + weight = { + base = 1 + modifier = { + add = 100 + loves_food_trigger = yes + } + modifier = { + add = 50 + has_relation_potential_friend = root + } + modifier = { + add = 30 + is_of_major_interest_to_root_trigger = yes + } + } + save_scope_as = food_lover_2 + court_event_character_flag_effect = yes + change_current_weight = 15 + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + NOR = { + has_trait = temperate + has_trait = inappetetic + has_relation_rival = root + } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + NOR = { + this = scope:food_lover_1 + this = scope:food_lover_2 + } + } + weight = { + base = 1 + modifier = { + add = 100 + loves_food_trigger = yes + } + modifier = { + add = 50 + has_relation_potential_friend = root + } + modifier = { + add = 30 + is_of_major_interest_to_root_trigger = yes + } + } + save_scope_as = food_lover_3 + court_event_character_flag_effect = yes + change_current_weight = 15 + } + } + } + + option = { # More working, less stuffing faces! + name = court.9100.a + trigger = { + NOT = { government_has_flag = government_is_mandala } + } + add_character_modifier = { + modifier = more_work_less_fun_modifier + years = 15 + desc = feasts_more_expensive_modifier_tt + } + custom_tooltip = feasts_more_expensive_tt + stress_impact = { + gregarious = major_stress_impact_gain + gluttonous = major_stress_impact_gain + lazy = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = gregarious + has_trait = gluttonous + has_trait = lazy + } + } + } + } + + option = { # You all deserve the best! + name = court.9100.b + add_character_modifier = { + modifier = promise_of_feasts_modifier + years = 15 + } + progress_towards_friend_effect = { + REASON = friend_fellow_food_lover + CHARACTER = scope:food_lover_1 + OPINION = default_friend_opinion + } + progress_towards_friend_effect = { + REASON = friend_fellow_food_lover + CHARACTER = scope:food_lover_2 + OPINION = default_friend_opinion + } + progress_towards_friend_effect = { + REASON = friend_fellow_food_lover + CHARACTER = scope:food_lover_3 + OPINION = default_friend_opinion + } + + stress_impact = { + sadistic = massive_stress_impact_gain + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + temperate = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = temperate + has_trait = greedy + has_trait = shy + } + } + } + } + + option = { # Let them enjoy themselves in peace! + name = court.9100.d + + change_current_court_grandeur = medium_court_grandeur_gain + + add_prestige = minor_prestige_gain + + stress_impact = { + gregarious = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = gregarious + has_trait = gluttonous + has_trait = fickle + } + } + } + } + after = { + scope:food_lover_1 = { + clear_court_event_participation = yes + } + scope:food_lover_2 = { + clear_court_event_participation = yes + } + scope:food_lover_3 = { + clear_court_event_participation = yes + } + } +} + + +######################### +# Overt Overindulgence +# by Alexander Oltner +######################### + +# Someone eats all of the food! +court.9300 = { + type = court_event + title = court.9300.t + desc = court.9300.desc + theme = court + + court_scene = { + button_position_character = scope:worried_courtier + roles = { + scope:worried_courtier = { + group = event_group + animation = fear + } + scope:overindulger_target = { + group = event_group + animation = admiration + } + } + } + + cooldown = { + years = 30 + } + + trigger = { + is_available = yes + age >= 10 + amenity_level = { target = court_food_quality value >= 4 } + any_courtier = { + is_available_ai_adult = yes + has_court_event_flag = no + save_temporary_scope_as = another_courtier_check + } + any_courtier_or_guest = { + is_available_ai_adult = yes + has_court_event_flag = no + loves_food_trigger = yes + NOR = { + this = scope:another_courtier_check + is_of_major_interest_to_root_trigger = yes + } + is_of_minor_interest_to_root_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + loves_food_trigger = yes + NOR = { + this = scope:another_courtier_check + is_of_major_interest_to_root_trigger = yes + } + is_of_minor_interest_to_root_trigger = yes + } + hidden_effect = { + change_current_weight = 100 + set_favorite_treat_effect = yes + assign_quirk_effect = yes + if = { + limit = { + NOT = { + has_trait = comfort_eater + } + } + add_trait = comfort_eater + } + } + save_scope_as = overindulger_target + court_event_character_flag_effect = yes + } + random_courtier = { + limit = { + is_available_ai_adult = yes + this != scope:overindulger_target + } + weight = { + base = 1 + modifier = { + add = 100 + is_knight = yes + } + } + save_scope_as = worried_courtier + court_event_character_flag_effect = yes + } + } + + option = { # Stealing the King's treats, are we!? + name = court.9300.a + if = { + limit = { + can_add_hook = { + target = scope:overindulger_target + type = major_threat_hook + } + } + add_hook = { + target = scope:overindulger_target + type = major_threat_hook + } + } + scope:overindulger_target = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_overindulger_jailed + OPINION = 0 + } + pay_short_term_gold = { + target = root + gold = root.tiny_gold_value + } + } + + stress_impact = { + forgiving = massive_stress_impact_gain + compassionate = major_stress_gain + patient = major_stress_impact_gain + humble = medium_stress_impact_gain + calm = medium_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = ai_vengefulness + } + } + } + + option = { # By the gods, man, stop eating! + name = court.9300.b + + duel = { + skill = diplomacy + value = 12 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = court.9300.b.success + send_interface_toast = { + title = court.9300.b.success + left_icon = scope:overindulger_target + add_prestige = medium_prestige_gain + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_gain + } + if = { + limit = { + can_add_hook = { + target = scope:overindulger_target + type = favor_hook + } + } + add_hook = { + target = scope:overindulger_target + type = favor_hook + } + } + scope:overindulger_target = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + progress_towards_friend_effect = { + REASON = friend_saved_me_from_myself + CHARACTER = root + OPINION = 0 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = court.9300.b.failure + send_interface_toast = { + title = court.9300.b.failure + left_icon = scope:overindulger_target + + scope:overindulger_target = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -25 + } + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_overindulger_shamed + OPINION = 0 + } + } + } + } + } + + stress_impact = { + vengeful = massive_stress_impact_gain + paranoid = major_stress_gain + cynical = major_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_compassion <= low_positive_ai_value + } + } + } + + option = { # You're barred from the pantry... + name = court.9300.d + + scope:overindulger_target = { + add_opinion = { + target = root + opinion = -5 + modifier = disappointed_opinion + } + hidden_effect = { + random = { + chance = 50 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_vengefulness >= low_positive_ai_value + } + } + } + after = { + scope:overindulger_target = { + clear_court_event_participation = yes + } + scope:worried_courtier = { + clear_court_event_participation = yes + } + } +} + +######################### +# Pie-based Shenanigans +# by Alexander Oltner +######################### + +scripted_trigger court_9400_court_jester_trigger = { + is_available_ai_adult = yes + has_trait = dwarf +} + +scripted_trigger court_9400_courtier_trigger = { + is_available_ai_adult = yes + NOT = { + is_cannibal_trigger = yes + } +} + +# Court Jester pie event, loosely based on Jeffrey Hudson +court.9400 = { + type = court_event + title = court.9400.t + desc = court.9400.desc + theme = court + + court_scene = { + button_position_character = scope:pie_presenting_courtier + roles = { + scope:pie_presenting_courtier = { + group = event_group + animation = ecstasy + } + scope:court_jester = { + group = event_group + animation = happiness + } + } + } + + cooldown = { + years = 15 + } + + trigger = { + is_available = yes + age >= 10 + amenity_level = { target = court_food_quality value >= 2 } + amenity_level = { target = court_servants value >= 2 } + OR = { + AND = { + any_courtier = { + court_9400_court_jester_trigger = yes + has_court_event_flag = no + save_temporary_scope_as = jester_check + } + any_courtier = { + court_9400_courtier_trigger = yes + has_court_event_flag = no + this != scope:jester_check + } + } + any_vassal = { + court_9400_courtier_trigger = yes + has_court_event_flag = no + any_courtier = { + court_9400_court_jester_trigger = yes + has_court_event_flag = no + } + } + } + + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + save_scope_as = you_target + random_vassal = { + limit = { + court_9400_courtier_trigger = yes + has_court_event_flag = no + any_courtier = { + court_9400_court_jester_trigger = yes + has_court_event_flag = no + } + } + save_scope_as = pie_presenting_courtier + court_event_character_flag_effect = yes + random_courtier = { + limit = { + court_9400_court_jester_trigger = yes + has_court_event_flag = no + } + save_scope_as = court_jester + court_event_character_flag_effect = yes + } + } + if = { + limit = { + NOR = { + exists = scope:pie_presenting_courtier + exists = scope:court_jester + } + } + random_courtier = { + limit = { + court_9400_court_jester_trigger = yes + } + save_scope_as = court_jester + court_event_character_flag_effect = yes + } + random_courtier = { + limit = { + court_9400_courtier_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = pie_presenting_courtier + court_event_character_flag_effect = yes + } + } + scope:pie_presenting_courtier = { + progress_towards_friend_effect = { + REASON = friend_played_trick_on_liege + CHARACTER = scope:court_jester + OPINION = 0 + } + } + } + + option = { # My favorite meal! + name = court.9400.a + + trait = cannibal + + trigger = { + is_cannibal_trigger = yes + } + + if = { + limit = { + any_secret = { + type = secret_cannibal + NOT = { + is_known_by = scope:pie_presenting_courtier + } + } + } + random_secret = { + type = secret_cannibal + limit = { + NOT = { + is_known_by = scope:pie_presenting_courtier + } + } + reveal_to = scope:pie_presenting_courtier + } + } + + scope:pie_presenting_courtier = { + add_opinion = { + target = root + modifier = absolutely_horrified_opinion + } + } + + add_character_modifier = { + modifier = best_meal_of_my_life_modifier + years = 15 + } + + unknown_murder_effect = { + VICTIM = scope:court_jester + MURDERER = root + REASON = death_eaten + } + + stress_impact = { + base = massive_stress_impact_loss + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + option = { # Reward them + name = court.9400.b + + pay_short_term_gold = { + target = scope:court_jester + gold = root.tiny_gold_value + } + if = { + limit = { + scope:court_jester.location = { + this != root.location + } + } + scope:court_jester = { + set_location = root.location + } + } + if = { + limit = { + scope:court_jester = { + NOT = { + is_courtier_of = root + } + } + } + add_courtier = scope:court_jester + } + if = { + limit = { + can_employ_court_position_type = court_jester_court_position + scope:court_jester = { can_be_employed_as = court_jester_court_position } + } + court_position_grant_effect = { POS = court_jester CANDIDATE = scope:court_jester EMPLOYER = root } + } + progress_towards_friend_effect = { + REASON = friend_gave_gold + CHARACTER = scope:court_jester + OPINION = 0 + } + + scope:pie_presenting_courtier = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 25 + } + } + + change_current_court_grandeur = medium_court_grandeur_gain + + stress_impact = { + base = medium_stress_impact_loss + paranoid = massive_stress_impact_gain + greedy = massive_stress_impact_gain + arrogant = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_compassion <= low_positive_ai_value + } + modifier = { + factor = 0.1 + ai_greed >= low_positive_ai_value + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + option = { # Imprison them! + name = court.9400.c + trigger = { + has_trait = paranoid + } + + rightfully_imprison_character_effect = { + TARGET = scope:court_jester + IMPRISONER = root + } + + if = { + limit = { + is_ai = yes + } + execute_prisoner_effect = { + VICTIM = scope:court_jester + EXECUTIONER = root + } + } + else = { + scope:court_jester = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_jester_jailed + OPINION = 0 + } + } + } + + add_character_modifier = { + modifier = suspicious_against_pies_modifier + years = 15 + } + + scope:pie_presenting_courtier = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -25 + } + } + + stress_impact = { + base = massive_stress_impact_loss + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 200 + } + } + + option = { # Har har! Fantastic! + name = court.9400.d + + scope:pie_presenting_courtier = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + + stress_impact = { + base = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + after = { + scope:pie_presenting_courtier = { + clear_court_event_participation = yes + } + scope:court_jester = { + clear_court_event_participation = yes + } + } +} + +######################### +# A Little Language +# by Alexander Oltner +######################### + +scripted_trigger appropriate_tutor_trigger = { + is_available_ai_adult = yes + OR = { + AND = { + learning >= 10 + OR = { + has_court_position = court_tutor_court_position + is_eunuch_trigger = yes + } + } + learning >= 20 + } +} + +scripted_trigger appropriate_child_trigger = { + age <= 20 + is_incapable = no + is_imprisoned = no + is_alive = yes + is_ruler = no + is_courtier_of = root + culture = root.culture + num_of_known_languages < 2 +} + +scripted_trigger has_a_good_language_trigger = { + culture = { + NOT = { + has_same_culture_language = root.culture + } + } +} + +# Someone offers to teach your child a language +court.9500 = { + type = court_event + title = court.9500.t + desc = court.9500.desc + theme = court + + cooldown = { + years = 10 + } + + court_scene = { + button_position_character = scope:child_to_learn_language + roles = { + scope:child_to_learn_language = { + group = event_group + animation = dismissal + } + } + roles = { + scope:teacher_target = { + group = event_group + animation = personality_rational + } + } + } + + trigger = { + is_landed = yes + is_available_adult = yes + any_child = { + appropriate_child_trigger = yes + has_court_event_flag = no + save_temporary_scope_as = temp_child_to_learn_lang + } + OR = { # There must be a useful language to learn + any_sub_realm_county = { + has_a_good_language_trigger = yes + } + any_vassal = { + has_a_good_language_trigger = yes + } + any_liege_or_above = { + has_a_good_language_trigger = yes + } + AND = { + exists = faith.religious_head + faith.religious_head = { + has_a_good_language_trigger = yes + } + } + } + any_courtier_or_guest = { + appropriate_tutor_trigger = yes + has_court_event_flag = no + this != scope:temp_child_to_learn_lang + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_child = { # Pick a good child + limit = { + appropriate_child_trigger = yes + } + weight = { # Prefer primary heir + base = 1 + modifier = { + add = 100 + this = root.player_heir + } + } + save_scope_as = child_to_learn_language + court_event_character_flag_effect = yes + } + + every_sub_realm_county = { # Pick a culture to take the language from + limit = { + has_a_good_language_trigger = yes + } + culture = { + if = { + limit = { + NOT = { + is_in_list = potential_language_cultures + } + } + } + add_to_list = potential_language_cultures + } + } + every_vassal = { + limit = { + has_a_good_language_trigger = yes + } + culture = { + if = { + limit = { + NOT = { + is_in_list = potential_language_cultures + } + } + } + add_to_list = potential_language_cultures + } + } + every_liege_or_above = { + limit = { + has_a_good_language_trigger = yes + } + culture = { + if = { + limit = { + NOT = { + is_in_list = potential_language_cultures + } + } + } + add_to_list = potential_language_cultures + } + } + if = { + limit = { + exists = faith.religious_head + faith.religious_head = { + has_a_good_language_trigger = yes + } + } + faith.religious_head.culture = { + if = { + limit = { + NOT = { + is_in_list = potential_language_cultures + } + } + } + add_to_list = potential_language_cultures + } + } + + random_in_list = { # Pick the best culture language + list = potential_language_cultures + weight = { + base = 1 + modifier = { # Vassal languages are objectively best to learn + add = 10 + save_temporary_scope_as = culture_check + root = { + any_vassal = { + culture = scope:culture_check + } + } + } + } + save_scope_as = culture_language_to_learn + } + + random_courtier_or_guest = { + limit = { + appropriate_tutor_trigger = yes + this != scope:child_to_learn_language + } + weight = { + base = 1 + modifier = { + add = 100 + has_court_position = court_tutor_court_position + } + modifier = { + add = 50 + is_eunuch_trigger = yes + } + } + hidden_effect = { + assign_quirk_effect = yes + if = { + limit = { + NOT = { + knows_language_of_culture = scope:culture_language_to_learn + } + } + learn_language_of_culture = scope:culture_language_to_learn + } + } + save_scope_as = teacher_target + court_event_character_flag_effect = yes + } + } + + option = { # Pay more than needed; your child must learn! + name = court.9500.a + + pay_short_term_gold = { + target = scope:teacher_target + gold = root.medium_gold_value + } + + scope:child_to_learn_language = { + learn_language_of_culture = scope:culture_language_to_learn + } + + scope:teacher_target = { + add_opinion = { + target = root + opinion = 10 + modifier = grateful_opinion + } + } + + if = { + limit = { + scope:teacher_target = { + NOT = { has_court_position = court_tutor_court_position } + } + can_appoint_char_to_court_position = { + CHAR = scope:teacher_target + COURT_POS = court_tutor_court_position + } + } + court_position_grant_effect = { POS = court_tutor CANDIDATE = scope:teacher_target EMPLOYER = root } + } + + stress_impact = { + greedy = massive_stress_impact_gain + paranoid = major_stress_gain + arrogant = major_stress_impact_gain + fickle = medium_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_greed >= low_positive_ai_value + } + } + } + + option = { # Pay what they ask, and hope your child manages + name = court.9500.b + + pay_short_term_gold = { + target = scope:teacher_target + gold = root.tiny_gold_value + } + + scope:child_to_learn_language = { + duel = { + skill = learning + value = 6 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + + desc = court.9500.b.success + root = { + send_interface_toast = { + title = court.9500.b.success + left_icon = scope:child_to_learn_language + right_icon = scope:teacher_target + + scope:child_to_learn_language = { + learn_language_of_culture = scope:culture_language_to_learn + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = court.9500.b.failure + root = { + send_interface_toast = { + title = court.9500.b.failure + left_icon = scope:child_to_learn_language + right_icon = scope:teacher_target + + scope:child_to_learn_language = { + add_stress = major_stress_gain + } + } + } + } + } + } + + stress_impact = { + generous = major_stress_impact_gain + patient = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_greed >= low_positive_ai_value + } + } + } + + option = { # Deny + name = court.9500.c + + scope:teacher_target = { + add_opinion = { + target = root + opinion = -5 + modifier = disappointed_opinion + } + } + + stress_impact = { + diligent = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + after = { + scope:teacher_target = { + clear_court_event_participation = yes + } + scope:child_to_learn_language = { + clear_court_event_participation = yes + } + } +} diff --git a/N3OW/events/court_events/court_events_general_1.txt b/N3OW/events/court_events/court_events_general_1.txt new file mode 100644 index 00000000..6391c4fa --- /dev/null +++ b/N3OW/events/court_events/court_events_general_1.txt @@ -0,0 +1,1032 @@ +namespace = court_events + +################################################## +# # RANGES +#1000 - 1100 Jason Cantalini +# +################################################## + +##################################### +# The Very Grandest of All # +# by Jason Cantalini # +# 1000-1001 # +##################################### + +# You reach #1 in global court grandeur +court_events.1000 = { + type = court_event + title = court_events.1000.t + desc = court_events.1000.desc + + theme = court + court_scene = { + button_position_character = scope:guest + roles = { + scope:guest = { + group = event_group + animation = throne_room_bow_1 + } + scope:guest_2 = { + group = event_group + animation = throne_room_curtsey_1 + } + root = { + group = event_group + animation = war_over_win + } + } + } + + cooldown = { years = 10 } + + trigger = { + #just to acknowledge players + is_ai = no + is_available = yes + #Is court grandeur at all good? + has_royal_court = yes + court_grandeur_current >= 30 + #Check your court grandeur is at least 10 higher than everyone else's + NOT = { + any_character_with_royal_court = { + court_grandeur_current > root.court_grandeur_current_minus_ten_value + this != root + } + } + } + + immediate = { + #get our first fawning traveler + #grab a guest with traveler or pilgrim trait + if = { + limit = { + any_pool_guest = { + is_available_ai_adult = yes + age >= 25 + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + } + } + random_pool_guest = { + limit = { + is_available_ai_adult = yes + age >= 25 + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + } + save_scope_as = guest + } + } + #grab any pool character + else_if = { + limit = { + any_pool_character = { + province = root.capital_province + age >= 25 + is_available_ai_adult = yes + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + } + } + random_pool_character = { + province = root.capital_province + limit = { + age >= 25 + is_available_ai_adult = yes + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + } + save_scope_as = guest + } + } + #create character + else = { + #will use to grab interesting cultures for travellers + save_traveler_culture_effect = yes + create_character = { + template = traveler_character + location = root.capital_province + random_culture = { + scope:traveler_culture = { + trigger = { + exists = scope:traveler_culture + } + } + } + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + save_scope_as = guest + } + scope:guest = { add_character_flag = created_character } + } + #get our second fawning traveler + #grab a guest with traveler or pilgrim trait + if = { + limit = { + any_pool_guest = { + is_available_ai_adult = yes + age >= 25 + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + this != scope:guest + } + } + random_pool_guest = { + limit = { + is_available_ai_adult = yes + age >= 25 + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + this != scope:guest + } + save_scope_as = guest_2 + } + } + #grab any pool character + else_if = { + limit = { + any_pool_character = { + province = root.capital_province + age >= 25 + is_available_ai_adult = yes + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + this != scope:guest + } + } + random_pool_character = { + province = root.capital_province + limit = { + age >= 25 + is_available_ai_adult = yes + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + this != scope:guest + } + save_scope_as = guest_2 + } + } + #create character + else = { + create_character = { + template = traveler_character + location = root.capital_province + random_culture = { + scope:traveler_culture_2 = { + trigger = { + exists = scope:traveler_culture_2 + } + } + } + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + save_scope_as = guest_2 + } + scope:guest_2 = { add_character_flag = created_character } + } + #grab your high almoner if you have one + court_position:high_almoner_court_position ?= { save_scope_as = high_almoner } + hidden_effect = { + if = { + limit = { + scope:guest = { + NOR = { + has_relation_rival = scope:guest_2 + has_relation_nemesis = scope:guest_2 + has_character_flag = created_character + } + } + scope:guest_2 = { + NOT = { + has_character_flag = created_character + } + } + } + scope:guest = { + set_relation_friend = { + reason = friend_random_fallback + target = scope:guest_2 + } + } + } + else = { + scope:guest = { + set_relation_best_friend = { + reason = friend_random_fallback + target = scope:guest_2 + } + } + } + if = { + limit = { + scope:guest = { has_character_flag = created_character } + scope:guest.culture = { + exists = culture_head + culture_head.faith != scope:guest.faith + } + } + scope:guest = { set_character_faith = culture.culture_head.faith } + } + if = { + limit = { + scope:guest_2 = { has_character_flag = created_character } + scope:guest_2.culture = { + exists = culture_head + culture_head.faith != scope:guest_2.faith + } + } + scope:guest_2 = { set_character_faith = culture.culture_head.faith } + } + if = { + limit = { + NOT = { + scope:guest = { + knows_language_of_culture = scope:guest_2.culture + } + } + scope:guest = { has_character_flag = created_character } + } + scope:guest = { learn_language_of_culture = scope:guest_2.culture } + } + if = { + limit = { + NOT = { + scope:guest_2 = { + knows_language_of_culture = scope:guest.culture + } + } + scope:guest_2 = { has_character_flag = created_character } + } + scope:guest_2 = { learn_language_of_culture = scope:guest.culture } + } + if = { + limit = { + scope:guest = { has_character_flag = created_character } + } + scope:guest = { + add_opinion = { + target = root + modifier = reputation_opinion + opinion = 25 + } + } + } + if = { + limit = { + scope:guest_2 = { has_character_flag = created_character } + } + scope:guest_2 = { + add_opinion = { + target = root + modifier = reputation_opinion + opinion = 25 + } + } + } + } + #get second place ruler so we can dunk on them in loc + random_character_with_royal_court = { + limit = { + NOR = { + any_character_with_royal_court = { + count >= 2 + court_grandeur_current > prev.court_grandeur_current + } + this = root + } + } + save_scope_as = second_court + } + } + + # Option A: self-effacingly use your high almoner to prove you are both grand and humble + option = { + name = court_events.1000.a + flavor = court_events.1000.a.flavor + trigger = { + exists = scope:high_almoner + scope:high_almoner = { + aptitude = { + court_position = high_almoner_court_position + value >= 2 + } + } + } + reason = high_almoner + add_piety = medium_piety_gain + capital_county = { + change_development_level = 1 + } + remove_short_term_gold = medium_gold_value + stress_impact = { + generous = miniscule_stress_impact_loss + arrogant = major_stress_impact_gain + greedy = major_stress_impact_gain + ambitious = minor_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 1 + } + } + + #Option B: I'm the greatest of kings, yes. Remain here and tell everyone + option = { + name = court_events.1000.b + flavor = court_events.1000.b.flavor + change_current_court_grandeur = 5 + add_courtier = scope:guest + add_courtier = scope:guest_2 + + random_list = { + 10 = { + give_nickname = nick_the_glorious + } + 10 = { + give_nickname = nick_the_magnificent + } + 10 = { + give_nickname = nick_the_gracious + } + 10 = { + give_nickname = nick_the_stupor_mundi + } + 20 = {} + } + + + custom_tooltip = traveling_friends_court_position_aptitude + + scope:guest = { + add_character_flag = travelling_friend + } + scope:guest_2 = { + add_character_flag = travelling_friend + } + stress_impact = { + arrogant = minor_stress_impact_loss + ambitious = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + humble = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + } + } + + #Option C: Let all speak of my grandness! Go, spread my legend! + option = { + name = court_events.1000.c + custom_tooltip = visiting_gives_opinion + add_legitimacy = minor_legitimacy_gain + change_current_court_grandeur = 5 + scope:guest = { + add_character_flag = spreading_word_of_grandeur + set_variable = { + name = greatest_court_holder + value = root + } + } + scope:guest_2 = { + add_character_flag = spreading_word_of_grandeur + set_variable = { + name = greatest_court_holder + value = root + } + } + stress_impact = { + arrogant = minor_stress_impact_loss + ambitious = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + } + } + + + after = { + scope:guest = { + clear_court_event_participation = yes + remove_character_flag ?= created_character + } + scope:guest_2 = { + clear_court_event_participation = yes + remove_character_flag ?= created_character + } + } +} + +#ruler hosting travellers gains opinion of #1 grand emperor +court_events.1001 = { + hidden = yes + trigger = { + scope:guest = { + has_character_flag = spreading_word_of_grandeur + var:greatest_court_holder = { + is_alive = yes + has_royal_court = yes + } + } + } + immediate = { + scope:guest = { + var:greatest_court_holder = { + reverse_add_opinion = { + modifier = reputation_opinion + target = host + opinion = 20 + } + } + } + } +} + +scripted_trigger court_events_1010_players_nobody_trigger = { + is_healthy = yes + is_available_ai_adult = yes + NOR = { + is_close_family_of = liege + has_relation_lover = liege + has_relation_soulmate = liege + has_relation_friend = liege + has_relation_best_friend = liege + has_relation_guardian = liege + has_relation_bully = liege + has_relation_victim = liege + is_consort_of = root + is_hostage_of = root + has_trait = loyal + ep3_story_cycle_admin_eunuch_involved_character = yes + } + ai_honor <= low_positive_ai_value + has_any_court_position = no + is_councillor = no + is_acclaimed = no + opinion = { + target = liege + value <= -30 + } +} +scripted_trigger court_events_1010_ais_courtier_trigger = { + is_healthy = yes + is_available_ai_adult = yes + NOR = { + is_heir_of = liege + has_relation_lover = liege + has_relation_soulmate = liege + has_relation_friend = liege + has_relation_best_friend = liege + has_relation_guardian = liege + has_relation_bully = liege + has_relation_victim = liege + is_consort_of = root + is_hostage_of = root + has_trait = loyal + ep3_story_cycle_admin_eunuch_involved_character = yes + } + ai_honor <= low_positive_ai_value + is_acclaimed = no + opinion = { + target = liege + value <= -20 + } +} + +##################################### +# Maybe I should steal servants? # +# by Jason Cantalini # +# 01010 # +##################################### + +# You meet with some disgruntled functionaries who work for a great ruler +court_events.1010 = { + type = court_event + title = court_events.1010.t + desc = court_events.1010.desc + + theme = court + court_scene = { + button_position_character = scope:defector + roles = { + scope:defector = { + group = event_group + animation = obsequious_bow + } + root = { + group = event_group + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + } + } + lower_right_portrait = scope:grander_ruler + lower_left_portrait = scope:court_chaplain + + cooldown = { years = 10 } + + trigger = { + + has_royal_court = yes + #Is court grandeur at all good? + court_grandeur_current >= 10 + is_available = yes + #Check someone's court grandeur is at least 10 higher than yours + any_character_with_royal_court = { + court_grandeur_current >= root.court_grandeur_current_plus_ten_value + this != root + in_diplomatic_range = root + NOR = { + is_at_war_with = root + has_character_flag = had_court_events_1000 + } + #Get a shitty character from a player or good one from ai + OR = { + AND = { + is_ai = no + any_courtier = { + court_events_1010_players_nobody_trigger = yes + } + } + AND = { + is_ai = yes + any_courtier = { + court_events_1010_ais_courtier_trigger = yes + } + } + } + } + exists = cp:councillor_court_chaplain + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 0.33 + #It will be annoying if AI steal lots of courtiers + #And foreigners being thrown around might look weird + is_ai = yes + } + } + + immediate = { + #Save the court owner being targeted + random_character_with_royal_court = { + limit = { + court_grandeur_current >= root.court_grandeur_current_plus_ten_value + this != root + in_diplomatic_range = root + NOR = { + is_at_war_with = root + has_character_flag = had_court_events_1000 + } + #Get a shitty character from a player or good one from ai + OR = { + AND = { + is_ai = no + any_courtier = { + court_events_1010_players_nobody_trigger = yes + } + } + AND = { + is_ai = yes + any_courtier = { + court_events_1010_ais_courtier_trigger = yes + } + } + } + } + save_scope_as = grander_ruler + } + scope:grander_ruler = { + if = { + limit = { + is_ai = no + any_courtier = { + court_events_1010_players_nobody_trigger = yes + opinion = { + target = scope:grander_ruler + value <= -75 + } + } + } + random_courtier = { + limit = { + court_events_1010_players_nobody_trigger = yes + opinion = { + target = scope:grander_ruler + value <= -75 + } + } + save_scope_as = defector + } + } + else_if = { + limit = { + is_ai = yes + any_courtier = { + court_events_1010_ais_courtier_trigger = yes + } + opinion = { + target = scope:grander_ruler + value <= -75 + } + } + random_courtier = { + limit = { + court_events_1010_ais_courtier_trigger = yes + opinion = { + target = scope:grander_ruler + value <= -75 + } + } + save_scope_as = defector + } + } + else_if = { + limit = { + is_ai = no + } + random_courtier = { + limit = { + court_events_1010_players_nobody_trigger = yes + } + save_scope_as = defector + } + } + else = { + random_courtier = { + limit = { + court_events_1010_ais_courtier_trigger = yes + } + save_scope_as = defector + } + } + } + #This will be a relevant fella + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + } + + #grab your antiquarian if you have one + court_position:antiquarian_court_position ?= { save_scope_as = antiquarian } + save_scope_as = root_scope + #Save artifact to potentially steal + if = { + limit = { + scope:grander_ruler = { + any_character_artifact = { + ep1_artifact_is_court_artifact_trigger = yes + NOR = { + has_variable = banner_house + has_variable = banner_dynasty + } + } + } + } + scope:grander_ruler = { + random_character_artifact = { + limit = { + ep1_artifact_is_court_artifact_trigger = yes + NOR = { + has_variable = banner_house + has_variable = banner_dynasty + } + } + save_scope_as = coveted_artifact + } + } + } + scope:grander_ruler = { + add_character_flag = { + flag = had_court_events_1000 + years = 5 + } + } + } + + # Option A: just courtiers? What about stealing a fine artifact too...? + option = { + name = court_events.1010.a + flavor = court_events.1010.a.flavor + trigger = { + exists = scope:antiquarian + exists = scope:coveted_artifact + scope:antiquarian = { + aptitude = { + court_position = antiquarian_court_position + value >= 3 + } + } + scope:grander_ruler = { is_ai = yes } + } + reason = antiquarian + scope:defector = { + duel = { + skill = intrigue + target = scope:grander_ruler + 70 = { # Your new courtier steals the artifact + desc = court_events.1010.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -69 + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = court_events.1010.a.success + left_icon = scope:defector + right_icon = scope:grander_ruler + scope:coveted_artifact = { + set_owner = { + target = root + history = { + location = root.capital_province + actor = scope:grander_ruler + recipient = root + type = stolen + } + } + } + set_relation_rival = { + target = scope:grander_ruler + reason = rival_stole_artifact + } + change_current_court_grandeur = 25 + scope:grander_ruler = { change_current_court_grandeur = -15 } + add_courtier = scope:defector + } + } + } + 30 = { # The fella frigs up + desc = court_events.1010.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = court_events.1010.a.failure + left_icon = scope:defector + right_icon = scope:grander_ruler + + scope:defector = { + death = { + death_reason = death_execution + killer = scope:grander_ruler + } + } + } + } + } + } + } + add_prestige = medium_prestige_loss + stress_impact = { + greedy = minor_stress_impact_loss + eccentric = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_loss + honest = major_stress_impact_gain + just = major_stress_impact_gain + generous = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + content = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + modifier = { + add = -75 + OR = { + has_trait = compassionate + has_trait = content + has_trait = trusting + } + } + modifier = { + factor = 0 + OR = { + prestige <= major_prestige_value + has_trait = honest + has_trait = just + has_trait = generous + } + } + } + } + + #Option B: Come. Serve with honor here + option = { + name = court_events.1010.b + + + if = { + limit = { + scope:grander_ruler = { is_ai = no } + } + show_as_tooltip = { + change_current_court_grandeur = 20 + scope:grander_ruler = { change_current_court_grandeur = -10 } + add_courtier = scope:defector + } + + scope:grander_ruler = { + trigger_event = court_events.1011 + } + } + else = { + change_current_court_grandeur = 20 + scope:grander_ruler = { change_current_court_grandeur = -10 } + add_courtier = scope:defector + } + reverse_add_opinion = { + target = scope:defector + modifier = loyalty_opinion + opinion = 20 + } + add_prestige = major_prestige_loss + + + stress_impact = { + trusting = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = -1 + } + modifier = { + add = -75 + OR = { + has_trait = humble + has_trait = content + } + } + modifier = { + factor = 0 + OR = { + prestige <= major_prestige_value + has_trait = honest + has_trait = just + has_trait = paranoid + } + } + } + } + + #If I need functionaries, why not some priests? + option = { + name = court_events.1010.c + flavor = court_events.1010.c.flavor + + change_current_court_grandeur = 10 + scope:court_chaplain = { + add_learning_skill = 2 + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + add_piety = medium_piety_loss + + stress_impact = { + cynical = major_stress_impact_gain + arrogant = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = 0.5 + } + modifier = { + add = -75 + OR = { + has_trait = arrogant + has_trait = gregarious + } + } + modifier = { + factor = 0 + OR = { + piety <= medium_piety_value + has_trait = cynical + } + } + } + } + #Disloyal people? Go serve, and feel shame + option = { + name = court_events.1010.d + + every_vassal = { + vassal_stance = parochial + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 10 + target = root + } + } + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:grander_ruler + opinion = 20 + } + + add_prestige = minor_prestige_gain + + stress_impact = { + arbitrary = minor_stress_impact_gain + deceitful = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + ai_honor = 1 + } + modifier = { + add = -75 + OR = { + has_trait = arbitrary + has_trait = generous + } + } + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = deceitful + } + } + } + } +} + +court_events.1011 = { + type = letter_event + opening = { + desc = court_events.1011.opening + } + desc = court_events.1011.desc + sender = scope:defector + + immediate = { + change_current_court_grandeur = -10 + scope:root_scope = { + change_current_court_grandeur = 20 + add_courtier = scope:defector + } + } + + option = { + name = court_events.1011.a + } +} diff --git a/N3OW/events/decisions_events/east_europe_events.txt b/N3OW/events/decisions_events/east_europe_events.txt new file mode 100644 index 00000000..db76d256 --- /dev/null +++ b/N3OW/events/decisions_events/east_europe_events.txt @@ -0,0 +1,2998 @@ +namespace = east_europe + +#decision_unite_the_western_slavs, by Mathilda Bjarnehed +# 0001 - I united the western slavs +# 0002 - Someone else united the western slavs + +#decision_unite_the_southern_slavs, by Mathilda Bjarnehed +# 0005 - I united the southern slavs +# 0006- Someone united the southern slavs + +#decision_unite_the_slavs, by Mathilda Bjarnehed +# 0010 - I united the southern slavs +# 0011 - Someone united the southern slavs + +#decision_defenders_of_highgod, by Mathilda Bjarnehed +# 0015 - I am the Defender of Defensive Pagan Highgod (pick holy site) +# 0016 - I am the Defender of Defensive Pagan Highgod (actual event) +# 0017 - someone is the Defender of Defensive Pagan Highgod + +#decision_promote_hungarian_settlement, by Flavio Verna +# 0030 +# 0031 + +# decision_revive_magyar_paganism, by Flavio Verna +# 0032 +# 0033 +# 0034 + + +#I united the western slavs +east_europe.0001 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0001.t + desc = east_europe.0001.desc + theme = realm + left_portrait = { + character = scope:western_slav_uniter + animation = personality_honorable + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + unite_the_western_slavs_decision_effects = yes + legend_seed_great_deed_title_effect = { + TITLE = root.primary_title + } + } + + option = { + name = east_europe.0001.a + + give_nickname = nick_the_wend + } +} + +#Someone united the western slavs +east_europe.0002 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0001.t + desc = east_europe.0002.desc + theme = realm + left_portrait = { + character = scope:western_slav_uniter + animation = personality_honorable + } + + option = { + name = name_i_see + } +} + +#I united the southern slavs +east_europe.0005 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0005.t + desc = east_europe.0005.desc + theme = realm + left_portrait = { + character = scope:southern_slav_uniter + animation = personality_honorable + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + unite_the_southern_slavs_decision_effects = yes + legend_seed_great_deed_title_effect = { + TITLE = root.primary_title + } + } + + option = { + name = east_europe.0001.a + + give_nickname = nick_the_crowned + } +} + +#Someone united the southern slavs +east_europe.0006 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0005.t + desc = east_europe.0006.desc + theme = realm + left_portrait = { + character = scope:southern_slav_uniter + animation = personality_honorable + } + + option = { + name = name_i_see + } +} + +#I united all the slavs +east_europe.0010 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0010.t + desc = east_europe.0010.desc + theme = realm + left_portrait = { + character = scope:slav_uniter + animation = personality_honorable + } + + immediate = { + unite_the_slavs_decision_effects = yes + play_music_cue = "mx_cue_epic_sacral_moment" + } + + option = { + name = east_europe.0010.a + + if = { + limit = { is_female = yes } + give_nickname = nick_the_polyanitsa + } + else = { + give_nickname = nick_the_bogatyr + } + } +} + + +#someone united all the slavs +east_europe.0011 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0010.t + desc = east_europe.0011.desc + theme = realm + left_portrait = { + character = scope:slav_uniter + animation = personality_honorable + } + + option = { + name = name_i_see + } +} + +#I am the Defender of Defensive Pagan Highgod (pick holy site) +east_europe.0015 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0015.t + desc = east_europe.0015.desc + theme = faith + left_portrait = { + character = root + animation = personality_zealous + } + + immediate = { + #Music cue in follow-up event. + faith = { + every_holy_site = { + limit = { + county.holder = root + title_province = { has_special_building = no } + # barony = { } + } + add_to_list = holy_sites + } + } + + save_target_list_as_separate_scopes_effect = { TARGET_LIST = holy_sites } + } + + option = { + name = east_europe.0015.a + custom_tooltip = east_europe.0015.tooltip + scope:target_list_member_a = { + save_scope_as = holy_site + } + } + + option = { + name = east_europe.0015.b + custom_tooltip = east_europe.0015.tooltip + scope:target_list_member_b = { + save_scope_as = holy_site + } + } + + option = { + trigger = { exists = scope:target_list_member_c } + name = east_europe.0015.c + custom_tooltip = east_europe.0015.tooltip + scope:target_list_member_c = { + save_scope_as = holy_site + } + } + + option = { + trigger = { exists = scope:target_list_member_d } + name = east_europe.0015.d + custom_tooltip = east_europe.0015.tooltip + scope:target_list_member_d = { + save_scope_as = holy_site + } + } + + after = { + trigger_event = east_europe.0016 + } +} + +#I am the Defender of Defensive Pagan Highgod (actual event) +east_europe.0016 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0015.t + desc = east_europe.0016.desc + theme = faith + left_portrait = { + character = scope:defender_of_highgod + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + defenders_of_highgod_decision_effects = yes + } + + option = { + name = east_europe.0016.a + + give_nickname = nick_the_defender_of_highgod + } + + after = { + every_player = { + limit = { + this != scope:defender_of_highgod + is_within_diplo_range = { CHARACTER = root } + } + trigger_event = east_europe.0017 + } + } +} + + +#someone is the Defender of Defensive Pagan Highgod +east_europe.0017 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0015.t + desc = east_europe.0017.desc + theme = faith + left_portrait = { + character = scope:defender_of_highgod + animation = personality_zealous + } + + immediate = { + #If the character shares the hero's faith, _then_ cue the music. + if = { + limit = { faith = scope:defender_of_highgod.faith } + play_music_cue = "mx_cue_sacredrite" + } + } + + option = { + name = { + trigger = { faith = scope:defender_of_highgod.faith } + text = east_europe.0016.a + } + name = { + trigger = { faith != scope:defender_of_highgod.faith } + text = name_i_see + } + } +} + + +#Hungarian Resettlement decision + +east_europe.0030 = { # by Flavio Verna + type = character_event + title = east_europe.0030.t + desc = east_europe.0030.desc + theme = faith + left_portrait = { + character = scope:scoped_ruler + animation = personality_rational + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + save_scope_as = scoped_ruler + promote_hungarian_settlement_decision_scripted_effect = yes + } + + option = { + name = east_europe.0030.a + every_player = { + limit = { + this != root + capital_province = { + geographical_region = world_europe_east + } + } + trigger_event = east_europe.0031 + } + } +} + +east_europe.0031 = { # by Flavio Verna + type = character_event + title = east_europe.0031.t + desc = { + first_valid = { + # Hungarian Vassal reaction. + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = heritage_magyar } + target_is_liege_or_above = scope:scoped_ruler + } + desc = east_europe.0031.desc.vassals + } + desc = east_europe.0031.desc.others + } + } + theme = faith + left_portrait = { + character = scope:scoped_ruler + animation = personality_rational + } + + option = { + name = { + trigger = { + culture = { has_cultural_pillar = heritage_magyar } + target_is_liege_or_above = scope:scoped_ruler + } + text = east_europe.0031.a + } + name = { + trigger = { + NAND = { + culture = { has_cultural_pillar = heritage_magyar } + target_is_liege_or_above = scope:scoped_ruler + } + } + text = east_europe.0031.b + } + } +} + +################################################## +# Reviving Magyarism +# by Flavio Verna & Ewan Cowhig Croft +# 0032-0034 +################################################## + +scripted_effect revive_magyar_paganism_notify_players_effect = { + every_player = { + limit = { + this != root + capital_province = { + geographical_region = world_europe_east + } + } + trigger_event = east_europe.0034 + } +} + +east_europe.0032 = { + type = character_event + title = east_europe.0032.t + desc = east_europe.0032.desc + theme = faith + left_portrait = { + character = scope:scoped_ruler + animation = personality_zealous + } + override_background = { reference = throne_room } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + save_scope_as = scoped_ruler + faith = { save_scope_as = old_faith } + revive_magyar_paganism_decision_scripted_effect = yes + legend_seed_great_deed_faith_effect = { + ANTAGONIST = scope:old_faith.religious_head + OLD_FAITH = scope:old_faith + } + } + + #The Old Ways need no adjustment. + option = { + name = east_europe.0032.a + #Get a nice reward for your adherence to the true faith. + add_piety_level = 1 + #Sort notification copy for players. + save_scope_value_as = { + name = hungarian_return + value = flag:vanilla + } + revive_magyar_paganism_notify_players_effect = yes + } + #Syncretism: perhaps we don't leave behind *all* the new teachings... + option = { + name = east_europe.0032.b + #Requires you to have been in a religion that actually has a syncretic tenet available. + trigger = { + scope:old_faith.religion = { + OR = { + this = religion:christianity_religion + this = religion:islam_religion + this = religion:judaism_religion + is_in_family = rf_eastern + } + } + } + #Reasonable carrot for your efforts. + add_piety_experience = major_piety_value + #Christian/Islamic/Jewish/Eastern syncretism replaces astrology. + if = { + limit = { OR = { scope:old_faith.religion = religion:eastern_orthodox_religion scope:old_faith.religion = religion:catholic_religion scope:old_faith.religion = religion:protestant_religion } } + faith:magyar_pagan = { + remove_doctrine = tenet_astrology + add_doctrine = tenet_christian_syncretism + } + } + else_if = { + limit = { scope:old_faith.religion = religion:islam_religion } + faith:magyar_pagan = { + remove_doctrine = tenet_astrology + add_doctrine = tenet_islamic_syncretism + } + } + else_if = { + limit = { scope:old_faith.religion = religion:judaism_religion } + faith:magyar_pagan = { + remove_doctrine = tenet_astrology + add_doctrine = tenet_jewish_syncretism + } + } + else = { + faith:magyar_pagan = { + remove_doctrine = tenet_astrology + add_doctrine = tenet_eastern_syncretism + } + } + #Sort notification copy for players. + save_scope_value_as = { + name = hungarian_return + value = flag:syncretic + } + revive_magyar_paganism_notify_players_effect = yes + } + #Human Sacrifice: we must assert our differences with blood and skulls! + option = { + name = east_europe.0032.c + #Reasonable carrot for your efforts. + add_piety_experience = major_piety_value + #Human sacrifice replaces ancestor worship- + faith:magyar_pagan = { + remove_doctrine = tenet_ancestor_worship + add_doctrine = tenet_human_sacrifice + } + #Sort notification copy for players. + save_scope_value_as = { + name = hungarian_return + value = flag:bloodthirsty + } + revive_magyar_paganism_notify_players_effect = yes + } + #Adaptive: we should always remain protean. + option = { + name = east_europe.0032.d + #Reasonable carrot for your efforts. + add_piety_experience = major_piety_value + #Adaptive replaces auspicious birthright. + faith:magyar_pagan = { + remove_doctrine = tenet_mystical_birthright + add_doctrine = tenet_adaptive + } + #Sort notification copy for players. + save_scope_value_as = { + name = hungarian_return + value = flag:adaptive + } + revive_magyar_paganism_notify_players_effect = yes + } +} + +east_europe.0034 = { + type = character_event + title = east_europe.0034.t + desc = { + first_valid = { + triggered_desc = { + trigger = { top_liege = root } + desc = east_europe.0034.desc.vassals + } + desc = east_europe.0034.desc.outsiders + } + desc = east_europe.0034.desc.intro + triggered_desc = { + trigger = { scope:hungarian_return = flag:vanilla } + desc = east_europe.0034.desc.conversion_vanilla + } + triggered_desc = { + trigger = { scope:hungarian_return = flag:syncretic } + desc = east_europe.0034.desc.conversion_syncretic + } + triggered_desc = { + trigger = { scope:hungarian_return = flag:bloodthirsty } + desc = east_europe.0034.desc.conversion_bloodthirsty + } + triggered_desc = { + trigger = { scope:hungarian_return = flag:adaptive } + desc = east_europe.0034.desc_conversion_adaptive + } + } + theme = faith + left_portrait = scope:scoped_ruler + override_background = { reference = wilderness_forest_pine } + + #Magyar_pagans are happy about this unexpected turn of events! + option = { + name = east_europe.0034.a + trigger = { religion = religion:magyar_religion } + add_stress = minor_stress_loss + } + + #Vassals who do not follow the faith may decide to convert after all. + option = { + name = east_europe.0034.b + trigger = { + top_liege = root + NOT = { religion = religion:magyar_religion } + } + set_character_faith_with_conversion = faith:magyar_pagan + } + + #Those who aren't pagans are probably horrified. + option = { + name = east_europe.0034.c + trigger = { + NOT = { + religion = { is_in_family = rf_pagan } + } + } + } + + #And, as a fallback, some people just won't care. + option = { name = east_europe.0034.d } +} + +################################################## +# Founding the Kingdom of Bosnia +# by Ewan Cowhig Croft +# 0101-0102 +################################################## + +# You founded the kingdom! +east_europe.0101 = { + type = character_event + title = east_europe.0101.t + desc = east_europe.0101.desc + theme = crown + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = wilderness_mountains } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + found_kingdom_of_bosnia_decision_scripted_effect = yes + legend_seed_new_title_effect = yes + } + + #I was motivated by nobility! + option = { + name = east_europe.0101.a + + #Your legacy will be remembered. + add_prestige_experience = major_prestige_gain + + stress_impact = { arrogant = minor_stress_impact_loss } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = 0.5 + } + } + } + + #I was motivated by faith! + option = { + name = east_europe.0101.b + + #Your piety will be remembered. + add_piety_experience = major_piety_gain + + stress_impact = { zealous = minor_stress_impact_loss } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_boldness = 0.25 + } + } + } + + #I was motivated by a cynical lust for power! + option = { + name = east_europe.0101.c + + #Your wry smile walking away from your coronation will be remembered. + add_stress = major_stress_loss + + stress_impact = { cynical = minor_stress_impact_loss } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.25 + ai_honor = -0.25 + } + } + } +} + +# Someone else founded the kingdom! +east_europe.0102 = { + type = character_event + title = east_europe.0102.t + desc = east_europe.0102.desc + theme = crown + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = wilderness_mountains } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + found_kingdom_of_bosnia_decision_scripted_effect = yes + } + + #Kings and Emperors consider them an upstart. + option = { + name = east_europe.0102.a + trigger = { highest_held_title_tier >= tier_kingdom } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } + + #Same-culture rulers are probably quite happy. + ##Deliberately same-culture rather than Bosnian, since it's mechanically possible to found the kingdom as a Croatian or Serbian just looking to get a ruler-title. + option = { + name = east_europe.0102.b + trigger = { culture = scope:founder.culture } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } + + #Everyone else is a bit wary. + option = { + name = east_europe.0102.c + trigger = { + NOR = { + highest_held_title_tier >= tier_kingdom + culture = scope:founder.culture + } + } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } +} + +################################################## +# I Think I Smell HERESY +# by Ewan Cowhig Croft +# 0111-0130 +################################################## + +##Local Scripted Triggers + +scripted_trigger krstjani_manipulate_hof_valid_critical_success_target_trigger = { + exists = scope:critical_success + #The accuser must still be around/eligible to actually *be* excommunicated. + scope:accuser = { + is_alive = yes + NOT = { has_trait = excommunicated } + } +} + +scripted_trigger generic_invalidation_criteria_trigger = { + OR = { + scope:hof = { + OR = { + #Scope:hof has died. + is_alive = no + #Scope:hof has been deposed. + this != scope:hof.faith.religious_head + } + } + scope:heretic = { + OR = { + #Scope:heretic has died. + is_alive = no + #Scope:heretic is no longer an independent ruler (including being deposed). + top_liege != this + #Scope:heretic has become a different flavour of ecumenical Christian. + faith = { + NOT = { this = faith:bosnian_church } + has_doctrine = special_doctrine_ecumenical_christian + } + #Scope:heretic has become a different heretic. + faith = { + NAND = { + this = faith:bosnian_church + has_doctrine = special_doctrine_ecumenical_christian + } + } + #Scope:heretic has converted to a different Abrahamic religion. + faith.religion = { + NOT = { this = religion:christianity_religion } + is_in_family = rf_abrahamic + } + #Scope:heretic has converted to a totally different religious family. + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + } + } +} + +##Local Scripted Effects + +scripted_effect on_trigger_fail_no_heretic_notification_effect = { + #First, we trigger notification events. These have limited mechanical effects, so we're not too worried if they get lost in the system. + #All actual core mechanical functionality is carried out in east_europe.0122, which is a hidden maintenance event, and goes off regardless of whether or not there are players there to witness it. + + scope:accuser = { + #Inform scope:accuser. + if = { + limit = { + is_alive = yes + is_landed = yes + } + #Trigger the notification event. + trigger_event = east_europe.0123 + } + #... Or their probable heir. + else_if = { + limit = { + AND = { #Just here to prevent errors in the event that their primary title has been destroyed. + exists = primary_title.holder + primary_title.holder = { dynasty = scope:accuser.dynasty } + } + } + primary_title.holder = { trigger_event = east_europe.0123 } + } + } + #No notice for scope:heretic, as they've not been informed at all at this stage in the chain. + #Clear the variable from the list after a reasonable cooldown. + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_cancellation_cooldown_value + } +} + +scripted_effect on_trigger_fail_full_notifications_effect = { + #First, we trigger notification events. These have limited mechanical effects, so we're not too worried if they get lost in the system. + #All actual core mechanical functionality is carried out in east_europe.0122, which is a hidden maintenance event, and goes off regardless of whether or not there are players there to witness it. + + scope:accuser = { + #Inform scope:accuser. + if = { + limit = { + is_alive = yes + is_landed = yes + } + trigger_event = east_europe.0123 + } + #... Or their probable heir. + else_if = { + limit = { + AND = { #Just here to prevent errors in the event that their primary title has been destroyed. + exists = primary_title.holder + primary_title.holder = { dynasty = scope:accuser.dynasty } + } + } + primary_title.holder = { trigger_event = east_europe.0123 } + } + } + scope:heretic = { + #Inform scope:heretic. + if = { + limit = { + is_alive = yes + is_landed = yes + } + trigger_event = east_europe.0124 + } + #... Or their probable heir. + else_if = { + limit = { + AND = { #Just here to prevent errors in the event that their primary title has been destroyed. + exists = primary_title.holder + primary_title.holder = { dynasty = scope:heretic.dynasty } + } + } + primary_title.holder = { trigger_event = east_europe.0124} + } + } + #Clear the variable from the list after a reasonable cooldown. + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_cancellation_cooldown_value + } +} + +##Event Block + +# Accuser POV: gatekeeper event. +east_europe.0111 = { + type = character_event + title = east_europe.0111.t + desc = east_europe.0111.desc + theme = faith + left_portrait = { + character = scope:heretic + animation = personality_cynical + } + right_portrait = { + character = scope:hof + animation = personality_zealous + } + override_background = { reference = council_chamber } + + #Novit enim Dominus qui sunt eius! + option = { + name = east_europe.0111.a + + #This is here to cover a _very_ niche invalidation, where the Papacy is abolished and the Pope converts to Islam, so that the invalidation event doesn't refer to the Caliphate by mistake. + faith = { save_scope_as = absolute_faith } + + #"You write a letter to the [HoF]..." + custom_tooltip = east_europe.0111.a.tt + trigger_event = east_europe.0125 + + ai_chance = { + #The AI will always pick this. + base = 100 + } + } + + #On seconds thoughts, better not... + option = { + name = east_europe.0111.b + + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.cancellation_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_cancellation_cooldown_value + } + + ai_chance = { + #The AI never backs down from this event. + base = 0 + } + } +} + +# Accuser POV: HoF rejects out of hand. +east_europe.0112 = { + type = letter_event + opening = east_europe.0112.t + desc = { + desc = east_europe.0112.desc.intro + first_valid = { + #These are ordered in a rough reverse-rarity for maximum variety. + ##HoF is same-culture as the heretic. + triggered_desc = { + trigger = { scope:hof.culture = scope:heretic.culture } + desc = east_europe.0112.desc.culture + } + ##HoF is your rival. + triggered_desc = { + trigger = { + any_relation = { + type = rival + this = scope:hof + } + } + desc = east_europe.0112.desc.rival + } + ##HoF thinks you're sinful as hell. + triggered_desc = { + trigger = { num_sinful_traits >= 3 } + desc = east_europe.0112.desc.sinful + } + ##HoF just really dislikes you. + triggered_desc = { + trigger = { + reverse_opinion = { + target = scope:hof + value <= high_negative_opinion + } + } + desc = east_europe.0112.desc.negative_opinion + } + desc = east_europe.0112.desc.fallback + } + desc = east_europe.0112.desc.outro + } + sender = { + character = scope:hof + animation = dismissal + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_no_heretic_notification_effect = yes + } + + #What is HoF thinking?! + option = { + name = east_europe.0112.a + + #Your HoF dislikes your cavalier attitude. + reverse_add_opinion = { + modifier = cavalier_accusations_opinion + target = scope:hof + } + + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.regular_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_failure_cooldown_value + } + + ai_chance = { + #The AI will always choose this. + base = 100 + } + } +} + +# Accuser POV: HoF agrees, and will consult with Krstjani. +east_europe.0113 = { + type = letter_event + opening = east_europe.0113.t + desc = east_europe.0113.desc + sender = { + character = scope:hof + animation = personality_rational + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_no_heretic_notification_effect = yes + } + + #The ecclesiastic wheels are in motion! + option = { + name = east_europe.0113.a + + #HoF appreciates being alerted. + reverse_add_opinion = { + modifier = brought_heretics_to_my_notice_opinion + target = scope:hof + } + + #HoF contacts scope: heretic... + custom_tooltip = east_europe.0113.a.tt + scope:heretic = { + trigger_event = { + id = east_europe.0114 + days = { 7 14 } + } + } + + ai_chance = { + #AI will always choose this option. + base = 100 + } + } +} + +# Heretic POV: Krstjani given choice. +east_europe.0114 = { + type = character_event + title = east_europe.0114.t + desc = east_europe.0114.desc + theme = faith + left_portrait = { + character = scope:accuser + animation = schadenfreude + } + right_portrait = { + character = scope:hof + animation = personality_zealous + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_no_heretic_notification_effect = yes + } + + #Learning: attempt to engage theologically. + option = { + name = east_europe.0114.a + + #Save the response type for later loc. + save_scope_value_as = { + name = krstjani_response + value = flag:theological_debate + } + + #You try to tackle scope:HoF on their own ground. + duel = { + skill = learning + target = scope:hof + #You convince scope:HoF of your status as genuine Christians! + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = east_europe.0114.a.tt_success + custom_tooltip = east_europe.0114.a.tt_success.tt + trigger_event = { + id = east_europe.0118 + days = { 7 14 } + } + } + #Scope:HoF remains critical of your religious practices. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = east_europe.0114.a.tt_failure + custom_tooltip = east_europe.0114.a.tt_failure.tt + trigger_event = { + id = east_europe.0120 + days = { 7 14 } + } + } + } + + stress_impact = { + zealous = medium_stress_impact_loss + lazy = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.75 + ai_boldness = 0.5 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -10 + has_trait = craven + } + } + } + + #Intrigue: use your hook. + option = { + name = east_europe.0114.b + trigger = { has_usable_hook = scope:hof } + + #Save the response type for later loc. + save_scope_value_as = { + name = krstjani_response + value = flag:political_leverage + } + + #If the hook is strong, and scope:accuser both uses a communion faith & has no counter-hook, then this is a critical success. + if = { + limit = { + has_strong_usable_hook = scope:hof + scope:hof.faith = { has_doctrine_parameter = excommunication_active } + NOT = { + scope:accuser = { has_strong_hook = scope:hof} + } + } + save_scope_value_as = { + name = critical_success + value = yes + } + } + #Spend hooks appropriately. + use_hook = scope:hof + #Send the response event. + custom_tooltip = east_europe.0114.b.tt + trigger_event = { + id = east_europe.0118 + days = { 7 14 } + } + + stress_impact = { + deceitful = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 10000 #Since this is an autosuccess, the AI should pretttty much always take it if they have the choice (barring stress traits). + ai_value_modifier = { + ai_boldness = 0.75 + ai_honor = -0.5 + } + #Stress values here are set up so that, if scope:heretic has appropriate traits, they might actually _not_ choose this, even with the auto-win. + modifier = { #Weight up for stress. + add = 9920 + has_trait = deceitful + } + modifier = { #Weight up for stress. + add = 9920 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -9920 + has_trait = honest + } + modifier = { #Weight down for stress. + add = -9920 + has_trait = just + } + } + } + + #Intrigue: attempt to manipulate scope:HoF. + option = { + name = east_europe.0114.c + trigger = { + NOT = { has_usable_hook = scope:hof } + } + + #Save the response type for later loc. + save_scope_value_as = { + name = krstjani_response + value = flag:political_manoeuvrings + } + + #You try to argue the point politically. + duel = { + skill = intrigue + target = scope:hof + #You convince scope:HoF that scope:Accuser is just being political. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = east_europe.0114.c.tt_success + custom_tooltip = east_europe.0114.a.tt_success.tt + trigger_event = { + id = east_europe.0118 + days = { 7 14 } + } + } + #Scope:HoF remains critical of your religious practices. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = east_europe.0114.c.tt_failure + custom_tooltip = east_europe.0114.a.tt_failure.tt + trigger_event = { + id = east_europe.0120 + days = { 7 14 } + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.75 + ai_honor = -0.5 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = deceitful + } + modifier = { #Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -20 + has_trait = honest + } + modifier = { #Weight down for stress. + add = -20 + has_trait = just + } + } + } + + #Faith: convert as requested. + option = { + name = east_europe.0114.d + + #Announce your conversion. + custom_tooltip = east_europe.0114.d.tt + trigger_event = east_europe.0116 + + stress_impact = { + humble = minor_stress_impact_loss + cynical = major_stress_impact_loss + arrogant = minor_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + #Intentionally set these to be a bit more realpolitik than usual: it's not necessarily a sincere conversion, after all. + ai_rationality = 0.75 + ai_zeal = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = humble + } + modifier = { #Weight up for stress. + add = 30 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -10 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + #Faith: refuse to submit to scope:HoF! + option = { + name = east_europe.0114.e + + #Save the response type for later loc. + save_scope_value_as = { + name = krstjani_response + value = flag:unrepentant_heretics + } + + #Fallout begins. + custom_tooltip = east_europe.0114.e.tt + trigger_event = { + id = east_europe.0120 + days = { 7 14 } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + zealous = major_stress_impact_loss + humble = minor_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + #Intentionally set these to be a bit more realpolitik than usual: it's not necessarily a sincere conversion, after all. + ai_zeal = 0.25 + ai_rationality = -0.75 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { #Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + } + } +} + +# Accuser POV: Krstjani convert. +east_europe.0115 = { + type = character_event + title = east_europe.0115.t + desc = { + desc = east_europe.0115.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:heretic_conversion = flag:political } + desc = east_europe.0115.desc.political + } + triggered_desc = { + trigger = { scope:heretic_conversion = flag:wholehearted } + desc = east_europe.0115.desc.wholehearted + } + } + desc = east_europe.0115.desc.outro + } + theme = faith + left_portrait = { + character = scope:heretic + animation = shame + } + right_portrait = { + character = scope:hof + animation = personality_bold + } + override_background = { reference = council_chamber } + + immediate = { + if = { + limit = { scope:heretic_conversion = flag:political } + show_as_tooltip = { + scope:heretic = { set_character_faith = scope:hof.faith } + } + } + else_if = { + limit = { scope:heretic_conversion = flag:wholehearted } + show_as_tooltip = { + scope:heretic = { set_character_faith_with_conversion = scope:hof.faith } + } + } + } + + #Pah! A false conversion! + option = { + name = east_europe.0115.a + + #Recoup some of your lost piety, at least. + add_piety = medium_piety_gain + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.regular_cooldown + + ai_chance = { + #The AI will always take this option. + base = 100 + } + } + + #Once a heretic, always a heretic! + option = { + name = east_europe.0115.b + trigger = { + #Option for players to vent. + is_ai = no + can_set_relation_rival_trigger = { CHARACTER = scope:heretic } + } + + #Still recoup that lost piety. + add_piety = medium_piety_gain + #Set the "convert" as your rival. + set_relation_rival = { + target = scope:heretic + reason = rival_faked_conversion + } + hidden_effect = { + scope:heretic = { + send_interface_toast = { + title = east_europe.0115.b.toast + left_icon = scope:accuser + show_as_tooltip = { + set_relation_rival = { + target = scope:accuser + reason = rival_faked_conversion + } + } + } + } + } + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.regular_cooldown + + ai_chance = { + #The AI does not have access to this option. + base = 0 + } + } +} + +# Heretic POV: Krstjani convert. +east_europe.0116 = { + type = character_event + title = east_europe.0116.t + desc = east_europe.0116.desc + theme = faith + left_portrait = { + character = scope:accuser + animation = shock + } + right_portrait = { + character = scope:hof + animation = personality_bold + } + override_background = { reference = council_chamber } + + immediate = { + #Reduced cooldown for ordinary successes. + custom_tooltip = east_europe.0111.tt.regular_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_failure_cooldown_value + } + #Flag them as a converted Krstjani leader, so that they can't just reconvert for free via false conversions. + add_character_flag = { + flag = atoned_krstjani_leader_flag + years = 20 + } + } + + #A personal admission of faith will do. + option = { + name = east_europe.0116.a + + #I'll just quietly convert by myself. + set_character_faith = scope:hof.faith + #Costs you some piety, but easier to flip back from. + add_piety = minor_piety_loss + #Set up scope:accuser loc. + save_scope_value_as = { + name = heretic_conversion + value = flag:political + } + #Aaaand notify scope:accuser. + scope:accuser = { trigger_event = east_europe.0115 } + + stress_impact = { + stubborn = minor_stress_impact_loss + zealous = minor_stress_impact_loss + fickle = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = stubborn + } + modifier = { #Weight up for stress. + add = 10 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = fickle + } + modifier = { #Weight down for stress. + add = -10 + has_trait = arbitrary + } + } + } + + #I whole-heartedly embrace this opportunity! + option = { + name = east_europe.0116.b + + #The realm must join me! + set_character_faith_with_conversion = scope:hof.faith + #A pious act, from the POV of your new faith. + add_piety = medium_piety_gain + #Set up scope:accuser loc. + save_scope_value_as = { + name = heretic_conversion + value = flag:wholehearted + } + #Aaaand notify scope:accuser. + scope:accuser = { trigger_event = east_europe.0115 } + + stress_impact = { + fickle = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + stubborn = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_vengefulness = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = fickle + } + modifier = { #Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -20 + has_trait = stubborn + } + modifier = { #Weight down for stress. + add = -20 + has_trait = zealous + } + } + } +} + +# Accuser POV: Krstjani manipulate HoF. +east_europe.0117 = { + type = character_event + title = east_europe.0117.t + desc = { + desc = east_europe.0117.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:excommunicated_just_now } + desc = east_europe.0117.desc.critical_success + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:theological_debate } + desc = east_europe.0117.desc.theological_debate + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_leverage } + desc = east_europe.0117.desc.political_leverage + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_manoeuvrings } + desc = east_europe.0117.desc.political_manoeuvrings + } + } + desc = east_europe.0117.desc.outro + } + theme = faith + left_portrait = { + character = scope:heretic + animation = schadenfreude + } + right_portrait = { + character = scope:hof + animation = personality_forgiving + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_full_notifications_effect = yes + } + + immediate = { + #Apply excommunication if necessary. + if = { + limit = { krstjani_manipulate_hof_valid_critical_success_target_trigger = yes } + add_excommunication_actual_effect = yes + save_scope_value_as = { + name = excommunicated_just_now + value = yes + } + } + #If possible, quietly make scope:hof a potential rival. Just for funsies. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:hof } + } + set_relation_potential_rival = scope:hof + } + } + } + + #This is a travesty! + option = { + name = east_europe.0117.a + trigger = { + NOT = { exists = scope:excommunicated_just_now } + } + + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.regular_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_failure_cooldown_value + } + + ai_chance = { + #The AI will always take this option if available. + base = 100 + } + } + + #Scope:HoF excommunicated *me*?! + option = { + name = east_europe.0117.b + trigger = { exists = scope:excommunicated_just_now } + + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a LONG cooldown. + custom_tooltip = east_europe.0111.tt.critical_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_critical_failure_cooldown_value + } + + ai_chance = { + #The AI will always take this option if available. + base = 100 + } + } + + #This is the start of a beautiful rivalry. + option = { + name = east_europe.0117.c + trigger = { + #Option for players to vent. + is_ai = no + can_set_relation_rival_trigger = { CHARACTER = scope:heretic } + } + + #Set the heretic as your rival. + set_relation_rival = { + target = scope:heretic + reason = rival_heresy + } + hidden_effect = { + scope:heretic = { + send_interface_toast = { + title = east_europe.0117.c.toast + left_icon = scope:accuser + show_as_tooltip = { set_relation_rival = scope:accuser } + } + } + } + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + if = { + limit = { exists = scope:excommunicated_just_now } + #Clear the variable from the list after a LONG cooldown. + custom_tooltip = east_europe.0111.tt.critical_cooldown + } + else = { + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.regular_cooldown + } + + stress_impact = { forgiving = minor_stress_impact_gain } + ai_chance = { + #The AI does not have access to this option. + base = 0 + } + } + + #I'll found my own church! With divorce and carnal exultations! + option = { + name = east_europe.0117.d + trigger = { exists = scope:excommunicated_just_now } + + #Players are allowed to choose a consolation prize, for the inconvenience. + add_character_modifier = { + modifier = feud_with_the_church_modifier + years = 20 + } + + #Set up some rivalries from your bluster. + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:heretic } + } + set_relation_rival = { + target = scope:heretic + reason = rival_heresy + } + } + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:hof } + } + set_relation_rival = { + target = scope:hof + reason = rival_heresy + } + } + + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a LONG cooldown. + custom_tooltip = east_europe.0111.tt.critical_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_critical_failure_cooldown_value + } + + + stress_impact = { zealous = major_stress_impact_loss } + ai_chance = { + #The AI doesn't use custom faith reformation, so it'll never take this option. + base = 0 + } + } +} + +# Heretic POV: Krstjani manipulate HoF. +east_europe.0118 = { + type = character_event + title = east_europe.0118.t + desc = { + desc = east_europe.0118.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:accuser = { krstjani_manipulate_hof_valid_critical_success_target_trigger = yes } + } + desc = east_europe.0118.desc.critical_success + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:theological_debate } + desc = east_europe.0118.desc.theological_debate + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_leverage } + desc = east_europe.0118.desc.political_leverage + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_manoeuvrings } + desc = east_europe.0118.desc.political_manoeuvrings + } + } + desc = east_europe.0118.desc.outro + } + theme = faith + left_portrait = { + character = scope:accuser + animation = disbelief + } + right_portrait = { + character = scope:hof + animation = personality_zealous + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_full_notifications_effect = yes + } + + immediate = { + if = { + limit = { + scope:accuser = { krstjani_manipulate_hof_valid_critical_success_target_trigger = yes } + } + scope:accuser = { add_excommunication_tooltip_only_effect = yes } + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.critical_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_critical_failure_cooldown_value + } + } + else = { + #Reduced cooldown for ordinary successes. + custom_tooltip = east_europe.0111.tt.regular_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_failure_cooldown_value + } + } + scope:accuser = { trigger_event = east_europe.0117 } + } + + #God smiles upon us! + option = { + name = east_europe.0118.a + + #Give them a little reward for doing well. + add_piety = medium_piety_value + + stress_impact = { + zealous = medium_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_boldness = 0.25 + } + modifier = { #Weight down for stress. + add = 20 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = cynical + } + } + } + + #I'm just glad this issue is surely settled. + option = { + name = east_europe.0118.b + + add_stress = massive_stress_loss + + stress_impact = { + cynical = medium_stress_impact_loss + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.25 + ai_zeal = -0.5 + } + modifier = { #Weight down for stress. + add = 20 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -10 + has_trait = zealous + } + } + } +} + +# Accuser POV: Krstjani formally declared heretics. +east_europe.0119 = { + type = character_event + title = east_europe.0119.t + desc = { + desc = east_europe.0119.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:krstjani_response = flag:theological_debate } + desc = east_europe.0119.desc.theological_debate + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_manoeuvrings } + desc = east_europe.0119.desc.political_manoeuvrings + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:unrepentant_heretics } + desc = east_europe.0119.desc.unrepentant_heretics + } + } + desc = east_europe.0119.desc.outro + } + theme = faith + left_portrait = { + character = scope:heretic + animation = shock + } + right_portrait = { + character = scope:hof + animation = personality_vengeful + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_full_notifications_effect = yes + } + + immediate = { + show_as_tooltip = { + #The Krstjani are formally declared to be heretical. + faith:bosnian_church = { remove_doctrine = special_doctrine_ecumenical_christian } + } + } + + #Vindication! + option = { + name = east_europe.0119.a + + add_piety_experience = major_piety_value + + ai_chance = { + #The AI will always take this option. + base = 100 + } + } +} + +# Heretic POV: Krstjani formally declared heretics. +east_europe.0120 = { + type = letter_event + opening = east_europe.0120.t + desc = { + desc = east_europe.0120.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:krstjani_response = flag:theological_debate } + desc = east_europe.0120.desc.theological_debate + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_manoeuvrings } + desc = east_europe.0120.desc.political_manoeuvrings + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:unrepentant_heretics } + desc = east_europe.0120.desc.unrepentant_heretics + } + } + desc = east_europe.0120.desc.outro + } + sender = { + character = scope:hof + animation = personality_vengeful + } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_full_notifications_effect = yes + } + + immediate = { + #The Krstjani are formally declared to be heretical. + faith:bosnian_church = { remove_doctrine = special_doctrine_ecumenical_christian } + #The accuser is told of their triumph! + scope:accuser = { trigger_event = east_europe.0119 } + #Relevant players (neighbouring realms and Krstjani ones) are informed. + every_player = { + limit = { + NOR = { + this = scope:heretic #Not the actual chief heretic. + this = scope:accuser #Nor the chief accuser. + } + OR = { + faith = faith:bosnian_church + any_neighboring_top_liege_realm = { holder = scope:heretic } + } + } + trigger_event = east_europe.0121 + } + } + + #This is terrible! + option = { + name = east_europe.0120.a + + custom_tooltip = east_europe.0120.a.tt + + ai_chance = { + #The AI will always pick this option. + base = 100 + } + } +} + +# Other POV: Krstjani stripped of ecumenism notification for neighbouring rulers. +east_europe.0121 = { + type = character_event + title = east_europe.0121.t + desc = { + desc = east_europe.0121.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:krstjani_response = flag:theological_debate } + desc = east_europe.0121.desc.theological_debate + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_manoeuvrings } + desc = east_europe.0121.desc.political_manoeuvrings + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:unrepentant_heretics } + desc = east_europe.0121.desc.unrepentant_heretics + } + } + desc = east_europe.0121.desc.outro + } + theme = faith + left_portrait = { + character = scope:heretic + animation = shock + } + right_portrait = { + character = scope:hof + animation = personality_vengeful + } + lower_right_portrait = scope:accuser + override_background = { reference = council_chamber } + + #Heretics? In our midst?! + option = { + name = east_europe.0121.a + trigger = { + #Can't be Krstjani yourself. + NOT = { faith = faith:bosnian_church } + OR = { + #Either a non-cynical member of the same church. + AND = { + faith = scope:hof.faith + NOT = { has_trait = cynical } + } + #Or a zealous member of another ecumenical church. + AND = { + faith = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + has_doctrine = special_doctrine_ecumenical_christian + } + has_trait = zealous + } + } + } + + show_as_tooltip = { + faith:bosnian_church = { remove_doctrine = special_doctrine_ecumenical_christian } + } + + ai_chance = { + #AI choice is irrelevant. + base = 100 + } + } + + #I genuinely don't care. + option = { + name = east_europe.0121.b + trigger = { + NOR = { + #Can't be Krstjani yourself. + faith = faith:bosnian_church + #Must not be a non-cynical member of the same church. + AND = { + faith = scope:hof.faith + NOT = { has_trait = cynical } + } + #Nor a zealous member of another ecumenical church. + AND = { + faith = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + has_doctrine = special_doctrine_ecumenical_christian + } + has_trait = zealous + } + } + } + + show_as_tooltip = { + faith:bosnian_church = { remove_doctrine = special_doctrine_ecumenical_christian } + } + + ai_chance = { + #AI choice is irrelevant. + base = 100 + } + } + + #We just wanted to be left alone! + option = { + name = east_europe.0121.c + trigger = { faith = faith:bosnian_church } + + show_as_tooltip = { + faith:bosnian_church = { remove_doctrine = special_doctrine_ecumenical_christian } + } + + ai_chance = { + #AI choice is irrelevant. + base = 100 + } + } +} + +# Maintenance: accusation failure maintenance timer. +east_europe.0122 = { + hidden = yes + + immediate = { + #Quietly reenable the decision to accuse of heresy. + remove_list_global_variable = { + name = unavailable_unique_decisions + target = flag:flag_krstjani_accused_of_heresy + } + } +} + +# Accuser POV: decision has invalidated for some reason. +east_europe.0123 = { + type = character_event + title = east_europe.0123.t + desc = { + desc = east_europe.0123.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:invalidation_type = flag:hof_died } + desc = east_europe.0123.desc.hof_died + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_died } + desc = east_europe.0123.desc.heretic_died + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:hof_no_longer_hof} + desc = east_europe.0123.desc.hof_no_longer_hof + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_not_independent_ruler } + desc = east_europe.0123.desc.heretic_not_independent_ruler + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_ecumenical_christian } + desc = east_europe.0123.desc.heretic_now_ecumenical_christian + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_different_heresy } + desc = east_europe.0123.desc.heretic_now_different_heresy + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_infidel } + desc = east_europe.0123.desc.heretic_now_infidel + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_heathen } + desc = east_europe.0123.desc.heretic_now_heathen + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:fallback } + desc = east_europe.0123.desc.fallback + } + } + desc = east_europe.0123.desc.outro + } + theme = faith + left_portrait = { + character = scope:dead_character + animation = sadness + } + right_portrait = { + character = scope:escaped_on_technicality + animation = dismissal + } + override_background = { reference = council_chamber } + + trigger = { + #Just some basic triggers, since this is mostly, but not entirely, just a notification. + is_alive = yes + is_adult = yes + #Tonally required to not have converted/been inherited by a Krstjan. + NOT = { faith = faith:bosnian_church } + } + + immediate = { + #Check to see why we've invalidated. + ##Scope:hof has died. + if = { + limit = { + scope:hof = { is_alive = no } + } + save_scope_value_as = { + name = invalidation_type + value = flag:hof_died + } + #Set-up portraits. + scope:hof = { save_scope_as = dead_character } + } + ##Scope:heretic has died. + else_if = { + limit = { + scope:heretic = { is_alive = no } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_died + } + #Set-up portraits. + scope:heretic = { save_scope_as = dead_character } + } + ##Scope:hof is no longer actually the hof. + else_if = { + limit = { + scope:hof = { + this != scope:hof.faith.religious_head + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:hof_no_longer_hof + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic is no longer independent. + else_if = { + limit = { + scope:heretic = { top_liege != this } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_not_independent_ruler + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to a different ecumenical faith. + else_if = { + limit = { + scope:heretic = { + faith = { + NOT = { this = faith:bosnian_church } + has_doctrine = special_doctrine_ecumenical_christian + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_ecumenical_christian + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to another heresy. + else_if = { + limit = { + scope:heretic = { + faith = { + NAND = { + this = faith:bosnian_church + has_doctrine = special_doctrine_ecumenical_christian + } + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_different_heresy + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to another Abrahamic religion. + else_if = { + limit = { + scope:heretic = { + faith.religion = { + NOT = { this = religion:christianity_religion } + is_in_family = rf_abrahamic + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_infidel + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to a non-Abrahamic religion. + else_if = { + limit = { + scope:heretic = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_heathen + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Aaaaand a fallback, in case something goes weird. + else = { + save_scope_value_as = { + name = invalidation_type + value = flag:fallback + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + } + + #Accuser POV: it wasn't supposed to end this way! + option = { + name = east_europe.0123.a + + #Recoup some of the lost piety. + add_piety = medium_piety_gain + + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.cancellation_cooldown + + ai_chance = { + #The AI will always pick this option. + base = 100 + } + } +} + +# Heretic POV: decision has invalidated for some reason. +east_europe.0124 = { + type = character_event + title = east_europe.0124.t + desc = { + desc = east_europe.0124.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:invalidation_type = flag:hof_died } + desc = east_europe.0124.desc.hof_died + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_died } + desc = east_europe.0124.desc.heretic_died + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:hof_no_longer_hof} + desc = east_europe.0123.desc.hof_no_longer_hof + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_not_independent_ruler } + desc = east_europe.0124.desc.heretic_not_independent_ruler + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_ecumenical_christian } + desc = east_europe.0124.desc.heretic_now_ecumenical_christian + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_different_heresy } + desc = east_europe.0124.desc.heretic_now_different_heresy + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_infidel } + desc = east_europe.0124.desc.heretic_now_infidel + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_heathen } + desc = east_europe.0124.desc.heretic_now_heathen + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:fallback } + desc = east_europe.0124.desc.fallback + } + } + desc = east_europe.0124.desc.outro + } + theme = faith + left_portrait = { + character = scope:dead_character + animation = sadness + } + right_portrait = { + character = scope:escaped_on_technicality + animation = dismissal + } + override_background = { reference = council_chamber } + + trigger = { + #Just some basic triggers, since this is mostly, but not entirely, just a notification. + is_alive = yes + is_adult = yes + } + + immediate = { + #Check to see why we've invalidated. + ##Scope:hof has died. + if = { + limit = { + scope:hof = { is_alive = no } + } + save_scope_value_as = { + name = invalidation_type + value = flag:hof_died + } + #Set-up portraits. + scope:hof = { save_scope_as = dead_character } + } + ##Scope:heretic has died. + else_if = { + limit = { + scope:heretic = { is_alive = no } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_died + } + #Set-up portraits. + scope:heretic = { save_scope_as = dead_character } + } + ##Scope:hof is no longer actually the hof. + else_if = { + limit = { + scope:hof = { + this != scope:hof.faith.religious_head + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:hof_no_longer_hof + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic is no longer independent. + else_if = { + limit = { + scope:heretic = { top_liege != this } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_not_independent_ruler + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to a different ecumenical faith. + else_if = { + limit = { + scope:heretic = { + faith = { + NOT = { this = faith:bosnian_church } + has_doctrine = special_doctrine_ecumenical_christian + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_ecumenical_christian + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to another heresy. + else_if = { + limit = { + scope:heretic = { + faith = { + NAND = { + this = faith:bosnian_church + has_doctrine = special_doctrine_ecumenical_christian + } + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_different_heresy + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to another Abrahamic religion. + else_if = { + limit = { + scope:heretic = { + faith.religion = { + NOT = { this = religion:christianity_religion } + is_in_family = rf_abrahamic + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_infidel + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to a non-Abrahamic religion. + else_if = { + limit = { + scope:heretic = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_heathen + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Aaaaand a fallback, in case something goes weird. + else = { + save_scope_value_as = { + name = invalidation_type + value = flag:fallback + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + } + + #Heretic POV: well, that's settled, at least. + option = { + name = east_europe.0124.a + + add_stress = medium_stress_loss + + #No need to announce failure to scope:heretic, as this is a success from their POV. + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.cancellation_cooldown + + ai_chance = { + #The AI will always pick this option. + base = 100 + } + } +} + +# Maintenance: HoF decides who they dislike most. +east_europe.0125 = { + hidden = yes + + immediate = { + #What is the HoF's reply? + random_list = { + #Default to yes. + 100 = { + trigger_event = { + id = east_europe.113 + days = { 7 14 } + } + + #Always do it if you have a strong hook on the HoF (though you're not *technically* using it). + modifier = { + add = 1000 + has_strong_hook = scope:hof + } + #Weight up nicely if you have a regular hook (though you're still not *technically* using it). + modifier = { + add = 25 + has_hook = scope:hof + } + #A friendly HoF wants to agree with you. + modifier = { + add = 30 + any_relation = { + type = friend + this = scope:hof + } + } + #A lover HoF wants to agree with you. + modifier = { + add = 50 + any_relation = { + type = lover + this = scope:hof + } + } + #An extremely-friendly HoF wants to agree with you. + modifier = { + add = 20 + reverse_opinion = { + target = scope:hof + value >= high_positive_opinion + } + } + #Potentially-negative values from this point on need to be added to the refusal branch. + ##An extremely-unfriendly HoF wants to disagree with you. + modifier = { + add = -20 + reverse_opinion = { + target = scope:hof + value <= high_negative_opinion + } + } + ##Weight down a bit for sin (no weight up for virtue, since this is already overwhelmingly likely: we're really just checking to see if your HoF is going to call you out for hypocrisy). + modifier = { + add = -10 + num_sinful_traits = 1 + } + modifier = { + add = -20 + num_sinful_traits = 2 + } + modifier = { + add = -30 + num_sinful_traits = 3 + } + modifier = { + add = -40 + num_sinful_traits = 4 + } + modifier = { + add = -50 + num_sinful_traits >= 5 + } + ##A rivalling HoF wants to disagree with you. + modifier = { + add = -50 + any_relation = { + type = rival + this = scope:hof + } + } + ##A HoF that shares scope:heretic's culture is less likely to want to pick on a fellow countryman. + modifier = { + add = -20 + scope:hof.culture = scope:heretic.culture + } + } + #Disable no by default: this option is weighted upwards according to how visibly unchristian scope:accuser is. + 0 = { + trigger_event = { + id = east_europe.0112 + days = 5 + } + + #And now, we invert the values from the acceptance branch: + ##An extremely-unfriendly HoF wants to disagree with you. + modifier = { + add = 20 + reverse_opinion = { + target = scope:hof + value <= high_negative_opinion + } + } + ##Weight down a bit for sin (no weight up for virtue, since this is already overwhelmingly likely: we're really just checking to see if your HoF is going to call you out for hypocrisy). + modifier = { + add = 10 + num_sinful_traits = 1 + } + modifier = { + add = 20 + num_sinful_traits = 2 + } + modifier = { + add = 30 + num_sinful_traits = 3 + } + modifier = { + add = 40 + num_sinful_traits = 4 + } + modifier = { + add = 50 + num_sinful_traits >= 5 + } + ##A rivalling HoF wants to disagree with you. + modifier = { + add = 50 + any_relation = { + type = rival + this = scope:hof + } + } + ##A HoF that shares scope:heretic's culture is less likely to want to pick on a fellow countryman. + modifier = { + add = 20 + scope:hof.culture = scope:heretic.culture + } + } + } + } +} + +################################################## +# Last Gasp of the Great Migrations +# by Ewan Cowhig Croft +# 0131-0150 +################################################## + +# Invader POV: decided to mobilise the Mogyer people. +east_europe.0141 = { + type = character_event + title = east_europe.0141.t + desc = east_europe.0141.desc + theme = culture_change + left_portrait = { + character = scope:invader + animation = personality_bold + } + override_background = { reference = wilderness_steppe } + + immediate = { + save_scope_as = mogyer_invader + every_player = { + limit = { + this != scope:mogyer_invader + } + if = { + limit = { + any_vassal_or_below = { this = scope:mogyer_invader } + } + trigger_event = east_europe.0142 + } + if = { + limit = { + any_sub_realm_county = { + title_province = { geographical_region = custom_hungary } + } + #Exempt the liege from getting this message: should be edge case, but the declaration of war should be enough to let them know that they're gonna have a bad time. + NOT = { + any_vassal_or_below = { this = scope:mogyer_invader } + } + } + trigger_event = east_europe.0143 + } + } + } + + #We ride west! + option = { + name = east_europe.0141.a + + custom_tooltip = east_europe.0141.a.tt + + ai_chance = { + #The AI will always pick this. + base = 100 + } + } +} + +# Liege POV: decided to mobilise the Mogyer people. +east_europe.0142 = { + type = character_event + title = east_europe.0142.t + desc = east_europe.0142.desc + theme = culture_change + left_portrait = { + character = scope:invader + animation = personality_greedy + } + override_background = { reference = wilderness_steppe } + + + #A foolhardy errand. + option = { + name = east_europe.0142.a + + custom_tooltip = east_europe.0142.a.tt + + ai_chance = { + #The AI will always pick this. + base = 100 + } + } +} + +# Pannonian POV: decided to mobilise the Mogyer people. +east_europe.0143 = { + type = character_event + title = east_europe.0143.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + capital_province = { geographical_region = custom_hungary } + } + desc = east_europe.0143.desc.pannonian_capital + } + triggered_desc = { + trigger = { + any_held_title = { + title_tier = county + title_province = { geographical_region = custom_hungary } + } + } + desc = east_europe.0143.desc.pannonian_territory + } + desc = east_europe.0143.desc.fallback + } + desc = east_europe.0143.desc.outro + } + theme = culture_change + left_portrait = { + character = scope:invader + animation = personality_greedy + } + override_background = { reference = wilderness_steppe } + + #They'll never cross the Carpathians! + option = { + name = east_europe.0143.a + + custom_tooltip = east_europe.0143.a.tt + + ai_chance = { + #The AI will always pick this. + base = 100 + } + } +} + + + +################################################## +# Founding the Kingdom of Livonia +# by James Beaumont +################################################## + +# You founded the kingdom! +east_europe.0200 = { + type = character_event + title = east_europe.0200.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + root.faith = { + NOT = { religion_tag = baltic_religion } + NOT = { has_doctrine_parameter = unreformed } + } + } + desc = east_europe.0200.desc.christian + } + desc = east_europe.0200.desc.nonchristian + } + desc = east_europe.0200.desc.outro + } + theme = crown + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = wilderness_forest } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + found_kingdom_of_livonia_decision_scripted_effect = yes + legend_seed_new_title_effect = yes + } + + #My name will be known for all time! + option = { + name = east_europe.0200.a + + #Your legacy will be remembered. + add_prestige = major_prestige_gain + if = { + limit = { + OR = { + #Considers themselves to be a "Balt" + root.culture = { has_cultural_pillar = heritage_baltic } + root.faith = { + religion_tag = baltic_religion + } + } + } + if = { + limit = { + is_female = yes + } + give_nickname = nick_mother_of_the_baltic + } + else = { + give_nickname = nick_father_of_the_baltic + } + } + else = { + give_nickname = nick_scourge_of_the_baltic + } + stress_impact = { arrogant = minor_stress_impact_loss } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = 0.5 + } + } + } + + #This was done for the faith! + option = { + name = east_europe.0200.b + + #Your piety will be remembered. + add_piety = major_piety_gain + + stress_impact = { zealous = minor_stress_impact_loss } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_boldness = 0.25 + } + } + } +} + +# Someone else founded the kingdom! +east_europe.0201 = { + type = character_event + title = east_europe.0201.t + desc = east_europe.0201.desc + theme = crown + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = wilderness_mountains } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + found_kingdom_of_livonia_decision_scripted_effect = yes + } + + #Kings and Emperors consider them an upstart. + option = { + name = east_europe.0201.a + trigger = { highest_held_title_tier >= tier_kingdom } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } + + #Same-faith rulers are probably quite happy. + option = { + name = east_europe.0201.b + trigger = { faith = scope:founder.faith } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } + + #Everyone else is a bit wary. + option = { + name = east_europe.0201.c + trigger = { + NOR = { + highest_held_title_tier >= tier_kingdom + faith = scope:founder.faith + } + } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } +} + diff --git a/N3OW/events/decisions_events/iberia_north_africa_events.txt b/N3OW/events/decisions_events/iberia_north_africa_events.txt new file mode 100644 index 00000000..eedd45e4 --- /dev/null +++ b/N3OW/events/decisions_events/iberia_north_africa_events.txt @@ -0,0 +1,3311 @@ +namespace = iberia_north_africa + +#decision_form_portugal events +#0001 - Tell founder about portugal +#0002 - Tell everyone in diplo range about portugal (and convert people in portugal to portuguese culture) + +#decision_unite_the_spanish_thrones +#0005 - Tell uniter about united thrones +#0006 - Tell everyone in diplo range about united thrones (and destroy titles) + +#decision_unite_africa +#0010 - I united Africa +#0011 - Someone united Frica + +#decision_avenge_the_battle_of_tours +#0015 - I avenged the battle of Tours +#0016 - Someone avenged the battle of tours + + +#decision_build_grand_church +#1001 - I built a church! +#1002 - Someone built a church + +## FP2 + +#golden_age_jewish_science_in_iberia_decision +#2001 - Book Seller +#2002 - Eye Surgery +#2003 - Fighting Scholars + +#2105 - Notification for Mediterranean decision + +#build_holy_pilgrim_roads_decision +#2011 - Wandering Warrior +#2012 - Relatable Scholar +#2013-2014 - Gift from HoF + + + +#I formed Portugal! +iberia_north_africa.0001 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0001.t + desc = { + desc = iberia_north_africa.0001.start.desc + first_valid = { + triggered_desc = { + trigger = { + game_start_date >= 789.1.1 #The end of Umayyad Conquest + faith = { religion_tag = christianity_religion } + } + desc = iberia_north_africa.0001.christian.desc + } + triggered_desc = { + trigger = { + game_start_date >= 789.1.1 #The end of Umayyad Conquest + faith = { religion_tag = islam_religion } + } + desc = iberia_north_africa.0001.muslim.desc + } + } + desc = iberia_north_africa.0001.end.desc + } + theme = realm + left_portrait = { + character = scope:portugal_former + animation = admiration + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + form_portugal_decision_effects = yes #Title changes, prestige, culture swap + + legend_seed_new_title_effect = yes + } + + option = { + name = iberia_north_africa.0001.a + set_nickname_effect = { NICKNAME = nick_the_great } + } +} + +scripted_trigger iberia_north_africa_0002_is_in_portugal_trigger = { + capital_province = { + county = { + any_this_title_or_de_jure_above = { + this = title:k_portugal + } + } + } +} + +#Someone formed Portugal! +iberia_north_africa.0002 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0001.t + desc = { + desc = iberia_north_africa.0002.start.desc + first_valid = { + triggered_desc = { + trigger = { + has_RelationToMe_relation = { CHARACTER = scope:portugal_former } + } + desc = iberia_north_africa.0002.relation_former.desc + } + desc = iberia_north_africa.0002.former.desc + } + desc = iberia_north_africa.0002.end.desc + } + theme = realm + left_portrait = { + character = scope:portugal_former + animation = admiration + } + + immediate = { + #If in Portugal, play the appropriate sound effect. + if = { + limit = { iberia_north_africa_0002_is_in_portugal_trigger = yes } + play_music_cue = "mx_cue_positive_effect" + } + } + + #OK + option = { + trigger = { iberia_north_africa_0002_is_in_portugal_trigger = no } + name = { + trigger = { faith = scope:portugal_former.faith } + text = iberia_north_africa.0002.a1 + } + name = { + trigger = { faith != scope:portugal_former.faith } + text = name_i_see + } + } + + #Convert to portuguese + option = { + trigger = { iberia_north_africa_0002_is_in_portugal_trigger = yes } + name = iberia_north_africa.0002.b + + every_courtier = { + limit = { has_same_culture_as = root } + add_to_list = convert_list + } + + set_culture = culture:portuguese + + every_in_list = { + list = convert_list + custom = portguese_convert_list_court + set_culture = culture:portuguese + } + + ai_chance = { + base = 1 + } + } + + #Keep my culture + option = { + trigger = { iberia_north_africa_0002_is_in_portugal_trigger = yes } + name = iberia_north_africa.0002.c + + reverse_add_opinion = { + target = scope:portugal_former + modifier = disappointed_opinion + opinion = -15 + } + + ai_chance = { + base = 0 + } + } +} + + +#I have united the Spanish thrones! +iberia_north_africa.0005 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0005.t + desc = iberia_north_africa.0005.desc + theme = realm + left_portrait = { + character = scope:spain_uniter + animation = personality_bold + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + unite_the_spanish_thrones_decision_effects = yes + legend_seed_great_deed_title_effect = { + TITLE = root.primary_title + } + + } + + option = { + name = iberia_north_africa.0005.a + + give_nickname = nick_the_motherfather_of_spain + } +} + +#Someone united the spanish thrones! +iberia_north_africa.0006 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0005.t + desc = { + desc = iberia_north_africa.0006.start.desc + first_valid = { + triggered_desc = { + trigger = { + has_RelationToMe_relation = { CHARACTER = scope:spain_uniter } + } + desc = iberia_north_africa.0006.relation_former.desc + } + desc = iberia_north_africa.0006.former.desc + } + desc = iberia_north_africa.0006.end.desc + } + theme = realm + left_portrait = { + character = scope:spain_uniter + animation = personality_bold + } + + option = { + name = name_i_see + } +} + +#I have united Africa! +iberia_north_africa.0010 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0010.t + desc = { + desc = iberia_north_africa.0010.start.desc + triggered_desc = { + trigger = { + exists = scope:vassal_1 + exists = scope:vassal_2 + } + desc = iberia_north_africa.0010.vassals.desc + } + first_valid = { + triggered_desc = { + trigger = { faith = { religion_tag = west_african_bori_religion } } + desc = iberia_north_africa.0010.spirits.desc + } + triggered_desc = { + trigger = { + faith = { + OR = { + religion_tag = west_african_roog_religion + religion_tag = west_african_religion + } + } + } + desc = iberia_north_africa.0010.ancestors.desc + } + desc = iberia_north_africa.0010.generic.desc + } + } + theme = realm + left_portrait = { + character = scope:africa_uniter + animation = personality_honorable + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + unite_africa_decision_effects = yes + legend_seed_great_deed_region_effect = { + REGION = geographical_region:world_africa + } + + #For description + random_vassal = { + limit = { highest_held_title_tier = tier_kingdom } + alternative_limit = { highest_held_title_tier = tier_duchy } + alternative_limit = { highest_held_title_tier = tier_county } + save_scope_as = vassal_1 + } + random_vassal_or_below = { + limit = { + NOR = { + has_culture = scope:vassal_1.culture + highest_held_title_tier = scope:vassal_1.highest_held_title_tier + } + highest_held_title_tier = tier_county + } + alternative_limit = { + NOR = { + has_culture = scope:vassal_1.culture + highest_held_title_tier = scope:vassal_1.highest_held_title_tier + } + highest_held_title_tier = tier_duchy + } + alternative_limit = { + NOR = { + has_culture = scope:vassal_1.culture + highest_held_title_tier = scope:vassal_1.highest_held_title_tier + } + } + save_scope_as = vassal_2 + } + } + + option = { + name = iberia_north_africa.0010.a + + give_nickname = nick_the_unifier_of_africa + } +} + +#Someone united Africa! +iberia_north_africa.0011 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0010.t + desc = { + desc = iberia_north_africa.0011.start.desc + first_valid = { + triggered_desc = { + trigger = { + has_RelationToMe_relation = { CHARACTER = scope:africa_uniter } + } + desc = iberia_north_africa.0011.relation_former.desc + } + desc = iberia_north_africa.0011.former.desc + } + desc = iberia_north_africa.0011.end.desc + } + theme = realm + left_portrait = { + character = scope:africa_uniter + animation = personality_honorable + } + + immediate = { + show_as_tooltip = { + scope:africa_uniter.faith = { + change_fervor = { + value = medium_fervor_gain + desc = fervor_gain_united_africa + } + } + } + } + + option = { + name = { + trigger = { faith = scope:africa_uniter.faith } + text = iberia_north_africa.0002.a1 + } + name = { + trigger = { faith != scope:africa_uniter.faith } + text = name_alas + } + } +} + + +#I have avenged the Battle of Tours +iberia_north_africa.0015 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0015.t + desc = { + desc = iberia_north_africa.0015.part1.desc + desc = iberia_north_africa.0015.part2.desc + } + theme = realm + left_portrait = { + character = scope:avenger + animation = personality_vengeful + } + + immediate = { + play_music_cue = "mx_cue_combat_2" + avenge_the_battle_of_tours_decision_effects = yes + legend_seed_great_deed_faith_effect = { + ANTAGONIST = scope:frankish_christian_faith.religious_head + OLD_FAITH = scope:frankish_christian_faith + } + } + + option = { + name = iberia_north_africa.0015.a + + + } +} + +#Someone avenged the Battle of Tours +iberia_north_africa.0016 = { #by Mathilda Bjarnehed + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { faith = { religion_tag = islam_religion } } + desc = iberia_north_africa.0015.t + } + desc = iberia_north_africa.0016.t + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { faith = { religion_tag = islam_religion } } + desc = { + desc = iberia_north_africa.0015.part1.desc + first_valid = { + triggered_desc = { + trigger = { + has_RelationToMe_relation = { CHARACTER = scope:avenger } + } + desc = iberia_north_africa.0016.relation_former.desc + } + desc = iberia_north_africa.0016.former.desc + } + desc = iberia_north_africa.0015.islam.desc + } + } + desc = iberia_north_africa.0016.generic.desc + } + } + theme = realm + left_portrait = { + character = scope:avenger + animation = personality_vengeful + } + + immediate = { + play_music_cue = "mx_cue_combat_3" + if = { + limit = { exists = scope:frankish_christian_faith } + show_as_tooltip = { + scope:avenger = { + faith = { + change_fervor = { + value = major_fervor_gain + desc = fervor_gain_avenged_battle_of_tours + } + } + } + scope:frankish_christian_faith = { + change_fervor = { + value = major_fervor_loss + desc = fervor_loss_avenged_battle_of_tours + } + } + } + } + } + + option = { + name = { + trigger = { faith = { religion_tag = islam_religion } } + text = iberia_north_africa.0015.a + } + name = { + trigger = { faith = { religion_tag = christianity_religion } } + text = iberia_north_africa.0016.christianity.a + } + name = { + trigger = { + faith = { + NOR = { + religion_tag = christianity_religion + religion_tag = islam_religion + } + } + } + text = name_alas + } + } +} + +#I formed Canarias! +iberia_north_africa.9101 = { #by James Beaumont + type = character_event + title = iberia_north_africa.9101.t + desc = { + desc = iberia_north_africa.9101.desc.intro + first_valid = { + triggered_desc = { + trigger = { + NOT = { religion = religion:north_african_religion } + } + desc = iberia_north_africa.9101.desc.iberian + } + triggered_desc = { + trigger = { + religion = religion:north_african_religion + } + desc = iberia_north_africa.9101.desc.guanche + } + } + desc = iberia_north_africa.9101.desc.outro + } + theme = realm + left_portrait = { + character = scope:canarias_former + animation = admiration + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + declare_canarias_decision_effects = yes + legend_seed_new_title_effect = yes + } + + option = { + name = iberia_north_africa.9101.a + trigger = { + NOT = { + culture = { has_cultural_pillar = heritage_iberian } + } + } + set_nickname_effect = { NICKNAME = nick_the_great } + } + + option = { + name = iberia_north_africa.9101.b + trigger = { + NAND = { + culture = { has_cultural_pillar = heritage_berber } + religion = religion:north_african_religion + } + } + set_nickname_effect = { NICKNAME = nick_the_great } + title:k_canarias = { + set_de_jure_liege_title = title:e_spain + } + } +} + +################################################## +# Loyalty to St. Peter's Throne +# by Ewan Cowhig Croft +# 0101 - 0110 +################################################## + +# Mozarabic Christianity reaffirms its place amongst the ecumenical churches. +iberia_north_africa.0101 = { + type = character_event + title = iberia_north_africa.0101.t + desc = iberia_north_africa.0101.desc + theme = faith + left_portrait = { + character = scope:religious_leader + animation = personality_zealous + } + right_portrait = { + character = scope:pope + animation = flirtation + } + + immediate = { play_music_cue = "mx_cue_faith_conversion" } + + # One people, one faith: swap Rite for Communal Identity. + option = { + name = iberia_north_africa.0101.a + flavor = iberia_north_africa.0101.a.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_bind_the_faith_to_rome_decision_righteous_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:righteous + } + + stress_impact = { + shy = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_zeal = 0.5 + } + } + } + + # We cannot be afraid to seize power in order to defend our own: swap Rite for Pursuit of Power. + option = { + name = iberia_north_africa.0101.b + flavor = iberia_north_africa.0101.b.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_bind_the_faith_to_rome_decision_fundamentalist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:fundamentalist + } + + stress_impact = { + compassionate = medium_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } + + # The GetHolyBooks will still need interpretation: swap Rite for Religious Law. + option = { + name = iberia_north_africa.0101.c + flavor = iberia_north_africa.0101.c.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_bind_the_faith_to_rome_decision_pluralist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:pluralist + } + + stress_impact = { + lazy = medium_stress_impact_loss + arbitrary = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 0.5 + } + } + } + + after = { + # Now take care of notification events for players. + every_player = { + limit = { + this != scope:religious_leader + OR = { + faith = faith:mozarabic_church + any_neighboring_and_across_water_top_liege_realm_owner = { this = root.top_liege } + } + } + trigger_event = iberia_north_africa.0102 + } + # And finally, actually apply the effects. + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:fundamentalist + } + mozarabic_bind_the_faith_to_rome_decision_fundamentalist_path_scripted_effect = yes + } + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:righteous + } + mozarabic_bind_the_faith_to_rome_decision_righteous_path_scripted_effect = yes + } + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:pluralist + } + mozarabic_bind_the_faith_to_rome_decision_pluralist_path_scripted_effect = yes + } + } +} + +# Notification event for relevant players. +iberia_north_africa.0102 = { + type = character_event + title = iberia_north_africa.0102.t + desc = { + desc = iberia_north_africa.0102.desc.intro + # Fundamentalist + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:fundamentalist } + desc = iberia_north_africa.0102.desc.fundamentalist + } + # Righteous + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:righteous } + desc = iberia_north_africa.0102.desc.righteous + } + # Pluralist + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:pluralist } + desc = iberia_north_africa.0102.desc.pluralist + } + } + theme = faith + left_portrait = { + character = scope:religious_leader + animation = personality_zealous + } + right_portrait = { + character = scope:pope + animation = flirtation + } + + immediate = { play_music_cue = "mx_cue_faith_conversion" } + + # Fundamentalist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = faith:mozarabic_church } + desc = iberia_north_africa.0102.a.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0102.a.same_religion + } + desc = iberia_north_africa.0102.a.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:fundamentalist } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_bind_the_faith_to_rome_decision_fundamentalist_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Righteous path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = faith:mozarabic_church } + desc = iberia_north_africa.0102.b.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0102.b.same_religion + } + desc = iberia_north_africa.0102.b.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:righteous } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_bind_the_faith_to_rome_decision_righteous_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Pluralist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = faith:mozarabic_church } + desc = iberia_north_africa.0102.c.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0102.c.same_religion + } + desc = iberia_north_africa.0102.c.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:pluralist } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_bind_the_faith_to_rome_decision_pluralist_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } +} + +################################################## +# An Iberian Rite +# by Ewan Cowhig Croft +# 0111 - 0120 +################################################## + +# Mozarabic Christianity breaks away from Rome's strictures. +iberia_north_africa.0111 = { + type = character_event + title = iberia_north_africa.0111.t + desc = iberia_north_africa.0111.desc + theme = faith + left_portrait = { + character = scope:religious_leader + animation = personality_vengeful + } + right_portrait = { + character = scope:pope + animation = fear + } + + immediate = { play_music_cue = "mx_cue_faith_conversion" } + + # Jesus taught peace, and we shall follow: swap Rite for Pacifism. + option = { + name = iberia_north_africa.0111.a + flavor = iberia_north_africa.0111.a.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_break_with_rome_decision_righteous_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:righteous + } + + stress_impact = { + shy = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_zeal = 0.5 + } + } + } + + # Even without Rome, we know the value of defending our own: swap Rite for Armed Pilgrimages. + option = { + name = iberia_north_africa.0111.b + flavor = iberia_north_africa.0111.b.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_break_with_rome_decision_fundamentalist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:fundamentalist + } + + stress_impact = { + compassionate = medium_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } + + # Is Islam not a religion of the Book too?: swap Rite for Islamic Syncretism. + option = { + name = iberia_north_africa.0111.c + flavor = iberia_north_africa.0111.c.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_break_with_rome_decision_pluralist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:pluralist + } + + stress_impact = { + lazy = medium_stress_impact_loss + arbitrary = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 0.5 + } + } + } + + after = { + mozarabic_break_with_rome_decision_hof_and_ecumenism_processing_scripted_effect = yes + # Now take care of notification events for players. + every_player = { + limit = { + this != scope:religious_leader + OR = { + faith = faith:mozarabic_church + any_neighboring_and_across_water_top_liege_realm_owner = { this = root.top_liege } + } + } + trigger_event = iberia_north_africa.0112 + } + # And finally, actually apply the effects. + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:fundamentalist + } + mozarabic_break_with_rome_decision_fundamentalist_path_scripted_effect = yes + } + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:righteous + } + mozarabic_break_with_rome_decision_righteous_path_scripted_effect = yes + } + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:pluralist + } + mozarabic_break_with_rome_decision_pluralist_path_scripted_effect = yes + } + } +} + +# Notification event for relevant players. +iberia_north_africa.0112 = { + type = character_event + title = iberia_north_africa.0112.t + desc = { + desc = iberia_north_africa.0112.desc.intro + # Fundamentalist + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:fundamentalist } + desc = iberia_north_africa.0112.desc.fundamentalist + } + # Righteous + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:righteous } + desc = iberia_north_africa.0112.desc.righteous + } + # Pluralist + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:pluralist } + desc = iberia_north_africa.0112.desc.pluralist + } + } + theme = faith + left_portrait = { + character = scope:religious_leader + animation = personality_vengeful + } + right_portrait = { + character = scope:pope + animation = fear + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + } + + # Fundamentalist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = faith:mozarabic_church } + desc = iberia_north_africa.0112.a.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0112.a.same_religion + } + desc = iberia_north_africa.0112.a.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:fundamentalist } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_break_with_rome_decision_fundamentalist_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Righteous path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = faith:mozarabic_church } + desc = iberia_north_africa.0112.b.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0112.b.same_religion + } + desc = iberia_north_africa.0112.b.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:righteous } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_break_with_rome_decision_righteous_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Pluralist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + faith = { + OR = { + this = faith:mozarabic_church + has_doctrine = tenet_islamic_syncretism + } + } + } + desc = iberia_north_africa.0112.c.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0112.c.same_religion + } + triggered_desc = { + trigger = { religion = religion:islam_religion } + desc = iberia_north_africa.0112.c.same_religion + } + desc = iberia_north_africa.0112.c.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:pluralist } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_break_with_rome_decision_pluralist_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + after = { + show_as_tooltip = { mozarabic_break_with_rome_decision_hof_and_ecumenism_processing_scripted_effect = yes } + } +} + +################################################## +# A Return to the Countryside +# ^Geddit GEDDIT [not-actually-particularly-clever chortling] +# by Ewan Cowhig Croft +# 0121 - 0130 +################################################## + +# A disillusioned ruler seeks out and sponsors the remnant pagan aspects of the Pyrenees. +iberia_north_africa.0121 = { + type = character_event + title = iberia_north_africa.0121.t + desc = { + desc = iberia_north_africa.0121.desc.intro + # Nab the rationalisation. + desc = { + # We order these according to approximate rarity level/importance. + ## They're kept isolated in a scripted trigger file so that we can maintain easy parity between the decision rationales & the event desc rationales. + first_valid = { + # Excommunicated + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_excommunicated_trigger = yes } + desc = iberia_north_africa.0121.desc.excommunicated + } + # Rivalry with HoF + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_hof_rivalry_trigger = yes } + desc = iberia_north_africa.0121.desc.rivalry_with_hof + } + # Negative Piety Level + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_negative_piety_level_trigger = yes } + desc = iberia_north_africa.0121.desc.negative_piety_level + } + # Easter egg: the Lorgar special + triggered_desc = { + trigger = { has_trait = zealous } + desc = iberia_north_africa.0121.desc.lorgar + } + # Sinful Traits + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_sinful_traits_trigger = yes } + desc = iberia_north_africa.0121.desc.sinful_traits + } + # Virtuous Basque pagan traits + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_virtuous_basque_pagan_traits_trigger = yes } + desc = iberia_north_africa.0121.desc.virtuous_basque_pagan_traits + } + # Naked cynicism; we use this as the fallback. + desc = iberia_north_africa.0121.desc.naked_cynicism + } + } + desc = iberia_north_africa.0121.desc.outro + } + theme = faith + left_portrait = { + character = scope:religious_leader + animation = scheme + } + right_portrait = { + character = scope:scandalised_cleric + animation = stress + } + override_background = { reference = wilderness_mountains } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + } + + # scope:basque_faith shall be a warrior's faith again!: swap Christian Syncretism for Warmonger. + option = { + name = iberia_north_africa.0121.a + flavor = iberia_north_africa.0121.a.tt + # The AI should only really be doing this if they're coming out of the Vikings or otherwise have suitable traits. + trigger = { + OR = { + is_ai = no + scope:old_faith = { has_doctrine_parameter = great_holy_wars_active_if_reformed } + has_trait = wrathful + has_trait = crusader_king + has_trait = faith_warrior + } + } + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { favour_the_countryside_basques_decision_fundamentalist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = basque_choice + value = flag:righteous + } + + stress_impact = { + base = major_stress_impact_gain + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_energy = 0.5 + } + } + } + + # It is more important to live in harmony with nature than with neighbours: swap Christian Syncretism for Sanctity of Nature. + option = { + name = iberia_north_africa.0121.b + flavor = iberia_north_africa.0121.b.tt + # The AI should only be doing this if they're self-assured about what it'll likely do to them, or it's something they're already in to. + trigger = { + OR = { + is_ai = no + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + AND = { + OR = { + has_trait = stubborn + has_trait = patient + has_trait = lifestyle_gardener + } + has_trait = calm + has_trait = brave + } + } + } + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { favour_the_countryside_basques_decision_righteous_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = basque_choice + value = flag:fundamentalist + } + + stress_impact = { + base = major_stress_impact_gain + # I mean, you *know* this one is gonna come back to bite you, hard. + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = -1 + } + } + } + + # There are more worthy religions to share traditions with...: swap Christian Syncretism for Islamic Syncretism. + option = { + name = iberia_north_africa.0121.c + flavor = iberia_north_africa.0121.c.tt + # The AI should only really be doing this if it means they're adopting *less* traditions, not more. + trigger = { + OR = { + is_ai = no + faith = { + has_doctrine_parameter = islamic_syncretic_actor_opinion_active + religion = religion:islam_religion + } + } + } + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { favour_the_countryside_basques_decision_pluralist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = basque_choice + value = flag:pluralist + } + + # Zealous Muslims & syncretics gain less stress from this. + if = { + limit = { + faith = { + has_doctrine_parameter = islamic_syncretic_actor_opinion_active + religion = religion:islam_religion + } + } + stress_impact = { + base = major_stress_impact_gain + zealous = medium_stress_impact_loss + fickle = minor_stress_impact_gain + drunkard = major_stress_impact_gain + } + } + # But everyone else doesn't. + else = { + stress_impact = { + base = major_stress_impact_gain + fickle = minor_stress_impact_gain + drunkard = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 1 + } + } + } + + # If I try to force change, am I any less corrupt than scope:old_faith?: leave the faith as you found it. + option = { + name = iberia_north_africa.0121.d + flavor = iberia_north_africa.0121.d.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { favour_the_countryside_basques_decision_default_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = basque_choice + value = flag:unchanged + } + + stress_impact = { + lazy = minor_stress_impact_loss + arbitrary = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = -0.5 + } + } + } + + after = { + legend_seed_great_deed_faith_effect = { + OLD_FAITH = scope:old_faith + ANTAGONIST = scope:scandalised_cleric + } + # Now take care of notification events for players. + every_player = { + limit = { + this != scope:religious_leader + OR = { + favour_the_countryside_basques_counts_as_basque_trigger = yes + any_neighboring_and_across_water_top_liege_realm_owner = { this = root.top_liege } + } + } + trigger_event = iberia_north_africa.0122 + } + # And finally, actually apply the effects. + ## Our default stuff. + favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes + ## Then our changes/lack of changes. + if = { + limit = { + exists = scope:basque_choice + scope:basque_choice = flag:fundamentalist + } + favour_the_countryside_basques_decision_righteous_path_scripted_effect = yes + } + else_if = { + limit = { + exists = scope:basque_choice + scope:basque_choice = flag:righteous + } + favour_the_countryside_basques_decision_fundamentalist_path_scripted_effect = yes + } + else_if = { + limit = { + exists = scope:basque_choice + scope:basque_choice = flag:pluralist + } + favour_the_countryside_basques_decision_pluralist_path_scripted_effect = yes + } + else_if = { + limit = { + exists = scope:basque_choice + scope:basque_choice = flag:unchanged + } + favour_the_countryside_basques_decision_default_path_scripted_effect = yes + } + } +} + +# Notification event for relevant players. +iberia_north_africa.0122 = { + type = character_event + title = iberia_north_africa.0122.t + desc = { + desc = iberia_north_africa.0122.desc.intro + # Nab the rationalisation. + desc = { + # We order these according to approximate rarity level/importance. + ## They're kept isolated in a scripted trigger file so that we can maintain easy parity between the decision rationales & the event desc rationales. + first_valid = { + # Excommunicated + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_excommunicated_trigger = yes } + desc = iberia_north_africa.0122.desc.excommunicated + } + # Rivalry with HoF + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_hof_rivalry_trigger = yes } + desc = iberia_north_africa.0122.desc.rivalry_with_hof + } + # Negative Piety Level + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_negative_piety_level_trigger = yes } + desc = iberia_north_africa.0122.desc.negative_piety_level + } + # Easter egg: the Lorgar special + triggered_desc = { + trigger = { has_trait = zealous } + desc = iberia_north_africa.0122.desc.lorgar + } + # Sinful Traits + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_sinful_traits_trigger = yes } + desc = iberia_north_africa.0122.desc.sinful_traits + } + # Virtuous Basque pagan traits + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_virtuous_basque_pagan_traits_trigger = yes } + desc = iberia_north_africa.0122.desc.virtuous_basque_pagan_traits + } + # Naked cynicism; we use this as the fallback. + desc = iberia_north_africa.0122.desc.naked_cynicism + } + } + desc = iberia_north_africa.0122.desc.midtro + # What direction is the faith going? + first_valid = { + # Fundamentalist + triggered_desc = { + trigger = { scope:basque_choice = flag:fundamentalist } + desc = iberia_north_africa.0122.desc.fundamentalist + } + # Righteous + triggered_desc = { + trigger = { scope:basque_choice = flag:righteous } + desc = iberia_north_africa.0122.desc.righteous + } + # Pluralist + triggered_desc = { + trigger = { scope:basque_choice = flag:pluralist } + desc = iberia_north_africa.0122.desc.pluralist + } + # Unchanged + triggered_desc = { + trigger = { scope:basque_choice = flag:unchanged } + desc = iberia_north_africa.0122.desc.unchanged + } + } + } + theme = faith + left_portrait = { + character = scope:religious_leader + animation = scheme + } + right_portrait = { + character = scope:scandalised_cleric + animation = stress + } + override_background = { reference = wilderness_mountains } + + immediate = { play_music_cue = "mx_cue_faith_conversion" } + + # Culturally Basque or Basque-adjacent player; join in? + option = { + name = iberia_north_africa.0122.a + trigger = { + is_ai = no + favour_the_countryside_basques_counts_as_basque_trigger = yes + } + + set_character_faith_with_conversion = scope:religious_leader.faith + show_as_tooltip = { + scope:religious_leader = { + favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes + favour_the_countryside_basques_decision_righteous_path_scripted_effect = yes + } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 0 + } + } + + # Fundamentalist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = scope:old_faith } + desc = iberia_north_africa.0122.b.same_faith + } + triggered_desc = { + trigger = { religion = scope:old_faith.religion } + desc = iberia_north_africa.0122.b.same_religion + } + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = great_holy_wars_active_if_reformed } + } + desc = iberia_north_africa.0122.b.respects_fellow_warmongers + } + desc = iberia_north_africa.0122.b.misc + } + } + } + trigger = { scope:basque_choice = flag:fundamentalist } + + show_as_tooltip = { + scope:religious_leader = { + favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes + favour_the_countryside_basques_decision_righteous_path_scripted_effect = yes + } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Righteous path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = scope:old_faith } + desc = iberia_north_africa.0122.c.same_faith + } + triggered_desc = { + trigger = { religion = scope:old_faith.religion } + desc = iberia_north_africa.0122.c.same_religion + } + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + desc = iberia_north_africa.0122.c.believes_in_harmony_with_nature + } + desc = iberia_north_africa.0122.c.misc + } + } + } + trigger = { scope:basque_choice = flag:righteous } + + show_as_tooltip = { + scope:religious_leader = { + favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes + favour_the_countryside_basques_decision_fundamentalist_path_scripted_effect = yes + } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Pluralist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith.religion = religion:islam_religion } + desc = iberia_north_africa.0122.d.muslim + } + triggered_desc = { + trigger = { faith = scope:old_faith } + desc = iberia_north_africa.0122.d.same_faith + } + triggered_desc = { + trigger = { religion = scope:old_faith.religion } + desc = iberia_north_africa.0122.d.same_religion + } + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = islamic_syncretic_actor_opinion_active } + } + desc = iberia_north_africa.0122.d.syncretised_with_islam + } + desc = iberia_north_africa.0122.d.misc + } + } + } + trigger = { scope:basque_choice = flag:pluralist } + + show_as_tooltip = { + scope:religious_leader = { + favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes + favour_the_countryside_basques_decision_pluralist_path_scripted_effect = yes + } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Unchanged path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = scope:old_faith } + desc = iberia_north_africa.0122.e.same_faith + } + triggered_desc = { + trigger = { religion = scope:old_faith.religion } + desc = iberia_north_africa.0122.e.same_religion + } + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = christian_syncretic_actor_opinion_active } + } + desc = iberia_north_africa.0122.e.syncretised_with_christianity + } + desc = iberia_north_africa.0122.e.misc + } + } + } + trigger = { scope:basque_choice = flag:unchanged } + + show_as_tooltip = { + scope:religious_leader = { favour_the_countryside_basques_decision_pluralist_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } +} + +################################################## +# A Kingdom around the Aragon +# by Ewan Cowhig Croft +# 0131 - 0140 +################################################## + +scripted_trigger convert_random_aragonese_counties_in_d_aragon_basic_reqs_trigger = { + tier = tier_county + NOT = { culture = culture:aragonese } +} + +scripted_effect copy_over_new_cultural_pillars_to_aragonese_effect = { + culture:aragonese = { + # Language. + if = { + limit = { + NOT = { has_same_culture_language = scope:founder_culture } + } + set_language_from = scope:founder_culture + } + # Martial Tradition. + if = { + limit = { + NOT = { has_same_culture_martial_tradition = scope:founder_culture } + } + set_martial_custom_from = scope:founder_culture + } + # We don't do heritage because we don't want to shift Aragonese out of the Iberian block. + } +} + +scripted_effect calculate_controlled_aragonese_duchies_effect = { + random_list = { + 100 = { + trigger = { + completely_controls = title:d_valencia + trigger_if = { + limit = { exists = scope:duchy_a } + NOT = { scope:duchy_a = title:d_valencia } + } + trigger_if = { + limit = { exists = scope:duchy_b } + NOT = { scope:duchy_a = title:d_valencia } + } + trigger_if = { + limit = { exists = scope:duchy_c } + NOT = { scope:duchy_a = title:d_valencia } + } + } + title:d_valencia = { + if = { + limit = { + NOT = { exists = scope:duchy_a } + } + save_scope_as = duchy_a + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + exists = scope:duchy_b + } + } + save_scope_as = duchy_b + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + this = scope:duchy_b + exists = scope:duchy_c + } + } + save_scope_as = duchy_c + } + } + } + 100 = { + trigger = { + completely_controls = title:d_barcelona + trigger_if = { + limit = { exists = scope:duchy_a } + NOT = { scope:duchy_a = title:d_barcelona } + } + trigger_if = { + limit = { exists = scope:duchy_b } + NOT = { scope:duchy_a = title:d_barcelona } + } + trigger_if = { + limit = { exists = scope:duchy_c } + NOT = { scope:duchy_a = title:d_barcelona } + } + } + title:d_barcelona = { + if = { + limit = { + NOT = { exists = scope:duchy_a } + } + save_scope_as = duchy_a + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + exists = scope:duchy_b + } + } + save_scope_as = duchy_b + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + this = scope:duchy_b + exists = scope:duchy_c + } + } + save_scope_as = duchy_c + } + } + } + 100 = { + trigger = { + completely_controls = title:d_navarra + trigger_if = { + limit = { exists = scope:duchy_a } + NOT = { scope:duchy_a = title:d_navarra } + } + trigger_if = { + limit = { exists = scope:duchy_b } + NOT = { scope:duchy_a = title:d_navarra } + } + trigger_if = { + limit = { exists = scope:duchy_c } + NOT = { scope:duchy_a = title:d_navarra } + } + } + title:d_navarra = { + if = { + limit = { + NOT = { exists = scope:duchy_a } + } + save_scope_as = duchy_a + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + exists = scope:duchy_b + } + } + save_scope_as = duchy_b + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + this = scope:duchy_b + exists = scope:duchy_c + } + } + save_scope_as = duchy_c + } + } + } + } +} + +scripted_effect convert_aragonese_counties_to_aragonese_effect = { + # Several counties within d_aragon will convert. + while = { + custom = form_the_kingdom_of_aragon_decision.tt.x_random_counties_in_d_aragon + count = 3 + title:d_aragon = { + random_in_de_jure_hierarchy = { + # If scope:founder has their capital in the area, make sure we grab it first. + limit = { + convert_random_aragonese_counties_in_d_aragon_basic_reqs_trigger = yes + this = scope:founder.capital_county + } + # Otherwise, go for c_alto_aragon, but we want it to *look* random. + alternative_limit = { + convert_random_aragonese_counties_in_d_aragon_basic_reqs_trigger = yes + this = title:c_alto_aragon + this != scope:founder.capital_county + } + # Then we grab any local county held by scope:founder. + alternative_limit = { + convert_random_aragonese_counties_in_d_aragon_basic_reqs_trigger = yes + holder = scope:founder + any_neighboring_county = { culture = culture:aragonese } + } + set_county_culture = culture:aragonese + } + } + } +} + +# Aragon, and the Aragonese, has/have emerged. +iberia_north_africa.0131 = { + type = character_event + title = iberia_north_africa.0131.t + desc = { + desc = iberia_north_africa.0131.desc.intro + first_valid = { + # Only has the minimum one duchy. + triggered_desc = { + trigger = { + NOT = { exists = scope:duchy_b } + } + desc = iberia_north_africa.0131.desc.duchy.one + } + # Has an extra duchy. + triggered_desc = { + trigger = { + NOT = { exists = scope:duchy_c } + } + desc = iberia_north_africa.0131.desc.duchy.two + } + # Has all three duchies! + desc = iberia_north_africa.0131.desc.duchy.three + } + desc = iberia_north_africa.0131.desc.outro + } + theme = crown + left_portrait = { + character = scope:founder + animation = personality_bold + } + override_background = { reference = farmland } + + trigger = { + # Account for ruler designer'd Aragonese cultures. + NOT = { culture = culture:aragonese } + } + + on_trigger_fail = { + # If you ruler designer'd in an Aragonese character, everything in this event is irrelevant to ye appart from the culture converting, so we just do that silently. + convert_aragonese_counties_to_aragonese_effect = yes + } + + immediate = { + play_music_cue = "mx_cue_succession_instrumental" + # Calculate scopes for the desc loc. + calculate_controlled_aragonese_duchies_effect = yes + calculate_controlled_aragonese_duchies_effect = yes + calculate_controlled_aragonese_duchies_effect = yes + # Flip scope:founder's culture. + set_culture = culture:aragonese + # Change the culture a bit. + culture:aragonese = { + # Innovations are transferred over. + get_all_innovations_from = scope:founder_culture + # And the creation of the culture is adjusted. + reset_culture_creation_date = yes + } + # Several counties within d_aragon will convert. + convert_aragonese_counties_to_aragonese_effect = yes + legend_seed_new_title_effect = yes + } + + # Vanilla: just the regular Aragonese culture, please. + option = { + name = iberia_north_africa.0131.a + + # No other effects. + + # No stress impact, since it's too tricksy to figure out which traits should get stress from absorbing what foreign cultural pillars. + ai_chance = { + # The AI should basically always opt for vanilla. + base = 100 + } + } + + # Take Pillars: not all the trappings of scope:founder_culture are so bad... + option = { + name = iberia_north_africa.0131.b + trigger = { + culture:aragonese = { + OR = { + NOT = { has_same_culture_language = scope:founder_culture } + NOT = { has_same_culture_martial_tradition = scope:founder_culture } + } + } + } + + # Copy over the salient pillars. + copy_over_new_cultural_pillars_to_aragonese_effect = yes + + # No stress impact, since it's too tricksy to figure out which traits should get stress from absorbing what foreign cultural pillars. + ai_chance = { + # The AI should basically always opt for vanilla. + base = 0 + } + } + + # Take Ethos: what's important to us hasn't changed. + option = { + name = iberia_north_africa.0131.c + trigger = { + culture:aragonese = { + NOT = { has_same_culture_ethos = scope:founder_culture } + } + } + + # Copy over the ethos. + culture:aragonese = { set_ethos_from = scope:founder_culture } + + # No stress impact, since it's too tricksy to figure out which traits should get stress from absorbing what foreign cultural pillars. + ai_chance = { + # The AI should basically always opt for vanilla. + base = 0 + } + } + + # Take Both: we cannot forget our roots! + option = { + name = iberia_north_africa.0131.d + trigger = { + culture:aragonese = { + NOT = { has_same_culture_ethos = scope:founder_culture } + OR = { + NOT = { has_same_culture_language = scope:founder_culture } + NOT = { has_same_culture_martial_tradition = scope:founder_culture } + } + } + } + + # Copy over the ethos. + culture:aragonese = { set_ethos_from = scope:founder_culture } + # Copy over the salient pillars. + copy_over_new_cultural_pillars_to_aragonese_effect = yes + + # No stress impact, since it's too tricksy to figure out which traits should get stress from absorbing what foreign cultural pillars. + ai_chance = { + # The AI should basically always opt for vanilla. + base = 0 + # ... *basically* always. + modifier = { + add = 100 + has_trait = stubborn + } + } + } +} + +# No notification event for this'un, as it's a small decision. + +# Secure the Mediterranean notif +iberia_north_africa.2105 = { + type = character_event + title = iberia_north_africa.2105.t + desc = iberia_north_africa.2105.desc + theme = crown + override_background = { reference = throne_room_mediterranean } + left_portrait = root + + immediate = { + show_as_tooltip = { + house = { + add_house_modifier = { + modifier = fp2_controls_the_mediterranean_house_modifier + years = 100 + } + } + dynasty = { add_dynasty_prestige = major_prestige_gain } + } + } + + option = { + name = iberia_north_africa.2105.a + custom_tooltip = secure_mediterranean_decision.a + } +} + +######################################################## +# golden_age_jewish_science_in_iberia_decision events +# By Hugo Cortell +# +# Note: These events are all additional +# rewards for sponsoring a golden age, +# therefore they are not much of a challenge. +# Just some cool free stuff for players! +######################################################## +iberia_north_africa.2001 = { # Jewish translator of old books (reward: skill boost) + type = character_event + title = iberia_north_africa.2001.t + desc = iberia_north_africa.2001.desc + + theme = learning + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:generated_actor + animation = admiration + } + + immediate = { + create_character = { + age = { 24 51 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = faith:rabbinism + random_traits = yes + trait = education_learning_2 + learning = { 6 12 } + + dynasty = none + after_creation = { + add_prestige = { minor_prestige_gain major_prestige_gain } + add_piety = { minor_piety_gain medium_piety_gain } + } + + save_scope_as = generated_actor + } + + get_lowest_player_skill_effect = yes + } + + option = { # Request a book that will make up for your weaknesses - for a price + flavor = iberia_north_africa.2001.a.a + name = { + text = { + desc = iberia_north_africa.2001.a + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:lowest_player_skill = flag:martial } + desc = iberia_north_africa.2001.a.martial + } + triggered_desc = { + trigger = { scope:lowest_player_skill = flag:learning } + desc = iberia_north_africa.2001.a.learning + } + triggered_desc = { + trigger = { scope:lowest_player_skill = flag:stewardship } + desc = iberia_north_africa.2001.a.stewardship + } + desc = iberia_north_africa.2001.a.diplointrigue + } + } + desc = iberia_north_africa.2001.a.end + } + } + + send_interface_message = { + type = event_learning_good + title = iberia_north_africa.2001.t + right_icon = scope:generated_actor + + pay_short_term_gold = { + target = scope:generated_actor + gold = medium_gold_value + } + if = { + limit = { scope:lowest_player_skill = flag:diplomacy } + add_character_modifier = { + modifier = fp2_translated_skill_book_diplomacy_modifier + years = 20 + } + } + else_if = { + limit = { scope:lowest_player_skill = flag:martial } + add_character_modifier = { + modifier = fp2_translated_skill_book_martial_modifier + years = 20 + } + } + else_if = { + limit = { scope:lowest_player_skill = flag:stewardship } + add_character_modifier = { + modifier = fp2_translated_skill_book_stewardship_modifier + years = 20 + } + } + else_if = { + limit = { scope:lowest_player_skill = flag:intrigue } + add_character_modifier = { + modifier = fp2_translated_skill_book_intrigue_modifier + years = 20 + } + } + else = { + add_character_modifier = { + modifier = fp2_translated_skill_book_learning_modifier + years = 20 + } + } + } + + ai_chance = { + base = 20 + modifier = { + add = -50 + short_term_gold < medium_gold_value + } + } + } + + option = { # Sure give me anything (no control over outcome, but always positive - and at a lower cost) + name = iberia_north_africa.2001.b + + show_as_tooltip = { + pay_short_term_gold = { + target = scope:generated_actor + gold = minor_gold_value + } + custom_tooltip = iberia_north_africa.2001.b.a + } + hidden_effect = { + send_interface_message = { + type = event_learning_good + title = iberia_north_africa.2001.t + right_icon = scope:generated_actor + + pay_short_term_gold = { + target = scope:generated_actor + gold = minor_gold_value + } + random_list = { + 1 = { + add_character_modifier = { + modifier = fp2_translated_skill_book_diplomacy_modifier + years = 20 + } + } + 1 = { + add_character_modifier = { + modifier = fp2_translated_skill_book_martial_modifier + years = 20 + } + } + 1 = { + add_character_modifier = { + modifier = fp2_translated_skill_book_stewardship_modifier + years = 20 + } + } + 1 = { + add_character_modifier = { + modifier = fp2_translated_skill_book_intrigue_modifier + years = 20 + } + } + 1 = { + add_character_modifier = { + modifier = fp2_translated_skill_book_learning_modifier + years = 20 + } + } + } + } + } + + ai_chance = { + base = 80 + modifier = { + add = -50 + short_term_gold < minor_gold_value + } + } + } + + option = { # History is dumb + name = iberia_north_africa.2001.c + + send_interface_message = { + type = event_learning_good + title = fp2_rejection_of_old_thoughts_modifier + right_icon = root + + capital_county = { + add_county_modifier = { + modifier = fp2_rejection_of_old_thoughts_modifier + years = 5 + } + } + } + + ai_chance = { base = 35 } + } + + after = { scope:generated_actor = { silent_disappearance_effect = yes } } +} + +iberia_north_africa.2002 = { # Cataract surgery event (reward: free doctor) + type = character_event + title = iberia_north_africa.2002.t + desc = iberia_north_africa.2002.desc + + theme = learning + override_background = { reference = throne_room } + left_portrait = { + character = scope:patientzero + animation = beg + } + lower_left_portrait = root + right_portrait = { + character = scope:generated_actor + animation = disapproval + } + + trigger = { + any_vassal_or_below = { + age > 48 # Cataracts begin to develop at 40 years of age and usually finish by 60, therefore 50 seems like a decent value for a medieval high-society member + NOT = { has_trait = blind } + } + } + + immediate = { + create_character = { + age = { 21 44 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = faith:rabbinism + random_traits = yes + trait = scholar + trait = lifestyle_physician + learning = { 8 12 } + + dynasty = none + after_creation = { + add_gold = minor_gold_value + add_prestige = { medium_prestige_gain major_prestige_gain } + add_piety = minor_piety_gain + add_trait_xp = { + trait = lifestyle_physician + value = 100 + } + } + + save_scope_as = generated_actor + } + + random_vassal_or_below = { + limit = { + age > 48 + NOT = { has_trait = blind } + } + save_scope_as = patientzero + } + + if = { + limit = { + any_child = { + is_child_of = root + age < 15 + } + } + random_child = { + limit = { + is_child_of = root + age < 15 + } + save_scope_as = child_offering + } + } + } + + option = { # Offer your child as an assistant, ~50% chance of learning medicine, 10% chance of dying. (good odds by lunatic trait option standards) + name = iberia_north_africa.2002.a + flavor = iberia_north_africa.2002.a.flavor + + trigger = { + is_ai = no + exists = scope:child_offering + OR = { + has_trait = lunatic_1 + has_trait = lunatic_genetic + has_trait = lifestyle_physician + has_trait = torturer + } + } + + random_list = { + 50 = { + modifier = { + add = scope:child_offering.learning + always = yes + } + send_interface_message = { + type = event_court_physician_good + title = iberia_north_africa.2002.a.b + left_icon = scope:patientzero + right_icon = scope:generated_actor + + random_list = { + desc = iberia_north_africa.2002.a.a + 45 = {} # Assistant helps, but fails to learn anything + 45 = { + modifier = { + add = { + value = scope:child_offering.learning + divide = 1.25 + round = yes + } + always = yes + } + scope:child_offering = { + if = { # For really, really odd cases + limit = { has_trait = lifestyle_physician } + add_learning_lifestyle_xp = medium_lifestyle_experience + add_trait_xp = { + trait = lifestyle_physician + value = 5 + } + } + add_trait = lifestyle_physician + } + } + 10 = { + scope:child_offering = { + death = { death_reason = death_training_accident } + } + } + } + scope:patientzero = { + add_character_modifier = { + modifier = fp2_removed_cataracts_modifier + years = 30 + } + } + add_courtier = scope:generated_actor + add_prestige = medium_prestige_gain + } + } + 50 = { + send_interface_message = { + type = event_court_physician_bad + title = iberia_north_africa.2002.a.b + left_icon = scope:child_offering + right_icon = scope:patientzero + + random_list = { + desc = iberia_north_africa.2002.a.a + 45 = {} # Assistant helps, but fails to learn anything + 45 = { + scope:child_offering = { + add_trait = lifestyle_physician + } + } + 10 = { + scope:child_offering = { + death = { death_reason = death_training_accident } + } + } + } + scope:patientzero = { add_trait = blind } + } + } + } + } + + option = { # "Did you just "well actually" the entire field of astrology?" option, removes the risk of the doctor running away if the operation is botched + name = iberia_north_africa.2002.d + + trigger = { + OR = { + has_trait = theologian + has_trait = scholar + } + } + + random_list = { + 50 = { + send_interface_message = { + type = event_court_physician_good + title = iberia_north_africa.2002.a.b + left_icon = scope:patientzero + right_icon = scope:generated_actor + + scope:patientzero = { + add_character_modifier = { + modifier = fp2_removed_cataracts_modifier + years = 30 + } + } + add_courtier = scope:generated_actor + add_prestige = medium_prestige_gain + } + } + 50 = { + send_interface_message = { + type = event_court_physician_bad + title = iberia_north_africa.2002.a.b + left_icon = scope:patientzero + right_icon = scope:generated_actor + + scope:patientzero = { add_trait = blind } + add_courtier = scope:generated_actor + add_prestige = minor_prestige_loss + + hidden_effect = { + scope:patientzero = { + set_relation_rival = { + target = scope:generated_actor + reason = rival_failed_cataract_surgery + } + } + } # Reasonably upset + } + } + } + } + + option = { # Take the risk, gamble away the doctor for some renown + name = iberia_north_africa.2002.b + + random_list = { + 50 = { + send_interface_message = { + type = event_court_physician_good + title = iberia_north_africa.2002.a.b + left_icon = scope:patientzero + right_icon = scope:generated_actor + + scope:patientzero = { + add_character_modifier = { + modifier = fp2_removed_cataracts_modifier + years = 30 + } + } + add_courtier = scope:generated_actor + add_prestige = medium_prestige_gain + } + } + 50 = { + send_interface_message = { + type = event_court_physician_bad + title = iberia_north_africa.2002.a.b + right_icon = scope:patientzero + + scope:patientzero = { add_trait = blind } + } + } + } + + ai_chance = { + base = 50 + } + } + + option = { # Safe choice, ask the doctor to say (get free doctor) + name = iberia_north_africa.2002.c + + send_interface_message = { + type = send_interface_message + title = court_physician_court_position + right_icon = scope:generated_actor + + add_courtier = scope:generated_actor + add_prestige = medium_prestige_loss + scope:patientzero = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -25 + } + } + } + + ai_chance = { + base = 50 + } + } + + after = { + if = { + limit = { NOT = { scope:generated_actor = { is_courtier_of = root } } } + scope:generated_actor = { silent_disappearance_effect = yes } + } + } +} + +iberia_north_africa.2003 = { # Two scholars are fighting over misc stuff (reward: one scholar or two grumpy scholars) + type = character_event + title = iberia_north_africa.2003.t + desc = iberia_north_africa.2003.desc + + theme = learning + override_background = { reference = throne_room } + left_portrait = { + character = scope:generated_actor_r + animation = disapproval + } + right_portrait = { + character = scope:generated_actor_k + animation = dismissal + } + lower_center_portrait = root + + immediate = { + create_character = { + age = { 26 51 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = faith:rabbinism + random_traits = yes + trait = scholar + trait = diplomatic_court_1 + learning = { 8 14 } + + dynasty = none + after_creation = { + add_prestige = { minor_prestige_gain major_prestige_gain } + add_piety = { minor_piety_gain medium_piety_gain } + } + + save_scope_as = generated_actor_r + } + + create_character = { + age = { 23 43 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = faith:karaism + random_traits = yes + trait = theologian + trait = scholarly_court_1 + learning = { 8 14 } + + dynasty = none + after_creation = { + add_prestige = { minor_prestige_gain major_prestige_gain } + add_piety = { minor_piety_gain medium_piety_gain } + } + + save_scope_as = generated_actor_k + } + + hidden_effect = { # Let the drama begin + add_courtier = scope:generated_actor_r + add_courtier = scope:generated_actor_k + scope:generated_actor_r = { + add_opinion = { + target = scope:generated_actor_k + modifier = angry_opinion + opinion = -80 + } + } + scope:generated_actor_k = { + add_opinion = { + target = scope:generated_actor_r + modifier = angry_opinion + opinion = -80 + } + } + } + + # Loc + capital_county = { save_scope_as = playerprovince } + } + + option = { + name = iberia_north_africa.2003.a + flavor = iberia_north_africa.2003.a.flavor + + trigger = { # NOTE: You can type bypass_requirements to bypass requirements on options, very useful! + is_ai = no + OR = { + has_trait = bastard_founder + has_trait = saoshyant + has_trait = sayyid + has_trait = savior + has_trait = augustus + has_trait = chakravarti + has_trait = heresiarch + has_trait = crusader_king + has_trait = order_member + has_trait = faith_warrior + has_trait = saint + has_trait = irritable + has_trait = bossy + has_trait = august + } + } + + send_interface_message = { + type = event_learning_good + title = yearly.0001.learning + right_icon = scope:generated_actor_r + left_icon = scope:generated_actor_k + + show_as_tooltip = { + add_courtier = scope:generated_actor_r + add_courtier = scope:generated_actor_k + } + scope:generated_actor_r = { + add_opinion = { + target = root + modifier = feast_sided_against_me_in_my_fight_opinion + opinion = -60 + } + } + scope:generated_actor_k = { + add_opinion = { + target = root + modifier = feast_sided_against_me_in_my_fight_opinion + opinion = -60 + } + } + } + } + + # NOTE: Neither faith is more progressive than the other, therefore this is just the personal opinion of the characters rather than a greater religious feud + option = { # Side with philosophers + name = iberia_north_africa.2003.b + + send_interface_message = { + type = event_learning_good + title = yearly.0001.learning + right_icon = scope:generated_actor_k + + show_as_tooltip = { add_courtier = scope:generated_actor_k } + remove_courtier_or_guest = scope:generated_actor_r + scope:generated_actor_k = { + add_opinion = { + target = root + modifier = feast_sided_with_me_in_my_fight_opinion + opinion = 25 + } + } + } + + ai_chance = { base = 50 } + } + + option = { # Side with prophets + name = iberia_north_africa.2003.c + + send_interface_message = { + type = event_learning_good + title = yearly.0001.learning + right_icon = scope:generated_actor_r + + show_as_tooltip = { add_courtier = scope:generated_actor_r } + remove_courtier_or_guest = scope:generated_actor_k + scope:generated_actor_r = { + add_opinion = { + target = root + modifier = feast_sided_with_me_in_my_fight_opinion + opinion = 25 + } + } + } + + ai_chance = { base = 50 } + } +} + +######################################################## +# build_holy_pilgrim_roads_decision events +# By Hugo Cortell +######################################################## +iberia_north_africa.2011 = { # Holy Warrior + type = character_event + title = iberia_north_africa.2011.t + desc = { + desc = iberia_north_africa.2011.desc + first_valid = { + triggered_desc = { + trigger = { scope:generated_actor = { has_trait = order_member } } + desc = iberia_north_africa.2011.desc_captain + } + desc = iberia_north_africa.2011.desc_soldier + } + } + + theme = faith + override_background = { reference = terrain } + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:generated_actor + animation = personality_zealous + } + + trigger = { scope:chosen_location_for_pilgrim_roads.holder.top_liege = root } + + immediate = { + scope:chosen_location_for_pilgrim_roads = { random_county_province = { save_scope_as = pilgrim_spawn_location } } + random_list = { + 70 = { # A missguided holy warrior + create_character = { + age = { 19 34 } + location = scope:pilgrim_spawn_location + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + trait = holy_warrior + trait = pilgrim + martial = { 7 12 } + + dynasty = none + after_creation = { + add_gold = minor_gold_value + add_prestige = minor_prestige_gain + add_piety = { minor_piety_gain medium_piety_gain } + if = { + limit = { has_trait = cynical } + remove_trait = cynical + add_trait = zealous + } + random_list = { # Simple backstory + 1 = { add_trait = murderer } + 2 = { add_trait = wounded_1 } + 2 = { add_trait = wounded_2 } + 5 = { add_trait = adventurer } + 1 = { add_trait = lifestyle_hunter } + } + } + + save_scope_as = generated_actor + } + } + 30 = { # Missguided former holy order captain + create_character = { + age = { 27 46 } + location = scope:pilgrim_spawn_location + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + trait = warlike_court_2 + trait = holy_warrior + trait = order_member + trait = devoted + trait = pilgrim + trait = brave + martial = { 10 20 } + + dynasty = none + after_creation = { + add_gold = medium_gold_value + add_prestige = { minor_prestige_gain medium_prestige_gain } + add_piety = { + value = major_piety_gain + multiply = { 1 5 } + round = yes + } + if = { + limit = { has_trait = cynical } + remove_trait = cynical + add_trait = zealous + } + random_list = { # Spicy backstory (why would someone in such a cushy position wander off?) + 10 = { add_trait = murderer } + 5 = { add_trait = kinslayer_1 } + 5 = { + if = { + limit = { faith = { has_doctrine = tenet_communion } } + add_trait = excommunicated + random_list = { + 70 = { add_trait = depressed_1 } # This is the worst thing that can happen to a holy warrior after all + 30 = {} + } + } + else = { add_trait = wounded_2 } + } + 6 = { add_trait = adulterer } + 4 = { add_trait = fornicator } + 5 = { add_trait = drunkard } + } + } + + save_scope_as = generated_actor + } + } + } + } + + option = { # Join me (free warrior) + name = iberia_north_africa.2011.a + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2011.t + left_icon = ROOT + right_icon = scope:generated_actor + + add_courtier = scope:generated_actor + } + ai_chance = { base = 25 } + } + + option = { # Spread the word of me (gain modifier) + name = iberia_north_africa.2011.b + flavor = iberia_north_africa.2011.b.flavor + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2011.t + left_icon = ROOT + + add_character_modifier = { + modifier = fp2_trusted_by_pilgrim_warriors_modifier + years = 20 + } + } + + ai_chance = { base = 25 } + scope:generated_actor = { silent_disappearance_effect = yes } + } + + option = { # Finish your duty to the lord (gain piety) + name = iberia_north_africa.2011.c + flavor = iberia_north_africa.2011.c.flavor + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2011.t + left_icon = ROOT + + add_piety = major_piety_gain + } + + ai_chance = { base = 50 } + scope:generated_actor = { silent_disappearance_effect = yes } + } +} + +iberia_north_africa.2012 = { # Broke student (theology or architecture) + type = character_event + title = iberia_north_africa.2012.t + desc = { + desc = iberia_north_africa.2012.desc + first_valid = { + triggered_desc = { + trigger = { scope:generated_actor = { has_trait = theologian } } + desc = iberia_north_africa.2012.desc_student + } + desc = iberia_north_africa.2012.desc_architect + } + } + + theme = faith + override_background = { reference = terrain } + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:generated_actor + animation = admiration + } + + trigger = { scope:chosen_location_for_pilgrim_roads.holder.top_liege = root } + + immediate = { + scope:chosen_location_for_pilgrim_roads = { random_county_province = { save_scope_as = pilgrim_spawn_location } } + random_list = { + 50 = { # Scholar + create_character = { + age = { 18 22 } + location = scope:pilgrim_spawn_location + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + trait = theologian + trait = improvident + trait = scholarly_court_1 + trait = pilgrim + learning = { 9 12 } + + dynasty = none + after_creation = { + add_gold = { 0 28 } + remove_short_term_gold = 20 # You cannot add a negative number for gold, therefore we do this + add_prestige = minor_prestige_gain + add_piety = { minor_piety_gain medium_piety_gain } + if = { + limit = { has_trait = cynical } + remove_trait = cynical + add_trait = zealous + } + } + + save_scope_as = generated_actor + } + } + 50 = { # Architect + create_character = { + age = { 18 22 } + location = scope:pilgrim_spawn_location + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + trait = architect + trait = contrite + trait = administrative_court_1 + trait = pilgrim + learning = { 8 13 } + + dynasty = none + after_creation = { + add_gold = { 0 22 } + remove_short_term_gold = 10 + add_prestige = minor_prestige_gain + add_piety = minor_piety_gain + if = { + limit = { has_trait = cynical } + remove_trait = cynical + add_trait = zealous + } + } + + save_scope_as = generated_actor + } + } + } + } + + option = { # Buy journal + name = iberia_north_africa.2012.a + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2012.t + left_icon = ROOT + + add_learning_lifestyle_xp = major_lifestyle_experience + remove_short_term_gold = minor_gold_value + } + + ai_chance = { base = 35 } + scope:generated_actor = { silent_disappearance_effect = yes } + } + + option = { # Perhaps instead you should get a job + name = iberia_north_africa.2012.b + flavor = iberia_north_africa.2012.b.flavor # (okay, where? / at the [chosen_holy_site_for_pilgrim_roads.GetNameNoTier] / I have some good news for both of you) + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2012.t + left_icon = ROOT + right_icon = scope:generated_actor + + add_courtier = scope:generated_actor + add_hook_if_possible_effect = { + TARGET = scope:generated_actor + TYPE = indebted_hook + YEARS = 12 + } + } + + ai_chance = { base = 35 } + } + + option = { # Charity action + name = iberia_north_africa.2012.c + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2012.t + left_icon = ROOT + + add_piety = major_piety_gain + remove_short_term_gold = minor_gold_value + } + + ai_chance = { base = 35 } + scope:generated_actor = { silent_disappearance_effect = yes } + } +} + +iberia_north_africa.2013 = { # Warmup check to ensure you meet the conditions for 2014, otherwise do something else + hidden = yes + + trigger = { scope:chosen_location_for_pilgrim_roads.holder.top_liege = root } + immediate = { + if = { + limit = { + faith = { + exists = religious_head + religious_head != root + } + } + faith.religious_head = { save_scope_as = fp2_iberia_north_africa_2013_head_of_faith } + trigger_event = iberia_north_africa.2014 + } + else = { + random_list = { + 15 = { trigger_event = iberia_north_africa.2011 } + 15 = { trigger_event = iberia_north_africa.2012 } + # 30 = Removed third outcome + } + } + } +} + +iberia_north_africa.2014 = { # Getting a high five (and a gift) from your HOF + type = letter_event + sender = scope:fp2_iberia_north_africa_2013_head_of_faith + opening = iberia_north_africa.2013.t + desc = iberia_north_africa.2013.desc + + immediate = { + + } + + option = { # Butter your HOF up with complements + name = iberia_north_africa.2013.a + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2013.notif.t + right_icon = scope:fp2_iberia_north_africa_2013_head_of_faith + + scope:fp2_iberia_north_africa_2013_head_of_faith = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 40 + } + } + } + + ai_chance = { base = 10 } + } + + option = { # Give me the piety!! + name = iberia_north_africa.2013.b + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2013.notif.t + right_icon = scope:fp2_iberia_north_africa_2013_head_of_faith + + add_piety = major_piety_gain + } + + ai_chance = { base = 50 } + } + + option = { # Give me men! + name = iberia_north_africa.2013.c + + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2013.notif.t + right_icon = scope:fp2_iberia_north_africa_2013_head_of_faith + + add_character_modifier = { + modifier = fp2_trusted_by_pilgrim_warriors_modifier + years = 20 + } + } + + ai_chance = { base = 30 } + } + + option = { # Gift me a relic worthy of (location) - Does not req ROCO because it is a trinket + name = iberia_north_africa.2013.d + + show_as_tooltip = { custom_tooltip = iberia_north_africa.2013.d.tooltip } # Can cause strange behavior where a button is unselectable + hidden_effect = { + scope:fp2_iberia_north_africa_2013_head_of_faith = { + set_up_trinket_adjective_effect = yes + random_list = { + 2 = { + create_artifact = { + name = fp2_blessed_junk + description = fp2_blessed_junk_desc + type = miscellaneous + visuals = small_box + modifier = artifact_monthly_piety_1_modifier + save_scope_as = random_trinket + } + } + 1 = { + create_artifact = { + name = fp2_blessed_junk + description = fp2_blessed_junk_desc + type = miscellaneous + visuals = pouch + modifier = artifact_monthly_piety_1_modifier + save_scope_as = random_trinket + } + } + 1 = { + create_artifact = { + name = fp2_blessed_junk + description = fp2_blessed_junk_desc + type = miscellaneous + visuals = medallion + modifier = artifact_monthly_piety_1_modifier + save_scope_as = random_trinket + } + } + 2 = { + create_artifact = { + name = fp2_blessed_junk + description = fp2_blessed_junk_desc + type = miscellaneous + visuals = medium_box + modifier = artifact_monthly_piety_1_modifier + save_scope_as = random_trinket + } + } + 1 = { + create_artifact = { + name = fp2_blessed_junk + description = fp2_blessed_junk_desc + type = miscellaneous + visuals = fabric_roll + modifier = artifact_monthly_piety_1_modifier + save_scope_as = random_trinket + } + } + } + scope:random_trinket = { + add_durability = { + value = artifact_durability + multiply = { -0.45 -0.1 } # This is nice, very nice. + } + } + + if = { # Cleanup + limit = { exists = var:trinket_adjective_followup } + remove_variable = trinket_adjective_followup + } + } + } + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2013.notif.t + right_icon = scope:fp2_iberia_north_africa_2013_head_of_faith + left_icon = scope:random_trinket + + scope:random_trinket = { set_owner = root } + } + + ai_chance = { base = 10 } + } +} + +################ +# Restore Old Vasconia +# by Joe Parkin +################ + +#The kingdom revived. +iberia_north_africa.2100 = { + type = character_event + title = iberia_north_africa.2100.t + desc = iberia_north_africa.2100.desc + theme = realm + left_portrait = { + character = scope:founder + animation = personality_bold + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + restore_old_vasconia_decision_scripted_effect = yes + restore_old_vasconia_decision_tooltip_scripted_effect = yes + #Notify other players. + every_player = { + limit = { + #this != scope:founder + in_diplomatic_range = root + } + trigger_event = iberia_north_africa.2101 + } + } + + #Well done Nickname + option = { + name = iberia_north_africa.2100.a + give_nickname = nick_the_great + add_prestige = minor_prestige_gain + } + + #Well done. + option = { + name = iberia_north_africa.2100.b + add_prestige = medium_prestige_gain + } +} + +#Inform any players. +iberia_north_africa.2101 = { + type = character_event + title = iberia_north_africa.2100.t + desc = iberia_north_africa.2101.desc + theme = realm + theme = diplomacy + left_portrait = { + character = scope:founder + animation = personality_bold + } + + immediate = { + if = { + limit = { + culture = { + OR = { + this = culture:basque + AND = { + any_parent_culture_or_above = { this = culture:basque } + has_cultural_pillar = heritage_iberian + } + } + } + } + play_music_cue = "mx_cue_positive_effect" + } + restore_old_vasconia_decision_tooltip_scripted_effect = yes + } + + option = { + name = { #Basques are happy. + trigger = { + culture = { + OR = { + this = culture:basque + AND = { + any_parent_culture_or_above = { this = culture:basque } + has_cultural_pillar = heritage_iberian + } + } + } + } + text = iberia_north_africa.2100.b + } + name = { #Iberians and Franks/Occitans are outraged. + trigger = { + NOT = { + culture = { + OR = { + this = culture:basque + AND = { + any_parent_culture_or_above = { this = culture:basque } + has_cultural_pillar = heritage_iberian + } + } + } + } + culture = { + OR = { + has_cultural_pillar = heritage_frankish + has_cultural_pillar = heritage_iberian + } + } + } + text = iberia_north_africa.2101.b + } + name = { #Noone else especially cares. + trigger = { + culture = { + NOR = { + has_cultural_pillar = heritage_iberian + has_cultural_pillar = heritage_frankish + } + } + } + text = iberia_north_africa.2101.c + } + } +} diff --git a/N3OW/events/decisions_events/mpo_greatest_of_khans_events.txt b/N3OW/events/decisions_events/mpo_greatest_of_khans_events.txt new file mode 100644 index 00000000..5cde29eb --- /dev/null +++ b/N3OW/events/decisions_events/mpo_greatest_of_khans_events.txt @@ -0,0 +1,2825 @@ + +namespace = mpo_greatest_of_khans + + +################ +# Become Greatest of Khans events +#Jason Cantalini + +#Out of order so that event numbering can still mirror central_asia_events that provide base game Great Khan content (sorry) +#Hidden war of defiance setup event +mpo_greatest_of_khans.0100 = { + hidden = yes + immediate = { + #Remove primary defender truces with root AND START WAR! + scope:primary_coalition_defender = { + if = { + limit = { + OR = { + any_truce_holder = { + this = root + } + any_truce_target = { + this = root + } + } + } + cancel_truce_both_ways = root + } + if = { + limit = { + is_vassal_or_below_of = root + } + create_title_and_vassal_change = { + type = independency + save_scope_as = change + } + becomes_independent = { change = scope:change } + resolve_title_and_vassal_change = scope:change + } + #BEGIN THE WAR! + start_war = { + cb = mpo_great_war_of_defiance_cb + target = root + target_title = root.primary_title + } + random_character_war = { + limit = { + using_cb = mpo_great_war_of_defiance_cb + } + every_in_list = { + list = anti_gok_coalition_members + limit = { + NOR = { + is_defender_in_war = prev + is_attacker_in_war = prev + } + } + prev = { + add_attacker = prev + } + } + } + random_character_war = { + limit = { + using_cb = mpo_great_war_of_defiance_cb + } + every_in_list = { + list = obedient_nomad_vassals + limit = { + NOR = { + is_defender_in_war = prev + is_attacker_in_war = prev + } + } + prev = { + add_defender = prev + } + } + } + } + #End all the other wars characters are involved in + every_in_list = { + list = anti_gok_coalition_members + every_character_war = { + limit = { + NOR = { + using_cb = mpo_great_war_of_defiance_cb + using_cb = crusading_claim_cb + AND = { + primary_defender = prev + NOT = { + using_cb = peasant_war + } + } + primary_defender = { + is_ai = no + } + } + } + if = { + limit = { + primary_attacker = prev + } + end_war = white_peace + } + else = { + remove_participant = prev + } + } + } + every_in_list = { + list = obedient_nomad_vassals + every_character_war = { + limit = { + NOR = { + using_cb = mpo_great_war_of_defiance_cb + using_cb = crusading_claim_cb + AND = { + primary_defender = prev + NOT = { + using_cb = peasant_war + } + } + primary_defender = { + is_ai = no + } + } + } + if = { + limit = { + primary_attacker = prev + } + end_war = white_peace + } + else = { + remove_participant = prev + } + } + } + #Add global_variable that prevents anyone taking decision + if = { + limit = { + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + } + set_global_variable = { + name = mpo_gok_war_ongoing + value = root + } + } + random_character_war = { + limit = { + using_cb = mpo_great_war_of_defiance_cb + } + save_scope_as = gok_war + } + if = { + limit = { + OR = { + has_relation_potential_rival = scope:primary_coalition_defender + scope:primary_coalition_defender = { + opinion = { + target = root + value < -40 + } + } + } + } + set_relation_rival = { + target = scope:primary_coalition_defender + reason = rival_led_coalition_against_me + } + } + #Memory for Gurkhan + create_character_memory = { + type = gok_called_the_clans + } + + #trigger event for gurkhan - obedient vassals pledge to fight + if = { + limit = { + any_in_list = { + list = obedient_nomad_vassals + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + } + } + trigger_event = { + id = mpo_greatest_of_khans.0101 + days = 1 + } + } + else = { + #add submitters as tributaries since root is getting no event + every_in_list = { + list = gok_submitters + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + } + save_scope_as = gurkhan_to_gok + #Player notification and offer to join/submit event + every_player = { + limit = { + mpo_war_of_defiance_notified_player_trigger = yes + } + trigger_event = { + id = mpo_greatest_of_khans.0102 + days = 2 + } + } + } + } +} + +scripted_trigger mpo_greatest_of_khans_0101_ideal_vassal_trigger = { + is_adult = yes + is_imprisoned = no + has_contagious_deadly_disease_trigger = no + can_be_knight_trigger = { ARMY_OWNER = root } +} + +scripted_trigger mpo_greatest_of_khans_0101_uninvolved_vassal_trigger = { + NOR = { + is_obedient_to = root + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + is_at_war_with = root + has_relation_rival = root + is_imprisoned = yes + } + government_has_flag = government_is_nomadic + basic_is_available_ai = yes + is_adult = yes +} + +#You are the Gurkhan and now fighting to be GoK +mpo_greatest_of_khans.0101 = { + type = character_event + title = mpo_greatest_of_khans.0101.t + desc = { + desc = mpo_greatest_of_khans.0101.desc_intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:gok_opponent + NOT = { + scope:primary_coalition_defender = { + this = scope:gok_opponent + } + } + } + desc = mpo_greatest_of_khans.0101.desc_gok_opponent + } + desc = mpo_greatest_of_khans.0101.desc_primary_attacker + } + triggered_desc = { + trigger = { + exists = scope:big_sub + } + desc = mpo_greatest_of_khans.0101.desc_sub + } + desc = mpo_greatest_of_khans.0101.desc + } + theme = nomads + left_portrait = { + character = scope:vassal_1 + animation = horse_sword_shield + camera = camera_event_horse_left_forward + + } + right_portrait = { + character = scope:vassal_2 + animation = jockey_gallop + camera = camera_event_horse_right_forward + } + lower_left_portrait = scope:potential_joiner_1 + lower_center_portrait = scope:potential_joiner_2 + lower_right_portrait = scope:potential_joiner_3 + override_background = { reference = wilderness } + override_effect_2d = { + reference = rain + } + + trigger = { + is_at_war = yes + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + any_in_list = { + list = obedient_nomad_vassals + age >= 10 + is_imprisoned = no + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + } + } + + immediate = { + #add submitters as tributaries + if = { + limit = { + list_size = { + name = gok_submitters + value <= 4 + } + } + every_in_list = { + list = gok_submitters + custom_tooltip = became_your_tributary_tt + add_opinion = { + target = root + modifier = obedience_opinion + years = 10 + } + hidden_effect = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + } + } + } + #vague tooltip if too many to show + else = { + custom_tooltip = gok_submitters_became_tributaries_tt + hidden_effect = { + every_in_list = { + list = gok_submitters + custom_tooltip = became_your_tributary_tt + add_opinion = { + target = root + modifier = obedience_opinion + years = 10 + } + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + } + } + } + + if = { + limit = { + any_in_list = { + list = gok_submitters + } + } + ordered_in_list = { + list = gok_submitters + order_by = current_military_strength + save_scope_as = big_sub + } + } + if = { + limit = { + any_in_list = { + list = obedient_nomad_vassals + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + mpo_greatest_of_khans_0101_ideal_vassal_trigger = yes + } + } + ordered_in_list = { + list = obedient_nomad_vassals + order_by = current_military_strength + limit = { + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + mpo_greatest_of_khans_0101_ideal_vassal_trigger = yes + } + save_scope_as = vassal_1 + } + } + else = { + ordered_in_list = { + list = obedient_nomad_vassals + order_by = current_military_strength + limit = { + is_adult = yes + is_imprisoned = no + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + } + save_scope_as = vassal_1 + } + } + if = { + limit = { + any_in_list = { + list = obedient_nomad_vassals + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + mpo_greatest_of_khans_0101_ideal_vassal_trigger = yes + NOT = { this = scope:vassal_1 } + } + } + ordered_in_list = { + list = obedient_nomad_vassals + order_by = current_military_strength + limit = { + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + mpo_greatest_of_khans_0101_ideal_vassal_trigger = yes + NOT = { this = scope:vassal_1 } + } + save_scope_as = vassal_2 + } + } + else = { + ordered_in_list = { + list = obedient_nomad_vassals + order_by = current_military_strength + limit = { + age >= 10 + is_imprisoned = no + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + NOT = { this = scope:vassal_1 } + } + save_scope_as = vassal_2 + } + } + scope:vassal_1 = { + add_character_flag = need_military_outfit + } + scope:vassal_2 ?= { + add_character_flag = need_military_outfit + } + #Potential additional joiners + ordered_vassal = { + order_by = current_military_strength + limit = { + mpo_greatest_of_khans_0101_uninvolved_vassal_trigger = yes + } + save_scope_as = potential_joiner_1 + add_to_list = potential_joiners + } + #Potential additional joiners + ordered_vassal = { + order_by = current_military_strength + limit = { + mpo_greatest_of_khans_0101_uninvolved_vassal_trigger = yes + NOT = { + this = scope:potential_joiner_1 + } + } + save_scope_as = potential_joiner_2 + add_to_list = potential_joiners + } + #Potential additional joiners + ordered_vassal = { + order_by = current_military_strength + limit = { + mpo_greatest_of_khans_0101_uninvolved_vassal_trigger = yes + NOR = { + this = scope:potential_joiner_1 + this = scope:potential_joiner_2 + } + } + save_scope_as = potential_joiner_3 + add_to_list = potential_joiners + } + } + + #Entreat even more help from other vassals + option = { + name = mpo_greatest_of_khans.0101.a + flavor = mpo_greatest_of_khans.0101.a.flavor + trigger = { + exists = scope:potential_joiner_1 + exists = dynasty + } + #Will pay renown to get aid + if = { + limit = { + is_ai = no + #Combined title tiers of joiners to roughly judge their strength + potential_joiner_combined_value >= 13 + } + dynasty = { + add_dynasty_prestige = monumental_dynasty_prestige_loss + } + } + else_if = { + limit = { + potential_joiner_combined_value >= 7 + is_ai = no + } + dynasty = { + add_dynasty_prestige = massive_dynasty_prestige_loss + } + } + else_if = { + limit = { + is_ai = no + } + dynasty = { + add_dynasty_prestige = major_dynasty_prestige_loss + } + } + else = { + #Lower loss for AI because they can't make smart judgements like players and will always take this + dynasty = { + add_dynasty_prestige = medium_dynasty_prestige_loss + } + } + + scope:gok_war = { + every_in_list = { + list = potential_joiners + limit = { + NOR = { + is_defender_in_war = prev + is_attacker_in_war = prev + } + } + prev = { + add_defender = prev + } + } + } + hidden_effect = { + every_in_list = { + list = potential_joiners + every_character_war = { + limit = { + NOR = { + using_cb = mpo_great_war_of_defiance_cb + using_cb = crusading_claim_cb + AND = { + primary_defender = prev + NOT = { + using_cb = peasant_war + } + } + primary_defender = { + is_ai = no + } + } + } + if = { + limit = { + primary_attacker = prev + } + end_war = white_peace + } + else = { + remove_participant = prev + } + } + } + } + custom_tooltip = gok_joiners_wars_cancelled_tt + if = { + limit = { + is_ai = no + } + stress_impact = { + arrogant = major_stress_impact_gain + brave = major_stress_impact_gain + ambitious = major_stress_impact_gain + } + } + ai_chance = { + base = 1000 + } + } + #Refuse their aid for the swag + option = { + name = mpo_greatest_of_khans.0101.b + flavor = mpo_greatest_of_khans.0101.b.flavor + + custom_tooltip = gok_obedient_vassals_leave_war_tt + hidden_effect = { + every_in_list = { + list = obedient_nomad_vassals + limit = { + NOT = { + this = root + } + } + scope:gok_war = { + remove_participant = prev + } + } + } + custom_tooltip = gok_fights_alone_reward_on_victory_tt + set_variable = { + name = fought_for_gok_alone + value = gok_obedient_vassals_strength_value + } + stress_impact = { + humble = medium_stress_impact_gain + craven = major_stress_impact_gain + } + #The AI should be as scary as possible + ai_chance = { + base = 0 + } + } + #Just accept their aid + option = { + name = mpo_greatest_of_khans.0101.c + + #AI should take first option if they have it + ai_chance = { + base = 100 + modifier = { + exists = scope:potential_joiner_1 + exists = dynasty + factor = 0 + } + } + } + after = { + scope:vassal_1 = { + remove_character_flag = need_military_outfit + } + scope:vassal_2 ?= { + remove_character_flag = need_military_outfit + } + save_scope_as = gurkhan_to_gok + #Player notification and offer to join/submit event + every_player = { + limit = { + mpo_war_of_defiance_notified_player_trigger = yes + } + trigger_event = { + id = mpo_greatest_of_khans.0102 + days = 2 + } + } + } +} + +#Someone is trying to become GoK! Stop them! +mpo_greatest_of_khans.0102 = { + type = character_event + title = mpo_greatest_of_khans.0102.t + desc = mpo_greatest_of_khans.0102.desc + theme = nomads + left_portrait = { + character = scope:gurkhan_to_gok + animation = horse_archer_aggressive + camera = camera_event_horse_left_forward + } + right_portrait = { + character = scope:knight + animation = horse_archer_aggressive + camera = camera_event_horse_right_facing_left + hide_info = yes + } + lower_right_portrait = scope:primary_coalition_defender + override_background = { + trigger = { + NOT = { + government_has_flag = government_is_nomadic + } + } + reference = burning_building + } + override_background = { + trigger = { + government_has_flag = government_is_nomadic + } + reference = mpo_steppe_evening + } + override_effect_2d = { + reference = smoke + } + + immediate = { + scope:gurkhan_to_gok = { + add_character_flag = need_military_outfit + custom_tooltip = gok_took_become_gok_decision_tt + custom_tooltip = gok_began_war_of_defiance_tt + custom_tooltip = gok_gurkhan_declared_intent_tt + custom_tooltip = gok_warning_one_off_tt + } + scope:gurkhan_to_gok = { + ordered_knight = { + order_by = prowess + limit = { + is_imprisoned = no + NOT = { + this = root + } + } + save_scope_as = knight + add_character_flag = need_military_outfit + } + + } + } + #Join war to aid Gurkhan! + option = { + trigger = { + OR = { + is_vassal_or_below_of = scope:gurkhan_to_gok + is_tributary_of_suzerain_or_above = scope:gurkhan_to_gok + is_allied_to = scope:gurkhan_to_gok + dynasty ?= { + any_dynasty_member = { + this = scope:gurkhan_to_gok + } + } + has_relation_soulmate = scope:gurkhan_to_gok + has_relation_friend = scope:gurkhan_to_gok + any_spouse = { + this = scope:gurkhan_to_gok + } + } + NOR = { + is_at_war_with = scope:gurkhan_to_gok + has_relation_rival = scope:gurkhan_to_gok + } + } + name = mpo_greatest_of_khans.0102.a + add_internal_flag = dangerous + scope:gok_war = { + add_defender = root + } + #Makes Gurkhan like you + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:gurkhan_to_gok + opinion = 40 + } + stress_impact = { + craven = medium_stress_impact_gain + } + } + #Join war against Gurkhan! + option = { + trigger = { + NOR = { + is_at_war_with = scope:gurkhan_to_gok + is_at_war_with = scope:primary_coalition_defender + is_imprisoned_by = scope:gurkhan_to_gok + } + } + name = mpo_greatest_of_khans.0102.b + add_internal_flag = dangerous + scope:gok_war = { + add_attacker = root + } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:primary_coalition_defender + opinion = 20 + } + #This is a crime if you're his vassal! + if = { + limit = { + is_vassal_or_below_of = scope:gurkhan_to_gok + } + #Makes Gurkhan hate you + reverse_add_opinion = { + modifier = coup_plotter_opinion + target = scope:gurkhan_to_gok + opinion = -100 + } + } + else_if = { + limit = { + is_allied_to = scope:gurkhan_to_gok + } + reverse_add_opinion = { + modifier = betrayal_opinion + target = scope:gurkhan_to_gok + opinion = -100 + } + break_alliance = scope:gurkhan_to_gok + + } + else = { + reverse_add_opinion = { + modifier = hate_opinion + target = scope:gurkhan_to_gok + opinion = -40 + } + } + stress_impact = { + craven = medium_stress_impact_gain + } + } + #I will submit as a tributary + option = { + trigger = { + is_independent_ruler = yes + is_tributary = no + NOT = { + is_at_war_with = scope:gurkhan_to_gok + } + } + name = mpo_greatest_of_khans.0102.c + start_tributary_interaction_effect = { + TRIBUTARY = root + SUZERAIN = scope:gurkhan_to_gok + } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:gurkhan_to_gok + opinion = 10 + } + stress_impact = { + brave = medium_stress_impact_gain + arrogant = major_stress_impact_gain + } + } + #I will submit as a vassal + option = { + trigger = { + is_independent_ruler = yes + NOR = { + is_at_war_with = scope:gurkhan_to_gok + is_vassal_or_below_of = scope:gurkhan_to_gok + AND = { + is_tributary = yes + NOT = { + is_tributary_of_suzerain_or_above = scope:gurkhan_to_gok + } + } + } + #is roughly the gurkhan's neighbor + OR = { + scope:gurkhan_to_gok = { + any_land_neighboring_realm_with_tributaries_owner = { + this = root + } + } + root = { + any_land_neighboring_realm_with_tributaries_owner = { + this = scope:gurkhan_to_gok + } + } + } + + } + name = mpo_greatest_of_khans.0102.d + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + change_liege = { + liege = scope:gurkhan_to_gok + change = scope:change + } + resolve_title_and_vassal_change = scope:change + + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:gurkhan_to_gok + opinion = 30 + } + + stress_impact = { + brave = medium_stress_impact_gain + arrogant = major_stress_impact_gain + } + } + #Uh... well that's ominous + option = { + name = mpo_greatest_of_khans.0102.e + } + + after = { + scope:gurkhan_to_gok = { + remove_character_flag = need_military_outfit + } + scope:knight = { + remove_character_flag = need_military_outfit + } + } +} + +#The Gurkhan lost the war. Hah. Loser. +mpo_greatest_of_khans.0103 = { + type = character_event + title = mpo_greatest_of_khans.0103.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + root = scope:defender + } + desc = mpo_greatest_of_khans.0103.desc_defender_intro + } + desc = mpo_greatest_of_khans.0103.desc_intro + } + first_valid = { + triggered_desc = { + trigger = { + root = scope:defender + } + desc = mpo_greatest_of_khans.0103.desc_defender + } + triggered_desc = { + trigger = { + root = scope:attacker + } + desc = mpo_greatest_of_khans.0103.desc_attacker + } + triggered_desc = { + trigger = { + root = { + is_in_list = anti_gok_defenders + } + } + desc = mpo_greatest_of_khans.0103.desc_defenders + } + triggered_desc = { + trigger = { + root = { + is_in_list = anti_gok_attackers + } + } + desc = mpo_greatest_of_khans.0103.desc_attackers + } + desc = mpo_greatest_of_khans.0103.desc + } + } + theme = nomads + left_portrait = { + character = scope:defender + animation = prisonhouse + camera = camera_event_left_forward + override_imprisonment_visuals = yes + outfit_tags = { beggar_rags } + } + right_portrait = { + character = scope:knight + animation = menacing + hide_info = yes + } + lower_right_portrait = scope:attacker + override_background = { + reference = wilderness_scope + } + override_effect_2d = { + reference = flies + } + + immediate = { + scope:attacker = { + capital_province = { save_scope_as = background_wilderness_scope } + ordered_knight = { + order_by = prowess + limit = { + is_imprisoned = no + NOR = { + this = root + this = scope:defender + } + } + save_scope_as = knight + add_character_flag = need_military_outfit + } + } + } + option = { + name = mpo_greatest_of_khans.0103.a + } +} + +scripted_trigger mpo_greatest_of_khans_0002_confederation_trigger = { + is_confederation_member = yes + #Prev be with you + NOR = { + has_relation_rival = prev + is_at_war_with = prev + is_causing_raid_hostility_towards = prev + prev = { + is_causing_raid_hostility_towards = prev + } + opinion = { + target = prev + value <= -50 + } + reverse_opinion = { + target = prev + value <= -50 + } + } +} + +#I became Greatest of Khans +mpo_greatest_of_khans.0001 = { + type = character_event + window = fullscreen_event + title = mpo_greatest_of_khans.0001.t + desc = mpo_greatest_of_khans.0001.desc + theme = nomads + left_portrait = { + character = root + animation = personality_vengeful + } + override_background = { reference = mpo_fullscreen_greatest_of_khans } + + immediate = { + save_scope_as = genghis_khan + + play_music_cue = mx_cue_conquest_of_the_golden_horde + + add_trait = greatest_of_khans + if = { + limit = { + prestige_level < 5 + } + add_prestige_level = 1 + } + legend_seed_new_title_effect = yes + form_the_greatest_khan_empire_effect = yes + + create_story = story_greatest_of_khans + save_scope_value_as = { + name = gok_empire_crumble_date + value = { + value = current_year + add = 75 + } + } + #Add dynasty prestige if you chose to fight this without vassals' aid + if = { + limit = { + has_variable = fought_for_gok_alone + exists = dynasty + } + dynasty = { + add_dynasty_prestige = fought_gok_alone_value + } + } + mpo_add_golden_lineage_effect = { CHARACTER = root } + } + + option = { + name = mpo_greatest_of_khans.0001.a + custom_tooltip = greatest_of_khans_prevents_mongol_invasion_tt + custom_tooltip = gok_enable_offer_submission_or_ruin_tt + custom_tooltip = become_greatest_of_khans_decision_enable_gok_invasion_cb + add_to_global_variable_list = { + name = unavailable_unique_decisions + target = flag:mpo_become_greatest_of_khans_decision + } + custom_tooltip = gok_protected_from_chaotic_succession_tt + custom_tooltip = gok_time_limit_end_decision_tt + } + after = { + #You pick a nickname + trigger_event = mpo_greatest_of_khans.0003 + } +} + +#Someone became Greatest of Khans +mpo_greatest_of_khans.0002 = { + type = character_event + window = fullscreen_event + title = mongol_invasion.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + any_realm_province = { + OR = { + geographical_region = special_mongol_empire_start_region + geographical_region = special_mongol_empire_conquest_region_prio_1 + geographical_region = special_mongol_empire_conquest_region_prio_1_alpha + } + } + NOT = { + government_has_flag = government_is_nomadic + } + } + } + desc = { + desc = mongol_invasion.1002.desc.close + first_valid = { + triggered_desc = { + trigger = { + any_realm_province = { + geographical_region = special_mongol_empire_start_region + } + } + desc = mongol_invasion.1002.desc.close_mongolia + } + desc = mongol_invasion.1002.desc.close_steppes + } + desc = mongol_invasion.1002.desc.close.mid + #Great Khan or Genghis? + first_valid = { + triggered_desc = { + trigger = { + exists = scope:temujin + } + desc = mongol_invasion.1002.desc.genghis + } + desc = mongol_invasion.1002.desc.gok + } + desc = mongol_invasion.1002.desc.close.end + } + } + desc = mongol_invasion.1002.desc.far_intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:temujin + root = scope:temujin + } + desc = mongol_invasion.1002.desc.genghis + } + desc = mongol_invasion.1002.desc.gok + } + desc = mongol_invasion.1002.desc.far + } + } + theme = nomads + left_portrait = { + character = scope:genghis_khan + animation = personality_vengeful + } + override_background = { reference = mpo_fullscreen_greatest_of_khans } + + immediate = { + play_music_cue = mx_cue_conquest_of_the_golden_horde + show_as_tooltip = { + scope:genghis_khan = { + add_trait_force_tooltip = greatest_of_khans + form_the_greatest_khan_empire_effect = yes + custom_tooltip = gok_threatening_powers_tt + custom_tooltip = mongol_invasion.1002.genghis_khan_tt + custom_tooltip = gok_time_limit_end_decision_other_players_tt + mpo_add_golden_lineage_effect = { CHARACTER = scope:genghis_khan } + } + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } + } + custom_tooltip = become_gok_decision_now_unavailable_tt + } + } + + #Save confederation if there is one + if = { + limit = { + any_land_neighboring_realm_with_tributaries_owner = { + mpo_greatest_of_khans_0002_confederation_trigger = yes + save_temporary_scope_as = confed_buddy + } + valid_confederation_member_trigger = { CHARACTER = scope:confed_buddy } + is_at_war = no + } + ordered_land_neighboring_realm_with_tributaries_owner = { + order_by = current_military_strength + limit = { + mpo_greatest_of_khans_0002_confederation_trigger = yes + } + save_scope_as = confederation_neighbor + confederation = { + save_scope_as = confederation + } + } + } + } + #Submit to the Great Khan if you're already their tributary anyway + option = { + trigger = { + NOR = { + is_vassal_or_below_of = scope:genghis_khan + is_at_war_with = scope:genghis_khan + } + is_tributary_of_suzerain_or_above = scope:genghis_khan + } + name = mpo_greatest_of_khans.0002.a + #tributary of great khan's vassal or below + if = { + limit = { + is_tributary_of_suzerain_or_above = scope:genghis_khan + suzerain = { + highest_held_title_tier > root.highest_held_title_tier + } + } + suzerain = { + save_scope_as = new_liege + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + change_liege = { + liege = scope:new_liege + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + else = { + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + change_liege = { + liege = scope:genghis_khan + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + + stress_impact = { + brave = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_boldness = 1 + } + modifier = { + has_trait = ambitious + add = -20 + } + modifier = { + has_dread_level_towards = { + target = scope:genghis_khan + level >= 1 + } + add = 100 + } + modifier = { + has_dread_level_towards = { + target = scope:genghis_khan + level >= 2 + } + add = 200 + } + modifier = { + government_has_flag = government_is_herder + add = 1000 + } + modifier = { + add = 50 + opinion = { + target = scope:genghis_khan + value >= 50 + } + } + modifier = { + add = 50 + opinion = { + target = scope:genghis_khan + value >= 75 + } + } + modifier = { + add = -50 + opinion = { + target = scope:genghis_khan + value <= -50 + } + } + modifier = { + add = -50 + opinion = { + target = scope:genghis_khan + value <= -75 + } + } + } + } + #Join a confederation that's next to me + option = { + trigger = { + exists = scope:confederation + } + name = mpo_greatest_of_khans.0002.b + scope:confederation = { add_confederation_member = root } + scope:confederation_neighbor = { + if = { + limit = { + is_at_war = yes + } + every_character_war = { + limit = { + primary_defender = { + is_member_of_confederation = scope:confederation + } + } + add_defender = root + } + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = mpo_confederation_member_modifier + years = 5 + } + capital_county ?= { + change_county_fertility = major_county_fertility_level_gain + } + } + stress_impact = { + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + opinion = { + target = scope:confederation_neighbor + value > 50 + } + } + modifier = { + add = 50 + opinion = { + target = scope:confederation_neighbor + value > 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:confederation_neighbor + value < -25 + } + } + modifier = { + add = -50 + opinion = { + target = scope:confederation_neighbor + value < -75 + } + } + modifier = { + has_trait = ambitious + add = -50 + } + } + } + #Cry (unless you are vassal of the Khan!) + option = { + name = { + trigger = { + NOT = { + government_has_flag = government_is_nomadic + } + } + text = mongol_invasion.1002.b + } + name = { + trigger = { + government_has_flag = government_is_nomadic + } + text = mongol_invasion.1002.a + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + } + } + } +} + +#Greatest of Khans picks nickname +mpo_greatest_of_khans.0003 = { + type = character_event + title = mpo_greatest_of_khans.0003.t + desc = mpo_greatest_of_khans.0003.desc + theme = nomads + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + override_background = { + reference = mpo_temple_steppe + } + override_effect_2d = { + reference = legend_glow + } + option = { + trigger = { + NOT = { + culture = { + has_cultural_pillar = language_turkic + } + } + } + name = mpo_greatest_of_khans.0003.a + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_genghis_khan + ai_chance = { + base = 50 + modifier = { + factor = 0 + NOT = { + culture = { + has_cultural_pillar = language_mongolic + } + } + } + modifier = { + factor = 100 + this = character:125501 + } + } + } + option = { + trigger = { + culture = { + has_cultural_pillar = language_turkic + } + } + name = mpo_greatest_of_khans.0003.b + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_cengiz_khan + ai_chance = { + base = 50 + } + } + option = { + trigger = { + culture = { + has_cultural_pillar = language_mongolic + } + } + name = mpo_greatest_of_khans.0003.c + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_yekhe_khagan + ai_chance = { + base = 50 + } + } + option = { + trigger = { + culture = { + has_cultural_pillar = language_turkic + } + } + name = mpo_greatest_of_khans.0003.d + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_dort_yonlug_khagan + ai_chance = { + base = 50 + } + } + option = { + trigger = { + NOR = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + faith.religion = religion:islam_religion + } + } + name = mpo_greatest_of_khans.0003.e + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_tengri_khagan + ai_chance = { + base = 50 + modifier = { + add = -45 + NOT = { + faith.religion = religion:tengrism_religion + } + } + } + } + option = { + trigger = { + OR = { + faith = faith:nestorian + faith.religion = faith:manichean.religion + } + } + name = mpo_greatest_of_khans.0003.f + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_xormuzta + ai_chance = { + base = 100 + } + } + option = { + trigger = { + faith.religion = religion:islam_religion + capital_province ?= { + OR = { + geographical_region = world_middle_east + geographical_region = world_asia_minor + geographical_region = world_steppe_tarim + geographical_region = world_steppe_central + } + } + current_date >= 1250 + } + name = mpo_greatest_of_khans.0003.g + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_cihangir + ai_chance = { + base = 100 + } + } + option = { + trigger = { + faith = faith:nestorian + } + name = mpo_greatest_of_khans.0003.h + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_mar_sargis + ai_chance = { + base = 100 + } + } + option = { + trigger = { + culture = { + OR = { + has_cultural_pillar = language_iranian + has_cultural_pillar = language_scythian + } + } + } + name = mpo_greatest_of_khans.0003.i + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_akhshunwar + ai_chance = { + base = 100 + } + } + option = { + name = mpo_greatest_of_khans.0003.j + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_culture_khagan + ai_chance = { + base = 10 + } + } + option = { + name = mpo_greatest_of_khans.0003.k + ai_chance = { + base = 0 + } + } + after = { + #notification events go to other rulers + + add_to_temporary_list = received_notification + every_vassal_or_below = { + limit = { + is_ai = no + } + trigger_event = { + id = mpo_greatest_of_khans.0002 #Someone has become Genghis Khan + days = 1 + } + add_to_temporary_list = received_notification + } + every_ruler = { + limit = { + NOT = { + is_in_list = received_notification + } + OR = { + #Notify players + is_ai = no + #Give AI tributaries and herder neighbors chance to submit + #And strengthen confederations + AND = { + OR = { + AND = { + is_independent_ruler = yes + highest_held_title_tier <= tier_duchy + is_tributary = no + } + is_tributary_of_suzerain_or_above = root + } + OR = { + is_tributary_of_suzerain_or_above = root + #Is on the steppe and can join a confederation + AND = { + any_character_situation = { + this = situation:the_great_steppe + } + any_land_neighboring_realm_with_tributaries_owner = { + mpo_greatest_of_khans_0002_confederation_trigger = yes + save_temporary_scope_as = maybe_confederate + } + valid_confederation_member_trigger = { CHARACTER = scope:maybe_confederate } + + } + } + } + + } + } + trigger_event = { + id = mpo_greatest_of_khans.0002 #Someone has become Genghis Khan + days = 1 + } + } + } +} + +#Fires notification that minor lord has accepted submission +mpo_greatest_of_khans.0020 = { + hidden = yes + immediate = { + send_interface_message = { + type = event_gok_submission_with_text + title = mpo_greatest_of_khans.0020_title + left_icon = scope:recipient + + show_as_tooltip = { + mpo_gok_offer_submission_effect = yes + } + } + } +} + +#Your new vassal chooses to submit +mpo_greatest_of_khans.0021 = { + type = letter_event + opening = { + desc = mpo_greatest_of_khans.0021.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + desc = mpo_greatest_of_khans.0021.desc_nomad + } + desc = mpo_greatest_of_khans.0021.desc + } + } + + sender = scope:recipient + + immediate = { + + } + + option = { + name = mpo_greatest_of_khans.0021.a + show_as_tooltip = { + mpo_gok_offer_submission_effect = yes + } + } +} + +#Your generous offer of submission has been refused... this means war +mpo_greatest_of_khans.0022 = { + type = letter_event + opening = { + desc = mpo_greatest_of_khans.0022.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + desc = mpo_greatest_of_khans.0022.desc_nomad + } + desc = mpo_greatest_of_khans.0022.desc + } + } + + sender = scope:recipient + + option = { + name = { + trigger = { + scope:recipient = { + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + text = mpo_greatest_of_khans.0022.a + } + name = { + trigger = { + scope:recipient = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + text = mpo_greatest_of_khans.0022.a_nomadic + } + mpo_gok_offer_submission_refusal_effect = yes + } +} + +#Final Greatest of Khans decision event +mpo_greatest_of_khans.0030 = { + type = character_event + window = visit_settlement_window + title = mpo_greatest_of_khans.0030.t + desc = mpo_greatest_of_khans.0030.desc + theme = nomads + left_portrait = { + character = scope:knight + animation = throne_room_two_handed_passive_shield + camera = camera_event_very_left + hide_info = yes + } + center_portrait = { + character = root + animation = war_over_win + camera = camera_event_center + } + right_portrait = { + character = scope:scholar + animation = reading + camera = camera_event_very_right + hide_info = yes + } + override_background = { + reference = throne_room + } + override_effect_2d = { + reference = legend_glow + } + immediate = { + play_music_cue = mx_cue_the_khans_glory + ordered_knight = { + order_by = prowess + limit = { + basic_is_available_ai = yes + is_adult = yes + culture = { + OR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + } + } + is_courtier_of = root + } + alternative_limit = { + basic_is_available_ai = yes + is_adult = yes + culture = { + OR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + } + } + } + alternative_limit = { + basic_is_available_ai = yes + is_adult = yes + } + save_scope_as = knight + add_character_flag = need_military_outfit + } + ordered_courtier = { + order_by = learning + limit = { + basic_is_available_ai = yes + is_adult = yes + culture = { + trigger_if = { + limit = { + NOT = { + this = culture:uyghur + } + } + NOR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + } + } + } + } + alternative_limit = { + basic_is_available_ai = yes + is_adult = yes + } + save_scope_as = scholar + } + custom_tooltip = gok_reform_invalides_gok_stuff_tt + gok_world_conquest_generic_rewards_effect = yes + every_owned_story = { + limit = { + story_type = story_greatest_of_khans + } + end_story = yes + } + } + #BURN THE SETTLED WORLD AND LET US GRAZE + option = { + name = mpo_greatest_of_khans.0030.a + flavor = mpo_greatest_of_khans.0030.a.flavor + add_dread = massive_dread_gain + add_gold = { + add = "list_size(burned_to_nomadism)" + multiply = miniscule_gold_value + } + add_internal_flag = dangerous + custom_tooltip = gok_counties_become_nomad_counties_tt + custom_tooltip = gok_new_nomad_counties_lose_development_tt + custom_tooltip = gok_other_counties_lose_development_tt + hidden_effect = { + every_in_list = { + list = burned_to_nomadism + raze_county = { + holding_type = nomad_holding + purge_secondary_holdings = yes + } + if = { + limit = { + development_level > 1 + } + save_scope_value_as = { + name = dev_reduction + value = { + add = development_level + multiply = -1 + add = 1 + } + } + } + change_development_level = scope:dev_reduction + change_county_control = -100 + } + #damage the rest a bit too + every_realm_county = { + limit = { + NOR = { + is_in_list = burned_to_nomadism + any_county_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + holder = { + is_ai = no + } + } + development_level > 1 + } + change_development_level = { + add = development_level + divide = 10 + floor = yes + multiply = -1 + } + } + } + + custom_tooltip = gok_non_nomads_become_nomad_tt + #Willing vassals convert to nomad + hidden_effect = { + every_in_list = { + list = sedentary_to_nomad_vassals + adopt_nomadic_ways_decision_effect = yes + } + } + + custom_tooltip = gok_city_state_creation + hidden_effect = { + every_in_list = { + list = city_state_vassals + every_held_title = { + limit = { + tier >= tier_county + is_head_of_faith = no + is_landless_type_title = no + #Leave them with their capital duchy + NOR = { + this = holder.capital_county + this = holder.capital_county.duchy + AND = { + tier = tier_county + duchy = holder.capital_county.duchy + } + } + } + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = yes + } + change_title_holder = { + holder = root + change = scope:change + take_baronies = no + } + resolve_title_and_vassal_change = scope:change + } + } + } + stress_impact = { + compassionate = major_stress_impact_gain + greedy = massive_stress_impact_gain + lazy = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + #Convert to admin government + option = { + trigger = { + has_dlc_feature = admin_gov + } + name = mpo_greatest_of_khans.0030.b + flavor = mpo_greatest_of_khans.0030.b.flavor + add_internal_flag = special + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + gok_upgrade_realm_and_government_effect = yes + custom_tooltip = gok_some_sedentaries_become_admin_tt + hidden_effect = { + if = { + limit = { + ep3_is_clan_inclined_trigger = yes + } + nomad_convert_people_to_clan_effect = yes + } + else = { + nomad_convert_people_to_feudal_effect = yes + } + } + convert_to_administrative_from_feudalism_effect = { GOVERNMENT_TO_ADOPT = flag:dynamic } + hidden_effect = { + every_vassal = { + limit = { + gok_willing_new_admin_vassal_trigger = yes + } + change_to_administrative_effect = yes + every_vassal = { + limit = { + gok_willing_new_admin_vassal_trigger = yes + } + change_to_administrative_effect = yes + every_vassal = { + limit = { + gok_willing_new_admin_vassal_trigger = yes + } + change_to_administrative_effect = yes + every_vassal = { + limit = { + gok_willing_new_admin_vassal_trigger = yes + } + change_to_administrative_effect = yes + } + } + } + + } + } + + ai_chance = { + base = 100 + modifier = { + is_roman_emperor_trigger = yes + add = 100 + } + modifier = { + culture = { + OR = { + has_cultural_pillar = ethos_bureaucratic + has_cultural_pillar = ethos_courtly + has_cultural_pillar = ethos_egalitarian + } + } + add = 50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_legalistic + } + add = 50 + } + modifier = { + culture = { + OR = { + has_cultural_tradition = tradition_fp3_enlightened_magnates + has_cultural_tradition = tradition_loyal_soldiers + } + } + add = 20 + } + modifier = { + culture = { + OR = { + has_cultural_tradition = tradition_ep3_indomitable_azatani + has_cultural_tradition = tradition_ep3_audacious_cadets + has_cultural_tradition = tradition_fp3_fierce_independence + } + } + add = -50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_staunch_traditionalists + } + add = -50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_quarrelsome + } + add = -50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_warrior_culture + } + add = -50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_hereditary_hierarchy + } + add = -50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_hereditary_hierarchy + } + add = -50 + } + modifier = { + culture = { + OR = { + has_cultural_pillar = ethos_stoic + has_cultural_pillar = ethos_bellicose + has_cultural_pillar = ethos_communal + } + } + add = -50 + } + modifier = { + culture = { + any_parent_culture_or_above = { + OR = { + this = culture:han + this = culture:greek + } + } + } + add = 100 + } + } + } + #Convert to feudal government + option = { + name = mpo_greatest_of_khans.0030.c + flavor = mpo_greatest_of_khans.0030.c.flavor + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + gok_upgrade_realm_and_government_effect = yes + nomad_convert_people_to_feudal_effect = yes + hidden_effect = { + every_in_list = { + list = switching_vassals + nomad_convert_people_to_feudal_effect = yes + } + } + ai_chance = { + base = 0 + modifier = { + ep3_is_clan_inclined_trigger = no + add = 5 + } + } + } + #Convert to clan government + option = { + name = mpo_greatest_of_khans.0030.d + flavor = mpo_greatest_of_khans.0030.d.flavor + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + gok_upgrade_realm_and_government_effect = yes + nomad_convert_people_to_clan_effect = yes + hidden_effect = { + every_in_list = { + list = switching_vassals + nomad_convert_people_to_clan_effect = yes + } + } + ai_chance = { + base = 0 + modifier = { + ep3_is_clan_inclined_trigger = yes + add = 5 + } + } + } + #Actually... I don't want to change anything + option = { + name = mpo_greatest_of_khans.0030.e + flavor = mpo_greatest_of_khans.0030.e.flavor + ai_chance = { + base = 0 + } + } + + after = { + scope:knight = { + remove_character_flag = need_military_outfit + } + } +} + +#Invalidate event for story - your dynasty timed out or lost control of the GoK title +mpo_greatest_of_khans.0040 = { + type = character_event + title = mpo_greatest_of_khans.0040.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:timed_out + } + desc = mpo_greatest_of_khans.0040.desc_timed_out + } + desc = mpo_greatest_of_khans.0040.desc + } + } + theme = nomads + left_portrait = { + character = root + animation = horse_exhausted + camera = camera_event_horse_very_left + } + override_background = { + reference = mpo_steppe_evening + } + immediate = { + add_legitimacy = major_legitimacy_loss + custom_tooltip = gok_no_more_reform_decision + custom_tooltip = gok_no_more_special_powers + custom_tooltip = gok_lose_succession_protection_tt + if = { + limit = { + has_realm_law = nomadic_authority_5 + } + remove_realm_law = nomadic_authority_5 + add_realm_law = nomadic_authority_4 + } + if = { + limit = { + has_trait = greatest_of_khans + } + remove_trait = greatest_of_khans + } + if = { + limit = { + has_character_modifier = the_great_khan_modifier + } + remove_character_modifier = the_great_khan_modifier + } + + every_owned_story = { + limit = { story_type = story_greatest_of_khans } + end_story = yes + } + } + option = { + name = mpo_greatest_of_khans.0040.a + if = { + limit = { + any_held_title = { + this = global_var:greatest_of_khans_title + } + } + custom_tooltip = gok_guaranteed_disastrous_chaotic_succession_tt + global_var:greatest_of_khans_title = { + set_variable = { + name = guaranteed_disastrous_succession + value = yes + } + } + } + } +} + +#Switched government type on purpose... sort of GoK, but not really now +mpo_greatest_of_khans.0041 = { + type = character_event + title = mpo_greatest_of_khans.0041.t + desc = mpo_greatest_of_khans.0041.desc + theme = nomads + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + animation = acknowledging + } + triggered_animation = { + trigger = { + primary_title = title:h_china + } + animation = emperor + } + triggered_animation = { + trigger = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_wanua + } + } + animation = personality_honorable + } + animation = chancellor + } + right_portrait = { + character = scope:bower + animation = throne_room_bow_3 + } + override_background = { + reference = throne_room + } + immediate = { + ordered_vassal = { + order_by = current_military_strength + limit = { + basic_is_available_ai = yes + is_adult = yes + NOR = { + is_at_war_with = root + is_a_faction_member = yes + government_has_flag = government_is_nomadic + } + } + save_scope_as = bower + } + if = { + limit = { + NOT = { + exists = scope:bower + } + } + random_courtier = { + limit = { + basic_is_available_ai = yes + is_adult = yes + } + save_scope_as = bower + } + } + if = { + limit = { + NOT = { + exists = scope:bower + } + } + random_pool_character = { + province = root.capital_province + limit = { + basic_is_available_ai = yes + is_adult = yes + } + save_scope_as = bower + } + } + save_scope_as = root_scope + custom_tooltip = gok_forsaken_nomadism_tt + custom_tooltip = gok_no_more_reform_decision + custom_tooltip = gok_no_more_special_powers + } + option = { + name = mpo_greatest_of_khans.0041.a + } +} + +#GoK threatens new vassal +mpo_greatest_of_khans.0050 = { + type = letter_event + opening = { + desc = mpo_greatest_of_khans.0050.opening + } + desc = { + desc = mpo_greatest_of_khans.0050.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:liege + } + desc = mpo_greatest_of_khans.0050.desc_reorganized + } + desc = mpo_greatest_of_khans.0050.desc_end + } + } + + sender = scope:attacker + + immediate = { + if = { + limit = { + liege ?= { + NOT = { + this = scope:attacker + } + } + } + liege = { + save_scope_as = liege + } + } + } + + option = { + name = mpo_greatest_of_khans.0050.a + } +} + +#GoK mocks unlanded former vassal of enemy +mpo_greatest_of_khans.0051 = { + type = letter_event + opening = { + desc = mpo_greatest_of_khans.0051.opening + } + desc = mpo_greatest_of_khans.0051.desc + + sender = scope:attacker + + trigger = { + is_landed = no + } + immediate = { + + } + + option = { + name = mpo_greatest_of_khans.0051.a + } +} + +# +# END Become Greatest of Khans events +################# + +#MONGOL INVASION EVENTS - UPDATED FOR MPO + +### Appearance of Genghis Khan (others) +# by Petter Vilberg (updated by Jason Cantalini) +mpo_greatest_of_khans.1001 = { + type = character_event + window = fullscreen_event + title = mongol_invasion.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + any_realm_province = { + OR = { + geographical_region = special_mongol_empire_start_region + geographical_region = special_mongol_empire_conquest_region_prio_1 + geographical_region = special_mongol_empire_conquest_region_prio_1_alpha + } + } + government_has_flag = government_is_nomadic + } + } + desc = { + desc = mongol_invasion.1002.desc.close + first_valid = { + triggered_desc = { + trigger = { + any_realm_province = { + geographical_region = special_mongol_empire_start_region + } + } + desc = mongol_invasion.1002.desc.close_mongolia + } + desc = mongol_invasion.1002.desc.close_steppes + } + desc = mongol_invasion.1002.desc.close.mid + #Great Khan or Genghis? + first_valid = { + triggered_desc = { + trigger = { + exists = scope:temujin + } + desc = mongol_invasion.1002.desc.genghis + } + desc = mongol_invasion.1002.desc.gok + } + desc = mongol_invasion.1002.desc.close.end + } + } + + desc = { + desc = mongol_invasion.1002.desc.far_intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:temujin + root = scope:temujin + } + desc = mongol_invasion.1002.desc.genghis + } + desc = mongol_invasion.1002.desc.gok + } + desc = mongol_invasion.1002.desc.far + } + } + } + theme = nomads + left_portrait = { + character = scope:temujin + animation = celebrate_sword + camera = camera_event_left_forward + } + override_background = { reference = mpo_fullscreen_greatest_of_khans } + + immediate = { + play_music_cue = mx_cue_conquest_of_the_golden_horde + + scope:temujin = { + save_scope_as = genghis_khan + primary_title = { + save_scope_as = gok_title + } + show_as_tooltip = { + add_trait_force_tooltip = greatest_of_khans + } + + custom_tooltip = genghis_khan_mongol_empire_tt + custom_tooltip = genghis_khan_mongol_troops_tt + custom_tooltip = gok_threatening_powers_tt + custom_tooltip = mongol_invasion.1002.genghis_khan_tt + mpo_add_golden_lineage_effect = { CHARACTER = scope:temujin } + } + + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } + } + custom_tooltip = become_gok_decision_now_unavailable_tt + } + + #Save confederation if there is one + if = { + limit = { + any_land_neighboring_realm_with_tributaries_owner = { + mpo_greatest_of_khans_0002_confederation_trigger = yes + save_temporary_scope_as = confed_buddy + } + valid_confederation_member_trigger = { CHARACTER = scope:confed_buddy } + is_at_war = no + } + ordered_land_neighboring_realm_with_tributaries_owner = { + order_by = current_military_strength + limit = { + mpo_greatest_of_khans_0002_confederation_trigger = yes + } + save_scope_as = confederation_neighbor + confederation = { + save_scope_as = confederation + } + } + } + } + #Submit to the Great Khan if you're already their tributary anyway + option = { + trigger = { + NOR = { + is_vassal_or_below_of = scope:genghis_khan + is_at_war_with = scope:genghis_khan + } + is_tributary_of_suzerain_or_above = scope:genghis_khan + } + name = mpo_greatest_of_khans.0002.a + #tributary of great khan's vassal or below + if = { + limit = { + is_tributary_of_suzerain_or_above = scope:genghis_khan + suzerain = { + highest_held_title_tier > root.highest_held_title_tier + } + } + suzerain = { + save_scope_as = new_liege + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + change_liege = { + liege = scope:new_liege + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + else = { + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + change_liege = { + liege = scope:genghis_khan + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + + stress_impact = { + brave = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_boldness = 1 + } + modifier = { + has_trait = ambitious + add = -20 + } + modifier = { + has_dread_level_towards = { + target = scope:genghis_khan + level >= 1 + } + add = 100 + } + modifier = { + has_dread_level_towards = { + target = scope:genghis_khan + level >= 2 + } + add = 200 + } + modifier = { + government_has_flag = government_is_herder + add = 1000 + } + modifier = { + add = 50 + opinion = { + target = scope:genghis_khan + value >= 50 + } + } + modifier = { + add = 50 + opinion = { + target = scope:genghis_khan + value >= 75 + } + } + modifier = { + add = -50 + opinion = { + target = scope:genghis_khan + value <= -50 + } + } + modifier = { + add = -50 + opinion = { + target = scope:genghis_khan + value <= -75 + } + } + } + } + #Join a confederation that's next to me + option = { + trigger = { + exists = scope:confederation + } + name = mpo_greatest_of_khans.0002.b + scope:confederation = { add_confederation_member = root } + scope:confederation_neighbor = { + if = { + limit = { + is_at_war = yes + } + every_character_war = { + limit = { + primary_defender = { + is_member_of_confederation = scope:confederation + } + } + add_defender = root + } + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = mpo_confederation_member_modifier + years = 5 + } + capital_county ?= { + change_county_fertility = major_county_fertility_level_gain + } + } + stress_impact = { + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + opinion = { + target = scope:confederation_neighbor + value > 50 + } + } + modifier = { + add = 50 + opinion = { + target = scope:confederation_neighbor + value > 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:confederation_neighbor + value < -25 + } + } + modifier = { + add = -50 + opinion = { + target = scope:confederation_neighbor + value < -75 + } + } + modifier = { + has_trait = ambitious + add = -50 + } + } + } + + option = { # Option for close characters + name = { + trigger = { has_trait = craven } + text = mongol_invasion.1002.craven + } + name = { + text = mongol_invasion.1002.a + } + trigger = { + government_has_flag = government_is_nomadic + } + + if = { + limit = { + highest_held_title_tier < tier_empire + } + custom_tooltip = mongol_invasion_submission_reminder_tt + } + ai_chance = { + base = 100 + } + } + + option = { # Options for distant characters + name = { + text = mongol_invasion.1002.craven + trigger = { has_trait = craven } + } + name = { + text = mongol_invasion.1002.b + } + trigger = { + NOT = { government_has_flag = government_is_nomadic } + } + custom_tooltip = mongol_invasion.1002.genghis_khan_tt + + if = { + limit = { + highest_held_title_tier < tier_empire + } + } + ai_chance = { + base = 100 + } + + } +} + +#Player Temujin's buffs through feed messages +mpo_greatest_of_khans.1010 = { + hidden = yes + trigger = { + OR = { + NOT = { + exists = local_var:temujin_buff_count + } + local_var:temujin_buff_count < 9 + } + is_alive = yes + is_ruler = yes + government_has_flag = government_is_nomadic + exists = domicile + #Only meant to help you GET TO GoK decision + NOR = { + has_trait = greatest_of_khans + has_global_variable = mpo_gok_war_ongoing + } + #Decreasing authority means he loses it + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + immediate = { + #Adjust tracking variable so this only happens 6 times max + if = { + limit = { + NOT = { + exists = local_var:temujin_buff_count + } + } + set_local_variable = { + name = temujin_buff_count + value = 1 + } + } + else = { + change_local_variable = { + name = temujin_buff_count + add = 1 + } + } + send_interface_message = { + type = event_gok_temujin_with_text + title = mpo_greatest_of_khans.1010_title + desc = mpo_greatest_of_khans.1010_desc + domicile = { + change_herd = { + value = nomadic_authority_level_3_requirement + divide = 3 + add = { 1000 3000 } + } + } + add_prestige = { 200 300 } + add_gold = { 30 80 } + } + if = { + limit = { + local_var:temujin_buff_count < 9 + } + trigger_event = { + id = mpo_greatest_of_khans.1010 + months = { 3 9 } + } + } + } +} diff --git a/N3OW/events/decisions_events/roman_restoration_events.txt b/N3OW/events/decisions_events/roman_restoration_events.txt new file mode 100644 index 00000000..d6a3bc14 --- /dev/null +++ b/N3OW/events/decisions_events/roman_restoration_events.txt @@ -0,0 +1,3371 @@ + +namespace = roman_restoration + +################################################## + +### Roman Restoration Major Decision Events +# by Flavio Verna + +# 0001 - Restoring Roman Empire as Byzantium +# 0003 - Restoring Roman Empire as HRE +# 0005 - New Emperor becomes Augustus +# 0006 - Old Emperor loses Augustus +# 0010/0024 - Old Roman Provinces are Restored +# 0100 - Schism is mended +# 0199, 0104, 0105, 0106, 0107 - Restored Patriarchate Events +# 0120 - Imposing the Iconoclast Patriarchate +# 0122 - Restoring the Ecumenical Patriarchate +# 0124 - Restoring the Papacy +# 0130 - Destroying the Papacy +# 0140 - Unifying Italy +# 0150 - Restoring Roman Empire as Italy +# 0160/0175 - Roman Empire dismantles pretenders + +################################################## + +################################################## +# Restoring the Roman Empire +################################################## +roman_restoration.0001 = { + type = character_event + title = roman_restoration.0001.t + desc = { + desc = roman_restoration.0001.desc.intro + first_valid = { + # Doing it as the Greeks. + triggered_desc = { + trigger = { + root.culture = culture:greek + } + desc = roman_restoration.0001.desc.greeks + } + # Doing it as somebody else. + desc = roman_restoration.0001.desc.other + } + first_valid = { + # Doing it as Christians. + triggered_desc = { + trigger = { + faith.OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = roman_restoration.0001.desc.christians + } + # Doing it as Hellenics + triggered_desc = { + trigger = { + faith.religion = faith:hellenic_pagan.religion + } + desc = roman_restoration.0001.desc.hellenics + } + desc = roman_restoration.0001.desc.fallback + } + } + theme = emperor + left_portrait = { + character = scope:scoped_emperor + animation = personality_honorable + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + save_scope_as = scoped_emperor + create_roman_empire_scripted_effect = yes + create_story = restoring_roman_provinces_story + } + option = { + name = roman_restoration.0001.a + set_nickname_effect = { NICKNAME = nick_the_glorious } + # Send narrative fluff to other players (if any). + every_player = { + limit = { + this != root + is_within_diplo_range = { CHARACTER = root } + } + trigger_event = roman_restoration.0002 + } + } +} + +# Players informed of some fucko declaring a new Rome +roman_restoration.0002 = { + type = character_event + title = roman_restoration.0002.t + desc = { + desc = roman_restoration.0002.desc + first_valid = { + # Christians freaking out. + triggered_desc = { + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + desc = roman_restoration.0002.desc.hellenics + } + # Regular. + desc = roman_restoration.0002.desc.christians + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_honorable + } + + immediate = { + #Same-faith non-empire tier rulers are over-awed. + if = { + limit = { faith = scope:scoped_emperor.faith } + play_music_cue = "mx_cue_epic_sacral_moment" + } + #Otherwise, this is a tacit statement of imperial threat. + else = { play_music_cue = "mx_cue_combat_2" } + } + + option = { + name = { # Regular + trigger = { + NAND = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + NOT = { + has_title = title:e_hre + } + } + text = roman_restoration.0002.a + } + name = { # Regular HRE + trigger = { + NAND = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + has_title = title:e_hre + } + text = roman_restoration.0002.b + } + name = { # Crazy Hellenics + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + NOT = { + has_title = title:e_hre + } + } + text = roman_restoration.0002.c + } + name = { # Crazy Hellenics HRE + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + has_title = title:e_hre + } + text = roman_restoration.0002.d + } + } + option = { + name = roman_restoration.0002.e + fallback = yes + } +} + +################################################## +# Holy Roman Empire for realsies this time. +################################################## + +roman_restoration.0003 = { + type = character_event + title = roman_restoration.0003.t + desc = { + first_valid = { + # Doing it as the Greeks. + triggered_desc = { + trigger = { + root.culture = culture:greek + } + desc = roman_restoration.0003.desc.greeks + } + # Doing it as somebody else. + triggered_desc = { + trigger = { + NOT = { + root.culture = culture:greek + } + } + desc = roman_restoration.0003.desc.other + } + } + desc = roman_restoration.0003.desc + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_honorable + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + save_scope_as = scoped_emperor + create_roman_empire_holy_scripted_effect = yes + } + + option = { + name = roman_restoration.0003.a + set_nickname_effect = { NICKNAME = nick_the_glorious } + # Send narrative fluff to other players (if any). + every_player = { + limit = { + this != root + is_within_diplo_range = { CHARACTER = root } + } + trigger_event = roman_restoration.0004 + } + } +} + +# Players informed of (Holy) Roman Empire being reborn. +roman_restoration.0004 = { + type = character_event + title = roman_restoration.0004.t + desc = { + first_valid = { + # Reaction of the Byzantines (if they are even still around) + triggered_desc = { + trigger = { + OR = { + has_title = title:e_byzantium + any_liege_or_above = { + has_title = title:e_byzantium + } + } + } + desc = roman_restoration.0004.desc.byzantines + } + # Everybody else. + triggered_desc = { + trigger = { + NOR = { + has_title = title:e_byzantium + any_liege_or_above = { + has_title = title:e_byzantium + } + } + } + desc = roman_restoration.0004.desc.others + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_honorable + } + + immediate = { + #Same-faith non-empire tier rulers are over-awed. + if = { + limit = { faith = scope:scoped_emperor.faith } + play_music_cue = "mx_cue_epic_sacral_moment" + } + #Otherwise, this is a tacit statement of imperial threat. + else = { play_music_cue = "mx_cue_combat_2" } + } + + option = { + name = roman_restoration.0004.a + trigger = { + NOT = { + has_title = title:e_byzantium + } + } + } + option = { + name = roman_restoration.0004.b + trigger = { + has_title = title:e_byzantium + } + stress_impact = { + base = medium_stress_impact_gain + } + } +} + +# on_new_holder: New Emperor gets the Augustus Trait. +roman_restoration.0005 = { + type = character_event + title = roman_restoration.0005.t + desc = { + first_valid = { + # Regular Roman Empire + triggered_desc = { + trigger = { + NOT = { + exists = title:h_roman_empire.var:variable_restored_hre + } + } + desc = roman_restoration.0005.desc.regular + } + # Holy Roman Empire + triggered_desc = { + trigger = { + exists = title:h_roman_empire.var:variable_restored_hre + } + desc = roman_restoration.0005.desc.holy + } + } + } + theme = realm + left_portrait = { + character = root + animation = personality_bold + } + + trigger = { + OR = { + scope:title = title:h_roman_empire + scope:title = title:h_eastern_roman_empire + } + NOT = { has_trait = augustus } + } + + immediate = { + if = { + limit = { + scope:previous_holder = { + any_owned_story = { + type = restoring_roman_provinces_story + } + } + } + hidden_effect = { + scope:previous_holder = { + random_owned_story = { + type = restoring_roman_provinces_story + end_story = yes + } + } + create_story = restoring_roman_provinces_story + } + } + + if = { + limit = { scope:previous_holder = { is_alive = yes has_trait = augustus } } + save_scope_as = new_holder + scope:previous_holder = { trigger_event = roman_restoration.0006 } + } + } + + option = { + name = roman_restoration.0005.a + add_trait = augustus + } +} + +# If old holder is still alive, he will lose the trait. +roman_restoration.0006 = { + type = character_event + title = roman_restoration.0006.t + desc = roman_restoration.0006.desc + theme = realm + left_portrait = { + character = root + animation = shame + } + + immediate = { + #This is so sad: Alexios, play dungeonito. + play_music_cue = "mx_cue_prison" + } + + trigger = { + is_alive = yes + has_trait = augustus + } + + option = { + name = roman_restoration.0006.a + remove_trait = augustus + stress_impact = { + base = minor_stress_impact_gain + } + } +} + +################################################## +# Recovering old Provinces. +################################################## + +# All events fired on_yearly pulses, checking for dejure Duchies. +# Mostly just for flavor. + +scripted_trigger roman_restoration_0010_is_valid_roman_empire_trigger = { + is_ai = no + is_roman_emperor_trigger = yes + OR = { + faith.religion = faith:catholic.religion # Either Christian + faith.religion = faith:hellenic_pagan.religion # Or Hellenic + } +} + +# Provincia Syria Palaestina +# Provincia Aegyptus +# Provincia Cyrenaica +# Provincia Africa +# Provincia Illyricum +# Provincia Italia +# Provincia Gallia +# Provincia Germania +# Provincia Britannia +# Provincia Hispania +# Provincia Mauretania +# Provincia Mesopotamia +# Provincia Caledonia +# Provincia Hibernia +# Imperial Borders (all provinces restored) + +# Provincia Syria Palaestina +roman_restoration.0010 = { + type = character_event + title = roman_restoration.0010.t + desc = roman_restoration.0010.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_syria + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_syria_palestina + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_syria + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} + +# Provincia Aegyptus +roman_restoration.0011 = { + type = character_event + title = roman_restoration.0011.t + desc = roman_restoration.0011.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_aegyptus + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_aegyptus + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_aegyptus + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Cyrenaica +roman_restoration.0012 = { + type = character_event + title = roman_restoration.0012.t + desc = roman_restoration.0012.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_cyrenaica + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_cyrenaica + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_cyrenaica + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Africa +roman_restoration.0013 = { + type = character_event + title = roman_restoration.0013.t + desc = roman_restoration.0013.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_africa + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_africa + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_africa + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Illyricum +roman_restoration.0014 = { + type = character_event + title = roman_restoration.0014.t + desc = roman_restoration.0014.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_illyricum + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_illyricum + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_illyricum + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Italia +roman_restoration.0015 = { + type = character_event + title = roman_restoration.0015.t + desc = roman_restoration.0015.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_italia + } + } + NOT = { exists = title:h_roman_empire.var:variable_restored_italy } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = world_europe_south_italy + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_italia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Gallia +roman_restoration.0016 = { + type = character_event + title = roman_restoration.0016.t + desc = roman_restoration.0016.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_gallia + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = world_europe_west_francia + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_gallia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Germania +roman_restoration.0017 = { + type = character_event + title = roman_restoration.0017.t + desc = roman_restoration.0017.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_germania + } + } + NOT = { exists = title:h_roman_empire.var:variable_restored_hre } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = world_europe_west_germania + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_germania + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Britannia +roman_restoration.0018 = { + type = character_event + title = roman_restoration.0018.t + desc = roman_restoration.0018.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_britannia + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_wales + completely_controls_region = custom_england + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_britannia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Hispania +roman_restoration.0019 = { + type = character_event + title = roman_restoration.0019.t + desc = roman_restoration.0019.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_hispania + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_hispania + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_hispania + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Mauretania +roman_restoration.0020 = { + type = character_event + title = roman_restoration.0020.t + desc = roman_restoration.0020.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_mauretania + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_mauretania + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_mauretania + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Mesopotamia +roman_restoration.0021 = { + type = character_event + title = roman_restoration.0021.t + desc = roman_restoration.0021.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_mesopotamia + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_mesopotamia + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_mesopotamia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Caledonia +roman_restoration.0022 = { + type = character_event + title = roman_restoration.0022.t + desc = roman_restoration.0022.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_caledonia + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_caledonia + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_caledonia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Hibernia +roman_restoration.0023 = { + type = character_event + title = roman_restoration.0023.t + desc = roman_restoration.0023.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_hibernia + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_hibernia + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_hibernia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} + +# Imperial Borders (all provinces restored) +roman_restoration.0024 = { + type = character_event + title = roman_restoration.0024.t + desc = { + desc = roman_restoration.0024.desc.intro + first_valid = { + # Christian Roman Empire + triggered_desc = { + trigger = { + faith.religion = faith:catholic.religion + } + desc = roman_restoration.0024.desc.christian + } + # Hellenic Roman Empire + triggered_desc = { + trigger = { + faith.religion = faith:hellenic_pagan.religion + } + desc = roman_restoration.0024.desc.hellenic + } + # Fallback Roman Empire + triggered_desc = { + trigger = { + NOR = { + faith.religion = faith:catholic.religion + faith.religion = faith:hellenic_pagan.religion + } + } + desc = roman_restoration.0024.desc.fallback + } + } + } + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + is_roman_emperor_excluding_byzantium_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_all + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_full_borders + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_all + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + hidden_effect = { + random_owned_story = { + type = restoring_roman_provinces_story + end_story = yes + } + } + } +} + +################################################## +# Schism events. +################################################## + +roman_restoration.0100 = { + type = character_event + title = roman_restoration.0100.t + desc = { + desc = roman_restoration.0100.desc.intro + first_valid = { + # As an Orthodox + triggered_desc = { + trigger = { + faith = faith:orthodox + } + desc = roman_restoration.0100.desc.orthodox + } + # As a Catholic + triggered_desc = { + trigger = { + faith = faith:catholic + } + desc = roman_restoration.0100.desc.catholic + } + # And Everybody else + triggered_desc = { + trigger = { + NOR = { + faith = faith:catholic + faith = faith:orthodox + } + } + desc = roman_restoration.0100.desc.generic + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + save_scope_as = scoped_emperor + faith = { save_scope_as = mending_faith } + mend_great_schism_scripted_effect = yes + if = { + limit = { + scope:mending_faith = faith:orthodox + } + faith:catholic = { + save_scope_as = loser_faith + } + } + else_if = { + limit = { + scope:mending_faith = faith:catholic + } + faith:orthodox = { + save_scope_as = loser_faith + } + } + else = { + religion = { + random_faith = { + limit = { + exists = religious_head + this != scope:mending_faith + } + save_scope_as = loser_faith + } + } + } + legend_seed_great_deed_faith_effect = { + ANTAGONIST = scope:loser_faith.religious_head + OLD_FAITH = scope:loser_faith + } + } + + option = { + name = roman_restoration.0100.a + } +} + +# Ecumenical followers get chance to convert. +roman_restoration.0101 = { + type = character_event + title = roman_restoration.0100.t + desc = { + desc = roman_restoration.0101.desc.intro + first_valid = { + # As an Orthodox + triggered_desc = { + trigger = { + scope:mending_faith = faith:orthodox + } + desc = roman_restoration.0101.desc.orthodox + } + # As a Catholic + triggered_desc = { + trigger = { + scope:mending_faith = faith:catholic + } + desc = roman_restoration.0101.desc.catholic + } + # And Everybody else + triggered_desc = { + trigger = { + NOR = { + scope:mending_faith = faith:catholic + scope:mending_faith = faith:orthodox + } + } + desc = roman_restoration.0101.desc.generic + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + faith = { save_scope_as = old_faith } + } + + option = { + name = roman_restoration.0101.a + trigger = { + OR = { + is_ai = no + NOT = { has_trait = zealous } # Never! + } + } + set_character_faith = scope:mending_faith + every_held_title = { + title_tier = county + set_county_faith = scope:mending_faith + } + ai_chance = { + base = 80 + modifier = { # Where the wind blows, I sail. + add = 20 + has_trait = cynical + } + } + } + option = { + name = roman_restoration.0101.b + ai_chance = { + base = 20 + ai_value_modifier = { + ai_zeal = 1.0 + } + modifier = { + add = 20 + has_trait = zealous + } + modifier = { + add = 10 + OR = { + has_title = title:e_byzantium + has_title = title:e_hre + } + } + } + } +} + +# Heretics and Heathens are only notified. +roman_restoration.0102 = { + type = character_event + title = roman_restoration.0100.t + desc = { + desc = roman_restoration.0101.desc.intro + first_valid = { + # As an Orthodox + triggered_desc = { + trigger = { + scope:mending_faith = faith:orthodox + } + desc = roman_restoration.0101.desc.orthodox + } + # As a Catholic + triggered_desc = { + trigger = { + scope:mending_faith = faith:catholic + } + desc = roman_restoration.0101.desc.catholic + } + # And Everybody else + triggered_desc = { + trigger = { + NOR = { + scope:mending_faith = faith:catholic + scope:mending_faith = faith:orthodox + } + } + desc = roman_restoration.0101.desc.generic + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_zealous + } + + immediate = { + #Even if you're not converting, it's still all rather momentous. + play_music_cue = "mx_cue_faith_conversion" + } + + option = { + name = roman_restoration.0102.a + } +} + +# Faithful players notified. +roman_restoration.0103 = { + type = character_event + title = roman_restoration.0100.t + desc = { + desc = roman_restoration.0100.desc.intro + first_valid = { + # As an Orthodox + triggered_desc = { + trigger = { + scope:mending_faith = faith:orthodox + } + desc = roman_restoration.0100.desc.orthodox + } + # As a Catholic + triggered_desc = { + trigger = { + scope:mending_faith = faith:catholic + } + desc = roman_restoration.0100.desc.catholic + } + # And Everybody else + triggered_desc = { + trigger = { + NOR = { + scope:mending_faith = faith:catholic + scope:mending_faith = faith:orthodox + } + } + desc = roman_restoration.0100.desc.generic + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_zealous + } + + immediate = { + #Even if you're not converting, it's still all rather momentous. + play_music_cue = "mx_cue_faith_conversion" + } + + option = { + name = roman_restoration.0100.a + } +} + +################################################## +# Flavor for restoring the Pentarchy as the Orthodox ERE. +################################################## + +# All on_yearly_action pulse. + +# Patriarchate of Antioch +# Patriarchate of Jerusalem +# Patriarchate of Alexandria +# Patriarchate of Rome + +scripted_trigger roman_restoration_0104_is_valid_roman_empire_trigger = { + is_roman_emperor_trigger = yes + faith = faith:orthodox + faith = { has_doctrine = special_doctrine_ecumenical_christian } +} + +# on_new_holder hidden event to check title and conqueror. +roman_restoration.0199 = { + type = character_event + hidden = yes + + trigger = { + OR = { + scope:title = title:c_antiocheia + scope:title = title:c_jerusalem + scope:title = title:c_alexandria + scope:title = title:c_roma + } + OR = { + AND = { + roman_restoration_0104_is_valid_roman_empire_trigger = yes + faith = faith:orthodox + } + any_liege_or_above = { + roman_restoration_0104_is_valid_roman_empire_trigger = yes + faith = faith:orthodox + } + } + } + + immediate = { + if = { + limit = { + any_liege_or_above = { + roman_restoration_0104_is_valid_roman_empire_trigger = yes + faith = faith:orthodox + } + } + random_liege_or_above = { + limit = { + roman_restoration_0104_is_valid_roman_empire_trigger = yes + faith = faith:orthodox + } + trigger_event = { + on_action = on_action_orthodox_pentarchy_pulse + } + } + } + else = { + trigger_event = { + on_action = on_action_orthodox_pentarchy_pulse + } + } + } +} + +# Patriarchate of Antioch +roman_restoration.0104 = { + type = character_event + title = roman_restoration.0104.t + desc = roman_restoration.0104.desc + theme = realm + left_portrait = { + character = root + animation = personality_zealous + } + + trigger = { + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_antioch + } + } + NOT = { has_character_flag = flag_orthodox_patriarchate_cooldown } + roman_restoration_0104_is_valid_roman_empire_trigger = yes + scope:title = title:c_antiocheia + #title:c_antiocheia.holder.faith = root.faith #Not under an infidel vassal. + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + add_to_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_antioch + } + hidden_effect = { + add_character_flag = { + flag = flag_orthodox_patriarchate_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0104.a + add_piety = major_piety_gain + } +} + +# Patriarchate of Jerusalem +roman_restoration.0105 = { + type = character_event + title = roman_restoration.0105.t + desc = roman_restoration.0105.desc + theme = realm + left_portrait = { + character = root + animation = personality_zealous + } + + trigger = { + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_jerusalem + } + } + NOT = { has_character_flag = flag_orthodox_patriarchate_cooldown } + roman_restoration_0104_is_valid_roman_empire_trigger = yes + scope:title = title:c_jerusalem + #title:c_jerusalem.holder.faith = root.faith #Not under an infidel vassal. + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + add_to_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_jerusalem + } + hidden_effect = { + add_character_flag = { + flag = flag_orthodox_patriarchate_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0104.a + add_piety = major_piety_gain + } +} + +# Patriarchate of Alexandria +roman_restoration.0106 = { + type = character_event + title = roman_restoration.0106.t + desc = roman_restoration.0106.desc + theme = realm + left_portrait = { + character = root + animation = personality_zealous + } + + trigger = { + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_alexandria + } + } + NOT = { has_character_flag = flag_orthodox_patriarchate_cooldown } + roman_restoration_0104_is_valid_roman_empire_trigger = yes + scope:title = title:c_alexandria + #title:c_alexandria.holder.faith = root.faith #Not under an infidel vassal. + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + add_to_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_alexandria + } + hidden_effect = { + add_character_flag = { + flag = flag_orthodox_patriarchate_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0104.a + add_piety = major_piety_gain + } +} + +# Patriarchate of Rome +roman_restoration.0107 = { + type = character_event + title = roman_restoration.0107.t + desc = roman_restoration.0107.desc + theme = emperor + left_portrait = { + character = root + animation = personality_zealous + } + + trigger = { + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_roma + } + } + NOT = { has_character_flag = flag_orthodox_patriarchate_cooldown } + roman_restoration_0104_is_valid_roman_empire_trigger = yes + scope:title = title:c_roma + #title:c_roma.holder.faith = root.faith #Not under an infidel vassal. + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + add_to_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_roma + } + hidden_effect = { + add_character_flag = { + flag = flag_orthodox_patriarchate_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0104.a + add_piety = major_piety_gain + } +} + + + +################################################## +# Imposing Iconoclast Patriarchate +################################################## + +roman_restoration.0120 = { + type = character_event + title = roman_restoration.0120.t + desc = roman_restoration.0120.desc + theme = realm + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + save_scope_as = reformer + if = { # Pick your chaplain first. + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { faith = faith:iconoclast } + } + cp:councillor_court_chaplain = { save_scope_as = new_pope } + } + else = { + hidden_effect = { + create_character = { + employer = root + template = religious_leader_character + random_traits = no + save_scope_as = new_pope + dynasty = generate + } + } + scope:new_pope = { + add_trait = education_learning_3 + add_trait = zealous + add_trait = intellect_good_1 + random_list = { + 1 = { add_trait = lustful } + 1 = { add_trait = chaste } + 1 = { add_trait = wrathful } + 1 = { add_trait = diligent } + 1 = { add_trait = impatient } + 1 = { add_trait = arrogant } + 1 = { add_trait = humble } + 1 = { add_trait = gregarious } + } + random_list = { + 1 = { add_trait = honest } + 1 = { add_trait = ambitious } + 1 = { add_trait = just } + 1 = { add_trait = cynical } + 1 = { add_trait = zealous } + 1 = { add_trait = compassionate } + 1 = { add_trait = stubborn } + } + } + } + create_title_and_vassal_change = { + type = returned + save_scope_as = change + add_claim_on_loss = no + } + title:d_iconoclast = { + change_title_holder = { + holder = scope:new_pope + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + root = { destroy_title = title:k_orthodox } + faith:iconoclast = { + change_fervor = { + value = 15 + desc = fervor_gain_iconoclast_patriarchate + } + if = { + limit = { NOT = { has_doctrine = special_doctrine_ecumenical_christian } } + add_doctrine = special_doctrine_ecumenical_christian + } + } + faith:orthodox = { + change_fervor = { + value = -30 + desc = fervor_loss_iconoclast_patriarchate + } + if = { + limit = { has_doctrine = special_doctrine_ecumenical_christian } + remove_doctrine = special_doctrine_ecumenical_christian + } + } + } + + option = { + name = roman_restoration.0120.a + add_piety = major_piety_gain + every_player = { + limit = { + this != root + faith.religion = faith:orthodox.religion + } + trigger_event = roman_restoration.0121 # Notification. + } + if = { # Vassalize if possible/needed. + limit = { + highest_held_title_tier > scope:new_pope.highest_held_title_tier + NOT = { scope:new_pope = { any_liege_or_above = { this = root } } } + } + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = no + } + scope:new_pope = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } +} + +# Christians notified. +roman_restoration.0121 = { + type = character_event + title = roman_restoration.0120.t + desc = { + first_valid = { + # Orthodox Reaction + triggered_desc = { + trigger = { + root.faith = faith:orthodox + } + desc = roman_restoration.0121.desc.orthodox + } + # Iconoclast reaction + triggered_desc = { + trigger = { + root.faith = faith:iconoclast + } + desc = roman_restoration.0121.desc.iconoclast + } + # Every other Christian + triggered_desc = { + trigger = { + NOR = { + root.faith = faith:orthodox + root.faith = faith:iconoclast + } + } + desc = roman_restoration.0121.desc.other + } + } + } + theme = realm + left_portrait = { + character = scope:reformer + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + #Iconoclasts consider this great. + if = { + limit = { root.faith = faith:iconoclast } + play_music_cue = "mx_cue_sacredrite" + } + #Orthodox consider it monstrous. + if = { + limit = { root.faith = faith:orthodox } + play_music_cue = "mx_cue_combat_2" + } + } + + option = { + name = { + trigger = { + root.faith = faith:orthodox + } + text = roman_restoration.0121.a + } + name = { + trigger = { + root.faith = faith:iconoclast + } + text = roman_restoration.0121.b + } + if = { + limit = { + root.faith = faith:orthodox + } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + } + option = { + name = roman_restoration.0121.c + fallback = yes + } +} + +################################################## +# Restoring Ecumenical Patriarchate +################################################## + +roman_restoration.0122 = { + type = character_event + title = roman_restoration.0122.t + desc = roman_restoration.0122.desc + theme = realm + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + save_scope_as = reformer + if = { # Pick your chaplain first. + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { faith = faith:orthodox } + } + cp:councillor_court_chaplain = { save_scope_as = new_pope } + } + else = { + hidden_effect = { + create_character = { + employer = root + template = religious_leader_character + random_traits = no + save_scope_as = new_pope + dynasty = generate + } + } + scope:new_pope = { + add_trait = education_learning_3 + add_trait = zealous + add_trait = intellect_good_1 + random_list = { + 1 = { add_trait = lustful } + 1 = { add_trait = chaste } + 1 = { add_trait = wrathful } + 1 = { add_trait = diligent } + 1 = { add_trait = impatient } + 1 = { add_trait = arrogant } + 1 = { add_trait = humble } + 1 = { add_trait = gregarious } + } + random_list = { + 1 = { add_trait = honest } + 1 = { add_trait = ambitious } + 1 = { add_trait = just } + 1 = { add_trait = cynical } + 1 = { add_trait = zealous } + 1 = { add_trait = compassionate } + 1 = { add_trait = stubborn } + } + } + } + create_title_and_vassal_change = { + type = returned + save_scope_as = change + add_claim_on_loss = no + } + title:k_orthodox = { + change_title_holder = { + holder = scope:new_pope + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + root = { destroy_title = title:d_iconoclast } + faith:orthodox = { + change_fervor = { + value = 15 + desc = fervor_gain_ecumenical_patriarchate + } + if = { + limit = { NOT = { has_doctrine = special_doctrine_ecumenical_christian } } + add_doctrine = special_doctrine_ecumenical_christian + } + } + faith:iconoclast = { + change_fervor = { + value = -30 + desc = fervor_loss_ecumenical_patriarchate + } + if = { + limit = { has_doctrine = special_doctrine_ecumenical_christian } + remove_doctrine = special_doctrine_ecumenical_christian + } + } + } + + option = { + name = roman_restoration.0122.a + add_piety = major_piety_gain + every_player = { + limit = { + this != root + faith.religion = faith:orthodox.religion + } + trigger_event = roman_restoration.0123 # Notification. + } + if = { # Vassalize if possible/needed. + limit = { + highest_held_title_tier > scope:new_pope.highest_held_title_tier + NOT = { scope:new_pope = { any_liege_or_above = { this = root } } } + } + create_title_and_vassal_change = { + type = returned + save_scope_as = change + add_claim_on_loss = no + } + scope:new_pope = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } +} + +# Christians notified. +roman_restoration.0123 = { + type = character_event + title = roman_restoration.0122.t + desc = { + first_valid = { + # Orthodox Reaction + triggered_desc = { + trigger = { + root.faith = faith:orthodox + } + desc = roman_restoration.0123.desc.orthodox + } + # Iconoclast reaction + triggered_desc = { + trigger = { + root.faith = faith:iconoclast + } + desc = roman_restoration.0123.desc.iconoclast + } + #Every other Christian + triggered_desc = { + trigger = { + NOR = { + root.faith = faith:orthodox + root.faith = faith:iconoclast + } + } + desc = roman_restoration.0123.desc.other + } + } + } + theme = realm + left_portrait = { + character = scope:reformer + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + #Orthodox consider this great. + if = { + limit = { root.faith = faith:orthodox } + play_music_cue = "mx_cue_sacredrite" + } + #Iconoclasts consider it monstrous. + if = { + limit = { root.faith = faith:iconoclast } + play_music_cue = "mx_cue_combat_2" + } + } + + option = { + name = roman_restoration.0123.a + trigger = { + root.faith = faith:orthodox + } + } + option = { + name = roman_restoration.0123.b + trigger = { + root.faith = faith:iconoclast + } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + option = { + name = roman_restoration.0123.c + trigger = { + NOR = { + root.faith = faith:orthodox + root.faith = faith:iconoclast + } + } + } +} + +################################################## +# Restoring Papacy +################################################## + +roman_restoration.0124 = { + type = character_event + title = roman_restoration.0124.t + desc = roman_restoration.0124.desc + theme = realm + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + restore_papacy_scripted_effect = yes + } + + option = { + name = roman_restoration.0124.a + add_piety = major_piety_gain + every_player = { + limit = { + this != root + faith.religion = faith:catholic.religion + } + trigger_event = roman_restoration.0125 # Notification. + } + if = { # Vassalize if possible/needed. + limit = { + highest_held_title_tier > scope:new_pope.highest_held_title_tier + NOT = { scope:new_pope = { any_liege_or_above = { this = root } } } + } + create_title_and_vassal_change = { + type = returned + save_scope_as = change + add_claim_on_loss = no + } + scope:new_pope = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } +} + +# Christians notified. +roman_restoration.0125 = { + type = character_event + title = roman_restoration.0124.t + desc = { + first_valid = { + # Catholic Reaction + triggered_desc = { + trigger = { + root.faith = faith:catholic + } + desc = roman_restoration.0125.desc.catholic + } + # Every other Christian + triggered_desc = { + trigger = { + NOT = { + root.faith = faith:catholic + } + + } + desc = roman_restoration.0125.desc.other + } + } + } + theme = realm + left_portrait = { + character = scope:reformer + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + #Catholics are happy! + if = { + limit = { faith = faith:catholic } + play_music_cue = "mx_cue_sacredrite" + } + } + + option = { + name = roman_restoration.0125.a + trigger = { + root.faith = faith:catholic + } + } + option = { + name = roman_restoration.0125.b + trigger = { + NOT = { + root.faith = faith:catholic + } + } + } +} + +################################################## +# Destroying the Papacy as a Muslim/Pagan +################################################## + +roman_restoration.0130 = { + type = character_event + title = roman_restoration.0130.t + desc = { + first_valid = { + # Muslim Reaction + triggered_desc = { + trigger = { + root.faith.religion = faith:ashari.religion + } + desc = roman_restoration.0130.desc.muslim + } + # Hellenic Reaction + triggered_desc = { + trigger = { + root.faith.religion = faith:hellenic_pagan.religion + } + desc = roman_restoration.0130.desc.hellenic + } + # And the rest + triggered_desc = { + trigger = { + NOR = { + root.faith.religion = faith:ashari.religion + root.faith.religion = faith:hellenic_pagan.religion + } + } + desc = roman_restoration.0130.desc.fallback + } + } + first_valid = { + # No current Pope + triggered_desc = { + trigger = { + NOT = { + exists = scope:scoped_pope + } + } + desc = roman_restoration.0130.desc.no_pope + } + # Current Pope is crucified + triggered_desc = { + trigger = { + root.faith.religion = faith:hellenic_pagan.religion + } + desc = roman_restoration.0130.desc.pope.crucifixion + } + # Current Pope is sacrificed + triggered_desc = { + trigger = { + root.faith = { + has_doctrine_parameter = human_sacrifice_active + } + } + desc = roman_restoration.0130.desc.pope.sacrificed + } + # Current Pope converts + desc = roman_restoration.0130.desc.pope.submission + } + } + theme = faith + override_background = { + trigger = { + root.faith = { + OR = { + religion = faith:hellenic_pagan.religion + has_doctrine_parameter = human_sacrifice_active + } + } + } + reference = burning_building + } + left_portrait = { + character = scope:scoped_destroyer + animation = schadenfreude + } + right_portrait = { + character = scope:scoped_pope + animation = fear + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + save_scope_as = scoped_destroyer + if = { + limit = { exists = title:k_papal_state.holder } + title:k_papal_state.holder = { save_scope_as = scoped_pope } + } + faith:catholic = { save_scope_as = catholic } + destroy_papacy_scripted_effect = yes + } + + option = { + name = { + trigger = { + faith.religion = faith:ashari.religion + } + text = roman_restoration.0130.a.a + } + name = { + trigger = { + faith.religion = faith:hellenic_pagan.religion + } + text = roman_restoration.0130.a.b + } + name = { + trigger = { + NOR = { + faith.religion = faith:ashari.religion + faith.religion = faith:hellenic_pagan.religion + } + } + text = roman_restoration.0130.a.c + } + every_player = { + limit = { + this != root + OR = { + faith.religion = faith:catholic.religion + faith.religion = root.faith.religion + } + } + trigger_event = roman_restoration.0131 # Notification. + } + } +} + +# Other players notified. +roman_restoration.0131 = { + type = character_event + title = roman_restoration.0130.t + desc = { + first_valid = { + # Muslim/Pagan Reaction + triggered_desc = { + trigger = { + root.faith.religion = scope:scoped_destroyer.faith.religion + } + desc = roman_restoration.0131.desc.faithful + } + # Christian Reaction + triggered_desc = { + trigger = { + root.faith.religion = faith:catholic.religion + } + desc = roman_restoration.0131.desc.christians + } + # Fallback + triggered_desc = { + trigger = { + NOR = { + root.faith.religion = faith:catholic.religion + root.faith.religion = scope:scoped_destroyer.faith.religion + } + } + desc = roman_restoration.0131.desc.fallback + } + } + } + theme = faith + override_background = { + trigger = { + scope:scoped_destroyer.faith = { + OR = { + religion = faith:hellenic_pagan.religion + has_doctrine_parameter = human_sacrifice_active + } + } + } + reference = burning_building + } + left_portrait = { + character = scope:scoped_destroyer + animation = schadenfreude + } + right_portrait = { + character = scope:scoped_pope + animation = fear + } + + immediate = { play_music_cue = "mx_cue_combat_2" } + + option = { + name = { + trigger = { + faith.religion = scope:scoped_destroyer.faith.religion + } + text = roman_restoration.0131.a.a + } + name = { + trigger = { + faith.religion = faith:catholic.religion + } + text = roman_restoration.0131.a.b + } + name = { + trigger = { + NOR = { + faith.religion = faith:catholic.religion + faith.religion = scope:scoped_destroyer.faith.religion + } + } + text = roman_restoration.0131.a.c + } + if = { + limit = { + root.faith = faith:catholic + NOT = { has_trait = cynical } + } + add_opinion = { + target = scope:scoped_destroyer + modifier = destroyed_papacy_opinion + } + stress_impact = { + base = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + } + } +} + +################################################## +# Unifying Italy as Italian. +################################################## +scripted_effect add_innovation_if_missing_effect = { + if = { + limit = { + NOT = { + has_innovation = $INNOVATION$ + } + } + add_innovation = $INNOVATION$ + } +} + + +roman_restoration.0140 = { + type = character_event + title = roman_restoration.0140.t + desc = roman_restoration.0140.desc + theme = realm + left_portrait = { + character = root + animation = personality_greedy + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + save_scope_as = scoped_ruler + # De jure shifts. + hidden_effect = { + title:d_istria = { # Bite Croatia. + set_de_jure_liege_title = title:k_italy + } + title:d_krain = { + set_de_jure_liege_title = title:k_italy + } + title:d_tyrol = { + set_de_jure_liege_title = title:k_italy + } + title:d_carinthia = { + set_de_jure_liege_title = title:k_italy + } + title:k_sicily = { # Then shift all Kingdoms. + set_de_jure_liege_title = title:e_italy + } + title:k_italy = { + set_de_jure_liege_title = title:e_italy + } + title:k_venice = { + set_de_jure_liege_title = title:e_italy + } + title:k_croatia = { + set_de_jure_liege_title = title:e_italy + } + title:k_serbia = { + set_de_jure_liege_title = title:e_italy + } + } + } + option = { + name = roman_restoration.0140.a + add_prestige = major_prestige_gain + + every_culture_global = { + limit = { has_cultural_pillar = heritage_latin } + + add_innovation_if_missing_effect = { INNOVATION = innovation_men_at_arms } + add_innovation_if_missing_effect = { INNOVATION = innovation_pike_columns } + add_innovation_if_missing_effect = { INNOVATION = innovation_guilds } + } + + # Send narrative fluff to other players (if any). + every_player = { + limit = { + this != root + capital_province = { geographical_region = world_europe_west } + } + trigger_event = roman_restoration.0141 + } + hidden_effect = { # Latins chance to convert to French. + every_vassal = { + limit = { + capital_province = { + geographical_region = world_europe_south_italy + } + is_ai = yes + } + random = { + chance = 50 + set_culture_same_as = root + capital_county = { + set_county_culture = root.culture + } + } + } + } + legend_seed_great_deed_region_effect = { + REGION = geographical_region:world_europe_south_italy + } + } +} + +roman_restoration.0141 = { + type = character_event + title = roman_restoration.0140.t + desc = roman_restoration.0141.desc + theme = realm + left_portrait = { + character = scope:scoped_ruler + animation = personality_greedy + } + + immediate = { play_music_cue = "mx_cue_positive_effect" } + + option = { + name = roman_restoration.0141.a + trigger = { + OR = { + has_title = title:e_hre + is_roman_emperor_trigger = yes + } + } + } + + option = { + name = roman_restoration.0141.b + trigger = { + NOR = { + has_title = title:e_hre + is_roman_emperor_trigger = yes + } + } + } +} + +################################################## +# Italian Roman Empire rises +################################################## + +roman_restoration.0150 = { + type = character_event + title = roman_restoration.0150.t + desc = { + desc = roman_restoration.0150.desc # Introduction. + first_valid = { + # Doing it as Christians. + triggered_desc = { + trigger = { + NOT = { + faith.religion = faith:hellenic_pagan.religion + } + } + desc = roman_restoration.0001.desc.christians + } + # Doing it as Hellenics + triggered_desc = { + trigger = { + faith.religion = faith:hellenic_pagan.religion + } + desc = roman_restoration.0001.desc.hellenics + } + desc = roman_restoration.0001.desc.fallback + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_bold + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + save_scope_as = scoped_emperor + create_roman_empire_italy_scripted_effect = yes + } + + option = { + name = roman_restoration.0150.a + set_nickname_effect = { NICKNAME = nick_the_glorious } + # Send narrative fluff to other players (if any). + every_player = { + limit = { + this != root + is_within_diplo_range = { CHARACTER = root } + } + trigger_event = roman_restoration.0151 + } + } +} + +# Players informed of (Italian) Roman Empire being reborn. +roman_restoration.0151 = { + type = character_event + title = roman_restoration.0151.t + desc = { + first_valid = { + # Reaction of the Byzantines (if they are even still around) + triggered_desc = { + trigger = { + OR = { + has_title = title:e_byzantium + any_liege_or_above = { + has_title = title:e_byzantium + } + } + } + desc = roman_restoration.0151.desc.byzantines + } + # Everybody else. + triggered_desc = { + trigger = { + NOR = { + has_title = title:e_byzantium + any_liege_or_above = { + has_title = title:e_byzantium + } + } + } + desc = roman_restoration.0151.desc.others + } + first_valid = { + # Regular. + triggered_desc = { + trigger = { + NOT = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + } + desc = roman_restoration.0002.desc.christians + } + # Christians freaking out. + triggered_desc = { + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + desc = roman_restoration.0002.desc.hellenics + } + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_bold + } + + option = { # Regular + name = roman_restoration.0002.a + trigger = { + NOT = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + NOR = { + has_title = title:e_byzantium + has_title = title:e_hre + } + } + } + option = { # Regular vs Byzantium/HRE + name = roman_restoration.0002.b + trigger = { + NOT = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + OR = { + has_title = title:e_byzantium + has_title = title:e_hre + } + } + } + option = { # Crazy Hellenics + name = roman_restoration.0002.c + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + NOR = { + has_title = title:e_byzantium + has_title = title:e_hre + } + } + } + option = { # Crazy Hellenics vs Byzantium/HRE + name = roman_restoration.0002.d + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + OR = { + has_title = title:e_byzantium + has_title = title:e_hre + } + } + stress_impact = { + zealous = minor_stress_impact_gain + } + } +} + +################################################## +# Byzantium/Roman Empire challenges HRE. +################################################## + +roman_restoration.0160 = { + type = character_event + title = roman_restoration.0160.t + desc = roman_restoration.0160.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = anger + } + right_portrait = { + character = scope:hre_emperor + animation = disgust + } + + immediate = { + play_music_cue = "mx_cue_combat_2" + save_scope_as = byz_emperor + title:e_hre.holder = { + save_scope_as = hre_emperor + trigger_event = roman_restoration.0161 + } + hidden_effect = { + add_character_flag = { + flag = flag_emperor_challenging_hre + } + } + } + option = { + name = roman_restoration.0160.a + start_war = { + casus_belli = dismantle_holy_pretender_cb + target = title:e_hre.holder + } + } +} + +# HRE notified. +roman_restoration.0161 = { + type = character_event + title = roman_restoration.0161.t + desc = roman_restoration.0161.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = disgust + } + right_portrait = { + character = scope:hre_emperor + animation = anger + } + + immediate = { play_music_cue = "mx_cue_combat_2" } + + option = { + name = roman_restoration.0161.a + } +} + +# War is over: +# Byz is victorious. Byz notified. +roman_restoration.0162 = { + type = character_event + title = roman_restoration.0162.t + desc = roman_restoration.0162.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = schadenfreude + } + right_portrait = { + character = scope:hre_emperor + animation = grief + } + + immediate = { play_music_cue = "mx_cue_epic_sacral_moment" } + + option = { + name = roman_restoration.0162.a + } +} + +# Byz is victorious. HRE notified. +roman_restoration.0163 = { + type = character_event + title = roman_restoration.0163.t + desc = roman_restoration.0163.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = schadenfreude + } + right_portrait = { + character = scope:hre_emperor + animation = grief + } + + immediate = { play_music_cue = "mx_cue_stress" } + + option = { + name = roman_restoration.0163.a + stress_impact = { + base = minor_stress_impact_gain + } + } +} + +# Byz is defeated. Byz notified. +roman_restoration.0164 = { + type = character_event + title = roman_restoration.0164.t + desc = roman_restoration.0164.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = grief + } + right_portrait = { + character = scope:hre_emperor + animation = schadenfreude + } + + immediate = { play_music_cue = "mx_cue_stress" } + + option = { + name = roman_restoration.0164.a + stress_impact = { + base = medium_stress_impact_gain + } + } +} + +# Byz is defeated. HRE notified. +roman_restoration.0165 = { + type = character_event + title = roman_restoration.0165.t + desc = roman_restoration.0165.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = grief + } + right_portrait = { + character = scope:hre_emperor + animation = schadenfreude + } + + immediate = { play_music_cue = "mx_cue_epic_sacral_moment" } + + option = { + name = roman_restoration.0165.a + } +} + +################################################## +# Byzantium/Roman Empire challenges HRE. +################################################## + +roman_restoration.0170 = { + type = character_event + title = roman_restoration.0170.t + desc = roman_restoration.0170.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = anger + } + right_portrait = { + character = scope:byz_emperor + animation = disgust + } + + immediate = { + play_music_cue = "mx_cue_combat_2" + save_scope_as = hre_emperor + title:e_byzantium.holder = { + save_scope_as = byz_emperor + trigger_event = roman_restoration.0171 + } + hidden_effect = { + add_character_flag = { + flag = flag_emperor_challenging_byz + } + } + } + option = { + name = roman_restoration.0170.a + start_war = { + casus_belli = dismantle_byz_pretender_cb + target = title:e_byzantium.holder + } + } +} + +# HRE notified. +roman_restoration.0171 = { + type = character_event + title = roman_restoration.0171.t + desc = roman_restoration.0171.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = disgust + } + right_portrait = { + character = scope:byz_emperor + animation = anger + } + + immediate = { play_music_cue = "mx_cue_combat_2" } + + option = { + name = roman_restoration.0171.a + } +} + +# War is over: +# HRE is victorious. HRE notified. +roman_restoration.0172 = { + type = character_event + title = roman_restoration.0172.t + desc = roman_restoration.0172.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = schadenfreude + } + right_portrait = { + character = scope:byz_emperor + animation = grief + } + + immediate = { play_music_cue = "mx_cue_epic_sacral_moment" } + + option = { + name = roman_restoration.0172.a + } +} + +# HRE is victorious. Byz notified. +roman_restoration.0173 = { + type = character_event + title = roman_restoration.0173.t + desc = roman_restoration.0173.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = schadenfreude + } + right_portrait = { + character = scope:byz_emperor + animation = grief + } + + immediate = { play_music_cue = "mx_cue_stress" } + + option = { + name = roman_restoration.0173.a + stress_impact = { + base = minor_stress_impact_gain + } + } +} + +# Byz is defeated. HRE notified. +roman_restoration.0174 = { + type = character_event + title = roman_restoration.0174.t + desc = roman_restoration.0174.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = grief + } + right_portrait = { + character = scope:byz_emperor + animation = schadenfreude + } + + immediate = { play_music_cue = "mx_cue_stress" } + + option = { + name = roman_restoration.0174.a + stress_impact = { + base = medium_stress_impact_gain + } + } +} + +# HRE is defeated. Byz notified. +roman_restoration.0175 = { + type = character_event + title = roman_restoration.0175.t + desc = roman_restoration.0175.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = grief + } + right_portrait = { + character = scope:byz_emperor + animation = schadenfreude + } + + immediate = { play_music_cue = "mx_cue_epic_sacral_moment" } + + option = { + name = roman_restoration.0175.a + } +} + +############################ +# Byz Emp reclaims Constantinople +# by Joe Parkin +############################ + +roman_restoration.1200 = { + type = character_event + title = roman_restoration.1200.t + desc = roman_restoration.1200.desc + theme = realm + left_portrait = { + character = root + animation = personality_bold + } + override_background = { reference = ep3_constantinople } + override_effect_2d = legend_glow + + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + is_roman_emperor_trigger = yes + scope:county = { + # Constantinople only + this = title:c_byzantion + previous_holder = { + NOR = { + root.primary_title.previous_holder ?= this + root.top_liege.primary_title.previous_holder ?= this + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + add_prestige = major_prestige_gain + if = { + limit = { + culture = { has_cultural_parameter = holds_triumphs } + } + custom_tooltip = { + text = free_triumph_tooltip + add_character_flag = free_triumph_flag + } + } + if = { + limit = { + culture = { has_cultural_parameter = hosts_chariot_races } + } + custom_tooltip = { + text = half_price_chariot_race_tooltip + add_character_flag = half_price_chariot_race_flag + } + } + } + + option = { + name = roman_restoration.1200.a + trigger = { + NOT = { capital_county = title:c_byzantion } + } + if = { + limit = { government_allows = administrative } + change_influence = medium_influence_gain + } + add_legitimacy = minor_legitimacy_gain + set_realm_capital = title:c_byzantion + } + + option = { + name = { + text = roman_restoration.1200.b.rome + trigger = { + is_roman_emperor_excluding_byzantium_trigger = yes + } + } + name = { + text = roman_restoration.1200.b + trigger = { + is_roman_emperor_excluding_byzantium_trigger = no + } + } + } +} + +################################################# +# Byz Emp reclaims Constantinople from you (you wretched boy!) by Isabella Welch +################################################# + +roman_restoration.1204 = { + type = letter_event + opening = roman_restoration.1204.t + sender = scope:byz_emp + desc = roman_restoration.1204.desc_vassal + + trigger = { + + } + + immediate = { + title:e_byzantium.holder = { + save_scope_as = byz_emp + } + } + + option = { + name = roman_restoration.1204.a + scope:byz_emp = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 30 + } + } + } + + option = { + name = roman_restoration.1204.b + scope:byz_emp = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -30 + } + } + } +} +# ^I have no idea if Isabeau chose this ID on purpose but it's bloody hilarious. + +################################################## +# Byzantium is Booted out of Sicily +# by Ewan Cowhig Croft +# 1211 - 1220 +################################################## + +scripted_trigger roman_restoration_1211_ai_choice_trigger = { + OR = { + culture = { has_cultural_pillar = heritage_arabic } + culture = { has_cultural_pillar = heritage_berber } + religion = religion:islam_religion + capital_county.title_province = { geographical_region = world_africa_north } + } +} + +scripted_effect roman_restoration_1211_piss_off_big_e_effect = { + add_opinion = { + target = scope:taker + modifier = outraged_opinion + opinion = -80 + } + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:taker } + } + set_relation_potential_rival = scope:taker + } +} + +# Scope:taker chooses where their allegiances lie. +roman_restoration.1211 = { + type = character_event + title = roman_restoration.1211.t + desc = { + desc = roman_restoration.1211.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:emperor } + desc = roman_restoration.1211.desc.body.emperor_exists + } + desc = roman_restoration.1211.desc.body.emperor_absent + } + desc = roman_restoration.1211.desc.outro + } + theme = realm + left_portrait = { + character = scope:taker + animation = marshal + } + right_portrait = { + character = scope:emperor + animation = rage + } + immediate = { + add_prestige_experience = rebuke_roman_revanchism_sicily_fame_reward_value + # Try to grab the emperor. + title:e_byzantium.holder ?= { + save_scope_as = emperor + # And piss them off. + roman_restoration_1211_piss_off_big_e_effect = yes + } + } + + # We belong with Italy, forever. + option = { + name = roman_restoration.1211.a + + title:k_sicily = { set_de_jure_liege_title = title:e_italy } + save_scope_value_as = { + name = new_empire + value = flag:italia + } + + # No stress here. + ai_chance = { + base = 0 + # Anyone who isn't strongly affiliated to North Africa prefers Italy. + modifier = { + add = 1 + roman_restoration_1211_ai_choice_trigger = no + } + } + } + + # Sicily's destiny lies, as it always has, across the sea. + option = { + name = roman_restoration.1211.b + + title:k_sicily = { set_de_jure_liege_title = title:e_maghreb } + save_scope_value_as = { + name = new_empire + value = flag:maghreb + } + + # No stress here. + ai_chance = { + base = 0 + # Berbers, Arabs, Muslims, and folks with their capital in North Africa prefer the Maghreb. + modifier = { + add = 1 + roman_restoration_1211_ai_choice_trigger = yes + } + } + } + + # Why, with _me_ of course! + option = { + name = roman_restoration.1211.c + trigger = { rebuke_roman_revanchism_sicily_controls_unlisted_empire_trigger = yes } + show_as_unavailable = { always = yes } + + title:k_sicily = { set_de_jure_liege_title = root.primary_title } + save_scope_value_as = { + name = new_empire + value = flag:own + } + + # No stress here. + # If the AI can take this, then they probably should. + ai_chance = { base = 1000 } + } + + after = { + # If we've got one, inform the emperor. + scope:emperor = { trigger_event = roman_restoration.1212 } + # Then inform every player in Sicily. + every_player = { + limit = { + any_held_title = { + title_tier = county + title_province = { geographical_region = custom_sicily } + } + } + trigger_event = roman_restoration.1213 + } + } +} + +# Scope:emperor is informed. +roman_restoration.1212 = { + type = character_event + title = roman_restoration.1212.t + desc = { + desc = roman_restoration.1212.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:new_empire = flag:italia } + desc = roman_restoration.1212.desc.new_empire.italia + } + triggered_desc = { + trigger = { scope:new_empire = flag:maghreb } + desc = roman_restoration.1212.desc.new_empire.maghreb + } + triggered_desc = { + trigger = { scope:new_empire = flag:own } + desc = roman_restoration.1212.desc.new_empire.own + } + } + first_valid = { + triggered_desc = { + trigger = { + any_county_in_region = { + region = custom_sicily + rebuke_roman_revanchism_counties_controlled_by_ere_trigger = yes + } + } + desc = roman_restoration.1212.desc.outro.territory_left + } + desc = roman_restoration.1212.desc.outro.no_territory_left + } + } + theme = realm + left_portrait = { + character = scope:emperor + animation = rage + } + right_portrait = { + character = scope:taker + animation = marshal + } + + immediate = { + show_as_tooltip = { roman_restoration_1211_piss_off_big_e_effect = yes } + # Mark us as not needing a second notification if we've got any land left. + add_character_flag = { + flag = informed_about_sicily_flag + days = 7 + } + } + + # That presumptuous lout! + option = { + name = roman_restoration.1212.a + + # No stress, no AI. + } +} + +# Scope:emperor is informed. +roman_restoration.1213 = { + type = character_event + title = roman_restoration.1213.t + desc = { + desc = roman_restoration.1213.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:new_empire = flag:italia } + desc = roman_restoration.1213.desc.new_empire.italia + } + triggered_desc = { + trigger = { scope:new_empire = flag:maghreb } + desc = roman_restoration.1213.desc.new_empire.maghreb + } + triggered_desc = { + trigger = { scope:new_empire = flag:own } + desc = roman_restoration.1213.desc.new_empire.own + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:emperor } + desc = roman_restoration.1213.desc.body.emperor_exists + } + desc = roman_restoration.1213.desc.body.emperor_absent + } + first_valid = { + triggered_desc = { + trigger = { + any_county_in_region = { + region = custom_sicily + rebuke_roman_revanchism_counties_controlled_by_ere_trigger = yes + } + } + desc = roman_restoration.1213.desc.outro.territory_left + } + desc = roman_restoration.1213.desc.outro.no_territory_left + } + } + theme = realm + left_portrait = { + character = scope:taker + animation = marshal + } + right_portrait = { + character = scope:emperor + animation = rage + } + + trigger = { + NOR = { + has_character_flag = informed_about_sicily_flag + this = scope:taker + } + } + + # Good riddance! + option = { + name = roman_restoration.1213.a + + # No stress, no AI. + } + + # What dark times we live in... + option = { + name = roman_restoration.1213.b + + # No stress, no AI. + } +} diff --git a/N3OW/events/dlc/ach/ach_coronation_events.txt b/N3OW/events/dlc/ach/ach_coronation_events.txt new file mode 100644 index 00000000..4aaa5aae --- /dev/null +++ b/N3OW/events/dlc/ach/ach_coronation_events.txt @@ -0,0 +1,9640 @@ +# Events for the Coronation activity +namespace = ach_coronation + +################################################################################################################################ +## Coronation Activity System Events +## 0000-0010 +## by Jay Zaborowski +################################ +# ach_coronation.0001 - Enter passive state - you arrived, establish the mood +# ach_coronation.0010 - The HoF arrives + +###################### +# Enter passive state - you arrived, establish the mood +# 0001 +ach_coronation.0001 = { + type = activity_event + title = ach_coronation.0001.t + desc = { + # Opening + first_valid = { + triggered_desc = { + trigger = { location = this.capital_province } + desc = ach_coronation.0001.notravel + } + desc = ach_coronation.0001.travel + } + + # Intro + first_valid = { + # You are the Host + triggered_desc = { + trigger = { this = scope:host } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { primary_title = title:e_hre } + this = scope:host + } + desc = ach_coronation.0001.intro.hre_host + } + triggered_desc = { + trigger = { + scope:host = { primary_title = title:e_byzantium } + this = scope:host + } + desc = ach_coronation.0001.intro.byzantine_host + } + triggered_desc = { + trigger = { + this = scope:host + location = this.capital_province + } + desc = ach_coronation.0001.intro.notravel_host + } + desc = ach_coronation.0001.intro.host + } + } + } + # You are a Guest + triggered_desc = { + trigger = { this != scope:host } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { primary_title = title:e_hre } + } + desc = ach_coronation.0001.intro.hre + } + triggered_desc = { + trigger = { + scope:host = { primary_title = title:e_byzantium } + } + desc = ach_coronation.0001.intro.byzantine + } + } + } + } + } + + # Ending + first_valid = { + # Host - Eccentric (so that it matches the rest of the loc) + triggered_desc = { + trigger = { + this = scope:host + has_trait = eccentric + } + desc = ach_coronation.0001.ending.host_eccentric + } + # Host + triggered_desc = { + trigger = { this = scope:host } + desc = { + random_valid = { + triggered_desc = { + trigger = { + has_trait = cynical + OR = { + scope:priest ?= { is_important_hof_trigger = yes } + faith = { has_doctrine_parameter = theocratic_coronation } # To give something to complain about + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:priest ?= { is_important_hof_trigger = yes } } + desc = ach_coronation.0001.ending.host_cynical_hof + } + triggered_desc = { + trigger = { faith = { has_doctrine_parameter = theocratic_coronation } } + desc = ach_coronation.0001.ending.host_cynical + } + } + } + } + triggered_desc = { + trigger = { has_trait = impatient } + desc = ach_coronation.0001.ending.host_impatient + } + triggered_desc = { + trigger = { has_trait = just } + desc = ach_coronation.0001.ending.host_just + } + triggered_desc = { + trigger = { has_trait = ambitious } + desc = ach_coronation.0001.ending.host_ambitious + } + triggered_desc = { + trigger = { has_trait = compassionate } + desc = ach_coronation.0001.ending.host_compassionate + } + triggered_desc = { + trigger = { has_trait = trusting } + desc = ach_coronation.0001.ending.host_trusting + } + triggered_desc = { + trigger = { has_trait = paranoid } + desc = ach_coronation.0001.ending.host_paranoid + } + triggered_desc = { + trigger = { has_trait = zealous } + desc = ach_coronation.0001.ending.host_zealous + } + triggered_desc = { + trigger = { has_trait = content } + desc = ach_coronation.0001.ending.host_content + } + triggered_desc = { + trigger = { has_trait = gregarious } + desc = ach_coronation.0001.ending.host_gregarious + } + triggered_desc = { + trigger = { has_trait = craven } + desc = ach_coronation.0001.ending.host_craven + } + triggered_desc = { + trigger = { has_trait = shy } + desc = ach_coronation.0001.ending.host_shy + } + triggered_desc = { + trigger = { has_trait = arrogant } + desc = ach_coronation.0001.ending.host_arrogant + } + triggered_desc = { + trigger = { + OR = { + has_trait = calm + has_trait = lazy + } + } + desc = ach_coronation.0001.ending.host_calm + } + triggered_desc = { + trigger = { has_trait = gluttonous } + desc = ach_coronation.0001.ending.host_gluttonous + } + triggered_desc = { + trigger = { has_trait = arbitrary } + desc = ach_coronation.0001.ending.host_arbitrary + } + desc = ach_coronation.0001.ending.host_neutral + } + } + } + # Guest + triggered_desc = { + trigger = { this != scope:host } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:host = { has_any_bad_relationship_with_character_trigger = { CHARACTER = root } } } + desc = ach_coronation.0001.ending.hostile_host + } + triggered_desc = { + trigger = { scope:host = { has_any_good_relationship_with_character_trigger = { CHARACTER = root } } } + desc = ach_coronation.0001.ending.friendly_host + } + desc = ach_coronation.0001.ending.neutral_host + } + } + } + } + } + + center_portrait = { + character = scope:host + animation = idle + camera = camera_center_large + } + + lower_left_portrait = { + character = root + trigger = { this != scope:host } + } + lower_center_portrait = { + character = scope:priest + trigger = { + this != scope:host + scope:host.involved_activity ?= { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + + theme = coronation_activity + + override_background = { + reference = throne_room + } + + immediate = { + play_music_cue = mx_cue_majesty + involved_activity = { + activity_host = { save_scope_as = host } + var:officiator ?= { save_scope_as = priest } + if = { + limit = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + scope:host.faith.religious_head = { save_scope_as = priest } + } + } + # Send out the papal fanfare + if = { + limit = { + # Is the host's religious head + scope:host.faith.religious_head ?= this + # The HoF actually matters for the ceremony + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + #HoF doesn't own or live there + scope:activity.activity_location.county = { + OR = { + holder = scope:host + holder = { + any_liege_or_above = { + this = scope:host + } + } + } + NOR = { + holder = scope:priest + holder = { + any_liege_or_above = { + this = scope:priest + } + } + } + } + #tricksy patriarch + trigger_if = { + limit = { + scope:priest = { + is_landed = no + liege ?= scope:host + } + } + NOT = { + scope:activity.activity_location.county = scope:host.capital_county + } + } + } + save_scope_as = hof + coronation_hof_visit_effect = yes + involved_activity = { + every_attending_character = { + limit = { + OR = { + # Only bother for player's and the Host + is_ai = no + this = scope:host + # And anyone who might want to beg the pope for pardon + has_trait = excommunicated + } + } + trigger_event = ach_coronation.0010 + } + } + } + scope:host = { + if = { + limit = { + any_targeting_faction = { + count > 1 + } + any_targeting_faction = { + OR = { + faction_power >= 200 + discontent_per_month > 0 + trigger_if = { + limit = { + discontent_per_month > 0 + } + months_until_max_discontent <= 8 + } + AND = { + OR = { + faction_is_type = nation_fracturing_faction + faction_is_type = claimant_faction + } + faction_power >= 100 + } + } + } + } + custom_tooltip = magnificence_badly_reduced_by_factions_tt + } + else_if = { + limit = { + any_targeting_faction = { + count = 1 + } + any_targeting_faction = { + OR = { + faction_power >= 200 + discontent_per_month > 0 + trigger_if = { + limit = { + discontent_per_month > 0 + } + months_until_max_discontent <= 8 + } + AND = { + OR = { + faction_is_type = nation_fracturing_faction + faction_is_type = claimant_faction + } + faction_power >= 100 + } + } + } + } + custom_tooltip = magnificence_badly_reduced_by_faction_tt + } + else_if = { + limit = { + any_targeting_faction = { + count > 1 + } + } + custom_tooltip = magnificence_reduced_by_factions_tt + } + else_if = { + limit = { + any_targeting_faction = { + count = 1 + } + } + custom_tooltip = magnificence_reduced_by_faction_tt + } + } + if = { + limit = { + this = scope:host + involved_activity = { var:activity_special_type_progression >= 50 } + } + scope:host.dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + } + else_if = { + limit = { + this = scope:host + involved_activity = { var:activity_special_type_progression >= 25 } + } + scope:host.dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + } + } + + option = { + name = { + trigger = { + NOT = { this = scope:host } + opinion = { + target = scope:host + value < 0 + } + } + text = ach_coronation.0001.a.bad + } + name = { + trigger = { + NOT = { this = scope:host } + opinion = { + target = scope:host + value >= 0 + } + } + text = ach_coronation.0001.a.good + } + name = { + trigger = { + this = scope:host + has_trait = eccentric + } + text = ach_coronation.0001.a.eccentric + } + name = { + trigger = { + this = scope:host + NOT = { has_trait = eccentric } + } + text = ach_coronation.0001.a + } + } +} + +###################### +# The HoF Arrives +# 0010 +scripted_trigger ach_coronation_0010_appropriate_hof_follower = { + # Find a clergy member of the hof's religion + faith.religion = scope:hof.faith.religion + this != scope:hof + this != scope:host + this != scope:greeter + # Who isn't the player + is_physically_able_ai = yes +} + +scripted_trigger ach_coronation_0010_friendly_hof_and_host = { + scope:host = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:hof } + reverse_opinion = { + target = scope:hof + value > medium_positive_opinion + } + } + } +} + +scripted_trigger ach_coronation_0010_hostile_hof_and_host = { + OR = { + scope:host = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:hof } } + reverse_opinion = { + target = scope:hof + value < medium_negative_opinion + } + } +} + +scripted_effect ach_coronation_0010_choose_greeters = { + # Barons are underutilized and it is *their* city, and the Host is probably busy, so they get to meet the HoF + if = { + limit = { scope:coronation_site.barony.holder != scope:host } + scope:coronation_site.barony.holder = { save_scope_as = greeter } + } + # If the host owns the province we still want the world to feel lively, try the local count instead + else_if = { + limit = { scope:coronation_site.barony.county.holder != scope:host } + scope:coronation_site.barony.holder = { save_scope_as = greeter } + } + # If all else fails, the Host gets to be the greeter + else = { + limit = { scope:host.location = scope:coronation_site } + scope:host = { save_scope_as = greeter } + } + + if = { + limit = { + # Grab the greeter's court chaplain if they exist + exists = scope:greeter.cp:councillor_court_chaplain + # Make sure it isn't the player + scope:greeter.cp:councillor_court_chaplain = { is_physically_able_ai = yes } + } + scope:greeter.cp:councillor_court_chaplain = { save_scope_as = greeter_2 } + } + else = { + involved_activity = { + ordered_attending_character = { + # Grab the most zealous priest of the hof's religion at the activity + limit = { + ach_coronation_0010_appropriate_hof_follower = yes + is_clergy = yes + } + # Or any valid follower of their religion + alternative_limit = { + ach_coronation_0010_appropriate_hof_follower = yes + } + # Fallback + alternative_limit = { + this != scope:host + this != scope:hof + this != scope:greeter + } + order_by = ai_zeal + save_scope_as = greeter_2 + } + } + } +} + +ach_coronation.0010 = { + type = activity_event + title = ach_coronation.0010.t + desc = { # Should have a lot of variety for different pope-analities + desc = ach_coronation.0010.desc.desc_opening + first_valid = { + triggered_desc = { + trigger = { this = scope:greeter } + desc = ach_coronation.0010.desc.desc_greeting.first_person + } + triggered_desc = { + trigger = { this = scope:host } + desc = ach_coronation.0010.desc.desc_greeting.host + } + desc = ach_coronation.0010.desc.desc_greeting.baron + } + random_valid = { + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = generous + has_trait = profligate + ai_greed < medium_negative_greed + } + } + } + desc = ach_coronation.0010.desc.desc_first.generous + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = greedy + has_trait = avaricious + ai_greed > medium_positive_greed + } + } + } + desc = ach_coronation.0010.desc.desc_first.greedy + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = compassionate + ai_compassion > medium_positive_compassion + } + } + } + desc = ach_coronation.0010.desc.desc_first.compassionate + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = cynical + ai_zeal < medium_negative_zeal + } + } + } + desc = ach_coronation.0010.desc.desc_first.cynical + } + desc = ach_coronation.0010.desc.desc_first + } + random_valid = { + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = zealous + ai_zeal > medium_positive_zeal + } + } + } + desc = ach_coronation.0010.desc.desc_second.zealous + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = wrathful + has_trait = irritable + has_trait = vengeful + ai_vengefulness > medium_positive_vengefulness + } + } + } + desc = ach_coronation.0010.desc.desc_second.wrathful + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = lustful + has_trait = rakish + is_incestuous_trigger = yes + is_deviant_trigger = yes + } + } + } + desc = ach_coronation.0010.desc.desc_second.lustful + } + triggered_desc = { + trigger = { + scope:hof = { has_trait = gluttonous } + } + desc = ach_coronation.0010.desc.desc_second.gluttonous + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = giant + has_trait = strong + has_trait = physique_good_3 + has_trait = physique_good_2 + } + } + } + desc = ach_coronation.0010.desc.desc_second.strong + } + desc = ach_coronation.0010.desc.desc_second + } + first_valid = { + # Universal + triggered_desc = { + trigger = { scope:hof.faith = { fervor <= 30 } } + desc = ach_coronation.0010.desc.desc_ending.low_fervor + } + # Host + triggered_desc = { + trigger = { this = scope:host } + desc = { + first_valid = { + triggered_desc = { + trigger = { has_trait = excommunicated } + desc = ach_coronation.0010.desc.desc_ending.excommunicated_first_person + } + triggered_desc = { + trigger = { + ach_coronation_0010_friendly_hof_and_host = yes + scope:hof = { + opinion = { + target = root + value >= high_positive_opinion + } + } + } + desc = ach_coronation.0010.desc.desc_ending.opinion_very_good_first_person + } + triggered_desc = { + trigger = { ach_coronation_0010_friendly_hof_and_host = yes } + desc = ach_coronation.0010.desc.desc_ending.opinion_good_first_person + } + triggered_desc = { + trigger = { ach_coronation_0010_hostile_hof_and_host = yes } + desc = ach_coronation.0010.desc.desc_ending.opinion_bad_first_person + } + desc = ach_coronation.0010.desc.desc_ending.neutral_first_person + } + } + } + # Guest + triggered_desc = { + trigger = { this != scope:host } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:host = { has_trait = excommunicated } } + desc = ach_coronation.0010.desc.desc_ending.excommunicated + } + triggered_desc = { + trigger = { + ach_coronation_0010_friendly_hof_and_host = yes + scope:hof = { + opinion = { + target = scope:host + value >= high_positive_opinion + } + } + } + desc = ach_coronation.0010.desc.desc_ending.opinion_very_good + } + triggered_desc = { + trigger = { ach_coronation_0010_friendly_hof_and_host = yes } + desc = ach_coronation.0010.desc.desc_ending.opinion_good + } + triggered_desc = { + trigger = { ach_coronation_0010_hostile_hof_and_host = yes } + desc = ach_coronation.0010.desc.desc_ending.opinion_bad + } + desc = ach_coronation.0010.desc.desc_ending.neutral + } + } + } + } + } + + left_portrait = { + character = scope:greeter_2 + animation = horse_conversing_right + camera = camera_event_horse_left_facing_left_far + } + + center_portrait = { + character = scope:greeter + animation = horse_conversing_left + camera = camera_event_horse_left_facing_left_very_far + } + + right_portrait = { + character = scope:hof + # Are they the type to wave at peasants? + triggered_animation = { + trigger = { ai_compassion >= medium_positive_compassion } + animation = jockey_wave + } + triggered_animation = { + trigger = { always = yes } + animation = jockey_idle + } + camera = camera_event_horse_right_facing_left_close + } + + theme = coronation_activity + + override_background = { + reference = market + } + override_effect_2d = { + reference = legend_glow + } + + # Horse and crowd noises instead of normal activity ones + override_sound = { reference = "event:/DLC/EP3/SFX/Events/Event_Moments/ep3_evn_eventmoment_chariot_race_pivotal_moment" } + + immediate = { + # Make it sound momentous + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ep2_event_grand_tournament_win" + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_hold_triumph" + + involved_activity.var:officiator ?= { save_scope_as = hof } + scope:hof.location = { save_scope_as = coronation_site } + + hidden_effect = { ach_coronation_0010_choose_greeters = yes } + show_as_tooltip = { coronation_hof_visit_effect = yes } + } + + option = { # Beg him to unexcommunicate you + name = ach_coronation.0010.a + trigger = { + has_trait = excommunicated + faith.religious_head = scope:hof + # Not getting off so easy + this != scope:host + } + trait = excommunicated + + duel = { + skill = diplomacy + target = scope:hof + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # I got a soft spot and not much hate in my heart + add = 20 + scope:hof = { + ai_compassion >= high_positive_compassion + opinion = { + value >= low_negative_opinion + target = root + } + } + } + modifier = { + add = 5 + scope:hof = { has_trait = generous } + } + modifier = { + factor = 2 + scope:hof = { has_trait = forgiving } + } + modifier = { + factor = 0.5 + scope:hof = { has_trait = vengeful } + } + min = 5 + desc = ach_coronation.0010.a.tt.success + send_interface_toast = { + title = ach_coronation.0010.a.tt.success + left_icon = scope:hof + remove_trait = excommunicated + stress_impact = { + base = major_stress_loss + arrogant = minor_stress_loss + zealous = major_stress_loss + } + hidden_effect = { + add_opinion = { + target = scope:hof + modifier = grateful_opinion + opinion = 30 + } + } + } + + } + 50 = { # They ignore you + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = 5 + has_trait = arrogant + } + opinion_modifier = { + who = scope:hof + opinion_target = scope:host + multiplier = 0.5 + } + min = 5 + desc = ach_coronation.0010.a.tt.failure + send_interface_toast = { + title = ach_coronation.0010.a.tt.failure + left_icon = scope:hof + add_prestige = minor_prestige_loss + if = { + limit = { is_ai = yes } + } + stress_impact = { + base = minor_stress_gain + shy = minor_stress_loss # Honestly? Thank HighGod + } + } + } + 20 = { # They're offended you even asked + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = 20 + OR = { + has_trait = shy + has_trait = reclusive + } + } + modifier = { + add = 5 + has_trait = impatient + } + opinion_modifier = { + who = scope:hof + opinion_target = root + multiplier = -1 + } + modifier = { + factor = 1.5 + has_trait = wrathful + } + min = 5 + desc = ach_coronation.0010.a.tt.anger + send_interface_toast = { + title = ach_coronation.0010.a.tt.anger + left_icon = scope:hof + reverse_add_opinion = { + target = scope:hof + modifier = annoyed_opinion + opinion = -30 + } + add_prestige = minor_prestige_loss + stress_impact = { + base = medium_stress_gain + arrogant = minor_stress_gain + zealous = minor_stress_gain + cynical = medium_stress_loss # Got one good thing out of it at least + } + } + } + } + ai_chance = { + base = 150 + modifier = { + has_trait = shy + factor = 0.5 + } + modifier = { + has_trait = zealous + factor = 0.5 + } + modifier = { + has_trait = gregarious + factor = 2 + } + modifier = { + has_trait = cynical + factor = 2 + } + # More likely if skilled at diplomacy + modifier = { + diplomacy > medium_skill_rating + factor = 2 + } + # Less likely if not + modifier = { + diplomacy <= medium_skill_rating + factor = 0.5 + } + # Way less likely if way not + modifier = { + diplomacy <= low_skill_rating + # Unless you have zero ability to conceive your own diplomatic inferiority + NOT = { has_trait = arrogant } + factor = 0.5 + } + } + } + + option = { # "Neat" + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:hof } } + desc = ach_coronation.0010.b.rival + } + triggered_desc = { + trigger = { has_relation_lover = scope:hof } + desc = ach_coronation.0010.b.lover + } + triggered_desc = { + trigger = { has_any_good_relationship_with_character_trigger = { CHARACTER = scope:hof } } + desc = ach_coronation.0010.b.friend + } + triggered_desc = { + trigger = { faith.religion != scope:hof.faith.religion } + desc = ach_coronation.0010.b.heathen + } + triggered_desc = { + trigger = { faith != scope:hof.faith } + desc = ach_coronation.0010.b.heretic + } + triggered_desc = { + trigger = { + OR = { + is_witch_trigger = yes + # Also fits if you're hiding your faith + any_secret = { + secret_type = secret_crypto_religionist + } + } + } + desc = ach_coronation.0010.b.witch + } + triggered_desc = { + trigger = { has_trait = cynical } + desc = ach_coronation.0010.b.cynical + } + triggered_desc = { + trigger = { has_trait = zealous } + desc = ach_coronation.0010.b.zealous + } + desc = ach_coronation.0010.b + } + } + } + if = { + limit = { this = scope:host } + custom_tooltip = ach_coronation_0010_hof_desc_host.tt + } + else = { + custom_tooltip = ach_coronation_0010_hof_desc_guest.tt + } + ai_chance = { + base = 100 + } + } +} + +#################################### +# Random coronation events +# 0011-0499 +## by Jay Zaborowski +#################################### +# ach_coronation.0011 - Host: You see some potential plotters whispering +# ach_coronation.0012 - Host: Vassals squabble over coronation roles +# ach_coronation.0013 - Host: You eavesdrop on some peasants +# ach_coronation.0014 - Guest: Opportunity to cause a crowd crush +# ach_coronation.0015 - Host: There is a crowd crush +# ach_coronation.0016 - Guest: You present your host a gift +# ach_coronation.0017 - Guest: faith_warrior reacts to the coronation of a non-crusader_king +# ach_coronation.0018 - Guest: Close family member of Host sees opportunity +# ach_coronation.0020 - Host: Close family member helps manage the coronation +# ach_coronation.0022 - Guest: An ongoing plague has shaken a zealous guest +# ach_coronation.0023 - Host: An exotic foreign warrior pledges themselves to you +# ach_coronation.0025 - Open up drinks to the locals +# ach_coronation.0027 - A guest offers some hashish +# ach_coronation.0028 - Host: Drinking contest with a detractor +# ach_coronation.0029 - Host: Guests offer to help get a hunt going + +###################### +# Host: You see some potential plotters whispering +# 0011 +scripted_trigger ach_coronation_0011_eligible_vassal_trigger = { + is_physically_able_ai_adult = yes + is_vassal_of = involved_activity.activity_host + trigger_if = { # Should be someone you'd actually suspect + limit = { + scope:host = { # But what if they're in on it? + NOT = { has_trait = paranoid } + } + } + NOR = { + has_any_best_good_relationship_with_character_trigger = { CHARACTER = root } + has_trait = loyal + } + } +} + +scripted_trigger ach_coronation_0011_is_suitable_active_scheme_trigger = { + is_scheme_exposed = no + hostile_scheme_trigger = yes + scheme_target_character = { is_participant_in_activity = involved_activity } +} + +scripted_effect ach_coronation_0011_coward_setup_effect = { + save_scope_as = coward + if = { # If the plotter has a scheme and the coward's in on it, grab that + limit = { + scope:hostile_scheme ?= { + any_scheme_agent_character = { this = scope:coward } + } + } + scope:hostile_scheme = { + save_scope_as = coward_scheme + } + } + else_if = { # If the coward has a scheme of their own, grab that + limit = { + any_scheme = { + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + } + } + random_scheme = { + limit = { # Grab any targetting the Host + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + scheme_target_character = scope:host + } + alternative_limit = { # Else just one targetting someone at the activity + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + } + save_scope_as = coward_scheme + } + } + else = { # If there is no scheme, they will babble about whatever skeleton they have in their closet + if = { + limit = { # If they don't have a secret, generate one + NOT = { + any_secret = { NOT = { is_known_by = scope:host } } + } + } + hidden_effect = { give_random_likely_secret_effect = yes } + } + random_secret = { + limit = { NOT = { is_known_by = scope:host } } + save_scope_as = uncovered_secret + } + } +} + +ach_coronation.0011 = { + type = activity_event + title = ach_coronation.0011.t + desc = ach_coronation.0011.desc + + left_portrait = { + character = root + animation = eavesdrop + camera = camera_event_very_left + } + + right_portrait = { + character = scope:plotter + animation = dismissal + camera = camera_event_center_pointing_left + } + + center_portrait = { + character = scope:coward + animation = worry + } + + cooldown = { years = 1 } + + theme = coronation_activity + + override_background = { reference = throne_room } + + trigger = { + involved_activity = { + any_attending_character = { + ach_coronation_0011_eligible_vassal_trigger = yes + count >= 2 + } + } + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + # Grab a likely ringleader + random_attending_character = { + limit = { + is_powerful_vassal = yes + ach_coronation_0011_eligible_vassal_trigger = yes + any_scheme = { ach_coronation_0011_is_suitable_active_scheme_trigger = yes } + } + alternative_limit = { + is_powerful_vassal = yes + ach_coronation_0011_eligible_vassal_trigger = yes + } + alternative_limit = { + ach_coronation_0011_eligible_vassal_trigger = yes + } + weight = { + base = 1 + + ach_likely_plotter_modifier = yes + + modifier = { # Weighted up if there is actually a scheme against a guest + any_targeting_scheme = { ach_coronation_0011_is_suitable_active_scheme_trigger = yes } + factor = { + value = 2 + if = { # And ofc if that guest is you + limit = { any_targeting_scheme = { scheme_target_character = scope:host } } + add = 1 + } + } + } + } + if = { + limit = { + any_scheme = { + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + } + } + random_scheme = { + limit = { + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + scheme_target_character = scope:host + } + alternative_limit = { + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + } + save_scope_as = hostile_scheme + } + } + save_scope_as = plotter + } + # Grab a likely weak-link + random_attending_character = { + limit = { + NOT = { this = scope:plotter } + ach_coronation_0011_eligible_vassal_trigger = yes + OR = { + any_scheme = { ach_coronation_0011_is_suitable_active_scheme_trigger = yes } + has_any_secrets = yes # Grab someone with secrets if possible + } + } + alternative_limit = { + NOT = { this = scope:plotter } + ach_coronation_0011_eligible_vassal_trigger = yes + } + weight = { + base = 1 + + ach_unlikely_plotter_modifier = yes + + modifier = { # Grab them if they are actually an agent against you + scope:hostile_scheme ?= { + any_scheme_agent_character = { this = root } + } + factor = 4 + } + } + ach_coronation_0011_coward_setup_effect = yes + } + } + } + + option = { # Break the coward + name = ach_coronation.0011.b + skill = intrigue + flavor = ach_coronation.0011.b.flavor + custom_tooltip = ach_coronation.0011.b.tt + trigger = { + intrigue >= very_high_skill_rating + } + + hidden_effect = { + if = { + limit = { exists = scope:coward_scheme } + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0011.coward.success + left_icon = root + right_icon = scope:coward + scope:coward_scheme = { + expose_scheme = yes + } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0011.coward.success + left_icon = root + right_icon = scope:coward + scope:uncovered_secret = { + reveal_to = root + } + } + } + } + + if = { + limit = { + can_add_hook = { + target = scope:host + type = manipulation_hook + } + } + add_hook = { + type = manipulation_hook + target = scope:host + } + } + scope:coward = { + add_opinion = { + target = root + modifier = scared_opinion + opinion = -20 + } + add_stress = major_stress_gain + add_prestige = minor_prestige_loss + } + + stress_impact = { + sadistic = medium_stress_loss + trusting = medium_stress_gain + compassionate = medium_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + add = { + value = 0 + add = intrigue + multiply = 5 + } + } + opinion_modifier = { + opinion_target = scope:coward + multiplier = -1 + } + modifier = { + OR = { + has_trait = compassionate + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:coward } + } + factor = 0 + } + modifier = { + has_trait = sadistic + factor = 2.5 + } + modifier = { + has_trait = callous + factor = 2 + } + modifier = { + has_trait = schemer + factor = 2 + } + modifier = { + has_trait = trusting + factor = 0.5 + } + modifier = { + has_trait = compassionate + factor = 0.5 + } + } + } + + option = { # Arrest the traitors! + name = { + trigger = { has_trait = paranoid } + text = ach_coronation.0011.c.paranoid + } + name = { + trigger = { has_trait = wrathful } + text = ach_coronation.0011.c.wrathful + } + name = ach_coronation.0011.c + trait = paranoid + trait = arbitrary + + trigger = { + OR = { + has_trait = paranoid + has_trait = arbitrary + has_activity_intent = coronation_weaken_detractors + } + } + + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:plotter + } + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:coward + } + + add_dread = medium_dread_gain + if = { + limit = { + scope:activity = { + any_attending_character = { + is_vassal_of = root + has_vassal_stance = belligerent + NOT = { is_in_guest_subset = { name = detractor } } + NOR = { + this = scope:plotter + this = scope:coward + } + } + } + } + coronation_weaken_detractors_opinion_effect = yes + } + + stress_impact = { + wrathful = medium_stress_loss + arbitrary = medium_stress_loss + paranoid = major_stress_loss + just = major_stress_gain + calm = major_stress_gain + } + + ai_chance = { + base = 0 + modifier = { + add = { + value = 0 + add = intrigue + multiply = 5 + } + } + opinion_modifier = { + opinion_target = scope:plotter + multiplier = -1 + } + modifier = { + has_trait = irritable + add = 25 + } + modifier = { + has_trait = wrathful + add = 25 + } + modifier = { + has_trait = arbitrary + add = 25 + } + modifier = { + has_trait = paranoid + add = 50 + } + modifier = { + has_trait = calm + factor = 0.5 + } + modifier = { + OR = { + has_trait = just + has_trait = compassionate + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:plotter } + } + factor = 0 + } + } + } + + option = { # Catch HerHim in a lie! + name = ach_coronation.0011.a + skill = intrigue + + reverse_add_opinion = { + target = scope:plotter + modifier = insult_opinion + opinion = -20 + } + + duel = { + skill = intrigue + target = scope:plotter + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -19 + } + desc = ach_coronation.0011.a.success + custom_tooltip = ach_coronation.0011.a.success.tt + hidden_effect = { + if = { + limit = { exists = scope:hostile_scheme } + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0011.scheme.plotter.toast + left_icon = root + right_icon = scope:plotter + + scope:hostile_scheme = { expose_scheme = yes } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0011.false.toast + left_icon = root + right_icon = scope:plotter + + add_prestige = minor_prestige_loss + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -9 + } + desc = ach_coronation.0011.a.failure + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0011.false.toast + left_icon = root + right_icon = scope:plotter + + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + trusting = medium_stress_gain + paranoid = medium_stress_loss + } + + ai_chance = { + base = 150 + modifier = { + intrigue <= mediocre_skill_rating + add = -50 + } + modifier = { + has_trait = paranoid + factor = 2 + } + # Don't weight up by a crazy amount - it's already high + modifier = { + has_trait = schemer + factor = 1.25 + } + modifier = { + has_trait = diligent + factor = 1.25 + } + modifier = { + OR = { + intrigue <= low_skill_rating + has_trait = trusting + } + factor = 0 + } + } + } + + option = { # Move on + name = ach_coronation.0011.d + + if = { + limit = { has_trait = paranoid } + add_character_modifier = { + modifier = ach_coronation_trusts_nobody_modifier + years = 10 + } + } + else_if = { + limit = { has_trait = trusting } + add_character_modifier = { + modifier = ach_coronation_blissful_ignorance_modifier + years = 10 + } + } + + reverse_add_opinion = { + target = scope:plotter + modifier = relieved_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:coward + modifier = relieved_opinion + opinion = 10 + } + + stress_impact = { + # This is somewhat worrying + base = minor_stress_gain + # Doesn't actually care + lazy = minor_stress_loss + trusting = minor_stress_loss + # Really really cares + paranoid = major_stress_gain + } + + ai_chance = { + base = 75 + opinion_modifier = { + opinion_target = scope:plotter + } + modifier = { + OR = { + has_trait = paranoid + has_trait = deceitful + has_intrigue_lifestyle_trait_trigger = yes + } + factor = 0.1 + } + modifier = { + has_trait = trusting + factor = 2 + } + modifier = { + has_trait = lazy + factor = 2 + } + modifier = { + has_trait = schemer + factor = 0.5 + } + } + } +} + +###################### +# Host: Vassals squabble over coronation roles +# 0012 +scripted_effect get_random_coronation_object = { + # Decided here so the loc is consistent between the description and the options + random_list = { + # Cultural objects - weighted higher since they're more interesting + 10 = { + trigger = { + OR = { + has_culture = culture:irish + has_title = title:k_ireland + } + } + set_variable = { + name = random_coronation_object + value = flag:white_rod + } + } + 10 = { + trigger = { has_title = title:e_hre } + set_variable = { + name = random_coronation_object + value = flag:coronation_cloak + } + } + 10 = { + trigger = { any_equipped_character_artifact = { artifact_slot_type = regalia } } + set_variable = { + name = random_coronation_object + value = flag:equipped_regalia + } + } + 1 = { + trigger = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + set_variable = { + name = random_coronation_object + value = flag:apostolic_cross + } + } + 1 = { + trigger = { + faith = { + NOR = { + has_doctrine_parameter = unreformed_syncretic_actor_opinion_active + has_doctrine_parameter = unreformed + } + } + } + set_variable = { + name = random_coronation_object + value = flag:royal_religioustext + } + } + 1 = { + set_variable = { + name = random_coronation_object + value = flag:sceptre_and_orb + } + } + 1 = { + set_variable = { + name = random_coronation_object + value = flag:coronation_spoon + } + } + 1 = { + set_variable = { + name = random_coronation_object + value = flag:coronation_sword + } + } + 1 = { + set_variable = { + name = random_coronation_object + value = flag:coronation_rings + } + } + } +} + +scripted_trigger is_eligible_random_squabbler = { + location = root.location + is_physically_able_ai_adult = yes + NOR = { + this = root + involved_activity.var:officiator ?= this + } + OR = { + AND = { + is_vassal_of = root + highest_held_title_tier >= tier_county + } + is_close_family_of = root + is_councillor_of = root + AND = { + is_allied_to = root + highest_held_title_tier >= tier_county + } + } +} + +scripted_trigger ach_coronation_0012_mutual_enmity = { + save_temporary_scope_as = squabbler_temp + scope:activity = { + any_attending_character = { + NOT = { + this = scope:squabbler_temp + } + is_eligible_random_squabbler = yes + #Check that they don't love each other + opinion = { + target = scope:squabbler_temp + value <= 20 + } + reverse_opinion = { + target = scope:squabbler_temp + value <= 20 + } + } + } +} + +ach_coronation.0012 = { + type = activity_event + title = ach_coronation.0012.t + desc = ach_coronation.0012.desc + + left_portrait = { + character = root + animation = disapproval + } + + center_portrait = { + character = scope:first + animation = debating + } + + right_portrait = { + character = scope:second + animation = rage + } + + cooldown = { years = 1 } + + theme = coronation_activity + + override_background = { reference = study } + + trigger = { + involved_activity = { + has_current_phase = coronation_phase_preparations + any_attending_character = { + is_eligible_random_squabbler = yes + count >= 1 + ach_coronation_0012_mutual_enmity = yes + } + } + } + + immediate = { + get_random_coronation_object = yes + involved_activity = { + activity_host = { save_scope_as = host } + random_attending_character = { # Grab two random attendees to be used in loc + limit = { + is_eligible_random_squabbler = yes + highest_held_title_tier >= tier_duchy + ach_coronation_0012_mutual_enmity = yes + } + alternative_limit = { + is_eligible_random_squabbler = yes + save_temporary_scope_as = squabbler_temp + ach_coronation_0012_mutual_enmity = yes + } + weight = { + base = 1 + + ach_squabbler_modifier = yes + + # Try to get someone who has a rivalry with another vassal already if possible + modifier = { + factor = 4 + any_relation = { + type = rival + is_participant_in_activity = scope:activity + is_eligible_random_squabbler = yes + is_vassal_of = scope:host + } + } + } + save_scope_as = first + } + random_attending_character = { + limit = { + is_eligible_random_squabbler = yes + this != scope:first + # Try and get the rival of the first character + has_relation_rival = scope:first + highest_held_title_tier >= tier_duchy + ach_coronation_0012_mutual_enmity = yes + } + alternative_limit = { + is_eligible_random_squabbler = yes + this != scope:first + # Try and get the rival of the first character + has_relation_rival = scope:first + ach_coronation_0012_mutual_enmity = yes + } + alternative_limit = { + is_eligible_random_squabbler = yes + this != scope:first + highest_held_title_tier >= tier_duchy + ach_coronation_0012_mutual_enmity = yes + } + alternative_limit = { + is_eligible_random_squabbler = yes + this != scope:first + ach_coronation_0012_mutual_enmity = yes + } + weight = { + base = 1 + + ach_squabbler_modifier = yes + + # Prefer those who hate the first vassal + opinion_modifier = { + opinion_target = scope:first + multiplier = -0.01 + } + # And those likewise hated by + opinion_modifier = { + who = scope:first + opinion_target = this + multiplier = -0.01 + } + # And a final boost if they have any sort of negative relationship, just in case + modifier = { + factor = 2 + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:first } + } + } + save_scope_as = second + } + } + } + + option = { # Vassal 1 is my favorite! + name = ach_coronation.0012.a + + coronation_move_towards_supporter_effect = { CHARACTER = scope:first } + coronation_move_towards_detractor_effect = { CHARACTER = scope:second } + scope:first = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + add_prestige = medium_prestige_gain + } + scope:second = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + add_prestige = medium_prestige_loss + hidden_effect = { + if = { + limit = { + is_ai = yes + scope:first = { + is_ai = yes + } + } + progress_towards_rival_effect = { + REASON = rival_stole_coronation_role + CHARACTER = scope:first + OPINION = -40 + } + } + } + } + + stress_impact = { + fickle = minor_stress_gain + } + + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:first + } + opinion_modifier = { + opinion_target = scope:second + multiplier = -1 + } + modifier = { + has_trait = fickle + factor = 0.5 + } + } + } + + option = { # Vassal 2 so 2 deserves my support! + name = ach_coronation.0012.b + coronation_move_towards_supporter_effect = { CHARACTER = scope:second } + coronation_move_towards_detractor_effect = { CHARACTER = scope:first } + scope:second = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + add_prestige = medium_prestige_gain + } + scope:first = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + add_prestige = medium_prestige_loss + + hidden_effect = { + if = { + limit = { + is_ai = yes + scope:second = { + is_ai = yes + } + } + progress_towards_rival_effect = { + REASON = rival_stole_coronation_role + CHARACTER = scope:second + OPINION = -40 + } + } + } + } + + stress_impact = { + fickle = minor_stress_gain + } + + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:second + } + opinion_modifier = { + opinion_target = scope:first + multiplier = -1 + } + modifier = { + has_trait = fickle + factor = 0.5 + } + } + } + + option = { # You can both do it together! + name = ach_coronation.0012.c + flavor = ach_coronation.0012.c.flavor + trigger = { + NOR = { + has_trait = diplomatic_court + trigger_if = { + limit = { has_royal_court = yes } + court_grandeur_current_level >= 8 + } + } + } + + duel = { + skill = diplomacy + value = 10 + 50 = { + desc = ach_coronation.0012.c.tt.success + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0012.c.tt.success + left_icon = root + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + add_diplomacy_lifestyle_xp = medium_lifestyle_experience + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + } + 50 = { + desc = ach_coronation.0012.c.tt.failure + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ach_coronation.0012.c.tt.failure + left_icon = root + add_prestige = minor_prestige_loss + } + scope:first = { + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:second } + is_ai = yes + scope:second = { is_ai = yes } + } + set_relation_rival = { + target = scope:second + reason = rival_ruined_coronation_role + } + } + } + } + } + + stress_impact = { + craven = minor_stress_loss + fickle = minor_stress_loss + } + + ai_chance = { + base = 0 + modifier = { + add = 25 + OR = { + has_trait = craven + has_trait = fickle + } + } + modifier = { + add = 50 + AND = { + opinion = { + target = scope:first + value >= low_positive_opinion + } + opinion = { + target = scope:second + value >= low_positive_opinion + } + } + } + opinion_modifier = { + opinion_target = scope:first + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:second + multiplier = 0.5 + } + modifier = { + factor = 0 + diplomacy < low_skill_rating + } + } + } + + option = { # I have the perfect idea! + name = ach_coronation.0012.d + flavor = ach_coronation.0012.d.flavor + trigger = { + OR = { + has_trait = diplomatic_court + trigger_if = { # This ain't your first rodeo + limit = { has_royal_court = yes } + court_grandeur_current_level >= 8 + } + } + } + trait = diplomatic_court_1 + # Legitimacy gets a lil bump + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + # And the activity gets a small bump as well + custom_tooltip = coronation_tt_positive_medium + scope:activity = { + activity_special_type_progression_medium = yes + add_activity_log_entry = { + key = coronation_elaborate_ceremony_log + score = 25 + tags = { positive } + character = scope:first + target = scope:second + } + } + + scope:first = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + } + scope:second = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + } + + stress_impact = { + arrogant = medium_stress_loss + } + + ai_chance = { + base = 150 + modifier = { + AND = { + opinion = { + target = scope:first + value <= low_negative_opinion + } + opinion = { + target = scope:second + value <= low_negative_opinion + } + } + add = -50 + } + modifier = { + has_trait = arrogant + factor = 1.5 + } + modifier = { + AND = { + opinion = { + target = scope:first + value < medium_negative_opinion + } + opinion = { + target = scope:second + value < medium_negative_opinion + } + } + factor = 0.5 + } + } + } + + option = { # Neither of you are worthy of touching my random_coronation_object! + name = ach_coronation.0012.e + + scope:first = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + scope:second = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + + add_character_modifier = { + modifier = ach_imperious_modifier + years = 5 + } + add_prestige = minor_prestige_gain + + stress_impact = { + impatient = minor_stress_loss + lazy = minor_stress_loss + arrogant = minor_stress_loss + } + + ai_chance = { + base = 50 + modifier = { + add = 50 + AND = { + opinion = { + target = scope:first + value >= low_positive_opinion + } + opinion = { + target = scope:second + value >= low_positive_opinion + } + } + } + modifier = { + add = -50 + AND = { + opinion = { + target = scope:first + value <= low_positive_opinion + } + opinion = { + target = scope:second + value <= low_positive_opinion + } + } + } + modifier = { + OR = { + has_trait = impatient + has_trait = lazy + has_trait = callous + has_trait = arrogant + has_trait = wrathful + } + factor = 1.5 + } + opinion_modifier = { + opinion_target = scope:first + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:second + multiplier = 0.5 + } + } + } +} + +###################### +# Host: You eavesdrop on some peasants +# 0013 +scripted_trigger ach_coronation_0013_claimant_trigger = { + # Shouldn't be friendly + has_any_good_relationship_with_root_trigger = no + is_alive = yes + is_adult = yes + NOT = { is_courtier_of = scope:host } + # Don't include your kids (unless you hate the little bastards) + trigger_if = { + limit = { has_any_bad_relationship_with_root_trigger = no } + NOT = { is_child_of = scope:host } + } +} + +scripted_effect ach_coronation_0013_get_eligible_pretender_effect = { + scope:host = { + if = { + limit = { + any_held_title = { + any_claimant = { ach_coronation_0013_claimant_trigger = yes } + } + } + random_held_title = { + # Prefer strong claimants (Who you're thus more likely to also hate) + limit = { + any_claimant = { + has_strong_claim_on = prev + ach_coronation_0013_claimant_trigger = yes + } + } + alternative_limit = { + any_claimant = { ach_coronation_0013_claimant_trigger = yes } + } + weight = { + # Prefer primary title + modifier = { + this = scope:host.primary_title + factor = 4 + } + # Prefer higher tier titles + modifier = { factor = tier } + } + random_claimant = { + limit = { ach_coronation_0013_claimant_trigger = yes } + save_scope_as = claimant + } + } + } + } +} + +scripted_effect ach_coronation_0013_get_gossip_type_effect = { + random_list = { + # More likely to get nice modifiers + 200 = { + save_scope_value_as = { + name = gossip_type + value = flag:nice + } + # Unless you're a tyrant (but some people still like tyrants) + modifier = { + add = { + value = tyranny + multiply = -1 + } + } + } + 100 = { + save_scope_value_as = { + name = gossip_type + value = flag:mean + } + modifier = { + add = { + value = tyranny + } + } + } + } +} + +ach_coronation.0013 = { + type = activity_event + title = ach_coronation.0013.t + desc = { + desc = ach_coronation.0013.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:rain_day } + desc = ach_coronation.0013.desc_opening.rainy_day + } + desc = ach_coronation.0013.desc_opening.dry_day + } + desc = ach_coronation.0013.desc_opening + first_valid = { + triggered_desc = { + trigger = { scope:gossip_type = flag:mean } + desc = { + random_valid = { + desc = ach_coronation.0013.desc_conversation.mean.1 + desc = ach_coronation.0013.desc_conversation.mean.2 + desc = ach_coronation.0013.desc_conversation.mean.3 + desc = { + desc = ach_coronation.0013.desc_conversation.mean.4 + first_valid = { + triggered_desc = { + trigger = { has_trait = lustful } + desc = ach_coronation.0013.desc_conversation.mean.4.lustful.host + } + triggered_desc = { + trigger = { has_trait = chaste } + desc = ach_coronation.0013.desc_conversation.mean.4.chaste + } + desc = ach_coronation.0013.desc_conversation.mean.4.not_lustful + } + } + desc = ach_coronation.0013.desc_conversation.mean.5 + } + } + } + triggered_desc = { + trigger = { scope:gossip_type = flag:nice } + desc = { + random_valid = { + desc = ach_coronation.0013.desc_conversation.nice.1 + desc = ach_coronation.0013.desc_conversation.nice.2 + desc = ach_coronation.0013.desc_conversation.nice.3 + desc = ach_coronation.0013.desc_conversation.nice.4 + triggered_desc = { + trigger = { exists = scope:claimant } + desc = ach_coronation.0013.desc_conversation.nice.5 + } + } + } + } + } + } + + left_portrait = { + character = root + animation = interested + camera = camera_event_table_center_background + + triggered_animation = { + trigger = { scope:gossip_type = flag:mean } + animation = shock + } + triggered_animation = { + trigger = { scope:gossip_type = flag:nice } + animation = happiness + } + } + + center_portrait = { + character = scope:peasant + animation = wedding_drunk + camera = camera_event_table_left_2 + hide_info = yes + } + + right_portrait = { + character = scope:peasant_2 + animation = drink + camera = camera_event_table_right_far_2 + hide_info = yes + } + + cooldown = { years = 1 } + + theme = coronation_activity + + override_background = { reference = alley_day } + + override_effect_2d = { + trigger = { exists = scope:rain_day } + reference = rain + } + + trigger = { + OR = { + involved_activity.var:activity_special_type_progression < 25 + location.county = { county_control < 25 } + } + #V Serious roots + NOR = { + coronation_host_east_asian_trigger = yes + highest_held_title_tier > tier_empire + } + } + + # Peasants are less likely to spread rumors about rulers they fear + weight_multiplier = { + base = 1 + compare_modifier = { + value = dread + multiplier = -0.01 + # But sometimes you drink a bit too much with the lads and get y'allselves killed. Opsec, people! + min = -0.9 + } + } + + immediate = { + save_scope_as = host + involved_activity = { + activity_location.barony.holder = { + save_scope_as = baron + } + } + + # Generate some gossipy peasants + create_character = { + location = root.location + template = drunken_peasant_character + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = peasant + after_creation = { # To make sure they fit the event window + if = { + limit = { has_trait = giant } + remove_trait = giant + } + if = { + limit = { has_trait = dwarf } + remove_trait = dwarf + } + } + } + create_character = { + location = root.location + template = drunken_peasant_character + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = peasant_2 + after_creation = { + if = { + limit = { has_trait = giant } + remove_trait = giant + } + if = { + limit = { has_trait = dwarf } + remove_trait = dwarf + } + } + } + + # And stuff for loc + random_dummy_gender_effect = yes + random_rain_snow_chance_effect = yes + ach_coronation_0013_get_eligible_pretender_effect = yes + ach_coronation_0013_get_gossip_type_effect = yes + } + + option = { # Weaken Detractors: Focus them on your opponents + name = ach_coronation.0013.a.weaken_detractors + reason = activity_intent + flavor = ach_coronation.0013.a.weaken_detractors.flavor + add_internal_flag = special + + trigger = { + has_activity_intent = coronation_weaken_detractors + involved_activity = { + any_guest_subset = { # There are actually enough people to do this to + name = detractor + count >= 2 + } + } + } + + custom_tooltip = two_detractors_get_negative_rumors_tt + + hidden_effect = { + involved_activity = { + random_guest_subset = { + name = detractor + weight = { + base = 1 + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + + # Less likely to get rumors to stick on proper political operators + modifier = { + add = { + value = intrigue + multiply = -5 + } + add = { + value = diplomacy + multiply = -5 + } + } + } + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + save_scope_as = detractor_1 + } + random_guest_subset = { + name = detractor + weight = { + base = 1 + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + + # Less likely to get rumors to stick on proper political operators + modifier = { + add = { + value = intrigue + multiply = -5 + } + add = { + value = diplomacy + multiply = -5 + } + } + } + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + save_scope_as = detractor_2 + } + } + send_interface_toast = { + title = ach_coronation.0013.a.weaken_detractors.tt + left_icon = scope:detractor_1 + right_icon = scope:detractor_2 + + scope:detractor_1 = { + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + } + scope:detractor_2 = { + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + } + } + } + + remove_short_term_gold = minor_gold_value + + highlight_portrait = scope:peasant + highlight_portrait = scope:peasant_2 + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + arrogant = minor_stress_gain # Talking to peasants + shy = minor_stress_gain # Talking to anyone + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + has_trait = arrogant + add = -25 + } + modifier = { + has_trait = shy + add = -25 + } + modifier = { + has_trait = greedy + add = -25 + } + modifier = { + has_trait = profligate + add = 25 + } + modifier = { + has_trait = generous + add = 25 + } + modifier = { + has_trait = lifestyle_reveler + add = 25 + } + modifier = { + has_trait = gregarious + factor = 2 + } + modifier = { + has_trait = schemer + factor = 2 + } + modifier = { + has_trait = honest + factor = 0.5 + } + } + } + + option = { # Host: Do they have any idea who you are!? + name = ach_coronation.0013.c + trigger = { + scope:gossip_type = flag:mean + } + skill = diplomacy + + duel = { + skills = { diplomacy prowess } + value = medium_skill_rating + # you manage to win them over + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ach_coronation.0013.c.tt.success + send_interface_toast = { + title = ach_coronation.0013.c.tt.success + left_icon = root + add_prestige = medium_prestige_gain + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + } + # The rumors spread further + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ach_coronation.0013.c.tt.failure + send_interface_toast = { + title = ach_coronation.0013.c.tt.failure + left_icon = root + add_prestige = minor_prestige_loss + add_dread = minor_dread_loss + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + } + } + } + + stress_impact = { + forgiving = minor_stress_gain + just = minor_stress_loss + wrathful = minor_stress_loss + vengeful = minor_stress_loss + } + + ai_chance = { + base = 10 + modifier = { + has_trait = wrathful + add = 25 + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = 0.5 + } + } + } + + option = { # Set the guards on them + name = ach_coronation.0013.b + trigger = { scope:gossip_type = flag:mean } + + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:peasant + IMPRISONER = root + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:peasant_2 + IMPRISONER = root + } + + add_tyranny = minor_tyranny_gain + add_dread = minor_dread_gain + root.location = { + add_province_modifier = { + modifier = ach_arrested_rumormongers_modifier + years = 5 + } + } + add_character_modifier = { + modifier = ach_arrested_rumormongers_character_modifier + years = 5 + } + + highlight_portrait = scope:peasant + + stress_impact = { + forgiving = medium_stress_gain + compassionate = minor_stress_gain + calm = miniscule_stress_gain + irritable = minor_stress_loss + wrathful = medium_stress_loss + vengeful = medium_stress_loss + } + + ai_chance = { + base = 20 + modifier = { + has_trait = wrathful + add = 25 + } + modifier = { + has_trait = vengeful + add = 50 + } + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + ai_compassion = -1 + } + } + } + + option = { # Join them + name = ach_coronation.0013.d + trigger = { scope:gossip_type = flag:nice } + + add_character_modifier = { + modifier = ach_positive_rumors_modifier + years = 10 + } + if = { + limit = { + has_trait = lifestyle_reveler + has_trait_xp = { + trait = lifestyle_reveler + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_reveler + value = 10 + } + } + else = { + random = { + chance = 25 + if = { + limit = { + NOT = { has_trait = lifestyle_reveler } + } + add_trait = lifestyle_reveler + } + } + } + + add_prestige = minor_prestige_loss + + highlight_portrait = scope:peasant + highlight_portrait = scope:peasant_2 + + stress_impact = { + base = medium_stress_loss + gregarious = minor_stress_loss + lifestyle_reveler = minor_stress_loss + shy = major_stress_gain + arrogant = major_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Who cares? + name = ach_coronation.0013.e + name = { + trigger = { scope:gossip_type = flag:mean } + text = ach_coronation.0013.e.disagrees + } + flavor = { + first_valid = { + triggered_desc = { + trigger = { + scope:gossip_type = flag:mean + } + desc = ach_coronation.0013.e.flavor.mean + } + desc = ach_coronation.0013.e.flavor.nice + } + } + + if = { + limit = { scope:gossip_type = flag:nice } + add_character_modifier = { + modifier = ach_positive_rumors_modifier + years = 5 + } + stress_impact = { + base = minor_stress_loss + } + } + else = { + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + stress_impact = { + base = minor_stress_loss + vengeful = medium_stress_gain + wrathful = minor_stress_gain + forgiving = medium_stress_loss + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -0.5 + ai_sociability = -0.5 + ai_energy = -0.5 + } + } + } + + after = { + if = { + limit = { + scope:peasant = { is_imprisoned = no } + } + hidden_effect = { + scope:peasant = { silent_disappearance_effect = yes } + scope:peasant_2 = { silent_disappearance_effect = yes } + } + } + } +} + +###################### +# Guest: Yell fire +# 0014 +scripted_trigger ach_coronation_0014_random_attendee_trigger = { + NOR = { + this = scope:host + this = scope:crush_initiator + involved_activity.var:officiator ?= this + } + is_available_in_activity_trigger = yes +} + +scripted_effect ach_coronation_0015_crushed_guest_effect = { + involved_activity = { + # Wound X characters and kill Y % + while = { + count = $COUNT$ + random_attending_character = { + limit = { + ach_coronation_0014_random_attendee_trigger = yes + NOT = { is_in_list = in_crowd_crush } + } + add_to_list = in_crowd_crush + increase_wounds_effect = { REASON = crowd_stampede } + create_character_memory = { + type = injured_in_crowd_crush_at_coronation_memory + participants = { + coronation_host = scope:host + } + } + + random = { + chance = $DEATH_CHANCE$ + death = { death_reason = death_crowd_stampede } + } + } + } + # Add the stampede modifier + root.location = { + if = { + limit = { + NOT = { has_province_modifier = ach_coronation_stampede_modifier } + } + add_province_modifier = { modifier = ach_coronation_stampede_modifier years = 5 } + county = { change_county_control = minor_county_control_loss } + } + } + } +} + +# Crowd crush effects used in tooltips in 0014 and the effects of 0015 +scripted_effect ach_coronation_0015_minor_crush_effect = { + custom_tooltip = few_guests_wounded + hidden_effect = { ach_coronation_0015_crushed_guest_effect = { COUNT = 2 DEATH_CHANCE = 0 } } +} +scripted_effect ach_coronation_0015_medium_crush_effect = { + custom_tooltip = many_guests_wounded + hidden_effect = { ach_coronation_0015_crushed_guest_effect = { COUNT = 8 DEATH_CHANCE = 0 } } +} +scripted_effect ach_coronation_0015_major_crush_effect = { + custom_tooltip = many_guests_wounded_or_killed + hidden_effect = { ach_coronation_0015_crushed_guest_effect = { COUNT = 12 DEATH_CHANCE = 4 } } +} + +ach_coronation.0014 = { + type = activity_event + title = ach_coronation.0014.t + desc = { + desc = ach_coronation.0014.desc + first_valid = { + triggered_desc = { + trigger = { scope:crush_scenario = flag:rain } + desc = ach_coronation.0014.desc.weather.rain + } + triggered_desc = { + trigger = { scope:crush_scenario = flag:generic_indoors } + desc = ach_coronation.0014.desc.weather.indoors + } + desc = ach_coronation.0014.desc.weather.clear + } + first_valid = { + triggered_desc = { + trigger = { scope:crush_scenario = flag:rain } + desc = ach_coronation.0014.desc.reason.rain + } + triggered_desc = { + trigger = { scope:crush_scenario = flag:local_discontent } + desc = ach_coronation.0014.desc.reason.local_discontent + } + triggered_desc = { + trigger = { scope:crush_scenario = flag:low_control } + desc = ach_coronation.0014.desc.reason.low_control + } + triggered_desc = { + trigger = { scope:crush_scenario = flag:generic_indoors } + desc = ach_coronation.0014.desc.reason.generic_indoors + } + triggered_desc = { + trigger = { scope:crush_scenario = flag:generic_outdoors } + desc = ach_coronation.0014.desc.reason.generic_outdoors + } + } + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_greek } + OR = { + has_title = title:e_byzantium + top_liege = { + has_title = title:e_byzantium + } + } + } + desc = ach_coronation.0014.desc.ending.byzantine + } + triggered_desc = { + desc = ach_coronation.0014.desc.ending + } + } + first_valid = { + triggered_desc = { + trigger = { scope:crush_scenario = flag:generic_indoors } + desc = ach_coronation.0014.desc.ending.indoors + } + desc = ach_coronation.0014.desc.ending.outdoors + } + } + + left_portrait = { + character = root + animation = thinking + } + + center_portrait = { + character = scope:peasant + animation = rage + camera = camera_event_center_pointing_right + hide_info = yes + } + + right_portrait = { + character = scope:guard + animation = threatening + camera = camera_event_right_pointing_right + hide_info = yes + } + + lower_left_portrait = { + character = scope:first + } + + cooldown = { years = 10 } + + theme = coronation_activity + + override_background = { + trigger = { scope:crush_scenario = flag:generic_indoors } + reference = throne_room + } + override_background = { reference = alley_day } + + override_effect_2d = { + trigger = { + exists = scope:rain_day + NOT = { scope:crush_scenario = flag:generic_indoors } + } + reference = rain + } + + trigger = { + involved_activity = { + activity_host != root + # Coronation Splendor is low + var:activity_special_type_progression < 25 + OR = { + # County has low control + activity_location.county = { county_control < low_county_control_limit } + # County is part of a faction + activity_host = { + any_targeting_faction = { + any_faction_county_member = { + this = scope:activity.activity_location.county + } + } + } + # There are many powerful detractors + any_guest_subset = { + name = detractor + OR = { # Is a threat to the host + AND = { + liege = involved_activity.activity_host + is_powerful_vassal = yes + } + highest_held_title_tier >= involved_activity.activity_host.highest_held_title_tier + current_military_strength > involved_activity.activity_host.current_military_strength + } + count >= 4 + } + } + } + + # You have a reason to do this, or at least consider it + coronation_hostile_to_host_trigger = yes + + involved_activity = { + # There are enough people to be impacted by a crush + any_attending_character = { + is_physically_able_ai = yes + this != root + count >= 12 + } + # There is a character we can use for the arrival + any_attending_character = { + is_landed = yes + location = involved_activity.activity_location + NOR = { + this = involved_activity.activity_host + this = root + involved_activity.var:officiator ?= this + } + is_available_in_activity_trigger = yes + } + # Once per activity + NOT = { has_variable = crowd_crush_happened } + } + } + + weight_multiplier = { + base = 1 + # More likely if the coronation isn't going great + modifier = { + involved_activity = { + any_guest_subset = { + name = detractor + OR = { + # Is a powerful vassal + AND = { + liege = scope:host + is_powerful_vassal = yes + } + # Or a threat to the host + highest_held_title_tier >= scope:host.highest_held_title_tier + } + count >= 3 + } + } + add = 1 + } + modifier = { + involved_activity = { + any_guest_subset = { + name = detractor + OR = { + # Is a powerful vassal + AND = { + liege = scope:host + is_powerful_vassal = yes + } + # Or a threat to the host + highest_held_title_tier >= scope:host.highest_held_title_tier + } + count >= 5 + } + } + add = 1 + } + modifier = { + involved_activity = { + any_guest_subset = { + name = detractor + OR = { + # Is a powerful vassal + AND = { + liege = scope:host + is_powerful_vassal = yes + } + # Or a threat to the host + highest_held_title_tier >= scope:host.highest_held_title_tier + } + count >= 7 + } + } + add = 1 + } + } + + immediate = { + save_scope_as = crush_initiator + + involved_activity = { + activity_host = { save_scope_as = host } + + # Grab a random landed attendee to be used in loc + random_attending_character = { + limit = { + ach_coronation_0014_random_attendee_trigger = yes + is_landed = yes + } + weight = { + base = 1 + modifier = { factor = highest_held_title_tier } # Grab someone important + } + save_scope_as = first + } + } + + # Generate a bodyguard + create_character = { + location = root.location + template = soldier_friend_character + culture = scope:first.culture + faith = scope:first.faith + save_scope_as = guard + } + create_character = { + location = root.location + template = servant_character + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = peasant + } + + random_rain_snow_chance_effect = yes + + # Choose a scenario + random_list = { + 1 = { + trigger = { exists = scope:rain_day } + save_scope_value_as = { + name = crush_scenario + value = flag:rain + } + } + 1 = { + save_scope_value_as = { + name = crush_scenario + value = flag:generic_indoors + } + } + 1 = { + save_scope_value_as = { + name = crush_scenario + value = flag:generic_outdoors + } + } + # Prefer non-generic ones + 4 = { + trigger = { + scope:host = { + any_targeting_faction = { + any_faction_county_member = { + this = scope:activity.activity_location.county + } + } + } + } + save_scope_value_as = { + name = crush_scenario + value = flag:local_discontent + } + } + 4 = { + trigger = { + location.county = { county_control < low_county_control_limit } + } + save_scope_value_as = { + name = crush_scenario + value = flag:low_control + } + } + } + } + + option = { # Yell fire + name = { + trigger = { scope:crush_scenario = flag:generic_indoors } + text = ach_coronation.0014.a.indoors + } + name = ach_coronation.0014.a.outdoors + add_internal_flag = dangerous + + duel = { + skill = intrigue + value = very_high_skill_rating + # You spark a riot. + 35 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ach_coronation.0014.a.tt.success + + if = { + limit = { + scope:crush_scenario != flag:generic_indoors + } + custom_tooltip = ach_coronation.0014.a.rock + hidden_effect = { + scope:first = { increase_wounds_effect = { REASON = fight } } + } + } + else = { + scope:first = { increase_wounds_effect = { REASON = fight } } + } + + # Effect is fired from the host event + hidden_effect = { + scope:host = { + trigger_event = ach_coronation.0015 + } + involved_activity = { + set_variable = { + name = crowd_crush_happened + } + } + } + + custom_description_no_bullet = { + text = if_host_calms_crowd_desc + object = scope:host + } + show_as_tooltip = { ach_coronation_0015_minor_crush_effect = yes } + custom_tooltip = ach_coronation.0014.a.tt.host.success + + custom_description_no_bullet = { + text = if_crush_happens_desc + object = scope:host + } + custom_tooltip = many_guests_may_be_wounded_or_killed + custom_tooltip = ach_coronation.0014.a.tt.host.failure.magnificence + custom_tooltip = ach_coronation.0014.a.tt.host.failure.host + custom_tooltip = ach_coronation.0014.a.tt.host.failure.crackdown + } + # Nobody notices + 65 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 10 + desc = ach_coronation.0014.a.tt.failure + send_interface_toast = { + title = ach_coronation.0014.a.tt.failure + desc = { + desc = ach_coronation.0014.a.tt.failure + triggered_desc = { + trigger = { scope:crush_scenario = flag:generic_indoors } + desc = ach_coronation.0014.a.tt.failure.indoors + } + } + } + } + } + + ai_chance = { + base = 25 + # More likely if you actually have a chance + modifier = { + intrigue > high_skill_rating + add = 25 + } + modifier = { + intrigue > very_high_skill_rating + add = 50 + } + modifier = { + has_trait = schemer + add = 25 + } + modifier = { + has_trait = callous + add = 25 + } + modifier = { + has_trait = sadistic + factor = 2 + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = minor_stress_impact_loss + honest = minor_stress_impact_gain + content = minor_stress_impact_gain + just = medium_stress_impact_gain + compassionate = massive_stress_gain + } + } + + option = { # These crowds could be useful... + name = ach_coronation.0014.b + trigger = { + custom_tooltip = { + text = ach_coronation.0014.b.tt + OR = { + intrigue >= very_high_skill_rating + has_trait = deceitful + has_trait = schemer + } + } + } + show_as_unavailable = { always = yes } + skill = intrigue + trait = schemer + trait = deceitful + + add_character_modifier = { + modifier = ach_useful_crowds_modifier + years = 5 + } + + ai_chance = { + base = 150 + } + } + + option = { # Go schmooze with the oncoming lord instead + name = ach_coronation.0014.c + reverse_add_opinion = { + modifier = charmed_opinion + opinion = 10 + target = scope:first + } + + ai_chance = { + base = 100 + } + } + + after = { + hidden_effect = { + scope:guard = { silent_disappearance_effect = yes } + scope:peasant = { silent_disappearance_effect = yes } + } + } +} + +###################### +# Host: There is a crowd crush +# 0015 +ach_coronation.0015 = { + type = activity_event + title = ach_coronation.0015.t + desc = ach_coronation.0015.desc + + left_portrait = { + character = root + animation = fear + } + + center_portrait = { + character = scope:peasant + animation = rage + camera = camera_event_crowd + hide_info = yes + } + + right_portrait = { + character = scope:filthy_peasant + animation = beg + camera = camera_event_ground + hide_info = yes + } + + cooldown = { years = 10 } + + theme = coronation_activity + + override_background = { + trigger = { + location.county.holder = { + government_has_flag = government_is_tribal + } + } + reference = market_tribal + } + override_background = { reference = alley_day } + + override_effect_2d = { + trigger = { exists = scope:rain_day } + reference = rain + } + + trigger = { + involved_activity = { + # Once per activity + NOT = { has_variable = crowd_crush_happened } + } + } + + immediate = { + create_character = { + location = root.location + template = diseased_peasant_character + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = filthy_peasant + } + create_character = { + location = root.location + template = servant_character + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = peasant + } + + ach_coronation_0015_minor_crush_effect = yes + + custom_tooltip = ach_coronation.0015.has_happened + } + + option = { # Diplomacy Challenge - Talk them down + name = { + trigger = { has_trait = august } + text = ach_coronation.0015.a.august + } + name = ach_coronation.0015.a + trigger = { diplomacy >= low_skill_rating } + show_as_unavailable = { always = yes } + skill = diplomacy + trait = august + + duel = { + skill = diplomacy + value = medium_skill_rating + # Your speech stuns the crowd to awed silence + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + modifier = { + diplomacy >= high_skill_rating + add = 10 + } + modifier = { + has_trait = diplomat + add = 20 + } + + desc = ach_coronation.0015.a.tt.critical_success + + custom_tooltip = coronation_tt_positive_major + scope:activity = { activity_special_type_progression_major = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_major + CHAR = root + } + + # The commoners will remember this + add_character_modifier = { modifier = ach_awed_peasantry_modifier years = 10 } + + # You'll also remember this + create_character_memory = { type = calmed_the_crowd_memory } + + show_as_tooltip = { + add_diplomacy_lifestyle_perk_points = 1 + } + + hidden_effect = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.critical_success + custom_tooltip = ach_coronation.0015.a.tt.critical_success.desc + left_icon = root + type = event_toast_effect_good + + # Everyone is very impressed + add_diplomacy_lifestyle_perk_points = 1 + custom_tooltip = { + text = coronation_tt_positive_major + scope:activity = { activity_special_type_progression_major = yes } + } + scope:activity = { + every_attending_character = { + limit = { + this != root + this != scope:crush_initiator + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + custom = custom.every_activity_guest + } + } + } + + # Remove the stampede modifier early + root.location.county = { + remove_county_modifier = ach_coronation_stampede_modifier + } + # Inform the initiator they failed in a critical persuasian + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.critical_failure + custom_tooltip = ach_coronation.0015.a.tt.initiator.critical_failure.desc + left_icon = root + right_icon = scope:host + + stress_impact = { + base = medium_stress_impact_gain + irritable = medium_stress_impact_gain + } + + show_as_tooltip = { + scope:host = { + custom_tooltip = { + text = coronation_tt_positive_major + scope:activity = { activity_special_type_progression_major = yes } + } + add_diplomacy_lifestyle_perk_points = 1 + } + scope:activity = { + every_attending_character = { + limit = { + this != scope:host + this != scope:crush_initiator + } + add_opinion = { + target = scope:host + modifier = impressed_opinion + opinion = 10 + } + custom = custom.every_activity_guest + } + } + } + } + } + } + } + # Your speech calms the people + 40 = { + # If you have the August trait (and higher than low_skill_rating), critical success is free + trigger = { NOT = { has_trait = august } } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = diplomat + add = 30 + } + + desc = ach_coronation.0015.a.tt.success + + ach_coronation_0015_minor_crush_effect = yes + + # You'll remember this + create_character_memory = { type = calmed_the_crowd_memory } + + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + + hidden_effect = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.success + custom_tooltip = ach_coronation.0015.a.tt.success.desc + left_icon = root + type = event_toast_effect_good + + # Everyone is impressed + custom_tooltip = coronation_tt_positive_medium + scope:activity = { + activity_special_type_progression_medium = yes + } + } + + # Inform the initiator they failed + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.failure + custom_tooltip = ach_coronation.0015.a.tt.initiator.failure.desc + left_icon = root + right_icon = scope:host + + scope:host = { + custom_tooltip = coronation_tt_positive_medium + } + } + } + } + } + # The fools do not listen + 40 = { + # If you have the August trait (and higher than low_skill_rating), critical success is free + trigger = { NOT = { has_trait = august } } + compare_modifier = { + value = scope:duel_value + multiplier = -4 + min = -49 + } + modifier = { # Hard to ignore + has_trait = august + add = -20 + } + modifier = { # Hard to get people to listen + OR = { + has_trait = stuttering + has_trait = lisping + } + add = 10 + } + + desc = ach_coronation.0015.a.tt.failure + + ach_coronation_0015_medium_crush_effect = yes + + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + hidden_effect = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.failure.title + desc = ach_coronation.0015.a.tt.failure + left_icon = root + type = event_toast_effect_bad + + stress_impact = { + base = medium_stress_impact_gain + irritable = medium_stress_impact_gain + } + + custom_tooltip = coronation_tt_negative + } + + # Inform the initiator they succeeded + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.success + desc = ach_coronation.0015.a.tt.initiator.success.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + stress_impact = { + base = medium_stress_impact_gain + irritable = medium_stress_impact_gain + } + + custom_tooltip = coronation_tt_negative + } + } + } + } + } + } + } + if = { + limit = { exists = scope:new_memory } + scope:new_memory = { + set_variable = { + name = memory_location + value = root.location + } + } + } + + stress_impact = { + callous = minor_stress_impact_gain # Doesn't care + shy = minor_stress_impact_gain # Talk to people!? + } + + ai_chance = { + base = 200 + modifier = { + add = -25 + has_trait = callous + } + modifier = { + add = -25 + has_trait = shy + } + modifier = { + add = -50 + has_trait = sadistic + } + modifier = { + add = 25 + has_trait = calm + } + modifier = { + add = 50 + has_trait = compassionate + } + modifier = { + add = 50 + has_trait = gregarious + } + } + } + + option = { # Physician / Learning - Tend to the wounded + name = ach_coronation.0015.b + flavor = ach_coronation.0015.b.flavor + trigger = { + OR = { + learning >= high_skill_rating + has_trait = lifestyle_physician + } + } + skill = learning + trait = lifestyle_physician + + random = { + chance = 25 + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + + add_piety = major_piety_gain + add_learning_lifestyle_xp = medium_lifestyle_experience + + show_as_tooltip = { + scope:activity = { + every_attending_character = { + limit = { is_ai = yes } + custom = every_wounded_guest_in_crowd_scope_tt + show_as_tooltip = { + add_character_modifier = { + modifier = ach_coronation_treated_wound_modifier + years = 5 + } + add_opinion = { + target = root + modifier = thankful_opinion + opinion = 20 + } + } + } + } + } + + hidden_effect = { + every_in_list = { + list = in_crowd_crush + add_opinion = { + target = root + modifier = thankful_opinion + opinion = 20 + } + add_character_modifier = { + modifier = ach_coronation_treated_wound_modifier + years = 5 + } + } + # Inform the initiator they failed + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.failure + custom_tooltip = ach_coronation.0015.a.tt.initiator.failure.physician.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + custom_tooltip = coronation_tt_positive_medium + + add_piety = major_piety_gain + } + } + } + } + } + + stress_impact = { + arrogant = medium_stress_impact_gain # "Peasant blood? On *my* hands?" + sadistic = medium_stress_impact_gain # "No wait this is great let's just watch" + compassionate = major_stress_impact_loss # "Mass casualty events are bad :(((" ~ local buzzkill + } + + ai_chance = { + base = 300 + modifier = { + add = 100 + has_trait = compassionate + } + modifier = { + add = -100 + has_trait = sadistic + } + modifier = { + add = -100 + has_trait = arrogant + } + } + } + + option = { # Set the guards on them! + name = { + trigger = { primary_title = { has_variable = founded_varangian_guard } } + text = ach_coronation.0015.d.byzantines + } + name = ach_coronation.0015.d + trait = overseer + add_internal_flag = dangerous + + add_dread = miniscule_dread_gain + + random_list = { + 1 = { # The soldiers go too far + ach_coronation_0015_major_crush_effect = yes + add_tyranny = medium_tyranny_gain + + hidden_effect = { + # Inform the initiator they succeeded + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.critical_success + custom_tooltip = ach_coronation.0015.a.tt.initiator.critical_success.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + ach_coronation_0015_major_crush_effect = yes + add_tyranny = medium_tyranny_gain + add_dread = miniscule_dread_gain + } + } + } + } + } + } + 2 = { # The soldiers kill a bunch of people but restore order + ach_coronation_0015_medium_crush_effect = yes + add_tyranny = minor_tyranny_gain + + hidden_effect = { + # Inform the initiator they failed + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.failure + custom_tooltip = ach_coronation.0015.a.tt.initiator.failure.crackdown.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + ach_coronation_0015_medium_crush_effect = yes + add_dread = miniscule_dread_gain + add_character_modifier = { + modifier = ach_coronation_crackdown_character_modifier + years = 5 + } + } + } + } + } + } + } + 3 = { # The crowds disperse before many are killed + ach_coronation_0015_minor_crush_effect = yes + + hidden_effect = { + # Inform the initiator they failed + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.failure + custom_tooltip = ach_coronation.0015.a.tt.initiator.failure.crackdown.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + ach_coronation_0015_minor_crush_effect = yes + add_character_modifier = { + modifier = ach_coronation_crackdown_character_modifier + years = 5 + } + add_dread = miniscule_dread_gain + } + } + } + } + } + } + } + + if = { + limit = { + NOT = { has_trait = overseer } + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + else = { + custom_tooltip = because_you_have_overseer_tt + } + + add_character_modifier = { + modifier = ach_coronation_crackdown_character_modifier + years = 5 + } + root.location = { + add_province_modifier = { + modifier = ach_coronation_crackdown_modifier + years = 5 + } + county = { + change_development_progress = medium_development_progress_loss + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + arrogant = minor_stress_impact_loss # Loves calling guards on the commons + # Loves seeing guards beat people + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + overseer = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = compassionate + } + modifier = { + add = 25 + has_trait = arbitrary + } + modifier = { + add = 25 + has_trait = arrogant + } + modifier = { + add = 50 + has_trait = sadistic + } + modifier = { + add = 50 + has_trait = callous + } + modifier = { + add = 50 + has_trait = overseer + } + } + } + + option = { # Getting coronated - Who cares + name = ach_coronation.0015.e + + random = { + chance = 50 + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + + ach_coronation_0015_medium_crush_effect = yes + add_prestige = minor_prestige_loss + + hidden_effect = { + # Inform the initiator they succeeded + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.success + custom_tooltip = ach_coronation.0015.a.tt.initiator.success.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + stress_impact = { + base = medium_stress_impact_gain + irritable = medium_stress_impact_gain + } + + add_prestige = minor_prestige_loss + add_piety = minor_piety_loss + + custom_tooltip = coronation_tt_negative + } + } + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = compassionate + } + modifier = { + add = -50 + has_trait = brave + } + modifier = { + add = 25 + has_trait = craven + } + modifier = { + add = 25 + has_trait = sadistic + } + modifier = { + add = 25 + has_trait = callous + } + modifier = { + add = 25 + has_trait = arrogant + } + } + } + + after = { + hidden_effect = { + scope:peasant = { silent_disappearance_effect = yes } + scope:filthy_peasant = { silent_disappearance_effect = yes } + } + } +} + +###################### +# Guest: You present your host a gift +# 0016 +scripted_trigger ach_coronation_0016_eligible_artifact = { + NOR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + has_variable = banner_house + has_variable = banner_dynasty + has_variable = 1025_treasure_map + } + artifact_durability > 10 +} + +scripted_trigger ach_coronation_0016_can_be_swayed_trigger = { + NOR = { + is_in_guest_subset = { name = detractor } + is_in_guest_subset = { name = supporter } + } + is_ai = yes + is_vassal_of = involved_activity.activity_host + NOR = { + has_trait = disloyal + has_trait = loyal + } +} + +scripted_effect liege_reward_effect = { + switch = { + trigger = has_activity_intent + coronation_bear_witness = { + if = { + limit = { + has_legitimacy = yes + } + add_legitimacy = minor_legitimacy_gain + } + else_if = { + limit = { + government_allows = administrative + top_liege = involved_activity.activity_host + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + coronation_offer_support = { + reverse_add_opinion = { + target = scope:host + modifier = thankful_opinion + opinion = 30 + years = 10 + } + custom_tooltip = { + text = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive + CHAR = root + } + } + coronation_advocate_domain = { + capital_county = { + add_county_modifier = { + modifier = ach_liege_subsidies_modifier + years = 10 + } + } + } + coronation_profess_rights = { + if = { + limit = { + can_add_hook = { + target = scope:host + type = favor_hook + } + } + random = { + chance = 33 + add_hook = { + target = scope:host + type = favor_hook + } + } + } + else = { + reverse_add_opinion = { + target = scope:host + modifier = thankful_opinion + opinion = 10 + years = 10 + } + if = { + limit = { + has_lifestyle = stewardship_lifestyle + } + add_stewardship_lifestyle_xp = minor_lifestyle_xp + } + else = { + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + } + } + } + coronation_seize_advantages = { + if = { + limit = { + government_allows = administrative + top_liege = involved_activity.activity_host + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + } + if = { + limit = { + NOT = { + has_activity_intent = coronation_offer_support + } + } + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:host + opinion = 15 + } + } + + custom_tooltip = ach_coronation.0016.reward.tt +} + +ach_coronation.0016 = { + type = activity_event + title = ach_coronation.0016.t + desc = ach_coronation.0016.desc + theme = coronation_activity + + left_portrait = { + character = root + animation = obsequious_bow + } + + right_portrait = { + character = scope:host + animation = interested + } + + artifact = { + trigger = { exists = scope:gifted_artifact } + target = scope:gifted_artifact + position = lower_center_portrait + } + + cooldown = { years = 1 } + + override_background = { reference = throne_room } + + trigger = { + is_physically_able = yes + involved_activity = { + activity_host = { + this != root + is_ai = yes + } + any_attending_character = { + ach_coronation_0016_can_be_swayed_trigger = yes + this != root + } + } + + NOR = { + trigger_if = { + limit = { + is_ai = yes + } + is_in_guest_subset = { name = detractor } + } + trigger_else = { + involved_activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + has_activity_intent = coronation_disrupt_loyalists + } + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + ordered_attending_character = { + limit = { + ach_coronation_0016_can_be_swayed_trigger = yes + this != root + } + order_by = { + value = 0 + add = "opinion(root)" + subtract = "opinion(scope:host)" + if = { # Prefer powerful vassals + limit = { is_powerful_vassal = no } + multiply = 0.75 + } + } + save_scope_as = detractor + } + } + + if = { + limit = { + any_character_artifact = { + ach_coronation_0016_eligible_artifact = yes + } + } + ordered_character_artifact = { # Try and give away the worst one first + order_by = { + value = 1 + if = { + limit = { + is_equipped = no + } + add = 100 + } + if = { + limit = { + rarity = common + } + add = 15 + } + if = { + limit = { + rarity = masterwork + } + add = 10 + } + if = { + limit = { + rarity = famed + } + add = 5 + } + if = { + limit = { + NOT = { creator = root } + } + add = 10 + } + } + save_scope_as = gifted_artifact + } + } + } + + option = { # A: Martial - Promise Troops + name = ach_coronation.0016.a.martial + trigger = { + highest_skill = martial + martial >= good_skill_level + } + + scope:host = { + if = { + limit = { + root = { government_has_flag = government_is_nomadic } + } + spawn_army = { + name = event_troop_default_name + location = capital_province + inheritable = no + men_at_arms = { + type = nomadic_riders + stacks = { + value = gok_nomadic_riders_small_value + divide = 6 + } + } + men_at_arms = { + type = steppe_raiders + stacks = 2 + } + } + } + else = { + spawn_army = { + name = event_troop_default_name + location = capital_province + inheritable = no + levies = { + add = max_military_strength + multiply = 0.20 + } + men_at_arms = { + type = pikemen_unit + stacks = 2 + } + } + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = ach_coronation_expended_resources_martial_nomad_modifier + years = 5 + } + } + else = { + add_character_modifier = { + modifier = ach_coronation_expended_resources_martial_modifier + years = 5 + } + } + add_martial_lifestyle_xp = minor_lifestyle_xp + + liege_reward_effect = yes + + ai_chance = { + base = 100 + } + } + + option = { # A: Stewardship - Organize Donations + name = ach_coronation.0016.a.stewardship + trigger = { + highest_skill = stewardship + stewardship >= good_skill_level + } + + if = { + limit = { has_trait = greedy } + # Custom tooltip since flavor text isn't triggerable + custom_tooltip = ach_coronation.0016.a.stewardship.greedy.tt + } + else = { + pay_short_term_gold = { + target = scope:host + gold = tiny_gold_value + } + } + involved_activity = { + every_attending_character = { + limit = { + is_ai = yes + this != root + is_vassal_or_below_of = scope:host + NOT = { has_trait = disloyal } + } + custom = every_non_disloyal_vassal_attendee_tt + pay_short_term_gold = { + target = scope:host + gold = tiny_gold_value + } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + } + liege_reward_effect = yes + + ai_chance = { + base = 100 + } + } + + option = { # A: Diplomacy - Turn a Detractor + name = ach_coronation.0016.a.diplomacy + trigger = { + highest_skill = diplomacy + diplomacy >= good_skill_level + exists = scope:detractor + } + + involved_activity = { + every_attending_character = { + custom = every_detractor_tt + limit = { is_in_guest_subset = { name = detractor } } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:detractor } + scope:detractor = { + add_opinion = { + target = scope:host + modifier = impressed_opinion + opinion = 20 + } + } + liege_reward_effect = yes + } + + option = { # A: Intrigue - Offer Spies + name = ach_coronation.0016.a.intrigue + trigger = { + highest_skill = intrigue + intrigue >= good_skill_level + } + + scope:host = { + add_character_modifier = { + modifier = ach_coronation_little_birds_modifier + years = 5 + } + if = { + limit = { has_trait = paranoid } + add_stress = medium_stress_loss + } + } + add_character_modifier = { + modifier = ach_coronation_expended_resources_intrigue_modifier + years = 5 + } + liege_reward_effect = yes + add_intrigue_lifestyle_xp = minor_lifestyle_xp + + ai_chance = { + base = 100 + modifier = { + has_trait = schemer + add = 25 + } + } + } + + option = { # A: Learning - Appeal to Church + name = ach_coronation.0016.a.learning + trigger = { + highest_skill = learning + learning >= good_skill_level + } + + scope:host = { + add_character_modifier = { + modifier = ach_coronation_theocratic_allies_modifier + years = 5 + } + } + liege_reward_effect = yes + add_piety = medium_piety_loss + + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + add = 50 + } + } + } + + option = { # A: Fallback - Become Loyal and give a hook + name = ach_coronation.0016.a.loyal + + trigger = { + NOR = { + martial >= good_skill_level + stewardship >= good_skill_level + diplomacy >= good_skill_level + intrigue >= good_skill_level + learning >= good_skill_level + } + NOR = { + has_trait = loyal + has_trait = disloyal + } + } + + add_trait = loyal + scope:host = { + add_hook = { + type = loyalty_hook + target = root + } + } + liege_reward_effect = yes + + ai_chance = { + base = 100 + modifier = { + has_trait = ambitious + add = 75 + } + modifier = { + has_trait = content + add = 75 + } + modifier = { + has_trait = lazy + add = 50 + } + } + stress_impact = { + base = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + content = medium_stress_impact_loss + lazy = medium_stress_impact_loss + } + } + option = { # B: Host has Impress Attendees + name = ach_coronation.0016.b.impress_attendees + name = { + trigger = { + OR = { + has_trait = lifestyle_poet + has_court_position = court_musician_court_position + has_court_position = court_poet_court_position + } + } + text = ach_coronation.0016.b.impress_attendees.writer + } + trigger = { + scope:host = { has_activity_intent = coronation_impress_attendees } + prestige_level >= high_prestige_level + } + involved_activity = { + every_attending_character = { + custom = activity_every_attendee_tt + add_opinion = { + target = scope:host + modifier = impressed_opinion + opinion = 10 + } + } + } + reason = prestige_level + reason = host_activity_intent + + liege_reward_effect = yes + if = { + limit = { + NOT = { + has_activity_intent = coronation_seize_advantages + } + } + add_prestige = medium_prestige_loss + } + else = { + add_stress = minor_stress_gain + } + } + + option = { # B: Host has Embrace Supporters + name = ach_coronation.0016.b.bonds + trigger = { + scope:host = { has_activity_intent = coronation_embrace_supporters } + OR = { + diplomacy > medium_skill_rating + has_trait = gregarious + } + is_in_guest_subset = { name = supporter } + } + reason = host_activity_intent + scope:host = { + add_prestige = minor_prestige_gain + } + liege_reward_effect = yes + involved_activity = { + every_attending_character = { + custom = every_supporter_activity + limit = { is_in_guest_subset = { name = supporter } } + add_prestige = minor_prestige_gain + } + } + if = { + limit = { + NOT = { + has_activity_intent = coronation_seize_advantages + } + } + add_prestige = medium_prestige_loss + } + else = { + add_stress = minor_stress_gain + } + } + + option = { # C: Give artifact + name = ach_coronation.0016.c.artifact + trigger = { exists = scope:gifted_artifact } + + scope:gifted_artifact = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_variable = { + name = gifted_artifact + value = yes + days = 1825 + } + set_owner = { + target = scope:host + history = { + location = root.location + actor = root + recipient = scope:host + type = given + } + } + } + liege_reward_effect = yes + if = { + limit = { + scope:gifted_artifact = { + OR = { + rarity = illustrious + rarity = famed + } + } + } + dynasty ?= { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + } + else_if = { + limit = { + scope:gifted_artifact = { + rarity = masterwork + } + } + dynasty ?= { + add_dynasty_prestige = miniscule_dynasty_prestige_gain + } + } + + + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = -25 + } + modifier = { + has_trait = avaricious + add = -25 + } + modifier = { + has_trait = disloyal + add = -50 + } + modifier = { + has_trait = loyal + add = 50 + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + disloyal = medium_stress_impact_gain + loyal = medium_stress_impact_loss + } + } + + option = { # C: Fallback: Give gold + name = ach_coronation.0016.c.gold + + trigger = { + NOT = { exists = scope:gifted_artifact } + } + + pay_short_term_gold = { + gold = medium_gold_value + target = scope:host + } + liege_reward_effect = yes + + ai_chance = { + base = 100 + # More likely if you actually have a chance + modifier = { + has_trait = avaricious + add = -50 + } + modifier = { + has_trait = generous + add = 25 + } + modifier = { + has_trait = greedy + add = -25 + } + modifier = { + has_trait = loyal + add = 50 + } + modifier = { + has_trait = disloyal + add = -50 + } + modifier = { + has_trait = improvident + add = 50 + } + } + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + improvident = medium_stress_impact_loss + loyal = medium_stress_impact_loss + disloyal = medium_stress_impact_gain + } + } + + option = { # D: I'm good, thanks + name = { + trigger = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } } + text = ach_coronation.0016.d.hate + } + name = ach_coronation.0016.d + + if = { + limit = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + reverse_add_opinion = { + target = scope:host + modifier = insulted_opinion + opinion = -5 + } + } + + ai_chance = { + base = 100 + # More likely if you actually have a chance + modifier = { + has_trait = greedy + add = 25 + } + modifier = { + has_trait = disloyal + add = 25 + } + modifier = { + has_trait = loyal + add = -25 + } + } + stress_impact = { + greedy = minor_stress_impact_loss + disloyal = minor_stress_impact_loss + loyal = minor_stress_impact_gain + } + } +} + +###################### +# Guest: faith_warrior reacts to the coronation of a non-crusader_king +# by Jay Zaborowski +# 0017 +scripted_trigger ach_coronation_0017_crusader_trigger = { + OR = { + has_trait = faith_warrior + has_trait = crusader_king + } +} + +ach_coronation.0017 = { + type = activity_event + title = ach_coronation.0017.t + desc = { + desc = ach_coronation.0017.desc + first_valid = { + triggered_desc = { # You're the host and not in immediate danger + trigger = { + scope:guest = { ach_coronation_0017_crusader_trigger = yes } + } + desc = ach_coronation.0017.ending.crusader + } + desc = ach_coronation.0017.ending.civilian + } + } + + left_portrait = { + character = root + animation = dismissal + camera = camera_event_group_talking_left_left + } + + center_portrait = { + character = scope:guest + animation = interested_left + camera = camera_event_group_talking_left_center + } + + right_portrait = { + character = scope:host + animation = prayer + camera = camera_event_kneeling + } + + theme = coronation_activity + + cooldown = { years = 1 } + + override_background = { + reference = temple + } + + trigger = { + # Crusades are a thing + religion = { + exists = var:variable_ghw_unlocked + } + # You're some brand of crusader + ach_coronation_0017_crusader_trigger = yes + involved_activity = { + # This beta-ruler dork is not + activity_host = { + is_ai = yes + religion = root.religion + # Can be a Faith Warrior but isn't + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this } + ach_coronation_0017_crusader_trigger = no + # And is of fighting age + is_adult = yes + is_old_character = no + } + # Make sure there's actually someone to talk to + any_attending_character = { + is_available_in_activity_trigger = yes + this != root + this != involved_activity.activity_host + } + } + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + random_attending_character = { + limit = { + is_available_in_activity_trigger = yes + this != root + this != scope:host + } + weight = { + base = 1 + # Prefer interesting characters + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + # Prefer pot-stirrers + modifier = { + OR = { + has_trait = deceitful + has_trait = education_intrigue + has_trait = schemer + has_activity_intent = coronation_disrupt_loyalists + AND = { + is_ai = yes + is_in_guest_subset = { name = detractor } + } + } + add = 10 + } + # And someone who's willing to talk to you + opinion_modifier = { + opinion_target = root + multiplier = 0.5 + } + # And who's willing to talk trash about the Host + opinion_modifier = { + opinion_target = scope:host + multiplier = -1 + } + # And who isn't also a crusader + modifier = { + factor = 0.5 + ach_coronation_0017_crusader_trigger = yes + } + } + save_scope_as = guest + } + } + } + + option = { # Offer Support - You give an endorsement + name = { + trigger = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + text = ach_coronation.0017.a.christian + } + name = ach_coronation.0017.a + + trigger = { + has_activity_intent = coronation_offer_support + prestige_level >= 3 + } + show_as_unavailable = { has_activity_intent = coronation_offer_support } + reason = activity_intent + add_internal_flag = special + + add_prestige = medium_prestige_gain # Good publicity + add_piety = medium_piety_loss + + scope:host = { + add_opinion = { + target = root + modifier = appreciation_opinion + opinion = 20 + } + if = { + limit = { + opinion = { + target = root + value > 20 + } + OR = { + is_ai = yes + AND = { + root = { is_ai = no } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_crusader_endorsement + CHARACTER = root + OPINION = 0 + } + } + else = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + add_prestige = major_prestige_gain + add_piety = medium_piety_gain + } + + involved_activity = { + every_attending_character = { + limit = { + is_vassal_of = scope:host + has_vassal_stance = zealot + # They don't know what it's really like out there, man + ach_coronation_0017_crusader_trigger = no + } + custom = every_zealot_vassal_guest_tt + add_opinion = { + target = scope:host + modifier = crusader_endorsement_opinion + } + } + every_attending_character = { + limit = { + # Thinks this is sort of denigrating + ach_coronation_0017_crusader_trigger = yes + this != root + } + custom = every_faith_warrior_guest_tt + add_opinion = { + target = root + modifier = crusader_sellout_opinion + } + } + } + + ai_chance = { + base = 200 # Offer Support means they probably want to do this + opinion_modifier = { + opinion_target = scope:host + } + # Cynical character's are less likely to do this + modifier = { + has_trait = cynical + factor = { + value = 0.5 # But hey, politics + # But some still won't misrepresent themselves + if = { + limit = { has_trait = honest } + add = -0.5 + } + # "What do you mean I was in it for the money? Me?" + if = { + limit = { + OR = { + has_trait = deceitful + has_trait = schemer + } + } + add = 0.5 + } + } + } + } + } + + option = { # Disrupt Loyalists - You publicly shame HerHim + name = ach_coronation.0017.b + + trigger = { + piety_level >= scope:host.piety_level + has_activity_intent = coronation_disrupt_loyalists + } + show_as_unavailable = { has_activity_intent = coronation_disrupt_loyalists } + reason = activity_intent + custom_tooltip = available_because_piety_vs_host_tt + + add_prestige = medium_prestige_gain + add_piety = major_piety_gain + + involved_activity = { + every_attending_character = { + limit = { + is_vassal_of = scope:host + has_vassal_stance = zealot + } + custom = every_zealot_vassal_guest_tt + add_opinion = { + target = scope:host + modifier = impious_opinion + opinion = -15 + } + } + } + scope:host = { + add_opinion = { + target = root + modifier = shamed_me_opinion + opinion = -25 + } + add_prestige = medium_prestige_loss + add_piety = medium_piety_loss + } + + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:host + multiplier = -1 + } + # Far more likely if Arrogant or Wrathful and they dislike the person + modifier = { + OR = { + has_trait = arrogant + has_trait = wrathful + } + opinion = { + target = root + value < 0 + } + factor = 2 + } + # Opinion matters more than these but might tip the scales + modifier = { + has_trait = zealous + add = 15 + } + # Far less likely in general + modifier = { + has_trait = shy + factor = 0.5 + } + modifier = { + has_trait = humble + factor = 0.5 + } + modifier = { + has_trait = calm + factor = 0.5 + } + modifier = { + has_trait = compassionate + factor = 0.5 + } + # Cynical characters might just refuse to even think of it + modifier = { + has_trait = cynical + factor = { + value = 0 # Would never + # Would consider lying for clout + if = { + limit = { + intrigue >= low_skill_rating + NOT = { has_trait = honest } + } + add = 0.5 + } + # Would actually *looove* to lie about, like, anything really + if = { + limit = { + OR = { + has_trait = deceitful + has_trait = schemer + } + # But probably won't if they're chill + opinion = { + target = root + value > low_positive_opinion + } + } + multiply = 4 + } + } + } + } + stress_impact = { + # Doesn't care that much, but can be doing this cynically + cynical = minor_stress_impact_gain + # Doesn't like the attention + shy = minor_stress_impact_gain + humble = medium_stress_impact_gain + # Conflict-averse + calm = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + # Not so much + arrogant = medium_stress_impact_loss + wrathful = medium_stress_impact_loss + zealous = minor_stress_impact_loss + } + } + + option = { # Bah, I shall focus on prayer + name = ach_coronation.0017.c + + add_piety = medium_piety_gain + add_character_modifier = { + modifier = ach_focusing_on_prayer_modifier + years = 5 + } + stress_impact = { + # Is annoyed by it + base = medium_stress_impact_gain + # Does *not* want to pray, actually + cynical = major_stress_impact_gain + # Is *very* annoyed by it + arrogant = minor_stress_impact_gain + # But it's not all bad + humble = minor_stress_impact_loss # Because I don't care *that* much + zealous = minor_stress_impact_loss # Because I love prayer + shy = minor_stress_impact_loss # Because if I pray you'll shut up + } + + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + factor = 0.5 + } + modifier = { + has_trait = humble + factor = 2 + } + modifier = { + has_trait = zealous + factor = 2 + } + modifier = { + has_trait = shy + factor = 2 + } + modifier = { + has_trait = cynical + factor = 0 + } + } + } + + option = { # It's not a competition, fool! + name = ach_coronation.0017.d + name = { + trigger = { + OR = { + has_trait = cynical + has_trait = humble + has_trait = shy + } + NOT = { has_trait = arrogant } + } + text = ach_coronation.0017.d.cynical # Literally who cares + } + + # Not making a big deal of it is respected + add_prestige = minor_prestige_gain + add_piety = minor_piety_gain + scope:guest = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + + stress_impact = { + # No Zealot impact because the player can interpret this either way + arrogant = medium_stress_impact_gain # You *do* deserve it more + humble = medium_stress_impact_loss + shy = medium_stress_impact_loss # Actually it's sort of nice + } + + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + factor = 0.5 + } + modifier = { + has_trait = humble + factor = 2 + } + modifier = { + has_trait = shy + factor = 2 + } + } + } +} + +###################### +# Guest: Close family member of Host sees opportunity +# 0018 +scripted_trigger ach_coronation_0018_eligible_family_member_trigger = { + #You can't just give stress and stuff to players + is_ai = yes + is_available_in_activity_trigger = yes + this != scope:host + is_close_or_extended_family_of = scope:host + NOT = { has_trait = disloyal } + trigger_if = { # For ach_coronation.0020 + limit = { is_ai = yes } + opinion = { + target = scope:host + value >= low_positive_opinion + } + } +} + +scripted_trigger ach_coronation_0018_grantable_title_trigger = { + tier = tier_county + this != scope:host.capital_county +} + +scripted_effect ach_coronation_0018_choose_title_effect = { + scope:host = { + random_held_title = { + limit = { ach_coronation_0018_grantable_title_trigger = yes } + weight = { + base = 100 + # Prefer worse titles + modifier = { + add = { + value = development_level + multiply = -1 + } + } + # Even more if it's some backwards other-language hellhole + modifier = { + culture != scope:host.culture + factor = 2 + } + modifier = { + faith != scope:host.faith + factor = 2 + } + } + save_scope_as = grantable_title + } + } +} + +ach_coronation.0018 = { + type = activity_event + title = ach_coronation.0018.t + desc = { + desc = ach_coronation.0018.desc + first_valid = { + triggered_desc = { # There's a Seneschal + trigger = { + scope:servant_boss = { has_court_position = seneschal_court_position } + } + desc = ach_coronation.0018.desc.seneschal + } + triggered_desc = { # There's a Steward + trigger = { + scope:servant_boss = { has_council_position = councillor_steward } + } + desc = ach_coronation.0018.desc.steward + } + triggered_desc = { # There is no Seneschal or Steward + trigger = { NOT = { exists = scope:servant_boss } } + desc = ach_coronation.0018.desc.fallback + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:servant_boss } + desc = ach_coronation.0018.desc.ending.servant_boss + } + desc = ach_coronation.0018.desc.ending.no_servant_boss + } + } + + left_portrait = { + character = root + animation = thinking + camera = camera_event_left + } + + center_portrait = { + character = scope:servant + triggered_animation = { + trigger = { exists = scope:servant_boss } + animation = throne_room_messenger_3 + } + animation = stress + camera = camera_event_right_pointing_left_fov50 + hide_info = yes + } + + right_portrait = { + character = scope:servant_boss + animation = stress + camera = camera_event_very_right_fov50 + } + + lower_left_portrait = { + character = scope:host + } + + weight_multiplier = { + base = 1 + # Far more likely if there is no Seneschal + modifier = { + NOT = { exists = court_position:seneschal_court_position } + factor = 3 + } + # If there is a Seneschal than low Aptitude raises likeliness + activity_court_position_aptitude_negative_modifier = { LIEGE = root POS = seneschal } + } + + theme = coronation_activity + + cooldown = { years = 1 } + override_background = { + trigger = { + #Do not want generic courtyard calling up Constantinople for this one + location.county = title:c_byzantion + } + reference = bp2_courtyard + } + override_background = { + reference = courtyard + } + + override_effect_2d = { + trigger = { exists = scope:rain_day } + reference = rain + } + + trigger = { + ach_coronation_0018_eligible_family_member_trigger = yes + coronation_hostile_to_host_trigger = no + involved_activity = { + activity_host = { + # Don't potentially screw over a player Seneschal + trigger_if = { + limit = { exists = court_position:seneschal_court_position } + court_position:seneschal_court_position = { is_ai = yes } + } + # If we need a Steward but they're absent, make sure they're not a player so we can teleport them + trigger_else = { + cp:councillor_steward ?= { is_ai = yes } + } + } + } + } + + immediate = { + # For the event art + create_character = { + save_scope_as = servant + employer = involved_activity.activity_host + template = servant_character + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + } + random_rain_snow_chance_effect = yes + + involved_activity = { + hidden_effect = { + if = { # Grab a secret for the opt-out option + limit = { + any_attending_character = { + this != root + is_available_in_activity_trigger = yes + any_secret = { + NOT = { is_known_by = root } + } + } + } + random_attending_character = { + limit = { + this != root + is_available_in_activity_trigger = yes + any_secret = { + NOT = { is_known_by = root } + } + } + save_scope_as = secret_holder + random_secret = { + limit = { NOT = { is_known_by = root } } + save_scope_as = secret_to_reveal + } + } + } + else = { # Create one if you can't find one + random_attending_character = { + limit = { + this != root + is_available_in_activity_trigger = yes + } + + weight = { + base = 1 + # Prefer interesting characters (but not by too much) + modifier = { + add = 4 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 2 + is_of_minor_interest_to_root_trigger = yes + } + } + + give_random_likely_secret_effect = yes + save_scope_as = secret_holder + random_secret = { + limit = { NOT = { is_known_by = root } } + save_scope_as = secret_to_reveal + } + } + } + activity_host = { + save_scope_as = host + if = { # If the Seneschal exists and isn't AI then they're the Servant Boss + limit = { + court_position:seneschal_court_position ?= { is_ai = yes } + } + court_position:seneschal_court_position = { save_scope_as = servant_boss } + } + else = { # Else it's the Steward + cp:councillor_steward = { + save_scope_as = servant_boss + } + } + } + scope:servant_boss = { + if = { # Teleport them if they're not at the coronation + limit = { location != scope:host.involved_activity.activity_location } + set_location = { location = scope:host.involved_activity.activity_location } + } + if = { # And add them to the activity if they're not in it + limit = { can_join_activity = scope:host.involved_activity } + add_to_activity_without_travel = scope:host.involved_activity + } + } + } + } + } + + option = { # A: Seize Advantages | Offer Support: Take charge of the servants + name = ach_coronation.0018.a.intent + reason = activity_intent + add_internal_flag = special + + trigger = { + OR = { + has_activity_intent = coronation_seize_advantages + has_activity_intent = coronation_offer_support + } + } + + if = { + limit = { has_trait = diligent } + custom_tooltip = because_you_have_diligent_tt + } + else = { + add_character_modifier = { + modifier = exhausted_modifier + years = 10 + } + } + + duel = { + skill = stewardship + value = average_skill_rating + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = ach_coronation.0018.a.tt_success + + custom_tooltip = ach_can_refuse_reward + + if = { # Offer a title + limit = { # Host has a title to give + scope:host = { + any_held_title = { ach_coronation_0018_grantable_title_trigger = yes } + # And doesn't hate you + NOR = { + opinion = { + target = scope:host + value <= medium_negative_opinion + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + # Host can actually give you the title + can_be_granted_titles_by = { RULER = scope:host } + # Host isn't giving a vassal more land just for being mildly helpful + is_landed = no + } + + custom_tooltip = ach_coronation.0018.a.tt.vassal + + hidden_effect = { + save_scope_value_as = { + name = reward_type + value = flag:title + } + } + } + else_if = { # Offer the Seneschal spot + limit = { + scope:host = { + can_appoint_char_to_court_position = { + CHAR = scope:host + COURT_POS = seneschal_court_position + } + } + } + + show_as_tooltip = { + court_position_grant_effect = { + POS = seneschal + EMPLOYER = scope:host + CANDIDATE = root + } + } + + hidden_effect = { + save_scope_value_as = { + name = reward_type + value = flag:court_position + } + } + } + else = { # Give public praise + show_as_tooltip = { + add_prestige = medium_prestige_gain + + involved_activity = { + every_attending_character = { + limit = { + this != root + this != scope:host + } + custom = every_guest_scope_tt + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + } + + hidden_effect = { + save_scope_value_as = { + name = reward_type + value = flag:praise + } + } + } + + send_interface_toast = { + title = ach_coronation.0018.a.tt_success + reverse_add_opinion = { + modifier = helpful_opinion + target = scope:host + opinion = 15 + } + hidden_effect = { + # Player gets a chance to refuse the reward + trigger_event = ach_coronation.0019 + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -9 + } + desc = ach_coronation.0018.a.tt_failure + send_interface_toast = { + title = ach_coronation.0018.a.tt_failure + stress_impact = { + base = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + lazy = medium_stress_impact_gain + diligent = medium_stress_impact_loss + } + + ai_chance = { + base = 150 + modifier = { + has_trait = diligent + add = 100 + } + modifier = { + has_trait = lazy + add = -50 + } + modifier = { + has_trait = arrogant + add = -25 + } + } + } + + option = { # A: Try to help with preparations + name = ach_coronation.0018.a + skill = stewardship + + highlight_portrait = scope:servant_boss + + trigger = { + NOR = { + has_activity_intent = coronation_seize_advantages + has_activity_intent = coronation_offer_support + } + } + + if = { + limit = { + NOT = { has_trait = diligent } + } + add_character_modifier = { + modifier = exhausted_modifier + years = 10 + } + } + + # Does servant_boss feel like you did them a solid or tried to steal their job? + if = { + limit = { + exists = scope:servant_boss + } + if = { + limit = { # You're diplomatic and smooth things over + OR = { + has_trait = gregarious + has_trait = diplomat + } + } + custom_tooltip = ach_coronation.0018.diplomacy_trait.tt + send_interface_toast = { + title = ach_coronation.0018.d.pleased_servant_boss + left_icon = scope:servant_boss + reverse_add_opinion = { + modifier = thankful_opinion + target = scope:servant_boss + opinion = 25 + } + } + } + else_if = { + limit = { # They're not the type of person to perceive this as a slight + scope:servant_boss = { + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = diligent + has_trait = vengeful + } + } + } + send_interface_toast = { + title = ach_coronation.0018.d.pleased_servant_boss + left_icon = scope:servant_boss + reverse_add_opinion = { + modifier = thankful_opinion + target = scope:servant_boss + opinion = 20 + } + } + } + else = { # Else they get annoyed + custom_tooltip = ach_coronation.0018.d.annoyed_servant_boss + send_interface_toast = { + title = ach_coronation.0018.d.annoyed_servant_boss + left_icon = scope:servant_boss + reverse_add_opinion = { + modifier = annoyed_opinion + target = scope:servant_boss + opinion = -20 + } + } + } + } + + duel = { + skill = stewardship + value = average_skill_rating + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = ach_coronation.0018.a.tt_success + send_interface_toast = { + title = ach_coronation.0018.a.tt_success + scope:host = { + add_opinion = { + modifier = helpful_opinion + target = root + opinion = 15 + } + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -9 + } + desc = ach_coronation.0018.a.tt_failure + send_interface_toast = { + title = ach_coronation.0018.a.tt_failure + stress_impact = { + base = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + } + } + + stress_impact = { + # Work is hard + base = minor_stress_impact_gain + # But not for some + diligent = medium_stress_impact_loss + # And for others it's worth it + ambitious = minor_stress_impact_loss + # Doesn't want the clout + content = minor_stress_impact_gain + # This sounds a lot like labor + arrogant = minor_stress_impact_gain + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = diligent + add = 25 + } + modifier = { + has_trait = ambitious + add = 25 + } + modifier = { + has_trait = content + add = -25 + } + modifier = { + has_trait = arrogant + add = -25 + } + modifier = { + has_trait = lazy + add = -50 + } + } + } + + option = { # B: Gossip with the servants instead + name = ach_coronation.0018.b + skill = intrigue + + highlight_portrait = scope:servant + + duel = { + skill = intrigue + value = average_skill_rating + 75 = { + desc = ach_coronation.0018.b.tt.gossip_with_servants + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + show_chance = no + send_interface_toast = { + title = ach_coronation.0018.b.tt.gossip_with_servants + left_icon = root + add_character_modifier = { + modifier = ach_coronation_gossips_with_servants_modifier + years = 5 + } + } + } + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + min = 10 + show_chance = no + desc = ach_coronation.0018.b.tt.secret_unknown_desc + custom_tooltip = ach_coronation.0018.b.tt.secret_unknown + hidden_effect = { + send_interface_toast = { + title = ach_coronation.0018.b.tt.secret + left_icon = root + scope:secret_to_reveal = { + expose_secret = root + } + } + } + } + } + stress_impact = { + gregarious = minor_stress_impact_loss + # Sitting around and talking sucks, actually + impatient = minor_stress_impact_gain + shy = minor_stress_impact_gain + diligent = minor_stress_impact_gain + # Doesn't want to talk to poors + arrogant = medium_stress_impact_gain + # Looooves gossip + schemer = medium_stress_impact_loss + deceitful = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 25 + } + modifier = { + has_trait = gregarious + add = 25 + } + modifier = { + has_trait = impatient + factor = 0.5 + } + modifier = { + has_trait = diligent + NOR = { # Only wasting time if gossiping isn't your whole deal + has_trait = education_intrigue + has_trait = deceitful + has_trait = schemer + } + factor = 0.5 + } + modifier = { + has_trait = shy + factor = 0.5 + } + modifier = { + has_trait = arrogant + factor = 0.5 + } + modifier = { + OR = { + has_trait = education_intrigue + has_trait = deceitful + has_trait = schemer + } + factor = 2 + } + } + } + + option = { # C: Stewardship Lifestyle: Study the ceremony + name = ach_coronation.0018.c + trigger = { + has_lifestyle = stewardship_lifestyle + } + skill = stewardship + reason = lifestyle + + highlight_portrait = scope:servant + highlight_portrait = scope:servant_boss + + add_stewardship_lifestyle_xp = minor_lifestyle_xp + add_character_modifier = { + modifier = ach_coronation_studying_ceremony_modifier + years = 5 + } + + stress_impact = { + diligent = minor_stress_impact_loss + # Super down for not talking + shy = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + has_trait = diligent + add = 25 + } + modifier = { + has_trait = shy + add = 25 + } + } + } + + option = { # D: Just chill + name = ach_coronation.0018.d + + highlight_portrait = root + + stress_impact = { + base = medium_stress_impact_loss + # Wants to do something + diligent = minor_stress_impact_gain + # Who really wants Host's approval? + content = minor_stress_impact_loss + # Super down for not talking + shy = minor_stress_impact_loss + # Doing *absolutely* nothing is based + lazy = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + has_trait = content + add = 25 + } + modifier = { + has_trait = shy + add = 25 + } + modifier = { + has_trait = lazy + add = 50 + } + modifier = { + has_trait = diligent + factor = 0.5 + } + } + } + + after = { + hidden_effect = { + scope:servant = { silent_disappearance_effect = yes } + } + } +} + +ach_coronation.0019 = { + type = letter_event + opening = { + desc = ach_coronation.0019.opening + } + desc = { + # Opening + desc = ach_coronation.0019.desc + first_valid = { + triggered_desc = { + trigger = { scope:reward_type = flag:title } + desc = ach_coronation.0019.desc.title + } + triggered_desc = { + trigger = { scope:reward_type = flag:court_position } + desc = ach_coronation.0019.desc.court_position + } + desc = ach_coronation.0019.desc.praise + } + } + + sender = scope:host + + immediate = { ach_coronation_0018_choose_title_effect = yes } + + option = { # Accept + name = ach_coronation.0019.a + + switch = { + trigger = scope:reward_type + flag:title = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:grantable_title = { + change_title_holder = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + custom_tooltip = { + text = your_title_cannot_be_revoked_10_tt + root = { + add_character_flag = { + flag = titles_protected + years = 10 + } + } + } + } + flag:court_position = { + court_position_grant_effect = { + POS = seneschal + EMPLOYER = scope:host + CANDIDATE = root + } + if = { + limit = { + scope:servant_boss = { has_court_position = seneschal_court_position } + OR = { + scope:servant_boss = { is_ai = yes } + AND = { + scope:servant_boss = { + is_ai = no + } + is_ai = no + } + } + } + scope:servant_boss = { + progress_towards_rival_effect = { + REASON = rival_jealousy_at_court + CHARACTER = root + OPINION = -30 + } + } + } + } + flag:praise = { + add_prestige = medium_prestige_gain + + involved_activity = { + every_attending_character = { + limit = { + this != root + this != scope:host + } + custom = every_guest_scope_tt + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + } + } + + ai_chance = { + base = 150 + modifier = { + add = -50 + scope:reward_type = flag:title + has_trait = content + } + modifier = { + add = -50 + scope:reward_type = flag:court_position + has_trait = lazy + } + modifier = { + add = -50 + scope:reward_type = flag:praise + has_trait = shy + } + } + } + + option = { # Ask for gold instead + name = ach_coronation.0019.b + trigger = { + scope:host = { is_ai = yes } # The player doesn't need a multi-event back and forth over this + } + scope:host = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + pay_short_term_gold = { + gold = minor_gold_value + target = root + } + } + + ai_chance = { + base = 50 + modifier = { + add = 50 + scope:reward_type = flag:praise + has_trait = greedy # No money in praise + } + modifier = { + add = 50 + scope:reward_type = flag:praise + has_activity_intent = coronation_seize_advantages + } + } + } + + option = { # Their friendship is enough + name = ach_coronation.0019.c + if = { + limit = { + reverse_opinion = { + target = scope:host + value > 20 + } + OR = { + scope:host = { is_ai = yes } + AND = { + scope:host = { is_ai = no } + is_ai = no + } + } + } + progress_towards_friend_effect = { + CHARACTER = scope:host + REASON = friend_supported_host_during_coronation + OPINION = default_friend_opinion + } + } + else = { + reverse_add_opinion = { + target = scope:host + modifier = friendliness_opinion + opinion = 25 + } + } + + ai_chance = { + base = 0 + modifier = { + add = 100 + has_trait = humble + } + modifier = { + add = 50 + scope:reward_type = flag:praise + has_trait = shy + } + modifier = { + add = 50 + has_activity_intent = coronation_offer_support + } + } + } +} + +###################### +# Host: Close family member helps manage the coronation +# by Jay Zaborowski +# 0020 +ach_coronation.0020 = { + type = activity_event + title = ach_coronation.0020.t + desc = ach_coronation.0020.desc + + left_portrait = { + character = scope:annoying_servant + animation = stunned + camera = camera_event_very_right_pointing_very_left + hide_info = yes + } + + center_portrait = { + character = scope:helpful_family + animation = stayback + camera = camera_event_right_pointing_very_right + } + + right_portrait = { + character = scope:host + triggered_animation = { + trigger = { OR = { scope:host.religion = religion:eastern_orthodox_religion scope:host.religion = religion:catholic_religion scope:host.religion = religion:protestant_religion } } + animation = emotion_thinking_scepter + } + triggered_animation = { + trigger = { NOT = { OR = { scope:host.religion = religion:eastern_orthodox_religion scope:host.religion = religion:catholic_religion scope:host.religion = religion:protestant_religion } } } + animation = thinking + } + camera = camera_event_very_left_pointing_right + } + + theme = coronation_activity + + cooldown = { years = 1 } + + override_background = { + reference = corridor_day + } + + trigger = { + involved_activity = { + any_attending_character = { + ach_coronation_0018_eligible_family_member_trigger = yes + } + } + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + random_attending_character = { + limit = { + ach_coronation_0018_eligible_family_member_trigger = yes + } + weight = { + base = 1 + opinion_modifier = { + opinion_target = scope:host + multiplier = 0.25 + } + modifier = { + add = sum_of_all_skills_value + } + modifier = { # Prefer close family + is_close_family_of = root + add = 20 + } + modifier = { + has_trait = ambitious + add = 10 + } + modifier = { + has_trait = diligent + add = 10 + } + # If making them a vassal is on the table, try and get someone who is eligible + modifier = { + trigger_if = { + limit = { + root = { + has_activity_intent = coronation_embrace_supporters + any_held_title = { ach_coronation_0018_grantable_title_trigger = yes } + } + NOT = { can_be_granted_titles_by = { RULER = root } } + } + } + factor = 0.1 + } + } + save_scope_as = helpful_family + add_character_modifier = { + modifier = exhausted_modifier + years = 10 + } + if = { + limit = { + has_trait = diligent + } + add_stress = minor_stress_gain + } + else = { + add_stress = major_stress_gain + } + } + } + + ach_coronation_0018_choose_title_effect = yes + + if = { # Grab a courtier for the background + limit = { + any_courtier_or_guest = { + this != scope:helpful_family + this != root + is_available_in_activity_trigger = yes + } + } + random_courtier_or_guest = { + limit = { + this != scope:helpful_family + this != root + is_available_in_activity_trigger = yes + } + save_scope_as = annoying_servant + } + } + else_if = { # If there wasn't one grab a pool char + limit = { + any_pool_character = { + province = involved_activity.activity_location + this != scope:helpful_family + this != root + is_available_in_activity_trigger = yes + } + } + random_pool_character = { + province = involved_activity.activity_location + limit = { + this != scope:helpful_family + this != root + is_available_in_activity_trigger = yes + } + save_scope_as = annoying_servant + } + } + else = { # Else, make one + create_character = { + save_scope_as = annoying_servant + employer = root + template = servant_character + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + } + add_character_flag = created_character_ach_coronation_0020 + } + } + + option = { # A: Embrace Supporters: They would be a loyal vassal! + name = ach_coronation.0020.a + reason = activity_intent + add_internal_flag = special + + trigger = { + has_activity_intent = coronation_embrace_supporters + exists = scope:grantable_title + scope:helpful_family = { + can_be_granted_titles_by = { RULER = root } + } + } + show_as_unavailable = { + AND = { + has_activity_intent = coronation_embrace_supporters + exists = scope:grantable_title + } + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:grantable_title = { + change_title_holder = { + holder = scope:helpful_family + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + coronation_move_towards_supporter_effect = { CHARACTER = scope:helpful_family } + + custom_tooltip = { + text = character_title_cannot_be_revoked_tt + scope:helpful_family = { + add_character_flag = { + flag = titles_protected + years = 10 + } + } + } + + scope:helpful_family = { + add_trait = loyal + add_opinion = { + modifier = loyalty_opinion + target = scope:host + opinion = 25 + } + } + add_hook = { + target = scope:helpful_family + type = loyalty_hook + } + + coronation_embrace_supporters_opinion_effect = yes + } + + option = { # B: Family First: This is how we do things in my dynasty! + name = ach_coronation.0020.b + trait = family_first + + trigger = { has_trait = family_first } + show_as_unavailable = { always = yes } + + every_close_family_member = { + custom = every_family_member_tt + limit = { + NOT = { this = root } + } + add_opinion = { + target = root + modifier = love_opinion + opinion = 20 + } + } + dynasty ?= { + add_dynasty_modifier = { + modifier = ach_familial_support_modifier + years = 10 + } + } + } + + option = { # C: They truly are a great GetRelationToMe + name = ach_coronation.0020.c + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:helpful_family } + reverse_opinion = { + target = scope:helpful_family + value > 20 + } + OR = { + scope:helpful_family = { is_ai = yes } + AND = { + scope:helpful_family = { is_ai = no } + is_ai = no + } + } + } + set_relation_potential_friend = scope:helpful_family + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:helpful_family } + scope:helpful_family = { + add_opinion = { + target = root + modifier = love_opinion + opinion = 20 + } + } + } + + option = { # D: They're a model for all my subjects + name = ach_coronation.0020.d + add_prestige = minor_prestige_gain + } + + after = { + add_stress = medium_stress_loss + if = { + limit = { has_character_flag = created_character_ach_coronation_0020 } + hidden_effect = { + scope:annoying_servant = { silent_disappearance_effect = yes } + remove_character_flag = created_character_ach_coronation_0020 + } + } + } +} + +###################### +# Guest: An ongoing plague has shaken a zealous guest +# by Jay Zaborowski +# 0022 +scripted_trigger ach_coronation_0022_valid_zealot_trigger = { + is_ai = yes + faith = scope:host.faith + highest_held_title_tier >= tier_county + OR = { + has_trait = zealous + trigger_if = { + limit = { is_vassal_or_below_of = scope:host } + has_vassal_stance = zealot + } + } + NOR = { + this = scope:host + this = root + has_trait = cynical + has_trait = loyal + # Don't want anyone who wouldn't listen to you + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } +} + +scripted_trigger ach_coronation_0022_loose_zealot_trigger = { + is_ai = yes + faith = involved_activity.activity_host.faith + highest_held_title_tier >= tier_county + OR = { + ai_zeal >= low_positive_ai_value + has_trait = zealous + trigger_if = { + limit = { is_vassal_or_below_of = involved_activity.activity_host } + has_vassal_stance = zealot + } + has_trait = lifestyle_mystic + has_trait = paranoid + has_trait = craven + has_trait = devoted + } + NOR = { + this = involved_activity.activity_host + this = root + has_trait = cynical + # Don't want anyone who wouldn't listen to you + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } +} + +ach_coronation.0022 = { + type = activity_event + title = ach_coronation.0022.t + desc = { + desc = ach_coronation.0022.desc + first_valid = { + triggered_desc = { + trigger = { scope:host = { primary_title = title:e_byzantium } } + desc = ach_coronation.0022.desc.whisper.byzantine + } + triggered_desc = { + trigger = { scope:host = { primary_title = title:e_hre } } + desc = ach_coronation.0022.desc.whisper.hre + } + triggered_desc = { + trigger = { scope:host = { num_sinful_traits >= 2 } } + desc = ach_coronation.0022.desc.whisper.sinner + } + triggered_desc = { + trigger = { scope:host.culture = { has_innovation = innovation_divine_right } } + desc = ach_coronation.0022.desc.whisper.divine_right + } + desc = ach_coronation.0022.desc.whisper.fallback + } + desc = ach_coronation.0022.desc.ending + } + theme = coronation_activity + + override_background = { + reference = temple + } + + cooldown = { years = 1 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { has_activity_intent = coronation_disrupt_loyalists } + animation = interested + } + animation = thinking + } + right_portrait = { + character = scope:zealot + animation = prayer + camera = camera_event_very_right_close + } + + trigger = { + involved_activity = { + activity_host = { + save_temporary_scope_as = host_temp + is_ai = yes + # Ongoing plague + any_sub_realm_county = { + count >= 3 + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity > minor + } + } + } + } + any_attending_character = { + ach_coronation_0022_loose_zealot_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = coronation_disrupt_loyalists + factor = 2 + } + modifier = { + has_activity_intent = coronation_offer_support + factor = 2 + } + modifier = { + involved_activity = { + activity_host = { + # Ongoing plague + any_sub_realm_county = { + count >= 10 + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity > minor + } + } + } + } + } + factor = 2 + } + modifier = { + involved_activity = { + activity_host = { + # Ongoing plague + any_sub_realm_county = { + count >= 3 + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity > major + } + } + } + } + } + factor = 2 + } + modifier = { + involved_activity = { + activity_location = { + any_province_epidemic = { + count >= 1 + outbreak_intensity > minor + } + } + } + factor = 2 + } + } + + immediate = { + involved_activity = { + activity_host = { + save_scope_as = host + # Get the ongoing plague + if = { + limit = { + any_sub_realm_county = { + count >= 4 + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity = apocalyptic + } + } + } + } + get_random_realm_epidemic = { INTENSITY = apocalyptic } + } + else = { + get_random_realm_epidemic = { INTENSITY = major } + } + # Get the Faction if that's part of it + if = { + limit = { + root = { has_activity_intent = coronation_disrupt_loyalists } + } + random_targeting_faction = { + limit = { + any_faction_member = { this = root } + #Won't join a bunch of heretics + trigger_if = { + limit = { faction_is_type = claimant_faction } + special_character.faith ?= scope:host.faith + } + trigger_if = { + limit = { faction_is_type = populist_faction } + var:faction_faith ?= scope:host.faith + } + } + save_scope_as = faction + } + } + } + + # Grab yer zealot + random_attending_character = { + # Try and get someone who can join the faction if that's relevant + limit = { + exists = scope:faction + can_join_faction = scope:faction + ach_coronation_0022_valid_zealot_trigger = yes + } + alternative_limit = { + ach_coronation_0022_valid_zealot_trigger = yes + } + alternative_limit = { + ach_coronation_0022_loose_zealot_trigger = yes + } + weight = { + base = 1 + # Prefer vassals + modifier = { + add = { + value = 5 + if = { + limit = { is_powerful_vassal_of = scope:host } + add = 10 + } + } + is_vassal_of = scope:host + } + # Prefer interesting characters + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + # Who would also likely be afeared + modifier = { + add = 5 + has_trait = craven + } + # And not those who wouldn't be + modifier = { + add = -15 + has_trait = brave + } + # Clergy members are also nice + modifier = { + add = 5 + is_clergy = yes + } + # As are Zealot Vassal Stancers + modifier = { + add = 5 + is_vassal_of = scope:host + has_vassal_stance = zealot + } + # Weightings for zealotry + modifier = { + add = { + value = ai_zeal + multiply = 0.2 # Don't want it to overwhelm other factors + } + } + # Prefer rulers who already dislike the host + opinion_modifier = { + opinion_target = scope:host + multiplier = -0.2 # Don't want it to overwhelm other factors + } + } + save_scope_as = zealot + assign_quirk_effect = yes + } + } + } + + option = { # This is that bastard host's fault! + name = ach_coronation.0022.a.coronation_disrupt_loyalists + trigger = { + has_activity_intent = coronation_disrupt_loyalists + exists = scope:faction + scope:zealot = { + can_join_faction = scope:faction + opinion = { + target = scope:host + value <= 60 + } + } + } + custom_tooltip = available_because_intent_tt + flavor = ach_coronation.0022.a.coronation_disrupt_loyalists.flavor + reason = activity_intent + skill = diplomacy + + add_piety = medium_piety_loss + reverse_add_opinion = { + target = scope:host + modifier = opposition_opinion + opinion = -20 + } + + duel = { + skills = { diplomacy learning } + target = scope:zealot + 50 = { # You convert them! + desc = ach_coronation.0022.a.coronation_disrupt_loyalists.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + modifier = { + has_perk = theologian_perk + add = 25 + } + modifier = { + has_trait = zealous + add = 25 + } + modifier = { + scope:zealot = { + opinion = { + target = scope:host + value < -50 + } + } + add = 25 + } + modifier = { + scope:zealot = { + opinion = { + target = scope:host + value < 0 + } + } + add = 15 + } + send_interface_toast = { + title = ach_coronation.0022.a.coronation_disrupt_loyalists.success + left_icon = root + right_icon = scope:zealot + + scope:zealot = { join_faction = scope:faction } + coronation_move_towards_detractor_effect = { CHARACTER = scope:zealot } + } + } + 50 = { # You fail + desc = ach_coronation.0022.a.coronation_disrupt_loyalists.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + modifier = { + scope:zealot = { + opinion = { + target = scope:host + value > 0 + } + } + add = 25 + } + modifier = { + scope:zealot = { + opinion = { + target = scope:host + value > 30 + } + } + add = 25 + } + send_interface_toast = { + title = ach_coronation.0022.a.coronation_disrupt_loyalists.failure + left_icon = root + right_icon = scope:zealot + + reverse_add_opinion = { + target = scope:zealot + modifier = outraged_opinion + opinion = -20 + } + } + } + } + + ai_chance = { + base = 150 + modifier = { + has_trait = disloyal + add = 50 + } + modifier = { + has_trait = schemer + add = 50 + } + } + } + option = { # It's not our goodly Host's fault! + name = ach_coronation.0022.a.offer_support + trigger = { has_activity_intent = coronation_offer_support } + custom_tooltip = available_because_intent_tt + flavor = ach_coronation.0022.a.offer_support.flavor + + add_piety = medium_piety_loss + + duel = { + skills = { diplomacy learning } + target = scope:zealot + 50 = { # They are more loyal than ever + desc = ach_coronation.0022.a.offer_support.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + modifier = { + has_perk = theologian_perk + add = 25 + } + modifier = { + has_trait = zealous + add = 25 + } + send_interface_toast = { + title = ach_coronation.0022.a.offer_support.success + left_icon = root + right_icon = scope:zealot + + random = { + chance = 20 + scope:zealot = { + add_trait = loyal + } + } + + reverse_add_opinion = { + target = scope:zealot + modifier = comforted_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:host + modifier = helpful_opinion + opinion = 20 + } + scope:zealot = { + add_opinion = { + target = scope:host + modifier = loyalty_opinion + opinion = 30 + } + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:zealot } + } + } + 50 = { # You fail + desc = ach_coronation.0022.a.offer_support.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = ach_coronation.0022.a.offer_support.failure + left_icon = root + right_icon = scope:zealot + + reverse_add_opinion = { + target = scope:zealot + modifier = annoyed_opinion + opinion = -20 + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:zealot } + } + } + } + stress_impact = { + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 150 + modifier = { + has_trait = loyal + add = 50 + } + } + } + option = { # Pray with HerHim + name = ach_coronation.0022.b + trigger = { + root.faith.religion ?= scope:zealot.faith.religion + } + show_as_unavailable = { always = yes } + reason = faith + trait = zealous + + custom_tooltip = available_because_of_shared_religion_tt + + add_piety = medium_piety_gain + if = { + limit = { + scope:zealot = { + opinion = { + target = root + value > 0 + } + } + OR = { + scope:zealot = { is_ai = yes } + AND = { + scope:zealot = { is_ai = no } + is_ai = no + } + } + } + progress_towards_friend_effect = { + CHARACTER = scope:zealot + OPINION = 20 + REASON = friend_religious_comfort + } + } + else = { + reverse_add_opinion = { + target = scope:zealot + modifier = kindness_opinion + opinion = 20 + } + } + + + stress_impact = { + cynical = medium_stress_impact_gain + zealous = medium_stress_impact_loss + compassionate = minor_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + add = 100 + } + modifier = { + has_trait = compassionate + add = 50 + } + modifier = { + has_trait = sadistic + add = -25 + } + modifier = { + has_trait = callous + add = -100 + } + modifier = { + OR = { + has_trait = cynical + has_trait = callous + has_trait = sadistic + } + factor = 0 + } + } + } + option = { # I'm not getting near anyone rn, thanks + name = ach_coronation.0022.d + flavor = ach_coronation.0022.d.flavor + + add_character_modifier = { + modifier = ach_social_distancing_modifier + years = 4 + } + + stress_impact = { + gregarious = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + add = 25 + } + modifier = { + has_trait = shy + add = 25 + } + modifier = { + has_trait = paranoid + add = 25 + } + modifier = { + has_trait = trusting + add = -25 + } + modifier = { + has_trait = callous + add = -25 + } + modifier = { + has_trait = gregarious + add = -25 + } + } + } +} + +###################### +# Host: An exotic foreign warrior pledges themselves to you +# by Jay Zaborowski +# 0023 +scripted_trigger ach_coronation_0023_foreign_holder_trigger = { + NOR = { + # Make sure they're from afar + in_diplomatic_range = prev + # And suitably foreign + faith = prev.faith + culture = prev.culture + } + save_temporary_scope_as = foreign_ruler_temp + prev = { + # They're not that exotic if you already rule a bunch of them + any_realm_county = { + NOR = { + faith = scope:foreign_ruler_temp.faith + culture = scope:foreign_ruler_temp.culture + } + } + } +} + +scripted_trigger ach_coronation_0023_eligible_clergy_trigger = { + is_available_in_activity_trigger = yes + faith = involved_activity.activity_host.faith +} + +scripted_effect ach_coronation_0023_generic_acceptance_effect = { + if = { + limit = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + } + # Fundamentalists won't be happy about this + every_vassal = { + limit = { + faith = root.faith + has_vassal_stance = zealot + } + custom = every_zealot_vassal + add_opinion = { + target = root + modifier = fp1_honoured_heathen_opinion + opinion = -10 + } + } + add_piety = medium_piety_loss + if = { + limit = { has_trait = zealous } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + } + culture = { + change_cultural_acceptance = { + target = scope:foreign_warrior.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_accepted_foreign_warrior + } + } + + stress_impact = { + trusting = medium_stress_loss # Trusts this strange foreigner implicitly + paranoid = medium_stress_loss # Is very happy to have less incompetent guards + } +} + +ach_coronation.0023 = { + type = activity_event + title = ach_coronation.0023.t + desc = { + desc = ach_coronation.0023.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:clergy + scope:clergy.faith = { + NOT = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + desc = ach_coronation.0023.desc.clergy.angry + } + triggered_desc = { + trigger = { + exists = scope:clergy + } + desc = ach_coronation.0023.desc.clergy + } + } + } + + left_portrait = { + character = root + animation = thinking + camera = camera_event_very_left + } + + center_portrait = { + character = scope:foreign_warrior + animation = obsequious_bow + camera = camera_event_center_pointing_left + } + + right_portrait = { + trigger = { exists = scope:clergy } + triggered_animation = { + trigger = { + scope:clergy.faith = { + NOT = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + animation = disapproval + } + animation = interested + character = scope:clergy + } + + cooldown = { years = 1 } + + theme = coronation_activity + + override_background = { + reference = throne_room + } + + trigger = { + has_activity_intent = coronation_embrace_supporters + any_independent_ruler = { ach_coronation_0023_foreign_holder_trigger = yes } + involved_activity = { + any_attending_character = { + ach_coronation_0023_eligible_clergy_trigger = yes + is_vassal_or_below_of = root + OR = { + is_clergy = yes + has_trait = devoted + is_theocratic_lessee = yes + government_has_flag = government_is_theocracy + } + } + } + } + + # Exotic warriors won't be attracted by lords who aren't some level of famous + weight_multiplier = { + base = 0 + # Court Grandeur attracts adventurers + modifier = { + has_royal_court = yes + court_grandeur_current_level > 2 + add = { + value = court_grandeur_current_level + divide = 4 + } + } + modifier = { + prestige_level > 2 + add = { + value = prestige_level + divide = 2 + } + } + } + + immediate = { + # Get a foreign court for the warrior to arrive from + random_independent_ruler = { + # Make sure they're from afar + limit = { ach_coronation_0023_foreign_holder_trigger = yes } + weight = { + base = 1 + # Like, really afar + modifier = { + add = 1000 + capital_province = { + squared_distance = { + target = root.capital_province + value >= squared_distance_massive + } + } + } + # More militaristic cultures with cool warrior folks are preferred + modifier = { + add = 500 + culture = { + OR = { + has_cultural_pillar = ethos_stoic + has_cultural_pillar = ethos_bellicose + has_cultural_parameter = wanderers_gain_extra_combat_skills + has_cultural_parameter = high_prowess_ignores_knight_restrictions + has_cultural_parameter = prowess_from_martial_education + has_cultural_parameter = martial_education_more_valued + has_cultural_parameter = strong_traits_more_valued + } + } + } + # Cultures that don't tend to like foreigners are not + modifier = { + add = -500 + culture = { + OR = { + has_cultural_parameter = courtiers_less_likely_to_leave_same_culture_court + has_cultural_parameter = dislikes_marrying_outside_of_culture + } + } + } + } + save_scope_as = foreign_ruler + } + + # Create your new BFF + create_character = { + template = bp1_yearly_2021_martial_person_template + location = root.location + faith = scope:foreign_ruler.faith + culture = scope:foreign_ruler.culture + trait = loyal + save_scope_as = foreign_warrior + } + scope:foreign_warrior = { + hidden_effect = { + # Give them an opinion bump so they don't hate you + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + # And make sure they speak your language + learn_language_of_culture = root.culture + # Add them now so the can_appoint triggers work + add_courtier = scope:foreign_warrior + } + } + + # Grab a clergy person to be angry (or curious) + involved_activity = { + random_attending_character = { + limit = { # Grab the Court Chaplain if they're attending + ach_coronation_0023_eligible_clergy_trigger = yes + has_council_position = councillor_court_chaplain + is_councillor_of = root + } + alternative_limit = { # Any Zealot vassal if not + ach_coronation_0023_eligible_clergy_trigger = yes + is_vassal_of = root + has_vassal_stance = zealot + } + alternative_limit = { # Find any sort of clergy-type as a fallback + ach_coronation_0023_eligible_clergy_trigger = yes + is_vassal_or_below_of = root + OR = { + is_clergy = yes + has_trait = devoted + is_theocratic_lessee = yes + government_has_flag = government_is_theocracy + } + } + save_scope_as = clergy + } + } + + ordered_court_position_holder = { + type = bodyguard_court_position + order_by = { # Get the worst bodyguard you have + value = 0 + subtract = "aptitude(bodyguard_court_position)" + } + save_scope_as = worst_bodyguard + } + } + + option = { # Make them your bodyguard + name = ach_coronation.0023.a + + trigger = { + can_employ_court_position_type = bodyguard_court_position + any_court_position_holder = { + type = bodyguard_court_position + has_court_position = bodyguard_court_position + count < 2 + } + } + + court_position_grant_effect = { POS = bodyguard CANDIDATE = scope:foreign_warrior EMPLOYER = root } + + scope:foreign_warrior = { + add_opinion = { + modifier = hired_me_opinion + target = root + opinion = 30 + } + hidden_effect = { + add_prestige = medium_prestige_gain + } + } + + ach_coronation_0023_generic_acceptance_effect = yes + + ai_chance = { + base = 100 + opinion_modifier = { + trigger = { exists = scope:worst_bodyguard } + who = scope:worst_bodyguard + opinion_target = root + multiplier = -1 + } + # Faith modifiers + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + NOT = { has_trait = cynical } + add = -50 + } + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + has_trait = zealous + factor = 0 + } + # If you have a Champion slot then make them that instead of replacing + modifier = { + employs_court_position = bodyguard_court_position + NOT = { employs_court_position = champion_court_position } + factor = 0 + } + } + } + + option = { # Make them your Champion + name = ach_coronation.0023.b + + trigger = { + can_employ_court_position_type = champion_court_position + NOT = { employs_court_position = champion_court_position } + } + + if = { + limit = { + can_employ_court_position_type = champion_court_position + NOT = { employs_court_position = champion_court_position } + } + court_position_grant_effect = { POS = champion CANDIDATE = scope:foreign_warrior EMPLOYER = root } + } + + scope:foreign_warrior = { # Grant the position + add_opinion = { + modifier = hired_me_opinion + target = root + opinion = 30 + } + hidden_effect = { + add_prestige = medium_prestige_gain + } + } + + ach_coronation_0023_generic_acceptance_effect = yes + + ai_chance = { + base = 100 + opinion_modifier = { + trigger = { + employs_court_position = champion_court_position + } + who = court_position:champion_court_position + opinion_target = root + multiplier = -1 + } + # Faith modifiers + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + NOT = { has_trait = cynical } + add = -50 + } + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + has_trait = zealous + factor = 0 + } + } + } + + option = { # Courtier fallback + name = ach_coronation.0023.c + + trigger = { + NOR = { + can_employ_court_position_type = bodyguard_court_position + can_employ_court_position_type = champion_court_position + } + } + + ach_coronation_0023_generic_acceptance_effect = yes + + add_courtier = scope:foreign_warrior + + ai_chance = { + base = 100 + # Faith modifiers + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + NOT = { has_trait = cynical } + add = -50 + } + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + has_trait = zealous + factor = 0 + } + } + } + + option = { # Reject them + name = ach_coronation.0023.d + + if = { + limit = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + } + every_vassal = { + limit = { + faith = root.faith + has_vassal_stance = zealot + } + custom = every_zealot_vassal + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + if = { + limit = { + exists = scope:clergy + } + reverse_add_opinion = { + target = scope:clergy + modifier = grateful_opinion + opinion = 20 + } + } + } + + hidden_effect = { + scope:foreign_warrior = { silent_disappearance_effect = yes } + } + + ai_chance = { + base = 100 + } + } +} + +###################### +# Open up drinks to the locals +# by Jay Zaborowski +# 0025 +ach_coronation.0025 = { + type = activity_event + title = ach_coronation.0025.t + desc = { + desc = ach_coronation.0025.desc + first_valid = { + triggered_desc = { + trigger = { root = scope:host } + desc = ach_coronation.0025.desc.host + } + desc = ach_coronation.0025.desc.guest + } + } + + left_portrait = { + character = root + animation = thinking + } + + center_portrait = { + trigger = { + root != scope:host + } + character = scope:host + animation = scepter + } + + right_portrait = { + trigger = { + scope:baron != scope:host + root != scope:baron + } + character = scope:baron + animation = thinking + } + + theme = feast_activity + + cooldown = { years = 1 } + + override_background = { + reference = garden + } + + trigger = { + OR = { + has_activity_intent = coronation_offer_support + has_activity_intent = coronation_impress_attendees + } + involved_activity = { + activity_location = { + # Has a settlement + has_holding = yes + # Has locals + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + # The barony has willing drinkers + barony.holder = { + faith_forbids_alcohol_trigger = no + faith = prev.county.faith + trigger_if = { + limit = { is_ai = no } + this = root + } + } + } + # And a willing host + activity_host = { faith_forbids_alcohol_trigger = no } + } + # And a willing you + faith_forbids_alcohol_trigger = no + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + activity_location = { + save_scope_as = feast_location + barony.holder = { save_scope_as = baron } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + add = 2 + } + modifier = { + involved_activity.activity_host = { + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + } + add = 2 + } + } + + option = { # You'll pay for it + name = ach_coronation.0025.a + trigger = { + short_term_gold >= medium_gold_value + } + show_as_unavailable = { always = yes } + + remove_short_term_gold = medium_gold_value + + involved_activity.activity_location = { + add_province_modifier = { modifier = ach_drunk_province_1_modifier years = 1 } + } + + if = { + limit = { + this != scope:host + } + reverse_add_opinion = { + target = scope:host + modifier = grateful_opinion + opinion = 20 + } + } + + scope:host = { + every_vassal = { + limit = { + has_vassal_stance = courtly + NOT = { + this = root + } + } + custom = every_courtly_vassal + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + } + + custom_tooltip = coronation_tt_positive_medium + involved_activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + + stress_impact = { + base = medium_stress_impact_loss + temperate = medium_stress_impact_gain # Doesn't partake + } + + ai_chance = { + base = 100 + modifier = { + has_trait = temperate + factor = 0.5 + } + } + } + + option = { # Drunkard / Reveler: We should *both* pay for it! + name = ach_coronation.0025.b + flavor = ach_coronation.0025.b.flavor + trigger = { + custom_tooltip = { + text = ach_coronation.0025.b.tt + short_term_gold >= minor_gold_value + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + scope:baron != root # Only available if there's a local baron to go splitsies + scope:baron != scope:host # And if they're not the Host + } + } + show_as_unavailable = { + scope:baron != root + scope:baron != scope:host + } + trait = drunkard + trait = lifestyle_reveler + + duel = { + skill = diplomacy + target = scope:baron + 40 = { # The Baron agrees to pay + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ach_coronation.0025.b.tt.success + + involved_activity.activity_location = { + add_province_modifier = { modifier = ach_drunk_province_2_modifier years = 1 } + } + + scope:baron = { + remove_short_term_gold = root.minor_gold_value + hidden_effect = { add_prestige = medium_prestige_gain } + } + remove_short_term_gold = minor_gold_value + + if = { + limit = { this != scope:host } + scope:host = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + add_opinion = { + target = scope:baron + modifier = grateful_opinion + opinion = 10 + } + hidden_effect = { + add_prestige = medium_prestige_gain + } + } + } + + send_interface_toast = { + title = ach_coronation.0025.b.tt.success + left_icon = scope:baron + + if = { + limit = { + has_trait = lifestyle_reveler + } + add_trait_xp = { + trait = lifestyle_reveler + value = { + integer_range = { + min = small_lifestyle_random_xp_low + max = small_lifestyle_random_xp_high + } + } + } + } + + add_prestige = medium_prestige_gain + if = { + limit = { + OR = { + root = { is_ai = no } + } + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + } + scope:host = { + custom_tooltip = coronation_tt_positive_medium + involved_activity = { activity_special_type_progression_medium = yes } + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + } + + stress_impact = { + base = medium_stress_impact_loss + temperate = medium_stress_impact_gain # Doesn't partake + } + } + + create_character_memory = { + type = got_the_city_drunk_memory + participants = { + coronation_host = scope:host + baron = scope:baron + } + } + # Used in loc + scope:new_memory = { + save_scope_as = drunk_city_memory + } + scope:drunk_city_memory = { + #set_variable = { + #name = drunk_city_location + #value = scope:feast_location + #} + set_variable = { + name = drunk_city_location + value = scope:feast_location + } + if = { #startup error suppression + limit = { has_variable = drunk_city_location } + } + } + } + 60 = { # The Baron refuses your *extremely* awesome idea + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ach_coronation.0025.b.tt.failure + send_interface_toast = { + title = ach_coronation.0025.b.tt.failure + left_icon = scope:baron + + scope:baron = { # Very lame of them + add_prestige = minor_prestige_loss + } + hidden_effect = { + add_opinion = { + target = scope:baron + modifier = disappointed_opinion + opinion = -10 + } + } + + stress_impact = { # Disappointment + drunkard = minor_stress_impact_gain + lifestyle_reveler = minor_stress_impact_gain + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + has_trait = drunkard + add = 50 + } + modifier = { + has_trait = lifestyle_reveler + add = 50 + } + } + } + + option = { # Just focus on having fun + name = ach_coronation.0025.c + name = { + trigger = { + has_trait = temperate + } + text = ach_coronation.0025.c.temperate + } + flavor = ach_coronation.0025.c.flavor + + # Stress loss + stress_impact = { + base = minor_stress_impact_loss + drunkard = minor_stress_impact_gain + lifestyle_reveler = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = temperate + factor = 2 + } + } + } +} + +###################### +# Host: Struggle to hide a cold so that your tribal vassals don't take it as an omen +# by Jay Zaborowski +# 0026 +ach_coronation.0026 = { + type = activity_event + title = ach_coronation.0026.t + desc = ach_coronation.0026.desc + + left_portrait = { + character = scope:second + animation = dancing + camera = camera_event_very_left_fov35 + } + + center_portrait = { + character = root + animation = stress + camera = camera_event_center_very_large + } + + right_portrait = { + character = scope:vassal + animation = toast_goblet + camera = camera_event_very_right_fov35 + } + + theme = feast_activity + + cooldown = { years = 1 } + + trigger = { + can_contract_disease_trigger = { DISEASE = ill } + government_has_flag = government_is_tribal + involved_activity = { + any_attending_character = { + government_has_flag = government_is_tribal + coronation_hostile_to_host_trigger = no + can_add_hook = { + target = root + type = favor_hook + } + } + } + } + + immediate = { + involved_activity = { + random_attending_character = { + limit = { + government_has_flag = government_is_tribal + coronation_hostile_to_host_trigger = no + can_add_hook = { + target = root + type = favor_hook + } + } + weight = { + base = 1 + # Prefer vassals + modifier = { + add = { + value = 5 + if = { + limit = { is_powerful_vassal_of = root } + add = 10 + } + } + is_vassal_of = root + } + # Prefer interesting characters + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + # Try and get someone who'd be willing to help you out + opinion_modifier = { + opinion_target = root + multiplier = 0.25 + } + } + save_scope_as = vassal + } + random_attending_character = { + limit = { + NOR = { + this = root + this = scope:vassal + } + } + save_scope_as = second + } + } + } + + option = { # Hold it in hold it in hold it in + name = ach_coronation.0026.a + + custom_tooltip = ach_coronation.0026.a.tt + + random_list = { + 40 = { # Your vassals notice you're sick + desc = ach_coronation.0026.a.tt.sick.failure + send_interface_toast = { + title = ach_coronation.0026.a.tt.sick.failure + left_icon = root + + add_prestige = minor_prestige_loss + + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + + custom_tooltip = coronation_tt_negative + involved_activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + } + 40 = { # Nobody notices + desc = ach_coronation.0026.a.tt.sick.success + send_interface_toast = { + title = ach_coronation.0026.a.tt.sick.success + left_icon = root + + reverse_add_opinion = { + target = scope:vassal + modifier = feast_had_good_time_together_opinion + opinion = 15 + } + + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + } + 20 = { # The feeling's pass + desc = ach_coronation.0026.a.tt.critical_success + send_interface_toast = { + title = ach_coronation.0026.a.tt.critical_success + + reverse_add_opinion = { + target = scope:vassal + modifier = feast_had_good_time_together_opinion + opinion = 15 + } + + stress_impact = { + base = minor_stress_loss + } + } + } + } + } + + option = { # Vassal, help me! + name = ach_coronation.0026.b + + custom_tooltip = ach_coronation.0026.b.tt + + random = { + chance = 50 + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + + hidden_effect = { + add_opinion = { + target = scope:vassal + modifier = grateful_opinion + opinion = 15 + } + } + scope:vassal = { + add_hook = { + target = root + type = favor_hook + } + } + + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + factor = 0.5 + } + modifier = { + has_trait = shy + factor = 0.5 + } + } + } + + option = { # Bail on the feast + name = ach_coronation.0026.c + + flavor = ach_coronation.0026.c.flavor + + random = { + chance = 25 + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + + every_vassal = { + limit = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + custom = custom.every_tribal_nomadic_vassal + add_opinion = { + target = root + modifier = opinion_acting_strange + opinion = -10 + } + } + + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + factor = 0.5 + } + modifier = { + has_trait = stubborn + factor = 0.5 + } + } + } +} + +###################### +# An attendee brings some hashish +# by Jay Zaborowski +# 0027 +scripted_trigger can_be_hashishiyah_ignoring_region_trigger = { + # You meet all the Hashishiyah triggers besides geographic_region + is_adult = yes + NOR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = temperate + } + NAND = { + faith = { trait_is_sin = hashishiyah } + has_trait = zealous + } +} + +scripted_trigger eligible_to_join_stoner_trigger = { + is_available_in_activity_trigger = yes + OR = { + has_trait = hashishiyah + can_be_hashishiyah_ignoring_region_trigger = yes + } +} + +ach_coronation.0027 = { + type = activity_event + title = ach_coronation.0027.t + desc = { + desc = ach_coronation.0027.desc + first_valid = { + triggered_desc = { + trigger = { + scope:stoner = { + OR = { + has_trait = faith_warrior + has_trait = crusader_king + } + } + } + desc = ach_coronation.0027.desc.char.crusader + } + triggered_desc = { + trigger = { + scope:stoner = { + has_trait = varangian + exists = title:e_byzantium.holder + } + } + desc = ach_coronation.0027.desc.char.varangian + } + desc = ach_coronation.0027.desc.char.other + } + } + + left_portrait = { + character = root + animation = interested + } + + center_portrait = { + character = scope:partaker + animation = interested_left + } + + right_portrait = { + character = scope:stoner + animation = wedding_drunk + } + + cooldown = { years = 1 } + + theme = feast_activity + + trigger = { + OR = { # If you can't normally be a Hashishiyah, look for some exceptions + can_be_hashishiyah = yes + AND = { # If a European Christian, the crusades are going on + location = { geographical_region = world_europe } + religion = { + this = religion:christianity_religion + exists = var:variable_ghw_unlocked + } + } + AND = { # If in Scandinavia, you have access to Varangians and they still exist + location = { geographical_region = world_europe_north } + title:e_byzantium ?= { has_variable = founded_varangian_guard } + OR = { + culture = { has_cultural_pillar = heritage_north_germanic } + dynasty ?= { has_dynasty_perk = fp1_adventure_legacy_1 } + } + } + } + involved_activity = { + any_attending_character = { + eligible_to_join_stoner_trigger = yes + this != root + count > 1 # In case the Stoner also meets the trigger + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + can_be_hashishiyah_ignoring_region_trigger = yes + has_trait = hashishiyah + } + } + modifier = { + factor = 2 + involved_activity = { + any_attending_character = { + has_trait = hashishiyah + } + } + } + modifier = { + factor = 3 + faith = { + has_variable = variable_ghw_cooldown # There was a recent crusade + religion = { this = religion:christianity_religion } + } + } + } + + immediate = { + play_music_cue = "middleeasterncourt_cue" + involved_activity = { + random_attending_character = { + limit = { + this != root + this != prev.activity_host + is_ai = yes + is_available_in_activity_trigger = yes + has_trait = hashishiyah + } + alternative_limit = { + this != root + this != prev.activity_host + is_ai = yes + is_available_in_activity_trigger = yes + can_be_hashishiyah_ignoring_region_trigger = yes + OR = { + can_be_hashishiyah = yes + can_be_hashishiyah_ignoring_region_trigger = yes + } + OR = { + has_trait = faith_warrior + has_trait = crusader_king + has_trait = varangian + } + } + save_scope_as = stoner + } + + root = { + if = { # If the stoner does not exist, generate a... + limit = { NOT = { exists = scope:stoner } } + if = { # Varangian (if you're Scandinavian) + limit = { + location = { geographical_region = world_europe_north } + title:e_byzantium ?= { has_variable = founded_varangian_guard } + OR = { + culture = { has_cultural_pillar = heritage_north_germanic } + dynasty = { has_dynasty_perk = fp1_adventure_legacy_1 } + } + } + create_character = { + save_scope_as = stoner + culture = root.culture + faith = root.faith + location = root.location + template = varangian_template + trait = hashishiyah + } + title:e_byzantium.holder.culture = { save_scope_as = emperor_culture } + } + else_if = { # Crusader (if you're Christian) + limit = { + location = { geographical_region = world_europe } + faith = { has_variable = variable_ghw_cooldown } + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + create_character = { + save_scope_as = stoner + culture = root.culture + faith = root.faith + location = root.location + template = knight + trait = hashishiyah + trait = faith_warrior + } + } + else = { # Some Reveler type of person + create_character = { + save_scope_as = stoner + culture = root.culture + faith = root.faith + location = root.location + template = diplomacy_court_position_holder_template + trait = hashishiyah + trait = lifestyle_traveler + } + } + scope:stoner = { + add_to_activity = root.involved_activity + } + add_character_flag = created_character_ach_coronation_0027 + } + } + + random_attending_character = { + limit = { + eligible_to_join_stoner_trigger = yes + has_trait = hashishiyah + this != scope:stoner + this != root + } + alternative_limit = { + eligible_to_join_stoner_trigger = yes + this != scope:stoner + this != root + } + save_scope_as = partaker + } + } + } + + option = { # If Hashish is not available, purchase a supply + name = ach_coronation.0027.a + trigger = { + NOT = { has_trait = hashishiyah } # You aren't already a Hashishiyah + can_be_hashishiyah = no # You can't be a Hashishiyah + can_be_hashishiyah_ignoring_region_trigger = yes # But only because of your region + } + + reverse_add_opinion = { + target = scope:stoner + modifier = purchased_hashish_opinion + opinion = 20 + } + + pay_short_term_gold = { + target = scope:stoner + gold = medium_gold_value + } + + add_character_modifier = { + modifier = ach_secret_stash_modifier + years = 4 + } + + random = { + chance = 20 + add_trait = hashishiyah + } + + if = { + limit = { + faith = { trait_is_sin = hashishiyah } + } + add_piety = major_piety_loss + stress_impact = { + zealous = major_stress_impact_gain + cynical = minor_stress_impact_loss + } + } + else_if = { + limit = { + faith = { trait_is_virtue = hashishiyah } + } + add_piety = minor_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + zealous = minor_stress_impact_loss + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + temperate = medium_stress_impact_gain + } + + ai_chance = { + modifier = { + OR = { + has_trait = lifestyle_reveler + has_trait = gluttonous + has_trait = gregarious + } + factor = 2 + } + base = 100 + modifier = { + OR = { + has_trait = greedy + has_trait = avaricious + } + factor = 0.5 + } + modifier = { + has_trait = temperate + factor = 0 + } + } + } + + option = { # Join in + name = ach_coronation.0027.b + name = { + trigger = { has_trait = hashishiyah } + text = ach_coronation.0027.b.hashishiyah + } + trait = hashishiyah + + reverse_add_opinion = { + target = scope:stoner + modifier = camp_party_reveled_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:partaker + modifier = camp_party_reveled_opinion + opinion = 10 + } + + if = { + limit = { + has_trait = lifestyle_reveler + } + add_trait_xp = { + trait = lifestyle_reveler + value = 5 + } + } + + if = { # You already love hashish - let's be smoke buddies! + limit = { has_trait = hashishiyah } + if = { + limit = { + reverse_opinion = { + target = scope:stoner + value > 0 + } + OR = { + scope:stoner = { is_ai = yes } + AND = { + scope:stoner = { is_ai = no } + is_ai = no + } + } + } + set_relation_friend = { + target = scope:stoner + reason = friend_got_high_together + } + } + else = { + reverse_add_opinion = { + target = scope:stoner + modifier = pleased_opinion + opinion = 30 + } + } + } + else_if = { # Else, if Hashish is available, chance to become a Hashiyah + limit = { + can_be_hashishiyah = yes # You can be a Hahishiyah + } + random = { + chance = 20 + add_trait = hashishiyah + } + } + + add_character_modifier = { + modifier = stress_hashish_stupor + years = 1 + } + + if = { + limit = { + faith = { trait_is_sin = hashishiyah } + } + add_piety = minor_piety_loss + stress_impact = { + zealous = medium_stress_impact_gain + cynical = minor_stress_impact_loss + } + } + else_if = { + limit = { + faith = { trait_is_virtue = hashishiyah } + } + add_piety = minor_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + zealous = minor_stress_impact_loss + } + } + + stress_impact = { + base = medium_stress_impact_loss + temperate = medium_stress_impact_gain + shy = minor_stress_impact_gain + hashishiyah = minor_stress_impact_loss # Bonus stress loss if you're already a fan + } + + ai_chance = { + base = 100 + modifier = { + NOT = { has_trait = cynical } + faith = { trait_is_virtue = hashishiyah } + factor = 2 + } + modifier = { + OR = { + has_trait = lifestyle_reveler + has_trait = gluttonous + has_trait = gregarious + } + factor = 2 + } + modifier = { + has_trait = shy + factor = 0.5 + } + } + } + + option = { # Host: Get this person out of here - drugs are bad!!! + name = ach_coronation.0027.c + + trigger = { + this = involved_activity.activity_host + } + + add_prestige = medium_prestige_gain + + reverse_add_opinion = { + target = scope:stoner + modifier = angry_opinion + opinion = -25 + } + reverse_add_opinion = { + target = scope:partaker + modifier = disappointed_opinion + opinion = -10 + } + + scope:stoner = { remove_from_activity = involved_activity } + + if = { + limit = { + faith = { trait_is_sin = hashishiyah } + } + add_piety = medium_piety_gain + stress_impact = { + cynical = minor_stress_impact_gain + zealous = medium_stress_impact_loss + } + } + else_if = { + limit = { + faith = { trait_is_virtue = hashishiyah } + } + add_piety = medium_piety_loss + stress_impact = { + zealous = minor_stress_impact_gain + cynical = medium_stress_impact_loss + } + } + + stress_impact = { + gregarious = minor_stress_impact_gain + lifestyle_reveler = minor_stress_impact_gain + hashishiyah = major_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + has_trait = zealous + faith = { trait_is_sin = hashishiyah } + factor = 4 + } + modifier = { + has_trait = cynical + faith = { trait_is_virtue = hashishiyah } + factor = 4 + } + } + } + + option = { # I'm good + name = ach_coronation.0027.d + flavor = { + triggered_desc = { + trigger = { this = involved_activity.activity_host } + desc = ach_coronation.0027.d.host + } + } + + if = { + limit = { this = involved_activity.activity_host } + custom_tooltip = coronation_tt_positive_tiny + involved_activity = { activity_special_type_progression_miniscule = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_miniscule + CHAR = root + } + } + else = { + add_prestige = minor_prestige_gain + } + + if = { + limit = { + faith = { trait_is_sin = hashishiyah } + } + add_piety = minor_piety_gain + } + else_if = { + limit = { + faith = { trait_is_virtue = hashishiyah } + } + add_piety = minor_piety_loss + } + + stress_impact = { + lifestyle_reveler = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + temperate = minor_stress_impact_loss + hashishiyah = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = temperate + NOT = { has_trait = hashishiyah } + factor = 2 + } + modifier = { + OR = { + has_trait = lifestyle_reveler + has_trait = gluttonous + } + factor = 0.5 + } + modifier = { + has_trait = hashishiyah + factor = 0.25 + } + } + } + + after = { + if = { + limit = { + has_character_flag = created_character_ach_coronation_0027 + scope:stoner = { NOT = { has_relation_friend = root } } + } + hidden_effect = { + scope:stoner = { silent_disappearance_effect = yes } + } + } + } +} + + +###################### +# Host: Drinking contest with a detractor +# by Jay Zaborowski +# 0028 +scripted_effect ach_coronation_0028_success_effect = { + add_prestige = minor_prestige_gain + + custom_tooltip = coronation_tt_positive_medium + involved_activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + + if = { + limit = { has_activity_intent = coronation_impress_attendees } + every_vassal = { + limit = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + + custom = custom.every_tribal_nomadic_vassal + + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + else_if = { + limit = { has_activity_intent = coronation_weaken_detractors } + every_vassal = { + limit = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + + custom = custom.every_tribal_nomadic_vassal + + add_opinion = { + target = scope:drinker + modifier = failure_opinion + opinion = -15 + } + } + } + + create_character_memory = { + type = defeated_detractor_in_drinking_contest_memory + participants = { + detractor = scope:drinker + } + } +} + +ach_coronation.0028 = { + type = activity_event + title = ach_coronation.0028.t + desc = ach_coronation.0028.desc + + left_portrait = { + character = root + animation = disapproval + camera = camera_event_left_pointing_back_fov20 + } + + center_portrait = { + character = scope:drinker + animation = rage + camera = camera_event_center_pointing_forward_fov35 + } + + right_portrait = { + character = scope:onlooker + animation = interested + camera = camera_event_very_right_forward_fov30 + } + + theme = feast_activity + + cooldown = { years = 1 } + + trigger = { + OR = { + has_activity_intent = coronation_impress_attendees + has_activity_intent = coronation_weaken_detractors + } + government_has_flag = government_is_tribal + faith_forbids_alcohol_trigger = no + involved_activity = { + any_guest_subset = { + name = detractor + is_available_in_activity_trigger = yes + faith_forbids_alcohol_trigger = no + } + } + } + + immediate = { + # Grab the highest prowess Detractor + involved_activity = { + random_guest_subset = { + name = detractor + limit = { + is_available_in_activity_trigger = yes + faith_forbids_alcohol_trigger = no + } + weight = { + base = 1 + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + + modifier = { + add = { + value = prowess + multiply = 5 + } + } + modifier = { + has_trait = temperate + factor = 0.5 + } + modifier = { + has_trait = drunkard + factor = 1.5 + } + } + save_scope_as = drinker + } + random_attending_character = { + limit = { + this != root + this != scope:drinker + is_available_in_activity_trigger = yes + faith_forbids_alcohol_trigger = no + } + save_scope_as = onlooker + } + } + } + + option = { # I'll outdrink them all! + name = ach_coronation.0028.a + skill = prowess + + duel = { + skills = { prowess } + target = scope:drinker + 50 = { # Drink them under the table + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + add = 10 + has_trait = drunkard + } + modifier = { + factor = 1.5 + health > scope:drinker.health + } + modifier = { # Chonky people can take their alcohol better + factor = 1.5 + current_weight > scope:drinker.current_weight + } + + desc = ach_coronation.0028.a.win + + scope:drinker = { + if = { + limit = { has_activity_intent = coronation_weaken_detractors } + add_prestige = major_prestige_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + + send_interface_toast = { + title = ach_coronation.0028.a.win + type = event_toast_effect_good + left_icon = root + right_icon = scope:drinker + + ach_coronation_0028_success_effect = yes + } + } + 50 = { # You fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + modifier = { + add = 10 + scope:drinker = { has_trait = drunkard } + } + modifier = { + factor = 1.5 + health < scope:drinker.health + } + modifier = { + factor = 1.5 + current_weight < scope:drinker.current_weight + } + + desc = ach_coronation.0028.a.lose + + scope:drinker = { add_prestige = minor_prestige_gain } + + send_interface_toast = { + title = ach_coronation.0028.a.lose + type = event_toast_effect_good + left_icon = root + right_icon = scope:drinker + + add_prestige = medium_prestige_loss + + every_vassal = { + limit = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + custom = custom.every_tribal_nomadic_vassal + add_opinion = { + target = root + modifier = unimpressed_opinion + opinion = -10 + } + } + } + } + } + + random = { + chance = 5 + add_trait = drunkard + } + + stress_impact = { + drunkard = medium_stress_impact_loss + lifestyle_reveler = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + temperate = minor_stress_impact_gain + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + factor = 1.5 + OR = { + has_trait = gregarious + has_trait = drunkard + has_trait = gluttonous + } + } + modifier = { + factor = 0.5 + has_trait = temperate + } + } + } + + option = { # Maybe if I slipped something into HerHis drink... + name = ach_coronation.0028.b + skill = intrigue + + duel = { + skill = intrigue + value = 12 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ach_coronation.0028.b.win + + scope:drinker = { + if = { + limit = { has_activity_intent = coronation_weaken_detractors } + add_prestige = major_prestige_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + + send_interface_toast = { + title = ach_coronation.0028.b.win + type = event_toast_effect_good + left_icon = root + right_icon = scope:drinker + + ach_coronation_0028_success_effect = yes + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + scope:drinker = { + add_opinion = { + target = root + modifier = tried_to_poison_me_opinion + opinion = -40 + } + if = { + limit = { + OR = { + is_ai = yes + AND = { + root = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_rival_effect = { + REASON = rival_tried_to_poison + CHARACTER = root + OPINION = 0 + } + } + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:drinker } + + desc = ach_coronation.0028.b.lose + + send_interface_toast = { + title = ach_coronation.0028.b.lose + type = event_toast_effect_good + left_icon = root + right_icon = scope:drinker + + custom_tooltip = coronation_tt_negative + involved_activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + every_vassal = { + limit = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + custom = custom.every_tribal_nomadic_vassal + add_opinion = { + target = root + modifier = dishonorable_liege_opinion + opinion = -20 + } + } + } + create_character_memory = { + type = was_caught_cheating_in_drinking_contest_memory + participants = { + detractor = scope:drinker + } + } + } + } + + scope:drinker = { + if = { + limit = { + can_contract_disease_trigger = { DISEASE = ill } + } + random = { + chance = { + value = 50 + add = { + value = prowess + multiply = -1 + } + } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + } + } + + stress_impact = { + honest = massive_stress_impact_gain + just = medium_stress_impact_gain + temperate = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + } + + opinion_modifier = { opinion_target = scope:drinker } + + modifier = { + factor = 0 + OR = { + intrigue <= 8 + ai_honor >= low_positive_ai_value + } + } + } + } + + option = { # I'll be fine + name = ach_coronation.0028.c + + scope:drinker = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + + add_legitimacy = minor_legitimacy_loss + + stress_impact = { + temperate = minor_stress_impact_loss + drunkard = medium_stress_impact_gain + lifestyle_reveler = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -1 + } + modifier = { + factor = 2 + has_trait = temperate + } + } + } +} + +###################### +# Host: Guests offer to help get a hunt going +# by Jay Zaborowski +# 0029 +scripted_trigger ach_coronation_0029_friend_trigger = { + this != involved_activity.activity_host + is_available_in_activity_trigger = yes + can_hunt_trigger = yes + is_vegetarian_trigger = no + likes_character_trigger = { CHARACTER = involved_activity.activity_host } +} + +ach_coronation.0029 = { + type = activity_event + title = ach_coronation.0029.t + desc = ach_coronation.0029.desc + + left_portrait = { + character = root + animation = thinking + camera = camera_event_table_left + } + + center_portrait = { + character = scope:second + triggered_animation = { + trigger = { use_goblet_in_tavern_trigger = yes } + animation = drink_goblet + } + triggered_animation = { + trigger = { use_goblet_in_tavern_trigger = no } + animation = drink + } + camera = camera_event_table_center + } + + right_portrait = { + character = scope:first + triggered_animation = { + trigger = { use_goblet_in_tavern_trigger = yes } + animation = toast_goblet + } + triggered_animation = { + trigger = { use_goblet_in_tavern_trigger = no } + animation = toast + } + camera = camera_event_table_right_far + } + + theme = feast_activity + + cooldown = { years = 1 } + + trigger = { + OR = { + has_activity_intent = coronation_impress_attendees + has_activity_intent = coronation_embrace_supporters + has_activity_intent = coronation_exalt_crown + } + has_trait = lifestyle_hunter + is_vegetarian_trigger = no + involved_activity = { + any_attending_character = { + ach_coronation_0029_friend_trigger = yes + count >= 2 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_trait = lifestyle_hunter + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= 50 + } + add = 1 + } + modifier = { + has_trait = lifestyle_hunter + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = 100 + } + add = 1 + } + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + random_attending_character = { + limit = { # Is your buddy and a hunter + ach_coronation_0029_friend_trigger = yes + has_trait = lifestyle_hunter + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + alternative_limit = { # Or one of those, at least + ach_coronation_0029_friend_trigger = yes + OR = { + has_trait = lifestyle_hunter + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + } + alternative_limit = { # Or exists, at least + ach_coronation_0029_friend_trigger = yes + } + weight = { + base = 1 + + modifier = { + has_trait = lifestyle_hunter + add = 4 + } + modifier = { + add = 1 + reverse_opinion = { + target = root + value > 0 + } + } + modifier = { + add = 2 + reverse_opinion = { + target = root + value > 20 + } + } + modifier = { + add = 3 + reverse_opinion = { + target = root + value > 40 + } + } + modifier = { + add = 5 + reverse_opinion = { + target = root + value > 60 + } + } + modifier = { + add = 8 + reverse_opinion = { + target = root + value > 80 + } + } + } + save_scope_as = first + } + random_attending_character = { + limit = { + ach_coronation_0029_friend_trigger = yes + this != scope:first + has_trait = lifestyle_hunter + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + alternative_limit = { + ach_coronation_0029_friend_trigger = yes + this != scope:first + OR = { + has_trait = lifestyle_hunter + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + } + alternative_limit = { + ach_coronation_0029_friend_trigger = yes + this != scope:first + } + weight = { + base = 1 + + modifier = { + has_trait = lifestyle_hunter + add = 4 + } + modifier = { + add = 1 + reverse_opinion = { + target = root + value > 0 + } + } + modifier = { + add = 2 + reverse_opinion = { + target = root + value > 20 + } + } + modifier = { + add = 3 + reverse_opinion = { + target = root + value > 40 + } + } + modifier = { + add = 5 + reverse_opinion = { + target = root + value > 60 + } + } + modifier = { + add = 8 + reverse_opinion = { + target = root + value > 80 + } + } + } + save_scope_as = second + } + } + } + + option = { # Let's get a Hunt ready + name = ach_coronation.0029.a + + reason = activity_intent + + flavor = { + first_valid = { + triggered_desc = { + trigger = { has_activity_intent = coronation_impress_attendees } + desc = ach_coronation.0029.a.flavor.impress_attendees + } + triggered_desc = { + trigger = { has_activity_intent = coronation_embrace_supporters } + desc = ach_coronation.0029.a.flavor.embrace_supporters + } + triggered_desc = { + trigger = { has_activity_intent = coronation_exalt_crown } + desc = ach_coronation.0029.a.flavor.exalt_crown + } + } + } + + switch = { + trigger = has_activity_intent + coronation_impress_attendees = { + custom_tooltip = ach_coronation.0029.a.impressive_hunt + add_character_flag = impressive_hunt + } + coronation_embrace_supporters = { + custom_tooltip = ach_coronation.0029.a.personal_hunt + add_character_flag = personal_hunt + } + coronation_exalt_crown = { + custom_tooltip = ach_coronation.0029.a.glorious_hunt + add_character_flag = glorious_hunt + } + } + } + + option = { # Want to try falconry? + name = ach_coronation.0029.b + trigger = { has_dlc_feature = tours_and_tournaments } + + flavor = ach_coronation.0029.b.flavor + + custom_tooltip = ach_coronation.0029.b.free_falconry + add_character_flag = free_falconry + } + + option = { # Is Temperance not a virtue? + name = { + trigger = { + faith = { trait_is_virtue = temperate } + NOR = { + has_trait = gluttonous + has_trait = cynical + } + } + text = ach_coronation.0029.c.virtuous + } + name = ach_coronation.0029.c + + if = { + limit = { + faith = { trait_is_virtue = temperate } + NOR = { + has_trait = gluttonous + has_trait = cynical + } + } + custom_tooltip = ach_coronation.0029.c.virtuous.tt + + add_piety = medium_piety_gain + + every_vassal = { + limit = { + has_vassal_stance = zealot + } + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + target = root + opinion = 5 + } + } + } + else = { + add_prestige = minor_prestige_gain + } + + ai_chance = { + base = 150 + } + } +} diff --git a/N3OW/events/dlc/bp3/bp3_journey_events.txt b/N3OW/events/dlc/bp3/bp3_journey_events.txt new file mode 100644 index 00000000..cbd89ed1 --- /dev/null +++ b/N3OW/events/dlc/bp3/bp3_journey_events.txt @@ -0,0 +1,6813 @@ +namespace = bp3_journey + +### Setup Events +# Arrival Event +bp3_journey.0005 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.0005.t + desc = bp3_journey.0005.desc + theme = journey_activity + + left_portrait = { + character = scope:scribe_1 + animation = writing + } + + center_portrait = { + character = scope:host + animation = survey_staff + } + + right_portrait = { + character = scope:scribe_2 + animation = happy_teacher + } + + trigger = { + this = scope:host + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_character_flag = generated_scribe + } + } + } + scope:activity = { + random_attending_character = { + limit = { + has_character_flag = generated_scribe + } + save_scope_as = scribe_1 + } + random_attending_character = { + limit = { + has_character_flag = generated_scribe + this != scope:scribe_1 + } + save_scope_as = scribe_2 + } + } + } + } + + option = { + name = bp3_journey.0005.a # Diplomacy + skill = diplomacy + trigger = { + scope:activity.activity_location = { + journey_diplomacy_skill_monument_trigger = yes + } + } + + custom_tooltip = diplomacy_skill_focus_tt + scope:activity = { + set_variable = { + name = diplomacy_skill_focus + value = yes + } + } + } + + option = { + name = bp3_journey.0005.b # Martial + skill = martial + trigger = { + scope:activity.activity_location = { + journey_martial_skill_monument_trigger = yes + } + } + + custom_tooltip = martial_skill_focus_tt + scope:activity = { + set_variable = { + name = martial_skill_focus + value = yes + } + } + } + + option = { + name = bp3_journey.0005.c # Learning + skill = learning + trigger = { + scope:activity.activity_location = { + journey_learning_skill_monument_trigger = yes + } + } + + custom_tooltip = learning_skill_focus_tt + scope:activity = { + set_variable = { + name = learning_skill_focus + value = yes + } + } + } + + option = { + name = bp3_journey.0005.d # Stewardship + skill = stewardship + trigger = { + scope:activity.activity_location = { + journey_stewardship_skill_monument_trigger = yes + } + } + + custom_tooltip = stewardship_skill_focus_tt + scope:activity = { + set_variable = { + name = stewardship_skill_focus + value = yes + } + } + } + + option = { + name = bp3_journey.0005.e # Intrigue + skill = intrigue + trigger = { + scope:activity.activity_location = { + journey_intrigue_skill_monument_trigger = yes + } + } + + custom_tooltip = intrigue_skill_focus_tt + scope:activity = { + set_variable = { + name = intrigue_skill_focus + value = yes + } + } + } +} + +# Ending Event +bp3_journey.0010 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.0010.t + desc = bp3_journey.0010.desc + theme = journey_activity + + left_portrait = { + character = scope:scribe_1 + animation = reading + } + + center_portrait = { + character = scope:host + animation = throne_room_writer + } + + right_portrait = { + character = scope:scribe_2 + animation = page_flipping + } + + trigger = { + this = scope:host + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_character_flag = generated_scribe + } + } + } + scope:activity = { + random_attending_character = { + limit = { + has_character_flag = generated_scribe + } + save_scope_as = scribe_1 + } + random_attending_character = { + limit = { + has_character_flag = generated_scribe + this != scope:scribe_1 + } + save_scope_as = scribe_2 + } + } + } + random = { + chance = scope:activity.var:skill_chance + save_scope_as = extra_skill_gained + } + } + + option = { + name = bp3_journey.0010.a + scope:activity = { + add_activity_log_entry = { + key = journey_skill_gain_final_log + score = 1000 + character = root + tags = { positive } + show_in_conclusion = yes + root = { + if = { + limit = { + scope:activity = { + has_variable = diplomacy_skill_focus + } + NOT = { exists = scope:extra_skill_gained } + } + add_diplomacy_skill = 1 + } + else_if = { + limit = { + scope:activity = { + has_variable = learning_skill_focus + } + NOT = { exists = scope:extra_skill_gained } + } + add_learning_skill = 1 + } + else_if = { + limit = { + scope:activity = { + has_variable = martial_skill_focus + } + NOT = { exists = scope:extra_skill_gained } + } + add_martial_skill = 1 + } + else_if = { + limit = { + scope:activity = { + has_variable = stewardship_skill_focus + } + NOT = { exists = scope:extra_skill_gained } + } + add_stewardship_skill = 1 + } + else_if = { + limit = { + scope:activity = { + has_variable = intrigue_skill_focus + } + NOT = { exists = scope:extra_skill_gained } + } + add_intrigue_skill = 1 + } + + # Knowledge Hoarding outcome + if = { + limit = { + exists = scope:extra_skill_gained + } + custom_tooltip = extra_skill_gained_tt + if = { + limit = { + scope:activity = { has_variable = intrigue_skill_focus } + } + add_intrigue_skill = 2 + } + else_if = { + limit = { + scope:activity = { has_variable = martial_skill_focus } + } + add_martial_skill = 2 + } + else_if = { + limit = { + scope:activity = { has_variable = learning_skill_focus } + } + add_learning_skill = 2 + } + else_if = { + limit = { + scope:activity = { has_variable = stewardship_skill_focus } + } + add_stewardship_skill = 2 + } + else_if = { + limit = { + scope:activity = { has_variable = diplomacy_skill_focus } + } + add_diplomacy_skill = 2 + } + } + else = { + custom_tooltip = no_extra_skill_gained_tt + } + } + } + } + } +} + +# Mid-point Visit Event +bp3_journey.0015 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.0015.t + desc = bp3_journey.0015.desc + theme = journey_activity + + override_background = { + trigger = { + scope:location = { + has_building_with_flag = travel_point_of_interest_economic + NOR = { + has_building = doges_palace_01 + has_building = iron_pillar_of_dhar_01 + has_building = petra_01 + has_building = fairy_chimneys + } + } + } + reference = fp3_cave + } + + left_portrait = { + character = scope:potential_friend + animation = admiration + } + + center_portrait = { + character = scope:host + + triggered_animation = { + trigger = { has_activity_intent = journey_knowledge_hoarding_intent } + animation = happy_teacher + } + + triggered_animation = { + trigger = { has_activity_intent = journey_curiosity_intent } + animation = ecstasy + } + + animation = hero_flex + } + + right_portrait = { + character = scope:potential_lover + animation = love + } + + trigger = { + this = scope:host + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_character_flag = generated_scribe + } + } + } + scope:activity = { + random_attending_character = { + limit = { + has_character_flag = generated_scribe + } + save_scope_as = scribe_1 + } + random_attending_character = { + limit = { + has_character_flag = generated_scribe + this != scope:scribe_1 + } + save_scope_as = scribe_2 + } + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + is_incapable = no + has_relation_potential_friend = root + can_set_relation_friend_trigger = { CHARACTER = root } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + is_incapable = no + has_relation_potential_friend = root + can_set_relation_friend_trigger = { CHARACTER = root } + } + save_scope_as = potential_friend + } + } + } + else_if = { + limit = { + scope:activity.activity_location.county.holder ?= { + is_available_ai_adult = yes + has_relation_potential_friend = root + can_set_relation_friend_trigger = { CHARACTER = root } + NOR = { + this = root + has_relation_friend = root + has_relation_rival = root + } + } + } + scope:activity.activity_location.county.holder ?= { save_scope_as = potential_friend } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + is_incapable = no + has_relation_potential_lover = root + can_set_relation_lover_trigger = { CHARACTER = root } + this != root + trigger_if = { + limit = { + exists = scope:potential_friend + } + this != scope:potential_friend + } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + is_incapable = no + has_relation_potential_lover = root + can_set_relation_lover_trigger = { CHARACTER = root } + this != root + trigger_if = { + limit = { + exists = scope:potential_friend + } + this != scope:potential_friend + } + } + save_scope_as = potential_lover + } + } + } + else_if = { + limit = { + scope:activity.activity_location.county.holder ?= { + is_available_ai_adult = yes + has_relation_potential_lover = root + can_set_relation_lover_trigger = { CHARACTER = root } + NOR = { + this = root + has_relation_rival = root + } + trigger_if = { + limit = { + exists = scope:potential_friend + } + this != scope:potential_friend + } + } + } + scope:activity.activity_location.county.holder ?= { save_scope_as = potential_friend } + } + else_if = { + limit = { + scope:activity = { + any_attending_character = { + is_consort_of = root + NOT = { has_relation_rival = root } + can_set_relation_lover_trigger = { CHARACTER = root } + this != root + trigger_if = { + limit = { + exists = scope:potential_friend + } + this != scope:potential_friend + } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + is_consort_of = root + NOT = { has_relation_rival = root } + can_set_relation_lover_trigger = { CHARACTER = root } + this != root + trigger_if = { + limit = { + exists = scope:potential_friend + } + this != scope:potential_friend + } + } + save_scope_as = potential_lover + } + } + } + create_character_memory = { + type = visited_monument + } + scope:new_memory = { + set_variable = { + name = special_building + value = scope:activity.activity_location + } + if = { + limit = { has_variable = special_building } + } + } + } + + option = { + name = bp3_journey.0015.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + add_prestige = miniscule_prestige_gain + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_journey.0015.journey_curiosity_intent + trigger = { + has_activity_intent = journey_curiosity_intent + } + add_prestige = miniscule_prestige_gain + if = { + limit = { + culture != root.location.culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + else_if = { + limit = { + exists = capital_county + } + capital_county ?= { + change_development_progress_with_overflow = 10 + } + } + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_journey.0015.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + add_prestige = miniscule_prestige_gain + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_journey.0015.friend + trigger = { + exists = scope:potential_friend + } + + set_relation_friend = { + target = scope:potential_friend + reason = friend_bonded_by_monument + province = root.location + } + + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_journey.0015.lover + trigger = { + exists = scope:potential_lover + } + + set_relation_lover = { + target = scope:potential_lover + reason = lover_kissed_by_monument + province = root.location + } + + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_journey.0015.prestige + + add_prestige = minor_prestige_gain + + + ai_chance = { + base = 1 + } + } +} + +# Miniature Monument +bp3_journey.1000 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1000.t + desc = bp3_journey.1000.desc + theme = journey_activity + override_background = { reference = market } + + left_portrait = { + character = scope:host + animation = betting + } + + right_portrait = { + character = scope:local_character + animation = chifonie_idle + } + + artifact = { + target = scope:new_trinket + position = lower_center_portrait + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = antiquarian_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + antiquarian_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = antiquarian_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + antiquarian_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + } + else = { + create_character = { + template = antiquarian_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + + scope:local_character = { + hidden_effect_new_object = { + if = { + limit = { + scope:activity = { has_variable = diplomacy_skill_focus } + } + create_artifact = { + name = miniature_monument + description = miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_diplomacy_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + else_if = { + limit = { + scope:activity = { has_variable = martial_skill_focus } + } + create_artifact = { + name = miniature_monument + description = miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_martial_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + else_if = { + limit = { + scope:activity = { has_variable = learning_skill_focus } + } + create_artifact = { + name = miniature_monument + description = miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_learning_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + else_if = { + limit = { + scope:activity = { has_variable = stewardship_skill_focus } + } + create_artifact = { + name = miniature_monument + description = miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_stewardship_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + else = { + create_artifact = { + name = miniature_monument + description = miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_intrigue_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + } + } + if = { + limit = { + any_court_position_holder = { + type = antiquarian_court_position + } + } + random_court_position_holder = { + type = antiquarian_court_position + save_scope_as = current_holder + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_valid_to_hire_court_position_type = antiquarian_court_position + NOT = { employs_court_position = antiquarian_court_position } + } + modifier = { + add = 1 + scope:activity = { + has_variable = stewardship_skill_focus + } + } + } + + option = { + name = bp3_journey.1000.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + + stress_impact = { + base = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1000.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + is_valid_to_hire_court_position_type = antiquarian_court_position + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = antiquarian + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + + } + } + } + + option = { + name = bp3_journey.1000.lechery + trait = lustful + trigger = { + has_trait = lustful + } + + custom_tooltip = suggestive_alterations + + hidden_effect_new_object = { + create_artifact = { + name = suggestive_miniature_monument + description = suggestive_miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_fertility_gain_3_modifier + modifier = artifact_seduce_scheme_phase_duration_add_3_modifier + modifier = artifact_stress_gain_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + + stress_impact = { + chaste = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = chaste + + } + } + } + + option = { + name = bp3_journey.1000.a + pay_short_term_gold = { + target = scope:local_character + gold = minor_gold_value + } + send_interface_toast = { + title = artifact_gained + left_icon = root + right_icon = scope:new_trinket + scope:new_trinket = { + set_owner = root + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= medium_gold_value + has_trait = greedy + } + } + } + } + + option = { + name = bp3_journey.1000.b + + trigger = { + is_valid_to_hire_court_position_type = antiquarian_court_position + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = antiquarian + } + + stress_impact = { + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + + } + } + } + + option = { + name = bp3_journey.1000.c + add_prestige = minor_prestige_gain + + ai_chance = { + base = 100 + } + } + + after = { + hidden_effect = { + if = { + limit = { + scope:new_trinket = { + artifact_owner = scope:local_character + } + } + destroy_artifact = scope:new_trinket + } + } + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# A Name, Eternal +bp3_journey.1100 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1100.t + override_background = { + trigger = { + scope:location = { + has_building_with_flag = travel_point_of_interest_economic + NOR = { + has_building = doges_palace_01 + has_building = iron_pillar_of_dhar_01 + has_building = petra_01 + has_building = fairy_chimneys + } + } + } + reference = fp3_cave + } + desc = { + desc = bp3_journey.1100.desc_intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:ancient_vandal + } + desc = bp3_journey.1100.desc_name + } + desc = bp3_journey.1100.desc_first + } + desc = bp3_journey.1100.desc_outro + } + theme = journey_activity + + center_portrait = { + character = scope:host + animation = chess_certain_win + } + + lower_center_portrait = { + character = scope:ancient_vandal + } + + cooldown = { years = 7 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { + county.holder = { save_scope_as = county_holder } + save_scope_as = location + } + scope:location = { + if = { + limit = { + has_variable_list = grafitti + } + random_in_list = { + variable = grafitti + save_scope_as = ancient_vandal + } + } + } + } + + option = { + name = bp3_journey.1100.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 10 } + + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1100.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + culture != scope:location.culture + } + + add_prestige = minor_prestige_gain + + culture = { + change_cultural_acceptance = { + target = scope:location.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1100.a + scope:location = { + add_to_variable_list = { + name = grafitti + target = root + } + } + + add_prestige = medium_prestige_gain + + if = { + limit = { + scope:county_holder ?= { this != root } + } + reverse_add_opinion = { + target = scope:county_holder + modifier = defaced_monument_opinion + opinion = -20 + } + } + + stress_impact = { + humble = medium_stress_impact_gain + content = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.1100.b + trigger = { + exists = scope:ancient_vandal + } + + custom_tooltip = prestige_trinket + + hidden_effect_new_object = { + create_artifact = { + name = grafitti_rock + description = grafitti_rock.desc + type = miscellaneous + visuals = rock + modifier = artifact_monthly_prestige_mult_1_modifier + save_scope_as = new_trinket + wealth = 30 + quality = 30 + max_durability = 100 + creator = root + } + send_interface_toast = { + title = artifact_gained + left_icon = root + right_icon = scope:new_trinket + show_as_tooltip = { + scope:new_trinket = { + set_owner = root + } + } + } + } + + if = { + limit = { + scope:county_holder ?= { this != root } + } + reverse_add_opinion = { + target = scope:county_holder + modifier = defaced_monument_opinion + opinion = -20 + } + } + scope:location = { + remove_list_variable = { name = grafitti target = scope:ancient_vandal } + } + + stress_impact = { + humble = major_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = craven + } + } + } + } + + option = { + name = bp3_journey.1100.c + + stress_impact = { + paranoid = major_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + } + } +} + +# Shave and a Haircut +bp3_journey.1200 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1200.t + desc = bp3_journey.1200.desc + theme = journey_activity + override_background = { reference = market } + + left_portrait = { + character = scope:host + animation = betting + } + + right_portrait = { + character = scope:local_character + animation = physician + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = court_physician_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_physician_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = court_physician_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_physician_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + } + else = { + create_character = { + template = court_physician_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + if = { + limit = { + any_court_position_holder = { + type = court_physician_court_position + } + } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = current_holder + } + } + + hidden_effect = { + scope:local_character = { + random_list = { + 10 = { give_nickname = nick_the_miracle_worker } + 10 = { give_nickname = nick_the_healer } + 10 = { give_nickname = nick_the_wise } + 10 = { give_nickname = nick_the_meticulous } + } + } + } + if = { # Error suppression + limit = { + has_character_flag = random_haircut + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_valid_to_hire_court_position_type = court_physician_court_position + NOT = { employs_court_position = court_physician_court_position } + } + modifier = { + add = 1 + scope:activity = { + has_variable = diplomacy_skill_focus + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = learning_skill_focus + } + } + } + + option = { + name = bp3_journey.1200.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + + stress_impact = { + base = medium_stress_impact_gain + lazy = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1200.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + is_valid_to_hire_court_position_type = court_physician_court_position + } + custom_tooltip = hair_will_change + add_character_flag = { + flag = random_haircut + months = 6 + } + + add_prestige = medium_prestige_gain + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = court_physician + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1200.a + + custom_tooltip = hair_will_change + + add_character_flag = { + flag = random_haircut + months = 6 + } + + random_list = { + 90 = { + desc = barber_success + send_interface_toast = { + title = barber_success + left_icon = root + right_icon = scope:local_character + add_prestige = major_prestige_gain + } + } + 10 = { + desc = barber_fail + send_interface_toast = { + title = barber_fail + left_icon = root + right_icon = scope:local_character + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + humble = medium_stress_impact_gain + content = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.1200.b + + trigger = { + is_valid_to_hire_court_position_type = court_physician_court_position + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = court_physician + } + + stress_impact = { + humble = major_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = craven + } + } + } + } + + option = { + name = bp3_journey.1200.c + + add_prestige = minor_prestige_gain + + stress_impact = { + paranoid = major_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# The Songs of Place +bp3_journey.1300 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1300.t + desc = bp3_journey.1300.desc + theme = journey_activity + + left_portrait = { + character = scope:local_character + animation = dancing + } + + center_portrait = { + character = scope:host + animation = happiness + } + + right_portrait = { + character = scope:local_character_2 + animation = instrument_active + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + is_valid_to_hire_court_position_type = stooge_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = stooge_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #court_jester_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = stooge_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #court_jester_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = stooge_camp_officer + } + } + random_court_position_holder = { + type = stooge_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = stooge_camp_officer + } + create_character = { + template = stooge_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = stooge_camp_officer + } + } + random_court_position_holder = { + type = stooge_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = court_jester_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_jester_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = court_jester_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_jester_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = court_jester_court_position + } + } + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = court_jester_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = court_jester_court_position + } + } + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = current_holder + } + } + } + if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_bard_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #court_musician_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_bard_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #court_musician_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + save_scope_as = local_character_2 + } + if = { + limit = { + any_court_position_holder = { + type = master_bard_camp_officer + } + } + random_court_position_holder = { + type = master_bard_camp_officer + save_scope_as = current_holder_2 + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + } + create_character = { + template = master_bard_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_2 + } + scope:local_character_2 = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = master_bard_camp_officer + } + } + random_court_position_holder = { + type = master_bard_camp_officer + save_scope_as = current_holder_2 + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = court_musician_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_musician_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = court_musician_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_musician_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + save_scope_as = local_character_2 + } + if = { + limit = { + any_court_position_holder = { + type = court_musician_court_position + } + } + random_court_position_holder = { + type = court_musician_court_position + save_scope_as = current_holder_2 + } + } + } + else = { + create_character = { + template = court_musician_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_2 + } + scope:local_character_2 = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = court_musician_court_position + } + } + random_court_position_holder = { + type = court_musician_court_position + save_scope_as = current_holder_2 + } + } + } + scope:local_character = { add_character_flag = jester_outfit } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + AND = { + is_valid_to_hire_court_position_type = court_jester_court_position + NOT = { employs_court_position = court_jester_court_position } + } + AND = { + is_valid_to_hire_court_position_type = court_musician_court_position + NOT = { employs_court_position = court_musician_court_position } + } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = diplomacy_skill_focus + } + } + } + + option = { + name = bp3_journey.1300.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 10 } + + stress_impact = { + base = minor_stress_impact_gain + lazy = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1300.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + remove_short_term_gold = tiny_gold_value + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + add_prestige = medium_prestige_gain + + stress_impact = { + humble = minor_stress_impact_gain + content = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + gold <= minor_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1300.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = court_jester + LAAMP_POSITION = stooge + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character_2 + COURT_POSITION = court_musician + LAAMP_POSITION = master_bard + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1300.a + + trigger = { + OR = { + is_valid_to_hire_court_position_type = court_jester_court_position + is_valid_to_hire_court_position_type = stooge_camp_officer + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = court_jester + LAAMP_POSITION = stooge + } + + stress_impact = { + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.1300.b + + trigger = { + OR = { + is_valid_to_hire_court_position_type = court_musician_court_position + is_valid_to_hire_court_position_type = master_bard_camp_officer + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character_2 + COURT_POSITION = court_musician + LAAMP_POSITION = master_bard + } + + stress_impact = { + humble = medium_stress_impact_gain + content = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.1300.c + + add_prestige = minor_prestige_gain + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + remove_character_flag = jester_outfit + silent_disappearance_effect = yes + } + } + if = { + limit = { + root = { + is_ai = yes + } + scope:local_character_2 = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character_2 = { + silent_disappearance_effect = yes + } + } + } +} + +# Hawking Meat +bp3_journey.1400 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1400.t + desc = bp3_journey.1400.desc + theme = journey_activity + override_background = { reference = market } + + left_portrait = { + character = scope:host + animation = shock + } + + right_portrait = { + character = scope:local_character + animation = hunting_carcass_start + } + + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_bard_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #master_of_hunt_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_bard_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #master_of_hunt_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = huntperson_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = huntperson_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #master_of_hunt_validity_trigger = { EMPLOYER = root } + } + } + create_character = { + template = huntperson_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_of_hunt_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + master_of_hunt_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_of_hunt_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + master_of_hunt_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + } + else = { + create_character = { + template = master_of_hunt_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + if = { + limit = { + any_court_position_holder = { + type = huntperson_camp_officer + } + } + random_court_position_holder = { + type = huntperson_camp_officer + save_scope_as = current_holder + } + } + if = { + limit = { + any_court_position_holder = { + type = master_of_hunt_court_position + } + } + random_court_position_holder = { + type = master_of_hunt_court_position + save_scope_as = current_holder + } + } + scope:local_character = { + save_scope_as = excellent_animal_artifacts + if = { + limit = { + root = { has_royal_court = yes } + } + create_artifact_animal_hide_effect = { + OWNER = scope:local_character + HUNTER = scope:local_character + LEGENDARY = no + ANIMAL = flag:none + } + } + else = { + create_artifact_animal_trinket_effect = { + OWNER = scope:local_character + HUNTER = scope:local_character + LEGENDARY = no + ANIMAL = flag:none + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + AND = { + is_valid_to_hire_court_position_type = master_of_hunt_court_position + NOT = { employs_court_position = master_of_hunt_court_position } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = martial_skill_focus + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = stewardship_skill_focus + } + } + } + + option = { + name = bp3_journey.1400.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + hunter_progress_point_gain_effect = { CHANGE = 3 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP + + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + + stress_impact = { + base = medium_stress_impact_gain + lazy = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1400.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + is_valid_to_hire_court_position_type = master_of_hunt_court_position + } + + hunter_progress_point_gain_effect = { CHANGE = 3 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = master_of_hunt + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1400.a + + pay_short_term_gold = { + target = scope:local_character + gold = minor_gold_value + } + send_interface_toast = { + title = artifact_gained + left_icon = root + right_icon = scope:newly_created_artifact + scope:newly_created_artifact = { + set_owner = root + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = humble + short_term_gold <= medium_gold_value + } + } + } + } + + option = { + name = bp3_journey.1400.b + + trigger = { + is_valid_to_hire_court_position_type = master_of_hunt_court_position + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = master_of_hunt + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1400.c + + add_prestige = minor_prestige_gain + + ai_chance = { + base = 10 + } + } + + after = { + hidden_effect = { + if = { + limit = { + scope:newly_created_artifact = { + artifact_owner = scope:local_character + } + } + destroy_artifact = scope:newly_created_artifact + } + } + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# Learned Locals +bp3_journey.1500 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1500.t + desc = bp3_journey.1500.desc + theme = journey_activity + + left_portrait = { + character = scope:host + animation = thinking + } + + center_portrait = { + character = scope:local_character + animation = debating + } + + right_portrait = { + character = scope:local_character_2 + animation = happy_teacher + } + + cooldown = { years = 10 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + is_valid_to_hire_court_position_type = chief_forager_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = chief_forager_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #chief_qadi_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = chief_forager_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #chief_qadi_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = chief_forager_camp_officer + } + } + random_court_position_holder = { + type = chief_forager_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = chief_forager_camp_officer + } + create_character = { + template = chief_forager_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = chief_forager_camp_officer + } + } + random_court_position_holder = { + type = chief_forager_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = chief_qadi_court_position + scope:location.religion = religion:islam_religion + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = chief_qadi_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + chief_qadi_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = chief_qadi_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + chief_qadi_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = chief_qadi_court_position + } + } + random_court_position_holder = { + type = chief_qadi_court_position + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = chief_qadi_court_position + scope:location.religion = religion:islam_religion + } + create_character = { + template = chief_qadi_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = chief_qadi_court_position + } + } + random_court_position_holder = { + type = chief_qadi_court_position + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = high_almoner_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + high_almoner_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = high_almoner_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + high_almoner_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = chief_qadi_court_position + } + } + random_court_position_holder = { + type = chief_qadi_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = high_almoner_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = high_almoner_court_position + } + } + random_court_position_holder = { + type = high_almoner_court_position + save_scope_as = current_holder + } + } + } + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = quartermaster_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #seneschal_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = quartermaster_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #seneschal_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + save_scope_as = local_character_2 + } + if = { + limit = { + any_court_position_holder = { + type = quartermaster_camp_officer + } + } + random_court_position_holder = { + type = quartermaster_camp_officer + save_scope_as = current_holder_2 + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = quartermaster_camp_officer + } + create_character = { + template = quartermaster_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_2 + } + scope:local_character_2 = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = quartermaster_camp_officer + } + } + random_court_position_holder = { + type = quartermaster_camp_officer + save_scope_as = current_holder_2 + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = seneschal_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + seneschal_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = seneschal_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + seneschal_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + save_scope_as = local_character_2 + } + if = { + limit = { + any_court_position_holder = { + type = seneschal_court_position + } + } + random_court_position_holder = { + type = seneschal_court_position + save_scope_as = current_holder_2 + } + } + } + else = { + create_character = { + template = seneschal_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_2 + } + scope:local_character_2 = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = seneschal_court_position + } + } + random_court_position_holder = { + type = seneschal_court_position + save_scope_as = current_holder_2 + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + AND = { + is_valid_to_hire_court_position_type = quartermaster_camp_officer + NOT = { employs_court_position = quartermaster_camp_officer } + } + AND = { + is_valid_to_hire_court_position_type = chief_qadi_court_position + NOT = { employs_court_position = chief_qadi_court_position } + } + AND = { + is_valid_to_hire_court_position_type = high_almoner_court_position + NOT = { employs_court_position = high_almoner_court_position } + } + AND = { + is_valid_to_hire_court_position_type = seneschal_court_position + NOT = { employs_court_position = seneschal_court_position } + } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = stewardship_skill_focus + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = learning_skill_focus + } + } + } + + option = { + name = bp3_journey.option.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character + } + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character_2 + } + + stress_impact = { + humble = minor_stress_impact_gain + content = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + gold <= minor_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1500.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + add_prestige = medium_prestige_gain + + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + + stress_impact = { + base = minor_stress_impact_gain + lazy = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1500.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hire_for_two_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = chief_qadi + COURT_POSITION_2 = high_almoner + LAAMP_POSITION = chief_forager + } + + hire_for_court_position_journey_laamp_replacement_effect_2 = { + CHARACTER = scope:local_character_2 + COURT_POSITION = seneschal + LAAMP_POSITION = quartermaster + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1500.curiosity_2 + trigger = { + has_activity_intent = journey_curiosity_intent + } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + pay_short_term_gold = { + target = scope:local_character_2 + gold = tiny_gold_value + } + + add_prestige = medium_prestige_gain + add_piety = medium_piety_gain + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 4 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= medium_gold_value + has_trait = greedy + has_trait = arrogant + has_trait = arbitrary + } + } + } + } + + option = { + name = bp3_journey.1500.a + + trigger = { + OR = { + is_valid_to_hire_court_position_type = chief_forager_camp_officer + is_valid_to_hire_court_position_type = chief_qadi_court_position + is_valid_to_hire_court_position_type = high_almoner_court_position + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_two_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = chief_qadi + COURT_POSITION_2 = high_almoner + LAAMP_POSITION = chief_forager + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1500.b + + trigger = { + OR = { + is_valid_to_hire_court_position_type = seneschal_court_position + is_valid_to_hire_court_position_type = quartermaster_camp_officer + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_laamp_replacement_effect_2 = { + CHARACTER = scope:local_character_2 + COURT_POSITION = seneschal + LAAMP_POSITION = quartermaster + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1500.c + + add_prestige = minor_prestige_gain + add_character_modifier = { + modifier = inspired_by_alms_modifier + years = 10 + } + + ai_chance = { + base = 10 + } + } +} + +# City of Cats +bp3_journey.1600 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1600.t + desc = bp3_journey.1600.desc + theme = journey_activity + + center_portrait = { + character = scope:host + animation = survey + } + + cooldown = { years = 9 } + + trigger = { + NOT = { + any_owned_story = { + type = story_cycle_pet_cat + } + } + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + scope:activity = { + has_variable = intrigue_skill_focus + } + } + } + + option = { + name = bp3_journey.1600.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + duel = { + skill = intrigue + value = 12 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = cat_help + send_interface_toast = { + title = cat_help + left_icon = root + journey_knowledge_hoarding_skill_effect = { VALUE = 25 } + add_prestige = medium_prestige_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = get_lost + send_interface_toast = { + title = get_lost + left_icon = root + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + remove_short_term_gold = minor_gold_value + } + } + } + + stress_impact = { + base = minor_stress_impact_gain + lazy = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1600.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + if = { + limit = { + culture != scope:location.culture + } + culture = { + change_cultural_acceptance = { + target = scope:location.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + remove_short_term_gold = minor_gold_value + add_prestige = minor_prestige_gain + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1600.a + + start_cat_story_cycle_effect = yes + add_character_flag = { + flag = city_cat + days = 5 + } + + stress_impact = { + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { + name = bp3_journey.1600.b + + add_prestige = miniscule_prestige_gain + + stress_impact = { + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + + } + } + } +} + +# Culture Drills +bp3_journey.1700 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1700.t + desc = { + desc = bp3_journey.1700.desc + first_valid = { + triggered_desc = { + trigger = { + culture != scope:location.culture + } + desc = bp3_journey.1700.desc_different_culture + } + desc = bp3_journey.1700.desc_same_culture + } + } + theme = journey_activity + override_background = { reference = courtyard } + + left_portrait = { + character = scope:local_character_3 + animation = throne_room_two_handed_passive_1 + } + + center_portrait = { + character = scope:local_character + animation = inspect_weapon + } + + right_portrait = { + character = scope:local_character_2 + animation = marshal + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + is_valid_to_hire_court_position_type = head_groom_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = head_groom_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #master_of_horse_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = head_groom_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #master_of_horse_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = head_groom_camp_officer + } + } + random_court_position_holder = { + type = head_groom_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = head_groom_camp_officer + } + create_character = { + template = head_groom_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = head_groom_camp_officer + } + } + random_court_position_holder = { + type = head_groom_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_of_horse_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + master_of_horse_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_of_horse_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + master_of_horse_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = master_of_horse_court_position + } + } + random_court_position_holder = { + type = master_of_horse_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = master_of_horse_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = master_of_horse_court_position + } + } + random_court_position_holder = { + type = master_of_horse_court_position + save_scope_as = current_holder + } + } + } + + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + save_scope_as = local_character_2 + } + } + else = { + create_character = { + template = bodyguard_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_2 + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + this != scope:local_character + this != scope:local_character_2 + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + this != scope:local_character + this != scope:local_character_2 + } + save_scope_as = local_character_3 + } + } + else = { + create_character = { + template = bodyguard_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_3 + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + scope:local_character = { add_character_flag = military_outfit } + scope:local_character_2 = { add_character_flag = military_outfit } + scope:local_character_3 = { add_character_flag = military_outfit } + if = { + limit = { + any_maa_regiment = { + maa_max_troops_count <= 2000 + NOT = { + is_unit_type = siege_weapon + } + OR = { + is_maa_type = light_footmen + is_maa_type = bowmen + is_maa_type = light_horsemen + is_maa_type = pikemen_unit + is_maa_type = armored_footmen + is_maa_type = armored_horsemen + is_maa_type = crossbowmen + is_maa_type = house_guard + is_maa_type = steppe_raiders + is_maa_type = horse_archers + is_maa_type = heavy_horse_archers + is_maa_type = nomad_lancers + } + } + } + random_maa_regiment = { + limit = { + maa_max_troops_count <= 2000 + NOT = { + is_unit_type = siege_weapon + } + OR = { + is_maa_type = light_footmen + is_maa_type = bowmen + is_maa_type = light_horsemen + is_maa_type = pikemen_unit + is_maa_type = armored_footmen + is_maa_type = armored_horsemen + is_maa_type = crossbowmen + is_maa_type = house_guard + is_maa_type = steppe_raiders + is_maa_type = horse_archers + is_maa_type = heavy_horse_archers + is_maa_type = nomad_lancers + } + } + alternative_limit = { + maa_max_troops_count <= 2000 + NOT = { + is_unit_type = siege_weapon + } + } + save_scope_as = maa + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + AND = { + is_valid_to_hire_court_position_type = bodyguard_court_position + NOT = { employs_court_position = bodyguard_court_position } + } + AND = { + is_valid_to_hire_court_position_type = master_of_horse_court_position + NOT = { employs_court_position = master_of_horse_court_position } + } + AND = { + is_valid_to_hire_court_position_type = head_groom_camp_officer + NOT = { employs_court_position = head_groom_camp_officer } + } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = martial_skill_focus + } + } + } + + option = { + name = bp3_journey.option.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character + } + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character_2 + } + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character_3 + } + + stress_impact = { + humble = minor_stress_impact_gain + content = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + gold <= minor_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1700.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 25 } + + if = { + limit = { + is_landless_adventurer = no + } + capital_province ?= { + add_province_modifier = { + modifier = imported_tactics_modifier + years = 20 + } + } + } + else_if = { + limit = { + has_government = landless_adventurer_government + } + add_character_modifier = { + modifier = imported_tactics_character_modifier + years = 10 + } + } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = master_of_horse + LAAMP_POSITION = head_groom + } + + stress_impact = { + base = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = lazy + } + } + } + } + + option = { + name = bp3_journey.1700.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = master_of_horse + LAAMP_POSITION = head_groom + } + + add_character_flag = bodyguard_flag + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character_2 + COURT_POSITION = bodyguard + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character_3 + COURT_POSITION = bodyguard + } + + remove_character_flag = bodyguard_flag + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = shy + } + } + } + + option = { + name = bp3_journey.1700.b + + trigger = { + NOT = { has_activity_intent = journey_curiosity_intent } + } + + add_character_flag = bodyguard_flag + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character_2 + COURT_POSITION = bodyguard + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character_3 + COURT_POSITION = bodyguard + } + + remove_character_flag = bodyguard_flag + + stress_impact = { + trusting = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = trusting + + } + } + } + + option = { + name = bp3_journey.1700.c + trigger = { + exists = scope:maa + } + + add_prestige = major_prestige_gain + + remove_treasury_or_gold = major_treasury_or_gold_value + + custom_tooltip = maa_increases_tt + hidden_effect = { + scope:maa = { + change_maa_regiment_size = { + size = 2 + reinforce = yes + } + } + } + + stress_impact = { + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_treasury_or_gold <= massive_treasury_or_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1700.d + add_prestige = minor_prestige_gain + + ai_chance = { + base = 100 + } + } + + after = { + scope:local_character = { + remove_character_flag = military_outfit + silent_disappear_ai_if_not_hired = yes + } + scope:local_character_2 = { + remove_character_flag = military_outfit + silent_disappear_ai_if_not_hired = yes + } + scope:local_character_3 = { + remove_character_flag = military_outfit + silent_disappear_ai_if_not_hired = yes + } + } +} + +# Trust Me +bp3_journey.1800 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1800.t + desc = bp3_journey.1800.desc + theme = journey_activity + + left_portrait = { + character = scope:host + animation = survey + } + + right_portrait = { + character = scope:local_character + animation = eccentric + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = travel_leader_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + travel_leader_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = travel_leader_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + travel_leader_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + } + else = { + create_character = { + template = travel_leader_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + if = { + limit = { + any_court_position_holder = { + type = travel_leader_court_position + } + } + random_court_position_holder = { + type = travel_leader_court_position + save_scope_as = current_holder + } + } + + hidden_effect = { + scope:local_character = { + random_list = { + 10 = { give_nickname = nick_the_trustworthy_ironic } + 10 = { give_nickname = nick_the_honest } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_valid_to_hire_court_position_type = travel_leader_court_position + OR = { + NOT = { employs_court_position = travel_leader_court_position } + any_court_position_holder = { + type = travel_leader_court_position + aptitude = { + court_position = travel_leader_court_position + value < 4 + } + } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = intrigue_skill_focus + } + } + } + + option = { + name = bp3_journey.1800.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character + } + + stress_impact = { + humble = minor_stress_impact_gain + content = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + gold <= minor_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1800.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + pay_short_term_gold = { + target = scope:local_character + gold = minor_gold_value + } + + duel = { + skill = intrigue + value = scope:local_character.intrigue + 5 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mostly_true_tt + send_interface_toast = { + title = mostly_true_tt + left_icon = root + journey_knowledge_hoarding_skill_effect = { VALUE = 50 } + add_prestige = major_prestige_gain + } + } + 45 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = almost_true_tt + send_interface_toast = { + title = almost_true_tt + left_icon = root + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + } + } + 45 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = not_true_tt + send_interface_toast = { + title = not_true_tt + left_icon = root + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + } + } + 5 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = utterly_scammed_tt + send_interface_toast = { + title = utterly_scammed_tt + left_icon = root + remove_short_term_gold = minor_gold_value + add_prestige = minor_prestige_loss + set_nickname_effect = { NICKNAME = nick_the_gullible } + } + } + } + + stress_impact = { + base = minor_stress_impact_gain + lazy = major_stress_impact_gain + cynical = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= medium_gold_value + has_trait = lazy + has_trait = cynical + } + } + } + } + + option = { + name = bp3_journey.1800.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + is_valid_to_hire_court_position_type = travel_leader_court_position + NOT = { has_trait = trusting } + } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = travel_leader + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 4 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1800.a + trigger = { + NOT = { has_trait = trusting } + } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + + random_list = { + 10 = { + desc = beautiful_vista + send_interface_toast = { + title = beautiful_vista + left_icon = root + right_icon = scope:local_character + add_prestige = medium_prestige_gain + } + } + 10 = { + desc = relaxing_sights + send_interface_toast = { + title = relaxing_sights + left_icon = root + right_icon = scope:local_character + add_stress = medium_stress_impact_loss + add_prestige = minor_prestige_gain + } + } + 10 = { + desc = interesting_insight + send_interface_toast = { + title = interesting_insight + left_icon = root + right_icon = scope:local_character + add_character_modifier = { + modifier = interesting_insight_modifier + years = 9 + } + add_prestige = minor_prestige_gain + } + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = greedy + has_trait = cynical + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1800.b + + trigger = { + NOR = { + has_activity_intent = journey_curiosity_intent + has_trait = trusting + } + is_valid_to_hire_court_position_type = travel_leader_court_position + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = travel_leader + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1800.c + trigger = { + NOT = { has_trait = trusting } + } + + add_prestige = miniscule_prestige_gain + + ai_chance = { + base = 1 + } + } + + option = { + name = bp3_journey.1800.trusting + trigger = { + has_trait = trusting + } + + pay_short_term_gold = { + target = scope:local_character + gold = minor_gold_value + } + + ai_chance = { + base = 100 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# Poor X +bp3_journey.1900 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1900.t + desc = bp3_journey.1900.desc + theme = journey_activity + + left_portrait = { + character = scope:host + animation = bribing + } + + right_portrait = { + character = scope:local_character + animation = beg + } + + cooldown = { years = 9 } + + trigger = { + OR = { + is_valid_to_hire_court_position_type = court_tutor_court_position + is_valid_to_hire_court_position_type = royal_architect_court_position + is_valid_to_hire_court_position_type = head_porter_camp_officer + is_valid_to_hire_court_position_type = cupbearer_court_position + is_valid_to_hire_court_position_type = witness_camp_officer + is_valid_to_hire_court_position_type = court_poet_court_position + is_valid_to_hire_court_position_type = chronicler_court_position + is_valid_to_hire_court_position_type = second_camp_officer + is_valid_to_hire_court_position_type = wet_nurse_court_position + AND = { + is_valid_to_hire_court_position_type = antiquarian_court_position + OR = { + NOT = { employs_court_position = antiquarian_court_position } + AND = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + aptitude:antiquarian_court_position < 4 + } + } + } + } + } + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + random_list = { + 1 = { + trigger = { + is_valid_to_hire_court_position_type = head_porter_camp_officer + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = head_porter_camp_officer + OR = { + NOT = { employs_court_position = head_porter_camp_officer } + AND = { + employs_court_position = head_porter_camp_officer + any_court_position_holder = { + type = head_porter_camp_officer + aptitude:head_porter_camp_officer < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = head_porter_camp_officer + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = witness_camp_officer + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = witness_camp_officer + OR = { + NOT = { employs_court_position = witness_camp_officer } + AND = { + employs_court_position = witness_camp_officer + any_court_position_holder = { + type = witness_camp_officer + aptitude:witness_camp_officer < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = witness_camp_officer + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = second_camp_officer + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = second_camp_officer + OR = { + NOT = { employs_court_position = second_camp_officer } + AND = { + employs_court_position = second_camp_officer + any_court_position_holder = { + type = second_camp_officer + aptitude:second_camp_officer < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = second_camp_officer + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = court_tutor_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = court_tutor_court_position + OR = { + NOT = { employs_court_position = court_tutor_court_position } + AND = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + aptitude:court_tutor_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = court_tutor_court_position + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = royal_architect_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = royal_architect_court_position + OR = { + NOT = { employs_court_position = royal_architect_court_position } + AND = { + employs_court_position = royal_architect_court_position + any_court_position_holder = { + type = royal_architect_court_position + aptitude:royal_architect_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = royal_architect_court_position + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = cupbearer_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = cupbearer_court_position + OR = { + NOT = { employs_court_position = cupbearer_court_position } + AND = { + employs_court_position = cupbearer_court_position + any_court_position_holder = { + type = cupbearer_court_position + aptitude:cupbearer_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = cupbearer_court_position + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = court_poet_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = court_poet_court_position + OR = { + NOT = { employs_court_position = court_poet_court_position } + AND = { + employs_court_position = court_poet_court_position + any_court_position_holder = { + type = court_poet_court_position + aptitude:court_poet_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = court_poet_court_position + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = chronicler_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = chronicler_court_position + OR = { + NOT = { employs_court_position = chronicler_court_position } + AND = { + employs_court_position = chronicler_court_position + any_court_position_holder = { + type = chronicler_court_position + aptitude:chronicler_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = chronicler_court_position + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = wet_nurse_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = court_tutor_court_position + OR = { + NOT = { employs_court_position = court_tutor_court_position } + AND = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + aptitude:court_tutor_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = wet_nurse_court_position + LOCATION = scope:location + } + } + 10 = { + trigger = { + AND = { + is_valid_to_hire_court_position_type = antiquarian_court_position + OR = { + NOT = { employs_court_position = antiquarian_court_position } + AND = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + aptitude:antiquarian_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = antiquarian_court_position + LOCATION = scope:location + } + } + } + scope:local_character = { + add_character_flag = peasant_outfit + add_character_flag = no_hat + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + AND = { + is_valid_to_hire_court_position_type = second_camp_officer + NOT = { employs_court_position = second_camp_officer } + } + AND = { + is_valid_to_hire_court_position_type = witness_camp_officer + NOT = { employs_court_position = witness_camp_officer } + } + AND = { + is_valid_to_hire_court_position_type = head_porter_camp_officer + NOT = { employs_court_position = head_porter_camp_officer } + } + AND = { + is_valid_to_hire_court_position_type = court_tutor_court_position + NOT = { employs_court_position = court_tutor_court_position } + } + AND = { + is_valid_to_hire_court_position_type = royal_architect_court_position + NOT = { employs_court_position = royal_architect_court_position } + } + AND = { + is_valid_to_hire_court_position_type = cupbearer_court_position + NOT = { employs_court_position = cupbearer_court_position } + } + AND = { + is_valid_to_hire_court_position_type = court_poet_court_position + NOT = { employs_court_position = court_poet_court_position } + } + AND = { + is_valid_to_hire_court_position_type = chronicler_court_position + NOT = { employs_court_position = chronicler_court_position } + } + # Wet Nurse and Antiquarian have bespoke events + } + } + } + + option = { + name = bp3_journey.option.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + add_prestige = miniscule_prestige_gain + + reverse_add_opinion = { + modifier = annoyed_opinion + opinion = -20 + target = scope:local_character + } + + stress_impact = { + humble = minor_stress_impact_gain + content = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + gold <= minor_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1900.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 25 } + + add_piety = miniscule_piety_gain + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = lazy + } + } + } + } + + option = { + name = bp3_journey.1900.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + if = { + limit = { + has_character_flag = court_tutor_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = court_tutor + } + } + else_if = { + limit = { + has_character_flag = head_porter_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = head_porter + } + } + else_if = { + limit = { + has_character_flag = royal_architect_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = royal_architect + } + } + else_if = { + limit = { + has_character_flag = witness_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = witness + } + } + else_if = { + limit = { + has_character_flag = cupbearer_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = cupbearer + } + } + else_if = { + limit = { + has_character_flag = court_poet_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = court_poet + } + } + else_if = { + limit = { + has_character_flag = second_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = second + } + } + else_if = { + limit = { + has_character_flag = chronicler_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = chronicler + } + } + else_if = { + limit = { + has_character_flag = wet_nurse_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = wet_nurse + } + } + else_if = { + limit = { + has_character_flag = antiquarian_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = antiquarian + } + } + + add_hook = { + type = strong_obligation_hook + target = scope:local_character + } + custom_tooltip = obligation_hook_tt + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1900.a + + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + + add_piety = miniscule_piety_gain + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + + stress_impact = { + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = greedy + has_trait = cynical + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1900.b + trigger = { + NOT = { has_activity_intent = journey_curiosity_intent } + } + + if = { + limit = { + has_character_flag = court_tutor_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = court_tutor + } + } + else_if = { + limit = { + has_character_flag = head_porter_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = head_porter + } + } + else_if = { + limit = { + has_character_flag = royal_architect_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = royal_architect + } + } + else_if = { + limit = { + has_character_flag = witness_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = witness + } + } + else_if = { + limit = { + has_character_flag = cupbearer_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = cupbearer + } + } + else_if = { + limit = { + has_character_flag = court_poet_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = court_poet + } + } + else_if = { + limit = { + has_character_flag = second_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = second + } + } + else_if = { + limit = { + has_character_flag = chronicler_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = chronicler + } + } + else_if = { + limit = { + has_character_flag = wet_nurse_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = wet_nurse + } + } + else_if = { + limit = { + has_character_flag = antiquarian_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = antiquarian + } + } + + add_hook = { + type = obligation_hook + target = scope:local_character + } + custom_tooltip = obligation_hook_tt + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1900.c + + add_prestige = miniscule_prestige_gain + + ai_chance = { + base = 1 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + scope:local_character = { + remove_character_flag = peasant_outfit + remove_character_flag = no_hat + } + remove_character_flag = court_tutor_court_position + remove_character_flag = royal_architect_court_position + remove_character_flag = cupbearer_court_position + remove_character_flag = court_poet_court_position + remove_character_flag = chronicler_court_position + remove_character_flag = wet_nurse_court_position + remove_character_flag = antiquarian_court_position + } +} + +# A Walking Legend +bp3_journey.2000 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.2000.t + desc = bp3_journey.2000.desc + theme = journey_activity + + left_portrait = { + character = scope:host + animation = hero_flex + } + + right_portrait = { + character = scope:new_promoter + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + + cooldown = { years = 3 } + + trigger = { + has_activity_intent = spread_legend_intent + exists = promoted_legend + OR = { + scope:activity.activity_location.county.holder = { + is_available_ai_adult = yes + NOR = { + exists = promoted_legend + this = root + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + } + } + scope:activity.activity_location.county = { + any_neighboring_county = { + holder = { + is_available_ai_adult = yes + NOR = { + exists = promoted_legend + this = root + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + } + } + } + } + } + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + random_list = { + 10 = { + trigger = { + scope:activity.activity_location.county.holder = { + is_available_ai_adult = yes + NOR = { + exists = promoted_legend + this = root + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + } + } + } + scope:activity.activity_location.county.holder = { save_scope_as = new_promoter } + } + 10 = { + trigger = { + scope:activity.activity_location.county = { + any_neighboring_county = { + holder = { + is_available_ai_adult = yes + NOR = { + exists = promoted_legend + this = root + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + } + } + } + } + } + scope:activity.activity_location.county.holder = { save_scope_as = new_promoter } + scope:activity.activity_location.county = { + random_neighboring_county = { + limit = { + holder = { + is_available_ai_adult = yes + NOR = { + exists = promoted_legend + this = root + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + } + } + } + holder = { save_scope_as = new_promoter } + } + } + } + } + } + + option = { + name = bp3_journey.2000.a + + remove_short_term_gold = minor_gold_value + add_prestige = medium_prestige_gain + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + scope:new_promoter = { + set_promoted_legend = root.promoted_legend + } + + stress_impact = { + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = greedy + has_trait = cynical + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.2000.b + + scope:new_promoter = { + set_promoted_legend = root.promoted_legend + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2000.c + + add_prestige = miniscule_prestige_gain + reverse_add_opinion = { + target = scope:new_promoter + modifier = rude_opinion + opinion = -20 + } + + ai_chance = { + base = 1 + } + } +} + +# A Local Specialty +bp3_journey.2100 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.2100.t + desc = bp3_journey.2100.desc + theme = journey_activity + + override_background = { reference = market } + + left_portrait = { + character = scope:host + animation = drink + } + + right_portrait = { + character = scope:local_character + animation = debating + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + is_valid_to_hire_court_position_type = camp_cook_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = camp_cook_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #food_taster_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = camp_cook_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #food_taster_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = camp_cook_camp_officer + } + } + random_court_position_holder = { + type = camp_cook_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = camp_cook_camp_officer + } + create_character = { + template = camp_cook_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = camp_cook_camp_officer + } + } + random_court_position_holder = { + type = camp_cook_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = food_taster_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + food_taster_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = food_taster_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + food_taster_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = food_taster_court_position + } + } + random_court_position_holder = { + type = food_taster_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = food_taster_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = food_taster_court_position + } + } + random_court_position_holder = { + type = food_taster_court_position + save_scope_as = current_holder + } + } + } + hidden_effect = { + scope:local_character = { + set_favorite_treat_effect = yes + change_current_weight = 150 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_valid_to_hire_court_position_type = food_taster_court_position + NOT = { employs_court_position = food_taster_court_position } + } + modifier = { + add = 1 + is_valid_to_hire_court_position_type = camp_cook_camp_officer + NOT = { employs_court_position = camp_cook_camp_officer } + } + modifier = { + add = 1 + scope:activity = { + has_variable = stewardship_skill_focus + } + } + modifier = { + add = 1 + has_trait = gluttonous + } + modifier = { + add = 1 + has_trait = comfort_eater + } + } + + option = { + name = bp3_journey.2100.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 10 } + + food_poison_chance_effect = yes + + stress_impact = { + base = miniscule_stress_impact_gain + gluttonous = minor_stress_impact_loss + comfort_eater = minor_stress_impact_loss + temperate = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = temperate + has_trait = inappetetic + } + } + } + } + + option = { + name = bp3_journey.2100.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + culture != scope:local_character.culture + } + + add_prestige = miniscule_prestige_gain + + food_poison_chance_effect = yes + + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 4 + desc = cultural_acceptance_gain_event + } + } + + stress_impact = { + gluttonous = minor_stress_impact_loss + comfort_eater = minor_stress_impact_loss + temperate = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = inappetetic + has_trait = temperate + } + } + } + } + + option = { + name = bp3_journey.2100.curiosity_2 + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = food_taster + LAAMP_POSITION = camp_cook + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2100.a + + add_character_modifier = { + modifier = good_soup_modifier + years = 2 + } + + stress_impact = { + base = minor_stress_impact_loss + inappetetic = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = inappetetic + stress <= 10 + } + } + } + } + + option = { + name = bp3_journey.2100.b + + trigger = { + OR = { + is_valid_to_hire_court_position_type = camp_cook_camp_officer + is_valid_to_hire_court_position_type = food_taster_court_position + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = food_taster + LAAMP_POSITION = camp_cook + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2100.c + + journey_knowledge_hoarding_skill_effect = { VALUE = 2 } + + ai_chance = { + base = 1 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# The Siren of Place +bp3_journey.2200 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.2200.t + desc = bp3_journey.2200.desc + theme = journey_activity + + override_background = { reference = alley_night } + + left_portrait = { + character = scope:host + animation = shame + } + + right_portrait = { + character = scope:local_character + animation = reception_bride_right + } + + cooldown = { years = 9 } + + trigger = { + OR = { + is_valid_to_hire_court_position_type = master_of_spoils_camp_officer + is_valid_to_hire_court_position_type = wet_nurse_court_position + is_valid_to_hire_court_position_type = bodyguard_court_position + } + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = wet_nurse_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + wet_nurse_validity_trigger = { EMPLOYER = root } + } + is_valid_to_hire_court_position_type = wet_nurse_court_position + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = wet_nurse_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + wet_nurse_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + save_scope_as = wet_nurse + } + if = { + limit = { + any_court_position_holder = { + type = wet_nurse_court_position + } + } + random_court_position_holder = { + type = wet_nurse_court_position + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = wet_nurse_court_position + } + create_character = { + template = wet_nurse_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + save_scope_as = wet_nurse + save_scope_as = generated + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = wet_nurse_court_position + } + } + random_court_position_holder = { + type = wet_nurse_court_position + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_spoils_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_of_spoils_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + } + is_valid_to_hire_court_position_type = master_of_spoils_camp_officer + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_of_spoils_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + save_scope_as = master_of_spoils_camp_officer + } + if = { + limit = { + any_court_position_holder = { + type = master_of_spoils_camp_officer + } + } + random_court_position_holder = { + type = master_of_spoils_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_spoils_camp_officer + } + create_character = { + template = master_of_spoils_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + save_scope_as = master_of_spoils_camp_officer + save_scope_as = generated + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = master_of_spoils_camp_officer + } + } + random_court_position_holder = { + type = master_of_spoils_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + } + is_valid_to_hire_court_position_type = bodyguard_court_position + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + save_scope_as = bodyguard + } + if = { + limit = { + any_court_position_holder = { + type = bodyguard_court_position + } + } + random_court_position_holder = { + type = bodyguard_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = bodyguard_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + save_scope_as = bodyguard + save_scope_as = generated + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = bodyguard_court_position + } + } + random_court_position_holder = { + type = bodyguard_court_position + save_scope_as = current_holder + } + } + } + hidden_effect = { + scope:local_character = { + if = { + limit = { + exists = scope:generated + } + remove_trait = beauty_bad_1 + remove_trait = beauty_bad_2 + remove_trait = beauty_bad_3 + random_list = { + 33 = { add_trait = beauty_good_1 } + 33 = { add_trait = beauty_good_2 } + 33 = { add_trait = beauty_good_3 } + } + } + change_current_weight = 25 + set_sexuality = bisexual + add_trait = fornicator + } + } + set_random_entertainment_text_effect = yes + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + AND = { + is_valid_to_hire_court_position_type = wet_nurse_court_position + NOT = { employs_court_position = wet_nurse_court_position } + } + # Bodyguard has a bespoke event + } + modifier = { + add = 1 + AND = { + is_valid_to_hire_court_position_type = bodyguard_court_position + NOT = { employs_court_position = bodyguard_court_position } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = intrigue_skill_focus + } + } + modifier = { + add = 1 + has_trait = rakish + } + modifier = { + add = 1 + has_trait = lustful + } + } + + option = { + name = bp3_journey.2200.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character + } + + stress_impact = { + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = shy + + } + } + } + + option = { + name = bp3_journey.2200.knowledge_hoarding + flavor = local_monument_tt + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + stress_impact = { + base = miniscule_stress_impact_gain + lustful = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = lustful + has_trait = impatient + } + } + } + } + + option = { + name = bp3_journey.2200.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hidden_effect = { + scope:local_character = { + add_to_court_and_entourage_effect = yes + } + } + + hire_for_two_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = wet_nurse + COURT_POSITION_2 = bodyguard + LAAMP_POSITION = master_of_spoils + } + + if = { + limit = { + culture != root.location.culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 1 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2200.curiosity_2 + trigger = { + has_activity_intent = journey_curiosity_intent + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:local_character + } + NOT = { has_trait = celibate } + can_set_relation_lover_trigger = { CHARACTER = scope:local_character } + } + + hidden_effect = { + scope:local_character = { + add_to_court_and_entourage_effect = yes + } + } + + had_sex_with_effect = { + CHARACTER = scope:local_character + PREGNANCY_CHANCE = pregnancy_chance + } + + set_relation_lover = { + target = scope:local_character + reason = lover_fell_in_love_with_prostitute_by_monument + province = root.location + } + + if = { + limit = { + culture != root.location.culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 1 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + base = medium_stress_impact_loss + rakish = medium_stress_impact_loss + seducer = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + chaste = massive_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 5 + modifier = { + add = 95 + OR = { + has_trait = lustful + has_trait = rakish + has_trait = seducer + } + } + modifier = { + factor = 0 + might_cheat_on_every_partner_trigger = no + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = chaste + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.2200.a_2 + + trigger = { + OR = { + NOT = { + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:local_character + } + } + has_trait = celibate + } + } + + stress_impact = { + base = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + stress <= 25 + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.2200.a + + trigger = { + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:local_character + } + NOT = { has_trait = celibate } + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + + had_sex_with_effect = { + CHARACTER = scope:local_character + PREGNANCY_CHANCE = pregnancy_chance + } + + stress_impact = { + base = medium_stress_impact_loss + lustful = medium_stress_impact_loss + rakish = medium_stress_impact_loss + seducer = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + chaste = massive_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 5 + modifier = { + add = 95 + OR = { + has_trait = lustful + has_trait = rakish + has_trait = seducer + } + } + modifier = { + factor = 0 + might_cheat_on_every_partner_trigger = no + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = chaste + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.2200.b + + trigger = { + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_two_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = wet_nurse + COURT_POSITION_2 = bodyguard + LAAMP_POSITION = master_of_spoils + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2200.c + + add_prestige = miniscule_prestige_gain + journey_knowledge_hoarding_skill_effect = { VALUE = 2 } + + ai_chance = { + base = 1 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# X's CulturalUnit +bp3_journey.2300 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.2300.t + desc = bp3_journey.2300.desc + theme = journey_activity + + override_background = { reference = courtyard } + + left_portrait = { + character = scope:host + animation = thinking + } + + center_portrait = { + character = scope:local_ruler + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + camera = camera_event_very_left + } + + right_portrait = { + character = scope:local_character + triggered_animation = { + trigger = { + scope:regiment = { + OR = { + is_unit_type = archers + is_unit_type = skirmishers + } + } + } + scripted_animation = bow_closed + } + triggered_animation = { + trigger = { + scope:regiment = { + is_unit_type = pikemen + } + } + animation = throne_room_two_handed_passive_1 + } + animation = inspect_weapon + } + + cooldown = { years = 9 } + + trigger = { + scope:activity.activity_location.county.holder ?= { + is_available_ai_adult = yes + culture = scope:activity.activity_location.culture + NOR = { + this = root + culture = { has_same_culture_heritage = root.culture } + is_close_or_extended_family_of = root + dynasty ?= root.dynasty + has_relation_friend = root + has_relation_rival = root + has_relation_lover = root + } + any_maa_regiment = { + NOR = { + is_unit_type = siege_weapon + is_maa_type = light_footmen + is_maa_type = bowmen + is_maa_type = light_horsemen + is_maa_type = pikemen_unit + is_maa_type = armored_footmen + is_maa_type = armored_horsemen + is_maa_type = crossbowmen + is_maa_type = house_guard + is_maa_type = horse_archers + is_maa_type = steppe_raiders + is_maa_type = heavy_horse_archers + is_maa_type = nomad_lancers + } + } + } + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + scope:activity.activity_location.county.holder = { + save_scope_as = local_ruler + random_maa_regiment = { + limit = { + NOR = { + is_unit_type = siege_weapon + is_maa_type = light_footmen + is_maa_type = bowmen + is_maa_type = light_horsemen + is_maa_type = pikemen_unit + is_maa_type = armored_footmen + is_maa_type = armored_horsemen + is_maa_type = crossbowmen + is_maa_type = house_guard + is_maa_type = horse_archers + is_maa_type = steppe_raiders + is_maa_type = heavy_horse_archers + is_maa_type = nomad_lancers + } + } + save_scope_as = regiment + } + } + if = { + limit = { + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_of_arms_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #champion_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_of_arms_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #champion_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = master_of_arms_camp_officer + } + } + random_court_position_holder = { + type = master_of_arms_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + } + create_character = { + template = master_of_arms_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = master_of_arms_camp_officer + } + } + random_court_position_holder = { + type = master_of_arms_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = champion_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + champion_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = champion_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + champion_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = champion_court_position + } + } + random_court_position_holder = { + type = champion_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = champion_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = champion_court_position + } + } + random_court_position_holder = { + type = champion_court_position + save_scope_as = current_holder + } + } + } + hidden_effect = { + scope:local_character = { + add_character_flag = military_outfit + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_valid_to_hire_court_position_type = champion_court_position + NOT = { employs_court_position = champion_court_position } + } + modifier = { + add = 1 + scope:activity = { + has_variable = martial_skill_focus + } + } + } + + option = { + name = bp3_journey.2300.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + progress_towards_friend_effect = { + REASON = friend_bonded_by_monument + CHARACTER = scope:local_ruler + OPINION = 30 + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 10 } + + stress_impact = { + base = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.2300.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + culture != scope:local_character.culture + } + + progress_towards_friend_effect = { + REASON = friend_bonded_by_monument + CHARACTER = scope:local_ruler + OPINION = 30 + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.2300.curiosity_2 + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = champion + LAAMP_POSITION = master_of_arms + } + + progress_towards_friend_effect = { + REASON = friend_bonded_by_monument + CHARACTER = scope:local_ruler + OPINION = 30 + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.2300.a + + trigger = { + maa_regiments_count <= max_regiment_count_plus_one + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + target = scope:local_ruler + modifier = respect_opinion + opinion = 20 + } + + pay_treasury_or_gold = { + target = scope:local_ruler + value = medium_treasury_or_gold_value + } + + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 1 + } + + stress_impact = { + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = craven + has_trait = arrogant + short_term_treasury_or_gold <= major_treasury_or_gold_value + } + } + } + } + + option = { + name = bp3_journey.2300.b + + trigger = { + OR = { + is_valid_to_hire_court_position_type = champion_court_position + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + reverse_add_opinion = { + target = scope:local_ruler + modifier = annoyed_opinion + opinion = -10 + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = champion + LAAMP_POSITION = master_of_arms + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2300.c + + add_prestige = miniscule_prestige_gain + + reverse_add_opinion = { + target = scope:local_ruler + modifier = flattered_opinion + opinion = 10 + } + + ai_chance = { + base = 1 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} diff --git a/N3OW/events/dlc/ce1/epidemic_events.txt b/N3OW/events/dlc/ce1/epidemic_events.txt new file mode 100644 index 00000000..bc933f51 --- /dev/null +++ b/N3OW/events/dlc/ce1/epidemic_events.txt @@ -0,0 +1,9317 @@ +namespace = epidemic_events + +############################ +## Epidemic Maintenance Events +## 0001-1000 +## by Veronica Pazos +############################ + +# epidemic_events.0001 - Army commander gets infected - may spread to army +# epidemic_events.0010 - The plague has reached your court, set your stance (event to avoid event spamming) + +# Army commander gets infected - may spread to army +epidemic_events.0001 = { + type = character_event + title = epidemic_events.0001.t + desc = epidemic_events.0001.desc + theme = plague + left_portrait = { + character = root + animation = sick + } + override_background = { reference = army_camp } + override_effect_2d = { + reference = flies + } + cooldown = { years = 2 } + + immediate = { + grab_epidemic_disease_effect = yes + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + } + + option = { #You get sick lol + name = { + trigger = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + text = epidemic_events.0001.a.christian + } + name = { + trigger = { NOT = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } } + text = epidemic_events.0001.a + } + if = { #are you infecting your knights or your entire army; kinda arbitrary for flavour + limit = { + OR = { #infect army, these are highly contagious + has_trait = typhus + has_trait = bubonic_plague + has_trait = dysentery + } + } + random = { + chance = 90 + #you infect your knights + send_interface_toast = { + title = epidemic_events.0001.a.toast + left_icon = root + add_character_modifier = { + modifier = epidemic_infected_knights_modifier #knights effectiveness + years = 2 + } + } + } + } + else = { #infect your knigths only, the rest of diseases are kinda less infectious + random = { + chance = 20 + #you infect your army + send_interface_toast = { + title = epidemic_events.0001.a.toast + left_icon = root + add_character_modifier = { + modifier = epidemic_infected_army_modifier #damage mult + years = 2 + } + } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +# Notification for going into isolation due to epidemic +epidemic_events.0100 = { + type = character_event + title = epidemic_events.0100.t + desc = epidemic_events.0100.desc + theme = plague + left_portrait = { + character = root + animation = fear + } + + option = { #Into isolation we go + name = epidemic_events.0100.a + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_loss } + add_prestige = major_prestige_loss + isolate_family_decision_effect = yes + ai_chance = { + base = 100 + } + } +} +epidemic_events.0101 = { + type = character_event + title = epidemic_events.0101.t + desc = epidemic_events.0101.desc + theme = plague + left_portrait = { + character = root + animation = personality_content + } + trigger = { + has_character_modifier = isolating_modifier + } + + option = { #Out of isolation we come + name = epidemic_events.0101.a + unisolate_family_decision_effect = yes + ai_chance = { + base = 100 + } + } +} + +# Prosperity event / Plague recovery event +epidemic_events.0110 = { + type = character_event + title = epidemic_events.0110.t + desc = { + desc = epidemic_events.0110.desc + triggered_desc = { + trigger = { + exists = scope:new_preferred_capital + } + desc = epidemic_events.0110.desc.new_capital + } + } + theme = plague + left_portrait = { + character = root + animation = personality_rational + } + + trigger = { + exists = scope:epidemic + # Make sure no new plagues showed up since then, or a new preferred capital county has not been chosen already + NOT = { + any_sub_realm_county = { + OR = { + has_province_with_epidemic = { intensity = any } + has_variable = preferred_capital_chosen + } + } + } + OR = { #You're either not on cooldown OR the Black Death + NOT = { has_variable = had_recent_prosperity_event_var } + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + outbreak_intensity = apocalyptic + } + } + has_variable_list = formerly_infected_counties + } + + immediate = { + set_variable = { + name = had_recent_prosperity_event_var + years = 2 + } + if = { + limit = { # A new capital potential? + highest_held_title_tier >= tier_kingdom + any_sub_realm_duchy = { + title_capital_county = { + NOT = { exists = var:epidemic_cooldown_general } + holder = { + OR = { + this = root + is_ai = yes + } + } + save_temporary_scope_as = county_to_check + root = { + primary_title = { + is_de_jure_liege_or_above_target = scope:county_to_check + } + capital_county != scope:county_to_check + any_in_list = { + variable = formerly_infected_counties + this = scope:county_to_check + } + } + } + } + } + random_sub_realm_duchy = { + weight = { + base = 1 + modifier = { + add = title_capital_county.development_level + } + } + limit = { + title_capital_county = { + NOT = { exists = var:epidemic_cooldown_general } + holder = { + OR = { + this = root + is_ai = yes + } + } + save_temporary_scope_as = county_to_check + root = { + primary_title = { + is_de_jure_liege_or_above_target = scope:county_to_check + } + capital_county != scope:county_to_check + any_in_list = { + variable = formerly_infected_counties + this = scope:county_to_check + } + } + } + } + title_capital_county = { save_scope_as = new_preferred_capital } + scope:new_preferred_capital = { + set_variable = { + name = preferred_capital_chosen + years = 2 + } + } + } + } + } + + option = { # Ah, a cool new capital! + name = epidemic_events.0110.a + trigger = { + exists = scope:new_preferred_capital + scope:epidemic = { outbreak_intensity >= major } #don't switch capitals for a minor plague + is_ai = no + } + remove_treasury_or_gold = { + value = epidemic_fromdust_value + add = minor_treasury_or_gold_value + } + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + scope:new_preferred_capital = { + change_title_holder = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + primary_title = { + set_capital_county = scope:new_preferred_capital + } + set_realm_capital = scope:new_preferred_capital + scope:new_preferred_capital = { + add_county_modifier = { + modifier = plague_new_capital + years = 10 + } + } + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + limit = { + this != scope:new_preferred_capital + } + add_county_modifier = { + modifier = county_epidemic_recovered_medium_modifier + years = 5 + } + } + } + + option = { # Spend cash to help recover from the plague + name = epidemic_events.0110.b + if = { + limit = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + outbreak_intensity = apocalyptic + } + } + remove_treasury_or_gold = epidemic_fromdust_value + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + add_county_modifier = { + modifier = county_epidemic_recovered_strong_modifier + years = 5 + } + } + } + else_if = { + limit = { + scope:epidemic = { + outbreak_intensity >= major + } + } + remove_treasury_or_gold = epidemic_fromdust_value + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + add_county_modifier = { + modifier = county_epidemic_recovered_medium_modifier + years = 5 + } + } + } + else = { + remove_treasury_or_gold = { + value = epidemic_fromdust_value + multiply = 0.5 + } + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + add_county_modifier = { + modifier = county_epidemic_recovered_minor_modifier + years = 5 + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + modifier = { + factor = 0 + short_term_gold < epidemic_fromdust_value + } + } + } + + option = { # Nah don't care + name = epidemic_events.0110.c + if = { + limit = { + scope:epidemic = { + outbreak_intensity >= major + } + } + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + add_county_modifier = { + modifier = county_epidemic_recovered_minor_modifier + years = 5 + } + } + } + else = { + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + add_county_modifier = { + modifier = county_epidemic_recovered_tiny_modifier + years = 5 + } + } + } + if = { + limit = { + has_legitimacy = yes + } + add_legitimacy = miniscule_legitimacy_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 2.5 + ai_rationality = -1 + } + } + } + + after = { + clear_variable_list = formerly_infected_counties + } +} + +############################ +## Epidemic Flavor Events +## 1000-2000 +## by James Beaumont +############################ + +############################ +## A charismatic priest is convincing the sick that the plague is a result of their heathen ways +## 1000 +## by James Beaumont +############################ +epidemic_events.1000 = { + type = character_event + title = epidemic_events.1000.t + desc = epidemic_events.1000.desc + theme = plague + override_background = { reference = ce1_funeral_pyre } + override_effect_2d = { + reference = smoke + } + + left_portrait = { + character = scope:charismatic_priest + animation = debating + } + cooldown = { years = 5 } + trigger = { + is_available = yes + # Only tribes + government_has_flag = government_is_tribal + # Only if the plague is quite dramatic + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + # Make sure there's a valid faith to convert to + OR = { + AND = { + faith = { has_doctrine_parameter = unreformed } + faith.religion = { + any_faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + AND = { + faith.religion = { + is_in_family = rf_pagan + } + faith = { NOT = { has_doctrine_parameter = unreformed } } + faith.religion = { + any_faith = { has_doctrine_parameter = unreformed } + } + } + AND = { + faith = { has_doctrine_parameter = unreformed } + top_liege = { + any_character_to_title_neighboring_and_across_water_county = { + holder.top_liege = { + any_sub_realm_county = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + } + } + } + AND = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + top_liege = { + any_sub_realm_county = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + } + } + } + + immediate = { + # Grab a county to convert + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + weight = { + base = 1 + modifier = { + add = 250 + has_province_with_epidemic = { intensity >= apocalyptic } + } + } + random_county_province = { + limit = { + any_province_epidemic = { + intensity >= major + } + } + weight = { + base = 1 + modifier = { + add = 250 + any_province_epidemic = { + intensity >= apocalyptic + } + } + } + random_province_epidemic = { + intensity >= major + weight = { + base = 1 + modifier = { + add = 250 + outbreak_intensity >= apocalyptic + } + } + save_scope_as = cult_epidemic + } + } + save_scope_as = infected_county + } + # Grab the reformed version of the unreformed faith if possible (Bon for example) + if = { + limit = { + faith = { has_doctrine_parameter = unreformed } + faith.religion = { + any_faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + faith.religion = { + random_faith = { + limit = { + NOT = { has_doctrine_parameter = unreformed } + } + save_scope_as = heretical_faith + } + } + } + # Otherwise grab a reformed faith from within your realm + else_if = { + limit = { + faith = { has_doctrine_parameter = unreformed } + top_liege = { + any_sub_realm_county = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + } + top_liege = { + random_sub_realm_county = { + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + faith = { save_scope_as = heretical_faith } + } + } + } + # Otherwise grab a nearby reformed faith + else_if = { + limit = { + faith = { has_doctrine_parameter = unreformed } + top_liege = { + any_character_to_title_neighboring_and_across_water_county = { + holder.top_liege = { + any_sub_realm_county = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + } + } + } + top_liege = { + random_character_to_title_neighboring_and_across_water_county = { + limit = { + holder.top_liege = { + any_sub_realm_county = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + } + holder.top_liege = { + random_sub_realm_county = { + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + faith = { save_scope_as = heretical_faith } + } + } + } + } + } + # You're a reformed faith and your people wanna revert to the old ways + else_if = { + limit = { + # Don't get Kuzarism for Jewish realms + faith.religion = { is_in_family = rf_pagan } + faith = { NOT = { has_doctrine_parameter = unreformed } } + faith.religion = { + any_faith = { has_doctrine_parameter = unreformed } + } + } + faith.religion = { + random_faith = { + limit = { + has_doctrine_parameter = unreformed + } + save_scope_as = heretical_faith + } + } + } + # You're a reformed faith and you rule over pagans + else_if = { + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + top_liege = { + any_sub_realm_county = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + } + top_liege = { + random_sub_realm_county = { + limit = { + faith = { + has_doctrine_parameter = unreformed + } + } + faith = { save_scope_as = heretical_faith } + } + } + } + # Now create the priest + # See if there's a nearby person of the culture + if = { + limit = { + top_liege = { + any_character_to_title_neighboring_and_across_water_county = { + faith = scope:heretical_faith + } + } + } + top_liege = { + random_character_to_title_neighboring_and_across_water_county = { + limit = { faith = scope:heretical_faith } + culture = { save_scope_as = heretical_culture } + } + } + } + else = { + root.culture = { save_scope_as = heretical_culture } + } + # Create a priest + create_character = { + template = priest_character_template + location = root.location + culture = scope:heretical_culture + faith = scope:heretical_faith + trait = eccentric + #Set up the scope + save_scope_as = charismatic_priest + } + } + + option = { # They have a point :thinking_emoji: + name = epidemic_events.1000.c + trigger = { + has_trait = cynical + } + set_character_faith = scope:heretical_faith + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:cult_epidemic + } + } + } + set_county_faith = scope:heretical_faith + add_county_modifier = { + modifier = plague_cult_embraced + years = 10 + } + } + stress_impact = { + cynical = major_stress_impact_loss + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = -1 + } + modifier = { + factor = 0 + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + } + + option = { # Burn this raving lunatic! + name = epidemic_events.1000.a + scope:charismatic_priest = { + death = { + killer = root + death_reason = death_execution + } + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:cult_epidemic + } + } + } + add_county_modifier = { + modifier = plague_cult_persecuted + years = 10 + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = -1 + } + } + } + + option = { # I'm sure they can't do any harm + name = epidemic_events.1000.b + if = { # Don't go converting all of the world into unreformed faiths + limit = { + OR = { + faith = { has_doctrine_parameter = unreformed } + is_ai = no + } + } + scope:infected_county = { + set_county_faith = scope:heretical_faith + } + } + scope:infected_county = { + add_county_modifier = { + modifier = plague_cult_embraced + years = 10 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = -0.5 + } + } + } +} + +############################ +## Superstitious courtiers want you to nail the coffin of your deceased lover shut to prevent them from rising as a revanent +## 1010 +## by James Beaumont +############################ +epidemic_events.1010 = { + type = character_event + title = epidemic_events.1010.t + desc = epidemic_events.1010.desc + theme = plague + override_background = ce1_catacombs + left_portrait = { + character = scope:superstitious_courtier + animation = throne_room_one_handed_passive_3 + camera = camera_event_group_talking_left_left + } + right_portrait = { + character = scope:dead_lover + animation = dead + camera = camera_event_right_forward + } + cooldown = { years = 5 } + trigger = { + is_available_adult = yes + # Only if there's a big plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + # Recently deceased + any_memory = { + OR = { + has_memory_type = spouse_died + has_memory_type = soulmate_died + has_memory_type = lover_died + } + memory_participant:dead_relation = { + time_since_death = { + years <= 3 + } + } + } + # You have a courtier who is plausibly superstitious + any_courtier_or_guest = { + is_available_adult = yes + probably_superstitious = yes + } + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + random_memory = { + limit = { + OR = { + has_memory_type = spouse_died + has_memory_type = soulmate_died + has_memory_type = lover_died + } + any_memory_participant = { + time_since_death = { + years <= 3 + } + } + } + memory_participant:dead_relation = { save_scope_as = dead_lover } + save_scope_as = dead_memory + } + random_courtier_or_guest = { + limit = { + is_available_adult = yes + probably_superstitious = yes + } + save_scope_as = superstitious_courtier + } + } + + option = { # Nail every coffin in the kingdom! + name = epidemic_events.1010.c + trigger = { + has_trait = paranoid + } + scope:dead_lover = { + every_close_family_member = { + custom = every_family_member_of_lover + add_opinion = { + modifier = hate_opinion + opinion = -30 + target = root + } + } + } + progress_towards_friend_effect = { + REASON = friend_revenants_nailed + CHARACTER = scope:superstitious_courtier + OPINION = default_friend_opinion + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = revenants_expelled + years = 15 + } + } + stress_impact = { + paranoid = major_stress_impact_loss + callous = minor_stress_impact_loss + base = minor_stress_impact_gain + zealous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + lustful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = -1 + ai_honor = -1 + } + } + } + + option = { # How bloody well dare you + name = epidemic_events.1010.a + add_piety = minor_piety_gain + capital_county = { + add_county_modifier = { + modifier = beset_by_revenants + years = 5 + } + } + stress_impact = { + callous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = 1 + ai_rationality = 1 + } + } + } + + option = { # Nail it shut! + name = epidemic_events.1010.b + scope:dead_lover = { + every_close_family_member = { + custom = every_family_member_of_lover + add_opinion = { + modifier = hate_opinion + opinion = -30 + target = root + } + } + } + capital_county = { + add_county_modifier = { + modifier = revenant_expelled + years = 5 + } + } + stress_impact = { + paranoid = minor_stress_impact_loss + callous = minor_stress_impact_loss + base = minor_stress_impact_gain + zealous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + lustful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = -1 + ai_honor = -1 + } + } + } +} + +############################ +## Guys wanna plant flowers to combat the plague +## 1020 +## by James Beaumont +############################ +epidemic_events.1020 = { + type = character_event + title = epidemic_events.1020.t + desc = epidemic_events.1020.desc + theme = plague + override_background = ce1_funeral_pyre + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = survey + camera = camera_event_left_away + } + right_portrait = { + character = scope:miasma_courtier + animation = storyteller + camera = camera_event_center_away + } + cooldown = { years = 5 } + trigger = { + is_available = yes + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + any_courtier_or_guest = { + count >= 1 + is_available_adult = yes + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + save_temporary_scope_as = province_temp + } + } + scope:province_temp = { + save_scope_as = epidemic_province + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + save_scope_as = epidemic_county + } + if = { + limit = { + exists = court_position:court_physician_court_position + court_position:court_physician_court_position = { + is_available_adult = yes + } + } + court_position:court_physician_court_position = { + save_scope_as = miasma_courtier + } + } + else = { + random_courtier_or_guest = { + limit = { + is_available_adult = yes + } + save_scope_as = miasma_courtier + } + } + } + + option = { # Okay, I'll do it :eyeroll: + name = epidemic_events.1020.a + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } + remove_treasury_or_gold = minor_treasury_or_gold_value + scope:epidemic_county = { + add_county_modifier = { + modifier = flowers_planted + years = 15 + } + } + stress_impact = { + callous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + zealous = minor_stress_impact_loss + generous = minor_stress_impact_loss + improvident = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + treasury_or_gold < medium_treasury_or_gold_value + } + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = 1 + ai_rationality = 0.5 # Miasma theory may be wrong, but a rational person in the middle ages would probably believe in it + } + } + } + + option = { # What a waste of money + name = epidemic_events.1020.b + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } + stress_impact = { + compassionate = minor_stress_impact_gain + diligent = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = -0.5 + } + } + } +} + +############################ +## Courtiers are self-medicating with leeches +## 1030 +## by James Beaumont +############################ +epidemic_events.1030 = { + type = character_event + title = epidemic_events.1030.t + desc = epidemic_events.1030.desc + theme = plague + override_background = physicians_study + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = shock + camera = camera_event_very_left + } + right_portrait = { + character = scope:leeched_courtier + animation = personality_irrational + } + cooldown = { years = 15 } + trigger = { + # Only if there's a big plague + capital_county = { + any_county_province_epidemic = { + intensity >= major + save_temporary_scope_as = plague_to_check + root = { + # We don't use is_available, because that blocks diseased characters + any_courtier_or_guest = { + is_adult = yes + is_alive = yes + is_in_army = no + is_imprisoned = no + is_incapable = no + has_trait = scope:plague_to_check.epidemic_type.epidemic_trait + save_temporary_scope_as = courtier_temp + } + } + } + } + + } + + immediate = { + capital_county = { + random_county_province = { + limit = { + any_province_epidemic = { + intensity >= major + save_temporary_scope_as = plague_to_check + root = { + # We don't use is_available, because that blocks diseased characters + any_courtier_or_guest = { + is_adult = yes + is_alive = yes + is_in_army = no + is_imprisoned = no + is_incapable = no + has_trait = scope:plague_to_check.epidemic_type.epidemic_trait + } + } + } + } + random_province_epidemic = { + intensity >= major + save_scope_as = epidemic_scope + } + } + } + # We don't use is_available, because that blocks diseased characters + random_courtier_or_guest = { + limit = { + is_adult = yes + is_alive = yes + is_in_army = no + is_imprisoned = no + is_incapable = no + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + save_scope_as = leeched_courtier + } + } + + option = { # Leeches! Leeches for everyone! + name = epidemic_events.1030.a + if = { + limit = { + has_government = landless_adventurer_government + is_ai = no + } + remove_short_term_gold = { 10 20 } + } + random_list = { + 50 = { + desc = epidemic_events.1030.a.success + show_chance = no + send_interface_toast = { + title = epidemic_events.1030.a.success + left_icon = root + right_icon = scope:leeched_courtier + every_courtier_or_guest = { + custom = every_infected_courtier_and_guest + limit = { + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + add_character_modifier = { + modifier = medicating_with_leeches_good + years = 5 + } + add_opinion = { + modifier = grateful_opinion + opinion = 25 + target = root + } + } + if = { + limit = { + root = { + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + add_character_modifier = { + modifier = medicating_with_leeches_good + years = 5 + } + } + if = { + limit = { is_landed = yes } + capital_county = { + add_county_modifier = { + modifier = healthy_court + years = 15 + } + } + } + } + } + 50 = { + desc = epidemic_events.1030.a.failure + show_chance = no + send_interface_toast = { + title = epidemic_events.1030.a.failure + left_icon = root + right_icon = scope:leeched_courtier + every_courtier_or_guest = { + custom = every_infected_courtier_and_guest + limit = { + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + add_opinion = { + modifier = annoyed_opinion + opinion = -30 + target = root + } + } + } + } + } + stress_impact = { + paranoid = medium_stress_impact_loss + impatient = minor_stress_impact_loss + generous = minor_stress_impact_loss + patient = minor_stress_impact_gain + calm = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { # Maybe we should trust in the medical experts + name = epidemic_events.1030.b + every_courtier_or_guest = { + custom = every_infected_courtier_and_guest + limit = { has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait } + add_opinion = { + modifier = angry_opinion + opinion = -15 + target = root + } + } + random = { + chance = 35 + add_learning_skill = 1 + } + stress_impact = { + paranoid = minor_stress_impact_gain + impatient = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +############################ +## Courtiers are becoming flagellants to thwart the plague +## 1040 +## by James Beaumont +############################ +epidemic_events.1040 = { + type = character_event + title = epidemic_events.1040.t + desc = { + desc = epidemic_events.1040.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:chaplain = { + has_trait = flagellant + } + } + desc = epidemic_events.1040.desc.mid.approves + } + desc = epidemic_events.1040.desc.mid + } + } + theme = plague + override_background = { reference = ce1_funeral_pyre } + override_effect_2d = { reference = smoke } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:chaplain + triggered_animation = { + trigger = { + has_trait = flagellant + } + animation = happiness + } + animation = anger + camera = camera_event_right_forward + } + cooldown = { years = 15 } + trigger = { + is_available_adult = yes + # Only if there's a big plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + exists = cp:councillor_court_chaplain + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # They're clearly just perverts + name = epidemic_events.1040.a + if = { + limit = { + scope:chaplain = { has_trait = flagellant } + } + progress_towards_rival_effect = { + CHARACTER = scope:chaplain + REASON = rival_kinkshamed_my_flagellating + OPINION = default_rival_opinion + } + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = persecuted_flagellants + years = 10 + } + } + stress_impact = { + zealous = minor_stress_impact_gain + # Nice self-report bro + flagellant = medium_stress_impact_gain + deviant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = flagellant + } + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { # I'm sure this is fine. This is totally fine. No consequences can arise as a result of this. + name = epidemic_events.1040.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = rampant_flagellants + years = 10 + } + } + stress_impact = { + flagellant = minor_stress_impact_loss # They're just like me fr! + sadistic = minor_stress_impact_loss # I love seeing people in pain + compassionate = minor_stress_impact_gain # I hate seeing people in pain + cynical = minor_stress_impact_gain # I don't believe flagellating makes god love u + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # Maybe they're right! + name = epidemic_events.1040.c + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = rampant_flagellants + years = 10 + } + } + if = { + limit = { + scope:chaplain = { has_trait = flagellant } + } + progress_towards_friend_effect = { + CHARACTER = scope:chaplain + REASON = friend_flagellating_together + OPINION = default_friend_opinion + } + } + if = { + limit = { + NOT = { has_trait = flagellant } + } + add_trait = flagellant + } + stress_impact = { + base = major_stress_impact_loss + craven = minor_stress_impact_gain # pain hurts + arrogant = minor_stress_impact_gain # I don't deserve this + cynical = minor_stress_impact_gain # I don't believe flagellating makes god love me + } + ai_chance = { + base = 0 # Don't do this unless you're already flagellant + modifier = { + add = 50 + has_trait = flagellant + } + } + } +} + +############################ +## Heretics are claiming it's the end of the world +## 1050 +## by James Beaumont +############################ +epidemic_events.1050 = { + type = character_event + title = epidemic_events.1050.t + desc = epidemic_events.1050.desc + theme = plague + override_background = ce1_funeral_pyre + override_effect_2d = { reference = smoke } + left_portrait = { + character = root + animation = pondering + camera = camera_event_center_pointing_right + } + right_portrait = { + character = scope:chaplain + animation = worry + camera = camera_event_right_pointing_right + } + cooldown = { years = 6 } + trigger = { + is_available = yes + # Only if there's a big plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + # You have someone to tell you that this is heresy + exists = cp:councillor_court_chaplain + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # Root them out! + name = epidemic_events.1050.a + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = apocalyptic_inquisition + years = 10 + } + } + stress_impact = { + # What if they're right? D: + zealous = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_zeal = 0.2 + } + } + } + + option = { # Go and debate them + name = epidemic_events.1050.b + duel = { + skill = learning + value = high_skill_rating + # Success: the plague cult is silenced + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.1050.b.tt.success + root = { + send_interface_toast = { + title = epidemic_events.1050.b.tt.success + left_icon = scope:chaplain + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + } + } + } + # Failure: the plague cult still happens + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.1050.b.tt.failure + root = { + send_interface_toast = { + title = epidemic_events.1050.b.tt.failure + left_icon = scope:chaplain + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = plague_cult + years = 10 + } + } + } + } + } + } + stress_impact = { + cynical = minor_stress_impact_gain + lazy = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + ai_greed = -1 + } + } + } + + option = { # Just ignore it + name = epidemic_events.1050.c + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = plague_cult + years = 10 + } + } + stress_impact = { + diligent = minor_stress_impact_gain + just = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } +} + +############################ +## People blaming the plague on witches/animals event chain +## 1060 +## by James Beaumont +############################ +epidemic_events.1060 = { + type = character_event + title = epidemic_events.1060.t + window = big_event_window + override_effect_2d = { reference = rain } + desc = { + desc = epidemic_events.1060.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + desc = epidemic_events.1060.desc.mid.cats + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:dogs + } + } + desc = epidemic_events.1060.desc.mid.dogs + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:faith + } + } + desc = epidemic_events.1060.desc.mid.faith + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + NOT = { var:trait_blamed = trait:witch } + } + } + desc = epidemic_events.1060.desc.mid.trait + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + var:trait_blamed = trait:witch + } + } + desc = epidemic_events.1060.desc.mid2.witches + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + } + } + desc = epidemic_events.1060.desc.mid2.sin + } + } + desc = epidemic_events.1060.desc.outro + } + theme = plague + left_portrait = { + character = root + animation = stress + } + cooldown = { years = 15 } + trigger = { + is_available_adult = yes + # Only if there's a big plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + create_story = plague_witch_hunt + random_owned_story = { + type = plague_witch_hunt + save_scope_as = story_scope + # This is used to keep track of which epidemic is the source of people blaming the plague on some group + set_variable = { + name = plague + value = scope:epidemic_scope + } + random_list = { + 30 = { + # blamed_pague_on determines what or who has been blamed for the plague + set_variable = { + name = blamed_plague_on + value = flag:cats + } + } + 20 = { + trigger = { + NOT = { + # No attacking the puppos for Zoroastrians and Canary Islanders + root.faith.religion = religion:zoroastrianism_religion + root.faith.religion = religion:north_african_religion + } + } + set_variable = { + name = blamed_plague_on + value = flag:dogs + } + } + 20 = { # Religious minorities + root = { select_scapegoat_faith_effect = yes } + set_variable = { + name = blamed_plague_on + value = flag:faith + } + set_variable = { + name = faith_blamed + value = scope:faith_to_blame + } + } + 20 = { + trigger = { + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = witch + FAITH = root.faith + GENDER_CHARACTER = root + } + } + set_variable = { + name = blamed_plague_on + value = flag:trait + } + set_variable = { + name = trait_blamed + value = trait:witch + } + } + 20 = { + random_trait_in_category = { + category = personality + limit = { + save_temporary_scope_as = sin_trait_to_check + root.faith = { + trait_is_sin = scope:sin_trait_to_check + } + } + save_scope_as = sinful_trait + } + set_variable = { + name = blamed_plague_on + value = flag:trait + } + set_variable = { + name = trait_blamed + value = scope:sinful_trait + } + } + } + } + } + + option = { # Am I not an authority on religious matters? This is heresy! + name = epidemic_events.1060.c + reason = piety_level + trigger = { + piety_level >= very_high_piety_level + } + custom_tooltip = witch_trial_story_tt + if = { + limit = { + scope:story_scope = { + exists = var:faith_blamed + var:faith_blamed.religion = religion:judaism_religion + } + } + add_character_modifier = { + modifier = protected_jews + years = 10 + } + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = divine_guidance + years = 10 + } + } + add_piety = medium_piety_gain + ai_chance = { # This is the objectively best option, the AI should generally pick it if they're not insane + base = 1000 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 1 + ai_zeal = 1 + } + } + } + + option = { # How awful! + name = epidemic_events.1060.a + custom_tooltip = witch_trial_story_tt + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = rampant_witch_trials + years = 10 + } + } + stress_impact = { + diligent = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_zeal = 0.2 + } + } + } + + option = { # Stop this madness in the name of your king! + name = epidemic_events.1060.b + custom_tooltip = witch_trial_story_tt + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = witch_trials_slowed + years = 10 + } + } + stress_impact = { + zealous = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 0.5 + } + } + } +} + +############################ +## People are burning cats/dogs +## 1061 +## by James Beaumont +############################ +epidemic_events.1061 = { + type = character_event + window = big_event_window + title = epidemic_events.1061.t + desc = { + desc = epidemic_events.1061.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + desc = epidemic_events.1061.desc.mid.cats + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:dogs + } + } + desc = epidemic_events.1061.desc.mid.dogs + } + } + desc = epidemic_events.1061.desc.outro + } + theme = plague + override_background = { reference = ce1_funeral_pyre } + override_effect_2d = { + reference = smoke + } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:chaplain + animation = shock + } + cooldown = { years = 5 } + trigger = { + scope:story_scope = { + OR = { + var:blamed_plague_on = flag:cats + var:blamed_plague_on = flag:dogs + } + } + exists = cp:councillor_court_chaplain + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # I declare cats/dogs to be the royal animal of the realm! + name = epidemic_events.1061.c + reason = prestige_level + trigger = { + prestige_level >= very_high_prestige_level + } + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + if = { + limit = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + add_character_modifier = { + modifier = royal_cats + years = 25 + } + } + else_if = { + limit = { + var:blamed_plague_on = flag:dogs + } + add_character_modifier = { + modifier = royal_dogs + years = 25 + } + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = plague_animals_loose + years = 5 + } + } + custom_tooltip = cats_and_dogs_trial_will_end_tt + hidden_effect = { + scope:story_scope = { end_story = yes } + } + ai_chance = { # This is the objectively best option, the AI should generally pick it if they're not insane + base = 1000 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 1 + ai_zeal = 1 + } + } + } + + option = { # Well, nothing I can do unfortunately + name = epidemic_events.1061.a + custom_tooltip = unforseen_consequences_tt + hidden_effect = { + random_list = { + 50 = { + send_interface_toast = { + title = epidemic_events.1061.a.success + left_icon = root + custom_tooltip = burning_animals_does_nothing_tt + } + } + 50 = { + send_interface_toast = { + title = epidemic_events.1061.a.failure + left_icon = root + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = lacking_cats_and_dogs + years = 10 + } + } + } + } + } + } + stress_impact = { + diligent = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = -0.5 + } + } + } + + option = { # Try to stop them! + name = epidemic_events.1061.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = plague_animals_loose + years = 10 + } + } + add_legitimacy = miniscule_legitimacy_loss + stress_impact = { + lazy = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + ai_energy = 0.5 + } + } + } +} + +############################ +## A skilled cat/dog-catcher offers to round them all up +## 1062 +## by James Beaumont +############################ +epidemic_events.1062 = { + type = character_event + window = big_event_window + override_background = throne_room + title = epidemic_events.1062.t + desc = { + desc = epidemic_events.1062.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + desc = epidemic_events.1062.desc.mid.cats + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:dogs + } + } + desc = epidemic_events.1062.desc.mid.dogs + } + } + desc = epidemic_events.1062.desc.outro + } + theme = plague + left_portrait = { + character = root + animation = pondering + camera = camera_event_scheme_center + } + center_portrait = { + character = scope:poacher_1 + animation = hunting_knife_start + camera = camera_event_scheme_far_right + } + right_portrait = { + character = scope:poacher_2 + animation = bow_idle + } + cooldown = { years = 5 } + trigger = { + scope:story_scope = { + OR = { + var:blamed_plague_on = flag:cats + var:blamed_plague_on = flag:dogs + } + } + } + + immediate = { + create_character = { + template = generic_peasant_character + location = root.location + culture = root.culture + faith = root.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = poacher_1 + after_creation = { + add_character_flag = created + } + } + create_character = { + template = generic_peasant_character + location = root.location + culture = root.culture + faith = root.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = poacher_2 + after_creation = { + add_character_flag = created + } + } + } + + option = { # I declare cats/dogs to be the royal animal of the realm! + name = epidemic_events.1061.c + reason = prestige_level + trigger = { + prestige_level >= very_high_prestige_level + } + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + if = { + limit = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + add_character_modifier = { + modifier = royal_cats + years = 25 + } + } + else_if = { + limit = { + var:blamed_plague_on = flag:dogs + } + add_character_modifier = { + modifier = royal_dogs + years = 25 + } + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = plague_animals_loose + years = 5 + } + } + custom_tooltip = cats_and_dogs_trial_will_end_tt + hidden_effect = { + scope:story_scope = { end_story = yes } + } + ai_chance = { # This is the objectively best option, the AI should generally pick it if they're not insane + base = 1000 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 1 + ai_zeal = 1 + } + } + } + + option = { # Catch them and kill them! + name = epidemic_events.1062.a + custom_tooltip = unforseen_consequences_tt + hidden_effect = { + random_list = { + 33 = { + send_interface_toast = { + title = epidemic_events.1062.a.no_effect + left_icon = root + } + } + 33 = { + send_interface_toast = { + title = epidemic_events.1062.a.success + left_icon = root + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = lacking_cats_and_dogs_good + years = 10 + } + } + } + } + 33 = { + send_interface_toast = { + title = epidemic_events.1062.a.failure + left_icon = root + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = lacking_cats_and_dogs + years = 10 + } + } + } + } + } + } + stress_impact = { + diligent = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = -0.5 + } + } + } + + option = { # Catch them and bring them to the capital + name = epidemic_events.1062.b + custom_tooltip = unforseen_consequences_tt + hidden_effect = { + random_list = { + 77 = { + send_interface_toast = { + title = epidemic_events.1062.b.no_effect + left_icon = root + } + } + 33 = { + send_interface_toast = { + title = epidemic_events.1062.b.failure + left_icon = root + capital_county = { + add_county_modifier = { + modifier = full_of_rabid_animals + years = 10 + } + } + } + } + } + } + stress_impact = { + lazy = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + ai_energy = 0.5 + } + } + } + after = { + scope:poacher_1 = { + silent_disappearance_ai_effect = yes + } + scope:poacher_2 = { + silent_disappearance_ai_effect = yes + } + } +} + +############################ +## Repent! Repent! Adopt a virtuous trait like right now! +## 1063 +## by James Beaumont +############################ +epidemic_events.1063 = { + type = character_event + window = big_event_window + title = epidemic_events.1063.t + desc = { + desc = epidemic_events.1063.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:faith + } + } + desc = epidemic_events.1063.desc.mid.faith + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + NOT = { var:trait_blamed = trait:witch } + } + } + desc = epidemic_events.1063.desc.mid.sin + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + var:trait_blamed = trait:witch + } + } + desc = epidemic_events.1063.desc.mid.witch + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + desc = epidemic_events.1063.desc.mid.cats + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:dogs + } + } + desc = epidemic_events.1063.desc.mid.dogs + } + } + desc = epidemic_events.1063.desc.outro + } + theme = plague + override_effect_2d = { + reference = rain + } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:priest + animation = debating + } + cooldown = { years = 5 } + trigger = { + is_available_adult = yes + # Make sure that ROOT doesn't have literally every virtuous trait in their faith + any_trait_in_category = { + category = personality + save_temporary_scope_as = random_virtue_trait_trigger + root = { + NOT = { has_trait = prev } + } + root.faith = { trait_is_virtue = scope:random_virtue_trait_trigger } + } + # Root has something to repent for + OR = { + num_sinful_traits >= 1 + AND = { + is_witch_trigger = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = witch + FAITH = root.faith + GENDER_CHARACTER = root + } + } + AND = { + is_incestuous_trigger = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = incestuous + FAITH = root.faith + GENDER_CHARACTER = root + } + } + AND = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + has_cat_trigger = yes + } + AND = { + scope:story_scope = { + var:blamed_plague_on = flag:dogs + } + has_dog_trigger = yes + } + } + } + + immediate = { + # Determine the trait to be super into + random_trait_in_category = { + category = personality + limit = { + save_temporary_scope_as = random_virtue_trait + root = { + NOT = { has_trait = prev } + } + root.faith = { trait_is_virtue = scope:random_virtue_trait } + } + save_scope_as = virtuous_trait + } + + # Create a priest + create_character = { + template = priest_character_template + location = root.location + culture = root.culture + faith = root.faith + save_scope_as = priest + } + } + + option = { # Uhhh actually, he speaks the bullshit! + name = epidemic_events.1063.c + reason = piety_level + trigger = { + piety_level >= very_high_piety_level + } + duel = { + skill = learning + value = high_skill_rating + # Success: you are able to argue you're good actually + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.1063.c.success + send_interface_toast = { + title = epidemic_events.1063.c.success + left_icon = root + add_piety = major_piety_gain + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + } + } + # Failure: people are still into it + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.1063.c.failure + send_interface_toast = { + title = epidemic_events.1063.c.failure + left_icon = root + add_legitimacy = miniscule_legitimacy_loss + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = refused_to_repent + years = 10 + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 2 + ai_zeal = 1 + } + } + } + + option = { # I repent! I repent! + name = epidemic_events.1063.a + if = { + limit = { + scope:virtuous_trait = { + any_opposite_trait = { + root = { has_trait = prev } + } + } + } + scope:virtuous_trait = { + random_opposite_trait = { + limit = { + root = { has_trait = prev } + } + root = { + remove_trait = prev + } + } + } + } + if = { + limit = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + var:trait_blamed = trait:witch + } + is_witch_trigger = yes + } + remove_witch_secret_or_trait_effect = yes + } + add_trait_force_tooltip = scope:virtuous_trait + stress_impact = { + base = massive_stress_impact_gain + lazy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 # This is a very rash decision + ai_energy = -0.5 # This is a very hard decision + ai_zeal = 0.5 # This is a very religious decision + } + } + } + + option = { # What a load of bollocks + name = epidemic_events.1063.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = refused_to_repent + years = 10 + } + } + add_legitimacy = miniscule_legitimacy_loss + stress_impact = { + base = minor_stress_impact_gain + cynical = medium_stress_impact_loss # Am I *really* a sinner tho? + zealous = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_zeal = -0.5 + } + } + } +} + +############################ +## Witch trials +## 1064 +## by James Beaumont +############################ +epidemic_events.1064 = { + type = character_event + window = big_event_window + title = epidemic_events.1064.t + desc = { + desc = epidemic_events.1064.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + NOT = { var:trait_blamed = trait:witch } + } + } + desc = epidemic_events.1064.desc.mid.sin + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + var:trait_blamed = trait:witch + } + } + desc = epidemic_events.1064.desc.mid.witch + } + } + desc = epidemic_events.1064.desc.outro + } + theme = plague + override_background = { reference = ce1_funeral_pyre } + override_effect_2d = { + reference = rain + } + left_portrait = { + character = root + animation = worry + } + cooldown = { years = 5 } + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + } + any_sub_realm_county = { + development_level >= 3 + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + development_level >= 3 + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + save_scope_as = witch_trial_county + } + } + + option = { # Let me make a well-formulated argument that sinning is fine actually + name = epidemic_events.1064.c + reason = piety_level + trigger = { + piety_level >= high_piety_level + } + duel = { + skill = learning + value = high_skill_rating + # Success: you are able to argue you're good actually + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.1064.c.success + send_interface_toast = { + title = epidemic_events.1064.c.success + left_icon = root + add_piety = medium_piety_gain + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + } + } + # Failure: people are still into it + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.1064.c.failure + send_interface_toast = { + title = epidemic_events.1064.c.failure + left_icon = root + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = witch_trials_obstructed + years = 10 + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 2 + ai_zeal = 1 + } + } + } + + option = { # The witch trials are fine maybe probably + name = epidemic_events.1064.a + scope:witch_trial_county = { + change_development_level = -2 + change_county_control = -100 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.2 + ai_honor = -0.5 + ai_zeal = 0.5 + } + } + } + + option = { # Stop it! Stop it right now! + name = epidemic_events.1064.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = witch_trials_obstructed + years = 15 + } + } + add_legitimacy = miniscule_legitimacy_loss + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.2 + ai_honor = 0.5 + ai_zeal = -0.5 + } + } + } +} + +############################ +## Walk of shame +## 1065 +## by James Beaumont +############################ +scripted_trigger epidemic_events_1065_has_blamed_trait = { + is_ruler = no + location = root.location + OR = { + has_trait = scope:story_scope.var:trait_blamed + AND = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + NOT = { var:trait_blamed = trait:witch } + } + is_witch_trigger = yes + } + } +} + +epidemic_events.1065 = { + type = character_event + window = big_event_window + title = epidemic_events.1065.t + desc = { + desc = epidemic_events.1065.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + NOT = { var:trait_blamed = trait:witch } + } + } + desc = epidemic_events.1065.desc.mid.sin + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + var:trait_blamed = trait:witch + } + } + desc = epidemic_events.1065.desc.mid.witch + } + } + desc = epidemic_events.1065.desc.outro + } + theme = plague + override_background = corridor_night + left_portrait = { + character = root + animation = stress + camera = camera_torso_scheme_player + } + right_portrait = { + character = scope:shamed_buddy + animation = shock + camera = camera_torso_scheme_target + } + cooldown = { years = 5 } + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + } + OR = { + # Prioritise spouses + any_spouse = { + epidemic_events_1065_has_blamed_trait = yes + } + # Family members + any_close_or_extended_family_member = { + epidemic_events_1065_has_blamed_trait = yes + } + # Lovers + any_relation = { + type = lover + epidemic_events_1065_has_blamed_trait = yes + } + # Friends + any_relation = { + type = friend + epidemic_events_1065_has_blamed_trait = yes + } + # Concubines + any_consort = { + epidemic_events_1065_has_blamed_trait = yes + } + } + } + + immediate = { + if = { + limit = { + any_spouse = { + epidemic_events_1065_has_blamed_trait = yes + } + } + random_spouse = { + limit = { + epidemic_events_1065_has_blamed_trait = yes + } + save_scope_as = shamed_buddy + } + } + else_if = { + limit = { + any_close_or_extended_family_member = { + epidemic_events_1065_has_blamed_trait = yes + } + } + random_close_or_extended_family_member = { + limit = { + epidemic_events_1065_has_blamed_trait = yes + } + save_scope_as = shamed_buddy + } + } + else_if = { + limit = { + any_relation = { + type = lover + epidemic_events_1065_has_blamed_trait = yes + } + } + random_relation = { + type = lover + limit = { + epidemic_events_1065_has_blamed_trait = yes + } + save_scope_as = shamed_buddy + } + } + else_if = { + limit = { + any_relation = { + type = friend + epidemic_events_1065_has_blamed_trait = yes + } + } + random_relation = { + type = friend + limit = { + epidemic_events_1065_has_blamed_trait = yes + } + save_scope_as = shamed_buddy + } + } + else_if = { + limit = { + any_consort = { + epidemic_events_1065_has_blamed_trait = yes + } + } + random_consort = { + limit = { + epidemic_events_1065_has_blamed_trait = yes + } + save_scope_as = shamed_buddy + } + } + } + + option = { # I will take your place, buddy + name = epidemic_events.1065.c + trigger = { + has_trait = august + } + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } + increase_wounds_no_death_effect = { REASON = beaten } + upgrade_to_friend_effect = { + CHARACTER = scope:shamed_buddy + REASON = friend_walk_of_shame + } + stress_impact = { + base = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + humble = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + gregarious = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -2 + ai_sociability = 1 + ai_zeal = 1 + } + } + } + + option = { # Just do it, buddy + name = epidemic_events.1065.a + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } + scope:shamed_buddy = { + add_prestige = massive_prestige_loss + hidden_effect = { + increase_wounds_no_death_effect = { REASON = beaten } + increase_wounds_no_death_effect = { REASON = beaten } + } + show_as_tooltip = { + add_trait = wounded_2 + } + } + stress_impact = { + just = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.2 + ai_honor = -0.5 + ai_sociability = -1 + ai_zeal = 0.5 + } + } + } + + option = { # Absolutely not! + name = epidemic_events.1065.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = witch_trials_obstructed + years = 10 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.2 + ai_honor = 0.5 + ai_sociability = 0.5 + ai_zeal = -0.5 + } + } + } +} + +############################ +## Peasants are forcing minorities out +## 1066-1067 +## by James Beaumont +############################ +epidemic_events.1066 = { + type = character_event + window = big_event_window + title = epidemic_events.1066.t + desc = epidemic_events.1066.desc + theme = plague + override_background = burning_building + override_effect_2d = { reference = smoke } + left_portrait = { + character = root + animation = grief + } + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:faith + } + } + cooldown = { years = 5 } + + immediate = { + add_legitimacy = miniscule_legitimacy_loss + } + + option = { # Offer minorities asylum in the capital + name = epidemic_events.1066.c + trigger = { + has_trait = administrator + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + this != root.capital_county + } + change_development_progress = -50 + } + capital_county = { + change_development_progress_with_overflow = 50 + add_county_modifier = { + modifier = persecuted_minorities_protected + years = 15 + } + } + stress_impact = { + zealous = minor_stress_impact_gain # I'm a fundementalist + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_compassion = 1 + ai_zeal = -0.5 + } + } + } + + option = { # Forbid the expulsion + name = epidemic_events.1066.a + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + this != root.capital_county + } + change_county_control = major_county_control_loss + add_county_modifier = { + modifier = minority_persecution_forbidden + years = 10 + } + if = { + limit = { + faith = scope:faith_blamed + } + random = { + chance = 35 + set_county_faith = root.faith + } + } + } + stress_impact = { + zealous = minor_stress_impact_gain # I'm a fundementalist + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 1 + ai_zeal = -1 + } + } + } + + option = { # Oof, sure fine, let them be expelled + name = epidemic_events.1066.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + change_development_progress = -50 + add_county_modifier = { + modifier = persecuted_minorities_expelled + years = 10 + } + } + hidden_effect = { + save_scope_as = bigoted_ruler_that_everyone_hates + if = { + limit = { + any_neighboring_and_across_water_top_liege_realm_owner = { + is_alive = yes + any_character_to_title_neighboring_and_across_water_county = { + holder.top_liege = scope:bigoted_ruler_that_everyone_hates + } + } + } + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + is_alive = yes + any_character_to_title_neighboring_and_across_water_county = { + holder.top_liege = scope:bigoted_ruler_that_everyone_hates + } + } + trigger_event = { + id = epidemic_events.1067 + days = { 3 10 } + } + } + } + } + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + diligent = minor_stress_impact_gain + gallant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_compassion = -1 + ai_honor = -0.5 + ai_zeal = 0.5 + } + } + } +} + +# Response event for a neighbouring ruler +epidemic_events.1067 = { + type = character_event + title = epidemic_events.1067.t + desc = epidemic_events.1067.desc + theme = plague + left_portrait = { + character = root + animation = thinking + } + + option = { # Funnel them all into the capital + name = epidemic_events.1067.c + trigger = { + has_trait = administrator + } + capital_county = { + change_development_progress_with_overflow = 150 + add_county_modifier = { + modifier = plague_minorities_sanctuary_boosted + years = 10 + } + } + stress_impact = { + paranoid = minor_stress_impact_gain + zealous = minor_stress_impact_gain + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_compassion = 1 + ai_zeal = -0.5 + } + } + } + + option = { # Oh cool, welcome! + name = epidemic_events.1067.a + scope:bigoted_ruler_that_everyone_hates = { + every_character_to_title_neighboring_and_across_water_county = { + custom = every_bordering_county + change_development_progress = 50 + add_county_modifier = { + modifier = plague_minorities_sanctuary + years = 10 + } + } + } + stress_impact = { + paranoid = minor_stress_impact_gain # Foreigners? They could be spies! + zealous = minor_stress_impact_gain # I'm a fundementalist + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 1 + ai_zeal = -1 + } + } + } + + option = { # Well, they can't come 'ere + name = epidemic_events.1067.b + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + diligent = minor_stress_impact_gain + greedy = minor_stress_impact_gain + gallant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_compassion = -1 + ai_honor = -0.5 + ai_zeal = 0.5 + } + } + } +} + +############################ +## Nobles are struggling to get loans +## 1068 +## by James Beaumont +############################ +epidemic_events.1068 = { + type = character_event + window = big_event_window + title = epidemic_events.1068.t + desc = epidemic_events.1068.desc + theme = plague + override_background = throne_room + left_portrait = { + character = root + animation = stunned + } + right_portrait = { + character = scope:loneless_vassal + animation = obsequious_bow + triggered_outfit = { + remove_default_outfit = no + outfit_tags = { beggar_rags } + } + } + cooldown = { years = 5 } + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:faith + } + any_vassal = { + is_landed_or_landless_administrative = yes # No unlanded HoFs + exists = capital_county # No barons + highest_held_title_tier >= tier_county + any_sub_realm_county = { + any_county_province_epidemic = { + this = scope:epidemic_scope + } + } + } + } + + immediate = { + random_vassal = { + limit = { + is_landed_or_landless_administrative = yes + exists = capital_county + highest_held_title_tier >= tier_county + any_sub_realm_county = { + any_county_province_epidemic = { + this = scope:epidemic_scope + } + } + } + weight = { + base = 1 + # Get guys who would likely wanna take loans + modifier = { + add = 10 + gold <= 0 + } + modifier = { + add = 10 + gold <= minor_gold_value + } + modifier = { + add = 5 + OR = { + has_trait = greedy + has_trait = profligate + } + } + } + save_scope_as = loneless_vassal + } + } + + option = { # Try to make your vassal's realm a safe place for them + name = epidemic_events.1068.a + progress_towards_friend_effect = { + CHARACTER = scope:loneless_vassal + OPINION = default_friend_opinion + REASON = friend_plague_financial_help + } + scope:loneless_vassal = { + every_sub_realm_county = { + custom = all_of_vassals_holding + change_development_progress = 15 + add_county_modifier = { + modifier = persecuted_minorities_financial_sanctuary + years = 10 + } + } + } + stress_impact = { + zealous = minor_stress_impact_gain # I'm a fundementalist + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 1 + ai_zeal = -1 + } + } + } + + option = { # I'll offer you a loan! + name = epidemic_events.1068.b + progress_towards_friend_effect = { + CHARACTER = scope:loneless_vassal + OPINION = default_friend_opinion + REASON = friend_plague_financial_help + } + if = { + limit = { + scope:loneless_vassal = { + vassal_contract_obligation_level_can_be_increased = feudal_government_taxes + } + } + scope:loneless_vassal = { + vassal_contract_increase_obligation_level = feudal_government_taxes + } + } + else = { + add_hook = { + target = scope:loneless_vassal + type = indebted_hook + } + } + pay_short_term_gold = { + target = scope:loneless_vassal + gold = { + if = { + limit = { + scope:loneless_vassal.gold < 0 + } + add = scope:loneless_vassal.gold + multiply = -1 + } + min = tiny_gold_value + } + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + gold < major_gold_value + } + ai_value_modifier = { + ai_rationality = 1 + ai_greed = 1 + ai_honor = -0.5 + ai_zeal = 0.5 + } + } + } + + option = { # Not my fuckin problem + name = epidemic_events.1068.c + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + progress_towards_rival_effect = { + CHARACTER = scope:loneless_vassal + OPINION = 0 + REASON = rival_refused_to_help_my_loans + } + stress_impact = { + lazy = minor_stress_impact_loss + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_greed = 1 + ai_honor = -0.5 + ai_zeal = 0.5 + } + } + } +} + +############################ +## Informed of plague showing up // Plague notification event +## 1100 +## by James Beaumont +############################ +epidemic_events.1100 = { + type = character_event + title = epidemic_events.1100.t + desc = { + first_valid = { # How bad is the disease? + triggered_desc = { + trigger = { + scope:epidemic = { + outbreak_intensity = major + } + } + desc = epidemic_events.1100.desc.intro.major + } + desc = epidemic_events.1100.desc.intro.fallback + } + first_valid = { # How important is the county it appeared in? + triggered_desc = { + trigger = { + scope:infected_county = { + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + } + } + desc = epidemic_events.1100.desc.intro2.holy_site + } + triggered_desc = { + trigger = { + scope:infected_county = { + OR = { + this = root.capital_county + development_level >= 20 + } + } + } + desc = epidemic_events.1100.desc.intro2.cool_place + } + desc = epidemic_events.1100.desc.intro2.backwater + } + first_valid = { + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:typhus + } + } + desc = epidemic_events.1100.desc.mid.typhus + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + desc = epidemic_events.1100.desc.mid.bubonic_plague + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:smallpox + } + } + desc = epidemic_events.1100.desc.mid.smallpox + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:measles + } + } + desc = epidemic_events.1100.desc.mid.measles + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:dysentery + } + } + desc = epidemic_events.1100.desc.mid.dysentery + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:ergotism + } + } + desc = epidemic_events.1100.desc.mid.ergotism + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:consumption + } + } + desc = epidemic_events.1100.desc.mid.consumption + } + desc = epidemic_events.1100.desc.mid.fallback + } + first_valid = { + triggered_desc = { + trigger = { + scope:infected_county = root.capital_county + } + desc = epidemic_events.1100.desc.outro.capital + } + desc = epidemic_events.1100.desc.outro + } + first_valid = { + triggered_desc = { + trigger = { + scope:epidemic = { + outbreak_intensity = major + } + } + desc = epidemic_events.1100.desc.mid2.major + } + desc = epidemic_events.1100.desc.mid2.fallback + } + } + theme = plague + override_effect_2d = { + reference = smoke + } + left_portrait = { + character = root + animation = stress + } + + trigger = { + is_available = yes + NOR = { # Don't repeatedly inform the player of the same plague over and over + is_target_in_variable_list = { + name = plagues_notified + target = scope:epidemic + } + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + } + + immediate = { + scope:province.county = { + save_scope_as = infected_county + } + add_to_variable_list = { + name = plagues_notified + target = scope:epidemic + } + # LEGITIMACY LOSS FROM OUTBREAK + if = { + limit = { scope:infected_county.holder ?= this } + show_as_tooltip = { + scope:epidemic = { + epidemic_outbreak_legitimacy_effect = { PROVINCE = scope:province } + } + } + } + add_plague_county_modifiers = yes + } + + option = { # Damn :pensive: + name = { + text = { + first_valid = { + random_valid = { + triggered_desc = { + trigger = { + has_trait = scope:epidemic.epidemic_type.epidemic_trait + } + desc = epidemic_events.1100.a.already_has_it + } + triggered_desc = { + trigger = { + has_trait = compassionate + } + desc = epidemic_events.1100.a.compassionate + } + triggered_desc = { + trigger = { + has_trait = eccentric + } + desc = epidemic_events.1100.a.eccentric + } + triggered_desc = { + trigger = { + is_cannibal_trigger = yes + } + desc = epidemic_events.1100.a.cannibal + } + triggered_desc = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + desc = epidemic_events.1100.a.callous + } + triggered_desc = { + trigger = { + OR = { + has_trait = diligent + has_trait = just + } + } + desc = epidemic_events.1100.a.diligent + } + triggered_desc = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + } + } + desc = epidemic_events.1100.a.paranoid + } + triggered_desc = { + trigger = { + OR = { + has_trait = brave + has_trait = arrogant + } + } + desc = epidemic_events.1100.a.brave + } + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = epidemic_events.1100.a.zealous + } + } + desc = epidemic_events.1100.a + } + } + } + + if = { # Admin governors lose a bit of trait XP if they don't try to do something + limit = { + is_governor = yes + has_trait = governor + } + increase_governance_effect = { VALUE = -2 } + } + + ai_chance = { + base = 100 + } + } + + option = { # Call the physician! + name = epidemic_events.1100.b + trigger = { + exists = court_position:court_physician_court_position + } + reason = physician + custom_tooltip = { + text = physician_will_help_epidemic_tt + court_position:court_physician_court_position = { save_scope_as = physician } + trigger_event = { + id = physician_epidemic_events.1020 + days = 3 + } + } + ai_chance = { + base = 100 + } + } + + option = { # Call a physician! + name = epidemic_events.1100.c + trigger = { + NOT = { exists = court_position:court_physician_court_position } + OR = { # prevent stacking treatment + top_liege = this + is_ai = no + } + } + custom_tooltip = { + text = look_for_physician_epidemic_tt + add_character_flag = { flag = seeking_epidemic_treatment days = 30 } + trigger_event = { + id = health.3001 days = { court_physician_search_min court_physician_search_max } + } + } + ai_chance = { + base = 100 + } + } +} + +#Informed of an apocalyptic plague +epidemic_events.1101 = { + type = character_event + window = fullscreen_event + title = epidemic_events.1100.t + desc = { + desc = epidemic_events.1100.desc.intro.apocalyptic + first_valid = { # How important is the county it appeared in? + triggered_desc = { + trigger = { + scope:infected_county = { + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + } + } + desc = epidemic_events.1100.desc.intro2.holy_site + } + triggered_desc = { + trigger = { + scope:infected_county = { + OR = { + this = root.capital_county + development_level >= 20 + } + } + } + desc = epidemic_events.1100.desc.intro2.cool_place + } + desc = epidemic_events.1100.desc.intro2.backwater + } + first_valid = { + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:typhus + } + } + desc = epidemic_events.1100.desc.mid.typhus + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + desc = epidemic_events.1100.desc.mid.bubonic_plague + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:smallpox + } + } + desc = epidemic_events.1100.desc.mid.smallpox + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:measles + } + } + desc = epidemic_events.1100.desc.mid.measles + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:dysentery + } + } + desc = epidemic_events.1100.desc.mid.dysentery + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:ergotism + } + } + desc = epidemic_events.1100.desc.mid.ergotism + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:consumption + } + } + desc = epidemic_events.1100.desc.mid.consumption + } + desc = epidemic_events.1100.desc.mid.fallback + } + first_valid = { + triggered_desc = { + trigger = { + scope:infected_county = root.capital_county + } + desc = epidemic_events.1100.desc.outro.capital + } + desc = epidemic_events.1100.desc.outro + } + desc = epidemic_events.1100.desc.mid2.apocalyptic + } + theme = plague + override_background = { reference = ce1_fullscreen_apocalyptic } + + trigger = { + is_available = yes + OR = { + AND = { + has_dlc_feature = legends_of_the_dead + NOR = { # Don't repeatedly inform the player of the same plague over and over + is_target_in_variable_list = { + name = plagues_notified + target = scope:epidemic + } + # There's a special event for the Black Plague + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + } + AND = { + NOT = { # Don't repeatedly inform the player of the same plague over and over + is_target_in_variable_list = { + name = plagues_notified + target = scope:epidemic + } + } + NOT = { has_dlc_feature = legends_of_the_dead } + } + } + } + + immediate = { + play_music_cue = apocalyptic_plague + scope:province.county = { + save_scope_as = infected_county + } + add_to_variable_list = { + name = plagues_notified + target = scope:epidemic + } + # LEGITIMACY LOSS FROM OUTBREAK + if = { + limit = { scope:infected_county.holder ?= this } + show_as_tooltip = { + scope:epidemic = { + epidemic_outbreak_legitimacy_effect = { PROVINCE = scope:province } + } + } + } + add_plague_county_modifiers = yes + } + + option = { # Damn :pensive: + name = { + text = { + first_valid = { + random_valid = { + triggered_desc = { + trigger = { + has_trait = scope:epidemic.epidemic_type.epidemic_trait + } + desc = epidemic_events.1100.a.already_has_it + } + triggered_desc = { + trigger = { + has_trait = compassionate + } + desc = epidemic_events.1100.a.compassionate + } + triggered_desc = { + trigger = { + has_trait = eccentric + } + desc = epidemic_events.1100.a.eccentric + } + triggered_desc = { + trigger = { + is_cannibal_trigger = yes + } + desc = epidemic_events.1100.a.cannibal + } + triggered_desc = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + desc = epidemic_events.1100.a.callous + } + triggered_desc = { + trigger = { + OR = { + has_trait = diligent + has_trait = just + } + } + desc = epidemic_events.1100.a.diligent + } + triggered_desc = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + } + } + desc = epidemic_events.1100.a.paranoid + } + triggered_desc = { + trigger = { + OR = { + has_trait = brave + has_trait = arrogant + } + } + desc = epidemic_events.1100.a.brave + } + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = epidemic_events.1100.a.zealous + } + } + desc = epidemic_events.1100.a + } + } + } + + ai_chance = { + base = 100 + } + } + + option = { # Call the physician! + name = epidemic_events.1100.b + trigger = { + OR = { # prevent stacking treatment + top_liege = this + is_ai = no + } + } + if = { + limit = { + NOT = { exists = court_position:court_physician_court_position } + } + custom_tooltip = { + text = look_for_physician_epidemic_tt + add_character_flag = { flag = seeking_epidemic_treatment days = 30 } + trigger_event = { + id = health.3001 days = { court_physician_search_min court_physician_search_max } + } + } + } + else = { + custom_tooltip = { + text = physician_will_help_epidemic_tt + court_position:court_physician_court_position = { save_scope_as = physician } + trigger_event = { + id = physician_epidemic_events.1020 + days = 3 + } + } + } + ai_chance = { + base = 100 + } + } +} + +############################ +## Common graves for your graveyard? +## 1110 +## by James Beaumont +############################ +epidemic_events.1110 = { + type = character_event + title = epidemic_events.1110.t + desc = epidemic_events.1110.desc + theme = plague + left_portrait = { + character = root + animation = pondering + camera = camera_event_left_away_3_4 + } + right_portrait = { + character = scope:chaplain + animation = beg + camera = camera_event_right_away + } + override_effect_2d = { reference = flies } + + cooldown = { years = 10 } + + trigger = { + is_available = yes + any_held_title = { + title_tier = county + any_county_province = { + has_building_or_higher = burial_site_01 + } + } + # Only if there's a big plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + any_courtier_or_guest = { + is_available_ai_adult = yes + } + } + + immediate = { + random_held_title = { + title_tier = county + limit = { + any_county_province = { + has_building_or_higher = burial_site_01 + } + } + save_scope_as = graveyard_county + } + get_random_nearby_realm_epidemic = { INTENSITY = major } + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + } + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + else = { + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = chaplain + } + } + } + + option = { # Okay, let's make room for common graves :eyeroll: + name = epidemic_events.1110.a + scope:graveyard_county = { + add_county_modifier = { + modifier = ce1_common_graves + years = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_rationality = 1 + ai_vengefulness = -0.5 + } + } + } + + option = { # Lol, no shot I'm ruining my graveyard with commoners + name = epidemic_events.1110.b + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + add_prestige = medium_prestige_gain + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = ce1_bodies_in_the_street + years = 15 + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + diligent = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_rationality = -1 + ai_vengefulness = 0.5 + } + } + } +} + +############################ +## Catapult the plague corpses +## 1120 +## by James Beaumont +############################ +epidemic_events.1120 = { + type = character_event + title = epidemic_events.1120.t + desc = epidemic_events.1120.desc + theme = plague + override_background = { reference = ce1_funeral_pyre } + left_portrait = { + character = root + animation = thinking + } + + trigger = { + is_available_adult_or_is_commanding = yes + # Catapults only + culture = { has_innovation = innovation_catapult } + # Only if you're leading the army yourself + scope:army = { + army_commander = root + } + #No sea provinces + location = { is_sea_province = no } + # Only do it to people you're at war with + OR = { + location.county.holder ?= { is_at_war_with = root } + location.county.holder ?= { + any_liege_or_above = { + is_at_war_with = root + } + } + } + # Only do it if you have a plague in your realm that is not present at the location + any_realm_county = { + title_province = { + any_province_epidemic = { + save_temporary_scope_as = epidemic_temp_scope + root.location.county.title_province = { + NOT = { + any_province_epidemic = { this = scope:epidemic_temp_scope } + } + } + } + } + } + # Check if you have a reason to hate this person + OR = { + has_relation_rival = location.county.holder + has_trait = sadistic + has_trait = torturer + } + } + + cooldown = { years = 100 } # This shouldn't be too common + + immediate = { + root = { save_scope_as = corpse_flinger } + location.county.holder = { save_scope_as = corpse_flingee } + location.county = { save_scope_as = flung_corpse_location } + # Get the epidemic + random_realm_county = { + limit = { + title_province = { + any_province_epidemic = { + save_temporary_scope_as = epidemic_temp_scope + root.location.county.title_province = { + NOT = { + any_province_epidemic = { this = scope:epidemic_temp_scope } + } + } + } + } + } + title_province = { + random_province_epidemic = { + limit = { + save_temporary_scope_as = epidemic_temp_scope + root.location.county.title_province = { + NOT = { + any_province_epidemic = { this = scope:epidemic_temp_scope } + } + } + } + save_scope_as = epidemic_scope + } + } + } + } + + option = { # Fuckinnnnnnnn do it + name = epidemic_events.1120.a + hidden_effect = { + if = { + limit = { + scope:corpse_flingee = { location.county = scope:flung_corpse_location } + } + scope:corpse_flingee = { + trigger_event = epidemic_events.1121 + } + } + else = { + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + } + } + create_character_memory = { + type = ce1_flung_corpse + participants = { + flingee = scope:corpse_flingee + } + } + show_as_tooltip = { + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + } + stress_impact = { + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + calm = minor_stress_impact_gain + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + zealous = minor_stress_impact_gain + trusting = minor_stress_impact_gain + vengeful = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_zeal = -1 + ai_compassion = -1 + ai_vengefulness = 2 + } + } + } + + option = { # Fuckinnnnnnnn don't + name = epidemic_events.1120.b + stress_impact = { + torturer = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_zeal = 1 + ai_compassion = 1 + ai_vengefulness = -2 + } + } + } +} + +# The enemy recieves the "gift" +epidemic_events.1121 = { + type = character_event + title = epidemic_events.1121.t + desc = epidemic_events.1121.desc + theme = plague + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:corpse_flinger + animation = schadenfreude + } + + immediate = { + create_character_memory = { + type = ce1_corpse_flung_at_me + participants = { + flinger = scope:corpse_flinger + } + } + } + + option = { # Fling it back! + name = epidemic_events.1121.a + trigger = { + culture = { has_innovation = innovation_catapult } + } + show_as_unavailable = { always = yes } + random_list = { + 50 = { + show_chance = no + desc = plague_averted_tt + send_interface_toast = { + title = plague_averted_tt + left_icon = root + right_icon = scope:corpse_flinger + hidden_effect = { + scope:corpse_flinger = { + trigger_event = epidemic_events.1122 + } + } + } + create_character_memory = { + type = ce1_flung_corpse + participants = { + flingee = scope:corpse_flinger + } + } + } + 50 = { + show_chance = no + desc = plague_still_infects_tt + send_interface_toast = { + title = plague_still_infects_tt + left_icon = root + right_icon = scope:corpse_flinger + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + infect_with_epidemic = scope:epidemic_scope + } + } + } + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + calm = minor_stress_impact_gain + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + callous = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + vengeful = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 2 + } + } + } + + option = { # Do something about the corpse + name = epidemic_events.1121.b + duel = { + skill = learning + value = high_skill_rating + # You quarantine the corpse succesfully + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = epidemic_events.1121.b.success + left_icon = root + right_icon = scope:peasant_1 + + scope:location = { + add_province_modifier = { + modifier = ce1_quarantined_corpse + years = 10 + } + } + } + } + # The quarantine fails + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = epidemic_events.1121.b.failure + left_icon = root + right_icon = scope:corpse_flinger + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + infect_with_epidemic = scope:epidemic_scope + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + torturer = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_zeal = 1 + ai_compassion = 1 + ai_vengefulness = -1 + } + } + } + + option = { # Just keep that thing away from me + name = epidemic_events.1121.c + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_zeal = -1 + ai_compassion = -1 + } + } + } +} + +# Return to sender +epidemic_events.1122 = { + type = character_event + title = epidemic_events.1122.t + desc = epidemic_events.1122.desc + theme = plague + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:corpse_flingee + animation = schadenfreude + } + + immediate = { + create_character_memory = { + type = ce1_corpse_flung_at_me + participants = { + flinger = scope:corpse_flinger + } + } + } + + option = { # God damn it + name = epidemic_events.1122.a + infect_with_epidemic = scope:epidemic_scope + add_stress = major_stress_gain + ai_chance = { + base = 100 + } + } + + option = { # Throw it back again! + name = epidemic_events.1122.b + trigger = { + has_trait = torturer + } + random_list = { + 25 = { + show_chance = no + desc = epidemic_events.1122.b.success + send_interface_toast = { + title = epidemic_events.1122.b.success + left_icon = root + right_icon = scope:corpse_flinger + hidden_effect = { + scope:corpse_flingee = { + trigger_event = epidemic_events.1123 + } + } + } + } + 75 = { + show_chance = no + desc = epidemic_events.1122.b.failure + send_interface_toast = { + title = epidemic_events.1122.b.failure + left_icon = root + right_icon = scope:corpse_flingee + add_character_modifier = { + modifier = ce1_heavily_ill + years = 5 + } + infect_with_epidemic = scope:epidemic_scope + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + torturer = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_zeal = 1 + ai_compassion = 1 + ai_vengefulness = -1 + } + } + } +} + +# The meat shower +epidemic_events.1123 = { + type = character_event + title = epidemic_events.1123.t + desc = epidemic_events.1123.desc + theme = plague + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:corpse_flinger + animation = schadenfreude + } + + option = { # God damn it + name = epidemic_events.1123.a + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + create_character_memory = { + type = ce1_meat_shower + participants = { + flinger = scope:corpse_flinger + } + } + + ai_chance = { + base = 100 + } + } +} + +############################ +## Epidemic Flavor Events +## 3000-3999 +## by Veronica Pazos +############################ + +############################ +## You travel through an infected province +## 3000 +## by Veronica Pazos +############################ + +epidemic_events.3000 = { + type = character_event + title = epidemic_events.3000.t + desc = epidemic_events.3000.desc + theme = plague + override_background = { reference = ce1_condemned_village } + override_effect_2d = { + reference = flies + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + animation = fear + } + animation = thinking + } + right_portrait = { + character = scope:sick_peasant + triggered_animation = { + trigger = { + scope:epidemic_scope.epidemic_type.epidemic_trait = trait:ergotism + } + animation = dancing_plague + } + animation = sick_stomach + } + lower_center_portrait = scope:companion + cooldown = { years = 5 } + + trigger = { + is_travelling = yes + location = { + any_province_epidemic = { } + } + current_travel_plan ?= { + any_entourage_character = { + this != root + is_physically_able_ai_adult = yes + } + } + } + + immediate = { + location = { + save_scope_as = epidemic_location + } + location = { + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + current_travel_plan ?= { + random_entourage_character = { + limit = { + this != root + is_physically_able_ai_adult = yes + NOT = { has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait } + } + weight = { + base = 1 + modifier = { + has_trait = compassionate + add = 10 + } + modifier = { + has_trait = lifestyle_herbalist + add = 5 + } + modifier = { + has_trait = lifestyle_physician + add = 5 + } + modifier = { + OR = { + has_trait = callous + has_trait = sadistic + } + factor = 0 + } + } + save_scope_as = companion + } + } + if = { + limit = { + any_pool_character = { + province = root.location + is_adult = yes + has_no_particular_noble_roots_trigger = yes + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_no_particular_noble_roots_trigger = yes + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + save_scope_as = sick_peasant + } + } + else = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + save_scope_as = sick_peasant + } + scope:sick_peasant = { + add_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + } + + option = { # Stop by to help + name = epidemic_events.3000.a + add_piety = minor_piety_gain + pay_short_term_gold = { + target = scope:sick_peasant + gold = medium_gold_value + } + current_travel_plan ?= { + delay_travel_plan = { days = 10 } + } + + stress_impact = { + greedy = major_stress_impact_gain + avaricious = major_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = profligate + } + add = 50 + } + modifier = { + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = callous + has_trait = sadistic + NAND = { + can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } + has_trait = profligate + } + } + factor = 0 + } + } + } + + option = { # Ask a courtier to help them + name = epidemic_events.3000.b + trigger = { exists = scope:companion } + add_piety = miniscule_piety_gain + scope:companion = { + random = { + chance = 50 + modifier = { + add = { + value = 0 + subtract = health #if you're healthy you kinda get away with it + } + } + modifier = { + add = { value = -10 } + OR = { + has_trait = whole_of_body + has_perk = wash_your_hands_perk + } + } + root = { + send_interface_toast = { + title = epidemic_events.3000.b.sick + left_icon = scope:companion + scope:companion = { + add_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = callous + has_trait = sadistic + } + factor = 0 + } + } + } + + option = { # Wow that sucks + name = epidemic_events.3000.c + add_piety = minor_piety_loss + + stress_impact = { + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = just + } + factor = 0 + } + } + } + + after = { + hidden_effect = { + if = { + limit = { is_ai = yes } + scope:sick_peasant = { silent_disappearance_effect = yes } + } + else = { + scope:sick_peasant = { move_to_pool = yes } + } + } + } +} + +############################ +## You travel through an infected province AND may get infected +## 3010 +## by Veronica Pazos +############################ + +epidemic_events.3010 = { + type = character_event + title = epidemic_events.3010.t + desc = epidemic_events.3010.desc + theme = plague + override_background = { reference = ce1_condemned_village } + override_effect_2d = { + reference = flies + } + left_portrait = { + character = root + animation = jockey_walk + camera = camera_event_horse_left + } + cooldown = { years = 5 } + + trigger = { + is_travelling = yes + location = { + any_province_epidemic = { } + } + } + + immediate = { + location = { + save_scope_as = epidemic_location + } + location = { + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + hidden_effect = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + save_scope_as = sick_peasant + } + scope:sick_peasant = { + add_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + } + + option = { # You are very clever + name = epidemic_events.3010.a + trigger = { + OR = { + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + learning >= high_skill_rating + } + } + add_character_modifier = { + modifier = humour_knowledge_modifier + years = 10 + } + stress_impact = { + brave = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = brave + has_trait = impatient + } + factor = 0 + } + } + } + + option = { # Drink water + name = epidemic_events.3010.b + random = { + chance = 50 + send_interface_toast = { + title = epidemic_events.3010.b.sick + left_icon = root + add_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + modifier = { + add = { + value = 0 + subtract = health #if you're healthy you kinda get away with it + } + } + modifier = { + add = { value = -10 } + OR = { + has_trait = whole_of_body + has_perk = wash_your_hands_perk + } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + cynical = medium_stress_impact_gain + paranoid = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = paranoid + has_trait = craven + has_trait = cynical + } + factor = 0 + } + } + } + + option = { # Don't drink + name = epidemic_events.3010.c + current_travel_plan = { + add_travel_plan_modifier = no_water_modifier + } + stress_impact = { + impatient = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = impatient + has_trait = diligent + } + factor = 0 + } + } + } + + after = { + hidden_effect = { + if = { + limit = { is_ai = yes } + scope:sick_peasant = { silent_disappearance_effect = yes } + } + else = { + scope:sick_peasant = { move_to_pool = yes } + } + } + } +} + +############################ +## Epidemic Flavor Events +## 5000-5899 +## by Nick Meredith +############################ + +# Church officials want to cull an animal +# by Nick Meredith +epidemic_events.5000 = { + type = character_event + title = epidemic_events.5000.t + desc = epidemic_events.5000.desc + theme = plague + override_background = { reference = ce1_funeral_pyre } + override_effect_2d = { + reference = flies + } + left_portrait = { + character = root + animation = chancellor + } + right_portrait = { + character = scope:church_person + animation = debating + } + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + # There be a plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + location = root.location #Ensure it makes sense they talk to you + } + } + + immediate = { + select_local_farm_animal_effect = yes + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + save_scope_as = infected_county + } + scope:infected_county = { + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic + } + save_scope_as = infected_province + } + } + cp:councillor_court_chaplain = { + save_scope_as = church_person + } + save_scope_value_as = { + name = infection_range + value = { + integer_range = { + min = 1 + max = 15 + } + } + } + } + + option = { # How about... rats? + name = epidemic_events.5000.a + + trigger = { + has_trait = eccentric + } + + scope:infected_county = { + add_county_modifier = { + modifier = rats_eradicated + years = 10 + } + } + + reverse_add_opinion = { + modifier = confused_opinion + opinion = -5 + target = scope:church_person + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + wrathful = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_rationality = 1 + } + } + } + + option = { # Kill all the cats! + name = epidemic_events.5000.b + + trigger = { + NOT = { + any_owned_story = { + type = story_cycle_pet_cat + } + } + any_owned_story = { + type = story_cycle_pet_dog + } + } + + add_piety = major_piety_gain + + if = { #Kill all your courtiers' cats if they're there! + limit = { + any_courtier_or_guest = { + location = scope:infected_province + any_owned_story = { + type = story_cycle_pet_cat + } + } + } + every_courtier_or_guest = { + limit = { + location = scope:infected_province + any_owned_story = { + type = story_cycle_pet_cat + } + } + random_owned_story = { + type = story_cycle_pet_cat + save_scope_as = story + } + show_as_tooltip = { + remove_cat_story_modifiers_effect = yes + } + scope:story = { + hidden_effect = { end_story = yes } + } + add_opinion = { + modifier = hate_opinion + opinion = -30 + target = root + } + } + } + + scope:infected_county = { + add_county_modifier = { + modifier = pets_eradicated + years = 5 + } + } + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 40 + target = scope:church_person + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = 0.5 + } + } + } + + option = { # Kill all the dogs! + name = epidemic_events.5000.c + + trigger = { + NOT = { + any_owned_story = { + type = story_cycle_pet_dog + } + } + any_owned_story = { + type = story_cycle_pet_cat + } + } + + add_piety = major_piety_gain + + if = { #Kill all your courtiers' dogs if they're there! + limit = { + any_courtier_or_guest = { + location = scope:infected_province + any_owned_story = { + type = story_cycle_pet_dog + } + } + } + every_courtier_or_guest = { + limit = { + location = scope:infected_province + any_owned_story = { + type = story_cycle_pet_dog + } + } + random_owned_story = { + type = story_cycle_pet_dog + save_scope_as = story + } + show_as_tooltip = { + remove_dog_story_modifiers_effect = yes + } + scope:story = { + hidden_effect = { end_story = yes } + } + add_opinion = { + modifier = hate_opinion + opinion = -30 + target = root + } + } + } + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 40 + target = scope:church_person + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = 0.5 + } + } + } + + option = { # Kill all the sheep! + name = epidemic_events.5000.d + + trigger = { + NOT = { + has_trait = eccentric + } + } + + scope:infected_county = { + add_county_modifier = { + modifier = vectors_reduced + years = 10 + } + } + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 30 + target = scope:church_person + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_rationality = 1 + } + } + } + + option = { # Don't be ridiculous, realm priest! + name = epidemic_events.5000.e + + reverse_add_opinion = { + modifier = angry_opinion + opinion = -25 + target = scope:church_person + } + + stress_impact = { + diligent = minor_stress_impact_gain + humble = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + calm = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = -0.5 + } + } + } +} + +# A minor epidemic is causing massive panic +# by Nick Meredith +epidemic_events.5001 = { + type = character_event + title = epidemic_events.5001.t + desc = epidemic_events.5001.desc + theme = plague + override_background = study + left_portrait = { + character = root + animation = chancellor + camera = camera_event_very_left + } + right_portrait = { + character = scope:courtier + animation = holding_scrolls + } + cooldown = { years = 10 } + + trigger = { + NOT = { + government_has_flag = government_is_nomadic + } + is_available = yes + # There be a plague, but it's kinda smol + any_sub_realm_county = { + any_county_province = { + exists = province_owner + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity <= minor + } + } + } + + any_courtier = { + location = root.location + is_available_ai_adult = yes + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + exists = province_owner + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity <= minor + } + province_owner = { save_temporary_scope_as = province_owner_temp } + } + } + random_county_province = { + limit = { + exists = province_owner + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity <= minor + } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + save_scope_as = epidemic_county + scope:province_owner_temp = { save_scope_as = province_owner } + } + + random_courtier = { + limit = { + location = root.location + is_available_ai_adult = yes + } + save_scope_as = courtier + } + } + + option = { # Send them some supplies + name = epidemic_events.5001.d + + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + + remove_treasury_or_gold = minor_treasury_or_gold_value + + scope:epidemic_county = { + add_county_modifier = { + modifier = supplies_sent + years = 10 + } + } + + reverse_add_opinion = { + modifier = pleased_opinion + opinion = 15 + target = scope:courtier + } + + stress_impact = { + generous = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = 1 + } + } + } + + option = { # I'm sure they'll be fine + name = epidemic_events.5001.e + + scope:epidemic_county = { + add_county_modifier = { + modifier = plight_ignored + years = 10 + } + } + + stress_impact = { + diligent = minor_stress_impact_gain + generous = minor_stress_impact_gain + calm = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = -0.5 + } + } + } +} + +# A peasant asks for your healing touch +# by Nick Meredith +epidemic_events.5003 = { + type = character_event + title = epidemic_events.5003.t + desc = epidemic_events.5003.desc + theme = plague + override_background = { reference = market } + override_effect_2d = { + reference = rain + } + left_portrait = { + character = root + animation = horse_conversing_right + camera = camera_event_horse_left + } + right_portrait = { + character = scope:peasant + animation = beg + camera = camera_event_standing_with_horse_right + } + lower_center_portrait = { + character = scope:child + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + # You're at your capital + location = root.capital_province + + # There be a plague in your capital + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + this = root.capital_province + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + this = root.capital_province + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + this = root.capital_province + } + save_scope_as = location + } + } + hidden_effect = { + if = { + limit = { + any_pool_character = { + province = root.location + NOT = { is_courtier_of = root } + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + any_child = { + is_healthy = no + is_adult = no + } + } + } + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + NOT = { is_courtier_of = root } + has_no_particular_noble_roots_trigger = yes + any_child = { + is_healthy = no + is_adult = no + } + } + save_scope_as = peasant + } + } + else = { + create_character = { + template = generic_peasant_character + culture = root.culture + faith = root.faith + location = root.location + save_scope_as = peasant + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:peasant = { + move_to_pool = yes + } + } + } + create_character = { + template = peasant_toddler_character + culture = root.culture + faith = root.faith + location = root.location + save_scope_as = child + after_creation = { + add_character_flag = created + } + } + + if = { #Set the previous character as their parent + limit = { + scope:peasant ?= { + is_female = no + } + } + hidden_effect = { + scope:child = { + set_father = scope:peasant + } + } + } + else = { + hidden_effect = { + scope:child = { + set_mother = scope:peasant + } + } + } + hidden_effect = { + scope:child = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = no } + move_to_pool = yes + } + } + } + + save_scope_value_as = { + name = infection_range + value = { + integer_range = { + min = 1 + max = 15 + } + } + } + } + + option = { # Get away from me! + name = epidemic_events.5003.a + + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + trait = callous + trait = sadistic + trait = paranoid + + add_character_modifier = { + modifier = health_first + years = 15 + } + + scope:child = { + death = { + death_reason = death_ill + } + } + + stress_impact = { + base = minor_stress_impact_loss + wrathful = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + compassionate = medium_stress_impact_gain + callous = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = 0.5 + ai_vengefulness = 1 + } + } + } + + option = { # Give it a go + name = epidemic_events.5003.b + + add_legitimacy_effect = { LEGITIMACY = medium_legitimacy_gain } + + add_character_modifier = { + modifier = man_of_the_people + years = 10 + } + + random = { + chance = 50 + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + craven = minor_stress_impact_gain + shy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = 0.5 + } + } + } + + option = { # Just... try to ignore them + name = epidemic_events.5003.c + + stress_impact = { + shy = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + callous = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + after = { + scope:peasant = { + silent_disappearance_ai_effect = yes + } + scope:child = { + silent_disappearance_ai_effect = yes + } + } +} + +# People are trying to get into your castle! +# by Nick Meredith +epidemic_events.5004 = { + type = character_event + title = epidemic_events.5004.t + desc = epidemic_events.5004.desc + theme = plague + override_background = { reference = throne_room } + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = shock + camera = camera_event_very_left + } + right_portrait = { + character = scope:peasant_1 + animation = beg + } + lower_left_portrait = { + character = scope:peasant_2 + } + lower_center_portrait = { + character = scope:peasant_3 + } + lower_right_portrait = { + character = scope:peasant_4 + } + cooldown = { years = 100 } + + trigger = { + is_available = yes + # Make sure you're royal! + highest_held_title_tier >= tier_kingdom + + # And you're at your capital + location = root.capital_province + + # There be a plague in your capital + capital_province = { + any_province_epidemic = { } + } + + any_pool_character = { + province = root.location + count >= 4 + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + this = root.capital_province + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + this = root.capital_province + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + save_scope_as = location + } + } + + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + save_scope_as = peasant_1 + } + + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + this != scope:peasant_1 + } + save_scope_as = peasant_2 + } + + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + NOR = { + this = scope:peasant_1 + this = scope:peasant_2 + } + } + save_scope_as = peasant_3 + } + + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + NOR = { + this = scope:peasant_1 + this = scope:peasant_2 + this = scope:peasant_3 + } + } + save_scope_as = peasant_4 + } + + every_pool_character = { + province = root.location + limit = { + has_no_particular_noble_roots_trigger = yes + } + add_to_list = peasant_rabble + } + } + + option = { # Welcome in! + name = epidemic_events.5004.a + + every_in_list = { + list = peasant_rabble + root = { + add_courtier = prev + } + } + + hidden_effect = { + every_in_list = { + list = peasant_rabble + add_opinion = { + modifier = grateful_opinion + opinion = 40 + target = root + } + } + } + + custom_tooltip = epidemic_events.5004.a.new_courtiers + + scope:location = { + add_province_modifier = { + modifier = commoners_welcomed_in + years = 15 + } + } + + stress_impact = { + gregarious = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + generous = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = -0.5 + } + } + } + + option = { # Get out of here, miscreants! + name = epidemic_events.5004.c + + add_dread = massive_dread_gain + + scope:location = { + add_province_modifier = { + modifier = commoners_turned_away + years = 15 + } + } + + every_in_list = { + list = peasant_rabble + if = { + limit = { + age <= 20 + } + add_stress = major_stress_impact_gain + } + if = { + limit = { + age <= 40 + } + increase_wounds_effect = { REASON = fight } + } + if = { + limit = { + age > 40 + } + death = { death_reason = death_fight } + } + } + + stress_impact = { + wrathful = minor_stress_impact_loss + shy = minor_stress_impact_loss + callous = minor_stress_impact_loss + paranoid = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_sociability = -1 + } + } + } + + option = { # Come on, now, you know I can't do that... + name = epidemic_events.5004.b + + scope:location = { + add_province_modifier = { + modifier = commoners_turned_away + years = 15 + } + } + + stress_impact = { + paranoid = miniscule_stress_impact_loss + trusting = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } +} + +# The plague is spreading in from the coast +# by Nick Meredith +epidemic_events.5005 = { + type = character_event + title = epidemic_events.5005.t + desc = epidemic_events.5005.desc + theme = plague + override_background = docks + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:steward + animation = stress + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + #There be a plague in your subrealm, and it's in a coastal province + any_sub_realm_county = { + any_county_province = { + is_coastal = yes + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + is_coastal = yes + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + is_coastal = yes + any_province_epidemic = { } + } + save_scope_as = coastal_province + } + } + + every_sub_realm_county = { + limit = { + has_coastal_province = yes + } + every_county_province = { + limit = { + is_coastal = yes + } + add_to_list = coastal_list + } + } + + random_sub_realm_county = { + limit = { + any_county_province = { + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + } + + cp:councillor_steward = { + save_scope_as = steward + } + } + + option = { # Make it 40 days, and threaten them + name = epidemic_events.5005.a + + trigger = { + OR = { + has_trait = paranoid + has_trait = sadistic + has_trait = callous + has_trait = arbitrary + has_trait = stubborn + } + } + trait = paranoid + trait = sadistic + trait = callous + trait = arbitrary + trait = stubborn + + if = { #Tooltip ensmallener for if you have more than 5 sea provinces + limit = { + any_in_list = { + list = coastal_list + count > 5 + } + } + every_in_list = { + list = coastal_list + custom = epidemic_events.5005.a.coastal_quarantine + add_province_modifier = { + modifier = strict_coastal_quarantine + years = 15 + } + } + } + else = { + every_in_list = { + list = coastal_list + add_province_modifier = { + modifier = strict_coastal_quarantine + years = 15 + } + } + } + + reverse_add_opinion = { + modifier = relieved_opinion + opinion = 15 + target = scope:steward + } + + stress_impact = { + paranoid = minor_stress_impact_loss + trusting = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_greed = -1 + } + } + } + + option = { # Institute a quarantine + name = epidemic_events.5005.b + + if = { #Tooltip ensmallener for if you have more than 5 sea provinces + limit = { + any_in_list = { + list = coastal_list + count > 5 + } + } + every_in_list = { + list = coastal_list + custom = epidemic_events.5005.a.coastal_quarantine + add_province_modifier = { + modifier = coastal_quarantine + years = 10 + } + } + } + else = { + every_in_list = { + list = coastal_list + add_province_modifier = { + modifier = coastal_quarantine + years = 10 + } + } + } + + reverse_add_opinion = { + modifier = relieved_opinion + opinion = 15 + target = scope:steward + } + + stress_impact = { + paranoid = minor_stress_impact_loss + trusting = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } + + option = { # We can't afford this. We'll just have to hope. + name = epidemic_events.5005.c + + stress_impact = { + paranoid = medium_stress_impact_gain + trusting = minor_stress_impact_loss + compassionate = miniscule_stress_impact_loss + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = 1 + } + } + } +} + +# People are attempting to save themselves via... laughter? +# by Nick Meredith +epidemic_events.5006 = { + type = character_event + title = epidemic_events.5006.t + desc = epidemic_events.5006.desc + theme = plague + override_background = corridor_day + left_portrait = { + character = root + animation = eyeroll + } + right_portrait = { + character = scope:councillor + animation = laugh + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + #There be a plague in your subrealm + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + + any_councillor = { + is_available_healthy_ai_adult = yes + NOR = { + has_trait = callous + has_trait = irritable + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + save_scope_as = province + } + } + + random_sub_realm_county = { + limit = { + any_county_province = { + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + } + + random_councillor = { + limit = { + is_available_healthy_ai_adult = yes + NOR = { + has_trait = callous + has_trait = irritable + } + } + save_scope_as = councillor + } + } + + option = { # You're so right! Hee hee hee! + name = epidemic_events.5006.a + + trigger = { + has_trait = eccentric + } + + add_character_modifier = { + modifier = cackling_loon + years = 15 + } + + stress_impact = { + base = medium_stress_impact_loss + calm = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + stubborn = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + } + } + } + + option = { # Faith is our only shield! + name = epidemic_events.5006.b + + trigger = { + has_trait = zealous + } + + add_piety = medium_piety_gain + + if = { + limit = { + exists = cp:councillor_court_chaplain + } + reverse_add_opinion = { + modifier = pleased_opinion + opinion = 25 + target = cp:councillor_court_chaplain + } + } + + stress_impact = { + base = minor_stress_impact_loss + calm = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # Let's give it a go eh? + name = epidemic_events.5006.c + + reverse_add_opinion = { + modifier = pleased_opinion + opinion = 20 + target = scope:councillor + } + + stress_impact = { + base = minor_stress_impact_loss + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + patient = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + eccentric = minor_stress_impact_loss + } + + random = { + chance = 10 + send_interface_toast = { + title = epidemic_events.5006.t + left_icon = root + + add_character_modifier = { + modifier = strange_levity + years = 15 + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 1 + } + } + } + + option = { # This is ridiculous + name = epidemic_events.5006.d + + add_prestige = miniscule_prestige_gain + + stress_impact = { + impatient = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_energy = -1 + } + } + } +} + +# You have a herbalist at your court and people are accusing them of witchcraft +# by Nick Meredith +epidemic_events.5007 = { + type = character_event + title = epidemic_events.5007.t + desc = epidemic_events.5007.desc + theme = plague + override_background = { reference = corridor_day } + left_portrait = { + character = scope:accuser + animation = rage + camera = camera_event_very_left + } + right_portrait = { + character = scope:herbalist + animation = dismissal + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = witch + FAITH = root.faith + GENDER_CHARACTER = root + } + faith = { + NOT = { + trait_is_virtue = witch + } + } + #There be a plague in your subrealm + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + + any_courtier_or_guest = { + is_available_healthy_ai_adult = yes + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_gardener + } + NOT = { + has_trait = witch + } + save_temporary_scope_as = temp_herbalist + } + + any_courtier_or_guest = { + is_available_healthy_ai_adult = yes + is_ai = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = witch + FAITH = this.faith + GENDER_CHARACTER = this + } + faith = { + NOT = { + trait_is_virtue = witch + } + } + this != scope:temp_herbalist + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + } + + random_courtier_or_guest = { + limit = { + is_available_healthy_ai_adult = yes + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_gardener + } + NOT = { + has_trait = witch + } + } + save_scope_as = herbalist + } + + random_courtier_or_guest = { + limit = { + is_available_healthy_ai_adult = yes + is_ai = yes + this != scope:herbalist + } + save_scope_as = accuser + } + } + + option = { # Herbalism is a noble art! + name = epidemic_events.5007.a + + trigger = { + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_gardener + } + } + trait = lifestyle_herbalist + trait = lifestyle_mystic + trait = lifestyle_physician + trait = lifestyle_gardener + + reverse_add_opinion = { + modifier = grateful_opinion + opinion = 40 + target = scope:herbalist + } + + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } + + stress_impact = { + base = minor_stress_impact_loss + calm = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + wrathful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_energy = 0.5 + } + } + } + + option = { # You're right! Imprison them! + name = epidemic_events.5007.b + + add_piety = medium_piety_gain + + scope:herbalist = { + add_trait = witch + } + + rightfully_imprison_character_effect = { + TARGET = scope:herbalist + IMPRISONER = root + } + + reverse_add_opinion = { + modifier = pleased_opinion + opinion = 40 + target = scope:accuser + } + + stress_impact = { + wrathful = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + trusting = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_compassion = -1 + } + } + } + + option = { # Nonsense + name = epidemic_events.5007.c + + reverse_add_opinion = { + modifier = annoyed_opinion + opinion = -20 + target = scope:accuser + } + + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:herbalist } + } + set_relation_potential_friend = scope:herbalist + } + + stress_impact = { + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + patient = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 1 + } + } + } +} + +# You begin sequestering yourself more often +# by Nick Meredith +epidemic_events.5008 = { + type = character_event + title = epidemic_events.5008.t + desc = epidemic_events.5008.desc + theme = plague + override_background = relaxing_room + left_portrait = { + character = root + animation = drink_goblet + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + #There be a plague in your subrealm + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + + #And you're a recluse + OR = { + has_trait_introverted_trigger = yes + has_character_modifier = isolating_modifier + } + has_personality_introverted_trigger = no + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + } + } + + option = { # And nobody is allowed to see me without my permission! + name = epidemic_events.5008.a + + trigger = { + has_trait = paranoid + } + + add_character_modifier = { + modifier = absent_ruler + years = 10 + } + + stress_impact = { + base = major_stress_impact_loss + craven = major_stress_impact_loss + diligent = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + stubborn = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + + option = { # I must be seen by my subjects. + name = epidemic_events.5008.b + + add_legitimacy_effect = { LEGITIMACY = medium_legitimacy_gain } + + add_character_modifier = { + modifier = present_ruler + years = 10 + } + + stress_impact = { + base = medium_stress_impact_gain + lazy = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + content = minor_stress_impact_gain + shy = medium_stress_impact_gain + reclusive = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { # What a great excuse! + name = epidemic_events.5008.c + + add_character_modifier = { + modifier = hiding_from_epidemic + years = 10 + } + + stress_impact = { + patient = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + shy = minor_stress_impact_loss + reclusive = minor_stress_impact_loss + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 1 + } + } + } +} + +# A merchant tries selling you a herbal sachet +# Customary 'Nick makes an event about good smells' event +# by Nick Meredith +epidemic_events.5009 = { + type = character_event + title = epidemic_events.5009.t + desc = epidemic_events.5009.desc + theme = plague + override_background = { reference = market } + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = steward + camera = camera_event_left_crowning_observation + } + right_portrait = { + character = scope:merchant + animation = debating + camera = camera_event_very_right + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + #There be a plague in your subrealm + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + } + + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + save_scope_as = merchant + } + if = { #As a backup create the character + limit = { + NOT = { exists = scope:merchant } + } + create_character = { + template = generic_peasant_character + location = root.location + culture = root.capital_province.culture + faith = root.capital_province.faith + save_scope_as = merchant + after_creation = { + add_character_flag = created + } + } + } + hidden_effect_new_object = { + scope:merchant = { + move_to_pool = yes + get_pressed_flower_species_effect = { LOCATION = root.location } + create_artifact_pressed_flower_effect = { OWNER = scope:merchant } + scope:newly_created_artifact = { + add_artifact_modifier = artifact_stress_gain_1_modifier + flag_as_trash_artifact = yes + } + } + } + } + + option = { # I'LL TAKE YOUR WHOLE STOCK + name = epidemic_events.5009.a + + trigger = { + OR = { + has_trait = paranoid + has_trait = generous + has_trait = profligate + } + } + trait = paranoid + trait = generous + trait = profligate + + scope:newly_created_artifact = { set_owner = root } + + pay_short_term_gold = { + target = scope:merchant + gold = tiny_gold_value + } + + add_character_modifier = { + modifier = overly_fragrant + years = 15 + } + + stress_impact = { + base = medium_stress_impact_loss + greedy = major_stress_impact_gain + trusting = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_greed = -1 + } + } + } + + option = { # Buy a fine sachet + name = epidemic_events.5009.b + + scope:newly_created_artifact = { set_owner = root } + + add_character_modifier = { + modifier = sachet_protection + years = 10 + } + + pay_short_term_gold = { + target = scope:merchant + gold = tiny_gold_value + } + + stress_impact = { + greedy = medium_stress_impact_gain + generous = miniscule_stress_impact_loss + profligate = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_greed = -0.5 + } + } + } + + option = { # One please! + name = epidemic_events.5009.c + + add_character_modifier = { + modifier = sachet_protection + years = 10 + } + + stress_impact = { + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + generous = miniscule_stress_impact_loss + profligate = medium_stress_impact_gain + trusting = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { # Don't buy anything + name = epidemic_events.5009.d + + stress_impact = { + generous = medium_stress_impact_gain + profligate = medium_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + after = { + scope:merchant = { + silent_disappearance_ai_effect = yes + } + } +} + +# An apocalyptic plague enters your capital +# Only for cool capitals +# by Nick Meredith +epidemic_events.5010 = { + type = character_event + title = epidemic_events.5010.t + desc = { + desc = epidemic_events.5010.opening + #What great capital do you have? + first_valid = { + triggered_desc = { + trigger = { + capital_barony = title:b_santiago + } + desc = epidemic_events.5010.santiago + } + triggered_desc = { + trigger = { + capital_barony = title:b_london + } + desc = epidemic_events.5010.london + } + triggered_desc = { + trigger = { + capital_barony = title:b_roma + } + desc = epidemic_events.5010.rome + } + triggered_desc = { + trigger = { + capital_barony = title:b_paris + } + desc = epidemic_events.5010.paris + } + triggered_desc = { + trigger = { + capital_barony = title:b_constantinople + } + desc = epidemic_events.5010.constantinople + } + triggered_desc = { + trigger = { + capital_barony = title:b_praha + } + desc = epidemic_events.5010.prague + } + triggered_desc = { + trigger = { + capital_barony = title:b_toledo + } + desc = epidemic_events.5010.toledo + } + triggered_desc = { + trigger = { + capital_barony = title:b_cairo + } + desc = epidemic_events.5010.cairo + } + triggered_desc = { + trigger = { + capital_barony = title:b_kanyakubja + } + desc = epidemic_events.5010.kanyakubja + } + triggered_desc = { + trigger = { + capital_barony = title:b_varanasi + } + desc = epidemic_events.5010.varanasi + } + triggered_desc = { + trigger = { + NOR = { + capital_barony = title:b_cairo + capital_barony = title:b_toledo + capital_barony = title:b_praha + capital_barony = title:b_constantinople + capital_barony = title:b_paris + capital_barony = title:b_roma + capital_barony = title:b_london + capital_barony = title:b_santiago + capital_barony = title:b_kanyakubja + capital_barony = title:b_varanasi + } + } + desc = epidemic_events.5010.fallback + } + } + } + theme = plague + override_background = { reference = ce1_condemned_village } + left_portrait = { + character = root + animation = stress + } + cooldown = { years = 50 } + + trigger = { + OR = { + capital_barony = title:b_cairo + capital_barony = title:b_toledo + capital_barony = title:b_praha + capital_barony = title:b_constantinople + capital_barony = title:b_paris + capital_barony = title:b_roma + capital_barony = title:b_london + capital_barony = title:b_santiago + capital_barony = title:b_kanyakubja + capital_barony = title:b_varanasi + } + + # There be a plague in your capital + location = { + any_province_epidemic = { + intensity = apocalyptic + } + } + + is_travelling = no + } + + immediate = { + capital_barony = { + save_scope_as = capital + } + capital_barony.county = { + save_scope_as = capital_region + } + } + + option = { # Donate some money + name = epidemic_events.5010.a + + remove_short_term_gold = medium_gold_value + + scope:capital_region = { + add_county_modifier = { + modifier = plague_alms_donations + years = 10 + } + } + + stress_impact = { + greedy = major_stress_impact_gain + generous = medium_stress_impact_loss + profligate = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = -1 + } + } + } + + option = { # Be sad + name = epidemic_events.5010.b + add_legitimacy = miniscule_legitimacy_loss + random_list = { + 1 = { + send_interface_toast = { + title = epidemic_events.5010.b.win + left_icon = root + + add_character_modifier = { + modifier = plague_determined_recover + years = 15 + } + } + } + 1 = { + send_interface_toast = { + title = epidemic_events.5010.b.neutral + left_icon = root + + add_character_modifier = { + modifier = plague_the_long_road + years = 15 + } + } + } + 1 = { + send_interface_toast = { + title = epidemic_events.5010.b.lose + left_icon = root + + add_character_modifier = { + modifier = plague_crippling_sorrow + years = 15 + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + generous = miniscule_stress_impact_loss + profligate = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_greed = -0.5 + } + } + } +} + +# BLACK DEATH EVENTS +# 5900-5999 +#⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣤⣴⣶⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⠀⢀⣀⣤⣶⣿⣿⣿⣿⡿⠿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⢰⣾⣿⣿⣿⡿⠟⠛⢉⣠⣤⣶⠿⠛⠀⣀⣀⣤⡤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⠙⠛⢉⣁⣤⣶⠿⠟⢋⣁⣤⣴⣾⣿⠿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⠀⠀⠛⢋⣉⣤⣴⣾⣿⠿⠟⠛⢉⡀⢰⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⣠⣴⣿⠿⠿⠛⠋⣁⣤⣴⡾⠀⣾⣿⠀⣿⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠈⠉⠁⢠⣤⣶⣾⣄⠙⢿⣿⣿⠀⠿⠋⣠⣿⣿⣿⣷⣦⣄⡀⠀⠀⠀⠀⠀⠀ +#⠀⠀⠀⠀⠘⣿⣿⣿⣿⣷⣄⠉⣿⣷⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⠀⠀⠀⠀ +#⠀⠀⠀⠀⢀⠘⠿⣿⣿⣿⣿⠸⣿⣿⣿⣿⣿⣿⠿⠿⠿⠿⠿⠿⣿⣿⣧⡀⠀⠀ +#⠀⠀⠰⣾⣿⣷⣦⡈⠛⠿⣿⣆⡉⠛⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡄⠀ +#⠀⠀⠀⡈⠻⢿⣿⣿⣷⣦⣌⡙⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⣼⣿⣷⣤⡉⠛⠿⣿⣿⣿⣷⣶⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⢠⣿⣿⣿⣿⣿⣷⣶⣤⣈⡙⠛⠿⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠈⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠁⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + +# The Black Death enters your lands +# by Nick Meredith +epidemic_events.5900 = { + type = character_event + window = fullscreen_event + title = epidemic_events.5900.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture_has_asian_heritage_pillar_trigger = yes + } + desc = epidemic_events.5900.desc_asia + } + desc = epidemic_events.5900.desc + } + } + theme = plague + override_background = { reference = ce1_fullscreen_black_death } + cooldown = { years = 100 } + + immediate = { + add_character_flag = black_death_splash + play_music_cue = black_death + add_plague_county_modifiers = yes + if = { #just to be sure the story about preparing for black death ends + limit = { + any_owned_story = { + type = story_cycle_black_death + } + } + random_owned_story = { + type = story_cycle_black_death + end_story = yes + } + } + } + + option = { + name = { + text = epidemic_events.5900.christian + trigger = { + faith = { + religion_tag = christianity_religion + } + } + } + name = { + text = epidemic_events.5900.fallback + trigger = { + NOT = { + faith = { + religion_tag = christianity_religion + } + } + } + } + + add_stress = medium_stress_gain + } + + after = { + trigger_event = { + id = health.3001 days = { court_physician_search_min court_physician_search_max } + } + } +} + +# Demand your physician does an autopsy +# by Nick Meredith +epidemic_events.5901 = { + type = character_event + title = epidemic_events.5901.t + desc = epidemic_events.5901.desc + theme = plague + override_background = { reference = physicians_study } + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:physician + animation = worry + } + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + #You have a court physician + court_physician_available_trigger = yes + } + + immediate = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + } + + option = { # How about we do it together? + name = epidemic_events.5901.a + + trigger = { + OR = { + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + has_trait = whole_of_body + } + } + + random = { + chance = 75 + add_character_modifier = { + modifier = plague_insights_gained + years = 15 + } + hidden_effect = { + send_interface_toast = { + title = epidemic_events.5901.a.tt + left_icon = root + right_icon = scope:physician + } + } + } + + random = { + chance = 10 + send_interface_toast = { + title = epidemic_events.5901.a.tt.plague + left_icon = root + + add_trait = bubonic_plague + } + } + + scope:physician = { + random = { + chance = 10 + + add_trait = bubonic_plague + } + + add_opinion = { + modifier = respect_opinion + opinion = 25 + target = root + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_energy = 1 + } + } + } + + option = { # I demand it + name = epidemic_events.5901.b + + random = { + chance = 50 + add_character_modifier = { + modifier = plague_insights_gained + years = 15 + } + hidden_effect = { + send_interface_toast = { + title = epidemic_events.5901.a.tt + left_icon = root + } + } + } + + scope:physician = { + random = { + chance = 10 + add_trait = bubonic_plague + } + + add_opinion = { + modifier = scared_opinion + opinion = -15 + target = root + } + } + + stress_impact = { + impatient = miniscule_stress_impact_loss + patient = minor_stress_impact_gain + callous = miniscule_stress_impact_loss + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # All right, all right + name = epidemic_events.5901.c + + reverse_add_opinion = { + modifier = grateful_opinion + opinion = 15 + target = scope:physician + } + + stress_impact = { + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# Calm hordes of refugees +# by Nick Meredith +epidemic_events.5902 = { + type = character_event + title = epidemic_events.5902.t + desc = epidemic_events.5902.desc + theme = plague + override_background = { reference = ep2_travel_bridge } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:marshal + animation = marshal + } + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + + any_realm_border_county = { + any_county_province = { + is_coastal = no #To ensure you don't get landlocked by yourself + } + } + + #You have a marshal in your locatiom + cp:councillor_marshal ?= { location = root.location } + } + + immediate = { + location = { + save_scope_as = province + } + + cp:councillor_marshal = { + save_scope_as = marshal + } + + random_realm_border_county = { + limit = { + any_county_province = { + is_coastal = no #To ensure you don't get landlocked by yourself + } + } + save_scope_as = border_county + random_county_province = { + save_scope_as = border_province + } + } + } + + option = { # Kill them! Kill them all! + name = epidemic_events.5902.a + + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + dread > 50 + } + } + + scope:border_province = { + add_province_modifier = { + modifier = brutal_crackdown + years = 10 + } + } + + if = { + limit = { + scope:marshal = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + scope:marshal = { + add_opinion = { + modifier = pleased_opinion + opinion = 15 + target = root + } + } + } + else = { + scope:marshal = { + add_opinion = { + modifier = cruelty_opinion + opinion = -15 + target = root + } + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = medium_stress_impact_gain + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + compassionate = medium_stress_impact_gain + just = miniscule_stress_impact_loss + arbitrary = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # Set up shanty towns + name = epidemic_events.5902.b + + remove_treasury_or_gold = medium_treasury_or_gold_value + + scope:border_province = { + add_province_modifier = { + modifier = shanty_towns + years = 10 + } + } + + stress_impact = { + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + compassionate = miniscule_stress_impact_loss + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { # Turn them all away + name = epidemic_events.5902.c + + scope:border_province = { + add_province_modifier = { + modifier = border_defended + years = 10 + } + } + + stress_impact = { + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + + option = { # Let them in + name = epidemic_events.5902.d + + scope:border_province = { + add_province_modifier = { + modifier = refugees_coddled + years = 10 + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } +} + +# A family member warns you not to take a ride in the countryside +# by Nick Meredith +epidemic_events.5903 = { + type = character_event + title = epidemic_events.5903.t + desc = epidemic_events.5903.desc + theme = plague + override_background = { reference = garden } + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_left + } + right_portrait = { + character = scope:family + animation = worry + } + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + + #You have a family member in your location + any_close_family_member = { + is_available = yes + location = root.location + age > 10 + } + + NOR = { + age < 15 + has_trait = incapable + } + } + + immediate = { + random_close_family_member = { + limit = { + is_available = yes + location = root.location + age > 10 + } + save_scope_as = family + } + } + + option = { # You're probably right + name = epidemic_events.5903.a + + add_character_modifier = { + modifier = cautious_rider + years = 10 + } + + reverse_add_opinion = { + modifier = pleased_opinion + opinion = 20 + target = scope:family + } + + stress_impact = { + brave = medium_stress_impact_gain + craven = minor_stress_impact_loss + trusting = minor_stress_impact_gain + paranoid = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # Bah, it'll be fine! + name = epidemic_events.5903.b + + add_character_modifier = { + modifier = dangerous_rides + years = 10 + } + + stress_impact = { + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + compassionate = miniscule_stress_impact_loss + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + } + } +} + +# A wandering preacher is spreading fear +# by Nick Meredith +epidemic_events.5904 = { + type = character_event + title = epidemic_events.5904.t + desc = epidemic_events.5904.desc + theme = plague + override_background = { reference = market } + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:doomsday_preacher + animation = personality_zealous + } + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + is_landed = yes + NOT = { + has_trait = incapable + } + } + + immediate = { + location.county = { + random_county_province = { + save_scope_as = doomsday_province + } + } + + if = { + limit = { + any_pool_character = { + province = root.location + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + weight = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = zealous + has_trait = eccentric + } + } + } + save_scope_as = doomsday_preacher + } + } + else = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + save_scope_as = doomsday_preacher + } + } + } + + option = { # OH GOD YOU'RE RIGHT + name = epidemic_events.5904.a + + trigger = { + has_trait = paranoid + } + + add_character_modifier = { + modifier = overly_protective + years = 10 + } + + stress_impact = { + base = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { # Lock them up for fearmongering + name = epidemic_events.5904.b + + hard_imprison_character_effect = { + TARGET = scope:doomsday_preacher + IMPRISONER = root + } + + scope:doomsday_province = { + add_province_modifier = { + modifier = angry_crowds + years = 10 + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + just = medium_stress_impact_gain + arbitrary = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # Who are you to say that? + name = epidemic_events.5904.c + + duel = { + skill = learning + target = scope:doomsday_preacher + # You win the theological debate + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.5904.c.tt.success + root = { + send_interface_toast = { + title = epidemic_events.5904.c.tt.success + left_icon = root + right_icon = scope:doomsday_preacher + + scope:doomsday_province = { + add_province_modifier = { + modifier = allayed_fears + years = 10 + } + } + } + } + } + # You lose the debate + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.5904.c.tt.failure + root = { + send_interface_toast = { + title = epidemic_events.5904.c.tt.failure + left_icon = root + right_icon = scope:doomsday_preacher + add_legitimacy = miniscule_legitimacy_loss + scope:doomsday_province = { + add_province_modifier = { + modifier = mass_panic + years = 10 + } + } + } + } + } + } + + stress_impact = { + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + ai_zeal = 1 + } + } + } + + option = { # Bah, nobody will take them seriously + name = epidemic_events.5904.d + add_legitimacy = miniscule_legitimacy_loss + scope:doomsday_province = { + random = { + chance = 15 + add_province_modifier = { + modifier = mass_panic + years = 10 + } + } + hidden_effect = { + every_neighboring_province = { + random = { + chance = 15 + add_province_modifier = { + modifier = mass_panic + years = 10 + } + } + } + } + } + + custom_tooltip = epidemic_events.5904.d.tt + + stress_impact = { + fickle = miniscule_stress_impact_loss + stubborn = minor_stress_impact_gain + lazy = miniscule_stress_impact_loss + diligent = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } +} + +# Rumours about the plague's nature begins to spread +# by Nick Meredith +epidemic_events.5905 = { + type = character_event + title = epidemic_events.5905.t + desc = epidemic_events.5905.desc + theme = plague + override_background = { reference = tavern } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:peasant + animation = fear + } + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + is_landed = yes + drinks_alcohol_trigger = yes + } + + immediate = { + location.county = { + random_county_province = { + save_scope_as = province + } + } + + if = { + limit = { + any_pool_character = { + province = root.location + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + save_scope_as = peasant + } + } + else = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + save_scope_as = peasant + } + } + } + + option = { # Trust me, I'm a doctor + name = epidemic_events.5905.a + + trigger = { + OR = { + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + } + } + + scope:province = { + hidden_effect = { + every_neighboring_province = { + random = { + chance = 50 + add_province_modifier = { + modifier = rumours_stifled + years = 10 + } + } + } + } + add_province_modifier = { + modifier = rumours_stifled + years = 10 + } + } + + custom_tooltip = epidemic_events.5905.a.tt + + stress_impact = { + trusting = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # Look, does that sound likely to you? + name = epidemic_events.5905.b + + duel = { + skills = { learning diplomacy } + target = scope:peasant + # You convince them + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.5905.b.tt.success + root = { + send_interface_toast = { + title = epidemic_events.5905.b.tt.success + left_icon = root + right_icon = scope:peasant + + scope:province = { + hidden_effect = { + every_neighboring_province = { + random = { + chance = 50 + add_province_modifier = { + modifier = rumours_stifled + years = 10 + } + } + } + } + add_province_modifier = { + modifier = rumours_stifled + years = 10 + } + } + + custom_tooltip = epidemic_events.5905.a.tt + } + } + } + # They are unconvinced + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.5905.b.tt.failure + root = { + send_interface_toast = { + title = epidemic_events.5905.b.tt.failure + left_icon = root + right_icon = scope:peasant + add_legitimacy = miniscule_legitimacy_loss + scope:province = { + hidden_effect = { + every_neighboring_province = { + random = { + chance = 50 + add_province_modifier = { + modifier = rumours_proliferated + years = 10 + } + } + } + } + add_province_modifier = { + modifier = rumours_proliferated + years = 10 + } + } + + custom_tooltip = epidemic_events.5905.a.tt + } + } + } + } + + stress_impact = { + calm = miniscule_stress_impact_loss + wrathful = minor_stress_impact_gain + gregarious = miniscule_stress_impact_loss + shy = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + option = { # Confronting them will only lead to more panic + name = epidemic_events.5905.c + + random = { + chance = 50 + add_legitimacy = miniscule_legitimacy_loss + scope:province = { + add_province_modifier = { + modifier = uncaring_ruler + years = 15 + } + } + } + + stress_impact = { + fickle = miniscule_stress_impact_loss + stubborn = minor_stress_impact_gain + lazy = miniscule_stress_impact_loss + diligent = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +# A roving band of flagellants turn up +# by Nick Meredith +epidemic_events.5906 = { + type = character_event + title = epidemic_events.5906.t + desc = epidemic_events.5906.desc + theme = plague + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:flagellant + animation = paranoia + } + lower_center_portrait = scope:marshal + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_landed = yes + faith = { + religion_tag = christianity_religion + } + exists = cp:councillor_marshal + } + + immediate = { + location.county = { + random_county_province = { + save_scope_as = doomsday_province + } + } + + cp:councillor_marshal = { + save_scope_as = marshal + } + + if = { + limit = { + any_pool_character = { + province = root.location + is_adult = yes + has_no_particular_noble_roots_trigger = yes + has_trait = flagellant + is_imprisoned = no + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_no_particular_noble_roots_trigger = yes + has_trait = flagellant + is_imprisoned = no + } + save_scope_as = flagellant + } + } + else = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + trait = flagellant + save_scope_as = flagellant + } + } + + save_scope_as = root_scope + } + + option = { # You're tearing the faith apart, you maniacs! + name = epidemic_events.5906.a + + trigger = { + has_trait = zealous + } + + duel = { + skill = learning + target = scope:flagellant + # You convince them + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.5906.a.tt.success + send_interface_toast = { + title = epidemic_events.5906.a.tt.success + left_icon = root + right_icon = scope:flagellant + + add_character_modifier = { + modifier = flagellants_acquiesce + years = 10 + } + } + } + # They are unconvinced + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.5906.a.tt.failure + send_interface_toast = { + title = epidemic_events.5906.a.tt.failure + left_icon = root + right_icon = scope:flagellant + add_legitimacy = miniscule_legitimacy_loss + scope:doomsday_province = { + add_province_modifier = { + modifier = unrestrained_flagellants + years = 10 + } + } + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = minor_stress_impact_loss + content = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # You're right, honestly. + name = epidemic_events.5906.b + + trigger = { + OR = { + has_trait = paranoid + has_trait = fickle + } + } + + add_trait = flagellant + + stress_impact = { + base = major_stress_impact_loss + craven = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + cynical = miniscule_stress_impact_loss + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 0 # Don't do this unless you're already flagellant + modifier = { + add = 50 + has_trait = flagellant + } + } + } + + + option = { # Lock 'em up! + name = epidemic_events.5906.c + + hard_imprison_character_effect = { + TARGET = scope:flagellant + IMPRISONER = root + } + + random = { + chance = 50 + scope:doomsday_province = { + add_province_modifier = { + modifier = pacified_flagellants + years = 10 + } + hidden_effect = { + every_neighboring_province = { + random = { + chance = 25 + add_province_modifier = { + modifier = pacified_flagellants + years = 10 + } + } + } + } + } + } + + custom_tooltip = epidemic_events.5906.d.tt + + stress_impact = { + calm = minor_stress_impact_gain + wrathful = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + option = { # Let them flagellate + name = epidemic_events.5906.d + + random = { + chance = 50 + faith = { + change_fervor = { + value = -5 + desc = fervor_loss_flagellants + } + } + scope:doomsday_province = { + add_province_modifier = { + modifier = eager_populace + years = 10 + } + } + } + + every_vassal_or_below = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -20 + } + } + + stress_impact = { + fickle = minor_stress_impact_loss + stubborn = minor_stress_impact_gain + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + zealous = medium_stress_impact_gain + cynical = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +# You develop a slight cough +# by Nick Meredith +epidemic_events.5907 = { + type = character_event + title = epidemic_events.5907.t + desc = epidemic_events.5907.desc + theme = plague + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = paranoia + } + lower_center_portrait = scope:physician + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + court_physician_available_trigger = yes + } + + immediate = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + } + + option = { # I'll consult with my physician for some special treatments, just in case + name = epidemic_events.5907.a + + remove_short_term_gold = minor_gold_value + + add_character_modifier = { + modifier = regular_checkups + years = 5 + } + + stress_impact = { + base = miniscule_stress_impact_loss + paranoid = major_stress_impact_loss #Throw 'em a bone! + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + greedy = medium_stress_impact_gain + profligate = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = -1 + } + } + } + + option = { # I'm sure it's nothing + name = epidemic_events.5907.b + + random_list = { + 69 = { #You feel a little better + desc = epidemic_events.5907.b.success + send_interface_toast = { + title = epidemic_events.5907.b.success + left_icon = root + + add_stress = minor_stress_loss + } + } + 29 = { #You have a small sniffle + desc = epidemic_events.5907.b.failure + send_interface_toast = { + title = epidemic_events.5907.b.failure + left_icon = root + + add_character_modifier = { + modifier = under_the_weather + years = 5 + } + } + } + 2 = { #You have something nastier... + desc = epidemic_events.5907.b.criticalfailure + send_interface_toast = { + title = epidemic_events.5907.b.criticalfailure + left_icon = root + + add_stress = medium_stress_gain + + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# Gravediggers demand more pay +# by Nick Meredith +epidemic_events.5908 = { + type = character_event + title = epidemic_events.5908.t + desc = epidemic_events.5908.desc + theme = plague + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:gravedigger + animation = beg + } + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_landed = yes + } + + immediate = { + location.county = { + random_county_province = { + save_scope_as = province + } + } + + if = { + limit = { + any_pool_character = { + province = root.location + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + save_scope_as = gravedigger + } + } + else = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + save_scope_as = gravedigger + } + } + } + + option = { # You'll be the next in the grave if you cross me laddie + name = epidemic_events.5908.a + + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + dread > 50 + } + } + + scope:province = { + add_province_modifier = { + modifier = gravediggers_threatened + years = 10 + } + } + + reverse_add_opinion = { + modifier = cruelty_opinion + opinion = -25 + target = scope:gravedigger + } + + stress_impact = { + base = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { # You'll be compensated fairly + name = epidemic_events.5908.b + + remove_treasury_or_gold = medium_treasury_or_gold_value + + scope:province = { + add_province_modifier = { + modifier = gravediggers_compensated + years = 15 + } + } + + stress_impact = { + generous = miniscule_stress_impact_loss + greedy = medium_stress_impact_gain + paranoid = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + ai_greed = -1 + } + } + } + + option = { # Get out of my throneroom + name = epidemic_events.5908.c + + scope:province = { + add_province_modifier = { + modifier = gravediggers_replaced + years = 10 + } + } + + stress_impact = { + generous = medium_stress_impact_gain + greedy = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +epidemic_events.5998 = { #Black death story cycle pacing control + hidden = yes + + immediate = { + if = { + limit = { + any_neighboring_top_liege_realm_owner = { + has_character_flag = black_death_splash + } + } + if = { + limit = { + has_character_flag = black_death_closer + } + remove_character_flag = black_death_closer + } + add_character_flag = black_death_nearby + } + else_if = { + limit = { + any_neighboring_top_liege_realm_owner = { + any_neighboring_top_liege_realm_owner = { + has_character_flag = black_death_splash + } + } + } + add_character_flag = black_death_closer + } + if = { + limit = { + OR = { + has_character_flag = black_death_closer + has_character_flag = black_death_nearby + } + NOT = { + has_character_flag = black_death_info_event + } + } + trigger_event = { + id = epidemic_events.5999 + days = { 2 4 } + } + } + } +} + +# The Black Death is closing in +# Used to trigger Black Death Story cycle +# by Nick Meredith +epidemic_events.5999 = { + type = character_event + title = epidemic_events.5999.t + desc = epidemic_events.5999.desc + theme = plague + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + cooldown = { years = 100 } + + trigger = { + is_ai = no + has_dlc_feature = legends_of_the_dead + is_available_adult = yes + is_travelling = no + NOT = { + any_sub_realm_county = { #Black Plague is already here, no need to talk about it closing in + any_county_province = { + any_province_epidemic = { + this = global_var:black_death + } + } + } + } + } + + on_trigger_fail = { + trigger_event = { + id = epidemic_events.5999 + days = { 7 14 } + } + } + + immediate = { + play_music_cue = mx_cue_death + add_character_flag = black_death_info_event + if = { + limit = { + NOR = { + has_character_flag = black_death_closer + has_character_flag = black_death_nearby + } + } + add_character_flag = black_death_closer + } + } + + option = { # Ha, let them die! + name = epidemic_events.5999.a + + trigger = { + has_trait = callous + } + + flavor = epidemic_events.5999.a.tt + + stress_impact = { + base = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # The end times are upon us! + name = epidemic_events.5999.b + + trigger = { + has_trait = paranoid + } + + flavor = epidemic_events.5999.b.tt + + add_character_modifier = { + modifier = plague_tales + years = 15 + } + + stress_impact = { + base = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + ai_greed = -1 + } + } + } + + option = { # Oh no + name = { + trigger = { + faith = { + religion_tag = christianity_religion + } + } + + text = epidemic_events.5999.c.christian + } + name = { + trigger = { + NOT = { + faith = { + religion_tag = christianity_religion + } + } + } + text = epidemic_events.5999.c.notchristian + } + + stress_impact = { + base = miniscule_stress_impact_gain + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# The Black Death enters the lands near your camp +# by Nick Meredith +epidemic_events.6000 = { + type = character_event + window = fullscreen_event + title = epidemic_events.5900.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture_has_asian_heritage_pillar_trigger = yes + } + desc = epidemic_events.5900.desc_asia + } + desc = epidemic_events.5900.desc + } + } + theme = plague + override_background = { reference = ce1_fullscreen_black_death } + cooldown = { years = 100 } + + trigger = { + OR = { + has_government = landless_adventurer_government + is_landless_administrative = yes + } + location = { + any_province_epidemic = { + intensity = apocalyptic + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + } + + immediate = { + add_character_flag = black_death_splash + play_music_cue = black_death + } + + option = { + name = { + text = epidemic_events.5900.christian + trigger = { + faith = { + religion_tag = christianity_religion + } + } + } + name = { + text = epidemic_events.5900.fallback + trigger = { + NOT = { + faith = { + religion_tag = christianity_religion + } + } + } + } + + add_stress = medium_stress_gain + } + + after = { + trigger_event = { + id = health.3001 days = { court_physician_search_min court_physician_search_max } + } + } +} diff --git a/N3OW/events/dlc/ce1/legend_spread_events_nick.txt b/N3OW/events/dlc/ce1/legend_spread_events_nick.txt new file mode 100644 index 00000000..5f5c4358 --- /dev/null +++ b/N3OW/events/dlc/ce1/legend_spread_events_nick.txt @@ -0,0 +1,8131 @@ +namespace = legend_spread_events + +############################ +## Legend Spread Events +## & Buying Into A Legend Events +## 5000-5999 +## by Nick Meredith +############################ + +# You attempt to spread a rumour that the ancient peoples founded your capital city +legend_spread_events.5000 = { + type = character_event + title = legend_spread_events.5000.t + desc = legend_spread_events.5000.desc + theme = legend + override_background = { reference = alley_day } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = thinking + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + has_legend_chronicle = ancient_people + legend_protagonist = root + } + capital_province = { + province_owner = root + culture = root.culture + } + location = capital_province + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + capital_province = { + save_scope_as = capital + } + culture = { + save_scope_as = culture + } + save_scope_as = root_scope + } + + option = { #The architecture of the oldest buildings PROVES it was them! + name = legend_spread_events.5000.a + + trigger = { + OR = { + has_trait = scholar + has_trait = architect + } + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + every_vassal = { + vassal_stance = parochial + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + } + } + } + + option = { #They _must_ have founded it! + name = legend_spread_events.5000.b + + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { #People are convinced + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5000.b.tt.success + send_interface_toast = { + title = legend_spread_events.5000.b.tt.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # People are unconvinced + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5000.b.tt.failure + send_interface_toast = { + title = legend_spread_events.5000.b.tt.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = lazy + has_trait = fickle + } + } + } + } + + option = { #Re-use the masonry + name = legend_spread_events.5000.c + + promoted_legend = { + add_legend_county_modifier = { + modifier = legend_edifices_enduring + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + } + } + + + option = { #Maybe that's a bit of a stretch + name = legend_spread_events.5000.d + + add_character_modifier = { + modifier = legend_character_culture_builders + years = 15 + } + + scope:capital = { + add_province_modifier = { + modifier = legend_county_culture_builders + years = 15 + } + } + + stress_impact = { + ambitious = medium_stress_impact_gain + content = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = ambitious + } + modifier = { + factor = 2 + has_trait = content + } + } + } +} + +# Your parent claims you fasted on holy days as a baby +legend_spread_events.5005 = { + type = character_event + title = legend_spread_events.5005.t + desc = { + desc = legend_spread_events.5005.desc + first_valid = { + triggered_desc = { + trigger = { + scope:parent = { + this = scope:chronicler + } + } + desc = legend_spread_events.5005.parent_chronicler + } + triggered_desc = { + trigger = { + NOT = { + scope:parent = { + this = scope:chronicler + } + } + } + desc = legend_spread_events.5005.regular + } + } + } + theme = legend + override_background = { reference = temple } + left_portrait = { + character = root + animation = love + } + right_portrait = { + character = scope:parent + animation = ecstasy + } + lower_center_portrait = { + trigger = { + NOT = { + scope:chronicler = { + this = scope:parent + } + } + } + character = scope:chronicler + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + any_parent = { + is_alive = yes + opinion = { + target = root + value >= low_positive_opinion + } + save_temporary_scope_as = parent + } + faith = { trait_is_virtue = temperate } + any_courtier = { + NOR = { + this = root + this = scope:parent + } + is_available_ai_adult = yes + } + } + + immediate = { + save_scope_as = root_scope + grab_appropriate_chronicler_effect = yes + random_parent = { + limit = { + is_alive = yes + opinion = { + target = root + value >= low_positive_opinion + } + } + save_scope_as = parent + } + } + + option = { #Mother please, you're embarrassing me + name = legend_spread_events.5005.a + + trigger = { + OR = { + has_trait = humble + has_trait = shy + } + NOT = { + has_trait = arrogant + } + } + + add_character_modifier = { + modifier = legend_humble_king + years = 25 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pleased_opinion + opinion = 25 + target = root + } + } + + stress_impact = { + diligent = minor_stress_impact_gain + lazy = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = diligent + } + } + } + + option = { #Clearly I am a holy person! + name = legend_spread_events.5005.b + + flavor = legend_spread_events.5005.b.tt + + add_piety = medium_piety_gain + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + temperate = miniscule_stress_impact_loss + gluttonous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = humble + has_trait = gluttonous + } + } + } + } + + option = { #Enough about me. How are you, mother? + name = legend_spread_events.5005.c + + add_character_modifier = { + modifier = legend_mothers_boy + years = 15 + } + + reverse_add_opinion = { + modifier = love_opinion + target = scope:parent + opinion = 50 + } + + stress_impact = { + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = ambitious + } + } + } +} + +# Attempt to heal the sick with your touch +legend_spread_events.5010 = { + type = character_event + title = legend_spread_events.5010.t + desc = legend_spread_events.5010.desc + theme = legend + override_background = { reference = alley_day } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:sick + animation = sick_stomach + } + lower_center_portrait = { + character = scope:chronicler + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + any_pool_character = { + province = root.location + is_ai = yes + is_adult = yes + has_trait = ill + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + random_pool_character = { + province = root.location + limit = { + is_ai = yes + is_adult = yes + has_trait = ill + } + save_scope_as = sick + } + root.location = { + if = { + limit = { + province_owner = root + } + save_scope_as = location + } + } + save_scope_value_as = { + name = illness_range + value = { + integer_range = { + min = 1 + max = 15 + } + } + } + } + + option = { #Persuade them to give to those less fortunate and acquire salvation that way + name = legend_spread_events.5010.a + + trigger = { + OR = { + has_trait = arbitrary + intrigue > 13 + } + } + + flavor = legend_spread_events.5010.a.tt + + scope:location ?= { + add_province_modifier = { + modifier = legend_charitable_donations + years = 15 + } + } + + reverse_add_opinion = { + modifier = respect_opinion + target = scope:sick + opinion = 5 + } + + stress_impact = { + ambitious = medium_stress_impact_gain + humble = minor_stress_impact_loss + diligent = minor_stress_impact_gain + lazy = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = ambitious + } + } + } + + option = { #Give it a go, I suppose + name = legend_spread_events.5010.b + + random_list = { + 30 = { #The sick person is healed! + desc = legend_spread_events.5010.b.criticalsuccess + send_interface_toast = { + title = legend_spread_events.5010.b.criticalsuccess + left_icon = root + right_icon = scope:sick + + scope:sick = { + remove_trait = ill + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = major_legend_quality_increase } + } + } + } + 50 = { #They get placebo'd a little + modifier = { + add = scope:illness_range + } + desc = legend_spread_events.5010.b.success + send_interface_toast = { + title = legend_spread_events.5010.b.success + left_icon = root + right_icon = scope:sick + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + 20 = { #They see no change at all + desc = legend_spread_events.5010.b.failure + send_interface_toast = { + title = legend_spread_events.5010.b.failure + left_icon = root + right_icon = scope:sick + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + craven = minor_stress_impact_gain + shy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = 0.5 + } + } + } + + option = { #You must seek healing elsewhere! + name = legend_spread_events.5010.c + + scope:location ?= { + add_province_modifier = { + modifier = legend_sick_hospitals + years = 25 + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:sick + opinion = -20 + } + + stress_impact = { + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = ambitious + } + } + } +} + +# You have a famous weapon that has killed many; or has it? +legend_spread_events.5015 = { + type = character_event + title = legend_spread_events.5015.t + desc = legend_spread_events.5015.desc + theme = legend + override_background = { reference = armory } + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + artifact = { + target = scope:artifact + position = lower_center_portrait + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + location = capital_province + any_character_artifact = { + artifact_slot_type = primary_armament + artifact_owner = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + root.location = { + save_scope_as = location + } + random_character_artifact = { + limit = { + artifact_slot_type = primary_armament + artifact_owner = root + } + save_scope_as = artifact + } + } + + option = { #And it'll take the lives of many more! + name = legend_spread_events.5015.a + + trigger = { + OR = { + has_trait = wrathful + prowess > 13 + } + } + + add_character_modifier = { + modifier = legend_bloodthirsty_warrior + years = 15 + } + + stress_impact = { + calm = medium_stress_impact_gain + wrathful = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = calm + } + } + } + + option = { #Well you see, those are just the ones I remember... + name = legend_spread_events.5015.b + + duel = { + skills = { diplomacy martial } + value = high_skill_rating + + 50 = { #Sounds legit! + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5015.b.success + send_interface_toast = { + title = legend_spread_events.5015.b.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # People are unconvinced + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5015.b.failure + send_interface_toast = { + title = legend_spread_events.5015.b.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + just = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + deceitful = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + } + } + } + + option = { #It's quite something innit? + name = legend_spread_events.5015.c + + custom_tooltip = legend_spread_events.5015.c.tt + + hidden_effect = { + random_list = { + 1 = { + scope:artifact = { + add_artifact_modifier = artifact_monthly_prestige_1_modifier + } + } + 1 = { + scope:artifact = { + add_artifact_modifier = artifact_knight_effectiveness_1_modifier + } + } + 1 = { + scope:artifact = { + add_artifact_modifier = artifact_controlled_province_advantage_1_modifier + } + } + 1 = { + scope:artifact = { + add_artifact_modifier = artifact_prowess_1_modifier + } + } + 1 = { + scope:artifact = { + add_artifact_modifier = artifact_negate_prowess_penalty_add_1_modifier + } + } + } + } + + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:chronicler + opinion = 20 + } + + stress_impact = { + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_honor = 0.5 + } + } + } +} + +# You can pretend a mark on your hand is a stigmata +legend_spread_events.5020 = { + type = character_event + title = legend_spread_events.5020.t + desc = legend_spread_events.5020.desc + theme = legend + override_background = { reference = corridor_night } + left_portrait = { + character = root + animation = lantern + } + right_portrait = { + character = scope:chronicler + animation = shock + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + save_scope_as = root_scope + } + + option = { #I also have one in my side! + name = legend_spread_events.5020.a + + trigger = { + has_trait = scarred + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + add_character_modifier = { + modifier = legend_stigmatic + years = 15 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { #It does look rather interesting, doesn't it? + name = legend_spread_events.5020.b + + add_character_modifier = { + modifier = legend_claimed_stigmatic + years = 20 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = hate_opinion + opinion = -40 + target = root + } + } + + stress_impact = { + just = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + deceitful = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + } + } + } + + option = { #It's just an old mark + name = legend_spread_events.5020.c + + add_piety = minor_piety_gain + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = trust_opinion + opinion = 20 + target = root + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:chronicler + opinion = -5 + } + + stress_impact = { + base = minor_stress_impact_loss + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 0.5 + } + } + } +} + +# Claim descent from ancient peoples by deciphering an old manuscript +legend_spread_events.5025 = { + type = character_event + title = legend_spread_events.5025.t + desc = legend_spread_events.5025.desc + theme = legend + override_background = { reference = study } + left_portrait = { + character = root + animation = chancellor + } + right_portrait = { + character = scope:chronicler + animation = thinking + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + has_legend_chronicle = ancient_people + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { #Easy! + name = legend_spread_events.5025.a + + trigger = { + has_trait = scholar + } + + show_as_unavailable = { always = yes } + + add_learning_lifestyle_xp = major_lifestyle_xp + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:chronicler + opinion = 30 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { #Let's give it a go + name = legend_spread_events.5025.b + + duel = { + skill = learning + value = medium_skill_rating + 50 = { # You decipher it + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5025.b.success + send_interface_toast = { + title = legend_spread_events.5025.b.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # You are nonplussed + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5025.b.failure + send_interface_toast = { + title = legend_spread_events.5025.b.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + option = { #There must be another way + name = legend_spread_events.5025.c + + add_character_modifier = { + modifier = ce1_forward_thinking + years = 15 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:chronicler + opinion = -5 + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# Powerful vassal is impressed by your legend +legend_spread_events.5030 = { + type = character_event + title = legend_spread_events.5030.t + desc = legend_spread_events.5030.desc + theme = legend + override_background = { reference = study } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:vassal + animation = thinking + } + lower_center_portrait = { + character = scope:chronicler + } + cooldown = { years = 20 } + + trigger = { + any_powerful_vassal = { + opinion = { + target = root + value >= low_positive_opinion + } + age > 15 + save_temporary_scope_as = potential_promoter_temp + } + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + any_legend_promoter = { + this != scope:potential_promoter_temp + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + random_powerful_vassal = { + limit = { + opinion = { + target = root + value >= low_positive_opinion + } + age > 15 + } + save_scope_as = vassal + } + } + + option = { #I would be indebted to you if you were to help spread it, perhaps? + name = legend_spread_events.5030.a + + trigger = { + scope:vassal = { + can_add_hook = { + target = root + type = favor_hook + } + } + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = major_legend_quality_increase } + } + + scope:vassal = { + add_hook = { + target = root + type = favor_hook + } + set_promoted_legend = root.promoted_legend + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + ai_vengefulness = -1 + } + } + } + + option = { #That's great to hear! + name = legend_spread_events.5030.b + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } + + option = { #It is excellent to have you here! + name = legend_spread_events.5030.c + + progress_towards_friend_effect = { + REASON = friend_legend_agreement + CHARACTER = scope:vassal + OPINION = 35 + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_compassion = 1 + } + } + } +} + +# The chronicler rushes to you with documents disputing your lineage +legend_spread_events.5035 = { + type = character_event + title = legend_spread_events.5035.t + desc = legend_spread_events.5035.desc + theme = legend + override_background = { reference = sitting_room } + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:chronicler + animation = fear + } + cooldown = { years = 20 } + + trigger = { + is_available_adult = yes + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # Burn the documents, threaten the chronicler + name = legend_spread_events.5035.a + + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_trait = wrathful + has_trait = ambitious + has_trait = arbitrary + has_trait = torturer + dread > 50 + } + } + + flavor = legend_spread_events.5035.a.tt + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + add_dread = medium_dread_gain + + reverse_add_opinion = { + modifier = scared_opinion + target = scope:chronicler + opinion = -40 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + paranoid = miniscule_stress_impact_loss + trusting = minor_stress_impact_gain + sadistic = miniscule_stress_impact_loss + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + option = { # Nonsense, look, that's my father's name right there! + name = legend_spread_events.5035.b + + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { # Oh yeah! + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5035.b.success + send_interface_toast = { + title = legend_spread_events.5035.b.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + } + } + + 50 = { # What? No it isn't + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5035.b.failure + send_interface_toast = { + title = legend_spread_events.5035.b.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_decrease + } + } + } + } + } + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + deceitful = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + ai_honor = -0.5 + } + } + } + + option = { # Let's try to keep this one quiet, shall we? + name = legend_spread_events.5035.c + + duel = { + skill = intrigue + value = medium_skill_rating + 50 = { # The secret stays secret + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5035.c.success + send_interface_toast = { + title = legend_spread_events.5035.c.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + scope:chronicler = { + add_hook = { + target = root + type = indebted_hook + } + } + } + } + + 50 = { # The secret gets out + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5035.c.failure + send_interface_toast = { + title = legend_spread_events.5035.c.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } + + option = { # Ah. Well, let's see if we can find other ones, shall we? + name = legend_spread_events.5035.d + + stress_impact = { + base = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } +} + +# You sit down with your chronicler to fill in some missing entries in the family tree +legend_spread_events.5040 = { + type = character_event + title = legend_spread_events.5040.t + desc = legend_spread_events.5040.desc + theme = legend + override_background = { reference = sitting_room } + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + random_parent = { + limit = { + is_alive = yes + is_available_ai_adult = yes + } + save_scope_as = parent + } + + set_up_regional_mythical_creature_effect = yes + } + + option = { # You successfully lie your ass off + name = legend_spread_events.5040.a + + trigger = { + OR = { + has_trait = deceitful + has_trait = schemer + intrigue > 20 + } + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + ai_rationality = 1 + } + } + } + + option = { # You ask a parent for help + name = legend_spread_events.5040.b + + trigger = { + scope:parent ?= { + is_alive = yes + } + } + + add_internal_flag = special + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -1 + } + } + } + + option = { # Attempt to make it up + name = legend_spread_events.5040.a #Re-used on purpose + + trigger = { + NOR = { + has_trait = deceitful + has_trait = schemer + intrigue > 20 + } + } + + duel = { + skills = { intrigue diplomacy } + value = high_skill_rating + 50 = { # It looks like it all adds up + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5040.c.success + send_interface_toast = { + title = legend_spread_events.5040.c.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # Your family tree makes no sense + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5040.c.failure + send_interface_toast = { + title = legend_spread_events.5040.c.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } + + option = { # Oh my god, I don't care! + name = legend_spread_events.5040.d + + random_list = { + 1 = { + desc = legend_spread_events.5040.d.success + add_prestige = minor_prestige_gain + } + 1 = { + desc = legend_spread_events.5040.d.failure + add_prestige = minor_prestige_loss + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:chronicler + opinion = -15 + } + + stress_impact = { + base = miniscule_stress_impact_loss + irritable = major_stress_impact_loss + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_energy = -0.5 + } + } + } + + after = { + if = { + limit = { exists = var:trinket_adjective_followup } + remove_variable = trinket_adjective_followup + } + } +} + +# You try to get your name in the khutbah +legend_spread_events.5045 = { + type = character_event + title = legend_spread_events.5045.t + desc = legend_spread_events.5045.desc + theme = legend + override_background = { reference = temple } + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:imam + animation = dismissal + } + lower_center_portrait = { + character = scope:chronicler + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + OR = { + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + faith.religion = religion:islam_religion + } + any_court_position_holder = { + type = camp_priest_camp_officer + is_available_ai_adult = yes + faith.religion = religion:islam_religion + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + faith.religion = religion:islam_religion + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + cp:councillor_court_chaplain ?= { + save_scope_as = imam + } + if = { + limit = { + NOT = { exists = scope:imam } + } + random_court_position_holder = { + type = camp_priest_camp_officer + save_scope_as = imam + } + } + + capital_province = { + save_scope_as = capital + } + } + + option = { # Perhaps I can owe you a favour? + name = legend_spread_events.5045.a + + trigger = { + scope:imam = { + can_add_hook = { + target = root + type = favor_hook + } + } + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + scope:imam = { + add_hook = { + target = root + type = favor_hook + } + } + + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:imam + opinion = 20 + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + paranoid = medium_stress_impact_gain + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -1 + } + } + } + + option = { # Bribe him, maybe? + name = legend_spread_events.5045.b + + duel = { + skill = diplomacy + target = scope:imam + 65 = { # He acquiesces + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5045.b.success + + # If he's not a very holy fella, he'll prioritise keeping his liege happy + modifier = { + add = 15 + scope:imam = { + has_trait = cynical + } + } + + send_interface_toast = { + title = legend_spread_events.5045.b.success + left_icon = root + right_icon = scope:imam + + pay_short_term_gold = { + target = scope:imam + gold = minor_gold_value + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + } + } + + 35 = { # He is not impressed + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5045.b.failure + + # If he's a holy fella, he'll listen to the hadith on rashwah + modifier = { + add = 50 + scope:imam = { + has_trait = zealous + } + } + + send_interface_toast = { + title = legend_spread_events.5045.b.failure + left_icon = root + right_icon = scope:imam + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:imam + opinion = -40 + } + } + } + } + + stress_impact = { + cynical = miniscule_stress_impact_loss + zealous = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -1 + } + } + } + + option = { # Persuade him + name = legend_spread_events.5045.c + + duel = { + skill = diplomacy + target = scope:imam + + 50 = { # He sees your value + desc = legend_spread_events.5045.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + # He likes ya + modifier = { + add = 5 + scope:imam = { + opinion = { + target = root + value >= low_positive_opinion + } + } + } + + # He likes ya a lot + modifier = { + add = 15 + scope:imam = { + opinion = { + target = root + value >= high_positive_opinion + } + } + } + + send_interface_toast = { + title = legend_spread_events.5045.c.success + left_icon = root + right_icon = scope:imam + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # He is not impressed + desc = legend_spread_events.5045.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5045.c.failure + left_icon = root + right_icon = scope:imam + + reverse_add_opinion = { + modifier = dismissive_opinion + target = scope:imam + opinion = -15 + } + } + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 1 + } + } + } + + option = { # Bah, never mind + name = legend_spread_events.5045.d + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:chronicler + opinion = -10 + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +# Make an entry in the style of your ancestors? +legend_spread_events.5050 = { + type = character_event + title = legend_spread_events.5050.t + desc = legend_spread_events.5050.desc + theme = legend + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = admiration + } + lower_center_portrait = { + character = scope:jeweller + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + any_pool_character = { + province = root.capital_province + is_ai = yes + is_adult = yes + } + location = capital_province + } + + immediate = { + grab_appropriate_chronicler_effect = yes + random_pool_character = { + province = root.capital_province + limit = { + is_ai = yes + is_adult = yes + } + save_scope_as = jeweller + } + capital_province = { + save_scope_as = capital + } + save_scope_as = root_scope + } + + option = { # Bedeck me in the very finest! + name = legend_spread_events.5050.a + + trigger = { + OR = { + has_trait = profligate + has_trait = arrogant + } + } + + remove_short_term_gold = major_gold_value + + save_scope_as = owner # This is needed for the crown artifact just below + + create_artifact = { + name = artifact_magnificent_crown_name + description = artifact_magnificent_crown_description + template = crown_wearable_template + wealth = 120 + quality = 120 + creator = scope:jeweller + type = helmet_simple + visuals = crown + modifier = artifact_monthly_minor_prestige_3_modifier + modifier = artifact_courtly_vassal_opinion_3_modifier + modifier = artifact_legend_spread_mult_10_modifier + modifier = artifact_dynasty_opinion_6_modifier + modifier = artifact_monthly_dynasty_prestige_1_modifier + save_scope_as = artifact + } + + every_vassal = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + stress_impact = { + profligate = medium_stress_impact_loss + generous = miniscule_stress_impact_loss + greedy = major_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_greed = -1 + } + } + } + + option = { # All right, gimme something nice + name = legend_spread_events.5050.b + + remove_short_term_gold = medium_gold_value + + create_artifact = { + name = artifact_splendid_necklace_name + description = artifact_splendid_necklace_description + wealth = 80 + quality = 80 + creator = scope:jeweller + type = miscellaneous + visuals = necklace + modifier = artifact_monthly_minor_prestige_2_modifier + modifier = artifact_courtly_vassal_opinion_2_modifier + modifier = artifact_legend_spread_mult_6_modifier + modifier = artifact_dynasty_opinion_3_modifier + save_scope_as = artifact + } + + every_vassal = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + modifier = respect_opinion + opinion = 5 + target = root + } + } + + stress_impact = { + profligate = minor_stress_impact_loss + generous = miniscule_stress_impact_loss + greedy = medium_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = -0.5 + } + } + } + + option = { # A small brooch will do + name = legend_spread_events.5050.c + + remove_short_term_gold = minor_gold_value + + create_artifact = { + name = artifact_fine_brooch_name + description = artifact_fine_brooch_description + wealth = 50 + quality = 50 + creator = scope:jeweller + type = miscellaneous + visuals = brooch + modifier = artifact_monthly_minor_prestige_1_modifier + modifier = artifact_courtly_vassal_opinion_1_modifier + modifier = artifact_legend_spread_mult_3_modifier + modifier = artifact_dynasty_opinion_1_modifier + save_scope_as = artifact + } + + stress_impact = { + profligate = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + option = { # There's no need for this + name = legend_spread_events.5050.d + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:chronicler + opinion = -15 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:jeweller + opinion = -5 + } + + stress_impact = { + profligate = medium_stress_impact_gain + generous = medium_stress_impact_gain + greedy = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + ai_greed = 1 + } + } + } +} + +# Choose to dress like one of your vassals' cultures +# Nothing is more legit than a king who wears your threads! +legend_spread_events.5055 = { + type = character_event + title = legend_spread_events.5055.t + desc = legend_spread_events.5055.desc + theme = legend + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:chronicler + animation = worry + } + lower_left_portrait = { + character = scope:vassal1 + } + lower_right_portrait = { + character = scope:vassal2 + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + any_vassal = { #Requires a vassal who is part of your culture + is_ai = yes + is_adult = yes + culture = root.culture + trigger_if = { + limit = { + root.highest_held_title_tier >= tier_empire + } + highest_held_title_tier >= tier_duchy + } + trigger_else = { + highest_held_title_tier >= tier_county + } + } + any_vassal = { #And one who isn't + is_ai = yes + is_adult = yes + culture != root.culture + culture = { + save_temporary_scope_as = other_culture + } + #Should have at least two vassals of culture + root = { + any_vassal = { + count >= 2 + culture = scope:other_culture + } + } + trigger_if = { + limit = { + root.highest_held_title_tier >= tier_empire + } + highest_held_title_tier >= tier_duchy + } + trigger_else = { + highest_held_title_tier >= tier_county + } + } + location = capital_province + } + + immediate = { + grab_appropriate_chronicler_effect = yes + random_vassal = { #Requires a vassal who is part of your culture + limit = { + is_ai = yes + is_adult = yes + culture = root.culture + trigger_if = { + limit = { + root.highest_held_title_tier = tier_empire + } + highest_held_title_tier >= tier_duchy + } + trigger_else = { + highest_held_title_tier >= tier_county + } + } + save_scope_as = vassal1 + } + random_vassal = { #And one who isn't + limit = { + is_ai = yes + is_adult = yes + culture != root.culture + culture = { + save_temporary_scope_as = other_culture + } + #Should have at least two vassals of culture + root = { + any_vassal = { + count >= 2 + culture = scope:other_culture + } + } + trigger_if = { + limit = { + root.highest_held_title_tier = tier_empire + } + highest_held_title_tier >= tier_duchy + } + trigger_else = { + highest_held_title_tier >= tier_county + } + } + save_scope_as = vassal2 + } + capital_province = { + save_scope_as = capital + } + } + + option = { # Perhaps I can please both sides? + name = legend_spread_events.5055.a + + trigger = { + OR = { + has_trait = shrewd + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + has_trait = diplomat + } + } + + flavor = legend_spread_events.5055.a.tt + + add_character_modifier = { + modifier = legend_culturally_sensitive + years = 20 + } + + scope:vassal1 = { + set_promoted_legend = root.promoted_legend + add_opinion = { + modifier = pleased_opinion + opinion = 25 + target = root + } + } + + scope:vassal2 = { + set_promoted_legend = root.promoted_legend + add_opinion = { + modifier = pleased_opinion + opinion = 25 + target = root + } + } + + every_vassal = { + limit = { + OR = { + culture = root.culture + culture = scope:vassal2.culture + } + } + custom = 5055_every_culture_vassal + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + callous = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + } + } + + option = { # I shall represent my people! + name = legend_spread_events.5055.b + + scope:vassal1 = { + set_promoted_legend = root.promoted_legend + } + + every_vassal = { + limit = { + culture = root.culture + } + custom = 5055_vassal1_culture + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:vassal2 + opinion = -25 + } + + stress_impact = { + compassionate = minor_stress_impact_gain + callous = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + arrogant = miniscule_stress_impact_loss + just = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_sociability = -0.5 + } + } + } + + option = { # Vassal 2's people need to feel represented by me too + name = legend_spread_events.5055.c + + scope:vassal2 = { + set_promoted_legend = root.promoted_legend + } + + every_vassal = { + custom = 5055_vassal2_culture + limit = { + culture = scope:vassal2.culture + } + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:vassal1 + opinion = -25 + } + + stress_impact = { + compassionate = minor_stress_impact_gain + callous = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + arrogant = miniscule_stress_impact_loss + just = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_sociability = -0.5 + } + } + } + + option = { # I should avoid making enemies + name = legend_spread_events.5055.d + + flavor = legend_spread_events.5055.d.tt + + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:vassal1 + opinion = 10 + } + + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:vassal2 + opinion = 10 + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + ai_compassion = 0.5 + } + } + } +} + +# You claim your blindness was due to being blinded by seeing God +legend_spread_events.5060 = { + type = character_event + title = legend_spread_events.5060.t + desc = { + desc = legend_spread_events.5060.opening + desc = { + triggered_desc = { + trigger = { + has_trait = one_eyed + } + desc = legend_spread_events.5060.one_eyed + } + triggered_desc = { + trigger = { + has_trait = blind + } + desc = legend_spread_events.5060.blind + } + } + desc = legend_spread_events.5060.ending + } + + theme = legend + override_background = { reference = bp2_courtyard } + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:chronicler + animation = admiration + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + OR = { + has_trait = blind + has_trait = one_eyed + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + save_scope_as = root_scope + } + + option = { # His glory struck me fully blind! + name = legend_spread_events.5060.a + + trigger = { + has_trait = blind + } + + add_character_modifier = { + modifier = legend_visions_of_god + years = 15 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + opinion = 50 + target = root + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = major_stress_impact_gain + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # He asked for a sacrifice of my eye, which I gladly gave! + name = legend_spread_events.5060.b + + trigger = { + has_trait = one_eyed + } + + add_character_modifier = { + modifier = legend_holy_sacrifice + years = 15 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + opinion = 35 + target = root + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = major_stress_impact_gain + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # Losing my sight has humbled me in the eyes of god + name = legend_spread_events.5060.c + + add_character_modifier = { + modifier = legend_gods_humble_servant + years = 15 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { # It's just an old malady + name = legend_spread_events.5060.d + + flavor = legend_spread_events.5060.d.tt + + add_prestige = minor_prestige_value + + stress_impact = { + base = minor_stress_impact_loss + honest = medium_stress_impact_loss + deceitful = medium_stress_impact_gain + cynical = minor_stress_impact_loss + zealous = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + } + } + } +} + +# Lose weight to show holiness +legend_spread_events.5065 = { + type = character_event + title = legend_spread_events.5065.t + desc = legend_spread_events.5065.desc + + theme = legend + override_background = { reference = bp1_kitchen_western } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:chronicler + animation = thinking + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + faith = { trait_is_virtue = temperate } + current_weight > -15 + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + save_scope_as = root_scope + } + + option = { # Bah, I am much happier like this! + name = legend_spread_events.5065.a + + add_character_modifier = { + modifier = legend_fat_and_happy + years = 15 + } + + change_current_weight = 20 + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = impious_opinion + opinion = -15 + target = root + } + } + + stress_impact = { + base = medium_stress_impact_loss + zealous = major_stress_impact_gain + cynical = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_greed = 1 + } + } + } + + option = { # I will do better. + name = legend_spread_events.5065.b + + change_current_weight = -20 + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + opinion = 25 + target = root + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = medium_stress_impact_gain + gluttonous = medium_stress_impact_gain + temperate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + ai_greed = -1 + } + } + } + + option = { # A little bit here and there won't hurt, surely? + name = legend_spread_events.5065.c + + add_character_modifier = { + modifier = legend_sneaks_food + years = 10 + } + + stress_impact = { + gluttonous = miniscule_stress_impact_loss + temperate = minor_stress_impact_gain + deceitful = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -0.5 + ai_greed = 0.5 + } + } + } +} + +# You consider dressing in the style of ancestors +legend_spread_events.5070 = { + type = character_event + title = legend_spread_events.5070.t + desc = legend_spread_events.5070.desc + + theme = legend + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = ecstasy + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + culture = { + save_scope_as = culture + } + save_scope_as = root_scope + } + + option = { # I shall dress myself as the first of my culture did! + name = legend_spread_events.5070.a + + remove_short_term_gold = minor_gold_value + + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { #People are convinced + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5070.a.success + send_interface_toast = { + title = legend_spread_events.5070.a.success + left_icon = root + right_icon = scope:chronicler + + add_character_modifier = { + modifier = legend_historical_bedecking + years = 15 + } + + every_vassal = { + limit = { + culture = root.culture + } + custom = every_culture_vassal + add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = root + } + } + } + } + + 50 = { # People are unconvinced + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5070.a.failure + send_interface_toast = { + title = legend_spread_events.5070.a.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 1 + } + } + } + + option = { # Maybe just a few? + name = legend_spread_events.5070.b + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + stress_impact = { + fickle = miniscule_stress_impact_loss + stubborn = minor_stress_impact_gain + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + option = { # I won't defer to the past + name = legend_spread_events.5070.c + + add_character_modifier = { + modifier = legend_modern_ruler + years = 15 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } +} + +# You notice an imam has a prayer callus +legend_spread_events.5075 = { + type = character_event + title = legend_spread_events.5075.t + desc = legend_spread_events.5075.desc + + theme = legend + override_background = { reference = corridor_day } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = ecstasy + } + lower_center_portrait = { + character = scope:imam + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + OR = { + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + faith.religion = religion:islam_religion + } + any_court_position_holder = { + type = camp_priest_camp_officer + is_available_ai_adult = yes + faith.religion = religion:islam_religion + } + } + faith.religion = religion:islam_religion + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + cp:councillor_court_chaplain ?= { + save_scope_as = imam + } + if = { + limit = { + NOT = { exists = scope:imam } + } + random_court_position_holder = { + type = camp_priest_camp_officer + save_scope_as = imam + } + } + + save_scope_as = root_scope + } + + option = { # Try and trick everyone + name = legend_spread_events.5075.a + + trigger = { + has_trait = deceitful + } + + duel = { + skill = intrigue + value = high_skill_rating + 50 = { #It works + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5075.a.success + send_interface_toast = { + title = legend_spread_events.5075.a.success + left_icon = root + right_icon = scope:chronicler + + add_character_modifier = { + modifier = legend_prayer_callus + years = 15 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + opinion = 15 + target = root + } + } + } + } + + 50 = { # It does not work + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5075.a.failure + send_interface_toast = { + title = legend_spread_events.5075.a.failure + left_icon = root + right_icon = scope:chronicler + + add_piety = miniscule_piety_loss + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = impious_opinion + opinion = -35 + target = root + } + } + } + } + } + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + just = medium_stress_impact_gain + cynical = miniscule_stress_impact_loss + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + ai_boldness = 1 + } + } + } + + option = { # Give it a go + name = legend_spread_events.5075.b + + duel = { + skills = { learning prowess } + value = high_skill_rating + 50 = { #It works + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5075.b.success + send_interface_toast = { + title = legend_spread_events.5075.b.success + left_icon = root + right_icon = scope:chronicler + + add_character_modifier = { + modifier = legend_prayer_callus + years = 15 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + opinion = 15 + target = root + } + } + } + } + + 50 = { # Ow + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5075.b.failure + send_interface_toast = { + title = legend_spread_events.5075.b.failure + left_icon = root + right_icon = scope:chronicler + + add_character_modifier = { + modifier = legend_bruised_head + years = 5 + } + } + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = medium_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # This is ridiculous + name = legend_spread_events.5075.c + + add_piety = minor_prestige_gain + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:imam + opinion = -15 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + } + } + } +} + +# Motivation, Discovery and Battle chapters - 5200-5299 + +# MOTIVATION EVENTS + +# I did this to acquire EXOTIC MEATS +# by Nick Meredith +legend_spread_events.5200 = { + type = character_event + title = legend_spread_events.5200.t + desc = legend_spread_events.5200.desc + theme = legend + + left_portrait = { + character = root + animation = drink_goblet + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + legend_protagonist = { + AND = { + this = root + has_trait = gluttonous + } + } + has_legend_chapter = motivation + has_legend_chapter = hunt + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + promoted_legend = { + save_scope_as = legend + } + random_parent = { + even_if_dead = yes + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + + option = { # I did it for the MEATS + name = legend_spread_events.5200.a + + trigger = { + has_trait = gluttonous + } + + promoted_legend = { + set_legend_chapter = { name = motivation localization_key = legend_chapter_motivation_delicious_meats } + add_legend_owner_modifier = { + modifier = legend_palatial_palatable + } + } + + reverse_add_opinion = { + modifier = confused_opinion + target = scope:chronicler + opinion = -5 + } + + stress_impact = { + base = medium_stress_impact_loss + honest = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + option = { # I did it to AVENGE MY MUM/DAD + name = legend_spread_events.5200.b + + trigger = { + exists = scope:dead_parent + } + + duel = { + skills = { intrigue diplomacy } + value = medium_skill_rating + + 50 = { #People believe this + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { #Helps if your parents copped it in unknown ways + add = 75 + scope:dead_parent = { + death_reason = death_mysterious + } + } + modifier = { #Helps if your parents copped it in specifically animal-related ways + add = 125 + scope:dead_parent = { + OR = { + death_reason = death_deer + death_reason = death_antelope + death_reason = death_gazelle + death_reason = death_bison + death_reason = death_boar + death_reason = death_aurochs + death_reason = death_hyena + death_reason = death_lion + death_reason = death_tiger + death_reason = death_leopard + death_reason = death_roe + death_reason = death_hart + } + } + } + desc = legend_spread_events.5200.b.success + send_interface_toast = { + title = legend_spread_events.5200.b.success + left_icon = root + right_icon = scope:chronicler + + add_character_modifier = { + modifier = ce1_avenging_child + years = 10 + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_motivation_dead_parent } + } + } + } + + 50 = { #Who are you trying to kid? + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5200.b.failure + send_interface_toast = { + title = legend_spread_events.5200.b.failure + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_loss + } + } + } + + promoted_legend = { + set_legend_chapter = { name = motivation localization_key = legend_chapter_motivation_dead_parent } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + option = { # What? No, no, I did it for the glory, duh. Haha. + name = legend_spread_events.5200.c + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = respect_opinion + target = scope:chronicler + opinion = 15 + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } +} + +# I did this to prove my skill +# by Nick Meredith +legend_spread_events.5205 = { + type = character_event + title = legend_spread_events.5205.t + desc = legend_spread_events.5205.desc + theme = legend + + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + legend_protagonist = root + has_legend_chapter = motivation + has_legend_chapter = hunt + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + if = { + limit = { + any_sub_realm_county = { + NOT = { + has_county_modifier = hunt_sighting_dangerous_modifier + } + } + } + random_sub_realm_county = { + limit = { + NOT = { + has_county_modifier = hunt_sighting_dangerous_modifier + } + } + save_scope_as = hunt_sighting + } + } + } + + option = { # I did this to prove I am the greatest hunter in the land! + name = legend_spread_events.5205.a + + trigger = { + has_trait = lifestyle_hunter + } + + promoted_legend = { + set_legend_chapter = { name = motivation localization_key = legend_chapter_motivation_great_venator } + } + + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = tournament_hastiludes_xp_gain_minor_value #Just as a randomised but low value + } + + reverse_add_opinion = { + modifier = respect_opinion + target = scope:chronicler + opinion = 20 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 1 + } + } + } + + option = { # I did it to hunt more dangerous game + name = legend_spread_events.5205.b + + trigger = { + # No extant Dangerous sightings + NOT = { + any_sub_realm_county = { has_county_modifier = hunt_sighting_dangerous_modifier } + } + } + + flavor = legend_spread_events.5205.b.tt + + random_sub_realm_county = { + limit = { hunt_activity_recent_hunt_sighting_trigger = no } + weight = { + base = 1 + hunt_activity_sighting_county_modifier = yes + } + random_county_province = { + weight = { + base = 1 + hunt_activity_sighting_terrain_modifier = yes + hunt_activity_sighting_building_modifier = { PROVINCE = this } + hunt_activity_game_building_modifier = { PROVINCE = this } + } + save_scope_as = sighting_province + } + save_scope_as = sighting_county + hidden_effect = { + hunt_activity_dangerous_game_effect = { PROVINCE = scope:sighting_province } + } + # Create new sighting + hunt_create_sighting_effect = { + TYPE = dangerous + ANIMAL = var:animal_type + OWNER = root + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # I did it to discover more amnimals + name = legend_spread_events.5205.c + + add_trait = lifestyle_hunter + add_trait_xp = { + trait = lifestyle_hunter + track = falconer + value = 15 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # To prove my skill as a hunter! + name = legend_spread_events.5205.d + + promoted_legend = { + set_legend_chapter = { name = motivation localization_key = legend_chapter_motivation_accomplished_hunter } + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = respect_opinion + target = scope:chronicler + opinion = 15 + } + + stress_impact = { + base = minor_stress_impact_loss + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } +} + +# DISCOVERY EVENTS + +# I saw a cyclops! +# by Nick Meredith +legend_spread_events.5210 = { + type = character_event + title = legend_spread_events.5210.t + desc = legend_spread_events.5210.desc + theme = legend + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + NOT = { + has_trait = blind + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + save_scope_as = root_scope + } + + option = { # And he thought I was a cyclops too! + name = legend_spread_events.5210.a + + trigger = { + has_trait = one_eyed + promoted_legend ?= { + legend_protagonist = root + } + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_befriended_cyclops } + } + + give_nickname = nick_the_cyclops + + reverse_add_opinion = { + modifier = amazed_opinion + target = scope:chronicler + opinion = 20 + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + } + } + } + + option = { # I saw a cyclops + name = legend_spread_events.5210.b + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_cyclops } + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + + reverse_add_opinion = { + modifier = amazed_opinion + target = scope:chronicler + opinion = 5 + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Just a local + name = legend_spread_events.5210.c + + add_prestige = miniscule_prestige_gain + + promoted_legend = { + add_legend_county_modifier = { + modifier = legend_monophthalmic_mythical + } + } + + every_vassal = { + vassal_stance = parochial + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = -1 + } + } + } +} + +# I was drugged by an evil plant +# by Nick Meredith +legend_spread_events.5215 = { + type = character_event + title = legend_spread_events.5215.t + desc = legend_spread_events.5215.desc + theme = legend + + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # And I learned much from it! + name = legend_spread_events.5215.a + + trigger = { + has_trait = lifestyle_herbalist + promoted_legend ?= { + legend_protagonist = root + } + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_renowned_herbalist } + } + + add_character_modifier = { + modifier = legend_renowned_herbalist + years = 15 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { # It was a terrible trap, but I fought through + name = legend_spread_events.5215.b + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_evil_plants } + } + + add_prestige = medium_prestige_gain + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # I dunno where you heard that m8 + name = legend_spread_events.5215.c + + if = { + limit = { has_trait = lifestyle_herbalist } + add_learning_lifestyle_xp = major_lifestyle_xp + } + else = { + add_trait = lifestyle_herbalist + add_learning_lifestyle_xp = medium_lifestyle_xp + } + + reverse_add_opinion = { + modifier = honesty_opinion + target = scope:chronicler + opinion = 10 + } + + stress_impact = { + base = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I was challenged to an archery contest +# by Nick Meredith +legend_spread_events.5216 = { + type = character_event + title = legend_spread_events.5216.t + desc = legend_spread_events.5216.desc + theme = legend + + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = { + NOR = { + has_trait = maimed + has_trait = incapable + } + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # And I won it by splitting their arrow in twain! + name = legend_spread_events.5216.a + + trigger = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 50 + } + promoted_legend ?= { + legend_protagonist = { + this = root + } + } + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_legendary_archer } + } + + add_character_modifier = { + modifier = legend_eagle_eyed + years = 15 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 1 + } + } + } + + option = { # And I beat them! + name = legend_spread_events.5216.b + + duel = { + skill = prowess + value = medium_skill_rating + + 50 = { #People believe this + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5216.b.success + send_interface_toast = { + title = legend_spread_events.5216.b.success + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_gain + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_archery_contest_won } + } + } + } + + 50 = { #Who are you trying to kid? + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5216.b.failure + send_interface_toast = { + title = legend_spread_events.5216.b.failure + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # I can't really remember who won tbh + name = legend_spread_events.5216.c + + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + add_trait = tourney_participant + } + + add_trait_xp = { + trait = tourney_participant + track = bow + value = { + integer_range = { + min = 1 + max = 5 + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + humble = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I fell in quicksand/bog! +# by Nick Meredith +legend_spread_events.5220 = { + type = character_event + title = legend_spread_events.5220.t + theme = legend + desc = { + desc = legend_spread_events.5220.desc.start + triggered_desc = { #Quick n dirty choice between bog and quicksand + trigger = { #Using capital province is a cheap way to choose a more 'familiar' hazard for the character + root.capital_province = { + OR = { + terrain = plains + terrain = hills + terrain = jungle + terrain = forest + terrain = taiga + terrain = wetlands + terrain = steppe + terrain = farmlands + terrain = floodplains + terrain = mountains + } + } + } + desc = legend_spread_events.5220.desc.wet + } + triggered_desc = { + trigger = { + root.capital_province = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = drylands + } + } + } + desc = legend_spread_events.5220.desc.dry + } + desc = legend_spread_events.5220.desc.ending + } + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = { + this = root + NOT = { + has_trait = incapable + } + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # I hauled myself free easily! + name = legend_spread_events.5220.a + + trigger = { + OR = { + has_trait = physique_good + has_trait = strong + } + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_bog_stronk } + } + + add_prestige = medium_prestige_gain + + give_nickname = nick_natures_bane + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # I struggled through + name = legend_spread_events.5220.b + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_bog_struggle } + } + + add_prestige = minor_prestige_gain + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # I don't remember any bog + name = legend_spread_events.5220.c + + if = { + limit = { + NOT = { + has_trait = forder + } + } + random = { + chance = 50 + add_trait = forder + } + } + else = { + add_martial_lifestyle_xp = minor_lifestyle_experience + } + + stress_impact = { + base = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I discovered a new type of flower +# by Nick Meredith +legend_spread_events.5225 = { + type = character_event + title = legend_spread_events.5225.t + theme = legend + desc = legend_spread_events.5225.desc + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # Of course I have proof! + name = legend_spread_events.5225.a + + trigger = { + has_trait = lifestyle_herbalist + } + + flavor = legend_spread_events.5225.a.tt + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_wildflower_expert } + } + + create_artifact_pressed_flower_effect = { OWNER = root } + + add_prestige = medium_prestige_gain + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Er, um, of course I have proof... + name = legend_spread_events.5225.b + + flavor = legend_spread_events.5225.b.tt + + duel = { + skill = intrigue + target = scope:chronicler + + 50 = { #The chronicler's never seen a flower like that before! + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5225.b.success + send_interface_toast = { + title = legend_spread_events.5225.b.success + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_gain + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_wildflower_expert } + } + } + } + + 50 = { #...that's a daffodil mate. + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5225.b.failure + send_interface_toast = { + title = legend_spread_events.5225.b.failure + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # Let's stay on topic, shall we? + name = legend_spread_events.5225.c + + add_character_modifier = { + modifier = ce1_black_thumb + years = 15 + } + + stress_impact = { + base = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } + + option = { # They were just regular flowers + name = legend_spread_events.5225.d + + stress_impact = { + base = minor_stress_impact_loss + lazy = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I fought off cannibals +# by Nick Meredith +legend_spread_events.5230 = { + type = character_event + title = legend_spread_events.5230.t + theme = legend + desc = legend_spread_events.5230.desc + + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:chronicler + animation = shock + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + # Just to ensure people are actually freaked out by this + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = cannibal + GENDER_CHARACTER = root + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # One of them even bit me! + name = legend_spread_events.5230.a + + trigger = { + has_trait = scarred + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_cannibal_scarred } + } + + add_character_modifier = { + modifier = legend_cannibal_scarred + years = 25 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Mmm, meats + name = legend_spread_events.5230.b + + add_internal_flag = dangerous + + add_secret = { type = secret_cannibal } + + reverse_add_opinion = { + modifier = uncertain_opinion + target = scope:chronicler + opinion = -10 + } + + stress_impact = { + honest = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # And I lived to tell the tale! + name = legend_spread_events.5230.c + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_cannibal_fight } + } + + add_prestige = minor_prestige_gain + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # Honestly, I think they were just bandits. + name = legend_spread_events.5230.d + + if = { + limit = { + NOT = { + has_trait = shrewd + } + } + random = { + chance = 10 + add_trait = shrewd + } + } + else = { + add_learning_lifestyle_xp = minor_lifestyle_experience + } + + stress_impact = { + base = minor_stress_impact_loss + lazy = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# BATTLE EVENTS + +# Did you slay the enemy commander? +# by Nick Meredith +legend_spread_events.5235 = { + type = character_event + title = legend_spread_events.5235.t + theme = legend + desc = legend_spread_events.5235.desc + + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:chronicler + animation = shock + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # Yeah I slapped him around + name = legend_spread_events.5235.a + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_enemy_commander } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # They fell before I could get to them, sadge + name = legend_spread_events.5235.b + + add_character_modifier = { + modifier = ce1_modest_leader + years = 15 + } + + reverse_add_opinion = { + modifier = honesty_opinion + target = scope:chronicler + opinion = 5 + } + + stress_impact = { + base = miniscule_stress_impact_loss + humble = major_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# Did I do a tacticool retreat +# by Nick Meredith +legend_spread_events.5240 = { + type = character_event + title = legend_spread_events.5240.t + theme = legend + desc = legend_spread_events.5240.desc + + left_portrait = { + character = root + animation = personality_dishonorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + AND = { + this = root + has_trait = craven + } + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # It was, of course, a tactical retreat. + name = legend_spread_events.5240.a + + trigger = { + OR = { + has_trait = deceitful + has_trait = schemer + has_trait = education_intrigue_5 + } + } + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_faked_retreat } + } + + add_prestige = medium_prestige_gain + + stress_impact = { + base = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + brave = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # It was a tactical retreat! + name = legend_spread_events.5240.b + + duel = { + skills = { martial intrigue } + value = medium_skill_rating + + 50 = { #People believe this + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5240.b.success + send_interface_toast = { + title = legend_spread_events.5240.b.success + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_gain + + add_stress = minor_stress_loss + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_faked_retreat } + } + } + } + + 50 = { #Who are you trying to kid? + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5240.b.failure + send_interface_toast = { + title = legend_spread_events.5240.b.failure + left_icon = root + right_icon = scope:chronicler + + add_prestige = minor_prestige_loss + + add_character_modifier = { + modifier = legend_bravely_ran_away + years = 10 + } + } + } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Let's focus on the results eh + name = legend_spread_events.5240.c + + add_character_modifier = { + modifier = ce1_consequentialist + years = 10 + } + + add_prestige = minor_prestige_gain + + stress_impact = { + base = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# Did you lead the flank that crushed the enemy? +# by Nick Meredith +legend_spread_events.5245 = { + type = character_event + title = legend_spread_events.5245.t + theme = legend + desc = legend_spread_events.5245.desc + + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # Of course, and it's believable right? + name = legend_spread_events.5245.a + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_flanking_success } + } + + random = { + chance = 25 + add_martial_skill = 1 + } + + add_prestige = medium_prestige_gain + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # We actually crushed them with a frontal assault! + name = legend_spread_events.5245.b + + random = { + chance = 50 + add_trait = aggressive_attacker + } + + add_prestige = minor_prestige_gain + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # I was merely overseeing the battle + name = legend_spread_events.5245.c + + if = { + limit = { + NOT = { + has_trait = logistician + } + } + random = { + chance = 75 + add_trait = logistician + } + } + else = { + add_martial_lifestyle_xp = minor_lifestyle_experience + } + + stress_impact = { + base = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I heard you saved a noble maiden/mandem +# by Nick Meredith +legend_spread_events.5250 = { + type = character_event + title = legend_spread_events.5250.t + theme = legend + desc = legend_spread_events.5250.desc + + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + lower_center_portrait = { + trigger = { exists = scope:spouse } + character = scope:spouse + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + if = { + limit = { + exists = primary_spouse + } + random_spouse = { + save_scope_as = spouse + } + } + } + + option = { # I did, and I RAVISHED EM + name = legend_spread_events.5250.a + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_lecherous_lewd + } + } + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:spouse + opinion = -65 + } + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_ravished_maiden } + } + + stress_impact = { + lustful = major_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = medium_stress_impact_gain + honest = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 1 + } + } + } + + option = { # 'Twas merely a kisseth! How did it end up like thiseth? + name = legend_spread_events.5250.b # 'Twere only a kisseth, 'twere only a kisseth + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_maiden_kiss } + } + + reverse_add_opinion = { + modifier = annoyed_opinion + target = scope:spouse + opinion = -10 + } + + stress_impact = { + lustful = medium_stress_impact_loss + chaste = medium_stress_impact_gain + brave = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Me?! Never! + name = legend_spread_events.5250.c + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_chaste_faithful + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I heard you fought through some grievous wounds +# by Nick Meredith +legend_spread_events.5255 = { + type = character_event + title = legend_spread_events.5255.t + theme = legend + desc = legend_spread_events.5255.desc + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + save_scope_as = root_scope + } + + option = { # How d'you think I got these massive bodily injuries? + name = legend_spread_events.5255.a + + trigger = { + OR = { + has_trait = one_eyed + has_trait = maimed + has_trait = one_legged + } + } + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_wounded } + } + + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = respect_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # How d'you think I got these scars? + name = legend_spread_events.5255.b + + trigger = { + OR = { + has_trait = scarred + has_trait = disfigured + } + } + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_wounded } + } + + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = respect_opinion + target = root + opinion = 15 + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # Thanks to god I avoided any such pain + name = legend_spread_events.5255.c + + add_piety = medium_piety_gain + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = respect_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # I pushed through like a legend mate + name = legend_spread_events.5255.d + + add_prestige = medium_prestige_gain + + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = respect_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + zealous = minor_stress_impact_gain + cynical = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + } + } + } +} + +# I heard you arrived in the nick of time with reinforcements! +# by Nick Meredith +legend_spread_events.5260 = { + type = character_event + title = legend_spread_events.5260.t + theme = legend + desc = legend_spread_events.5260.desc + + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # I sure did! + name = legend_spread_events.5260.a + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_reinforcement_arrival } + } + + if = { + limit = { + NOT = { + has_trait = reckless + } + } + random = { + chance = 50 + add_trait = reckless + } + } + else = { + add_martial_lifestyle_xp = minor_lifestyle_experience + } + + add_character_modifier = { + modifier = legend_nick_of_time + years = 15 + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # Actually we already had that organised! + name = legend_spread_events.5260.b + + if = { + limit = { + NOT = { + has_trait = organizer + } + } + random = { + chance = 50 + add_trait = organizer + } + } + else = { + add_martial_lifestyle_xp = minor_lifestyle_experience + } + + add_character_modifier = { + modifier = legend_well_organised + years = 15 + } + + stress_impact = { + craven = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + patient = miniscule_stress_impact_loss + impatient = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } +} + +## Buying into legend events + +# You write a missive to a neighbouring ruler +legend_spread_events.5305 = { + type = character_event + title = legend_spread_events.5305.t + desc = legend_spread_events.5305.desc + theme = legend + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + lower_center_portrait = { + character = scope:potential_promoter + } + cooldown = { years = 25 } + + trigger = { + highest_held_title_tier > tier_barony + any_neighboring_realm_same_rank_owner = { + is_available_healthy_ai_adult = yes + save_temporary_scope_as = potential_promoter_temp + } + promoted_legend ?= { + legend_owner = root + any_legend_promoter = { + this != scope:potential_promoter_temp + } + } + } + + immediate = { + random_neighboring_realm_same_rank_owner = { + limit = { + is_available_healthy_ai_adult = yes + } + + save_scope_as = potential_promoter + } + + promoted_legend = { save_scope_as = promoted_legend } + culture = { save_scope_as = root_culture } + grab_appropriate_chronicler_effect = yes + } + + option = { # Don't you want to see a fellow [x culture] succeed? + name = legend_spread_events.5305.a + + trigger = { + culture = scope:potential_promoter.culture + } + + duel = { + skill = diplomacy + value = average_skill_rating + + 50 = { # They agree + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Likes you + scope:potential_promoter = { + opinion = { + target = root + value >= 60 + } + } + add = 25 + } + send_interface_toast = { + title = legend_spread_events.5305.a.success + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { # They disagree + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + add = 10 + } + send_interface_toast = { + title = legend_spread_events.5305.a.failure + add_prestige = miniscule_prestige_loss + } + } + } + + stress_impact = { + calm = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Else I'll beat you up m8 + name = legend_spread_events.5305.b + duel = { + skills = { martial prowess } + value = medium_skill_rating + + 50 = { # They acquiesce + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # You are scary + dread > 49 + add = 15 + } + modifier = { # You are stronger than them + root.current_military_strength > scope:potential_promoter.current_military_strength + add = 20 + } + modifier = { # You are significantly stronger than them + root.current_military_strength > scope:potential_promoter.one_and_a_half_times_current_military_strength + add = 30 + } + send_interface_toast = { + title = legend_spread_events.5305.b.success + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + add_opinion = { + target = root + modifier = threatened_opinion + opinion = -50 + } + } + } + } + + 50 = { # They don't care for your threats + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + add = 25 + } + modifier = { # Dislikes you + scope:potential_promoter = { + opinion = { + target = root + value <= 0 + } + } + add = 20 + } + modifier = { # Stubborn to a fault + scope:potential_promoter = { + has_trait = stubborn + } + add = 10 + } + send_interface_toast = { + title = legend_spread_events.5305.b.failure + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + + reverse_add_opinion = { + target = scope:potential_promoter + modifier = dismissive_opinion + opinion = -20 + } + } + } + } + + stress_impact = { + calm = minor_stress_impact_gain + gregarious = miniscule_stress_impact_gain + trusting = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # It's the neighbourly thing to do! + name = legend_spread_events.5305.c + + duel = { + skill = diplomacy + target = scope:potential_promoter + + 50 = { # Agreed! + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5305.c.success + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { #Disagree! + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + add = 15 + } + send_interface_toast = { + title = legend_spread_events.5305.c.failure + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_gain + shy = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { # Just send the letter as-is + name = legend_spread_events.5305.d + + random = { + chance = 10 + modifier = { # Likes you a bit + scope:potential_promoter = { + opinion = { + target = root + value > low_positive_opinion + } + } + add = 10 + } + modifier = { # Likes you a lot + scope:potential_promoter = { + opinion = { + target = root + value > medium_positive_opinion + } + } + add = 10 + } + send_interface_toast = { + title = legend_spread_events.5305.d.success + + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# You send a chronicler/herald to convince a neighbouring ruler +legend_spread_events.5310 = { + type = character_event + title = legend_spread_events.5310.t + desc = legend_spread_events.5310.desc + theme = legend + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:herald + animation = chancellor + } + lower_center_portrait = { + character = scope:potential_promoter + } + cooldown = { years = 25 } + + trigger = { + promoted_legend ?= { + legend_owner = root + } + any_neighboring_top_liege_realm_owner = { + is_available_healthy_ai_adult = yes + NOT = { + promoted_legend ?= { + legend_owner = root + } + } + } + + OR = { + any_court_position_holder = { + type = chronicler_court_position + is_available_healthy_ai_adult = yes + } + any_court_position_holder = { + type = court_poet_court_position + is_available_healthy_ai_adult = yes + } + } + } + + immediate = { + random_neighboring_top_liege_realm_owner = { + limit = { + is_available_healthy_ai_adult = yes + NOT = { + promoted_legend ?= { + legend_owner = root + } + } + } + + save_scope_as = potential_promoter + } + + if = { + limit = { + any_court_position_holder = { + type = chronicler_court_position + is_available_healthy_ai_adult = yes + } + } + random_court_position_holder = { + type = chronicler_court_position + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = herald + } + } + else = { + random_court_position_holder = { + type = court_poet_court_position + } + save_scope_as = herald + } + + promoted_legend = { save_scope_as = promoted_legend } + + save_scope_value_as = { + name = random_range + value = { + integer_range = { + min = 1 + max = 15 + } + } + } + } + + option = { # Try to charm them with your wit! + name = legend_spread_events.5310.a + + scope:herald = { + duel = { + skills = { diplomacy learning } + value = average_skill_rating + + 50 = { # They agree + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Likes the diplomat + scope:potential_promoter = { + opinion = { + target = scope:herald + value > medium_positive_opinion + } + } + add = 25 + } + root = { + send_interface_toast = { + title = legend_spread_events.5310.a.success + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + } + + 50 = { # They disagree + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + add = 10 + } + root = { + send_interface_toast = { + title = legend_spread_events.5310.a.failure + + add_stress = minor_stress_gain + } + } + } + } + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + option = { # Take them a gift of gold to persuade them + name = legend_spread_events.5310.b + + pay_short_term_gold = { + target = scope:potential_promoter + gold = medium_gold_value + } + + random_list = { + 70 = { # They acquiesce + modifier = { # They want your money + scope:potential_promoter = { + has_trait = greedy + } + add = 15 + } + modifier = { #Natural randomness + add = scope:random_range + } + send_interface_toast = { + title = legend_spread_events.5310.b.success + + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + + 30 = { # They decline + modifier = { # They don't want your money + scope:potential_promoter = { + OR = { + has_trait = profligate + has_trait = generous + } + } + add = 15 + } + modifier = { # Dislikes you + scope:potential_promoter = { + opinion = { + target = root + value <= 0 + } + } + add = 20 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + add = 10 + } + send_interface_toast = { + title = legend_spread_events.5310.b.failure + + add_stress = miniscule_stress_gain + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + generous = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { # Just go there and don't balls it up! + name = legend_spread_events.5310.c + + random = { + chance = 20 + send_interface_toast = { + title = legend_spread_events.5305.c.success + + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# You attempt to persuade a vassal by appealing to one of their traits +legend_spread_events.5315 = { + type = character_event + title = legend_spread_events.5315.t + desc = legend_spread_events.5315.desc + theme = legend + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:vassal + animation = thinking + } + cooldown = { years = 25 } + + trigger = { + promoted_legend ?= { + legend_owner = root + } + any_vassal = { + is_available_healthy_ai_adult = yes + OR = { + has_trait = ambitious + has_trait = vengeful + has_trait = honest + has_trait = arrogant + } + } + } + + immediate = { + random_vassal = { + limit = { + is_available_healthy_ai_adult = yes + OR = { + has_trait = ambitious + has_trait = vengeful + has_trait = honest + has_trait = arrogant + } + } + + save_scope_as = vassal + } + + promoted_legend = { save_scope_as = promoted_legend } + } + + option = { # Appeal to their ambition + name = legend_spread_events.5315.a + + duel = { + skill = diplomacy + value = low_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5315.a.success + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Boost for correct deduction + scope:vassal = { + has_trait = ambitious + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { # They disagree + desc = legend_spread_events.5315.a.failure + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Loss for incorrect deduction + scope:vassal = { + NOT = { + has_trait = ambitious + } + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.failure + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # Appeal to their vengefulness + name = legend_spread_events.5315.b + + duel = { + skill = diplomacy + value = low_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5315.a.success + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Boost for correct deduction + scope:vassal = { + has_trait = vengeful + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { # They disagree + desc = legend_spread_events.5315.a.failure + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Loss for incorrect deduction + scope:vassal = { + NOT = { + has_trait = vengeful + } + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.failure + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + vengeful = miniscule_stress_impact_loss + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { # Appeal to their honesty + name = legend_spread_events.5315.c + + duel = { + skill = diplomacy + value = low_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5315.a.success + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Boost for correct deduction + scope:vassal = { + has_trait = honest + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { # They disagree + desc = legend_spread_events.5315.a.failure + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Loss for incorrect deduction + scope:vassal = { + NOT = { + has_trait = honest + } + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.failure + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + option = { # Appeal to their arrogance + name = legend_spread_events.5315.d + + duel = { + skill = diplomacy + value = low_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5315.a.success + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Boost for correct deduction + scope:vassal = { + has_trait = arrogant + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { # They disagree + desc = legend_spread_events.5315.a.failure + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Loss for incorrect deduction + scope:vassal = { + NOT = { + has_trait = arrogant + } + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.failure + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + +# You attempt to bribe a vassal into promoting your legend +legend_spread_events.5320 = { + type = character_event + title = legend_spread_events.5320.t + desc = { + desc = legend_spread_events.5320.desc + desc = { + triggered_desc = { + trigger = { + scope:artifact = { + exists = scope:artifact + } + } + desc = legend_spread_events.5320.artifact + } + } + } + theme = legend + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:vassal + animation = happiness + } + artifact = { + target = scope:artifact + position = lower_center_portrait + } + cooldown = { years = 25 } + + trigger = { + promoted_legend ?= { + legend_owner = root + } + any_vassal = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + random_vassal = { + limit = { + is_available_healthy_ai_adult = yes + } + + save_scope_as = vassal + } + + random_character_artifact = { + limit = { + NOR = { + #Ensure it's not trash + has_variable = unwanted_artifact + + #And doesn't have a claim on it + any_artifact_claimant = { + is_alive = no + } + } + } + + save_scope_as = artifact + } + + scope:vassal.capital_county = { save_scope_as = capital_county } + + promoted_legend = { save_scope_as = promoted_legend } + } + + option = { # Offer them an artifact + name = legend_spread_events.5320.a + + trigger = { + exists = scope:artifact + } + + duel = { + skill = diplomacy + value = medium_skill_rating + + 60 = { # They agree + desc = legend_spread_events.5320.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Boost for anything that's above common + scope:artifact = { + rarity = masterwork + } + add = 15 + } + modifier = { + scope:artifact = { + rarity = famed + } + add = 30 + } + modifier = { + scope:artifact = { + rarity = illustrious + } + add = 80 + } + send_interface_toast = { + title = legend_spread_events.5320.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + scope:artifact = { + set_owner = { + target = scope:vassal + history = { + location = root.capital_province + actor = root + recipient = scope:vassal + type = given + } + } + } + } + } + + 40 = { # They disagree + desc = legend_spread_events.5320.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5320.a.failure + + custom_tooltip = legend_spread_events.5320.a.artifact + + hidden_effect = { + scope:artifact = { + add_artifact_modifier = artifact_monthly_prestige_penalty_modifier + } + } + + reverse_add_opinion = { + target = scope:vassal + modifier = dismissive_opinion + opinion = -5 + } + } + } + } + + stress_impact = { + generous = miniscule_stress_impact_loss + greedy = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { # Offer them investment in their holding + name = legend_spread_events.5320.b + + duel = { + skills = { diplomacy stewardship } + value = medium_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5320.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5320.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + + scope:capital_county = { + add_county_modifier = { + modifier = legend_investments + years = 20 + } + } + + remove_short_term_gold = minor_gold_value + } + } + + 50 = { # They disagree + desc = legend_spread_events.5320.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5320.b.failure + + reverse_add_opinion = { + target = scope:vassal + modifier = dismissive_opinion + opinion = -20 + } + } + } + } + + stress_impact = { + generous = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + } + } + } + + option = { # Offer them a favour + name = legend_spread_events.5320.c + + duel = { + skills = { diplomacy intrigue } + value = low_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5320.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5320.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + add_hook = { + target = root + type = favor_hook + } + } + } + } + + 50 = { # They disagree + desc = legend_spread_events.5320.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5320.a.failure + + add_character_modifier = { + modifier = legend_loose_lips + years = 15 + } + } + } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + option = { # Opt-out + name = legend_spread_events.5320.d + + random = { + chance = 15 + send_interface_toast = { + title = legend_spread_events.5320.d.success + + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + craven = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# Legend is spreading towards you: do you become a promoter for extra rewards? +legend_spread_events.5325 = { + type = character_event + title = legend_spread_events.5325.t + desc = { + desc = legend_spread_events.5325.desc + triggered_desc = { + trigger = { + scope:promoted_legend_owner = { + is_ai = yes + } + } + desc = legend_spread_events.5325.protag + } + } + theme = legend + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:legend_person + animation = happiness + } + lower_center_portrait = { + character = scope:promoted_legend_owner + trigger = { + this != scope:legend_person + } + } + cooldown = { years = 25 } + + trigger = { + #You have a neighbour who has a legend + any_neighboring_top_liege_realm_owner = { + promoted_legend ?= { + NOR = { + any_legend_promoter = { this = root } + legend_owner = root + } + legend_owner ?= { + is_within_diplo_range = { CHARACTER = root } + } + } + } + } + + immediate = { + random_neighboring_top_liege_realm_owner = { #Grab neighbouring ruler with a legend + limit = { + promoted_legend ?= { + NOR = { + any_legend_promoter = { this = root } + legend_owner = root + } + legend_owner ?= { + is_within_diplo_range = { CHARACTER = root } + } + } + } + save_scope_as = legend_person + promoted_legend = { + save_scope_as = promoted_legend + legend_owner = { save_scope_as = promoted_legend_owner } + } + } + + promoted_legend ?= { save_scope_as = your_legend } + } + + option = { # Take it on and it gains good stuff because you're cool + name = legend_spread_events.5325.a + + trigger = { + prestige_level > 2 + } + + add_internal_flag = special + + if = { + limit = { + exists = scope:your_legend + } + custom_tooltip = legend_spread_events.5325.stop_promoting_warning + custom_tooltip = legend_spread_events.5325.stop_promoting + + stop_promoting_legend = yes + } + + set_promoted_legend = scope:promoted_legend + + scope:promoted_legend = { + add_legend_county_modifier = { + modifier = legend_esteemed_expanding + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Sure, I'll take it + name = legend_spread_events.5325.b + + trigger = { + NOT = { + prestige_level > 2 + } + } + + if = { + limit = { + exists = scope:your_legend + } + custom_tooltip = legend_spread_events.5325.stop_promoting_warning + custom_tooltip = legend_spread_events.5325.stop_promoting + + stop_promoting_legend = yes + } + + set_promoted_legend = scope:promoted_legend + + add_prestige = minor_prestige_gain + + stress_impact = { + generous = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + } + } + } + + option = { # I'll do it, but for a sum... + name = legend_spread_events.5325.c + + trigger = { #Ensure you're not taking money from humans + scope:promoted_legend_owner = { + is_ai = yes + } + } + + duel = { + skill = diplomacy + target = scope:promoted_legend_owner + + 50 = { # They agree + desc = legend_spread_events.5325.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = legend_spread_events.5325.c.success.tt + trigger_event = legend_spread_events.5326 + } + + 50 = { # They disagree + desc = legend_spread_events.5325.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + custom_tooltip = legend_spread_events.5325.c.failure.tt + trigger_event = legend_spread_events.5327 + } + } + + stress_impact = { + greedy = miniscule_stress_impact_loss + generous = minor_stress_impact_gain + deceitful = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { # No thanks + name = legend_spread_events.5325.d + + reverse_add_opinion = { + target = scope:legend_person + modifier = angry_opinion + opinion = -10 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + craven = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +legend_spread_events.5326 = { + type = letter_event + opening = { + desc = legend_spread_events.5326.opening + } + desc = legend_spread_events.5326.desc + + sender = { + character = scope:promoted_legend_owner + animation = personality_honorable + } + + option = { + name = legend_spread_events.5326.a + + scope:promoted_legend_owner = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + + custom_tooltip = legend_spread_events.5325.stop_promoting + + stop_promoting_legend = yes + + set_promoted_legend = scope:promoted_legend + } + + option = { + name = legend_spread_events.5326.b + + reverse_add_opinion = { + modifier = angry_opinion + opinion = -20 + target = scope:promoted_legend_owner + } + } +} + +legend_spread_events.5327 = { + type = letter_event + opening = { + desc = legend_spread_events.5327.opening + } + desc = legend_spread_events.5327.desc + + sender = { + character = scope:promoted_legend_owner + animation = dismissal + } + + option = { + name = legend_spread_events.5327.a + + add_stress = minor_stress_gain + } +} + +# Legend owner is evil; stop promoting? +legend_spread_events.5330 = { + type = character_event + title = legend_spread_events.5330.t + desc = legend_spread_events.5330.desc + theme = legend + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:promoted_legend_owner + animation = anger + } + cooldown = { years = 25 } + + trigger = { + #You have a legend and the legend owner is sinful + any_legend = { + any_legend_promoter = { #You are promoting that legend + this = root + } + legend_owner = { + num_sinful_traits >= 1 #They have at least one sinful trait + save_temporary_scope_as = promoted_legend_owner_temp + } + save_temporary_scope_as = promoted_legend_temp + } + + scope:promoted_legend_temp = { #Ensure they own the legend + legend_owner = scope:promoted_legend_owner_temp + } + } + + immediate = { + random_legend = { #Grab the legend you're promoting + limit = { + any_legend_promoter = { + this = root + } + legend_owner = { + num_sinful_traits >= 1 + } + } + save_scope_as = promoted_legend + } + + scope:promoted_legend.legend_owner = { + save_scope_as = promoted_legend_owner + } + + save_scope_as = root_scope + } + + option = { # How dare they! I am a godly WomanMan! + name = legend_spread_events.5330.a + + trigger = { + OR = { + scope:promoted_legend_owner = { #They're REALLY evil + num_sinful_traits >= 2 + } + has_trait = zealous #Or you're really godly + } + NOT = { + has_trait = cynical + } + } + + add_internal_flag = special + + promoted_legend = { + add_legend_county_modifier = { + modifier = legend_irreverent_immoral + years = 10 + } + } + + if = { #Just to ensure human players don't get blindsided + limit = { + scope:promoted_legend_owner = { + is_ai = yes + } + } + scope:promoted_legend_owner = { + add_character_modifier = { + modifier = legend_wicked_ways + years = 15 + } + } + } + + stop_promoting_legend = yes + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pleased_opinion + opinion = 25 + target = root + } + } + + reverse_add_opinion = { + modifier = angry_opinion + opinion = -20 + target = scope:promoted_legend_owner + } + + stress_impact = { + zealous = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + } + + ai_chance = { #Keep this low so we don't see non-player usage of it much if at all + base = 15 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # I have my own reputation to be thinking of + name = legend_spread_events.5330.b + + stop_promoting_legend = yes + + add_piety = minor_piety_gain + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = miniscule_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.5 + ai_sociability = -0.5 + } + } + } + + option = { # I'll grin and bear it + name = legend_spread_events.5330.c + + random = { + chance = 20 + send_interface_toast = { + title = legend_spread_events.5330.c.success + left_icon = root + + scope:promoted_legend_owner = { + add_character_modifier = { + modifier = legend_errors_exonerated + years = 10 + } + } + } + } + + reverse_add_opinion = { + target = scope:promoted_legend_owner + modifier = pleased_opinion + opinion = 30 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = angry_opinion + opinion = -10 + target = root + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + craven = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# Legend owner is very godly; promote more? +# Counterpart to 5330 +legend_spread_events.5335 = { + type = character_event + title = legend_spread_events.5335.t + desc = legend_spread_events.5335.desc + theme = legend + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:promoted_legend_owner + animation = personality_zealous + } + cooldown = { years = 25 } + + trigger = { + #You have a legend and the legend owner is virtuous + any_legend = { + any_legend_promoter = { #You are promoting that legend + this = root + } + legend_owner = { + num_virtuous_traits >= 1 #They have at least one virtuous trait + save_temporary_scope_as = promoted_legend_owner_temp + } + save_temporary_scope_as = promoted_legend_temp + } + + scope:promoted_legend_temp = { #Ensure they own the legend + legend_owner = scope:promoted_legend_owner_temp + } + } + + immediate = { + random_legend = { #Grab the legend you're promoting + limit = { + any_legend_promoter = { + this = root + } + legend_owner = { + num_virtuous_traits >= 1 + } + } + save_scope_as = promoted_legend + } + + scope:promoted_legend.legend_owner = { + save_scope_as = promoted_legend_owner + } + + save_scope_as = root_scope + } + + option = { # I love them! + name = legend_spread_events.5335.a + + trigger = { + OR = { + scope:promoted_legend_owner = { #They're REALLY godly + num_virtuous_traits >= 2 + } + has_trait = zealous #Or you're really godly + } + NOT = { + has_trait = cynical + } + } + + add_internal_flag = special + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_saintly_sinless + years = 15 + } + } + + add_piety = medium_piety_value + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pleased_opinion + opinion = 20 + target = root + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + } + + ai_chance = { #Keep this low so we don't see non-player usage of it much if at all + base = 15 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # Use them to increase my fame + name = legend_spread_events.5335.b + + add_prestige = minor_prestige_value + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_principled_pious + years = 10 + } + } + + stress_impact = { + zealous = minor_stress_impact_gain + cynical = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + ai_sociability = 0.5 + } + } + } + + option = { # Perhaps I should learn from him? + name = legend_spread_events.5335.c + + random = { + chance = 20 + send_interface_toast = { + title = legend_spread_events.5335.c.success + left_icon = root + + add_learning_skill = 1 + } + } + + reverse_add_opinion = { + target = scope:promoted_legend_owner + modifier = flattered_opinion + opinion = 15 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pleased_opinion + opinion = 10 + target = root + } + } + + stress_impact = { + humble = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +## Additional Spread Events + +# You are asked how the tale goes +legend_spread_events.5400 = { + type = character_event + title = legend_spread_events.5400.t + desc = legend_spread_events.5400.desc + theme = legend + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + promoted_legend = { save_scope_as = promoted_legend } + culture = { save_scope_as = root_culture } + grab_appropriate_chronicler_effect = yes + } + + option = { # Improve your legend + name = legend_spread_events.5400.a + + duel = { + skill = diplomacy + value = high_skill_rating + + 50 = { # Your story is beautifully embellished + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = legend_spread_events.5400.a.majorsuccess + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # Your story is only somewhat embellished + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5400.a.minorsuccess + + add_prestige = medium_prestige_value + } + } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Invent a story to change your legend + name = legend_spread_events.5400.b + + duel = { + skills = { diplomacy intrigue } + value = medium_skill_rating + + 50 = { # They believe you + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Nobody wants to disagree with you + dread > 49 + add = 5 + } + send_interface_toast = { + title = legend_spread_events.5400.b.success + + add_intrigue_skill = 1 + + promoted_legend = { + set_legend_chapter = { + name = famous_deed + localization_key = legend_chapter_silver_tongued + } + } + } + } + + 50 = { # They don't really believe you + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # You're a crap liar + has_trait = honest + add = 5 + } + send_interface_toast = { + title = legend_spread_events.5400.b.failure + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + + promoted_legend = { + set_legend_chapter = { + name = famous_deed + localization_key = legend_chapter_easily_captured + } + } + } + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Opt-out + name = legend_spread_events.5400.c + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_tolerant_trusting + } + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + shy = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } +} + +# You are asked whether the tales of a mythical beast are true +legend_spread_events.5405 = { + type = character_event + title = legend_spread_events.5405.t + desc = legend_spread_events.5405.desc + theme = legend + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + promoted_legend = { save_scope_as = promoted_legend } + grab_appropriate_chronicler_effect = yes + set_up_regional_mythical_creature_effect = yes + } + + option = { # Of course it was! + name = legend_spread_events.5405.a + + duel = { + skills = { diplomacy learning } + value = high_skill_rating + + 50 = { # They buy it + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5405.a.success + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_mythical_beast } + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + } + } + + 50 = { # They don't buy it + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5405.a.failure + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_decrease } + } + } + } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + content = minor_stress_impact_gain + honest = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # That's nonsense: here's what I DID see, though... + name = legend_spread_events.5405.b + + duel = { + skill = intrigue + value = high_skill_rating + + 50 = { # You make up a new creature on the spot + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Nobody wants to disagree with you + dread > 49 + add = 5 + } + modifier = { # You're a good liar + has_trait = deceitful + add = 5 + } + send_interface_toast = { + title = legend_spread_events.5405.b.success + + add_intrigue_skill = 1 + + add_prestige = minor_prestige_gain + + promoted_legend = { + set_legend_chapter = { + name = discovery + localization_key = legend_chapter_discovery_new_myth + } + } + } + } + + 50 = { # What? That's ridiculous + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # You're a crap liar + has_trait = honest + add = 5 + } + send_interface_toast = { + title = legend_spread_events.5405.b.failure + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Who can say? So many wondrous things I saw... + name = legend_spread_events.5405.c + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# You are asked what lies in the ocean depths +legend_spread_events.5410 = { + type = character_event + title = legend_spread_events.5410.t + desc = legend_spread_events.5410.desc + theme = legend + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = root + } + any_courtier = { + is_available_ai_adult = yes + } + } + + immediate = { + promoted_legend = { save_scope_as = promoted_legend } + grab_appropriate_chronicler_effect = yes + } + + option = { # The tales of the Vinland were true! + name = legend_spread_events.5410.a + + trigger = { + AND = { + culture = { has_cultural_pillar = heritage_north_germanic } + current_year >= 1000 #Use a rough estimate of when rumours of Vinland were beginning to propagate + } + } + + flavor = legend_spread_events.5410.a.flavor + + duel = { + skills = { diplomacy learning } + value = medium_skill_rating + + 50 = { # They buy it + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5410.a.success + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_vinland } + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = major_legend_quality_increase } + } + } + } + + 50 = { # They don't buy it + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5410.a.failure + + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + content = minor_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + } + } + } + + option = { # There were mighty sea monsters! + name = legend_spread_events.5410.b + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_sea_monsters } + } + + add_character_modifier = { + modifier = sea_monsters_modifier + years = 15 + } + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Who can say? So many wondrous things I saw... + name = legend_spread_events.5410.c + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } + + option = { # There's nothing there, boy! + name = legend_spread_events.5410.d + + if = { + limit = { + NOT = { + has_trait = lifestyle_traveler + } + } + add_trait = lifestyle_traveler + } + + add_trait_xp = { + trait = lifestyle_traveler + track = danger + value = { 5 15 } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# Is your tale one of nobles or common folk? +legend_spread_events.5415 = { + type = character_event + title = legend_spread_events.5415.t + desc = legend_spread_events.5415.desc + theme = legend + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + promoted_legend = { + save_scope_as = promoted_legend + legend_protagonist = { save_scope_as = protagonist } + } + grab_appropriate_chronicler_effect = yes + } + + option = { # It's all about the nobles, baby + name = legend_spread_events.5415.a + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_nobles_noted + years = 15 + } + } + + stress_impact = { + content = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + option = { # It's about the common man! + name = legend_spread_events.5415.b + + promoted_legend = { + add_legend_county_modifier = { + modifier = legend_commoners_celebrated + years = 15 + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { # It's about the protag themselves, duh + name = { + trigger = { + promoted_legend = { + legend_protagonist = root + } + } + text = legend_spread_events.5415.c.protag + } + name = { + trigger = { + NOT = { + promoted_legend = { + legend_protagonist = root + } + } + } + text = legend_spread_events.5415.c + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + if = { + limit = { + promoted_legend = { + legend_protagonist = root + } + } + add_prestige = minor_prestige_gain + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + stubborn = minor_stress_impact_loss + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} + +# You supposedly drank a mighty ogre under the table +# Inspired by Kuba Potapczyk +# As in, he suggested the event, not that he's an ogre +# ...necessarily +legend_spread_events.5420 = { + type = character_event + title = legend_spread_events.5420.t + desc = legend_spread_events.5420.desc + theme = legend + left_portrait = { + character = root + animation = toast + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + drinks_alcohol_trigger = yes + promoted_legend ?= { + legend_owner = root + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + promoted_legend = { + save_scope_as = promoted_legend + } + grab_appropriate_chronicler_effect = yes + } + + option = { # I'LL SHOW YOU RIGHT NOW + name = legend_spread_events.5420.a + + duel = { + skill = prowess + value = high_skill_rating + 50 = { #Chronicler is convinced + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # You're a drunkard + has_trait = drunkard + add = 15 + } + modifier = { # You're a legend mate + has_trait = lifestyle_reveler + add = 10 + } + modifier = { # You'll drink anything + has_trait = gluttonous + add = 5 + } + desc = legend_spread_events.5420.a.success + send_interface_toast = { + title = legend_spread_events.5420.a.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = major_legend_quality_increase } + } + } + } + + 50 = { # People are unconvinced + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5420.a.failure + send_interface_toast = { + title = legend_spread_events.5420.a.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + + add_character_modifier = { + modifier = legend_hangover_modifier + years = 3 + } + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + humble = minor_stress_impact_gain + temperate = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { # You'll just have to believe me + name = legend_spread_events.5420.b + + duel = { + skill = diplomacy + value = very_high_skill_rating + 50 = { #Chronicler is convinced + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # You're a drunkard + has_trait = drunkard + add = 7 + } + modifier = { # You're a legend mate + has_trait = lifestyle_reveler + add = 4 + } + modifier = { # You'll drink anything + has_trait = gluttonous + add = 2 + } + desc = legend_spread_events.5420.b.success + send_interface_toast = { + title = legend_spread_events.5420.b.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # Chronicler is unconvinced + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5420.b.failure + send_interface_toast = { + title = legend_spread_events.5420.b.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + temperate = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + gluttonous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + } + } + } + + option = { # I'm not warmed up :( + name = legend_spread_events.5420.c + + random = { + chance = 20 + send_interface_toast = { + title = legend_spread_events.5420.c.tt + left_icon = root + + add_character_modifier = { + modifier = legend_shy_drinker + years = 10 + } + } + } + + stress_impact = { + arrogant = medium_stress_impact_gain + stubborn = minor_stress_impact_gain + humble = minor_stress_impact_loss + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + } + } + } +} diff --git a/N3OW/events/dlc/ep1/ep1_fund_inspiration_events.txt b/N3OW/events/dlc/ep1/ep1_fund_inspiration_events.txt new file mode 100644 index 00000000..a1290099 --- /dev/null +++ b/N3OW/events/dlc/ep1/ep1_fund_inspiration_events.txt @@ -0,0 +1,23811 @@ +namespace = fund_inspiration + + +######################### +# MAINTENANCE EVENTS +# by Linnéa Thimrén, Sean Hughes & Bianca Savazzi +######################### +# You funded an inspiration (0001-1000) +# fund_inspiration.0001 - Fallback version +# fund_inspiration.0011 - Weapon (Chose what they make) +# fund_inspiration.0012 - Weapon (They know what they want to make) +# fund_inspiration.0021 - Armor (Decide type of armor) +# fund_inspiration.0022 - Armor (They choose armor type) +# fund_inspiration.0031 - Book (Choose subject) +# fund_inspiration.0032 - Book (They have a subject) +# fund_inspiration.0041 - Tapestry (Choose a subject) +# fund_inspiration.0042 - Tapestry (Subject already chosen) +# fund_inspiration.0051 - Adventurer (Choose destination) +# fund_inspiration.0052 - Adventurer (Destination already chosen) +# fund_inspiration.0061 - Artisan (Choose what they make) +# fund_inspiration.0062 - Artisan (They know what they want to make) +# fund_inspiration.0071 - Smith (Choose what they make) +# fund_inspiration.0072 - Smith (They know what they want to make) +# fund_inspiration.0081 - Alchemist (Choose what they make) +# fund_inspiration.0082 - Alchemist (They know what they want to make) + +# Inspiration: complete! (1001-2000) +# fund_inspiration.1001 - Fallback version +# fund_inspiration.1011 - Weapon artifact +# fund_inspiration.1021 - Armor artifact +# fund_inspiration.1031 - Book artifact +# fund_inspiration.1041 - Weaver artifact +# fund_inspiration.1051 - Adventurer returns with artifact +# fund_inspiration.1061 - Artisan artifact +# fund_inspiration.1071 - Smith artifact +# fund_inspiration.1081 - Alchemy artifact + +# Inspiration invalidated (9001-9999) +# fund_inspiration.9001 - The inspired character died +# fund_inspiration.9002 - The inspired character is imprisoned +# fund_inspiration.9003 - The inspired character is no longer courtier of sponsor +# fund_inspiration.9004 - Adventurer returns prematurely +# fund_inspiration.9005 - Sponsorship inheritance confirmation + + +######################### +# ONGOING EVENTS (2001-9000) +# by Linnéa Thimrén, Bianca Savazzi, Isabella Welch, and Claudia Baldassi +######################### +# fund_inspiration.2001 - Inspiration owner asks for more money +# fund_inspiration.2002 - Inspiration owner asks for more human material +# fund_inspiration.2003 - Previously inspiration owner helps current one in their creation +# fund_inspiration.2004 - A merchant selling high-quality materials is in town +# fund_inspiration.2005 - Smith (weapon/armor/smith) asks you to invest in a better forge +# fund_inspiration.2006 - A wise person visits +# fund_inspiration.2021 - Inspiration owner asks for more money (armor specific) +# fund_inspiration.3001 - Court Chaplain complains about book subject +# fund_inspiration.3011 - Book (Martial) - wanna nudge the content? +# fund_inspiration.3012 - Book (Diplomacy) - wanna nudge the content? +# fund_inspiration.3013 - Book (Learning) - wanna nudge the content? +# fund_inspiration.3014 - Book (Stewardship) - wanna nudge the content? +# fund_inspiration.3015 - Book (Intrigue) - wanna nudge the content? +# fund_inspiration.3030 - Book - Nemesis is no longer nemesis and you're writing about your hatred +# fund_inspiration.3031 - Book - Soulmate is no longer soulmate and you're writing about your love +# fund_inspiration.4001 - Weaver - Weaver is stealing clothes +# fund_inspiration.5011 - Adventurer - Choose your item-type +# fund_inspiration.5021 - Adventurer gets lost... this can be a good thing though +# fund_inspiration.6001 - Adventurer postcard from the Steppe +# fund_inspiration.6002 - Adventurer postcard from India +# fund_inspiration.6003 - Adventurer postcard from Africa +# fund_inspiration.6004 - Adventurer postcard from the Middle East +# fund_inspiration.6005 - Adventurer postcard from Europe +# fund_inspiration.6006 - Adventurer postcard from Asia Minor +# fund_inspiration.6100 - Artisan chest prototype +# fund_inspiration.6101 - Artisan box prototype +# fund_inspiration.6102 - Artisan sculpture prototype +# fund_inspiration.6103 - Artisan chest prototype +# fund_inspiration.6104 - Artisan cabinet prototype +# fund_inspiration.6105 - Ruler collected all of the prototype artisan furniture +# fund_inspiration.6200 - Weaver - Weaver is too much of a modernist +# fund_inspiration.6400 - Adventurer has been skulking in the tavern +# fund_inspiration.8001 - Alchemy (Metal) - what subtype? +# fund_inspiration.8011 - Alchemy - Get poisoned by a bad alchemist +# fund_inspiration.8012 - Alchemy - Church disproves of you employing an alchemist +# fund_inspiration.8013 - Alchemy - Find a book from alchemist Jabir ibn Hayyan +# fund_inspiration.8014 - Alchemy - Alchemist isn't producing anything +# fund_inspiration.8015 - Alchemy - Plead with alchemist to resurrect family member/friend +# fund_inspiration.8017 - Alchemy - Helping the court tutor + +########################################################################################## + + +#only here for testing +#Give progress to random sponsored inspiration +fund_inspiration.9999 = { + type = character_event + title = fund_inspiration.9999.t + desc = fund_inspiration.9999.desc + theme = realm + orphan = yes + left_portrait = { + character = scope:recipient + animation = personality_honorable + } + + immediate = { + + } + + # + option = { + name = fund_inspiration.9999.a + random_sponsored_inspiration = { + change_inspiration_progress = 20 + } + } +} + +#An effect used to clean up all variables etc. Should always be used in the "after" of a completion event! +scripted_effect inspiration_completion_removal_basic_effect = { + if = { + limit = { has_variable = book_artifact_subject } + remove_variable = book_artifact_subject + } + if = { + limit = { has_variable = book_artifact_topic } + remove_variable = book_artifact_topic + } + if = { + limit = { has_variable = book_topic_category } + remove_variable = book_topic_category + } + if = { + limit = { has_variable = book_subject_witch_scope } + remove_variable = book_subject_witch_scope + } + if = { + limit = { has_variable = quality } + remove_variable = quality + } + if = { + limit = { has_variable = wealth } + remove_variable = wealth + } + if = { + limit = { has_variable = book_content_quality } + remove_variable = book_content_quality + } + if = { + limit = { has_variable = animal_type } + remove_variable = animal_type + } + if = { + limit = { has_variable = book_topic_cat_name } + remove_variable = book_topic_cat_name + } + if = { + limit = { has_variable = book_topic_dog_name } + remove_variable = book_topic_dog_name + } + if = { + limit = { has_variable = book_topic_united_title } + remove_variable = book_topic_united_title + } + if = { + limit = { has_variable = book_topic_created_title } + remove_variable = book_topic_created_title + } + if = { + limit = { has_variable = book_topic_restored_title } + remove_variable = book_topic_restored_title + } + if = { + limit = { has_variable = relevant_title } + remove_variable = relevant_title + } + if = { + limit = { has_variable = artifact_tapestry_scene } + remove_variable = artifact_tapestry_scene + } + if = { + limit = { has_variable = adventure_artifact_location } + remove_variable = adventure_artifact_location + } + if = { + limit = { has_variable = artifact_weapon_type } + remove_variable = artifact_weapon_type + } + if = { + limit = { has_variable = artifact_armor_type } + remove_variable = artifact_armor_type + } + if = { + limit = { has_variable = artifact_artisan_type } + remove_variable = artifact_artisan_type + } + if = { + limit = { has_variable = adventure_destination } + remove_variable = adventure_destination + } + if = { + limit = { has_variable = artifact_smith_type } + remove_variable = artifact_smith_type + } + if = { + limit = { has_variable = adventure_type } + remove_variable = adventure_type + } + if = { + limit = { has_variable = local_artisan } + remove_variable = local_artisan + } + if = { + limit = { has_variable = wealth } + remove_variable = wealth + } + if = { + limit = { has_variable = quality } + remove_variable = quality + } + if = { + limit = { has_variable = artifact_quality } + remove_variable = artifact_quality + } + if = { + limit = { has_variable = artifact_dedication_var } + remove_variable = artifact_dedication_var + } + if = { + limit = { has_variable = artifact_dedication_a_var } + remove_variable = artifact_dedication_a_var + } + if = { + limit = { has_variable = artifact_dedication_b_var } + remove_variable = artifact_dedication_b_var + } + if = { + limit = { has_variable = artifact_dedication_d_var } + remove_variable = artifact_dedication_d_var + } + if = { + limit = { has_variable = artifact_dedication_e_var } + remove_variable = artifact_dedication_e_var + } + if = { + limit = { has_variable = artifact_dedication_f_var } + remove_variable = artifact_dedication_f_var + } + if = { + limit = { has_variable = artifact_dedication_g1_var } + remove_variable = artifact_dedication_g1_var + } + if = { + limit = { has_variable = artifact_dedication_g2_var } + remove_variable = artifact_dedication_g2_var + } + if = { + limit = { has_variable = artifact_dedication_h_var } + remove_variable = artifact_dedication_h_var + } + if = { + limit = { has_variable = artifact_inscribe_motto_var } + remove_variable = artifact_inscribe_motto_var + } + if = { + limit = { has_variable = gone_adventuring } + remove_variable = gone_adventuring + } +} + +scripted_effect inspiration_completion_effect = { + if = { + limit = { exists = scope:owner } + scope:owner = { + inspiration_completion_removal_basic_effect = yes + } + } + if = { + limit = { exists = scope:inspiration_sponsor } + scope:inspiration_sponsor = { + inspiration_completion_removal_basic_effect = yes + } + } + if = { + limit = { exists = scope:inspiration_owner } + scope:inspiration_owner = { + inspiration_completion_removal_basic_effect = yes + # They might also have a bunch of blocker-flags saved from events + if = { + limit = { has_character_flag = had_event_fund_inspiration_2001 } + remove_character_flag = had_event_fund_inspiration_2001 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2002 } + remove_character_flag = had_event_fund_inspiration_2002 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2003 } + remove_character_flag = had_event_fund_inspiration_2003 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2004 } + remove_character_flag = had_event_fund_inspiration_2004 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2005 } + remove_character_flag = had_event_fund_inspiration_2005 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2006 } + remove_character_flag = had_event_fund_inspiration_2006 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2021 } + remove_character_flag = had_event_fund_inspiration_2021 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3001 } + remove_character_flag = had_event_fund_inspiration_3001 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3011 } + remove_character_flag = had_event_fund_inspiration_3011 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3012 } + remove_character_flag = had_event_fund_inspiration_3012 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3013 } + remove_character_flag = had_event_fund_inspiration_3013 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3014 } + remove_character_flag = had_event_fund_inspiration_3014 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3015 } + remove_character_flag = had_event_fund_inspiration_3015 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3030 } + remove_character_flag = had_event_fund_inspiration_3030 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3031 } + remove_character_flag = had_event_fund_inspiration_3031 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_4001 } + remove_character_flag = had_event_fund_inspiration_4001 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_5011 } + remove_character_flag = had_event_fund_inspiration_5011 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_5021 } + remove_character_flag = had_event_fund_inspiration_5021 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6001 } + remove_character_flag = had_event_fund_inspiration_6001 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6002 } + remove_character_flag = had_event_fund_inspiration_6002 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6003 } + remove_character_flag = had_event_fund_inspiration_6003 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6004 } + remove_character_flag = had_event_fund_inspiration_6004 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6005 } + remove_character_flag = had_event_fund_inspiration_6005 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6006 } + remove_character_flag = had_event_fund_inspiration_6006 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8001 } + remove_character_flag = had_event_fund_inspiration_8001 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8011 } + remove_character_flag = had_event_fund_inspiration_8011 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8012 } + remove_character_flag = had_event_fund_inspiration_8012 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8013 } + remove_character_flag = had_event_fund_inspiration_8013 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8014 } + remove_character_flag = had_event_fund_inspiration_8014 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8015 } + remove_character_flag = had_event_fund_inspiration_8015 + } + + if = { + limit = { has_character_flag = had_event_fund_inspiration_8017 } + remove_character_flag = had_event_fund_inspiration_8017 + } + } + } +} + + +################################################## +# You funded an inspiration +# by Linnéa Thimrén and Bianca Savazzi +# 0001-1000 +################################################## + +# Fallback version - very generic +fund_inspiration.0001 = { + type = character_event + hidden = yes + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + send_interface_toast = { + title = fund_inspiration.0001.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + +#Fund Inspiration: Weapon - Choose your item +#By Bianca Savazzi +fund_inspiration.0011 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0011.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = weapon_inspiration + } + scope:inspiration_owner = { NOT = { exists = var:artifact_weapon_type } } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + + save_scope_as = actor + scope:inspiration_owner = { + assign_quirk_effect = yes + save_scope_as = recipient + } + + } + + # sword; close quarters to slash and pierce + option = { + name = fund_inspiration.0011.a + + scope:inspiration_owner = { + random_list = { #What do they want to forge? + 10 = { + desc = fund_inspiration.0011.tooltip_dagger + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_dagger + } + custom_tooltip = fund_inspiration.0011.tooltip_dagger.tt + } + 10 = { + desc = fund_inspiration.0011.tooltip_sword + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_sword + } + custom_tooltip = fund_inspiration.0011.tooltip_sword.tt + } + } + } + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = brave + } + } + } + + # axe or mace; blunt and smash + option = { + name = fund_inspiration.0011.b + scope:inspiration_owner = { + random_list = { #What do they want to forge? + 10 = { + desc = fund_inspiration.0011.tooltip_axe + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_axe + } + custom_tooltip = fund_inspiration.0011.tooltip_axe.tt + } + 10 = { + desc = fund_inspiration.0011.tooltip_hammer + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_hammer + } + custom_tooltip = fund_inspiration.0011.tooltip_hammer.tt + } + 10 = { + desc = fund_inspiration.0011.tooltip_mace + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_mace + } + custom_tooltip = fund_inspiration.0011.tooltip_mace.tt + } + } + } + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = strong + } + modifier = { + add = 25 + has_trait = berserker + } + } + } + + # spear; create distance + option = { + name = fund_inspiration.0011.c + scope:inspiration_owner = { + random_list = { #What do they want to forge? + 10 = { + desc = fund_inspiration.0011.tooltip_spear + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_spear + } + custom_tooltip = fund_inspiration.0011.tooltip_spear.tt + } + } + } + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = craven + } + modifier = { + add = 25 + OR = { + has_intrigue_lifestyle_trait_trigger = yes + has_lifestyle = intrigue_lifestyle + } + } + } + } + + # bow + option = { + name = fund_inspiration.0011.d + trigger = { + scope:inspiration_owner = { has_character_modifier = local_artisan_modifier } + } + custom_tooltip = { + text = fund_inspiration.0011.d.tt + scope:inspiration_owner = { + destroy_inspiration = inspiration + create_inspiration = bow_inspiration + } + sponsor_inspiration = scope:inspiration_owner.inspiration + } + ai_chance = { + base = 25 + modifier = { + add = 50 + has_trait = lifestyle_hunter + } + } + } + + # default option of "do what you want" + option = { + name = fund_inspiration.0031.f + hidden_effect = { #If they haven't specified what they're gonna make we decide it here + set_weapon_artifact_type_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_TYPE = no + } + } + custom_tooltip = fund_inspiration.they_decide_option_tt + ai_chance = { + base = 25 + modifier = { + add = 25 + has_trait = arbitrary + } + } + } +} + +# Weapon - they know what they want to make +fund_inspiration.0012 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = weapon_inspiration + inspiration_owner = { #They know what weapon they want to make + exists = var:artifact_weapon_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0012.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + + +# Armor - You can decide type of armor +scripted_trigger fund_inspiration_0021_option_mail_trigger = { + NOT = { exists = scope:armor_type_mail_option } +} +scripted_trigger fund_inspiration_0021_option_plate_trigger = { + NOT = { exists = scope:armor_type_plate_option } +} +scripted_trigger fund_inspiration_0021_option_scale_trigger = { + NOT = { exists = scope:armor_type_scale_option } +} +scripted_trigger fund_inspiration_0021_option_lamellar_trigger = { + NOT = { exists = scope:armor_type_lamellar_option } +} +scripted_trigger fund_inspiration_0021_option_laminar_trigger = { + NOT = { exists = scope:armor_type_laminar_option } +} +scripted_trigger fund_inspiration_0021_option_brigandine_trigger = { + NOT = { exists = scope:armor_type_brigandine_option } +} +scripted_effect fund_inspiration_0021_pick_options_to_show_effect = { + #What options do we show? + hidden_effect = { + random_list = { + 60 = { #Fairly common everywhere + trigger = { + fund_inspiration_0021_option_mail_trigger = yes + } + artifact_armor_type_mail_modifier = yes + save_scope_value_as = { + name = armor_type_mail_option + value = yes + } + } + 1 = { #Expensive + trigger = { + fund_inspiration_0021_option_plate_trigger = yes + scope:inspiration_owner = { + culture = { has_innovation = innovation_plate_armor } + } + } + artifact_armor_type_plate_modifier = yes + save_scope_value_as = { + name = armor_type_plate_option + value = yes + } + } + 60 = { #Fairly common everywhere + trigger = { + fund_inspiration_0021_option_scale_trigger = yes + } + artifact_armor_type_scale_modifier = yes + save_scope_value_as = { + name = armor_type_scale_option + value = yes + } + } + 1 = { #Expensive + trigger = { + fund_inspiration_0021_option_lamellar_trigger = yes + } + artifact_armor_type_lamellar_modifier = yes + save_scope_value_as = { + name = armor_type_lamellar_option + value = yes + } + } + 1 = { + trigger = { + fund_inspiration_0021_option_laminar_trigger = yes + } + artifact_armor_type_laminar_modifier = yes + save_scope_value_as = { + name = armor_type_laminar_option + value = yes + } + } + 0 = { + trigger = { + fund_inspiration_0021_option_brigandine_trigger = yes + } + artifact_armor_type_brigandine_modifier = yes + save_scope_value_as = { + name = armor_type_brigandine_option + value = yes + } + } + } + } +} + +fund_inspiration.0021 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0021.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = armor_inspiration + inspiration_owner = { #They haven't already decided what armor to make + NOT = { exists = var:artifact_armor_type } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + show_as_tooltip = { + fund_inspiration_effect = yes + } + + # What options should we show? + fund_inspiration_0021_pick_options_to_show_effect = yes + fund_inspiration_0021_pick_options_to_show_effect = yes + fund_inspiration_0021_pick_options_to_show_effect = yes + } + + #Chain mail + option = { + name = fund_inspiration.0021.mail + trigger = { + exists = scope:armor_type_mail_option + } + custom_tooltip = fund_inspiration.0021.mail.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_mail + } + } + ai_chance = { + base = 10 + artifact_armor_type_mail_modifier = yes + } + } + #Plate armor + option = { + name = fund_inspiration.0021.plate + trigger = { + exists = scope:armor_type_plate_option + } + custom_tooltip = fund_inspiration.0021.plate.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_plate + } + } + ai_chance = { + base = 10 + artifact_armor_type_plate_modifier = yes + } + } + #Scale armor + option = { + name = fund_inspiration.0021.scale + trigger = { + exists = scope:armor_type_scale_option + } + custom_tooltip = fund_inspiration.0021.scale.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_scale + } + } + ai_chance = { + base = 10 + artifact_armor_type_scale_modifier = yes + } + } + #Lamellar + option = { + name = fund_inspiration.0021.lamellar + trigger = { + exists = scope:armor_type_lamellar_option + } + custom_tooltip = fund_inspiration.0021.lamellar.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_lamellar + } + } + ai_chance = { + base = 10 + artifact_armor_type_lamellar_modifier = yes + } + } + #Laminar + option = { + name = fund_inspiration.0021.laminar + trigger = { + exists = scope:armor_type_laminar_option + } + custom_tooltip = fund_inspiration.0021.laminar.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_laminar + } + } + ai_chance = { + base = 10 + artifact_armor_type_laminar_modifier = yes + } + } + #Brigandine + option = { + name = fund_inspiration.0021.brigandine + trigger = { + exists = scope:armor_type_brigandine_option + } + custom_tooltip = fund_inspiration.0021.brigandine.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_brigandine + } + } + ai_chance = { + base = 10 + artifact_armor_type_brigandine_modifier = yes + } + } + option = { + name = fund_inspiration.0031.f + custom_tooltip = fund_inspiration.they_decide_option_tt + set_armor_artifact_type_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_TYPE = no + } + ai_chance = { + base = 0 + } + } +} + +# Armor - they know what they want to make +fund_inspiration.0022 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = armor_inspiration + inspiration_owner = { #They know what armor they want to make + exists = var:artifact_armor_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0022.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + + + +# Book - choose subject +# by Linnéa Thimrén +scripted_trigger fund_inspiration_0031_title_based_option_trigger = { + + OR = { + AND = { + exists = global_var:flag_restored_roman_empire + global_var:flag_restored_roman_empire = root + NOT = { exists = scope:book_topic_restoration } + } + AND = { + exists = global_var:flag_restored_dumnonia + global_var:flag_restored_dumnonia = root + NOT = { exists = scope:book_topic_restoration } + } + AND = { + exists = global_var:flag_reformed_carolingian_empire + global_var:flag_reformed_carolingian_empire = root + NOT = { exists = scope:book_topic_restoration } + } + AND = { + exists = global_var:restore_holy_roman_empire_decision + global_var:restore_holy_roman_empire_decision = root + NOT = { exists = scope:book_topic_restoration } + } + AND = { + exists = global_var:unite_the_spanish_thrones_decision + global_var:unite_the_spanish_thrones_decision = root + exists = global_var:unite_the_spanish_thrones_decision_title + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:unite_the_slavs_decision + global_var:unite_the_slavs_decision = root + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:unite_the_southern_slavs_decision + global_var:unite_the_southern_slavs_decision = root + exists = global_var:unite_the_southern_slavs_decision_title + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:unite_the_western_slavs_decision + global_var:unite_the_western_slavs_decision = root + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:flag_unified_burgundy_kingdom + global_var:flag_unified_burgundy_kingdom = root + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:flag_unified_italian_empire + global_var:flag_unified_italian_empire = root + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:form_portugal_decision + global_var:form_portugal_decision = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_founded_kingdom_of_bosnia + global_var:flag_founded_kingdom_of_bosnia = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_armenian_empire + global_var:flag_created_armenian_empire = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_dai_viet_empire + global_var:flag_created_dai_viet_empire = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_majapahit_empire + global_var:flag_created_majapahit_empire = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_ryukyu_empire + global_var:flag_created_ryukyu_empire = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_siam_kingdom + global_var:flag_created_siam_kingdom = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_formed_rum_sultanate + global_var:flag_formed_rum_sultanate = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:create_israel_kingdom + global_var:create_israel_kingdom = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_outremer_empire + global_var:flag_created_outremer_empire = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_formed_switzerland_kingdom + global_var:flag_formed_switzerland_kingdom = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_formed_austria_kingdom + global_var:flag_formed_austria_kingdom = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_formed_kingdom_of_aragon + global_var:flag_formed_kingdom_of_aragon = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:form_toledo_decision + global_var:form_toledo_decision = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:found_kingdom_decision + global_var:found_kingdom_decision = root + exists = global_var:found_kingdom_decision_kingdom + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:found_empire_decision + global_var:found_empire_decision = root + exists = global_var:found_empire_decision_empire + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_restored_old_vasconia + global_var:flag_restored_old_vasconia = root + NOT = { exists = scope:book_topic_restoration } + } + } +} + +scripted_trigger fund_inspiration_0031_dynasty_option_trigger = { + NOT = { exists = scope:dynasty_option } + exists = dynasty +} + +scripted_trigger fund_inspiration_0031_education_option_trigger = { + NOT = { exists = scope:education_option } + OR = { + has_education_martial_trigger = yes + has_education_diplomacy_trigger = yes + has_education_stewardship_trigger = yes + has_education_learning_trigger = yes + has_education_intrigue_trigger = yes + } +} + +scripted_trigger fund_inspiration_0031_lifestyle_option_trigger = { + NOT = { exists = scope:lifestyle_option } + OR = { + has_lifestyle_trait = yes + is_cannibal_trigger = yes + is_witch_trigger = yes + is_deviant_trigger = yes + has_trait = lunatic + } +} + +scripted_trigger fund_inspiration_0031_focus_option_trigger = { + NOT = { exists = scope:focus_option } + OR = { + has_focus_martial = yes + has_focus_diplomacy = yes + has_focus_stewardship = yes + has_focus_intrigue = yes + has_focus_learning = yes + } +} + +scripted_trigger fund_inspiration_0031_relationship_option_trigger = { + NOT = { exists = scope:relationship_option } + OR = { + any_relation = { + type = soulmate + this != scope:inspiration_owner + } + any_relation = { + type = nemesis + this != scope:inspiration_owner + } + } +} + +scripted_trigger fund_inspiration_0031_mystical_animal_option_trigger = { + NOT = { exists = scope:mystical_animal_option } + has_character_modifier = hunt_mystical_animal_modifier + exists = var:hunted_mystical_animal +} + +scripted_trigger fund_inspiration_0031_pet_option_trigger = { + NOT = { exists = scope:pet_option } + OR = { #You must have named them + AND = { + any_owned_story = { + type = story_cycle_pet_cat + } + exists = var:story_cycle_cat_name + } + AND = { + any_owned_story = { + type = story_cycle_pet_dog + } + exists = var:story_cycle_dog_name + } + } + calc_true_if = { + amount < 3 + fund_inspiration_0031_title_based_option_trigger = yes + fund_inspiration_0031_dynasty_option_trigger = yes + fund_inspiration_0031_education_option_trigger = yes + fund_inspiration_0031_lifestyle_option_trigger = yes + fund_inspiration_0031_focus_option_trigger = yes + fund_inspiration_0031_relationship_option_trigger = yes + fund_inspiration_0031_mystical_animal_option_trigger = yes + } +} + +scripted_trigger fund_inspiration_0031_skill_option_trigger = { + NOT = { exists = scope:skill_option } + calc_true_if = { + amount < 3 + fund_inspiration_0031_title_based_option_trigger = yes + fund_inspiration_0031_dynasty_option_trigger = yes + fund_inspiration_0031_education_option_trigger = yes + fund_inspiration_0031_lifestyle_option_trigger = yes + fund_inspiration_0031_focus_option_trigger = yes + fund_inspiration_0031_relationship_option_trigger = yes + fund_inspiration_0031_mystical_animal_option_trigger = yes + fund_inspiration_0031_pet_option_trigger = yes + } +} + +scripted_effect fund_inspiration_0031_pick_options_to_show_effect = { + #What options should we show? + hidden_effect = { + random_list = { + 800 = { # Have I ever restored/unified/formed/created/founded a kingdom/empire/etc.? + trigger = { + fund_inspiration_0031_title_based_option_trigger = yes + } + if = { + limit = { + AND = { + exists = global_var:flag_restored_roman_empire + global_var:flag_restored_roman_empire = root + } + NOT = { exists = scope:book_topic_restoration } + } + save_scope_value_as = { + name = book_topic_restoration + value = yes + } + title:h_roman_empire = { + save_scope_as = restored_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_restored_dumnonia + global_var:flag_restored_dumnonia = root + } + NOT = { exists = scope:book_topic_restoration } + } + save_scope_value_as = { + name = book_topic_restoration + value = yes + } + title:k_cornwall = { + save_scope_as = restored_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_reformed_carolingian_empire + global_var:flag_reformed_carolingian_empire = root + } + NOT = { exists = scope:book_topic_restoration } + } + save_scope_value_as = { + name = book_topic_restoration + value = yes + } + title:e_france = { + save_scope_as = restored_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:restore_holy_roman_empire_decision + global_var:restore_holy_roman_empire_decision = root + } + NOT = { exists = scope:book_topic_restoration } + } + save_scope_value_as = { + name = book_topic_restoration + value = yes + } + title:e_hre = { + save_scope_as = restored_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:unite_the_spanish_thrones_decision + global_var:unite_the_spanish_thrones_decision = root + exists = global_var:unite_the_spanish_thrones_decision_title + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + global_var:unite_the_spanish_thrones_decision_title = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:unite_the_slavs_decision + global_var:unite_the_slavs_decision = root + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + title:e_slavia = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:unite_the_southern_slavs_decision + global_var:unite_the_southern_slavs_decision = root + exists = global_var:unite_the_southern_slavs_decision_title + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + global_var:unite_the_southern_slavs_decision_title = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:unite_the_western_slavs_decision + global_var:unite_the_western_slavs_decision = root + exists = global_var:unite_the_western_slavs_decision_title + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + global_var:unite_the_western_slavs_decision_title = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_unified_burgundy_kingdom + global_var:flag_unified_burgundy_kingdom = root + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + title:k_burgundy = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_unified_italian_empire + global_var:flag_unified_italian_empire = root + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + title:e_italy = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:form_portugal_decision + global_var:form_portugal_decision = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_portugal = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_founded_kingdom_of_bosnia + global_var:flag_founded_kingdom_of_bosnia = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_bosnia = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_created_armenian_empire + global_var:flag_created_armenian_empire = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:e_armenia = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_created_dai_viet_empire + global_var:flag_created_dai_viet_empire = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:e_viet = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_formed_rum_sultanate + global_var:flag_formed_rum_sultanate = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_rum = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:create_israel_kingdom + global_var:create_israel_kingdom = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_israel = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_created_outremer_empire + global_var:flag_created_outremer_empire = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:e_outremer = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_formed_switzerland_kingdom + global_var:flag_formed_switzerland_kingdom = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_switzerland = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_formed_austria_kingdom + global_var:flag_formed_austria_kingdom = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_austria = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_formed_kingdom_of_aragon + global_var:flag_formed_kingdom_of_aragon = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_aragon = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:found_kingdom_decision + global_var:found_kingdom_decision = root + exists = global_var:found_kingdom_decision_kingdom + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + global_var:found_kingdom_decision_kingdom = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:found_empire_decision + global_var:found_empire_decision = root + exists = global_var:found_empire_decision_empire + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + global_var:found_empire_decision_empire = { + save_scope_as = created_title + } + } + } + 5 = { # Dynasty + trigger = { + fund_inspiration_0031_dynasty_option_trigger = yes + } + save_scope_value_as = { + name = dynasty_option + value = yes + } + } + 10 = { # education trait + trigger = { + fund_inspiration_0031_education_option_trigger = yes + } + save_scope_value_as = { + name = education_option + value = yes + } + } + 10 = { # lifestyle/misc stuff + trigger = { + fund_inspiration_0031_lifestyle_option_trigger = yes + } + save_scope_value_as = { + name = lifestyle_option + value = yes + } + random_list = { #What topic do we offer you? + 10 = { + trigger = { has_trait = lifestyle_reveler } + save_scope_value_as = { + name = lifestyle_option_reveler + value = yes + } + } + 10 = { + trigger = { has_trait = lifestyle_blademaster } + save_scope_value_as = { + name = lifestyle_option_blademaster + value = yes + } + } + 10 = { + trigger = { has_trait = lifestyle_hunter } + save_scope_value_as = { + name = lifestyle_option_hunter + value = yes + } + } + 10 = { + trigger = { has_trait = lifestyle_mystic } + save_scope_value_as = { + name = lifestyle_option_mystic + value = yes + } + } + 10 = { + trigger = { has_trait = lifestyle_herbalist } + save_scope_value_as = { + name = lifestyle_option_herbalist + value = yes + } + } + 10 = { + trigger = { has_trait = lifestyle_physician } + save_scope_value_as = { + name = lifestyle_option_physician + value = yes + } + } + 10 = { + trigger = { is_cannibal_trigger = yes } + save_scope_value_as = { + name = lifestyle_option_cannibal + value = yes + } + } + 10 = { + trigger = { is_witch_trigger = yes } + save_scope_value_as = { + name = lifestyle_option_witch + value = yes + } + } + 10 = { + trigger = { is_deviant_trigger = yes } + save_scope_value_as = { + name = lifestyle_option_deviant + value = yes + } + } + 10 = { + trigger = { has_trait = lunatic } + save_scope_value_as = { + name = lifestyle_option_lunatic + value = yes + } + } + 10 = { + trigger = { has_trait = torturer } + save_scope_value_as = { + name = lifestyle_option_torturer + value = yes + } + } + } + } + 10 = { # focus + trigger = { + fund_inspiration_0031_focus_option_trigger = yes + } + save_scope_value_as = { + name = focus_option + value = yes + } + } + 5 = { # relationship + trigger = { + fund_inspiration_0031_relationship_option_trigger = yes + } + save_scope_value_as = { + name = relationship_option + value = yes + } + if = { + limit = { + any_relation = { + type = soulmate + this != scope:inspiration_owner + } + } + random_relation = { + type = soulmate + limit = { + this != scope:inspiration_owner + } + save_scope_as = relationship_scope + } + save_scope_value_as = { + name = relationship_option_soulmate + value = yes + } + } + else_if = { + limit = { + any_relation = { + type = nemesis + this != scope:inspiration_owner + } + } + random_relation = { + type = nemesis + limit = { + this != scope:inspiration_owner + } + save_scope_as = relationship_scope + } + save_scope_value_as = { + name = relationship_option_nemesis + value = yes + } + } + } + 50 = { # mystical animal + trigger = { + fund_inspiration_0031_mystical_animal_option_trigger = yes + } + save_scope_value_as = { + name = mystical_animal_option + value = yes + } + set_variable = { + name = animal_type + value = root.var:hunted_mystical_animal + } + } + 5 = { # pet (only if we don't have enough options already) + trigger = { + fund_inspiration_0031_pet_option_trigger = yes + } + save_scope_value_as = { + name = pet_option + value = yes + } + random_list = { + 50 = { + trigger = { + any_owned_story = { + type = story_cycle_pet_cat + } + exists = var:story_cycle_cat_name + } + save_scope_value_as = { + name = pet_option_cat + value = yes + } + } + 50 = { + trigger = { + any_owned_story = { + type = story_cycle_pet_dog + } + } + save_scope_value_as = { + name = pet_option_dog + value = yes + } + } + } + } + 1 = { # skill (only if we don't have enough options already) + trigger = { + fund_inspiration_0031_skill_option_trigger = yes + } + save_scope_value_as = { + name = skill_option + value = yes + } + if = { + limit = { + highest_skill = martial + NOT = { has_education_martial_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_martial = no + } + } + save_scope_value_as = { + name = skill_option_martial + value = yes + } + } + else_if = { + limit = { + highest_skill = diplomacy + NOT = { has_education_diplomacy_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_diplomacy = no + } + } + save_scope_value_as = { + name = skill_option_diplomacy + value = yes + } + } + else_if = { + limit = { + highest_skill = stewardship + NOT = { has_education_stewardship_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_stewardship = no + } + } + save_scope_value_as = { + name = skill_option_stewardship + value = yes + } + } + else_if = { + limit = { + highest_skill = intrigue + NOT = { has_education_intrigue_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_intrigue = no + } + } + save_scope_value_as = { + name = skill_option_intrigue + value = yes + } + } + else_if = { + limit = { + highest_skill = learning + NOT = { has_education_learning_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_learning = no + } + } + save_scope_value_as = { + name = skill_option_learning + value = yes + } + } + else = { #Fallback + random_list = { + 1 = { + trigger = { + NOT = { has_education_martial_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_martial = no + } + OR = { #Cannot be the lowest skill + martial > diplomacy + martial > stewardship + martial > intrigue + martial > learning + } + } + compare_modifier = { + value = martial + multiplier = 4 + } + save_scope_value_as = { + name = skill_option_martial + value = yes + } + } + 1 = { + trigger = { + NOT = { has_education_diplomacy_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_diplomacy = no + } + OR = { #Cannot be the lowest skill + diplomacy > martial + diplomacy > stewardship + diplomacy > intrigue + diplomacy > learning + } + } + compare_modifier = { + value = diplomacy + multiplier = 4 + } + save_scope_value_as = { + name = skill_option_diplomacy + value = yes + } + } + 1 = { + trigger = { + NOT = { has_education_stewardship_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_stewardship = no + } + OR = { #Cannot be the lowest skill + stewardship > martial + stewardship > diplomacy + stewardship > intrigue + stewardship > learning + } + } + compare_modifier = { + value = stewardship + multiplier = 4 + } + save_scope_value_as = { + name = skill_option_stewardship + value = yes + } + } + 1 = { + trigger = { + NOT = { has_education_intrigue_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_intrigue = no + } + OR = { #Cannot be the lowest skill + intrigue > martial + intrigue > diplomacy + intrigue > stewardship + intrigue > learning + } + } + compare_modifier = { + value = intrigue + multiplier = 4 + } + save_scope_value_as = { + name = skill_option_intrigue + value = yes + } + } + 1 = { + trigger = { + NOT = { has_education_learning_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_learning = no + } + OR = { #Cannot be the lowest skill + learning > martial + learning > diplomacy + learning > stewardship + learning > intrigue + } + } + compare_modifier = { + value = learning + multiplier = 4 + } + save_scope_value_as = { + name = skill_option_learning + value = yes + } + } + } + } + } + } + } +} + +fund_inspiration.0031 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0031.desc + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { + scope:inspiration = { + has_inspiration_type = book_inspiration + } + } + animation = writing + } + animation = personality_honorable + } + right_portrait = { + trigger = { + exists = scope:relationship_scope + } + character = scope:relationship_scope + } + + trigger = { + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They haven't already decided what to write about + NOT = { exists = var:book_subject } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + assign_quirk_effect = yes + } + + # We save a subject here so that the inspiration owner can come with a suggestion. It is not saved however. + set_book_subject_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_SUBJECT = no + } + scope:inspiration_owner = { + if = { #To avoid tooltip errors + limit = { + exists = var:book_subject + } + var:book_subject = { + save_scope_as = subject + } + } + remove_variable = book_subject + } + + show_as_tooltip = { + fund_inspiration_effect = yes + } + + # What options should we show? + fund_inspiration_0031_pick_options_to_show_effect = yes + fund_inspiration_0031_pick_options_to_show_effect = yes + fund_inspiration_0031_pick_options_to_show_effect = yes + } + + option = { #Education + name = fund_inspiration.0031.education + trigger = { + exists = scope:education_option + } + trait = education_martial_1 + trait = education_martial_2 + trait = education_martial_3 + trait = education_martial_4 + trait = education_martial_5 + trait = education_diplomacy_1 + trait = education_diplomacy_2 + trait = education_diplomacy_3 + trait = education_diplomacy_4 + trait = education_diplomacy_5 + trait = education_learning_1 + trait = education_learning_2 + trait = education_learning_3 + trait = education_learning_4 + trait = education_learning_5 + trait = education_stewardship_1 + trait = education_stewardship_2 + trait = education_stewardship_3 + trait = education_stewardship_4 + trait = education_stewardship_5 + trait = education_intrigue_1 + trait = education_intrigue_2 + trait = education_intrigue_3 + trait = education_intrigue_4 + trait = education_intrigue_5 + if = { + limit = { + has_education_martial_trigger = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:martial + } + } + } + else_if = { + limit = { + has_education_diplomacy_trigger = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:diplomacy + } + } + } + else_if = { + limit = { + has_education_stewardship_trigger = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:stewardship + } + } + } + else_if = { + limit = { + has_education_learning_trigger = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:learning + } + } + } + else_if = { + limit = { + has_education_intrigue_trigger = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:intrigue + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + + ai_chance = { + base = 50 + modifier = { + add = 25 + has_education_martial_trigger = yes + martial > high_skill_rating + } + modifier = { + add = 25 + has_education_diplomacy_trigger = yes + diplomacy > high_skill_rating + } + modifier = { + add = 25 + has_education_stewardship_trigger = yes + stewardship > high_skill_rating + } + modifier = { + add = 25 + has_education_learning_trigger = yes + learning > high_skill_rating + } + modifier = { + add = 25 + has_education_intrigue_trigger = yes + intrigue > high_skill_rating + } + } + } + + option = { #lifestyle/misc stuff + name = { + trigger = { exists = scope:lifestyle_option_reveler } + text = fund_inspiration.0031.lifestyle_reveler + } + name = { + trigger = { exists = scope:lifestyle_option_blademaster } + text = fund_inspiration.0031.lifestyle_blademaster + } + name = { + trigger = { exists = scope:lifestyle_option_hunter } + text = fund_inspiration.0031.lifestyle_hunter + } + name = { + trigger = { exists = scope:lifestyle_option_mystic } + text = fund_inspiration.0031.lifestyle_mystic + } + name = { + trigger = { exists = scope:lifestyle_option_torturer } + text = fund_inspiration.0031.lifestyle_torturer + } + name = { + trigger = { exists = scope:lifestyle_option_herbalist } + text = fund_inspiration.0031.lifestyle_herbalist + } + name = { + trigger = { exists = scope:lifestyle_option_physician } + text = fund_inspiration.0031.lifestyle_physician + } + name = { + trigger = { exists = scope:lifestyle_option_cannibal } + text = fund_inspiration.0031.lifestyle_cannibal + } + name = { + trigger = { exists = scope:lifestyle_option_witch } + text = fund_inspiration.0031.lifestyle_witch + } + name = { + trigger = { exists = scope:lifestyle_option_deviant } + text = fund_inspiration.0031.lifestyle_deviant + } + name = { + trigger = { exists = scope:lifestyle_option_lunatic } + text = fund_inspiration.0031.lifestyle_lunatic + } + trigger = { + exists = scope:lifestyle_option + } + trait = lifestyle_reveler + trait = lifestyle_blademaster + trait = lifestyle_hunter + trait = lifestyle_mystic + trait = lifestyle_herbalist + trait = torturer + trait = lifestyle_physician + trait = cannibal + trait = witch + trait = deviant + trait = lunatic_1 + trait = lunatic_genetic + if = { + limit = { + exists = scope:lifestyle_option_reveler + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:reveler + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_blademaster + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:blademaster + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_hunter + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:hunter + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_torturer + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:torturer + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_mystic + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:mystic + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_herbalist + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:herbalist + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_physician + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:medicine + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_cannibal + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:cannibal + } + # Can either be about recipes or more general about the consumption of human flesh + hidden_effect = { + random_list = { + 50 = { #Undecided, for now + } + 50 = { + set_variable = { + name = book_topic + value = flag:cannibal_recipes + } + } + } + } + + #opinion hit for the more _out there_ choices + if = { + limit = { + NOT = { is_cannibal_trigger = yes } + } + add_opinion = { + target = root + modifier = scared_opinion + opinion = -20 + } + } + } + #reveal secret to the writer if there is one + if = { + limit = { + any_secret = { + type = secret_cannibal + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + } + random_secret = { + type = secret_cannibal + limit = { + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + reveal_to = scope:inspiration_owner + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_witch + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:witch + } + set_variable = { + name = book_subject_witch_scope + value = root + } + #opinion hit for the more _out there_ choices + if = { + limit = { + NOT = { is_witch_trigger = yes } + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = root } + } + if = { + limit = { + OR = { + has_trait = zealous + piety_level >= high_piety_level + has_trait = faith_warrior + } + } + add_opinion = { + target = root + modifier = impious_opinion + opinion = -30 + } + } + else = { + add_opinion = { + target = root + modifier = scared_opinion + opinion = -15 + } + } + } + } + #reveal secret to the writer if there is one + if = { + limit = { + any_secret = { + type = secret_witch + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + } + random_secret = { + type = secret_witch + limit = { + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + reveal_to = scope:inspiration_owner + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_deviant + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:deviant + } + #opinion hit for the more _out there_ choices + if = { + limit = { + NOT = { is_deviant_trigger = yes } + } + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -20 + } + } + } + #reveal secret to the writer if there is one + if = { + limit = { + any_secret = { + type = secret_deviant + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + } + random_secret = { + type = secret_deviant + limit = { + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + reveal_to = scope:inspiration_owner + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_lunatic + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:lunatic + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + + ai_chance = { + base = 75 + modifier = { # If it's hidden secrets it's rare that they write about it + add = -70 + exists = scope:lifestyle_option_witch + NOT = { has_trait = witch } + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = root } + } + modifier = { # If it's hidden secrets it's rare that they write about it + add = -70 + exists = scope:lifestyle_option_deviant + NOT = { has_trait = deviant } + trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = root } + } + modifier = { # If it's hidden secrets it's rare that they write about it + add = -70 + exists = scope:lifestyle_option_cannibal + NOT = { has_trait = cannibal } + trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = root } + } + modifier = { #However, the might if they're arrogant + add = 50 + has_trait = arrogant + } + ai_value_modifier = { + ai_boldness = 0.25 + } + } + } + + option = { #Lifestyle Focus + name = fund_inspiration.0031.focus + trigger = { + exists = scope:focus_option + } + if = { + limit = { + has_focus_martial = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:martial + } + } + } + else_if = { + limit = { + has_focus_diplomacy = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:diplomacy + } + } + } + else_if = { + limit = { + has_focus_stewardship = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:stewardship + } + } + } + else_if = { + limit = { + has_focus_learning = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:learning + } + } + } + else_if = { + limit = { + has_focus_intrigue = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:intrigue + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 50 + modifier = { + add = 25 + has_focus_martial = yes + martial > high_skill_rating + } + modifier = { + add = 25 + has_focus_diplomacy = yes + diplomacy > high_skill_rating + } + modifier = { + add = 25 + has_focus_stewardship = yes + stewardship > high_skill_rating + } + modifier = { + add = 25 + has_focus_learning = yes + learning > high_skill_rating + } + modifier = { + add = 25 + has_focus_intrigue = yes + intrigue > high_skill_rating + } + } + } + + option = { #Skill + name = { + trigger = { exists = scope:skill_option_martial } + text = fund_inspiration.0031.skill_option_martial + } + name = { + trigger = { exists = scope:skill_option_diplomacy } + text = fund_inspiration.0031.skill_option_diplomacy + } + name = { + trigger = { exists = scope:skill_option_stewardship } + text = fund_inspiration.0031.skill_option_stewardship + } + name = { + trigger = { exists = scope:skill_option_learning } + text = fund_inspiration.0031.skill_option_learning + } + name = { + trigger = { exists = scope:skill_option_intrigue } + text = fund_inspiration.0031.skill_option_intrigue + } + trigger = { + exists = scope:skill_option + } + if = { + limit = { + exists = scope:skill_option_martial + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:martial + } + } + } + else_if = { + limit = { + exists = scope:skill_option_diplomacy + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:diplomacy + } + } + } + else_if = { + limit = { + exists = scope:skill_option_stewardship + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:stewardship + } + } + } + else_if = { + limit = { + exists = scope:skill_option_learning + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:learning + } + } + } + else_if = { + limit = { + exists = scope:skill_option_intrigue + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:intrigue + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { # Kinda a fallback option, so we don't want the AI choosing this too often + base = 10 + } + } + + option = { #Relationship + name = { + trigger = { exists = scope:relationship_option_soulmate } + text = fund_inspiration.0031.relationship_soulmate + } + name = { + trigger = { exists = scope:relationship_option_nemesis } + text = fund_inspiration.0031.relationship_nemesis + } + trigger = { + exists = scope:relationship_option + exists = scope:relationship_scope + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:relationship + } + if = { + limit = { + exists = scope:relationship_option_soulmate + } + set_variable = { + name = book_topic + value = flag:soulmate + } + } + else = { + set_variable = { + name = book_topic + value = flag:nemesis + } + } + set_variable = { + name = book_topic_relationship + value = scope:relationship_scope + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 0 + #My opinion of them + opinion_modifier = { + trigger = { + exists = scope:relationship_option_soulmate + } + opinion_target = scope:relationship_scope + } + opinion_modifier = { + trigger = { + exists = scope:relationship_option_nemesis + } + opinion_target = scope:relationship_scope + multiplier = -0.25 + } + #Their opinion of me + opinion_modifier = { + trigger = { + exists = scope:relationship_option_soulmate + } + who = scope:relationship_scope + opinion_target = root + } + opinion_modifier = { + trigger = { + exists = scope:relationship_option_nemesis + } + who = scope:relationship_scope + opinion_target = root + multiplier = -0.25 + } + + ai_value_modifier = { + trigger = { + exists = scope:relationship_option_nemesis + } + ai_vengefulness = 0.5 + } + } + } + + option = { #Dynasty + name = fund_inspiration.0031.dynasty + trigger = { + exists = scope:dynasty_option + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:dynasty + } + set_variable = { + name = book_topic + value = flag:dynasty + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 25 + modifier = { + add = 50 + has_trait = arrogant + } + modifier = { + add = 25 + has_trait = ambitious + } + modifier = { #more likely if you have a _cool_ dynasty + add = 25 + dynasty = { + dynasty_prestige >= medium_dynasty_prestige_value + } + } + ai_value_modifier = { + ai_greed = 0.25 + } + } + } + + option = { #Mystical animal + name = fund_inspiration.0031.mystical_animal + trigger = { + exists = scope:mystical_animal_option + exists = var:animal_type + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:mystical_animal + } + } + remove_variable = animal_type + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 10 #Not common if you don't have the personality for it + modifier = { + add = 50 + has_trait = lifestyle_hunter + } + modifier = { + add = 25 + OR = { + has_trait = lunatic + has_trait = vengeful + has_trait = arrogant + } + } + ai_value_modifier = { + ai_energy = 0.25 + ai_rationality = -0.5 + } + } + } + + option = { #Pet + name = { + trigger = { exists = scope:pet_option_cat } + text = fund_inspiration.0031.pet_option_cat + } + name = { + trigger = { exists = scope:pet_option_dog } + text = fund_inspiration.0031.pet_option_dog + } + trigger = { + exists = scope:pet_option + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:animals + } + if = { + limit = { + exists = scope:pet_option_cat + } + set_variable = { + name = book_topic + value = flag:animals_your_cat + } + set_variable = { + name = book_topic_cat_name + value = root.var:story_cycle_cat_name + } + } + else = { + set_variable = { + name = book_topic + value = flag:animals_your_dog + } + set_variable = { + name = book_topic_dog_name + value = root.var:story_cycle_dog_name + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 0 #Not something the AI will do unless they're a kid + modifier = { + add = 100 + is_adult = no + } + } + } + + option = { # Unification + name = fund_inspiration.0031.c + trigger = { + exists = scope:book_topic_unification + } + scope:inspiration_owner = { + if = { + limit = { + scope:united_title.tier >= tier_empire + } + set_variable = { + name = book_subject + value = flag:empire + } + } + else = { + set_variable = { + name = book_subject + value = flag:kingdom + } + } + set_variable = { + name = book_topic + value = flag:unification + } + set_variable = { + name = book_topic_united_title + value = scope:united_title + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.75 + } + modifier = { + add = 25 + has_trait = arrogant + } + modifier = { + add = 25 + scope:united_title.tier >= tier_empire + } + } + } + + option = { # Formed/created/founded + name = fund_inspiration.0031.d + trigger = { + exists = scope:book_topic_creation + } + scope:inspiration_owner = { + if = { + limit = { + scope:created_title.tier >= tier_empire + } + set_variable = { + name = book_subject + value = flag:empire + } + } + else = { + set_variable = { + name = book_subject + value = flag:kingdom + } + } + set_variable = { + name = book_topic + value = flag:creation + } + set_variable = { + name = book_topic_created_title + value = scope:created_title + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.75 + } + modifier = { + add = 25 + has_trait = arrogant + } + modifier = { + add = 25 + scope:created_title.tier >= tier_empire + } + } + } + + option = { # Restored + name = fund_inspiration.0031.e + trigger = { + exists = scope:book_topic_restoration + } + scope:inspiration_owner = { + if = { + limit = { + scope:restored_title.tier >= tier_empire + } + set_variable = { + name = book_subject + value = flag:empire + } + } + else = { + set_variable = { + name = book_subject + value = flag:kingdom + } + } + set_variable = { + name = book_topic + value = flag:restoration + } + set_variable = { + name = book_topic_restored_title + value = scope:restored_title + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.75 + } + modifier = { + add = 25 + has_trait = arrogant + } + modifier = { + add = 25 + scope:restored_title.tier >= tier_empire + } + } + } + + option = { #I don't care! + name = fund_inspiration.0031.f + scope:subject = { + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = prev + } + } + } + custom_tooltip = fund_inspiration.they_decide_option_tt + ai_chance = { + base = 0 + } + } +} + + +# Book - they have a subject +# by Linnéa Thimrén +fund_inspiration.0032 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + exists = var:book_subject + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0032.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + hidden_effect = { + if = { # If they're a witch and you're funding their questionable projects they might try to recruit you + limit = { + OR = { + scope:inspiration_owner.var:book_subject = flag:medicine + scope:inspiration_owner.var:book_subject = flag:witch + } + scope:inspiration_owner = { + is_witch_trigger = yes + can_start_scheme = { + type = convert_to_witchcraft + target_character = root + } + } + is_witch_trigger = no + } + random = { + chance = 50 + modifier = { + add = 25 + trigger = { + scope:inspiration_owner.var:book_subject = flag:witch + } + } + scope:inspiration_owner = { + start_scheme = { + type = convert_to_witchcraft + target_character = root + } + } + } + } + } + } +} + + +# Tapestry - Choose a Subject +# by Sean Hughes +fund_inspiration.0041 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0041.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = weaver_inspiration + } + scope:inspiration_owner = { + NOR = { + exists = var:artifact_tapestry_scene + has_variable = banner_commission + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + random_list = { + pick = 3 + unique = yes + + 999 = { # A tribute to my victory at [location]. + trigger = { + exists = var:epic_battle_location + exists = var:epic_loser + } + save_scope_value_as = { + name = option_battle + value = yes + } + } + 10 = { # Something Abstract + trigger = { + faith_is_aniconic_trigger = yes + } + ai_value_modifier = { + ai_zeal = 0.2 + } + modifier = { + add = { + value = learning + subtract = decent_skill_rating + } + } + save_scope_value_as = { + name = option_abstract + value = yes + } + } + 10 = { # Something showcasing the untamed beauty of nature + save_scope_value_as = { + name = option_nature + value = yes + } + modifier = { + add = { + value = prowess + subtract = decent_skill_rating + } + } + } + 10 = { # Something that illustrates the history of the realm + trigger = { + faith_is_aniconic_trigger = no + } + save_scope_value_as = { + name = option_history + value = yes + } + modifier = { + add = { + value = diplomacy + subtract = decent_skill_rating + } + } + } + 10 = { # Something representing life in the realm + trigger = { + faith_is_aniconic_trigger = no + } + save_scope_value_as = { + name = option_life + value = yes + } + modifier = { + add = { + value = stewardship + subtract = decent_skill_rating + } + } + } + } + } + + option = { # A tribute to my victory at [location]. + trigger = { + exists = scope:option_battle + exists = var:epic_battle_location + exists = var:epic_loser + } + name = fund_inspiration.0041.option_battle + + hidden_effect = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:battle + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_honor = 1 + } + modifier = { + add = 100 + has_trait = brave + } + modifier = { + add = 50 + has_trait = education_martial + } + modifier = { + factor = 0 + has_trait = craven + } + } + } + + option = { # Something Abstract + trigger = { + exists = scope:option_abstract + faith_is_aniconic_trigger = yes + } + name = fund_inspiration.0041.option_abstract + + hidden_effect = { + random_list = { + 40 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:geometric_patterns + } + } + } + 60 = { + trigger = { scope:inspiration_owner = { religion = religion:islam_religion } } + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:calligraphic + } + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + } + modifier = { + add = { + value = learning + subtract = decent_skill_rating + multiply = 10 + } + } + } + } + + option = { # Something showcasing the untamed beauty of nature + trigger = { + exists = scope:option_nature + } + name = fund_inspiration.0041.option_nature + hidden_effect = { + random_list = { + 33 = { + trigger = { NOT = { faith = { has_doctrine_parameter = pacifist_opinion_active } } } + modifier = { + has_trait = lifestyle_hunter + factor = 4 # 66% chance if hunter, 33% chance otherwise + } + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:hunt + } + } + } + 33 = { + trigger = { NOT = { faith = { has_doctrine_parameter = pacifist_opinion_active } } } + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:animals + } + } + } + 33 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:garden + } + } + } + } + } + ai_chance = { + base = 100 + modifier = { + add = 400 + has_trait = witch + } + } + } + + option = { # Something that illustrates the history of the realm + trigger = { + exists = scope:option_history + faith_is_aniconic_trigger = no + } + name = fund_inspiration.0041.option_history + hidden_effect = { + random_list = { + 50 = { + trigger = { + culture = { + OR = { + has_cultural_tradition = tradition_seafaring + has_cultural_tradition = tradition_maritime_mercantilism + } + } + } + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:ships + } + } + } + 25 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:historical + } + } + } + 25 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:coronation + } + } + } + } + } + ai_chance = { + base = 100 + modifier = { + add = 200 + has_trait = arrogant + } + modifier = { + add = { + value = diplomacy + subtract = decent_skill_rating + multiply = 10 + } + } + } + } + + option = { # Something representing life in the realm + trigger = { + exists = scope:option_life + faith_is_aniconic_trigger = no + } + name = fund_inspiration.0041.option_life + hidden_effect = { + random_list = { + 33 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:bucolic + } + } + } + 33 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:banquet + } + } + } + 33 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:hearing + } + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + add = { + value = stewardship + subtract = decent_skill_rating + multiply = 10 + } + } + } + } + + after = { + custom_tooltip = fund_inspiration.you_decide_option_tt + } +} + +# Tapestry - Subject already chosen +# by Sean Hughes +fund_inspiration.0042 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = weaver_inspiration + inspiration_owner = { #They know what tapestry they want to make + exists = var:artifact_tapestry_scene + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0042.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + +# Banner - Choose a Subject +# by Joe Parkin +fund_inspiration.0043 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0043.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = weaver_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + } + + option = { # Title + name = fund_inspiration.0043.option_title + scope:inspiration_owner = { + set_variable = { + name = artifact_banner_type + value = flag:title + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = -0.5 + } + } + } + + option = { # House + name = fund_inspiration.0043.option_house + scope:inspiration_owner = { + set_variable = { + name = artifact_banner_type + value = flag:house + } + } + ai_chance = { + base = 25 + modifier = { + factor = 2 + house.house_head = root + } + modifier = { + factor = 0.5 + any_character_artifact = { + exists = var:banner_house + var:banner_house = root.house + } + } + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Dynasty + name = fund_inspiration.0043.option_dynasty + trigger = { + AND = { + OR = { + this = dynasty.dynast # Dynasty Head + any_parent = { # Parent landless + employer = prev + dynasty = prev.dynasty + this = dynasty.dynast + } + } + NOR = { + any_artifact = { + trigger_if = { + limit = { exists = var:banner_dynasty } + var:banner_dynasty = root.dynasty + } + trigger_else = { always = no } + OR = { + artifact_owner = root + artifact_owner = { in_diplomatic_range = root } + } + } + any_inspiration = { + inspiration_sponsor.dynasty = root.dynasty + inspiration_owner = { + has_variable = banner_commission + trigger_if = { + limit = { exists = var:artifact_banner_type } + var:artifact_banner_type = flag:dynasty + } + trigger_else = { always = no } + } + } + } + } + } + scope:inspiration_owner = { + set_variable = { + name = artifact_banner_type + value = flag:dynasty + } + } + custom_tooltip = fund_inspiration.0043.option_dynasty_tt + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + after = { + custom_tooltip = fund_inspiration.you_decide_option_tt + } +} + +# Wall Hanging - choose tapestry or banner +fund_inspiration.0044 = { + type = character_event + title = fund_inspiration.0044.t + desc = fund_inspiration.0044.desc + theme = realm + override_background = { + reference = study + } + left_portrait = { + character = scope:antiquarian + animation = steward + } + + option = { # Tapestry + name = fund_inspiration.0044.option_tapestry + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # Banner + name = fund_inspiration.0044.option_banner + scope:local_artisan = { set_variable = banner_commission } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + after = { + scope:local_artisan = { + create_inspiration = weaver_inspiration + inspiration = { + save_scope_as = this_inspiration + } + if = { + # To avoid false-positives during tooltip generation. + limit = { exists = scope:this_inspiration } + root = { sponsor_inspiration = scope:this_inspiration } + } + } + custom_tooltip = fund_inspiration.you_decide_tapestry_option_tt + } +} + +# Adventurer - Choose destination +# By Bianca Savazzi and Linnéa Thimrén + +# What options should we show? +scripted_effect fund_inspiration_0051_pick_options_to_show_effect = { + hidden_effect = { + random_list = { + 1 = { + # Africa + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_africa + } + } + NOT = { exists = scope:africa_option } + } + save_scope_value_as = { + name = africa_option + value = yes + } + } + 1 = { + # West Africa + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_africa_west + } + } + NOT = { exists = scope:africa_west_option } + } + save_scope_value_as = { + name = africa_west_option + value = yes + } + } + 1 = { + # North Africa + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_africa_north + } + } + NOT = { exists = scope:africa_north_option } + } + save_scope_value_as = { + name = africa_north_option + value = yes + } + } + 1 = { + # East Africa + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_africa_east + } + } + NOT = { exists = scope:africa_east_option } + } + save_scope_value_as = { + name = africa_east_option + value = yes + } + } + 1 = { + # Europe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_europe + } + } + NOT = { exists = scope:europe_option } + } + save_scope_value_as = { + name = europe_option + value = yes + } + } + 1 = { + # North Europe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_europe_north + } + } + NOT = { exists = scope:europe_north_option } + } + save_scope_value_as = { + name = europe_north_option + value = yes + } + } + 1 = { + # South Europe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_europe_south + } + } + NOT = { exists = scope:europe_south_option } + } + save_scope_value_as = { + name = europe_south_option + value = yes + } + } + 1 = { + # West Europe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_europe_west + } + } + NOT = { exists = scope:europe_west_option } + } + save_scope_value_as = { + name = europe_west_option + value = yes + } + } + 1 = { + # East Europe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_europe_east + } + } + NOT = { exists = scope:europe_east_option } + } + save_scope_value_as = { + name = europe_east_option + value = yes + } + } + 1 = { + # Middle East + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_middle_east + } + } + NOT = { exists = scope:middle_east_option } + } + save_scope_value_as = { + name = middle_east_option + value = yes + } + } + 1 = { + # Middle East - Jerusalem + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_middle_east_jerusalem + } + } + NOT = { exists = scope:middle_east_jerusalem_option } + } + save_scope_value_as = { + name = middle_east_jerusalem_option + value = yes + } + } + 1 = { + # Middle East - Arabia + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_middle_east_arabia + } + } + NOT = { exists = scope:middle_east_arabia_option } + } + save_scope_value_as = { + name = middle_east_arabia_option + value = yes + } + } + 1 = { + # Middle East - Persia + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_middle_east_persia + } + } + NOT = { exists = scope:middle_east_persia_option } + } + save_scope_value_as = { + name = middle_east_persia_option + value = yes + } + } + 1 = { + # India + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_india + } + } + NOT = { exists = scope:india_option } + } + save_scope_value_as = { + name = india_option + value = yes + } + } + 1 = { + # India - Deccan + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_india_deccan + } + } + NOT = { exists = scope:india_deccan_option } + } + save_scope_value_as = { + name = india_deccan_option + value = yes + } + } + 1 = { + # India - Bengal + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_india_bengal + } + } + NOT = { exists = scope:india_bengal_option } + } + save_scope_value_as = { + name = india_bengal_option + value = yes + } + } + 1 = { + # India - Rajastan + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_india_rajastan + } + } + NOT = { exists = scope:india_rajastan_option } + } + save_scope_value_as = { + name = india_rajastan_option + value = yes + } + } + 1 = { + # The Steppe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_steppe + } + } + NOT = { exists = scope:steppe_option } + } + save_scope_value_as = { + name = steppe_option + value = yes + } + } + 1 = { + # The Steppe - West + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_steppe_west + } + } + NOT = { exists = scope:steppe_west_option } + } + save_scope_value_as = { + name = steppe_west_option + value = yes + } + } + 1 = { + # The Steppe - East + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_steppe_east + } + } + NOT = { exists = scope:steppe_east_option } + } + save_scope_value_as = { + name = steppe_east_option + value = yes + } + } + 1 = { + # The Steppe - Tarim + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_steppe_tarim + } + } + NOT = { exists = scope:steppe_tarim_option } + } + save_scope_value_as = { + name = steppe_tarim_option + value = yes + } + } + 1 = { + # Asia - Minor + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_minor + } + } + NOT = { exists = scope:asia_minor_option } + } + save_scope_value_as = { + name = asia_minor_option + value = yes + } + } + 1 = { + # Burma + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_burma + } + } + NOT = { exists = scope:burma_option } + } + save_scope_value_as = { + name = burma_option + value = yes + } + } + 1 = { + # Tibet + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_tibet + } + } + NOT = { exists = scope:tibet_option } + } + save_scope_value_as = { + name = tibet_option + value = yes + } + } + 1 = { + # East Asia + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_china + } + } + NOT = { exists = scope:east_asia_option } + } + save_scope_value_as = { + name = east_asia_option + value = yes + } + } + 1 = { + # China + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_china + } + } + NOT = { exists = scope:china_option } + } + save_scope_value_as = { + name = china_option + value = yes + } + } + 1 = { + # Korea + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_korea + } + } + NOT = { exists = scope:korea_option } + } + save_scope_value_as = { + name = korea_option + value = yes + } + } + 1 = { + # Japan + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_japan + } + } + NOT = { exists = scope:japan_option } + } + save_scope_value_as = { + name = japan_option + value = yes + } + } + 1 = { + # Southeast Asia + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_southeast + } + } + NOT = { exists = scope:southeast_asia_option } + } + save_scope_value_as = { + name = southeast_asia_option + value = yes + } + } + } + } +} + +scripted_effect fund_adventure_inspiration_start_effect = { + hidden_effect = { + if = { #Should always exists, but we add this check to avoid the tooltip errors + limit = { + exists = $ADVENTURER$.var:adventure_destination + } + get_adventure_inspiration_start_location = { ADVENTURER = $ADVENTURER$ } #To save the location so we can use it in the effect + } + if = { #Should always exists, but we add this check to avoid the tooltip errors + limit = { + exists = scope:location + exists = scope:location.title_province + } + start_adventure_effect = { + ADVENTURER = $ADVENTURER$ + LOCATION = scope:location.title_province + } + } + } +} + +fund_inspiration.0051 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0051.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + inspiration_owner = { #They haven't already decided where to go + NOT = { exists = var:adventure_destination } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + + save_scope_as = actor + scope:inspiration_owner = { + assign_quirk_effect = yes + save_scope_as = recipient + } + show_as_tooltip = { + fund_inspiration_effect = yes + } + fund_inspiration_0051_pick_options_to_show_effect = yes + fund_inspiration_0051_pick_options_to_show_effect = yes + fund_inspiration_0051_pick_options_to_show_effect = yes + } + + option = { #africa + name = fund_inspiration.0051.africa + trigger = { exists = scope:africa_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:africa + } + } + + ai_chance = { + base = 50 + } + } + + option = { #africa_west + name = fund_inspiration.0051.africa_west + trigger = { exists = scope:africa_west_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:africa_west + } + } + ai_chance = { + base = 50 + } + } + + option = { #africa_north + name = fund_inspiration.0051.africa_north + trigger = { exists = scope:africa_north_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:africa_north + } + } + ai_chance = { + base = 50 + } + } + + option = { #africa_east + name = fund_inspiration.0051.africa_east + trigger = { exists = scope:africa_east_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:africa_east + } + } + ai_chance = { + base = 50 + } + } + + option = { #europe + name = fund_inspiration.0051.europe + trigger = { exists = scope:europe_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:europe + } + } + ai_chance = { + base = 50 + } + } + + option = { #europe_north + name = fund_inspiration.0051.europe_north + trigger = { exists = scope:europe_north_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:europe_north + } + } + ai_chance = { + base = 50 + } + } + + option = { #europe_south + name = fund_inspiration.0051.europe_south + trigger = { exists = scope:europe_south_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:europe_south + } + } + ai_chance = { + base = 50 + } + } + + option = { #europe_west + name = fund_inspiration.0051.europe_west + trigger = { exists = scope:europe_west_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:europe_west + } + } + ai_chance = { + base = 50 + } + } + + option = { #europe_east + name = fund_inspiration.0051.europe_east + trigger = { exists = scope:europe_east_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:europe_east + } + } + ai_chance = { + base = 50 + } + } + + option = { #middle_east + name = fund_inspiration.0051.middle_east + trigger = { exists = scope:middle_east_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:middle_east + } + } + ai_chance = { + base = 50 + } + } + + option = { #middle_east_jerusalem + name = fund_inspiration.0051.middle_east_jerusalem + trigger = { exists = scope:middle_east_jerusalem_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:middle_east_jerusalem + } + } + ai_chance = { + base = 50 + } + } + + option = { #middle_east_arabia + name = fund_inspiration.0051.middle_east_arabia + trigger = { exists = scope:middle_east_arabia_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:middle_east_arabia + } + } + ai_chance = { + base = 50 + } + } + + option = { #middle_east_persia + name = fund_inspiration.0051.middle_east_persia + trigger = { exists = scope:middle_east_persia_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:middle_east_persia + } + } + ai_chance = { + base = 50 + } + } + + option = { #india + name = fund_inspiration.0051.india + trigger = { exists = scope:india_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:india + } + } + ai_chance = { + base = 50 + } + } + + option = { #india_deccan + name = fund_inspiration.0051.india_deccan + trigger = { exists = scope:india_deccan_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:india_deccan + } + } + ai_chance = { + base = 50 + } + } + + option = { #india_bengal + name = fund_inspiration.0051.india_bengal + trigger = { exists = scope:india_bengal_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:india_bengal + } + } + ai_chance = { + base = 50 + } + } + + option = { #india_rajastan + name = fund_inspiration.0051.india_rajastan + trigger = { exists = scope:india_rajastan_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:india_rajastan + } + } + ai_chance = { + base = 50 + } + } + + option = { #steppe + name = fund_inspiration.0051.steppe + trigger = { exists = scope:steppe_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:steppe + } + } + ai_chance = { + base = 50 + } + } + + option = { #steppe_west + name = fund_inspiration.0051.steppe_west + trigger = { exists = scope:steppe_west_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:steppe_west + } + } + ai_chance = { + base = 50 + } + } + + option = { #steppe_east + name = fund_inspiration.0051.steppe_east + trigger = { exists = scope:steppe_east_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:steppe_east + } + } + ai_chance = { + base = 50 + } + } + + option = { #steppe_tarim + name = fund_inspiration.0051.steppe_tarim + trigger = { exists = scope:steppe_tarim_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:steppe_tarim + } + } + ai_chance = { + base = 50 + } + } + + option = { #asia_minor + name = fund_inspiration.0051.asia_minor + trigger = { exists = scope:asia_minor_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:asia_minor + } + } + ai_chance = { + base = 50 + } + } + + option = { #burma + name = fund_inspiration.0051.burma + trigger = { exists = scope:burma_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:burma + } + } + ai_chance = { + base = 50 + } + } + + option = { #tibet + name = fund_inspiration.0051.tibet + trigger = { exists = scope:tibet_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:tibet + } + } + ai_chance = { + base = 50 + } + } + + option = { #East Asia + name = fund_inspiration.0051.east_asia + trigger = { exists = scope:east_asia_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:east_asia + } + } + ai_chance = { + base = 50 + } + } + + option = { #China + name = fund_inspiration.0051.china + trigger = { exists = scope:china_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:china + } + } + ai_chance = { + base = 50 + } + } + + option = { #Korea + name = fund_inspiration.0051.korea + trigger = { exists = scope:korea_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:korea + } + } + ai_chance = { + base = 50 + } + } + + option = { #Japan + name = fund_inspiration.0051.japan + trigger = { exists = scope:japan_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:japan + } + } + ai_chance = { + base = 50 + } + } + + option = { #Southeast Asia + name = fund_inspiration.0051.southeast_asia + trigger = { exists = scope:southeast_asia_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:southeast_asia + } + } + ai_chance = { + base = 50 + } + } + + option = { #Go where you want to go! + name = fund_inspiration.0051.d + custom_tooltip = fund_inspiration.they_decide_option_tt + set_adventure_location_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_DESTINATION = no + } + + ai_chance = { + base = 5 + modifier = { + add = 25 + OR = { + has_trait = arbitrary + has_trait = lazy + } + } + } + } +} + +# Adventure - Destination already chosen +# by Linnéa Thimrén +fund_inspiration.0052 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + inspiration_owner = { #They have already decided where to go + exists = var:adventure_destination + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + set_variable = gone_adventuring + } + send_interface_toast = { + title = fund_inspiration.0052.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + + +# Adventure maintenance, to make sure the inspiration progresses and to trigger the completion event + +scripted_effect fund_adventure_inspiration_travel_progress_effect = { + if = { # Africa + limit = { + var:adventure_destination = flag:africa + } + random_county_in_region = { + region = world_africa + title_province = { save_scope_as = location } + } + } + else_if = { # West Africa + limit = { + var:adventure_destination = flag:africa_west + } + random_county_in_region = { + region = world_africa_west + title_province = { save_scope_as = location } + } + } + else_if = { # North Africa + limit = { + var:adventure_destination = flag:africa_north + } + random_county_in_region = { + region = world_africa_north + title_province = { save_scope_as = location } + } + } + else_if = { # East Africa + limit = { + var:adventure_destination = flag:africa_east + } + random_county_in_region = { + region = world_africa_east + title_province = { save_scope_as = location } + } + } + else_if = { # Europe + limit = { + var:adventure_destination = flag:europe + } + random_county_in_region = { + region = world_europe + title_province = { save_scope_as = location } + } + } + else_if = { # North Europe + limit = { + var:adventure_destination = flag:europe_north + } + random_county_in_region = { + region = world_europe_north + title_province = { save_scope_as = location } + } + } + else_if = { # South Europe + limit = { + var:adventure_destination = flag:europe_south + } + random_county_in_region = { + region = world_europe_south + title_province = { save_scope_as = location } + } + } + else_if = { # West Europe + limit = { + var:adventure_destination = flag:europe_west + } + random_county_in_region = { + region = world_europe_west + title_province = { save_scope_as = location } + } + } + else_if = { # East Europe + limit = { + var:adventure_destination = flag:europe_east + } + random_county_in_region = { + region = world_europe_east + title_province = { save_scope_as = location } + } + } + else_if = { # Middle East + limit = { + var:adventure_destination = flag:middle_east + } + random_county_in_region = { + region = world_middle_east + title_province = { save_scope_as = location } + } + } + else_if = { # Middle East - Jerusalem + limit = { + var:adventure_destination = flag:middle_east_jerusalem + } + random_county_in_region = { + region = world_middle_east_jerusalem + title_province = { save_scope_as = location } + } + } + else_if = { # Middle East - Arabia + limit = { + var:adventure_destination = flag:middle_east_arabia + } + random_county_in_region = { + region = world_middle_east_arabia + title_province = { save_scope_as = location } + } + } + else_if = { # Middle East - Persia + limit = { + var:adventure_destination = flag:middle_east_persia + } + random_county_in_region = { + region = world_middle_east_persia + title_province = { save_scope_as = location } + } + } + else_if = { # India + limit = { + var:adventure_destination = flag:india + } + random_county_in_region = { + region = world_india + title_province = { save_scope_as = location } + } + } + else_if = { # India - Deccan + limit = { + var:adventure_destination = flag:india_deccan + } + random_county_in_region = { + region = world_india_deccan + title_province = { save_scope_as = location } + } + } + else_if = { # India - Bengal + limit = { + var:adventure_destination = flag:india_bengal + } + random_county_in_region = { + region = world_india_bengal + title_province = { save_scope_as = location } + } + } + else_if = { # India - Rajastan + limit = { + var:adventure_destination = flag:india_rajastan + } + random_county_in_region = { + region = world_india_rajastan + title_province = { save_scope_as = location } + } + } + else_if = { # The Steppe + limit = { + var:adventure_destination = flag:steppe + } + random_county_in_region = { + region = world_steppe + title_province = { save_scope_as = location } + } + } + else_if = { # The Steppe - West + limit = { + var:adventure_destination = flag:steppe_west + } + random_county_in_region = { + region = world_steppe_west + title_province = { save_scope_as = location } + } + } + else_if = { # The Steppe - East + limit = { + var:adventure_destination = flag:steppe_east + } + random_county_in_region = { + region = world_steppe_east + title_province = { save_scope_as = location } + } + } + else_if = { # The Steppe - Tarim + limit = { + var:adventure_destination = flag:steppe_tarim + } + random_county_in_region = { + region = world_steppe_tarim + title_province = { save_scope_as = location } + } + } + else_if = { # Asia - Minor + limit = { + var:adventure_destination = flag:asia_minor + } + random_county_in_region = { + region = world_asia_minor + title_province = { save_scope_as = location } + } + } + else_if = { # Burma + limit = { + var:adventure_destination = flag:burma + } + random_county_in_region = { + region = world_burma + title_province = { save_scope_as = location } + } + } + else_if = { # Tibet + limit = { + var:adventure_destination = flag:tibet + } + random_county_in_region = { + region = world_tibet + title_province = { save_scope_as = location } + } + } + else_if = { # China + limit = { + var:adventure_destination = flag:east_asia + } + random_county_in_region = { + region = world_asia_east + title_province = { save_scope_as = location } + } + } + else_if = { # China + limit = { + var:adventure_destination = flag:china + } + random_county_in_region = { + region = world_asia_china + title_province = { save_scope_as = location } + } + } + else_if = { # Japan + limit = { + var:adventure_destination = flag:japan + } + random_county_in_region = { + region = world_asia_japan + title_province = { save_scope_as = location } + } + } + else_if = { # Korea + limit = { + var:adventure_destination = flag:korea + } + random_county_in_region = { + region = world_asia_korea + title_province = { save_scope_as = location } + } + } + else_if = { # Southeast Asia + limit = { + var:adventure_destination = flag:southeast_asia + } + random_county_in_region = { + region = world_asia_southeast + title_province = { save_scope_as = location } + } + } + + scope:inspiration_owner = { + set_location = { + location = scope:location + stick_to_location = yes + } + } +} + + +# Triggered from on_progress_increased in the adventurer inspiration script - to mimic progress happening over the years +# by Linnéa Thimrén +fund_inspiration.0053 = { + hidden = yes + + trigger = { + inspiration ?= { + has_inspiration_type = adventure_inspiration + inspiration_sponsor ?= { is_alive = yes } + inspiration_progress < 10 + } + } + + immediate = { + fund_adventure_inspiration_travel_progress_effect = yes #Adventurer moves on to a new location in the targeted region. + } +} + +# Adventure - Fallback to end it all if it's been going on for too long. Triggered from start_adventure_effect +# by Linnéa Thimrén +fund_inspiration.0054 = { + hidden = yes + + trigger = { + inspiration ?= { + has_inspiration_type = adventure_inspiration + inspiration_sponsor ?= { is_alive = yes } + } + } + + on_trigger_fail = { #If something has gone wrong we do some cleanup + if = { + limit = { exists = scope:inspiration } + save_scope_as = inspiration_owner + inspiration_completion_effect = yes + if = { + limit = { exists = scope:inspiration.inspiration_sponsor } + scope:inspiration.inspiration_sponsor = { end_inspiration_sponsorship = scope:inspiration } + } + } + } + + immediate = { + # Send adventurer back home + scope:inspiration_owner = { + set_location_to_default = yes + } + #Finish the inspiration + inspiration = { change_inspiration_progress = 10 } + } +} + + + +# Artisan - Choose what they make +scripted_trigger fund_inspiration_0061_option_chest_trigger = { + NOT = { exists = scope:artisan_type_chest_option } +} +scripted_trigger fund_inspiration_0061_option_box_trigger = { + NOT = { exists = scope:artisan_type_box_option } +} +scripted_trigger fund_inspiration_0061_option_sculpture_trigger = { + NOT = { exists = scope:artisan_type_sculpture_option } +} +scripted_trigger fund_inspiration_0061_option_cabinet_trigger = { + NOT = { exists = scope:artisan_type_cabinet_option } +} +scripted_trigger fund_inspiration_0061_option_throne_trigger = { + NOT = { exists = scope:artisan_type_throne_option } +} +scripted_trigger fund_inspiration_0061_option_scientific_apparatus_trigger = { + # Currently the only available apparatus is DLC-locked - mildly rework this trigger if we add more. + has_fp2_dlc_trigger = yes + # We need to verify that the character is eligible + eligible_for_scientific_apparatus_armillary_sphere_trigger = { CHARACTER = root } + NOT = { exists = scope:artisan_type_scientific_apparatus_option } +} +scripted_trigger fund_inspiration_0061_option_urn_trigger = { + NOT = { exists = scope:artisan_type_urn_option } +} +scripted_trigger fund_inspiration_0061_option_icon_trigger = { + NOT = { exists = scope:artisan_type_icon_option } + faith_is_aniconic_trigger = no +} +scripted_effect fund_inspiration_0061_pick_options_to_show_effect = { + #What options do we show? + hidden_effect = { + random_list = { + 10 = { + trigger = { + fund_inspiration_0061_option_chest_trigger = yes + } + save_scope_value_as = { + name = artisan_type_chest_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0061_option_box_trigger = yes + } + save_scope_value_as = { + name = artisan_type_box_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0061_option_sculpture_trigger = yes + } + save_scope_value_as = { + name = artisan_type_sculpture_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0061_option_cabinet_trigger = yes + } + save_scope_value_as = { + name = artisan_type_cabinet_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0061_option_throne_trigger = yes + } + save_scope_value_as = { + name = artisan_type_throne_option + value = yes + } + } + # DLC options get a boost to make them more visible. + 50 = { + trigger = { + fund_inspiration_0061_option_scientific_apparatus_trigger = yes + } + save_scope_value_as = { + name = artisan_type_scientific_apparatus_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0061_option_urn_trigger = yes + } + save_scope_value_as = { + name = artisan_type_urn_option + value = yes + } + } + 50 = { + trigger = { + fund_inspiration_0061_option_icon_trigger = yes + } + save_scope_value_as = { + name = artisan_type_icon_option + value = yes + } + } + } + } +} + +fund_inspiration.0061 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0061.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = artisan_inspiration + inspiration_owner = { #They haven't already decided what to make + NOT = { exists = var:artifact_artisan_type } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + show_as_tooltip = { + fund_inspiration_effect = yes + } + + # What options should we show? + fund_inspiration_0061_pick_options_to_show_effect = yes + fund_inspiration_0061_pick_options_to_show_effect = yes + fund_inspiration_0061_pick_options_to_show_effect = yes + } + + #Chest + option = { + name = fund_inspiration.0061.chest + trigger = { + exists = scope:artisan_type_chest_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_chest + } + } + ai_chance = { + base = 10 + + } + } + + #Box + option = { + name = fund_inspiration.0061.box + trigger = { + exists = scope:artisan_type_box_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_box + } + } + ai_chance = { + base = 10 + + } + } + + #Sculpture + option = { + name = fund_inspiration.0061.sculpture + trigger = { + exists = scope:artisan_type_sculpture_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_sculpture + } + } + ai_chance = { + base = 10 + } + } + + #Cabinet + option = { + name = fund_inspiration.0061.cabinet + trigger = { + exists = scope:artisan_type_cabinet_option + scope:inspiration_owner = { + NOR = { + artifact_use_indian_building_visuals_trigger = yes + artifact_use_mena_building_visuals_trigger = yes + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_cabinet + } + } + ai_chance = { + base = 10 + + } + } + + #Diwan + option = { + name = fund_inspiration.0061.diwan + trigger = { + exists = scope:artisan_type_cabinet_option + scope:inspiration_owner = { artifact_use_indian_building_visuals_trigger = yes } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_cabinet + } + } + ai_chance = { + base = 10 + + } + } + + #Table + option = { + name = fund_inspiration.0061.table + trigger = { + exists = scope:artisan_type_cabinet_option + scope:inspiration_owner = { artifact_use_mena_building_visuals_trigger = yes } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_cabinet + } + } + ai_chance = { + base = 10 + + } + } + + #Throne + option = { + name = fund_inspiration.0061.throne + trigger = { + exists = scope:artisan_type_throne_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_throne + } + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = throne + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:inspiration_owner = { + artisan_inspiration_average_skill_value < high_inspiration_skill + } + any_character_artifact = { + count >= 2 + artifact_slot_type = throne + } + } + } + } + } + } + + #Scientific Apparatus + option = { + name = fund_inspiration.0061.scientific_apparatus + trigger = { + exists = scope:artisan_type_scientific_apparatus_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + roll_scientific_apparatus_effect = { CHARACTER = root } + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_scientific_apparatus + } + } + ai_chance = { + base = 10 + } + } + + #Urn + option = { + name = fund_inspiration.0061.urn + trigger = { + exists = scope:artisan_type_urn_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_urn + } + } + ai_chance = { + base = 10 + } + } + + #Icon + option = { + name = fund_inspiration.0061.icon + trigger = { + exists = scope:artisan_type_icon_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_icon + } + } + ai_chance = { + base = 10 + } + } +} + +# Artisan - they know what they want to make +# by Linnéa Thimrén +fund_inspiration.0062 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = artisan_inspiration + inspiration_owner = { #They have already decided what to make + exists = var:artifact_artisan_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0062.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + + +# Smith - Choose what they make +# by Linnéa Thimrén +scripted_trigger fund_inspiration_0071_option_brooch_trigger = { + NOT = { exists = scope:smith_type_brooch_option } +} +scripted_trigger fund_inspiration_0071_option_regalia_trigger = { + NOT = { exists = scope:smith_type_regalia_option } +} +scripted_trigger fund_inspiration_0071_option_crown_trigger = { + NOT = { exists = scope:smith_type_crown_option } +} +scripted_trigger fund_inspiration_0071_option_goblet_trigger = { + NOT = { exists = scope:smith_type_goblet_option } +} +scripted_trigger fund_inspiration_0071_option_aquamanile_trigger = { + has_fp2_dlc_trigger = yes + NOT = { exists = scope:smith_type_aquamanile_option } + # These occurred in other faiths too, so we don't restrict their religious usage, but were much more ubiquitous in Islam. + religion = religion:islam_religion +} +scripted_trigger fund_inspiration_0071_option_incense_burner_sculpture_trigger = { + has_fp3_dlc_trigger = yes + NOT = { exists = scope:smith_type_incense_burner_sculpture_option } + # These occurred in other faiths too, so we don't restrict their religious usage, but were much more ubiquitous in Islam. + religion = religion:islam_religion +} +scripted_effect fund_inspiration_0071_pick_options_to_show_effect = { + #What options do we show? + hidden_effect = { + random_list = { + 10 = { + trigger = { + fund_inspiration_0071_option_brooch_trigger = yes + } + save_scope_value_as = { + name = smith_type_brooch_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0071_option_regalia_trigger = yes + } + save_scope_value_as = { + name = smith_type_regalia_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0071_option_crown_trigger = yes + } + save_scope_value_as = { + name = smith_type_crown_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0071_option_goblet_trigger = yes + } + save_scope_value_as = { + name = smith_type_goblet_option + value = yes + } + } + # DLC options get a boost to make them more visible. + 50 = { + trigger = { + fund_inspiration_0071_option_aquamanile_trigger = yes + } + save_scope_value_as = { + name = smith_type_aquamanile_option + value = yes + } + } + 50 = { + trigger = { + fund_inspiration_0071_option_incense_burner_sculpture_trigger = yes + } + save_scope_value_as = { + name = smith_type_incense_burner_sculpture_option + value = yes + } + } + } + } +} + +fund_inspiration.0071 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0071.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = smith_inspiration + inspiration_owner = { #They haven't already decided what to make + NOT = { exists = var:artifact_smith_type } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + show_as_tooltip = { + fund_inspiration_effect = yes + } + + # What options should we show? + fund_inspiration_0071_pick_options_to_show_effect = yes + fund_inspiration_0071_pick_options_to_show_effect = yes + fund_inspiration_0071_pick_options_to_show_effect = yes + } + + #Brooch + option = { + name = fund_inspiration.0071.brooch + trigger = { + exists = scope:smith_type_brooch_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_brooch + } + } + ai_chance = { + base = 10 + + modifier = { + factor = 0 + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = miscellaneous + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:inspiration_owner = { + smith_inspiration_average_skill_value < high_inspiration_skill + } + any_character_artifact = { + count >= 4 + artifact_slot_type = miscellaneous + } + } + } + } + } + } + + #Regalia + option = { + name = fund_inspiration.0071.regalia + trigger = { + exists = scope:smith_type_regalia_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_regalia + } + } + ai_chance = { + base = 10 + + modifier = { + factor = 0 + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = regalia + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:inspiration_owner = { + smith_inspiration_average_skill_value < high_inspiration_skill + } + any_character_artifact = { + count >= 2 + artifact_slot_type = regalia + } + } + } + } + } + } + + #Crown + option = { + name = fund_inspiration.0071.crown + trigger = { + exists = scope:smith_type_crown_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_crown + } + } + ai_chance = { + base = 10 + + modifier = { + factor = 0 + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = helmet + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:inspiration_owner = { + smith_inspiration_average_skill_value < high_inspiration_skill + } + any_character_artifact = { + count >= 2 + artifact_slot_type = helmet + } + } + } + } + } + } + + #Goblet + option = { + name = fund_inspiration.0071.goblet + trigger = { + exists = scope:smith_type_goblet_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_goblet + } + } + ai_chance = { + base = 10 + + } + } + + #Aquamanile + option = { + name = fund_inspiration.0071.aquamanile + trigger = { + exists = scope:smith_type_aquamanile_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_aquamanile + } + } + ai_chance = { + base = 10 + + } + } + + #Incense Burner Sculpture + option = { + name = fund_inspiration.0071.incense_burner_sculpture + trigger = { + exists = scope:smith_type_incense_burner_sculpture_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_incense_burner_sculpture + } + } + ai_chance = { + base = 10 + + } + } +} + +# Smith - they know what they want to make +# by Linnéa Thimrén +fund_inspiration.0072 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = smith_inspiration + inspiration_owner = { #They have already decided what to make + exists = var:artifact_smith_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0072.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + + +# Alchemy - Choose what they make +# by Linnéa Thimrén +scripted_trigger fund_inspiration_0081_option_elixirs_trigger = { + NOT = { exists = scope:alchemy_type_elixirs } +} +scripted_trigger fund_inspiration_0081_option_metals_trigger = { + NOT = { exists = scope:alchemy_type_metals } +} +scripted_trigger fund_inspiration_0081_option_panacea_trigger = { + NOT = { exists = scope:alchemy_type_panacea } +} +scripted_trigger fund_inspiration_0081_option_immortality_trigger = { + NOT = { exists = scope:alchemy_type_immortality } +} + +scripted_effect fund_inspiration_0081_pick_options_to_show_effect = { + #What options do we show? + hidden_effect = { + random_list = { + 10 = { + trigger = { + fund_inspiration_0081_option_elixirs_trigger = yes + } + save_scope_value_as = { + name = alchemy_type_elixirs + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0081_option_metals_trigger = yes + } + save_scope_value_as = { + name = alchemy_type_metals + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0081_option_panacea_trigger = yes + } + save_scope_value_as = { + name = alchemy_type_panacea + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0081_option_immortality_trigger = yes + } + save_scope_value_as = { + name = alchemy_type_immortality + value = yes + } + } + } + } +} + +fund_inspiration.0081 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0081.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = alchemy_inspiration + inspiration_owner = { #They haven't already decided what to make + NOT = { exists = var:artifact_alchemy_type } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + assign_quirk_effect = yes + } + + show_as_tooltip = { + fund_inspiration_effect = yes + } + + # What options should we show? + fund_inspiration_0081_pick_options_to_show_effect = yes + fund_inspiration_0081_pick_options_to_show_effect = yes + fund_inspiration_0081_pick_options_to_show_effect = yes + } + + #Elixir + option = { + name = fund_inspiration.0081.elixirs + trigger = { + exists = scope:alchemy_type_elixirs + } + custom_tooltip = fund_inspiration.0081.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type + value = flag:alchemy_type_elixirs + } + } + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = scholar + } + ai_value_modifier = { + ai_boldness = 0.15 + ai_rationality = 0.5 + } + } + } + + #Metals + option = { + name = fund_inspiration.0081.metals + trigger = { + exists = scope:alchemy_type_metals + } + custom_tooltip = fund_inspiration.0081.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type + value = flag:alchemy_type_metals + } + } + ai_chance = { + base = 10 + modifier = { + add = 15 + has_lifestyle = learning_lifestyle + } + ai_value_modifier = { + ai_greed = 0.25 + ai_rationality = 0.15 + ai_boldness = 0.1 + } + } + } + + #Panacea + option = { + name = fund_inspiration.0081.panacea + trigger = { + exists = scope:alchemy_type_panacea + } + custom_tooltip = fund_inspiration.0081.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type + value = flag:alchemy_type_panacea + } + } + ai_chance = { + base = 10 + modifier = { + add = 25 + has_trait = lifestyle_physician + } + modifier = { + add = 15 + has_lifestyle = learning_lifestyle + } + ai_value_modifier = { + ai_zeal = 0.25 + ai_rationality = 0.25 + ai_boldness = -0.15 + ai_greed = -0.15 + } + } + } + + #Immortality + option = { + name = fund_inspiration.0081.immortality + trigger = { + exists = scope:alchemy_type_immortality + } + custom_tooltip = fund_inspiration.0081.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type + value = flag:alchemy_type_immortality + } + } + ai_chance = { + base = 10 + modifier = { + add = 25 + has_trait = arrogant + } + ai_value_modifier = { + ai_greed = 0.75 + ai_boldness = 0.5 + ai_zeal = -0.25 + ai_rationality = -0.15 + } + } + } + + #They decide + option = { + name = fund_inspiration.0031.f + custom_tooltip = fund_inspiration.0081.they_decide_option_tt + hidden_effect = { + set_alchemy_inspiration_type_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_TYPE = no + } + } + ai_chance = { + base = 0 + } + } +} + +# Alchemy - they know what they want to make +# by Linnéa Thimrén +fund_inspiration.0082 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = alchemy_inspiration + inspiration_owner = { #They have already decided what to make + exists = var:artifact_alchemy_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0082.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + +#Fund Inspiration: Bow - Choose your item +fund_inspiration.0091 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0091.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = bow_inspiration + } + scope:inspiration_owner = { NOT = { exists = var:artifact_bow_type } } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + + save_scope_as = actor + scope:inspiration_owner = { + assign_quirk_effect = yes + save_scope_as = recipient + } + + } + + # bow + option = { + name = fund_inspiration.0091.a + scope:inspiration_owner = { + set_variable = { + name = artifact_bow_type + value = flag:artifact_bow_type_bow + } + custom_tooltip = fund_inspiration.0091.tooltip_bow.tt + } + ai_chance = { + base = 50 + } + } + + # longbow + option = { + name = fund_inspiration.0091.b + trigger = { + OR = { + scope:inspiration_owner.culture = { has_cultural_tradition = tradition_longbow_competitions } + culture = { has_cultural_tradition = tradition_longbow_competitions } + } + } + scope:inspiration_owner = { + set_variable = { + name = artifact_bow_type + value = flag:artifact_bow_type_longbow + } + custom_tooltip = fund_inspiration.0091.tooltip_longbow.tt + } + ai_chance = { + base = 50 + } + } + + # composite bow + option = { + trigger = { + OR = { + scope:inspiration_owner.culture = { is_composite_bow_culture_trigger = yes } + culture = { is_composite_bow_culture_trigger = yes } + } + } + name = fund_inspiration.0091.c + scope:inspiration_owner = { + set_variable = { + name = artifact_bow_type + value = flag:artifact_bow_type_composite + } + custom_tooltip = fund_inspiration.0091.tooltip_composite.tt + } + ai_chance = { + base = 50 + } + } + + # crossbow + option = { + name = fund_inspiration.0091.d + trigger = { + OR = { + scope:inspiration_owner.culture = { has_innovation = innovation_advanced_bowmaking } + culture = { has_innovation = innovation_advanced_bowmaking } + } + } + scope:inspiration_owner = { + set_variable = { + name = artifact_bow_type + value = flag:artifact_bow_type_crossbow + } + custom_tooltip = fund_inspiration.0091.tooltip_crossbow.tt + } + } + + # default option of "do what you want" + option = { + name = fund_inspiration.0031.f + hidden_effect = { #If they haven't specified what they're gonna make we decide it here + set_bow_artifact_type_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_TYPE = no + } + } + custom_tooltip = fund_inspiration.they_decide_option_tt + ai_chance = { + base = 25 + modifier = { + add = 25 + has_trait = arbitrary + } + } + } +} + +# Bow - they know what they want to make +fund_inspiration.0092 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = bow_inspiration + inspiration_owner = { #They know what weapon they want to make + exists = var:artifact_weapon_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0012.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + +################################################## +# Inspiration: complete! +# by Linnéa Thimrén +# 1001-2000 +################################################## + +# Fallback version - very generic +# by Linnéa Thimrén +fund_inspiration.1001 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1001.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:tapestry + } + desc = artifact_wall_tapestry_description + } + triggered_desc = { + trigger = { + exists = scope:small_hide + } + desc = artifact_small_hide_description + } + desc = artifact_crown_description + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + if = { + limit = { + has_character_flag = trigger_tapestry_completion_event + } + remove_character_flag = trigger_tapestry_completion_event + create_artifact_tapestry_effect = { + OWNER = root + WEAVER = scope:inspiration_owner + } + save_scope_value_as = { + name = tapestry + value = yes + } + } + else_if = { + limit = { + has_character_flag = trigger_banner_completion_event + } + remove_character_flag = trigger_banner_completion_event + if = { + limit = { + scope:inspiration_owner = { has_variable = artifact_banner_type } + } + switch = { + trigger = scope:inspiration_owner.var:artifact_banner_type + flag:dynasty = { + root = { set_variable = banner_from_dynasty } + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.dynasty + } + } + flag:house = { + root = { set_variable = banner_from_house } + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.house + } + } + flag:title = { + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.primary_title + } + } + } + scope:inspiration_owner = { remove_variable = artifact_banner_type } + } + save_scope_value_as = { + name = banner + value = yes + } + } + else_if = { + limit = { + has_character_flag = trigger_adventure_completion_event + } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = scope:inspiration_owner + LEGENDARY = no + ANIMAL = flag:none + } + save_scope_value_as = { + name = small_hide + value = yes + } + } + else = { + create_artifact_crown_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = crown + value = yes + } + } + #Inscribe your family motto + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + exists = scope:tapestry + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_woven + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + } + + # + option = { + name = fund_inspiration.1001.a + if = { + limit = { + exists = scope:tapestry + } + custom_tooltip = create_artifact_tapestry_tooltip + } + else_if = { + limit = { + exists = scope:banner + } + custom_tooltip = create_artifact_banner_tooltip + } + else_if = { + limit = { + exists = scope:small_hide + } + custom_tooltip = create_artifact_small_hide_tooltip + } + else = { + custom_tooltip = create_artifact_crown_tooltip #Fallback never shown + } + } + + after = { + inspiration_completion_effect = yes + } +} + + +# Weapon artifact +# by Linnéa Thimrén +fund_inspiration.1011 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1011.desc + first_valid = { + triggered_desc = { + trigger = { + scope:weapon_type = flag:artifact_weapon_type_axe + } + desc = artifact_axe_description + } + triggered_desc = { + trigger = { + scope:weapon_type = flag:artifact_weapon_type_dagger + } + desc = artifact_dagger_description + } + triggered_desc = { + trigger = { + scope:weapon_type = flag:artifact_weapon_type_hammer + } + desc = artifact_hammer_description + } + triggered_desc = { + trigger = { + scope:weapon_type = flag:artifact_weapon_type_mace + } + desc = artifact_mace_description + } + triggered_desc = { + trigger = { + scope:weapon_type = flag:artifact_weapon_type_spear + } + desc = artifact_spear_description + } + triggered_desc = { + trigger = { + AND = { + scope:newly_created_artifact = { + has_variable = replica_sassanian_sword + OR = { + rarity = famed + rarity = illustrious + } + } + } + } + desc = famed_replica_sassanian_sword_description + } + triggered_desc = { + trigger = { + scope:newly_created_artifact = { + has_variable = replica_sassanian_sword + rarity = masterwork + } + } + desc = masterwork_replica_sassanian_sword_description + } + triggered_desc = { + trigger = { + scope:newly_created_artifact = { + has_variable = replica_sassanian_sword + rarity = common + } + } + desc = common_replica_sassanian_sword_description + } + desc = artifact_sword_description + } + } + theme = inspiration_complete + override_background = { reference = armory } + left_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { scope:weapon_type = flag:artifact_weapon_type_axe } + animation = marshal_axe + } + triggered_animation = { + trigger = { scope:weapon_type = flag:artifact_weapon_type_dagger } + animation = marshal_dagger + } + triggered_animation = { + trigger = { scope:weapon_type = flag:artifact_weapon_type_hammer } + animation = celebrate_hammer + } + triggered_animation = { + trigger = { scope:weapon_type = flag:artifact_weapon_type_mace } + animation = marshal_mace + } + triggered_animation = { + trigger = { scope:weapon_type = flag:artifact_weapon_type_spear } + animation = throne_room_two_handed_passive_1 + } + animation = marshal + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_weapon_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_weapon_completion_event + + create_artifact_weapon_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_WEAPON_TYPE = flag:no #Decided in the effect based on the variable saved on the inspiration owner + } + # Add a dedication to the description - fund_inspiration.7001 + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_h + } + } + #Inscribe your family motto + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_inscribed + } + } + } + + option = { + name = fund_inspiration.1001.a + custom_tooltip = create_artifact_weapon_tooltip + } +} + + +# Armor artifact +# by Linnéa Thimrén +fund_inspiration.1021 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = { + random_valid = { + desc = fund_inspiration.1021.desc_opening_1 + desc = fund_inspiration.1021.desc_opening_2 + } + } + desc = fund_inspiration.1021.desc + triggered_desc = { + trigger = { + NOT = { + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_shield + } + } + desc = artifact_armor_description + } + triggered_desc = { + trigger = { + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_shield + } + desc = artifact_wall_shield_description + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = marshal_shield + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_armor_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_armor_completion_event + + if = { + limit = { + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_shield + } + if = { + limit = { + exists = house + } + house = { + save_scope_as = coa_target + } + } + else = { + primary_title = { + save_scope_as = coa_target + } + } + create_artifact_wall_shield_effect = { + OWNER = root + TARGET = scope:coa_target + CREATOR = scope:inspiration_owner + } + } + else = { + create_artifact_armor_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_ARMOR_TYPE = flag:no #Decided in the effect based on the variable saved on the inspiration owner + } + } + # Add a dedication to the description - fund_inspiration.7001 + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_h + } + } + #Inscribe your family motto + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_inscribed + } + } + } + + option = { + name = fund_inspiration.1021.a + custom_tooltip = create_artifact_armor_tooltip + } +} + +# Book artifact +# by Linnéa Thimrén +fund_inspiration.1031 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = { + desc = fund_inspiration.1031.desc_opening + first_valid = { + triggered_desc = { + trigger = { + OR = { + AND = { + scope:newly_created_artifact = { has_artifact_feature = book_subject_witch } + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = root } + } + AND = { + scope:newly_created_artifact = { has_artifact_feature = book_subject_cannibal } + trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = root } + } + AND = { + scope:newly_created_artifact = { has_artifact_feature = book_subject_deviant } + trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = root } + } + } + } + desc = fund_inspiration.1031.desc_crime + } + triggered_desc = { + trigger = { # Soulmate has passed away :( + exists = scope:portrait_2_soulmate + exists = scope:soulmate + scope:soulmate = { is_alive = no } + } + desc = fund_inspiration.1031.desc_soulmate_died + } + triggered_desc = { + trigger = { # Nemesis has passed away + exists = scope:portrait_2_nemesis + exists = scope:nemesis + scope:nemesis = { is_alive = no } + } + desc = fund_inspiration.1031.desc_nemesis_died + } + triggered_desc = { + trigger = { # Cat has passed away + scope:newly_created_artifact = { has_artifact_feature = book_subject_animals } + exists = scope:topic + scope:topic = flag:animals_your_cat + OR = { + AND = { #No cat at all + NOT = { + any_owned_story = { type = story_cycle_pet_cat } + } + } + AND = { #New cat + any_owned_story = { type = story_cycle_pet_cat } + exists = var:story_cycle_cat_name + exists = scope:inspiration_owner.var:book_topic_cat_name + NOT = { + var:story_cycle_cat_name = scope:inspiration_owner.var:book_topic_cat_name + } + } + } + } + desc = fund_inspiration.1031.desc_cat_died + } + triggered_desc = { + trigger = { # Dog has passed away + scope:newly_created_artifact = { has_artifact_feature = book_subject_animals } + exists = scope:topic + scope:topic = flag:animals_your_dog + OR = { + NOT = { #No dog at all + any_owned_story = { type = story_cycle_pet_dog } + } + AND = { #New dog + any_owned_story = { type = story_cycle_pet_dog } + exists = var:story_cycle_dog_name + exists = scope:inspiration_owner.var:book_topic_dog_name + NOT = { + var:story_cycle_dog_name = scope:inspiration_owner.var:book_topic_dog_name + } + } + } + } + desc = fund_inspiration.1031.desc_dog_died + } + triggered_desc = { + trigger = { + scope:book_content_quality < 40 + } + desc = fund_inspiration.1031.desc_low_content_quality + } + desc = fund_inspiration.1031.desc + } + } + desc = artifact_book_description + } + theme = inspiration_complete + override_background = { reference = study } + left_portrait = { + character = scope:inspiration_owner + animation = happy_teacher + } + right_portrait = { + trigger = { exists = scope:portrait_2 } + character = scope:portrait_2 + triggered_animation = { + trigger = { + exists = scope:soulmate + scope:portrait_2 = scope:soulmate + } + animation = flirtation_left + } + triggered_animation = { + trigger = { + exists = scope:nemesis + scope:portrait_2 = scope:nemesis + } + animation = anger + } + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_book_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_book_completion_event + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:no #Will be handled in the effect itself + SET_TOPIC = flag:no #Will be handled in the effect itself + } + if = { + limit = { + exists = scope:newly_created_artifact + scope:newly_created_artifact = { has_artifact_feature = book_subject_relationship } + exists = scope:topic + scope:topic = flag:soulmate + exists = scope:soulmate + } + scope:soulmate = { + save_scope_as = portrait_2 + } + save_scope_value_as = { + name = portrait_2_soulmate + value = yes + } + } + else_if = { + limit = { + exists = scope:newly_created_artifact + scope:newly_created_artifact = { has_artifact_feature = book_subject_relationship } + exists = scope:topic + scope:topic = flag:nemesis + exists = scope:nemesis + } + scope:nemesis = { + save_scope_as = portrait_2 + } + save_scope_value_as = { + name = portrait_2_nemesis + value = yes + } + } + #Inscribe your family motto + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_written + } + } + # Inscribe dedication - fund_inspiration.7001 + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_h + } + } + } + + option = { + name = fund_inspiration.1031.a + custom_tooltip = create_artifact_book_tooltip + if = { #If you wrote about your soulmate they'll love it! + limit = { + exists = scope:portrait_2_soulmate + scope:soulmate = { is_alive = yes } + } + scope:soulmate = { + add_opinion = { + target = root + modifier = love_opinion + opinion = 40 + } + show_as_tooltip = { + add_prestige = medium_prestige_gain + } + trigger_event = fund_inspiration.1032 + } + } + if = { #If you wrote about your nemesis they'll hate it! + limit = { + exists = scope:portrait_2_nemesis + scope:nemesis = { is_alive = yes } + } + scope:nemesis = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -40 + } + show_as_tooltip = { + add_prestige = medium_prestige_loss + } + trigger_event = fund_inspiration.1033 + } + } + } + + after = { + inspiration_completion_effect = yes + } +} + +# Book artifact - notification for soulmate that you wrote a book about them +# by Linnéa Thimrén +fund_inspiration.1032 = { + type = character_event + title = fund_inspiration.1032.t + desc = fund_inspiration.1032.desc + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_sponsor + animation = flirtation + } + + immediate = { + add_prestige = medium_prestige_gain + } + + option = { + name = fund_inspiration.1032.a + } +} + +# Book artifact - notification for nemesis that you wrote a book about them +# by Linnéa Thimrén +fund_inspiration.1033 = { + type = character_event + title = fund_inspiration.1032.t + desc = fund_inspiration.1033.desc + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_sponsor + animation = flirtation + } + + immediate = { + add_prestige = medium_prestige_loss + } + + option = { + name = { + trigger = { + OR = { + dread >= medium_dread + tyranny >= medium_tyranny + } + } + text = fund_inspiration.1033.a_proud + } + name = { + trigger = { + NOR = { + dread >= medium_dread + tyranny >= medium_tyranny + } + } + text = fund_inspiration.1033.a + } + } +} + +# Weaver artifact +# by Sean Hughes +fund_inspiration.1041 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1041.desc + desc = artifact_wall_tapestry_description + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_tapestry_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_tapestry_completion_event + + scope:inspiration_owner = { + if = { + limit = { has_variable = artifact_tapestry_scene } + var:artifact_tapestry_scene = { + save_scope_as = tapestry_scene + } + } + } + create_artifact_tapestry_effect = { + OWNER = root + WEAVER = scope:inspiration_owner + } + #Inscribe your family motto + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + exists = scope:tapestry + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_woven + } + } + # Inscribe dedication - fund_inspiration.7001 + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_h + } + } + } + + option = { + name = fund_inspiration.1001.a + custom_tooltip = create_artifact_tapestry_tooltip + } + + after = { + inspiration_completion_effect = yes + } +} + +# Weaver banner artifact +# by Joe Parkin +fund_inspiration.1042 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1042.desc + first_valid = { + triggered_desc = { + trigger = { scope:target = root.dynasty } + desc = artifact_wall_banner_dynasty_description + } + triggered_desc = { + trigger = { scope:target = root.house } + desc = artifact_wall_banner_house_description + } + desc = artifact_wall_banner_description + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_banner_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_banner_completion_event + if = { + limit = { + scope:inspiration_owner = { has_variable = artifact_banner_type } + } + switch = { + trigger = scope:inspiration_owner.var:artifact_banner_type + flag:dynasty = { + set_variable = banner_from_dynasty + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.dynasty + } + } + flag:house = { + set_variable = banner_from_house + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.house + } + } + flag:title = { + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.primary_title + } + } + } + scope:inspiration_owner = { remove_variable = artifact_banner_type } + } + #Inscribe your family motto + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + exists = scope:tapestry + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_woven + } + } + # Inscribe dedication - fund_inspiration.7001 + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_h + } + } + } + + option = { + name = fund_inspiration.1001.a + custom_tooltip = create_artifact_banner_tooltip + } + + after = { + inspiration_completion_effect = yes + } +} + +#Adventurer Returns +#By Bianca Savazzi and Linnéa Thimrén +fund_inspiration.1051 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:throne + } + desc = fund_inspiration.1051_throne.desc + } + triggered_desc = { + trigger = { + exists = scope:ark_covenant + } + desc = fund_inspiration.1051_ark_covenant.desc + } + triggered_desc = { + trigger = { + exists = scope:cupboard + } + desc = fund_inspiration.1051_cupboard.desc + } + desc = fund_inspiration.1051.desc + } + + first_valid = { + + triggered_desc = { + trigger = { + exists = scope:throne + } + desc = fund_inspiration.1051.desc.epic.throne + } + triggered_desc = { + trigger = { + exists = scope:ark_covenant + } + desc = fund_inspiration.1051.desc.epic.ark + } + triggered_desc = { + trigger = { + exists = scope:cupboard + } + desc = fund_inspiration.1051.desc.epic.cupboard + } + triggered_desc = { + trigger = { + exists = scope:epic + NOT = { exists = scope:cupboard } + NOT = { exists = scope:ark_covenant } + NOT = { exists = scope:throne } + } + desc = fund_inspiration.1051.desc.epic + } + triggered_desc = { + trigger = { + exists = scope:regalia_artifact + } + desc = fund_inspiration.1051.desc.regalia + } + triggered_desc = { + trigger = { + exists = scope:regalia_artifact + } + desc = fund_inspiration.1051.desc.regalia_2 + } + triggered_desc = { + trigger = { + exists = scope:necklace_artifact + } + desc = fund_inspiration.1051.desc.necklace + } + triggered_desc = { + trigger = { + exists = scope:armor_artifact + } + desc = fund_inspiration.1051.desc.armor + } + triggered_desc = { + trigger = { + exists = scope:weapon_artifact + } + desc = fund_inspiration.1051.desc.weapon + } + triggered_desc = { + trigger = { + exists = scope:box + } + desc = fund_inspiration.1051.desc.box + } + triggered_desc = { + trigger = { + exists = scope:skull + } + desc = fund_inspiration.1051.desc.skull + } + triggered_desc = { + trigger = { + exists = scope:goblet + } + desc = fund_inspiration.1051.desc.goblet + } + triggered_desc = { + trigger = { + exists = scope:animal_hide_size + } + desc = fund_inspiration.1051.desc.hide + } + triggered_desc = { + trigger = { + exists = scope:tapestry + } + desc = fund_inspiration.1051.desc.tapestry + } + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = ecstasy + } + artifact = { # To display the artifact in the event-window + trigger = { exists = scope:newly_created_artifact } + target = scope:newly_created_artifact + position = lower_right_portrait + } + + trigger = { + has_character_flag = trigger_adventure_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + inspiration_adventure_create_artifact_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + } + + # Give the occasional third party in the adventurer's story a dummy gender + random_dummy_gender_effect = yes + } + + option = { + name = fund_inspiration.1051.a + trigger = { + NOT = { exists = scope:ark_covenant } + } + # To give the right tooltip + if = { + limit = { + exists = scope:skull + } + custom_tooltip = create_artifact_wall_animal_skull_tooltip + } + else_if = { + limit = { + exists = scope:animal_hide_size + } + custom_tooltip = create_artifact_small_hide_tooltip + } + else_if = { + limit = { + exists = scope:box + } + custom_tooltip = create_artifact_box_tooltip + } + else_if = { + limit = { + exists = scope:goblet + } + custom_tooltip = create_artifact_goblet_tooltip + } + else_if = { + limit = { + exists = scope:tapestry + } + custom_tooltip = create_artifact_tapestry_tooltip + } + else_if = { + limit = { exists = scope:epic } + custom_tooltip = create_artifact_epic_tooltip + set_variable = { + name = one_of_a_kind_var + value = scope:epic + } + } + else_if = { + limit = { + OR = { + exists = scope:weapon_artifact + exists = scope:armor_artifact + exists = scope:necklace_artifact + exists = scope:regalia_artifact + } + } + custom_tooltip = create_artifact_adventure_tooltip + } + } + + option = { + name = fund_inspiration.1051.b + trigger = { + exists = scope:ark_covenant + } + custom_tooltip = create_artifact_adventure_tooltip + } + + after = { + scope:inspiration_owner = { + if = { + limit = { NOT = { has_trait = adventurer } } + add_trait = adventurer + } + } + inspiration_completion_effect = yes + + # Remove the adventuring variable if the inspired character is an adventurer + scope:inspiration_owner = { + if = { + limit = { has_variable = gone_adventuring } + remove_variable = gone_adventuring + } + # Send them back home + set_location_to_default = yes + } + hidden_effect = { + if = { + limit = { exists = scope:artifact_origin } + scope:artifact_origin = { death = { death_reason = death_vanished } } + } + } + } +} + +# Artisan artifact +# by Linnéa Thimrén +fund_inspiration.1061 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1061.desc_floor_bound_artifact + first_valid = { + triggered_desc = { + trigger = { + exists = scope:small_box + } + desc = artifact_box_small_description + } + triggered_desc = { + trigger = { + exists = scope:medium_box + } + desc = artifact_box_medium_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture_chest + } + desc = artifact_chest_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture + faith = { + NOR = { + has_doctrine = tenet_aniconism + religion = religion:islam_religion + } + } + } + desc = artifact_sculpture_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture + faith = { + OR = { + has_doctrine = tenet_aniconism + religion = religion:islam_religion + } + } + } + desc = artifact_sculpture_animal_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture_cabinet + scope:inspiration_owner = { + NOR = { + artifact_use_indian_building_visuals_trigger = yes + artifact_use_mena_building_visuals_trigger = yes + } + } + } + desc = artifact_cabinet_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture_cabinet + scope:inspiration_owner = { artifact_use_indian_building_visuals_trigger = yes } + } + desc = artifact_diwan_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture_cabinet + scope:inspiration_owner = { artifact_use_mena_building_visuals_trigger = yes } + } + desc = artifact_table_description + } + triggered_desc = { + trigger = { + exists = scope:throne + } + desc = artifact_throne_description + } + triggered_desc = { + trigger = { + exists = scope:armillary_sphere + } + desc = fp2_armillary_sphere_desc + } + triggered_desc = { + trigger = { exists = scope:icon } + desc = artifact_icon_description + } + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_artisan_completion_event + trigger_if = { + limit = { scope:inspiration_owner.var:artifact_artisan_type ?= flag:artisan_type_icon } + faith_is_aniconic_trigger = no + } + trigger_else = { always = yes } + } + on_trigger_fail = { + trigger_event = fund_inspiration.1062 + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_artisan_completion_event + + switch = { + trigger = scope:inspiration_owner.var:artifact_artisan_type + flag:artisan_type_chest = { + create_artifact_chest_effect = { + OWNER = root + CARPENTER = scope:inspiration_owner + } + save_scope_value_as = { + name = sculpture_chest + value = yes + } + } + flag:artisan_type_box = { + hidden_effect = { + random_list = { + 50 = { + create_artifact_box_small_effect = { + OWNER = root + CARPENTER = scope:inspiration_owner + } + save_scope_value_as = { + name = small_box + value = yes + } + } + 50 = { + create_artifact_box_medium_effect = { + OWNER = root + CARPENTER = scope:inspiration_owner + } + save_scope_value_as = { + name = medium_box + value = yes + } + } + } + } + } + flag:artisan_type_sculpture = { + create_artifact_sculpture_effect = { + OWNER = root + SCULPTER = scope:inspiration_owner + } + save_scope_value_as = { + name = sculpture + value = yes + } + } + flag:artisan_type_cabinet = { + create_artifact_cabinet_effect = { + OWNER = root + CARPENTER = scope:inspiration_owner + } + save_scope_value_as = { + name = sculpture_cabinet + value = yes + } + } + flag:artisan_type_throne = { + create_artifact_throne_effect = { + OWNER = root + MAKER = scope:inspiration_owner + } + save_scope_value_as = { + name = throne + value = yes + } + } + flag:artisan_type_scientific_apparatus = { + create_artifact_fp2_armillary_sphere_effect = { + OWNER = root + MAKER = scope:inspiration_owner + } + save_scope_value_as = { + name = armillary_sphere + value = yes + } + } + flag:artisan_type_urn = { + create_artifact_urn_effect = { + OWNER = root + POTTER = scope:inspiration_owner + } + save_scope_value_as = { + name = urn + value = yes + } + } + flag:artisan_type_icon = { + create_artifact_icon_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + } + save_scope_value_as = { + name = icon + value = yes + } + } + } + # Add a dedication to the description - fund_inspiration.7001 + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_h + } + } + #Inscribe your family motto + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_inscribed + } + } + } + + # + option = { + name = fund_inspiration.1001.a + custom_tooltip = create_artifact_artisan_tooltip + } +} + +#Let's not make icons for aniconic religions +fund_inspiration.1062 = { + hidden = yes + trigger = { + scope:inspiration_owner.var:artifact_artisan_type ?= flag:artisan_type_icon + faith_is_aniconic_trigger = yes + } + immediate = { + remove_character_flag = trigger_artisan_completion_event + scope:inspiration_owner = { + destroy_inspiration = inspiration + remove_variable ?= artifact_artisan_type + } + send_interface_message = { + type = msg_court_inspiration_neutral + title = fund_inspiration.9001.t + desc = fund_inspiration.9001.t + left_icon = root + right_icon = scope:inspiration_owner + } + } +} + +# Smith artifact +# by Linnéa Thimrén +fund_inspiration.1071 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = { + desc = fund_inspiration.1061.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:brooch + } + desc = artifact_brooch_description + } + triggered_desc = { + trigger = { + exists = scope:regalia + } + desc = artifact_regalia_description + } + triggered_desc = { + trigger = { + exists = scope:crown + } + desc = artifact_crown_description + } + triggered_desc = { + trigger = { + exists = scope:goblet + } + desc = artifact_goblet_description + } + triggered_desc = { + trigger = { + exists = scope:aquamanile + } + desc = fp2_andalusian_aquamanile_desc + } + triggered_desc = { + trigger = { + exists = scope:incense_burner_sculpture + } + desc = fp3_incense_burner_sculpture_desc + } + } + triggered_desc = { + trigger = { + exists = scope:crown + has_character_flag = waiting_for_a_crown + } + desc = fund_inspiration.1071.coronation + } + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_smith_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_smith_completion_event + + if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_brooch + } + create_artifact_brooch_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = brooch + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + create_artifact_regalia_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = regalia + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_crown + } + create_artifact_crown_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = crown + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_goblet + } + random_list = { + 70 = { + trigger = { + has_fp3_dlc_trigger = yes + scope:inspiration_owner = { artifact_should_use_gfx_type_trigger = { TYPE = iranian_building } } + } + create_artifact_persian_drinking_vessel_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + } + 30 = { + create_artifact_goblet_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + } + } + save_scope_value_as = { + name = goblet + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_aquamanile + } + create_artifact_fp2_andalusian_aquamanile_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = aquamanile + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_incense_burner_sculpture + has_fp3_dlc_trigger = yes + } + create_artifact_fp3_incense_burner_sculpture_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = incense_burner_sculpture + value = yes + } + } + # Add a dedication to the description - fund_inspiration.7001 + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_h + } + } + #Inscribe your family motto + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_inscribed + } + } + } + + # + option = { + name = fund_inspiration.1001.a + trigger = { NOT = { has_character_flag = waiting_for_a_crown can_host_activity = activity_coronation } } + custom_tooltip = create_artifact_smith_tooltip + } + + option = { + name = fund_inspiration.1001.b + trigger = { + has_ach_dlc_trigger = yes + has_character_flag = waiting_for_a_crown + } + remove_character_flag = waiting_for_a_crown + + custom_tooltip = create_artifact_smith_tooltip + custom_tooltip = fund_inspiration.1001.b.coronation_ready + open_view_data = { + view = activity_list_detail_host_window + data = activity_type:activity_coronation + player = root + } + } +} + +# Alchemy artifact +# by Linnéa Thimrén +fund_inspiration.1081 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1081.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:immortality + scope:newly_created_artifact = { + has_artifact_feature = elixir_youth + } + } + desc = { + desc = fund_inspiration.1081.immortality_fail_desc_opening + first_valid = { + triggered_desc = { + trigger = { age < 25 } + desc = fund_inspiration.1081.immortality_fail_desc_young + } + desc = fund_inspiration.1081.immortality_fail_desc_old + } + } + } + triggered_desc = { + trigger = { + OR = { + exists = scope:elixirs + exists = scope:immortality + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { age < 25 } + desc = fund_inspiration.1081.elixir_desc_desc_young + } + desc = fund_inspiration.1081.elixir_desc_desc_old + } + } + } + triggered_desc = { + trigger = { + exists = scope:panacea + } + desc = fund_inspiration.1081.panacea_desc + } + triggered_desc = { + trigger = { + exists = scope:metals + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:philosophers_stone + } + desc = fund_inspiration.1081.metals_philosophers_stone_desc + } + triggered_desc = { + trigger = { + exists = scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype + scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype = flag:mercury + } + desc = fund_inspiration.1081.metals_mercury_desc + } + triggered_desc = { + trigger = { + exists = scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype + scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype = flag:arsenic + } + desc = fund_inspiration.1081.metals_arsenic_desc + } + triggered_desc = { + trigger = { + exists = scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype + scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype = flag:gold + } + desc = fund_inspiration.1081.metals_gold_desc + } + triggered_desc = { + trigger = { + exists = scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype + scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype = flag:silver + } + desc = fund_inspiration.1081.metals_silver_desc + } + desc = fund_inspiration.1081.metals_fallback_desc + } + } + } + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:philosophers_stone + } + desc = artifact_philosophers_stone_description + } + triggered_desc = { + trigger = { + OR = { + exists = scope:elixirs + exists = scope:immortality + } + } + desc = artifact_elixir_description + } + triggered_desc = { + trigger = { + exists = scope:metals + } + desc = artifact_book_description + } + triggered_desc = { + trigger = { + exists = scope:panacea + } + desc = artifact_panacea_description + } + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_alchemy_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_alchemy_completion_event + capital_province = { save_scope_as = location } #For artifact creation + if = { + limit = { + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_elixirs + } + create_artifact_elixir_effect = { + OWNER = root + ALCHEMIST = scope:inspiration_owner + } + save_scope_value_as = { + name = elixirs + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_metals + } + scope:inspiration_owner = { + if = { + limit = { + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = lunatic + } + } + random = { + chance = 1 + modifier = { + add = 2 + has_trait = lunatic + } + create_artifact_philosophers_stone_effect = { OWNER = root } + save_scope_value_as = { + name = philosophers_stone + value = yes + } + } + } + if = { + limit = { + NOT = { exists = scope:philosophers_stone } #You didn't roll success on the random above + has_variable = artifact_alchemy_type_metal_subtype + } + if = { + limit = { + var:artifact_alchemy_type_metal_subtype = flag:mercury + } + set_variable = { + name = book_topic_category #To create the book properly + value = flag:mercury + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:mercury + } + remove_variable = artifact_alchemy_type_metal_subtype + } + else_if = { + limit = { + var:artifact_alchemy_type_metal_subtype = flag:arsenic + } + set_variable = { + name = book_topic_category #To create the book properly + value = flag:arsenic + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:arsenic + } + remove_variable = artifact_alchemy_type_metal_subtype + } + else_if = { + limit = { + var:artifact_alchemy_type_metal_subtype = flag:gold + } + set_variable = { + name = book_topic_category #To create the book properly + value = flag:gold + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:gold + } + remove_variable = artifact_alchemy_type_metal_subtype + } + else_if = { + limit = { + var:artifact_alchemy_type_metal_subtype = flag:silver + } + set_variable = { + name = book_topic_category #To create the book properly + value = flag:silver + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:silver + } + remove_variable = artifact_alchemy_type_metal_subtype + } + else = { + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:no + } + } + } + else_if = { #Fallback if you somehow have managed to not set the subtype + limit = { NOT = { exists = scope:philosophers_stone } } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:no + } + } + } + save_scope_value_as = { + name = metals + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_panacea + } + create_artifact_panacea_effect = { + OWNER = root + ALCHEMIST = scope:inspiration_owner + } + save_scope_value_as = { + name = panacea + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_immortality + } + create_artifact_elixir_effect = { + OWNER = root + ALCHEMIST = scope:inspiration_owner + } + save_scope_value_as = { + name = immortality + value = yes + } + } + } + + option = { + name = { + trigger = { + OR = { + exists = scope:elixirs + exists = scope:immortality + } + } + text = fund_inspiration.1081.a_elixirs + } + name = { + trigger = { + NOR = { + exists = scope:elixirs + exists = scope:immortality + } + } + text = fund_inspiration.1081.a + } + if = { + limit = { + OR = { + exists = scope:elixirs + exists = scope:immortality + } + } + custom_tooltip = create_artifact_alchemy_elixir_tooltip + } + else_if = { + limit = { + exists = scope:book + } + custom_tooltip = create_artifact_alchemy_book_tooltip + } + else = { + custom_tooltip = create_artifact_alchemy_tooltip + } + } +} + +# Bow artifact +fund_inspiration.1091 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1091.desc + first_valid = { + triggered_desc = { + trigger = { scope:bow_type = flag:artifact_bow_type_longbow } + desc = artifact_longbow_description + } + triggered_desc = { + trigger = { scope:bow_type = flag:artifact_bow_type_composite } + desc = artifact_composite_description + } + triggered_desc = { + trigger = { scope:bow_type = flag:artifact_bow_type_crossbow } + desc = artifact_crossbow_description + } + desc = artifact_bow_description + } + } + theme = inspiration_complete + override_background = { reference = armory } + left_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { scope:bow_type = flag:artifact_bow_type_longbow } + animation = hunting_longbow_aim_arrow_default + } + triggered_animation = { + trigger = { scope:bow_type = flag:artifact_bow_type_composite } + animation = hunting_shortbow_aim_arrow_default + } + triggered_animation = { + trigger = { scope:bow_type = flag:artifact_bow_type_crossbow } + animation = crossbow + } + animation = hunting_shortbow_aim_arrow_default + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_bow_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_bow_completion_event + + create_artifact_bow_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_BOW_TYPE = flag:no #Decided in the effect based on the variable saved on the inspiration owner + } + # Add a dedication to the description - fund_inspiration.7001 + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_h + } + } + #Inscribe your family motto + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_inscribed + } + } + } + + option = { + name = fund_inspiration.1091.a + custom_tooltip = create_artifact_bow_tooltip + } +} + +################################################## +# Inspiration invalidated +# by Linnéa Thimrén +# 9001-9999 +################################################## + +# The inspired character died +# by Linnéa Thimrén +fund_inspiration.9001 = { + type = character_event + title = fund_inspiration.9001.t + desc = { + desc = fund_inspiration.9001.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:weapon_inspiration + } + desc = fund_inspiration.9001.desc_weapon + } + triggered_desc = { + trigger = { + exists = scope:armor_inspiration + } + desc = fund_inspiration.9001.desc_armor + } + triggered_desc = { + trigger = { + exists = scope:book_inspiration + } + desc = fund_inspiration.9001.desc_book + } + triggered_desc = { + trigger = { + exists = scope:weaver_inspiration + } + desc = fund_inspiration.9001.desc_weaver + } + triggered_desc = { + trigger = { + exists = scope:adventure_inspiration + } + desc = fund_inspiration.9001.desc_adventurer + } + triggered_desc = { + trigger = { + exists = scope:artisan_inspiration + } + desc = fund_inspiration.9001.desc_artisan + } + triggered_desc = { + trigger = { + exists = scope:smith_inspiration + } + desc = fund_inspiration.9001.desc_smith + } + triggered_desc = { + trigger = { + exists = scope:alchemy_inspiration + } + desc = fund_inspiration.9001.desc_alchemy + } + triggered_desc = { + trigger = { + exists = scope:research_inspiration + } + desc = fund_inspiration.9001.desc_research + } + } + } + + theme = realm + left_portrait = scope:inspiration_owner + + trigger = { + scope:inspiration_owner = { + is_alive = no + } + } + + immediate = { + play_music_cue = mx_cue_death + } + + option = { + name = fund_inspiration.9001.a + custom_tooltip = fund_inspiration.9001.a_tt + } +} + +# The inspired character is imprisoned +# by Linnéa Thimrén +fund_inspiration.9002 = { + type = character_event + title = fund_inspiration.9001.t + desc = { + desc = fund_inspiration.9002.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:weapon_inspiration + } + desc = fund_inspiration.9002.desc_weapon + } + triggered_desc = { + trigger = { + exists = scope:armor_inspiration + } + desc = fund_inspiration.9002.desc_armor + } + triggered_desc = { + trigger = { + exists = scope:book_inspiration + } + desc = fund_inspiration.9002.desc_book + } + triggered_desc = { + trigger = { + exists = scope:weaver_inspiration + } + desc = fund_inspiration.9002.desc_weaver + } + triggered_desc = { + trigger = { + exists = scope:adventure_inspiration + } + desc = fund_inspiration.9002.desc_adventurer + } + triggered_desc = { + trigger = { + exists = scope:artisan_inspiration + } + desc = fund_inspiration.9002.desc_artisan + } + triggered_desc = { + trigger = { + exists = scope:smith_inspiration + } + desc = fund_inspiration.9002.desc_smith + } + triggered_desc = { + trigger = { + exists = scope:alchemy_inspiration + } + desc = fund_inspiration.9002.desc_alchemy + } + triggered_desc = { + trigger = { + exists = scope:research_inspiration + } + desc = fund_inspiration.9002.desc_research + } + } + } + theme = realm + left_portrait = scope:inspiration_owner + + trigger = { + scope:inspiration_owner = { + is_imprisoned = yes + } + } + + immediate = { + play_music_cue = mx_cue_death + } + + option = { + name = fund_inspiration.9001.a + custom_tooltip = fund_inspiration.9001.a_tt + } +} + +# The inspired character is no longer courtier of sponsor +# by Linnéa Thimrén +fund_inspiration.9003 = { + type = character_event + title = fund_inspiration.9001.t + desc = { + desc = fund_inspiration.9003.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:weapon_inspiration + } + desc = fund_inspiration.9002.desc_weapon + } + triggered_desc = { + trigger = { + exists = scope:armor_inspiration + } + desc = fund_inspiration.9002.desc_armor + } + triggered_desc = { + trigger = { + exists = scope:book_inspiration + } + desc = fund_inspiration.9002.desc_book + } + triggered_desc = { + trigger = { + exists = scope:weaver_inspiration + } + desc = fund_inspiration.9002.desc_weaver + } + triggered_desc = { + trigger = { + exists = scope:adventure_inspiration + } + desc = fund_inspiration.9002.desc_adventurer + } + triggered_desc = { + trigger = { + exists = scope:artisan_inspiration + } + desc = fund_inspiration.9002.desc_artisan + } + triggered_desc = { + trigger = { + exists = scope:smith_inspiration + } + desc = fund_inspiration.9002.desc_smith + } + triggered_desc = { + trigger = { + exists = scope:alchemy_inspiration + } + desc = fund_inspiration.9002.desc_alchemy + } + triggered_desc = { + trigger = { + exists = scope:research_inspiration + } + desc = fund_inspiration.9002.desc_research + } + } + } + theme = realm + left_portrait = scope:inspiration_owner + + trigger = { + scope:inspiration_owner = { + NOT = { is_courtier_of = scope:inspiration_sponsor } + } + } + + immediate = { + play_music_cue = mx_cue_death + } + + option = { + name = fund_inspiration.9001.a + custom_tooltip = fund_inspiration.9001.a_tt + } +} + +#Adventurer returns prematurely. + +fund_inspiration.9004 = { + type = character_event + title = fund_inspiration.9001.t + desc = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { # Add more descs if there is another reason for the adventurer to prematurely return + has_character_flag = adventurer_stuck_in_swamp + } + } + desc = fund_inspiration.9004.desc_adventurer_stuck_in_swamp + } + desc = fund_inspiration.9004.desc + triggered_desc = { + trigger = { + scope:inspiration_owner = { # Add more descs if there is another reason for the adventurer to prematurely return + has_character_flag = adventurer_tired_of_europe + } + } + desc = fund_inspiration.9004.desc_adventurer_tired_of_europe + } + } + theme = realm + left_portrait = scope:inspiration_owner + + trigger = { + scope:inspiration_owner = { + OR = { + has_character_flag = adventurer_tired_of_europe + has_character_flag = adventurer_stuck_in_swamp + } + } + } + + immediate = { + # Move the adventurer back to their default location + scope:inspiration_owner = { + set_location_to_default = yes + } + end_inspiration_sponsorship = scope:inspiration + } + option = { + name = fund_inspiration.9004.a + custom_tooltip = fund_inspiration.9001.a_tt + scope:inspiration_owner = { + reverse_add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + } + after = { + scope:inspiration_owner = { + remove_character_flag = adventurer_tired_of_europe + remove_character_flag = adventurer_stuck_in_swamp + } + } +} + +#Sponsorship inheritance +# by Joe Parkin + +fund_inspiration.9005 = { + type = character_event + title = fund_inspiration.9005.t + desc = { + desc = fund_inspiration.9005.desc_intro + first_valid = { + triggered_desc = { + trigger = { + any_in_list = { + list = inherited_inspiration_list + count > 1 + } + } + desc = fund_inspiration.9005.desc_multiple + } + desc = fund_inspiration.9005.desc_single + } + } + theme = realm + override_background = { reference = study } + left_portrait = scope:inherited_insp_owner + + trigger = { + age >= 10 + has_royal_court = yes + any_in_list = { + list = inherited_inspiration_list + count >= 1 + NOT = { has_inspiration_type = adventure_inspiration } + } + } + + immediate = { + ordered_in_list = { + list = inherited_inspiration_list + limit = { + NOT = { has_inspiration_type = adventure_inspiration } + } + order_by = inspiration_gold_invested + inspiration_owner = { save_scope_as = inherited_insp_owner } + } + } + + option = { + name = fund_inspiration.9005.a + custom_tooltip = inherited_inspiration_continue_tt + } + + option = { + name = fund_inspiration.9005.b + every_in_list = { + list = inherited_inspiration_list + limit = { + NOT = { has_inspiration_type = adventure_inspiration } + } + root = { end_inspiration_sponsorship = prev } + inspiration_owner = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + custom_tooltip = inherited_inspiration_end_tt + } +} + +################################################## +# Ongoing inspiration events +# by Linnéa Thimrén +# 2001-9000 +################################################## + +# Check used to make sure you're not currently on cooldown for inspiration events (so that we don't spam the player) +# Has to be used in the inspiration_owner's scope! +scripted_trigger has_no_inspiration_event_cooldown = { + NOR = { + has_character_flag = fund_weapon_inspiration_event_cooldown + has_character_flag = fund_armor_inspiration_event_cooldown + has_character_flag = fund_book_inspiration_event_cooldown + has_character_flag = fund_weaver_inspiration_event_cooldown + has_character_flag = fund_adventure_inspiration_event_cooldown + has_character_flag = fund_artisan_inspiration_event_cooldown + has_character_flag = fund_smith_inspiration_event_cooldown + has_character_flag = fund_alchemy_inspiration_event_cooldown + has_character_flag = fund_research_inspiration_event_cooldown + } +} + +# Effect to add appropriate cooldown flag based on the inspiration type +# Has to be used in the inspiration_owner's scope! +scripted_effect add_inspiration_cooldown_flag = { + if = { + limit = { + inspiration = { has_inspiration_type = weapon_inspiration } + } + add_character_flag = { + flag = fund_weapon_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = armor_inspiration } + } + add_character_flag = { + flag = fund_armor_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = book_inspiration } + } + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = weaver_inspiration } + } + add_character_flag = { + flag = fund_weaver_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = adventure_inspiration } + } + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = artisan_inspiration } + } + add_character_flag = { + flag = fund_artisan_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = smith_inspiration } + } + add_character_flag = { + flag = fund_smith_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = alchemy_inspiration } + } + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = research_inspiration } + } + add_character_flag = { + flag = fund_research_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = bow_inspiration } + } + add_character_flag = { + flag = fund_bow_inspiration_event_cooldown + days = { 30 60 } + } + } +} + + +# Inspiration owner asks for more money +# by Linnéa Thimrén +fund_inspiration.2001 = { + type = character_event + title = fund_inspiration.2001.t + desc = fund_inspiration.2001.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = beg + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + is_available_ai_adult = yes + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + NOT = { has_character_flag = had_event_fund_inspiration_2001 } + NOT = { has_character_flag = local_artisan } # Should not trigger if you commissioned the artifact + has_no_inspiration_event_cooldown = yes + NOT = { exists = var:artifact_armor_type } #Armor has it's own event (fund_inspiration.2021) + } + scope:inspiration = { + NOT = { has_inspiration_type = adventure_inspiration } #Doesn't really make sense for them to come asking for money once they are out adventuring + inspiration_progress > 1 # To prevent the inspired character from asking for gold immediately + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + scope:inspiration_owner = { + ai_greed >= medium_positive_greed + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2001 + years = 20 + } + add_inspiration_cooldown_flag = yes + } + } + + option = { # Sure, have the money + name = fund_inspiration.2001.a + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration = { + invest_gold = 50 + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + if = { + limit = { + scope:inspiration = { + has_inspiration_type = book_inspiration + } + } + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } + } + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = -50 + short_term_gold < 50 + } + } + } + + option = { #No! + name = fund_inspiration.2001.b + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -20 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } +} + +# Inspiration owner asks for more... human materials +# by Bianca Savazzi +scripted_effect payment_to_improve_quality_fund_inspiration_2002_scripted_effect = { + if = { #To make sure that the inspiration hasn't been removed + limit = { exists = scope:inspiration } + scope:inspiration = { + invest_gold = 50 + } + improve_quality_fund_inspiration_2002_scripted_effect = yes + } +} + +scripted_effect improve_quality_fund_inspiration_2002_scripted_effect = { + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + scope:inspiration = { has_inspiration_type = book_inspiration } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + change_artifact_book_content_quality_effect = { AMOUNT = 4 } + } + } +} + +fund_inspiration.2002 = { + type = character_event + title = fund_inspiration.2002.t + desc = { + desc = fund_inspiration.2002.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:inspiration_owner.var:book_subject = flag:medicine + scope:inspiration_owner.var:book_subject = flag:cannibal + scope:inspiration_owner.var:book_subject = flag:torturer + AND = { + exists = scope:inspiration_owner.var:book_topic_category + scope:inspiration_owner.var:book_topic_category = flag:intrigue_scheme + } + AND = { + exists = scope:inspiration_owner.var:book_topic + scope:inspiration_owner.var:book_topic = flag:punishment + } + } + NOT = { has_trait = blind } + } + desc = fund_inspiration.2002.desc.fingernails + } + triggered_desc = { + trigger = { + OR = { + scope:inspiration_owner.var:book_subject = flag:witch + scope:inspiration_owner.var:book_subject = flag:herbalist + } + NOT = { has_trait = blind } + } + desc = fund_inspiration.2002.desc.potions + } + desc = fund_inspiration.2002.desc.blind # Fallback & blind version + } + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = schadenfreude + } + + trigger = { + exists = scope:inspiration + is_adult = yes + scope:inspiration_owner = { + is_available_ai_adult = yes + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + NOT = { has_character_flag = had_event_fund_inspiration_2002 } + has_no_inspiration_event_cooldown = yes + exists = var:book_subject + } + + OR = { + scope:inspiration_owner.var:book_subject = flag:medicine + scope:inspiration_owner.var:book_subject = flag:cannibal + scope:inspiration_owner.var:book_subject = flag:torturer + AND = { + exists = scope:inspiration_owner.var:book_topic_category + scope:inspiration_owner.var:book_topic_category = flag:intrigue_scheme + } + AND = { + exists = scope:inspiration_owner.var:book_topic + scope:inspiration_owner.var:book_topic = flag:punishment + } + scope:inspiration_owner.var:book_subject = flag:witch + scope:inspiration_owner.var:book_subject = flag:herbalist + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + scope:inspiration_owner = { + has_trait = sadistic + } + } + + # Based on ai_rationality (Only highly irrational characters should even consider this option) + modifier = { + add = { + scope:inspiration_owner = { + value = ai_rationality + if = { + limit = { + has_trait = wrathful + } + subtract = medium_negative_ai_value # Though Wrathful does has a low ai_rationality score, that's not *quite* the personality we're looking for here. + } + if = { + limit = { + has_trait = paranoid + } + subtract = medium_negative_ai_value # Same goes for Paranoid + } + if = { + limit = { + OR = { + has_trait = arbitrary + has_trait = fickle + } + } + add = low_negative_ai_value # Arbitrary and/or fickle characters are more likely to entertain this than their 'ai_rationality' would suggest. + } + multiply = -5 + } + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2002 + years = 20 + } + add_inspiration_cooldown_flag = yes + } + + # Check and save prisoner for option A + if = { + limit = { + any_prisoner = { + is_adult = yes + is_in_prison_type = dungeon + is_imprisoned_by = root + } + } + random_prisoner = { + limit = { + is_adult = yes + is_in_prison_type = dungeon + is_imprisoned_by = root + } + save_scope_as = prisoner_for_material + } + } + + #Check and save the scope of a foreign neighbouring county for option C + if = { + limit = { + exists = capital_county #safety check that character is landed + capital_county = { holder = root } + } + + capital_county = { + if = { + limit = { + any_neighboring_county = { + holder = { + this != root + liege = { this != root } + is_ai = yes + } + } + } + + random_neighboring_county = { + limit = { + holder = { + is_ai = yes + this != root + liege = { this != root } + } + } + save_scope_as = neighbouring_county_for_material + } + } + } + } + } + + option = { # use prisoners in dungeon + name = fund_inspiration.2002.a + trigger = { + exists = scope:prisoner_for_material + } + + execute_prisoner_effect = { + VICTIM = scope:prisoner_for_material + EXECUTIONER = scope:inspiration_owner + } + improve_quality_fund_inspiration_2002_scripted_effect = yes + + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = torturer #torturers are happy to cause more misery + } + modifier = { + add = 25 + OR = { + has_trait = sadistic + ai_compassion <= low_negative_compassion + } + } + modifier = { + add = -25 + ai_compassion >= low_positive_compassion + } + modifier = { + add = -50 + ai_compassion >= medium_positive_compassion + } + } + } + + option = { #some money to kidnap + name = fund_inspiration.2002.b + + payment_to_improve_quality_fund_inspiration_2002_scripted_effect = yes + + capital_county = { + add_county_modifier = { + modifier = fund_inspiration_missing_peasants_modifier + years = 15 + } + } + + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = arrogant #views others, esp peasants, as lower than them + } + modifier = { + add = 25 + OR = { + has_trait = sadistic + ai_compassion <= low_negative_compassion + } + } + modifier = { + add = -25 + has_trait = greedy #this option costs money... money that look better in my coffers... + } + modifier = { + add = -25 + ai_compassion >= low_positive_compassion + } + modifier = { + add = -50 + ai_compassion >= medium_positive_compassion + } + } + } + + option = { #kidnap some foreign peasants + name = fund_inspiration.2002.c + trigger = { + exists = scope:neighbouring_county_for_material + } + + scope:neighbouring_county_for_material = { + add_county_modifier = { + modifier = fund_inspiration_missing_peasants_modifier + years = 15 + } + holder = { + duel = { + skill = intrigue + target = root + 10 = { + desc = fund_inspiration.2002.toast_outcome.positive + send_interface_toast = { + title = fund_inspiration.2002.toast_outcome.positive + left_icon = scope:neighbouring_county_for_material.holder + } + } + 10 = { + desc = fund_inspiration.2002.toast_outcome.negative + send_interface_toast = { + title = fund_inspiration.2002.toast_outcome.negative + left_icon = scope:neighbouring_county_for_material.holder + scope:neighbouring_county_for_material.holder = { + progress_towards_rival_effect = { + REASON = rival_kidnapped_peasants + CHARACTER = root + OPINION = -50 + } + } + } + } + } + } + } + payment_to_improve_quality_fund_inspiration_2002_scripted_effect = yes + ai_chance = { + base = 50 + modifier = { + add = 25 + OR = { + has_trait = sadistic + ai_compassion <= low_negative_compassion + } + } + modifier = { + add = -25 + has_trait = just #it's not right to involve another country's peasants in this + } + modifier = { + add = -25 + has_trait = diplomat #this is a recipe for a diplomatic disaster + } + modifier = { + add = -25 + ai_compassion >= low_positive_compassion + } + modifier = { + add = -50 + ai_compassion >= medium_positive_compassion + } + } + } + + option = { #No! + name = fund_inspiration.2002.d + + ai_chance = { + base = 50 + modifier = { + add = 25 + ai_compassion >= low_positive_compassion + } + modifier = { + add = 50 + ai_compassion >= medium_positive_compassion + } + modifier = { + add = 25 + faith = { + has_doctrine_parameter = pacifist_opinion_active + } + } + } + } +} + +# Previously inspiration owner is bothering the current one in their creation +# by Bianca Savazzi +fund_inspiration.2003 = { + type = character_event + title = fund_inspiration.2003.t + desc = fund_inspiration.2003.desc + + theme = realm + override_background = { + reference = courtyard + } + left_portrait = { + character = scope:inspiration_owner + animation = dismissal + } + + right_portrait = { + character = scope:previous_inspired + animation = beg + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + is_available_ai_adult = yes + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + NOT = { has_character_flag = had_event_fund_inspiration_2003 } + NOT = { has_character_flag = local_artisan } + has_no_inspiration_event_cooldown = yes + inspiration = { #Since they're away adventuring + NOT = { has_inspiration_type = adventure_inspiration } + } + } + any_courtier = { + this != scope:inspiration_owner + is_available_ai_adult = yes + has_completed_inspiration = yes + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2003 + years = 20 + } + add_inspiration_cooldown_flag = yes + } + + random_courtier = { + limit = { + this != scope:inspiration_owner + is_available_ai_adult = yes + has_completed_inspiration = yes + } + weight = { + base = 1 + modifier = { + add = 2 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 1 + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = previous_inspired + } + } + + #You try to convince them to listen + option = { + name = fund_inspiration.2003.a + + duel = { + skill = diplomacy + target = scope:inspiration_owner + 10 = { + desc = fund_inspiration.2003.toast_outcome.positive + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.2003.toast_outcome.positive + left_icon = root + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + 20 = { + desc = fund_inspiration.2003.toast_outcome.refusal + send_interface_toast = { + title = fund_inspiration.2003.toast_outcome.refusal + left_icon = root + scope:inspiration_owner = { + progress_towards_rival_effect = { + REASON = rival_dispute_inspiration + CHARACTER = root + OPINION = 0 + } + progress_towards_rival_effect = { + CHARACTER = scope:previous_inspired + REASON = rival_dispute_inspiration + OPINION = -30 + } + } + } + } + } + + ai_chance = { + base = 50 + modifier = { + add = -25 + ai_compassion <= low_negative_compassion + } + modifier = { + add = -25 + has_trait = shy #don't wanna talk... + } + modifier = { + add = 25 + OR = { + has_trait = diplomat #let's talk things out + has_trait = gregarious + has_trait = patient + AND = { + has_education_diplomacy_trigger = yes + diplomacy > medium_skill_rating + } + } + } + modifier = { + add = 25 + ai_compassion >= low_positive_compassion + } + } + } + + #You give feedback on their feedback + option = { + name = fund_inspiration.2003.b + + duel = { + skill = learning + target = scope:previous_inspired + 10 = { + desc = fund_inspiration.2003.toast_outcome.positive + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.2003.toast_outcome.positive + left_icon = root + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + 20 = { + desc = fund_inspiration.2003.toast_outcome.negative + send_interface_toast = { + title = fund_inspiration.2003.toast_outcome.negative + left_icon = root + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -2 } + } + } + } + } + ai_chance = { + base = 50 + modifier = { + add = -15 + ai_rationality <= low_negative_ai_value + } + modifier = { + add = 25 + OR = { + has_trait = scholar #smart + AND = { + has_education_learning_trigger = yes + learning > medium_skill_rating + } + } + } + modifier = { + add = 25 + ai_rationality >= low_positive_ai_value + } + } + } + + # Tell them off + option = { + name = fund_inspiration.2003.c + scope:previous_inspired = { + progress_towards_rival_effect = { + REASON = rival_dispute_inspiration + CHARACTER = scope:inspiration_owner + OPINION = 0 + } + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + progress_towards_friend_effect = { + CHARACTER = scope:inspiration_owner + OPINION = 30 + REASON = friend_new_inspiration_owner + } + + stress_impact = { + wrathful = medium_stress_loss + irritable = medium_stress_loss + shy = minor_stress_gain + compassionate = medium_stress_gain + } + + ai_chance = { + base = 50 + modifier = { + add = 15 + ai_rationality <= low_negative_ai_value + } + modifier = { + add = 15 + ai_compassion <= low_negative_compassion + } + modifier = { + add = 25 + OR = { + has_trait = wrathful + has_trait = callous + has_trait = irritable + has_trait = impatient + } + } + modifier = { + add = 25 + ai_rationality >= low_positive_ai_value + } + } + } +} + +# A merchant selling high-quality materials is in town +# by Linnéa Thimrén +fund_inspiration.2004 = { + type = character_event + title = fund_inspiration.2004.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + # For artifacts that use metal in some way + scope:inspiration = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = smith_inspiration + has_inspiration_type = armor_inspiration + } + } + } + desc = fund_inspiration.2004.desc_metal + } + triggered_desc = { + trigger = { + # For artifacts that use fabric in some way + scope:inspiration = { + OR = { + AND = { + has_inspiration_type = smith_inspiration + exists = scope:inspiration_owner.var:artifact_smith_type + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + AND = { + has_inspiration_type = armor_inspiration + exists = scope:inspiration_owner.var:artifact_armor_type + OR = { #All armor that mentions fabric in some way in their descriptions + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_lamellar + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_laminar + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_brigandine + } + } + } + } + } + desc = fund_inspiration.2004.desc_fabric + } + triggered_desc = { + trigger = { + # For artifacts that use thread in some way + scope:inspiration = { + OR = { + has_inspiration_type = weaver_inspiration + AND = { + has_inspiration_type = armor_inspiration + exists = scope:inspiration_owner.var:artifact_armor_type + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_brigandine + } + AND = { + has_inspiration_type = smith_inspiration + exists = scope:inspiration_owner.var:artifact_smith_type + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + } + } + } + desc = fund_inspiration.2004.desc_thread + } + triggered_desc = { + trigger = { + scope:inspiration = { + has_inspiration_type = artisan_inspiration + inspiration_owner.var:artifact_artisan_type ?= flag:artisan_type_icon + } + } + desc = fund_inspriation.2004.desc_paint + } + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = artisan_inspiration } + } + desc = fund_inspiration.2004.desc_wood + } + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = book_inspiration } + } + desc = { + random_valid = { + desc = fund_inspiration.2004.desc_paper + desc = fund_inspiration.2004.desc_ink + } + } + } + triggered_desc = { + trigger = { + scope:inspiration = { + has_inspiration_type = alchemy_inspiration + exists = scope:inspiration_owner.var:artifact_alchemy_type + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_metals + } + } + desc = fund_inspiration.2004.desc_alchemy_metal + } + triggered_desc = { + trigger = { + scope:inspiration = { + has_inspiration_type = alchemy_inspiration + exists = scope:inspiration_owner.var:artifact_alchemy_type + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_elixirs + } + } + desc = fund_inspiration.2004.desc_elixirs + } + desc = fund_inspiration.2004.desc_fallback + } + desc = fund_inspiration.2004.desc + } + theme = realm + override_background = { + reference = market + } + left_portrait = { + character = scope:inspiration_owner + animation = beg + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + is_available_ai_adult = yes + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + NOT = { has_character_flag = had_event_fund_inspiration_2004 } + NOT = { has_character_flag = local_artisan } + has_no_inspiration_event_cooldown = yes + inspiration = { #Since they're away adventuring + NOT = { has_inspiration_type = adventure_inspiration } + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2004 + years = 20 + } + add_inspiration_cooldown_flag = yes + } + } + + # Give them the money + option = { + name = fund_inspiration.2004.a + scope:inspiration = { + invest_gold = root.medium_gold_value + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + generous = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.25 + } + modifier = { + factor = 0 + short_term_gold < medium_gold_value + } + } + } + + # Haggle with the merchant + option = { + name = fund_inspiration.2004.b + duel = { + skill = diplomacy + value = 10 + 15 = { + desc = fund_inspiration.2004.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + #We need to mess around with hidden effects and tooltips a bit here to not show "higher quality" twice on the option + show_as_tooltip = { + scope:inspiration = { + invest_gold = root.tiny_gold_value + } + } + hidden_effect = { + send_interface_toast = { + title = fund_inspiration.2004.b.success + left_icon = scope:inspiration_owner + scope:inspiration = { + invest_gold = root.tiny_gold_value + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + } + } + 20 = { + desc = fund_inspiration.2004.b.failure + #We need to mess around with hidden effects and tooltips a bit here to not show "higher quality" twice on the option + show_as_tooltip = { + scope:inspiration = { + invest_gold = root.medium_gold_value + } + add_prestige = medium_prestige_loss + } + hidden_effect = { + send_interface_toast = { + title = fund_inspiration.2004.b.failure + left_icon = scope:inspiration_owner + scope:inspiration = { + invest_gold = root.medium_gold_value + } + add_prestige = medium_prestige_loss + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + } + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.25 + } + modifier = { + add = 25 + diplomacy >= high_skill_rating + } + modifier = { + factor = 0 + short_term_gold < medium_gold_value + } + } + } + + # Take it by force + option = { + name = fund_inspiration.2004.c + trigger = { + is_landless_adventurer = no + } + add_tyranny = medium_tyranny_gain + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + stress_impact = { + compassionate = major_stress_impact_gain + sadistic = medium_stress_impact_loss + wrathful = medium_stress_impact_loss + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -0.25 + ai_greed = 0.15 + ai_vengefulness = 0.25 + } + } + } + + # Deny them + option = { + name = fund_inspiration.2004.d + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -15 + } + } + stress_impact = { + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + sadistic = minor_stress_impact_loss + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -0.25 + ai_greed = 0.5 + } + } + } +} + +#Smith (weapon/armor/smith) asks you to invest in a better forge +# by Linnéa Thimrén +fund_inspiration.2005 = { + type = character_event + title = fund_inspiration.2005.t + desc = { + desc = fund_inspiration.2005.desc_opening + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = weapon_inspiration } + } + desc = fund_inspiration.2005.desc_weapon + } + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = armor_inspiration } + } + desc = fund_inspiration.2005.desc_armor + } + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = smith_inspiration } + } + desc = fund_inspiration.2005.desc_smith + } + } + desc = fund_inspiration.2005.desc_ending + } + theme = realm + override_background = { + reference = armory + } + left_portrait = { + character = scope:inspiration_owner + animation = beg + } + + trigger = { + is_landless_adventurer = no + exists = scope:inspiration + scope:inspiration = { + OR = { + AND = { + has_inspiration_type = weapon_inspiration + exists = scope:inspiration_owner.var:artifact_weapon_type + } + AND = { + has_inspiration_type = armor_inspiration + exists = scope:inspiration_owner.var:artifact_armor_type + } + AND = { + has_inspiration_type = smith_inspiration + exists = scope:inspiration_owner.var:artifact_smith_type + } + } + inspiration_owner = { + is_available_ai_adult = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_2005 } + NOT = { has_character_flag = local_artisan } + } + inspiration_progress > 1 # To prevent the inspired character from asking for gold immediately + scope:inspiration_sponsor = { + NOT = { + has_character_modifier = inspiration_invested_in_new_forge_modifier + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2005 + years = 20 + } + #To stagger any following events + add_inspiration_cooldown_flag = yes + } + } + + #Invest in a new forge + option = { + name = fund_inspiration.2005.a + scope:inspiration = { invest_gold = 50 } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + add_character_modifier = { + modifier = inspiration_invested_in_new_forge_modifier + years = 5 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { #If the AI can't afford it they should go for it + factor = 0 + short_term_gold < 50 + } + } + } + + #No + option = { + name = fund_inspiration.2005.b + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -15 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + +# A wise person comes to visit, should they teach you or your inspiration owner? +# by Linnéa Thimrén +fund_inspiration.2006 = { + type = character_event + title = fund_inspiration.2006.t + desc = fund_inspiration.2006.desc + theme = realm + left_portrait = scope:scholar_character + right_portrait = scope:inspiration_owner + + trigger = { + exists = scope:inspiration + scope:inspiration = { + OR = { + has_inspiration_type = book_inspiration + has_inspiration_type = alchemy_inspiration + } + inspiration_owner = { + is_available_ai_adult = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_2006 } + } + } + } + + weight_multiplier = { + base = 0.75 + modifier = { #More likely that they stop by if you have a cool court + add = 0.5 + has_royal_court = yes + court_grandeur_current_level > 5 + } + modifier = { #Most likely that they stop by if you have a VERY cool court + add = 0.5 + has_royal_court = yes + court_grandeur_current_level > 7 + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2006 + years = 20 + } + #To stagger any following events + add_inspiration_cooldown_flag = yes + } + create_character = { + location = root.capital_province + template = scholar_character + save_scope_as = scholar_character + } + } + + #Teach inspiration owner + option = { + name = fund_inspiration.2006.a + remove_short_term_gold = minor_gold_value + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + add_learning_skill = 1 + } + scope:scholar_character = { silent_disappearance_effect = yes } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.25 + } + modifier = { #If the AI can't afford it they shouldn't go for it + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + #Teach me! + option = { + name = fund_inspiration.2006.b + remove_short_term_gold = minor_gold_value + add_courtier = scope:scholar_character + set_relation_mentor = scope:scholar_character + add_learning_lifestyle_xp = major_lifestyle_xp + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.25 + } + modifier = { #If the AI can't afford it they shouldn't go for it + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + #Go away + option = { + name = fund_inspiration.2006.c + scope:scholar_character = { silent_disappearance_effect = yes } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + ai_chance = { + base = 1 + } + } +} + +# Inspiration owner asks for more money (armor specific) +# by Linnéa Thimrén +fund_inspiration.2021 = { + type = character_event + title = fund_inspiration.2001.t + desc = fund_inspiration.2021.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = beg + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + is_available_ai_adult = yes + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + has_character_flag = had_event_fund_inspiration_2021 + has_character_flag = fund_armor_inspiration_event_cooldown + } + NOT = { has_character_flag = local_artisan } + exists = var:artifact_armor_type + } + scope:inspiration = { + inspiration_progress > 1 # To prevent the inspired character from asking for gold immediately + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + scope:inspiration_owner = { + ai_greed >= medium_positive_greed + } + } + modifier = { + add = 4 #Very likely if it's plate or lamellar armor since they were very expensive to make + scope:inspiration_owner = { + OR = { + var:artifact_armor_type = flag:armor_type_plate + var:artifact_armor_type = flag:armor_type_lamellar + } + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2021 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_armor_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + option = { # Sure, have the money + name = fund_inspiration.2021.a + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration = { + invest_gold = 50 + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + } + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = -50 + short_term_gold < 50 + } + } + } + + option = { #No! + name = fund_inspiration.2021.b + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -20 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } +} + +scripted_trigger fund_inspiration_court_relation_trigger = { + is_available_ai_adult = yes + this != scope:inspiration_owner + is_in_the_same_court_as_or_guest = root +} + +scripted_trigger fund_inspiration_court_inspiration_owner_trigger = { + is_available_ai_adult = yes + inspiration = { #Since they're away adventuring + NOT = { has_inspiration_type = adventure_inspiration } + } +} + +# Friend helps your sponsee +# by Jose Parkin +fund_inspiration.2030 = { + type = character_event + title = fund_inspiration.2030.t + desc = fund_inspiration.2030.desc + theme = realm + override_background = { + reference = corridor_day + } + left_portrait = { + character = scope:friend + animation = admiration + } + lower_right_portrait = scope:inspiration_owner + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + inspiration = { + NOT = { has_inspiration_type = alchemy_inspiration } # Science is not based on opinion + } + NOT = { has_character_flag = had_event_fund_inspiration_2030 } + } + any_relation = { + type = friend + fund_inspiration_court_relation_trigger = yes + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2030 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + random_relation = { + type = friend + limit = { fund_inspiration_court_relation_trigger = yes } + save_scope_as = friend + progress_towards_friend_effect = { CHARACTER = scope:inspiration_owner REASON = friend_helped_inspiration OPINION = default_friend_opinion } + } + scope:inspiration_owner = { + random_list = { + 2 = { + change_artifact_quality_effect = { AMOUNT = 3 } + } + 2 = { + change_artifact_quality_effect = { AMOUNT = -3 } + } + } + } + } + + # Nice + option = { + name = fund_inspiration.2030.a + } +} + +# Rival sabotages your sponsee +# by Joe Parkin +fund_inspiration.2040 = { + type = character_event + title = fund_inspiration.2040.t + desc = fund_inspiration.2040.desc + theme = realm + override_background = { + reference = corridor_day + } + left_portrait = { + character = scope:inspiration_owner + animation = anger + } + lower_right_portrait = { + character = scope:rival + animation = schadenfreude + } + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_2040 } + + } + OR = { + any_relation = { + type = rival + fund_inspiration_court_relation_trigger = yes + } + scope:inspiration_owner = { + any_relation = { + type = rival + fund_inspiration_court_relation_trigger = yes + } + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2040 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + if = { + limit = { intrigue >= average_skill_rating } + if = { + limit = { + any_relation = { + type = rival + fund_inspiration_court_relation_trigger = yes + } + } + random_relation = { + type = rival + limit = { fund_inspiration_court_relation_trigger = yes } + save_scope_as = rival + } + } + else = { + scope:inspiration_owner = { + random_relation = { + type = rival + limit = { fund_inspiration_court_relation_trigger = yes } + save_scope_as = rival + } + } + } + } + } + + option = { + name = fund_inspiration.2040.a + trigger = { + any_relation = { + type = rival + fund_inspiration_court_relation_trigger = yes + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + + option = { + name = fund_inspiration.2040.b + trigger = { + NOT = { + any_relation = { + type = rival + fund_inspiration_court_relation_trigger = yes + } + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + + option = { + name = fund_inspiration.2040.c + trigger = { exists = scope:rival } + skill = intrigue + flavor = fund_inspiration.2040.c.flavor + duel = { + skill = intrigue + value = average_skill_rating + 40 = { + desc = fund_inspiration.2040.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + custom_tooltip = fund_inspiration.2040.c.tt + show_as_tooltip = { + add_prestige = minor_prestige_gain + add_intrigue_lifestyle_xp = medium_lifestyle_experience + } + trigger_event = { + id = fund_inspiration.2041 + days = 3 + } + } + 60 = { + desc = fund_inspiration.2040.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + show_as_tooltip = { + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + trigger_event = { + id = fund_inspiration.2042 + days = 3 + } + } + } + } +} + +fund_inspiration.2041 = { + type = character_event + title = fund_inspiration.2040.t + desc = fund_inspiration.2041.desc + theme = intrigue + right_portrait = { + character = scope:rival + animation = scheme + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { fund_inspiration_court_inspiration_owner_trigger = yes } + exists = scope:rival + scope:rival = { fund_inspiration_court_relation_trigger = yes } + } + + immediate = { + scope:rival = { + add_character_flag = { + flag = use_stealth_clothes + days = 1 + } + } + add_intrigue_lifestyle_xp = medium_lifestyle_experience + } + + option = { + name = fund_inspiration.2041.a + add_prestige = minor_prestige_gain + rightfully_imprison_character_effect = { + TARGET = scope:rival + IMPRISONER = root + } + stress_impact = { + calm = medium_stress_impact_gain + patient = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + option = { + name = fund_inspiration.2041.b + remove_courtier_or_guest = scope:rival + ai_chance = { + base = 25 + } + } + + option = { + name = fund_inspiration.2041.c + add_character_modifier = { + modifier = ep1_fund_inspiration_2040_scheme_modifier + years = 5 + } + stress_impact = { + wrathful = medium_stress_impact_gain + impatient = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = -1 + } + } + } +} + +fund_inspiration.2042 = { + type = character_event + hidden = yes + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { fund_inspiration_court_inspiration_owner_trigger = yes } + } + + immediate = { + send_interface_toast = { + title = fund_inspiration.2040.c.failure + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + } +} + +# Skillcheck to improve inspiration quality +# by Joe Parkin +scripted_trigger fund_inspiration_martial_trigger = { + scope:inspiration = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + AND = { + has_inspiration_type = book_inspiration + inspiration_owner = { + trigger_if = { + limit = { has_variable = book_subject } + var:book_subject = flag:martial + } + trigger_else = { always = no } + } + } + } + } +} + +scripted_trigger fund_inspiration_stewardship_trigger = { + scope:inspiration = { + OR = { + has_inspiration_type = weaver_inspiration + has_inspiration_type = artisan_inspiration + has_inspiration_type = smith_inspiration + AND = { + has_inspiration_type = book_inspiration + inspiration_owner = { + trigger_if = { + limit = { has_variable = book_subject } + var:book_subject = flag:stewardship + } + trigger_else = { always = no } + } + } + } + } +} + +scripted_trigger fund_inspiration_diplomacy_trigger = { + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { + trigger_if = { + limit = { has_variable = book_subject } + var:book_subject = flag:diplomacy + } + trigger_else = { always = no } + } + } +} + +scripted_trigger fund_inspiration_intrigue_trigger = { + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { + trigger_if = { + limit = { has_variable = book_subject } + var:book_subject = flag:intrigue + } + trigger_else = { always = no } + } + } +} + +scripted_effect fund_inspiration_skillcheck_duel_effect = { + duel = { + skill = $SKILL$ + value = average_skill_rating + $CHANCE$ = { + desc = fund_inspiration.2050.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + min = 5 + send_interface_toast = { + title = fund_inspiration.2050.success + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = $AMOUNT$ } + } + } + } + 30 = { + desc = fund_inspiration.2050.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + send_interface_toast = { + title = fund_inspiration.2050.failure + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -$AMOUNT$ } + } + } + } + 20 = { + desc = fund_inspiration.2050.nothing + modifier = { + factor = 1.5 + scope:inspiration_owner = { + OR = { + has_trait = arrogant + has_trait = stubborn + opinion = { + target = root + value < 0 + } + } + } + } + modifier = { + factor = 0.5 + scope:inspiration_owner = { + OR = { + has_trait = fickle + has_trait = humble + opinion = { + target = root + value >= 50 + } + } + } + } + } + } +} + +fund_inspiration.2050 = { + type = character_event + title = fund_inspiration.2050.t + desc = fund_inspiration.2050.desc + theme = realm + override_background = { + reference = study + } + left_portrait = { + character = scope:inspiration_owner + animation = worry + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_2050 } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2050 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + } + + option = { # Skill check based on inspiration type + name = fund_inspiration.2050.a + if = { # Martial + limit = { fund_inspiration_martial_trigger = yes } + fund_inspiration_skillcheck_duel_effect = { SKILL = martial AMOUNT = 4 CHANCE = 30 } + } + else_if = { # Stewardship + limit = { fund_inspiration_stewardship_trigger = yes } + fund_inspiration_skillcheck_duel_effect = { SKILL = stewardship AMOUNT = 4 CHANCE = 30 } + } + else_if = { # Diplomacy + limit = { fund_inspiration_diplomacy_trigger = yes } + fund_inspiration_skillcheck_duel_effect = { SKILL = diplomacy AMOUNT = 4 CHANCE = 30 } + } + else_if = { # Intrigue + limit = { fund_inspiration_intrigue_trigger = yes } + fund_inspiration_skillcheck_duel_effect = { SKILL = intrigue AMOUNT = 4 CHANCE = 30 } + } + else = { # Learning + fund_inspiration_skillcheck_duel_effect = { SKILL = learning AMOUNT = 4 CHANCE = 30 } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = contempt_opinion + opinion = -10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -1 + } + } + } + + option = { # Education fallback + name = fund_inspiration.2050.b + trigger = { + OR = { + AND = { + fund_inspiration_diplomacy_trigger = no + has_trait = education_diplomacy + } + AND = { + fund_inspiration_martial_trigger = no + has_trait = education_martial + } + AND = { + fund_inspiration_stewardship_trigger = no + has_trait = education_stewardship + } + AND = { + fund_inspiration_intrigue_trigger = no + has_trait = education_intrigue + } + } + NOT = { + scope:inspiration = { + has_inspiration_type = research_inspiration + } + } + } + trait = education_diplomacy_1 + trait = education_diplomacy_2 + trait = education_diplomacy_3 + trait = education_diplomacy_4 + trait = education_diplomacy_5 + trait = education_martial_1 + trait = education_martial_2 + trait = education_martial_3 + trait = education_martial_4 + trait = education_martial_5 + trait = education_stewardship_1 + trait = education_stewardship_2 + trait = education_stewardship_3 + trait = education_stewardship_4 + trait = education_stewardship_5 + trait = education_intrigue_1 + trait = education_intrigue_2 + trait = education_intrigue_3 + trait = education_intrigue_4 + trait = education_intrigue_5 + trait = education_learning_1 + trait = education_learning_2 + trait = education_learning_3 + trait = education_learning_4 + trait = education_learning_5 + if = { # Martial + limit = { + fund_inspiration_martial_trigger = no + has_trait = education_martial + } + fund_inspiration_skillcheck_duel_effect = { SKILL = martial AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Stewardship + limit = { + fund_inspiration_stewardship_trigger = no + has_trait = education_stewardship + } + fund_inspiration_skillcheck_duel_effect = { SKILL = stewardship AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Diplomacy + limit = { + fund_inspiration_diplomacy_trigger = no + has_trait = education_diplomacy + } + fund_inspiration_skillcheck_duel_effect = { SKILL = diplomacy AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Intrigue + limit = { + fund_inspiration_intrigue_trigger = no + has_trait = education_intrigue + } + fund_inspiration_skillcheck_duel_effect = { SKILL = intrigue AMOUNT = 2 CHANCE = 5 } + } + else = { # Learning + fund_inspiration_skillcheck_duel_effect = { SKILL = learning AMOUNT = 2 CHANCE = 5 } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = contempt_opinion + opinion = -10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = -0.5 + } + } + } + + option = { # Highest skill fallback (if inspiration and education match) + name = fund_inspiration.2050.c + trigger = { + NOR = { + AND = { + fund_inspiration_diplomacy_trigger = no + has_trait = education_diplomacy + } + AND = { + fund_inspiration_martial_trigger = no + has_trait = education_martial + } + AND = { + fund_inspiration_stewardship_trigger = no + has_trait = education_stewardship + } + AND = { + fund_inspiration_intrigue_trigger = no + has_trait = education_intrigue + } + } + } + if = { # Martial + limit = { + fund_inspiration_martial_trigger = no + NOT = { has_trait = education_martial } + highest_skill = martial + } + fund_inspiration_skillcheck_duel_effect = { SKILL = martial AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Stewardship + limit = { + fund_inspiration_stewardship_trigger = no + NOT = { has_trait = education_stewardship } + highest_skill = stewardship + } + fund_inspiration_skillcheck_duel_effect = { SKILL = stewardship AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Diplomacy + limit = { + fund_inspiration_diplomacy_trigger = no + NOT = { has_trait = education_diplomacy } + highest_skill = diplomacy + } + fund_inspiration_skillcheck_duel_effect = { SKILL = diplomacy AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Intrigue + limit = { + fund_inspiration_intrigue_trigger = no + NOT = { has_trait = education_intrigue } + highest_skill = intrigue + } + fund_inspiration_skillcheck_duel_effect = { SKILL = intrigue AMOUNT = 2 CHANCE = 5 } + } + else = { # Learning + fund_inspiration_skillcheck_duel_effect = { SKILL = learning AMOUNT = 2 CHANCE = 10 } # more for learning + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = contempt_opinion + opinion = -10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = -0.5 + } + } + } + + option = { # Prowess bonus option for equipment + name = fund_inspiration.2050.d + trigger = { + scope:inspiration = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + } + } + skill = prowess + fund_inspiration_skillcheck_duel_effect = { SKILL = prowess AMOUNT = 4 CHANCE = 10 } + stress_impact = { + humble = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = -0.5 + } + } + } + + option = { # Don't get involved + name = fund_inspiration.2050.e + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_rationality = 1 + } + } + } +} + +# Fame donation +# by Joe Parkin +fund_inspiration.2060 = { + type = character_event + title = fund_inspiration.2060.t + desc = { + random_valid = { + triggered_desc = { + trigger = { + OR = { + piety_level >= high_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + } + } + desc = fund_inspiration.2060.desc.religious + } + triggered_desc = { + trigger = { prestige_level >= high_prestige_level } + desc = fund_inspiration.2060.desc.fame + } + triggered_desc = { + trigger = { court_grandeur_current_level >= 8 } + desc = fund_inspiration.2060.desc.court + } + } + desc = fund_inspiration.2060.desc + random_valid = { + triggered_desc = { + trigger = { + OR = { + piety_level >= high_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + } + } + desc = fund_inspiration.2060.desc.brotherhood + } + triggered_desc = { + trigger = { + OR = { + piety_level >= high_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + } + } + desc = fund_inspiration.2060.desc.abbey + } + triggered_desc = { + trigger = { + OR = { + prestige_level >= high_prestige_level + court_grandeur_current_level >= 8 + } + } + desc = fund_inspiration.2060.desc.mercenary + } + triggered_desc = { + trigger = { + OR = { + prestige_level >= high_prestige_level + court_grandeur_current_level >= 8 + } + } + desc = fund_inspiration.2060.desc.guild + } + } + random_valid = { + triggered_desc = { + trigger = { piety_level >= high_piety_level } + desc = fund_inspiration.2060.piety + } + triggered_desc = { + trigger = { has_trait = saoshyant } + desc = fund_inspiration.2060.saoshyant + } + triggered_desc = { + trigger = { has_trait = savior } + desc = fund_inspiration.2060.savior + } + triggered_desc = { + trigger = { has_trait = saint } + desc = fund_inspiration.2060.saint + } + triggered_desc = { + trigger = { prestige_level >= high_prestige_level } + desc = fund_inspiration.2060.prestige + } + triggered_desc = { + trigger = { court_grandeur_current_level >= 8 } + desc = fund_inspiration.2060.grandeur + } + } + desc = fund_inspiration.2060.desc_outro + } + theme = realm + left_portrait = { + character = scope:donator + animation = admiration + } + right_portrait = { + character = scope:inspiration_owner + animation = happiness + } + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + #NOT = { has_character_flag = had_event_fund_inspiration_2060 } + } + OR = { + piety_level = max_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + prestige_level = max_prestige_level + court_grandeur_current_level >= 8 + } + any_held_county = { + any_county_province = { has_holding = yes } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + #add_character_flag = { + # flag = had_event_fund_inspiration_2060 + # years = 5 + #} + add_inspiration_cooldown_flag = yes + } + # Generate donating character + random_list = { + 2 = { # Religious + trigger = { + OR = { + piety_level = max_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + } + } + create_character = { + template = monk_character_template + dynasty = none + location = root.capital_province + save_scope_as = donator + } + } + 2 = { # Secular + trigger = { + OR = { + prestige_level = max_prestige_level + court_grandeur_current_level >= 8 + } + } + create_character = { + template = new_warrior_character + gender_female_chance = root_soldier_female_chance + culture = root.culture + faith = root.faith + dynasty = none + location = root.capital_province + save_scope_as = donator + } + } + } + hidden_effect = { + scope:donator = { add_gold = root.minor_gold_value } + } + # Find county origin + random_held_county = { + limit = { + this != root.capital_county + any_county_province = { has_holding = yes } + } + alternative_limit = { + any_county_province = { has_holding = yes } + } + random_county_province = { + limit = { has_holding = yes } + barony = { save_scope_as = barony_scope } + } + } + } + + option = { # I am honored + name = fund_inspiration.2060.a + scope:donator = { + pay_short_term_gold = { + target = root + gold = root.tiny_gold_value + } + } + scope:inspiration = { invest_gold = root.tiny_gold_value } + scope:barony_scope.county = { + add_county_modifier = { + modifier = ep1_fund_inspiration_2070_accept_modifier + years = 5 + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + stress_impact = { + generous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = 1 + } + } + } + + option = { # Refuse gift + name = { + trigger = { + OR = { + piety_level = max_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + } + } + text = fund_inspiration.2060.b.religious + } + name = { + trigger = { + OR = { + prestige_level = max_prestige_level + court_grandeur_current_level >= 8 + } + } + text = fund_inspiration.2060.b.prestige + } + scope:barony_scope.county = { + add_county_modifier = { + modifier = ep1_fund_inspiration_2070_refuse_modifier + years = 5 + } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = annoyed_opinion + opinion = -10 + } + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { # Mock gift + name = fund_inspiration.2060.c + if = { + limit = { + scope:donator = { has_trait = devoted } + } + add_piety = medium_piety_loss + } + else = { + add_prestige = medium_prestige_loss + } + scope:donator = { + pay_short_term_gold = { + target = root + gold = root.tiny_gold_value + } + } + scope:inspiration = { invest_gold = root.tiny_gold_value } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + scope:barony_scope.county = { + add_county_modifier = { + modifier = ep1_fund_inspiration_2070_mock_modifier + years = 5 + } + } + stress_impact = { + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -1 + } + } + } +} + +# Flawed artisan +# by Joe Parkin +scripted_trigger has_artisan_incapacity_trait = { + OR = { + has_trait = lunatic + has_trait = possessed + has_trait = depressed + has_trait = drunkard + has_trait = hashishiyah + has_trait = reclusive + has_trait = rakish + has_trait = profligate + has_trait = improvident + has_trait = comfort_eater + has_trait = irritable + has_trait = wounded + has_trait = pregnant + has_treatable_disease_trigger = yes + } +} + +fund_inspiration.2070 = { + type = character_event + title = fund_inspiration.2070.t + desc = { + desc = fund_inspiration.2070.desc + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { + OR = { + has_trait = profligate + has_trait = improvident + has_trait = depressed + has_trait = drunkard + has_trait = hashishiyah + has_trait = rakish + has_trait = comfort_eater + has_trait = wounded + has_trait = pregnant + has_treatable_disease_trigger = yes + } + } + } + desc = fund_inspiration.2070.desc.stalled + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + OR = { + has_trait = lunatic + has_trait = possessed + has_trait = reclusive + has_trait = irritable + } + } + } + desc = fund_inspiration.2070.desc.wasted + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = profligate } + } + desc = fund_inspiration.2070.desc.profligate + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = improvident } + } + desc = fund_inspiration.2070.desc.improvident + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = depressed } + } + desc = fund_inspiration.2070.desc.depressed + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = drunkard } + } + desc = fund_inspiration.2070.desc.drunkard + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = hashishiyah } + } + desc = fund_inspiration.2070.desc.hashishiyah + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = rakish } + } + desc = fund_inspiration.2070.desc.rakish + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = comfort_eater } + } + desc = fund_inspiration.2070.desc.comfort_eater + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = lunatic } + } + desc = fund_inspiration.2070.desc.lunatic + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = possessed } + } + desc = fund_inspiration.2070.desc.possessed + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = reclusive } + } + desc = fund_inspiration.2070.desc.reclusive + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = irritable } + } + desc = fund_inspiration.2070.desc.irritable + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = wounded } + } + desc = fund_inspiration.2070.desc.wounded + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = pregnant } + } + desc = fund_inspiration.2070.desc.pregnant + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_treatable_disease_trigger = yes } + } + desc = fund_inspiration.2070.desc.sick + } + } + desc = fund_inspiration.2070.desc_outro + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { has_trait = pregnant } + animation = pregnant + } + triggered_animation = { + trigger = { + OR = { + has_trait = lunatic + has_trait = possessed + } + } + animation = paranoia + } + triggered_animation = { + trigger = { has_trait = depressed } + animation = boredom + } + triggered_animation = { + trigger = { + OR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = rakish + } + } + animation = toast + } + triggered_animation = { + trigger = { + OR = { + has_trait = profligate + has_trait = improvident + } + } + animation = boredom + } + triggered_animation = { + trigger = { has_trait = irritable } + animation = anger + } + triggered_animation = { + trigger = { has_treatable_disease_trigger = yes } + animation = sick + } + } + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_2070 } + has_artisan_incapacity_trait = yes + inspiration.inspiration_progress >= 2 + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2070 + years = 5 + } + add_inspiration_cooldown_flag = yes + inspiration = { change_inspiration_progress = -2 } + } + } + + option = { # Pull yourself together + name = fund_inspiration.2070.a + scope:inspiration = { + if = { + limit = { + inspiration_owner = { + OR = { + has_trait = profligate + has_trait = improvident + } + } + } + invest_gold = root.medium_gold_value + root = { + stress_impact = { greedy = medium_stress_impact_gain } + } + } + else = { + invest_gold = root.minor_gold_value + root = { + stress_impact = { greedy = minor_stress_impact_gain } + } + } + change_inspiration_progress = 1 + } + stress_impact = { + vengeful = minor_stress_impact_gain + impatient = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_greed = -0.5 + ai_compassion = 0.5 + } + } + } + + option = { # I understand + name = fund_inspiration.2070.b + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = forgiven_opinion + opinion = 10 + } + stress_impact = { + vengeful = medium_stress_impact_gain + callous = medium_stress_impact_gain + impatient = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = -1 + ai_greed = -1 + ai_compassion = 1 + } + } + } + + option = { # Unacceptable + name = fund_inspiration.2070.c + scope:inspiration_owner = { + inspiration = { change_inspiration_progress = 2 } + stress_impact = { + base = massive_stress_impact_gain + craven = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + change_artifact_quality_effect = { AMOUNT = -4 } + } + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 1 + ai_greed = 1 + ai_compassion = -1 + } + } + } + + option = { # Get out + name = fund_inspiration.2070.d + trigger = { + scope:inspiration_owner = { is_courtier = yes } + } + send_interface_toast = { + title = fund_inspiration.2100.c.leave + left_icon = scope:inspiration_owner + add_prestige = minor_prestige_gain + end_inspiration_sponsorship = scope:inspiration + remove_courtier_or_guest = scope:inspiration_owner + if = { + limit = { + scope:inspiration_owner = { + NOR = { + has_trait = profligate + has_trait = improvident + } + } + } + custom_tooltip = fund_inspiration_quarter_refund_tt + add_gold = { + value = scope:inspiration.inspiration_gold_invested + divide = 4 + } + } + } + stress_impact = { + forgiving = major_stress_impact_gain + patient = major_stress_impact_gain + greedy = major_stress_impact_gain + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 2 + ai_greed = -1 + ai_compassion = -1 + } + } + } +} + +# Antiquarian meddles with inspiration +# by Joe Parkin +scripted_trigger fi_2080_antiquarian_trigger = { + is_available_ai_adult = yes + NOR = { + this = scope:inspiration_owner + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:inspiration_owner } + } +} + +fund_inspiration.2080 = { + type = character_event + title = fund_inspiration.2080.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:rival = { has_court_position = antiquarian_court_position } + } + desc = fund_inspiration.2080.antiquarian + } + triggered_desc = { + trigger = { + scope:rival = { has_court_position = court_artificer_court_position } + } + desc = fund_inspiration.2080.artificer + } + } + desc = fund_inspiration.2080.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = dismissal + } + right_portrait = { + character = scope:antiquarian + animation = disapproval + } + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_2080 + has_variable = banner_commission + } + } + OR = { + any_court_position_holder = { + type = antiquarian_court_position + fi_2080_antiquarian_trigger = yes + } + any_court_position_holder = { + type = court_artificer_court_position + fi_2080_antiquarian_trigger = yes + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_2080 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + if = { + limit = { + any_court_position_holder = { + type = antiquarian_court_position + fi_2080_antiquarian_trigger = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { fi_2080_antiquarian_trigger = yes } + save_scope_as = antiquarian + progress_towards_rival_effect = { + REASON = rival_dispute_inspiration + CHARACTER = scope:inspiration_owner + OPINION = 0 + } + } + } + if = { + limit = { + any_court_position_holder = { + type = court_artificer_court_position + fi_2080_antiquarian_trigger = yes + } + } + random_court_position_holder = { + type = court_artificer_court_position + limit = { fi_2080_antiquarian_trigger = yes } + save_scope_as = artificer + } + } + random_list = { + 2 = { + trigger = { exists = scope:antiquarian } + modifier = { + factor = 10 + scope:antiquarian = { + OR = { + has_trait = diligent + has_trait = arrogant + has_relation_rival = scope:inspiration_owner + } + } + } + scope:antiquarian = { save_scope_as = rival } + } + 2 = { + trigger = { exists = scope:artificer } + modifier = { + factor = 10 + scope:artificer = { + OR = { + has_trait = diligent + has_trait = arrogant + has_relation_rival = scope:inspiration_owner + } + } + } + scope:artificer = { save_scope_as = rival } + } + } + } + + option = { # Side with position holder + name = fund_inspiration.2080.a + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:rival + modifier = respect_opinion + opinion = 5 + } + random_list = { + 5 = { + modifier = { factor = scope:rival.aptitude:antiquarian_court_position } + send_interface_toast = { + title = fund_inspiration.2080.success + left_icon = scope:rival + right_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + } + 10 = { + send_interface_toast = { + title = fund_inspiration.2080.failure + left_icon = scope:rival + right_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + } + } + stress_impact = { + generous = minor_stress_impact_gain + patient = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.5 + } + } + } + + option = { # Side with sponsee + name = fund_inspiration.2080.b + reverse_add_opinion = { + target = scope:rival + modifier = disappointed_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = respect_opinion + opinion = 5 + } + stress_impact = { + greedy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 1 + } + } + } + + option = { # Replace with sponsee + name = fund_inspiration.2080.c + reverse_add_opinion = { + target = scope:rival + modifier = angry_opinion + opinion = -20 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 10 + } + scope:rival = { + progress_towards_rival_effect = { + REASON = rival_dispute_inspiration + CHARACTER = scope:inspiration_owner + OPINION = 0 + } + } + if = { + limit = { + scope:rival = { has_court_position = court_artificer_court_position } + } + replace_court_position = { + recipient = scope:inspiration_owner + holder = scope:rival + court_position = court_artificer_court_position + } + } + else = { + replace_court_position = { + recipient = scope:inspiration_owner + holder = scope:rival + court_position = antiquarian_court_position + } + } + random = { + chance = 50 + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + stress_impact = { + calm = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 1 + } + } + } +} + +# Spouse meddles with inspiration +# by Joe Parkin +fund_inspiration.2090 = { + type = character_event + title = fund_inspiration.2090.t + desc = fund_inspiration.2090.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = stress + } + right_portrait = { + character = scope:event_spouse + animation = happiness + } + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + exists = primary_spouse + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_2090 + has_variable = banner_commission + } + } + scope:inspiration = { + OR = { + has_inspiration_type = weaver_inspiration + has_inspiration_type = artisan_inspiration + has_inspiration_type = smith_inspiration + has_inspiration_type = research_inspiration + trigger_if = { + limit = { + root.primary_spouse = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + } + } + } + is_married = yes + primary_spouse = { + is_available_ai_adult = yes + is_landed = no + is_in_the_same_court_as_or_guest = root + this != scope:inspiration_owner + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + primary_spouse = { + OR = { + has_trait = diligent + has_trait = arrogant + } + } + } + modifier = { + add = -1 + primary_spouse = { + OR = { + has_trait = humble + has_trait = shy + has_trait = lazy + } + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_2090 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + primary_spouse = { save_scope_as = event_spouse } + } + + option = { + name = fund_inspiration.2090.a + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = angry_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:event_spouse + modifier = pleased_opinion + opinion = 5 + } + random_list = { + 4 = { + modifier = { factor = scope:event_spouse.aptitude:antiquarian_court_position } + send_interface_toast = { + title = fund_inspiration.2090.success + left_icon = scope:event_spouse + right_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + } + 10 = { + send_interface_toast = { + title = fund_inspiration.2090.failure + left_icon = scope:event_spouse + right_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + } + } + stress_impact = { + generous = minor_stress_impact_gain + patient = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 1 + } + } + } + + option = { + name = fund_inspiration.2090.b + reverse_add_opinion = { + target = scope:event_spouse + modifier = disappointed_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 5 + } + stress_impact = { + greedy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.5 + } + } + } +} + +# Sponsee jealous of another sponsee +# by Joe Parkin +fund_inspiration.2100 = { + type = character_event + title = fund_inspiration.2100.t + desc = { + desc = fund_inspiration.2100.desc + first_valid = { + triggered_desc = { + trigger = { scope:other_inspiration_owner.inspiration.inspiration_gold_invested > scope:inspiration.inspiration_gold_invested } + desc = fund_inspiration.2100.desc.funds + } + triggered_desc = { + trigger = { + scope:other_inspiration_owner = { has_relation_rival = scope:inspiration_owner } + } + desc = fund_inspiration.2100.desc.rival + } + desc = fund_inspiration.2100.desc.fallback + } + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = disapproval + } + right_portrait = { + character = scope:other_inspiration_owner + animation = admiration + } + override_background = { + reference = feast + } + cooldown = { years = 2 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_2100 + has_variable = banner_commission + } + OR = { + NOR = { + has_trait = humble + has_trait = shy + has_trait = lazy + } + any_relation = { + type = rival + exists = inspiration.inspiration_sponsor + inspiration.inspiration_sponsor = root + } + } + } + any_sponsored_inspiration = { + NOT = { inspiration_owner = scope:inspiration_owner } + inspiration_owner = { fund_inspiration_court_inspiration_owner_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:inspiration_owner = { + OR = { + has_trait = diligent + has_trait = arrogant + } + } + } + modifier = { + factor = 2 + any_sponsored_inspiration = { + NOT = { inspiration_owner = scope:inspiration_owner } + inspiration_owner = { fund_inspiration_court_inspiration_owner_trigger = yes } + inspiration_gold_invested > scope:inspiration.inspiration_gold_invested + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_2100 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + random_sponsored_inspiration = { + limit = { + NOT = { inspiration_owner = scope:inspiration_owner } + inspiration_owner = { fund_inspiration_court_inspiration_owner_trigger = yes } + } + weight = { + base = 1 + modifier = { + factor = 2 + inspiration_gold_invested > scope:inspiration.inspiration_gold_invested + } + modifier = { + factor = 4 + inspiration_owner = { has_relation_rival = scope:inspiration_owner } + } + } + inspiration_owner = { save_scope_as = other_inspiration_owner } + } + } + + option = { # Praise work + name = fund_inspiration.2100.a + add_prestige = minor_prestige_loss + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = pleased_opinion + opinion = 5 + } + stress_impact = { + arrogant = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { # Match funding + name = fund_inspiration.2100.b + trigger = { scope:inspiration.inspiration_gold_invested < scope:other_inspiration_owner.inspiration.inspiration_gold_invested } + if = { + limit = { ep1_fund_inspiration_2100_rival_difference < 50 } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + else = { + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + scope:inspiration = { invest_gold = ep1_fund_inspiration_2100_rival_difference } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = pleased_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:other_inspiration_owner + modifier = annoyed_opinion + opinion = -10 + } + stress_impact = { + greedy = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_honor = 1 + } + } + } + + option = { # Attempt to settle dispute + name = fund_inspiration.2100.c + duel = { + skill = diplomacy + target = scope:inspiration_owner + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 4 + } + min = 5 + send_interface_toast = { + title = fund_inspiration.2100.success + left_icon = scope:inspiration_owner + right_icon = scope:other_inspiration_owner + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + min = 5 + send_interface_toast = { + title = fund_inspiration.2100.failure + left_icon = scope:inspiration_owner + right_icon = scope:other_inspiration_owner + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + progress_towards_rival_effect = { + REASON = rival_dispute_inspiration + CHARACTER = scope:other_inspiration_owner + OPINION = 0 + } + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 1 + ai_honor = 1 + } + } + } + + option = { # Berate + name = fund_inspiration.2100.d + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:other_inspiration_owner + modifier = grateful_opinion + opinion = 5 + } + random_list = { + 50 = { + send_interface_toast = { + title = fund_inspiration.2100.c.leave + left_icon = scope:inspiration_owner + end_inspiration_sponsorship = scope:inspiration + if = { + limit = { + scope:inspiration_owner = { is_courtier = yes } + } + remove_courtier_or_guest = scope:inspiration_owner + } + custom_tooltip = fund_inspiration_half_refund_tt + add_gold = { + value = scope:inspiration.inspiration_gold_invested + divide = 2 + } + } + } + 50 = { + send_interface_toast = { + title = fund_inspiration.2100.c.worse + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + generous = minor_stress_impact_gain + patient = minor_stress_impact_gain + calm = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -1 + } + } + } +} + +# Vassal invests in inspiration +# by Joe Parkin +scripted_trigger fi_2110_generous_vassal_trigger = { + is_available_ai_adult = yes + gold >= medium_gold_value + has_any_bad_relationship_with_root_trigger = no + NOR = { + has_trait = greedy + this = scope:inspiration_owner + } + OR = { + gold >= major_gold_value + has_trait = scholar + has_trait = theologian + has_trait = diligent + has_trait = profligate + has_trait = generous + has_trait = improvident + has_trait = diligent + has_any_good_relationship_with_root_trigger = yes + } +} + +fund_inspiration.2110 = { + type = character_event + title = fund_inspiration.2110.t + desc = { + desc = fund_inspiration.2110.desc + random_valid = { + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = research_inspiration } + } + desc = fund_inspiration.2110.desc.part.2.research + } + triggered_desc = { + desc = fund_inspiration.2110.desc.part.2 + } + } + random_valid = { + triggered_desc = { + trigger = { + scope:generous_vassal = { + OR = { + has_trait = profligate + has_trait = generous + has_trait = improvident + } + } + } + desc = fund_inspiration.2110.desc.generous + } + triggered_desc = { + trigger = { + scope:generous_vassal = { + NOT = { + scope:inspiration = { has_inspiration_type = research_inspiration } + } + OR = { + has_trait = scholar + has_trait = theologian + has_trait = diligent + } + } + } + desc = fund_inspiration.2110.desc.dweeb + } + triggered_desc = { + trigger = { + scope:generous_vassal = { + scope:inspiration = { has_inspiration_type = research_inspiration } + OR = { + has_trait = scholar + has_trait = theologian + has_trait = diligent + } + } + } + desc = fund_inspiration.2110.desc.dweeb.research + } + triggered_desc = { + trigger = { + scope:generous_vassal = { has_any_good_relationship_with_root_trigger = yes } + } + desc = fund_inspiration.2110.desc.friend + } + triggered_desc = { + trigger = { + scope:generous_vassal = { + NOR = { + has_trait = profligate + has_trait = generous + has_trait = improvident + has_trait = scholar + has_trait = theologian + has_trait = diligent + has_any_good_relationship_with_root_trigger = yes + } + } + } + desc = fund_inspiration.2110.desc.rich + } + } + } + theme = realm + left_portrait = { + character = scope:generous_vassal + animation = admiration + } + lower_right_portrait = scope:inspiration_owner + cooldown = { years = 2 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_2100 + has_variable = banner_commission + } + } + any_vassal_or_below = { fi_2110_generous_vassal_trigger = yes } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_2100 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + random_vassal_or_below = { + limit = { fi_2110_generous_vassal_trigger = yes } + save_scope_as = generous_vassal + } + } + + option = { + name = fund_inspiration.2110.a + scope:generous_vassal = { + hidden_effect = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + show_as_tooltip = { + pay_short_term_gold = { + target = scope:inspiration_owner + gold = minor_gold_value + } + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + hidden_effect = { + inspiration = { invest_gold = scope:generous_vassal.minor_gold_value } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = -0.5 + } + } + } + + option = { + name = fund_inspiration.2110.b + flavor = fund_inspiration.2110.b.flavor + scope:generous_vassal = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + stress_impact = { + honest = medium_stress_impact_gain + generous = medium_stress_impact_gain + just = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_honor = -1 + ai_compassion = -1 + } + } + } + + option = { + name = fund_inspiration.2110.c + reverse_add_opinion = { + target = scope:generous_vassal + modifier = respect_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -5 + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + } + } + } +} + +# Sponsee romance +# by Joe Parkin +scripted_trigger fi_2120_homosexuality_not_accepted_trigger = { + sex_same_as = scope:inspiration_owner + NOT = { + faith = { has_doctrine = doctrine_homosexuality_accepted } + } +} + +fund_inspiration.2120 = { + type = character_event + title = fund_inspiration.2120.t + desc = { + desc = fund_inspiration.2120.desc + first_valid = { + triggered_desc = { + trigger = { has_character_flag = fund_inspiration_2070_instigator } + desc = fund_inspiration.2120.desc.me + } + desc = fund_inspiration.2120.desc.them + } + first_valid = { + # THEY react + triggered_desc = { + trigger = { + has_character_flag = fund_inspiration_2070_instigator + scope:inspiration_owner = { has_trait = lustful } + } + desc = fund_inspiration.2120.desc.them_into_alot + } + triggered_desc = { + trigger = { has_character_flag = fund_inspiration_2070_instigator } + desc = fund_inspiration.2120.desc.them_into + } + # ROOT reacts + triggered_desc = { + trigger = { + NOT = { is_attracted_to_gender_of = scope:inspiration_owner } + } + desc = fund_inspiration.2120.desc.me_unattracted + } + triggered_desc = { + trigger = { + has_trait = zealous + sex_same_as = scope:inspiration_owner + NOT = { + faith = { has_doctrine = doctrine_homosexuality_accepted } + } + } + desc = fund_inspiration.2120.desc.me_zealous_homosexuality + } + triggered_desc = { + trigger = { + has_trait = zealous + OR = { + would_be_sinful_adulterer_trigger = yes + scope:inspiration_owner = { would_be_sinful_adulterer_trigger = yes } + } + } + desc = fund_inspiration.2120.desc.me_zealous_adultery + } + triggered_desc = { + trigger = { has_trait = chaste } + desc = fund_inspiration.2120.desc.me_chaste + } + triggered_desc = { + trigger = { has_trait = lustful } + desc = fund_inspiration.2120.desc.me_into_alot + } + triggered_desc = { + trigger = { is_attracted_to_gender_of = scope:inspiration_owner } + desc = fund_inspiration.2120.desc.me_into + } + } + } + theme = realm + override_background = { + reference = sitting_room + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOT = { has_trait = chaste } + is_attracted_to_gender_of = scope:inspiration_owner + } + animation = flirtation_left + } + triggered_animation = { + trigger = { + NOT = { is_attracted_to_gender_of = scope:inspiration_owner } + } + animation = disgust + } + triggered_animation = { + trigger = { has_trait = chaste } + animation = shock + } + } + right_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { + NOT = { has_trait = chaste } + is_attracted_to_gender_of = root + } + animation = flirtation + } + triggered_animation = { + trigger = { + NOT = { is_attracted_to_gender_of = root } + } + animation = disgust + } + triggered_animation = { + trigger = { has_trait = chaste } + animation = shock + } + } + cooldown = { years = 10 } + + trigger = { + is_adult = yes + exists = scope:inspiration + might_cheat_on_every_partner_trigger = yes + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + is_attracted_to_gender_of = root + might_cheat_on_every_partner_trigger = yes + NOR = { + has_trait = chaste + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + is_close_family_of = root + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + has_trait = celibate + } + opinion = { + target = root + value > 0 + } + might_cheat_on_every_partner_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = seducer + } + modifier = { + factor = 2 + has_trait = lustful + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_inspiration_cooldown_flag = yes + } + hidden_effect = { + random_list = { + 2 = { + trigger = { + NOT = { has_trait = chaste } + is_attracted_to_gender_of = scope:inspiration_owner + might_cheat_on_every_partner_trigger = yes + scope:inspiration_owner = { might_cheat_on_every_partner_trigger = yes } + } + modifier = { + factor = 2 + scope:inspiration_owner = { has_trait = beauty_good } + } + modifier = { + factor = 0.5 + scope:inspiration_owner = { has_trait = beauty_bad } + } + modifier = { + factor = 2 + has_trait = lustful + } + modifier = { + factor = 4 + has_trait = seducer + } + add_character_flag = fund_inspiration_2070_instigator + } + 2 = { + modifier = { + factor = 2 + has_trait = beauty_good # root + } + modifier = { + factor = 0.5 + has_trait = beauty_bad # root + } + modifier = { + factor = 2 + scope:inspiration_owner = { has_trait = lustful } + } + modifier = { + factor = 4 + scope:inspiration_owner = { has_trait = seducer } + } + } + } + } + if = { + limit = { fi_2120_homosexuality_not_accepted_trigger = yes } + if = { # Their secret + limit = { + NOT = { has_character_flag = fund_inspiration_2070_instigator } + scope:inspiration_owner = { + trigger_if = { + limit = { is_male = yes } + NOT = { has_trait = sodomite } + } + } + } + scope:inspiration_owner = { + hidden_effect = { give_homosexual_secret_or_nothing_effect = yes } + random_secret = { + type = secret_homosexual + save_scope_as = secret_scope + if = { + limit = { + NOT = { is_known_by = root } + } + reveal_to = root + } + } + } + } + else_if = { # My secret + limit = { + has_character_flag = fund_inspiration_2070_instigator + trigger_if = { + limit = { is_male = yes } + NOT = { has_trait = sodomite } + } + } + hidden_effect = { give_homosexual_secret_or_nothing_effect = yes } + random_secret = { + type = secret_homosexual + save_scope_as = secret_scope + if = { + limit = { + NOT = { is_known_by = scope:inspiration_owner } + } + reveal_to = scope:inspiration_owner + } + } + } + } + } + + option = { # Artisan accepts your seducton + name = fund_inspiration.2120.a + trigger = { has_character_flag = fund_inspiration_2070_instigator } # Initiated seduction + had_sex_with_effect = { CHARACTER = scope:inspiration_owner PREGNANCY_CHANCE = seduce_pregnancy_chance } + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + set_relation_lover = { reason = lover_inspiration_working_late target = scope:inspiration_owner } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 15 + } + change_artifact_quality_effect = { AMOUNT = -2 } + } + if = { + limit = { would_be_sinful_adulterer_trigger = yes } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + stress_impact = { + chaste = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Yes to their seduction, generic + name = fund_inspiration.2120.e + trigger = { + NOT = { has_character_flag = fund_inspiration_2070_instigator } # Did not initiate seduction + OR = { + is_ai = no + AND = { + OR = { + has_perk = unshackled_lust_perk + is_attracted_to_gender_of = scope:inspiration_owner + } + trigger_if = { + limit = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:inspiration_owner } } + OR = { + has_perk = unshackled_lust_perk + freely_accepts_sodomy_with_trigger = { CHARACTER = scope:inspiration_owner } + } + } + trigger_if = { + limit = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:inspiration_owner } } + OR = { + has_perk = subtle_desire_perk + accepts_incest_with_trigger = { CHARACTER = scope:inspiration_owner } + } + } + might_cheat_on_every_partner_trigger = yes + } + } + } + had_sex_with_effect = { CHARACTER = scope:inspiration_owner PREGNANCY_CHANCE = seduce_pregnancy_chance } + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + set_relation_lover = { reason = lover_inspiration_working_late target = scope:inspiration_owner } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 15 + } + change_artifact_quality_effect = { AMOUNT = -2 } + } + if = { + limit = { would_be_sinful_adulterer_trigger = yes } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + stress_impact = { + chaste = medium_stress_impact_gain + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # No to their seduction, generic + name = { + trigger = { + OR = { + has_trait = chaste + has_trait = celibate + } + } + text = fund_inspiration.2120.f.chaste + } + name = { + trigger = { always = yes } + text = fund_inspiration.2120.f + } + trigger = { + NOT = { has_character_flag = fund_inspiration_2070_instigator } # Did not initiate seduction + is_attracted_to_gender_of = scope:inspiration_owner + fi_2120_homosexuality_not_accepted_trigger = no + would_be_sinful_adulterer_trigger = no + scope:inspiration_owner = { would_be_sinful_adulterer_trigger = no } + } + flavor = fund_inspiration.2120.leave_flavor + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -10 + } + stress_impact = { + lustful = medium_stress_impact_gain + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = -1 + } + } + } + + option = { # Lustful attracted to instigator + name = fund_inspiration.2120.h + trigger = { + NOT = { has_character_flag = fund_inspiration_2070_instigator } # Did not initiate seduction + has_trait = lustful + is_attracted_to_gender_of = scope:inspiration_owner + } + exclusive = yes + had_sex_with_effect = { CHARACTER = scope:inspiration_owner PREGNANCY_CHANCE = seduce_pregnancy_chance } + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + set_relation_lover = { reason = lover_inspiration_working_late target = scope:inspiration_owner } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 15 + } + change_artifact_quality_effect = { AMOUNT = -2 } + } + if = { + limit = { would_be_sinful_adulterer_trigger = yes } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # No, because not attracted to them + name = fund_inspiration.2120.i + trigger = { + NOR = { + has_character_flag = fund_inspiration_2070_instigator # Did not initiate seduction + is_attracted_to_gender_of = scope:inspiration_owner + } + } + flavor = fund_inspiration.2120.leave_flavor + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = -0.5 + } + } + } + + option = { # No, because homosexuality not accepted + name = fund_inspiration.2120.j + trigger = { + is_attracted_to_gender_of = scope:inspiration_owner + fi_2120_homosexuality_not_accepted_trigger = yes + } + flavor = fund_inspiration.2120.leave_flavor + add_piety = miniscule_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + lustful = major_stress_impact_gain + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -10 + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 1 + ai_sociability = -0.5 + } + } + } + + option = { # No, because adultery not accepted + name = { + trigger = { is_married = yes } + text = fund_inspiration.2120.k.me + } + name = { + trigger = { + scope:inspiration_owner = { is_married = yes } + } + text = fund_inspiration.2120.k.them + } + trigger = { + is_attracted_to_gender_of = scope:inspiration_owner + fi_2120_homosexuality_not_accepted_trigger = no + OR = { + would_be_sinful_adulterer_trigger = yes + scope:inspiration_owner = { would_be_sinful_adulterer_trigger = yes } + } + } + flavor = fund_inspiration.2120.leave_flavor + add_piety = miniscule_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + lustful = major_stress_impact_gain + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -10 + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 1 + ai_sociability = -0.5 + } + } + } + + option = { # Insulted by instigator's boldness + name = fund_inspiration.2120.l + trigger = { + NOT = { has_character_flag = fund_inspiration_2070_instigator } # Did not initiate seduction + is_attracted_to_gender_of = scope:inspiration_owner + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = insulted_opinion + opinion = -20 + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + stress_impact = { + humble = medium_stress_impact_gain + lustful = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -1 + ai_sociability = -1 + } + } + } + + option = { # Reveal instigator's criminal homosexuality + name = fund_inspiration.2120.m + trigger = { exists = scope:secret_scope } + add_piety = minor_piety_gain + scope:secret_scope = { expose_secret = root } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = exposed_my_secret_opinion + opinion = -30 + } + change_artifact_quality_effect = { AMOUNT = -4 } + } + stress_impact = { + cynical = major_stress_impact_gain + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -1 + ai_zeal = 2 + } + } + } + + option = { # Back out of seduction, generic + name = fund_inspiration.2120.f + trigger = { + has_character_flag = fund_inspiration_2070_instigator + NOR = { + AND = { + is_attracted_to_gender_of = scope:inspiration_owner + fi_2120_homosexuality_not_accepted_trigger = no + OR = { + would_be_sinful_adulterer_trigger = yes + scope:inspiration_owner = { would_be_sinful_adulterer_trigger = yes } + } + } + AND = { + is_attracted_to_gender_of = scope:inspiration_owner + fi_2120_homosexuality_not_accepted_trigger = yes + } + } + } + flavor = fund_inspiration.2120.leave_flavor + stress_impact = { + lustful = medium_stress_impact_gain + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = scope:inspiration_owner } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = -1 + ai_boldness = -0.5 + } + } + } + + after = { + if = { + limit = { has_character_flag = fund_inspiration_2070_instigator } + remove_character_flag = fund_inspiration_2070_instigator + } + } +} + +# Helping chain +# by Joe Parkin +scripted_effect fi_2130_lifestyle_effect = { + random = { + chance = 33 + scope:inspiration_owner = { add_trait = $TRAIT$ } + progress_towards_friend_effect = { + CHARACTER = root + OPINION = 0 + REASON = friend_inspired_craftsman + } + } +} + +fund_inspiration.2130 = { + type = character_event + title = fund_inspiration.2130.t + desc = fund_inspiration.2130.desc + theme = realm + override_background = { + reference = corridor_day + } + left_portrait = { + character = root + } + right_portrait = { + character = scope:inspiration_owner + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_2130 + has_variable = banner_commission + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2130 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + scope:inspiration = { + if = { + limit = { + OR = { + has_inspiration_type = book_inspiration + has_inspiration_type = alchemy_inspiration + has_inspiration_type = research_inspiration + } + } + save_scope_value_as = { + name = fi_2130_room + value = flag:fi_2130_library + } + } + else_if = { + limit = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + } + save_scope_value_as = { + name = fi_2130_room + value = flag:fi_2130_armory + } + } + } + } + + option = { # Help find something + name = { + text = fund_inspiration.2130.a.library + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_library + } + } + name = { + text = fund_inspiration.2130.a.armory + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_armory + } + } + name = { + text = fund_inspiration.2130.a.hall + trigger = { + NOT = { exists = scope:fi_2130_room } + } + } + flavor = fund_inspiration.2130.a.flavor + custom_tooltip = fund_inspiration.2130.a.tt + trigger_event = { + id = fund_inspiration.2131 + days = 3 + } + stress_impact = { + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + } + } + + option = { # Do this + name = fund_inspiration.2130.b + flavor = fund_inspiration.2130.b.flavor + trigger = { + OR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = rakish + has_trait = lifestyle_reveler + has_trait = lifestyle_hunter + has_trait = lifestyle_gardener + has_trait = athletic + } + } + if = { + limit = { + OR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = lifestyle_reveler + } + } + scope:inspiration_owner = { + if = { + limit = { has_trait = temperate } + stress_impact = { temperate = medium_stress_impact_gain } + } + } + } + if = { + limit = { + OR = { + has_trait = lifestyle_reveler + has_trait = rakish + } + } + scope:inspiration_owner = { + if = { + limit = { has_trait = shy } + stress_impact = { temperate = medium_stress_impact_gain } + } + } + } + if = { + limit = { + OR = { + has_trait = lifestyle_hunter + has_trait = athletic + has_trait = lifestyle_gardener + } + } + scope:inspiration_owner = { + if = { + limit = { has_trait = lazy } + stress_impact = { lazy = medium_stress_impact_gain } + } + } + } + if = { + limit = { has_trait = lifestyle_hunter } + scope:inspiration_owner = { + if = { + limit = { has_trait = craven } + stress_impact = { craven = medium_stress_impact_gain } + } + } + } + if = { + limit = { + scope:inspiration_owner = { + NOR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = lifestyle_reveler + has_trait = rakish + has_trait = lifestyle_hunter + has_trait = athletic + has_trait = lifestyle_gardener + } + } + } + if = { + limit = { has_trait = drunkard } + fi_2130_lifestyle_effect = { TRAIT = drunkard } + } + else_if = { + limit = { has_trait = hashishiyah } + fi_2130_lifestyle_effect = { TRAIT = hashishiyah } + } + else_if = { + limit = { has_trait = rakish } + fi_2130_lifestyle_effect = { TRAIT = rakish } + } + else_if = { + limit = { has_trait = lifestyle_reveler } + fi_2130_lifestyle_effect = { TRAIT = lifestyle_reveler } + } + else_if = { + limit = { has_trait = lifestyle_hunter } + fi_2130_lifestyle_effect = { TRAIT = lifestyle_hunter } + } + else_if = { + limit = { has_trait = athletic } + fi_2130_lifestyle_effect = { TRAIT = athletic } + } + else = { + fi_2130_lifestyle_effect = { TRAIT = lifestyle_gardener } + } + } + random_list = { + 5 = { + send_interface_toast = { + title = fund_inspiration.2130.b.great + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + inspiration = { change_inspiration_progress = 1 } + } + } + } + 5 = { + send_interface_toast = { + title = fund_inspiration.2130.b.good + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + inspiration = { change_inspiration_progress = 1 } + } + } + } + 20 = { + send_interface_toast = { + title = fund_inspiration.2130.b.nothing + left_icon = scope:inspiration_owner + } + } + 15 = { + send_interface_toast = { + title = fund_inspiration.2130.b.bad + left_icon = scope:inspiration_owner + scope:inspiration = { change_inspiration_progress = -1 } + } + } + 5 = { + send_interface_toast = { + title = fund_inspiration.2130.b.terrible + left_icon = scope:inspiration_owner + scope:inspiration = { change_inspiration_progress = -2 } + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + } + } + + option = { # Take this + name = fund_inspiration.2130.c + flavor = fund_inspiration.2130.c.flavor + trigger = { + OR = { + OR = { + has_trait = witch + any_secret = { type = secret_witch } + } + has_trait = lifestyle_herbalist + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + } + } + if = { + limit = { + NOR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + } + any_secret = { + type = secret_witch + NOT = { is_known_by = scope:inspiration_owner } + } + scope:inspiration_owner = { is_alive = yes} + } + random = { + chance = 33 + random_secret = { + type = secret_witch + limit = { + NOT = { is_known_by = scope:inspiration_owner } + } + reveal_to = scope:inspiration_owner + } + } + } + random_list = { + 5 = { # Miracle + send_interface_toast = { + title = fund_inspiration.2130.b.great + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + inspiration = { change_inspiration_progress = 2 } + } + } + } + 9 = { # Placebo + send_interface_toast = { + title = fund_inspiration.2130.b.good + left_icon = scope:inspiration_owner + scope:inspiration = { change_inspiration_progress = 1 } + } + } + 15 = { # Homeopathy + send_interface_toast = { + title = fund_inspiration.2130.b.nothing + left_icon = scope:inspiration_owner + } + } + 5 = { # Stupidity + send_interface_toast = { + title = fund_inspiration.2130.b.bad + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + inspiration = { change_inspiration_progress = -1 } + } + } + } + 1 = { # Gross Negligence + send_interface_toast = { + title = fund_inspiration.2130.c.dead + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + death = { death_reason = death_strongest_potion } + } + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + } + } + + option = { # Oh well + name = fund_inspiration.2130.d + scope:inspiration = { change_inspiration_progress = -1 } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = annoyed_opinion + opinion = -10 + } + stress_impact = { + compassionate = medium_stress_impact_gain + diligent = medium_stress_impact_gain + generous = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 25 + } + } +} + +scripted_trigger fi_2131_artifact_type_trigger = { + NAND = { + exists = scope:artifact_1 + this = scope:artifact_1 + } + is_unique = no + artifact_durability > define:NInventory|ARTIFACT_VERY_LOW_DURABILITY + # LIBRARY + trigger_if = { + limit = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_library + } + trigger_if = { + limit = { + scope:inspiration = { + OR = { + has_inspiration_type = book_inspiration + has_inspiration_type = research_inspiration + } + } + } + artifact_type = book + } + trigger_else = { + OR = { + artifact_type = elixir + artifact_type = panacea + } + } + } + # ARMORY + trigger_else_if = { + limit = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_armory + } + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + } + } + # HALL + trigger_else = { + trigger_if = { + limit = { + scope:inspiration = { has_inspiration_type = smith_inspiration } + } + OR = { + artifact_type = regalia + artifact_type = brooch + artifact_type = necklace + } + } + trigger_else_if = { + limit = { + scope:inspiration = { has_inspiration_type = weaver_inspiration } + } + OR = { + artifact_type = tapestry + artifact_type = wall_big + } + } + trigger_else_if = { + limit = { scope:inspiration_owner.var:artifact_artisan_type = flag:artisan_type_sculpture } + artifact_type = sculpture + } + trigger_else = { + OR = { + artifact_type = cabinet + artifact_type = chest + artifact_type = throne + } + } + } +} + +fund_inspiration.2131 = { + type = character_event + title = fund_inspiration.2131.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_library + NOR = { + has_trait = education_learning + has_lifestyle = learning_lifestyle + learning >= decent_skill_rating + has_trait = scholar + has_trait = theologian + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + } + } + desc = fund_inspiration.2131.desc_library_unused + } + triggered_desc = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_library + } + desc = fund_inspiration.2131.desc_library + } + triggered_desc = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_armory + NOR = { + has_trait = education_martial + has_lifestyle = martial_lifestyle + martial >= decent_skill_rating + prowess >= decent_skill_rating + has_trait = viking + has_trait = faith_warrior + has_trait = crusader_king + has_trait = lifestyle_blademaster + has_trait = lifestyle_hunter + has_trait = berserker + has_trait = shieldmaiden + } + } + desc = fund_inspiration.2131.desc_armory_unused + } + triggered_desc = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_armory + } + desc = fund_inspiration.2131.desc_armory + } + triggered_desc = { + trigger = { court_grandeur_current_level < court_grandeur_minimum_expected_level } + desc = fund_inspiration.2131.desc_great_hall_low + } + desc = fund_inspiration.2131.desc_great_hall + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:second + scope:second = { has_court_position = antiquarian_court_position } + } + desc = fund_inspiration.2131.desc_antiquarian + } + triggered_desc = { + trigger = { + exists = scope:second + scope:second = { has_court_position = court_artificer_court_position } + } + desc = fund_inspiration.2131.artificer + } + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:artifact_1 + scope:artifact_1 = { is_equipped = yes } + } + desc = fund_inspiration.2131.desc_equipped + } + triggered_desc = { + trigger = { exists = scope:artifact_1 } + desc = fund_inspiration.2131.desc_unequipped + } + desc = fund_inspiration.2131.desc_fallback + } + } + theme = realm + override_background = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_library + } + reference = study + } + override_background = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_armory + } + reference = armory + } + override_background = { + trigger = { + NOT = { exists = scope:fi_2130_room } + } + reference = throne_room + } + left_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { exists = scope:artifact_1 } + animation = shock + } + triggered_animation = { + trigger = { + NOT = { exists = scope:artifact_1 } + } + animation = stress + } + } + right_portrait = { + character = scope:second + triggered_animation = { + trigger = { has_court_position = antiquarian_court_position } + animation = worry + } + triggered_animation = { + trigger = { has_court_position = court_artificer_court_position } + animation = happiness + } + } + artifact = { # To display the artifact in the event-window + target = scope:artifact_1 + position = lower_center_portrait + } + artifact = { # To display the artifact in the event-window + target = scope:artifact_2 + position = lower_right_portrait + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_inspiration_cooldown_flag = yes + } + if = { + limit = { + any_character_artifact = { fi_2131_artifact_type_trigger = yes } + } + random_character_artifact = { + limit = { + is_equipped = yes + fi_2131_artifact_type_trigger = yes + } + alternative_limit = { fi_2131_artifact_type_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 2 + NOT = { + root = { can_benefit_from_artifact = prev } + } + } + } + save_scope_as = artifact_1 + } + } + if = { + limit = { + any_equipped_character_artifact = { fi_2131_artifact_type_trigger = yes } + } + random_equipped_character_artifact = { + limit = { + is_equipped = no + fi_2131_artifact_type_trigger = yes + } + alternative_limit = { fi_2131_artifact_type_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 2 + NOT = { + root = { can_benefit_from_artifact = prev } + } + } + } + save_scope_as = artifact_2 + } + } + hidden_effect = { + random_list = { + 2 = { + trigger = { + any_court_position_holder = { + type = antiquarian_court_position + is_available_healthy_ai_adult = yes + this != scope:inspiration_owner + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { + is_available_healthy_ai_adult = yes + this != scope:inspiration_owner + } + save_scope_as = second + } + } + 2 = { + trigger = { + any_court_position_holder = { + type = court_artificer_court_position + is_available_healthy_ai_adult = yes + this != scope:inspiration_owner + } + } + random_court_position_holder = { + type = court_artificer_court_position + limit = { + is_available_healthy_ai_adult = yes + this != scope:inspiration_owner + } + save_scope_as = second + } + } + } + } + } + + option = { # 1st artifact + name = fund_inspiration.2131.a + trigger = { exists = scope:artifact_1 } + scope:inspiration_owner = { + if = { + limit = { + scope:artifact_1 = { + OR = { + AND = { + exists = var:quality + var:quality > 50 + } + OR = { + rarity = famed + rarity = illustrious + } + } + } + } + change_artifact_quality_effect = { AMOUNT = 8 } + inspiration = { change_inspiration_progress = 1 } + root = { + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 20 + } + stress_impact = { greedy = medium_stress_impact_gain } + } + } + else = { + change_artifact_quality_effect = { AMOUNT = 4 } + root = { + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 10 + } + stress_impact = { greedy = minor_stress_impact_gain } + } + } + } + destroy_artifact = scope:artifact_1 + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = -2 + ai_boldness = 2 + ai_rationality = -2 + } + } + } + + option = { # 2nd artifact + name = fund_inspiration.2131.b + trigger = { exists = scope:artifact_2 } + scope:inspiration_owner = { + if = { + limit = { + scope:artifact_2 = { + OR = { + AND = { + exists = var:quality + var:quality > 50 + } + OR = { + rarity = famed + rarity = illustrious + } + } + } + } + change_artifact_quality_effect = { AMOUNT = 8 } + inspiration = { change_inspiration_progress = 1 } + root = { + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 20 + } + stress_impact = { greedy = medium_stress_impact_gain } + } + } + else = { + change_artifact_quality_effect = { AMOUNT = 4 } + root = { + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 10 + } + stress_impact = { greedy = minor_stress_impact_gain } + } + } + destroy_artifact = scope:artifact_2 + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = -2 + ai_boldness = 2 + ai_rationality = -2 + } + } + } + + option = { # Melt down random stuff + name = fund_inspiration.2131.c + trigger = { + NOR = { + exists = scope:artifact_1 + exists = scope:artifact_2 + } + } + random_list = { + 10 = { + send_interface_toast = { + title = fund_inspiration.2131.d.good + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = pleased_opinion + opinion = 5 + } + } + } + 20 = { + send_interface_toast = { + title = fund_inspiration.2131.d.nothing + left_icon = scope:inspiration_owner + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -5 + } + } + } + 50 = { + send_interface_toast = { + title = fund_inspiration.2131.d.bad + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -2 } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = annoyed_opinion + opinion = -10 + } + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 0.5 + ai_rationality = -0.5 + } + } + } + + option = { # Look only + name = fund_inspiration.2131.d + trigger = { exists = scope:artifact_1 } + scope:inspiration = { change_inspiration_progress = 1 } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 5 + } + stress_impact = { + lazy = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = -1 + ai_rationality = 1 + } + } + } + + option = { # Antiquarian helps + name = fund_inspiration.2131.e + trigger = { + NOT = { exists = scope:artifact_1 } + exists = scope:second + } + reverse_add_opinion = { + target = scope:second + modifier = pleased_opinion + opinion = 5 + } + random_list = { + 5 = { + send_interface_toast = { + title = fund_inspiration.2131.d.great + left_icon = scope:inspiration_owner + right_icon = scope:second + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + } + 25 = { + send_interface_toast = { + title = fund_inspiration.2131.d.good + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + 20 = { + send_interface_toast = { + title = fund_inspiration.2131.d.nothing + left_icon = scope:inspiration_owner + } + } + 50 = { + send_interface_toast = { + title = fund_inspiration.2131.d.bad + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -2 } + } + } + } + 5 = { + send_interface_toast = { + title = fund_inspiration.2131.d.terrible + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + modifier = { + factor = 10 + OR = { + scope:inspiration_owner = { has_relation_rival = scope:second } + has_relation_rival = scope:second + } + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = -0.5 + ai_rationality = 0.5 + } + } + } + + option = { # Give up + name = fund_inspiration.2131.f + trigger = { + NOT = { exists = scope:artifact_1 } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -10 + } + stress_impact = { + diligent = medium_stress_impact_gain + patient = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_energy = -1 + } + } + } +} + +# Court Chaplain complains about book subject +# by Linnéa Thimrén +scripted_trigger fund_inspiration_3001_witch_topic_trigger = { + exists = scope:inspiration_owner.var:book_subject + scope:inspiration_owner.var:book_subject = flag:witch + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = witch + GENDER_CHARACTER = root + FAITH = root.faith + } +} +scripted_trigger fund_inspiration_3001_cannibal_topic_trigger = { + exists = scope:inspiration_owner.var:book_subject + scope:inspiration_owner.var:book_subject = flag:cannibal + trait_is_criminal_in_faith_trigger = { + TRAIT = cannibal + GENDER_CHARACTER = root + FAITH = root.faith + } +} +scripted_trigger fund_inspiration_3001_deviant_topic_trigger = { + exists = scope:inspiration_owner.var:book_subject + scope:inspiration_owner.var:book_subject = flag:deviant + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = deviant + GENDER_CHARACTER = root + FAITH = root.faith + } +} +scripted_trigger fund_inspiration_3001_torturer_topic_trigger = { + exists = scope:inspiration_owner.var:book_subject + scope:inspiration_owner.var:book_subject = flag:torturer +} +scripted_trigger fund_inspiration_3001_lustful_topic_trigger = { + exists = scope:inspiration_owner.var:book_subject + exists = scope:inspiration_owner.var:book_topic + OR = { + scope:inspiration_owner.var:book_topic = flag:intrigue_the_art_of_love + scope:inspiration_owner.var:book_topic = flag:seduction + scope:inspiration_owner.var:book_topic = flag:fertility + scope:inspiration_owner.var:book_topic = flag:love_sorcery + } + faith = { trait_is_sin = lustful } +} + +fund_inspiration.3001 = { + type = character_event + title = fund_inspiration.3001.t + desc = { + desc = fund_inspiration.3001.desc_opening + first_valid = { + triggered_desc = { + trigger = { + fund_inspiration_3001_witch_topic_trigger = yes + } + desc = fund_inspiration.3001.desc_witch + } + triggered_desc = { + trigger = { + fund_inspiration_3001_cannibal_topic_trigger = yes + } + desc = fund_inspiration.3001.desc_cannibal + } + triggered_desc = { + trigger = { + fund_inspiration_3001_torturer_topic_trigger = yes + } + desc = fund_inspiration.3001.desc_torturer + } + triggered_desc = { + trigger = { + OR = { + fund_inspiration_3001_lustful_topic_trigger = yes + fund_inspiration_3001_deviant_topic_trigger = yes + } + } + desc = fund_inspiration.3001.desc_lustful + } + desc = fund_inspiration.3001.desc_other + } + desc = fund_inspiration.3001.desc_ending + } + theme = realm + override_background = { + reference = study + } + left_portrait = { + character = scope:court_chaplain + animation = disapproval + } + right_portrait = { + character = scope:inspiration_owner + animation = anger + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { + is_available_ai_adult = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_3001 } + exists = var:book_subject + trigger_if = { #If they're writing about learning they're not writing about faith + limit = { + var:book_subject = flag:learning + } + exists = var:book_topic_category + NOT = { var:book_topic_category = flag:learning_faith } + } + } + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_ai_adult = yes } + } + + weight_multiplier = { + base = 0.1 #Very unlikely if you're just writing about whatever + modifier = { #A bit more likely if the court chaplain is a zealot + add = 0.5 + cp:councillor_court_chaplain = { has_trait = zealous } + } + #More likely if they're writing about something "bad" + modifier = { + add = 2 + OR = { + fund_inspiration_3001_witch_topic_trigger = yes + fund_inspiration_3001_cannibal_topic_trigger = yes + fund_inspiration_3001_deviant_topic_trigger = yes + fund_inspiration_3001_torturer_topic_trigger = yes + fund_inspiration_3001_lustful_topic_trigger = yes + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3001 + years = 20 + } + #To stagger any following events + add_inspiration_cooldown_flag = yes + } + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + } + } + + #Write about faith instead + option = { + name = fund_inspiration.3001.a + add_piety = minor_piety_gain + scope:court_chaplain = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + scope:inspiration_owner = { + custom_tooltip = fund_inspiration.3001.a_tt + add_opinion = { + target = root + modifier = respect_opinion + opinion = -20 + } + change_artifact_quality_effect = { + AMOUNT = -4 + } + remove_variable = book_subject + set_variable = { + name = book_subject + value = flag:learning + } + set_variable = { + name = book_topic_category + value = flag:learning_faith + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.75 + } + } + } + + #Tell court chaplain to back off + option = { + name = fund_inspiration.3001.b + scope:court_chaplain = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -20 + } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + #Invest even more into the book + option = { + name = fund_inspiration.3001.c + scope:inspiration = { invest_gold = 25 } + scope:court_chaplain = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -40 + } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 40 + } + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.75 + ai_zeal = -0.5 + ai_vengefulness = 0.5 + } + modifier = { + factor = 0 + short_term_gold < 25 + } + } + } +} + +# Book (Martial) - wanna nudge the content? +# by Linnéa Thimrén +fund_inspiration.3011 = { + type = character_event + title = fund_inspiration.3011.t + desc = { + random_valid = { + desc = fund_inspiration.3011.desc_opening_1 + desc = fund_inspiration.3011.desc_opening_2 + desc = fund_inspiration.3011.desc_opening_3 + } + desc = fund_inspiration.3011.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + is_ai = no #Topic for AIs is handled in the artifact-generation effect + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:book_subject + var:book_subject = flag:martial + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:book_topic + exists = var:book_topic_category + has_character_flag = had_event_fund_inspiration_3011 + has_character_flag = fund_book_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3011 + years = 20 + } + + #To stagger any following events + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Strategy + option = { + name = fund_inspiration.3011.a + custom_tooltip = fund_inspiration.3011.a.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:martial_strategy + } + } + } + + #Chivalry/prowess + option = { + name = fund_inspiration.3011.b + custom_tooltip = fund_inspiration.3011.b.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:martial_chivalry_prowess + } + } + } + + #I don't care + option = { + name = fund_inspiration.3011.d + custom_tooltip = fund_inspiration.3011.d.tt + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } +} + +# Book (Diplomacy) - wanna nudge the content? +# by Linnéa Thimrén +fund_inspiration.3012 = { + type = character_event + title = fund_inspiration.3012.t + desc = { + random_valid = { + desc = fund_inspiration.3011.desc_opening_1 + desc = fund_inspiration.3011.desc_opening_2 + desc = fund_inspiration.3011.desc_opening_3 + } + desc = fund_inspiration.3012.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + is_ai = no #Topic for AIs is handled in the artifact-generation effect + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:book_subject + var:book_subject = flag:diplomacy + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:book_topic + exists = var:book_topic_category + has_character_flag = had_event_fund_inspiration_3012 + has_character_flag = fund_book_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3012 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Court + option = { + name = fund_inspiration.3012.a + custom_tooltip = fund_inspiration.3012.a.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:diplomacy_court + } + } + } + + #Entertainment + option = { + name = fund_inspiration.3012.b + custom_tooltip = fund_inspiration.3012.b.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:diplomacy_entertainment + } + } + } + + #Go with what you know + option = { + name = fund_inspiration.3011.d + custom_tooltip = fund_inspiration.3011.d.tt + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } +} + +# Book (Learning) - wanna nudge the content? +# by Linnéa Thimrén +fund_inspiration.3013 = { + type = character_event + title = fund_inspiration.3013.t + desc = { + random_valid = { + desc = fund_inspiration.3011.desc_opening_1 + desc = fund_inspiration.3011.desc_opening_2 + desc = fund_inspiration.3011.desc_opening_3 + } + desc = fund_inspiration.3013.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + is_ai = no #Topic for AIs is handled in the artifact-generation effect + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:book_subject + var:book_subject = flag:learning + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:book_topic + exists = var:book_topic_category + has_character_flag = had_event_fund_inspiration_3013 + has_character_flag = fund_book_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3013 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Faith + option = { + name = fund_inspiration.3013.a + custom_tooltip = fund_inspiration.3013.a.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:learning_faith + } + } + } + + #Learning/poetry + option = { + name = fund_inspiration.3013.b + custom_tooltip = fund_inspiration.3013.b.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:learning_learning + } + } + } + + #Go with what you know + option = { + name = fund_inspiration.3011.d + custom_tooltip = fund_inspiration.3011.d.tt + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } +} + +# Book (Stewardship) - wanna nudge the content? +# by Linnéa Thimrén +fund_inspiration.3014 = { + type = character_event + title = fund_inspiration.3014.t + desc = { + random_valid = { + desc = fund_inspiration.3011.desc_opening_1 + desc = fund_inspiration.3011.desc_opening_2 + desc = fund_inspiration.3011.desc_opening_3 + } + desc = fund_inspiration.3014.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + is_ai = no #Topic for AIs is handled in the artifact-generation effect + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:book_subject + var:book_subject = flag:stewardship + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:book_topic + exists = var:book_topic_category + has_character_flag = had_event_fund_inspiration_3014 + has_character_flag = fund_book_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3014 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Rule + option = { + name = fund_inspiration.3014.a + custom_tooltip = fund_inspiration.3014.a.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:stewardship_rule + } + } + } + + #Development + option = { + name = fund_inspiration.3014.b + custom_tooltip = fund_inspiration.3014.b.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:stewardship_development + } + } + } + + #Go with what you know + option = { + name = fund_inspiration.3011.d + custom_tooltip = fund_inspiration.3011.d.tt + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } +} + +# Book (Intrigue) - wanna nudge the content? +# by Linnéa Thimrén +fund_inspiration.3015 = { + type = character_event + title = fund_inspiration.3015.t + desc = { + random_valid = { + desc = fund_inspiration.3011.desc_opening_1 + desc = fund_inspiration.3011.desc_opening_2 + desc = fund_inspiration.3011.desc_opening_3 + } + desc = fund_inspiration.3015.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + is_ai = no #Topic for AIs is handled in the artifact-generation effect + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:book_subject + var:book_subject = flag:intrigue + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:book_topic + exists = var:book_topic_category + has_character_flag = had_event_fund_inspiration_3015 + has_character_flag = fund_book_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3015 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Scheme + option = { + name = fund_inspiration.3015.a + custom_tooltip = fund_inspiration.3015.a.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:intrigue_scheme + } + } + } + + #Seduction + option = { + name = { + trigger = { + is_attracted_to_men = yes + is_attracted_to_women = no + } + text = fund_inspiration.3015.b_men + } + name = { + trigger = { + is_attracted_to_women = yes + is_attracted_to_men = no + } + text = fund_inspiration.3015.b_women + } + name = { + trigger = { + is_attracted_to_men = yes + is_attracted_to_women = yes + } + text = fund_inspiration.3015.b_both + } + name = { + trigger = { + is_attracted_to_men = no + is_attracted_to_women = no + } + text = fund_inspiration.3015.b_none + } + trigger = { + is_adult = yes #Just to make sure + } + custom_tooltip = fund_inspiration.3015.b.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:intrigue_seduction + } + } + } + + #Go with what you know + option = { + name = fund_inspiration.3011.d + custom_tooltip = fund_inspiration.3011.d.tt + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } +} + +# Book - Nemesis is no longer nemesis and you're writing about your hatred +# by Linnéa Thimrén +fund_inspiration.3030 = { + title = fund_inspiration.3030.t + type = character_event + desc = { + desc = fund_inspiration.3030.desc_opening + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:prev_nemesis = { is_alive = yes } + } + desc = fund_inspiration.3030.desc + } + desc = fund_inspiration.3030.desc_dead + } + } + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_coward + } + right_portrait = scope:prev_nemesis + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { + exists = var:book_subject + var:book_subject = flag:relationship + exists = var:book_topic + var:book_topic = flag:nemesis + exists = var:book_topic_relationship + var:book_topic_relationship = { + NOT = { has_relation_nemesis = root } #You're no longer their nemesis :( + } + NOT = { has_character_flag = had_event_fund_inspiration_3030 } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3030 + years = 20 + } + } + scope:inspiration_owner.var:book_topic_relationship = { + save_scope_as = prev_nemesis + } + } + + # Continue writing + option = { + name = fund_inspiration.3030.a + custom_tooltip = fund_inspiration.3030.a.tt + add_stress = medium_stress_gain + ai_chance = { + base = 0 + } + } + + # Scrap it + option = { + name = fund_inspiration.3030.b + end_inspiration_sponsorship = scope:inspiration + #Let them start over + inspiration_completion_effect = yes + ai_chance = { + base = 100 + } + } +} + +# Book - Soulmate is no longer soulmate and you're writing about your love +# by Linnéa Thimrén +fund_inspiration.3031 = { + type = character_event + title = fund_inspiration.3031.t + desc = { + desc = fund_inspiration.3030.desc_opening + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:prev_soulmate = { is_alive = yes } + } + desc = fund_inspiration.3031.desc + } + desc = fund_inspiration.3031.desc_dead + } + } + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_coward + } + right_portrait = scope:prev_soulmate + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { + exists = var:book_subject + var:book_subject = flag:relationship + exists = var:book_topic + var:book_topic = flag:soulmate + exists = var:book_topic_relationship + var:book_topic_relationship = { + NOT = { has_relation_soulmate = root } #You're no longer soulmates :( + } + NOT = { has_character_flag = had_event_fund_inspiration_3031 } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3031 + years = 20 + } + } + scope:inspiration_owner.var:book_topic_relationship = { + save_scope_as = prev_soulmate + } + } + + # Continue writing + option = { + name = fund_inspiration.3031.a + custom_tooltip = fund_inspiration.3031.a.tt + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + add_stress = medium_stress_gain + ai_chance = { + base = 0 + } + } + + # Scrap it + option = { + name = fund_inspiration.3031.b + end_inspiration_sponsorship = scope:inspiration + #Let them start over + inspiration_completion_effect = yes + ai_chance = { + base = 100 + } + } +} + +# Weaver - Weaver is stealing clothes +# by Linnéa Thimrén +scripted_trigger fund_inspiration_4001_courtier_trigger = { + is_available_ai_adult = yes + this != scope:inspiration_owner +} + +fund_inspiration.4001 = { + type = character_event + title = fund_inspiration.4001.t + desc = fund_inspiration.4001.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = dismissal + } + right_portrait = { + character = scope:courtier + animation = anger + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = weaver_inspiration + inspiration_owner = { + is_available_ai_adult = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_4001 + has_variable = banner_commission + } + } + } + any_courtier = { + fund_inspiration_4001_courtier_trigger = yes + } + + NOT = { + government_has_flag = government_is_tribal # No changing amenities above what's legal for tribals + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_4001 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_weaver_inspiration_event_cooldown + days = { 30 60 } + } + } + random_courtier = { + limit = { + fund_inspiration_4001_courtier_trigger = yes + } + save_scope_as = courtier + } + } + + #Chastise them + option = { + name = fund_inspiration.4001.a + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -15 + } + } + scope:courtier = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + #Approve + option = { + name = fund_inspiration.4001.b + # Lower fashion one step + if = { + limit = { + amenity_level = { target = court_fashion value = max_amenity_level } + } + set_amenity_level = { type = court_fashion value = very_high_amenity_level } + } + else_if = { + limit = { + amenity_level = { target = court_fashion value = very_high_amenity_level } + } + set_amenity_level = { type = court_fashion value = high_amenity_level } + } + else_if = { + limit = { + amenity_level = { target = court_fashion value = high_amenity_level } + } + set_amenity_level = { type = court_fashion value = medium_amenity_level } + } + else_if = { + limit = { + amenity_level = { target = court_fashion value = medium_amenity_level } + } + set_amenity_level = { type = court_fashion value = low_amenity_level } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + scope:courtier = { + add_opinion = { + target = root + modifier = dismissive_opinion + opinion = -20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -0.5 + } + } + } +} + + +# Adventurer - Choose your item-type +# By Bianca Savazzi and Linnéa Thimrén +fund_inspiration.5011 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.5011.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + is_physically_able_ai_adult = yes + has_no_inspiration_event_cooldown = yes + NOR = { + exists = var:adventure_type + has_character_flag = had_event_fund_inspiration_5011 + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + + save_scope_as = actor + scope:inspiration_owner = { + assign_quirk_effect = yes + save_scope_as = recipient + add_character_flag = { + flag = had_event_fund_inspiration_5011 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + + # Go find an epic artifact! + option = { + name = fund_inspiration.5011.e + trigger = { + scope:inspiration_owner = { + adventure_inspiration_average_skill_value >= medium_inspiration_skill + } + } + scope:inspiration_owner = { + set_variable = { + name = adventure_type + value = flag:epic_quest + } + } + + ai_chance = { + base = 50 + modifier = { + add = 25 + OR = { + has_trait = ambitious + has_trait = adventurer + } + } + } + } + + # skull or hide + option = { + name = fund_inspiration.5011.a + scope:inspiration_owner = { + set_variable = { + name = adventure_type + value = flag:skull_or_hide + } + } + + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = vengeful + } + modifier = { + add = 25 + OR = { + has_martial_lifestyle_trait_trigger = yes + has_lifestyle = martial_lifestyle + } + } + } + } + + # trinket + option = { + name = fund_inspiration.5011.b + + scope:inspiration_owner = { + set_variable = { + name = adventure_type + value = flag:trinket + } + } + + ai_chance = { + base = 25 + modifier = { + add = 25 + has_trait = greedy + } + modifier = { + add = 25 + OR = { + has_stewardship_lifestyle_trait_trigger = yes + has_lifestyle = stewardship_lifestyle + } + } + modifier = { + factor = 0 + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = miscellaneous + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:inspiration_owner = { + smith_inspiration_average_skill_value < high_inspiration_skill + } + any_character_artifact = { + count >= 4 + artifact_slot_type = miscellaneous + } + } + } + } + } + } + + # tapestry or fabric + option = { + name = fund_inspiration.5011.c + + scope:inspiration_owner = { + set_variable = { + name = adventure_type + value = flag:tapestry_or_fabric + } + } + + ai_chance = { + base = 25 + modifier = { + add = 25 + has_focus_learning = yes + } + modifier = { + add = 25 + OR = { + has_learning_lifestyle_trait_trigger = yes + has_lifestyle = learning_lifestyle + } + } + } + } + + # default option of "do what you want" + option = { + name = fund_inspiration.5011.d + + scope:inspiration_owner = { + set_variable = { + name = adventure_type + value = flag:free_reign + } + } + + ai_chance = { + base = 5 + modifier = { + add = 25 + OR = { + has_trait = arbitrary + has_trait = lazy + } + } + } + } + + after = { + #To start the adventure for the inspiration owner + fund_adventure_inspiration_start_effect = { ADVENTURER = scope:inspiration_owner } + } +} + +#Adventurer gets lost... this can be a good thing though +fund_inspiration.5021 = { + type = character_event + title = fund_inspiration.5021.t + desc = fund_inspiration.5021.desc + theme = realm + + left_portrait = { + character = scope:adventurer_aide + animation = beg + } + + right_portrait = { + character = scope:inspiration_owner + animation = happiness + } + cooldown = { years = 15 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_5021 } + adventure_inspiration_average_skill_value < high_inspiration_skill + } + } + + weight_multiplier = { + base = 1 + # More likely to happen if the adventurer is adventurous, and maybe a bit scatterbrained + modifier = { + add = 2 + scope:inspiration_owner = { + has_trait = fickle + } + } + modifier = { + add = 2 + scope:inspiration_owner = { + has_trait = adventurer + } + } + modifier = { + add = 2 + scope:inspiration_owner = { + has_trait = brave + } + } + modifier = { + add = 2 + scope:inspiration_owner = { + has_trait = stubborn #refusing to ask for direction + } + } + modifier = { + add = -1 + scope:inspiration_owner = { + adventure_inspiration_average_skill_value >= high_inspiration_skill + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_5021 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + + #Prioritize location that root doesn't have a county in + hidden_effect = { + random_list = { + 1 = { + # Africa + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_africa + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_africa + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:africa } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_africa + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_africa + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_africa_location + value = yes + } + } + 1 = { + # Europe + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_europe + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_europe + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:europe } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_europe + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_europe + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_europe_location + value = yes + } + } + 1 = { + # Middle East + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_middle_east + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_middle_east + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:middle_east } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_middle_east + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_middle_east + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_middle_east_location + value = yes + } + } + 1 = { + # Asia Minor + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_asia_minor + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_asia_minor + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:asia_minor } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_asia_minor + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_asia_minor + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_asia_minor_location + value = yes + } + } + 1 = { + # India + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_india + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_india + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:india } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_india + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_india + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_india_location + value = yes + } + } + 1 = { + # Steppe + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_steppe + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_steppe + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:steppe } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_steppe + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_steppe + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_steppe_location + value = yes + } + } + 1 = { + # Persia + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_middle_east_persia + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_middle_east_persia + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:middle_east_persia } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_middle_east_persia + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_middle_east_persia + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_middle_east_persia_location + value = yes + } + } + 1 = { + # Burma + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_burma + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_burma + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:burma } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_burma + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_burma + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_burma_location + value = yes + } + } + 1 = { + # Tibet + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_tibet + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_tibet + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:tibet } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_tibet + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_tibet + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_tibet_location + value = yes + } + } + 1 = { + # East Asia + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_asia_east + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_asia_east + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:east_asia } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_asia_east + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_asia_east + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_east_asia_location + value = yes + } + } + } + + if = { + limit = { exists = scope:adventuring_location } + create_character = { + location = root.location + template = hunter_template + culture = scope:adventuring_location.culture + faith = scope:adventuring_location.faith + dynasty = none + save_scope_as = adventurer_aide + } + } + else = { # Fallback in case that a region could not be selected for some reason, purely theoretical fix + create_character = { + location = root.location + template = hunter_template + culture = root.culture + faith = root.faith + dynasty = none + save_scope_as = adventurer_aide + } + debug_log = "WARNING: create_character fallback triggered in ep1 fund_inspiration.5021, something went wrong!" + } + } + } + + #No, go back! + option = { + name = fund_inspiration.5021.a + custom_tooltip = fund_inspiration.5021.a.tt + scope:inspiration_owner = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -25 + } + } + + ai_chance = { + base = 10 + ai_greed_target_modifier = { VALUE = 25 } #not too high since there's a chance to get a cooler artifact + } + } + + #Explore! + option = { + name = fund_inspiration.5021.b + custom_tooltip = fund_inspiration.5021.b.tt + scope:inspiration = { + invest_gold = 60 + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + scope:inspiration_owner = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 25 + } + if = { + limit = { + exists = scope:world_africa_location + } + set_variable = { + name = adventure_destination + value = flag:africa + } + } + else_if = { + limit = { + exists = scope:world_europe_location + } + set_variable = { + name = adventure_destination + value = flag:europe + } + } + else_if = { + limit = { + exists = scope:world_middle_east_location + } + set_variable = { + name = adventure_destination + value = flag:middle_east + } + } + else_if = { + limit = { + exists = scope:world_asia_minor_location + } + set_variable = { + name = adventure_destination + value = flag:asia_minor + } + } + else_if = { + limit = { + exists = scope:world_india_location + } + set_variable = { + name = adventure_destination + value = flag:india + } + } + else_if = { + limit = { + exists = scope:world_steppe_location + } + set_variable = { + name = adventure_destination + value = flag:steppe + } + } + else_if = { + limit = { + exists = scope:world_middle_east_persia_location + } + set_variable = { + name = adventure_destination + value = flag:middle_east_persia + } + } + else_if = { + limit = { + exists = scope:world_burma_location + } + set_variable = { + name = adventure_destination + value = flag:burma + } + } + else_if = { + limit = { + exists = scope:world_tibet_location + } + set_variable = { + name = adventure_destination + value = flag:tibet + } + } + else_if = { + limit = { + exists = scope:world_east_asia_location + } + set_variable = { + name = adventure_destination + value = flag:east_asia + } + } + hidden_effect = { + scope:inspiration_owner = { + set_location = { + location = scope:adventuring_location.title_province + stick_to_location = yes + } + } + } + } + + ai_chance = { + base = 10 + ai_boldness_target_modifier = { VALUE = 100 } + modifier = { + short_term_gold < 60 #shouldn't spend money they don't have... + factor = 0 + } + } + } + + after = { + scope:adventurer_aide = { + silent_disappearance_effect = yes + } + } +} + +# Postcard from your adventurer 6001-6006! + +# Postcard from the Steppe + +fund_inspiration.6001 = { + type = letter_event + opening = { desc = fund_inspiration.6001.t } + desc = fund_inspiration.6001.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + location = {#We can't have an adventurer writing home about what a region is like that we belong to + NOT = { + geographical_region = world_steppe + } + } + NOT = { + any_character_artifact = { + has_variable = morin_khuur_ornament + } + } + is_ai = no + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6001 } + has_no_inspiration_event_cooldown = yes + OR = { + var:adventure_destination = flag:steppe + var:adventure_destination = flag:steppe_east + var:adventure_destination = flag:steppe_west + } + NOT = { + any_character_artifact = { + has_variable = morin_khuur_ornament + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6001 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = morin_khuur_ornament_name + description = morin_khuur_ornament_description + type = miscellaneous + visuals = medallion + modifier = artifact_heavy_cavalry_toughness_1_modifier + creator = scope:inspiration_owner + save_scope_as = morin_khuur_ornament + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:morin_khuur_ornament = { + flag_as_trash_artifact = yes + set_variable = { + name = morin_khuur_ornament + value = yes + } + } + } + } + #Keep the fiddle-head for yourself + option = { + name = fund_inspiration.6001.a + ai_chance = { + base = 50 + } + } + #If the court musician is present, let them have this former piece of an instrument + option = { + name = fund_inspiration.6001.b + trigger = { + any_court_position_holder = { + has_court_position = court_musician_court_position + } + } + random_court_position_holder = { + limit = { + has_court_position = court_musician_court_position + } + save_scope_as = court_musician + } + scope:morin_khuur_ornament = { + set_owner = scope:court_musician + } + reverse_add_opinion = { + target = scope:court_musician + modifier = grateful_opinion + opinion = 15 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } +} + +#Postcard from India + +fund_inspiration.6002 = { + type = letter_event + opening = { desc = fund_inspiration.6002.t } + desc = fund_inspiration.6002.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + location = {#We can't have an adventurer writing home about what a region is like that we belong to + NOT = { + geographical_region = world_india + } + } + NOT = { + any_character_artifact = { + has_variable = animal_ring + } + } + is_ai = no + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6002 } + has_no_inspiration_event_cooldown = yes + OR = { + var:adventure_destination = flag:india + var:adventure_destination = flag:india_deccan + var:adventure_destination = flag:india_bengal + var:adventure_destination = flag:india_rajastan + } + NOT = { + any_character_artifact = { + has_variable = animal_ring + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6002 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = animal_ring_name + description = animal_ring_description + type = miscellaneous + visuals = ring + modifier = artifact_scheme_resistance_add_2_modifier + creator = scope:inspiration_owner + save_scope_as = animal_ring + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:animal_ring = { + flag_as_trash_artifact = yes + set_variable = { + name = animal_ring + value = yes + } + } + } + } + #Keep the ring + option = { + name = fund_inspiration.6002.a + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + #Sell the ring for gold + option = { + name = fund_inspiration.6002.b + destroy_artifact = scope:animal_ring + add_gold = minor_gold_value + ai_chance = { + base = 200 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = 0.5 + } + } + } +} + +#Postcard from Africa + +fund_inspiration.6003 = { + type = letter_event + opening = { desc = fund_inspiration.6003.t } + desc = fund_inspiration.6003.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + location = {#We can't have an adventurer writing home about what a region is like that we belong to + NOT = { + geographical_region = world_africa + } + } + NOT = { + any_character_artifact = { + has_variable = ostrich_shell_necklace + } + } + is_ai = no + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6003 } + has_no_inspiration_event_cooldown = yes + OR = { + var:adventure_destination = flag:africa + var:adventure_destination = flag:africa_north + var:adventure_destination = flag:africa_west + } + NOT = { + any_character_artifact = { + has_variable = ostrich_shell_necklace + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6003 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = ostrich_shell_necklace_name + description = ostrich_shell_necklace_description + type = miscellaneous + visuals = necklace + modifier = artifact_attraction_opinion_2_modifier + creator = scope:inspiration_owner + save_scope_as = ostrich_shell_necklace + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect = { + scope:ostrich_shell_necklace = { + flag_as_trash_artifact = yes + set_variable = { + name = ostrich_shell_necklace + value = yes + } + } + } + if = { + limit = { is_married = yes } + random_spouse = { save_scope_as = event_spouse } + } + } + option = { + name = fund_inspiration.6003.a + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + } + } + } + option = { + name = fund_inspiration.6003.b + trigger = { exists = scope:event_spouse } + reverse_add_opinion = { + target = scope:event_spouse + modifier = grateful_opinion + opinion = 15 + } + scope:ostrich_shell_necklace = { + set_owner = scope:event_spouse + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + } + } + } +} + +# Postcard from the Middle East + +fund_inspiration.6004 = { + type = letter_event + opening = { desc = fund_inspiration.6004.t } + desc = fund_inspiration.6004.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + NOT = { + any_character_artifact = { + has_variable = pilgrimage_figurine + } + } + location = {#We can't have an adventurer writing home about what a region is like that we belong to + NOR = { + geographical_region = world_middle_east + geographical_region = world_middle_east_jerusalem + geographical_region = world_middle_east_persia + } + } + is_ai = no + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6004 } + has_no_inspiration_event_cooldown = yes + OR = { + var:adventure_destination = flag:middle_east + var:adventure_destination = flag:middle_east_jerusalem + var:adventure_destination = flag:middle_east_persia + } + NOT = { + any_character_artifact = { + has_variable = pilgrimage_figurine + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6004 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = pilgrimage_figurine_name + description = pilgrimage_figurine_description + type = miscellaneous + visuals = pouch + modifier = artifact_knight_limit_1_modifier + creator = scope:inspiration_owner + save_scope_as = pilgrimage_figurine + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:pilgrimage_figurine = { + flag_as_trash_artifact = yes + set_variable = { + name = pilgrimage_figurine + value = yes + } + } + } + } + + option = { + name = fund_inspiration.6004.a + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } +} + +#Postcard from Europe + +fund_inspiration.6005 = { + type = letter_event + opening = { desc = fund_inspiration.6005.t } + desc = fund_inspiration.6005.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + NOT = { + any_character_artifact = { + has_variable = saint_margaret_fingernails + } + } + is_ai = no + NOT = { + location = { + geographical_region = world_europe #We can't have an adventurer writing home about what Europeans are like if you are also a European. + } + } + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6005 } + has_no_inspiration_event_cooldown = yes + OR = { + var:adventure_destination = flag:europe + var:adventure_destination = flag:europe_east + var:adventure_destination = flag:europe_west + var:adventure_destination = flag:europe_north + var:adventure_destination = flag:europe_south + } + NOT = { + any_character_artifact = { + has_variable = saint_margaret_fingernails + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6005 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = saint_margaret_fingernails_name + description = saint_margaret_fingernails_description + type = pedestal + visuals = reliquary + modifier = artifact_prowess_1_modifier + creator = scope:inspiration_owner + save_scope_as = saint_margaret_fingernails + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:saint_margaret_fingernails = { + flag_as_trash_artifact = yes + set_variable = { + name = saint_margaret_fingernails + value = yes + } + } + } + } + + option = { + name = fund_inspiration.6005.a + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -30 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -0.5 + } + } + } + option = { + name = fund_inspiration.6005.b + custom_tooltip = fund_inspiration.6005.b.tt + scope:inspiration_owner = { + add_character_flag = adventurer_tired_of_europe + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_compassion = 0.5 + } + } + } +} + +# Postcard from Asia Minor + +fund_inspiration.6006 = { + type = letter_event + opening = { desc = fund_inspiration.6006.t } + desc = fund_inspiration.6006.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + location = {#We can't have an adventurer writing home about what a region is like that we belong to + NOT = { + geographical_region = world_asia_minor + } + } + NOT = { + any_character_artifact = { + has_variable = seahorse_brooch + } + } + is_ai = no + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6006 } + has_no_inspiration_event_cooldown = yes + var:adventure_destination = flag:asia_minor + NOT = { + any_character_artifact = { + has_variable = seahorse_brooch + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6006 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = seahorse_brooch_name + description = seahorse_brooch_description + type = miscellaneous + visuals = brooch + modifier = artifact_tolerance_advantage_mod_1_modifier + creator = scope:inspiration_owner + save_scope_as = seahorse_brooch + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect = { + scope:seahorse_brooch = { + flag_as_trash_artifact = yes + set_variable = { + name = seahorse_brooch + value = yes + } + } + } + } + option = { + name = fund_inspiration.6006.a + trigger = { + NOT = { government_has_flag = government_is_tribal } + } + if = { + limit = { + amenity_level = { + target = court_food_quality + value < medium_amenity_level + } + } + set_amenity_level = { type = court_food_quality value = 3 } + } + else_if = { + limit = { + amenity_level = { + target = court_food_quality + value < high_amenity_level + } + } + set_amenity_level = { type = court_food_quality value = 4 } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.5 + } + } + } + option = { + name = fund_inspiration.6006.b + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.5 + } + } + } +} + + + +# Tiny chest miniature + +fund_inspiration.6100 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6100.desc + theme = realm + + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = worry + } + + right_portrait = { + character = root + animation = personality_bold + } + + cooldown = { years = 5 } + + trigger = { + scope:inspiration_owner = { + exists = var:artifact_artisan_type + var:artifact_artisan_type = flag:artisan_type_chest + } + NOT = { + # Don't get it twice + any_character_artifact = { + exists = var:miniature_collection_tiny_chest + } + } + } + + immediate = { + scope:inspiration_owner = { + create_artifact = { + name = tiny_chest_trinket_name + description = tiny_chest_trinket_description + type = miscellaneous + visuals = chest + modifier = artifact_build_time_1_modifier + save_scope_as = tiny_chest_trinket + template = child_toy_template + } + } + hidden_effect_new_object = { + scope:tiny_chest_trinket = { + flag_as_trash_artifact = yes + set_variable = { + name = miniature_collection_tiny_chest + } + } + } + } + + option = { + name = fund_inspiration.6100.a + add_gold = minor_gold_value + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = cruelty_opinion + opinion = -10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + option = { + name = fund_inspiration.6100.b + scope:tiny_chest_trinket = { + set_owner = root + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = respect_opinion + opinion = 10 + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } +} + +#Tiny box miniature + +fund_inspiration.6101 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6101.desc + theme = realm + + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + right_portrait = { + character = root + animation = happiness + } + + cooldown = { years = 5 } + + trigger = { + scope:inspiration_owner = { + exists = var:artifact_artisan_type + var:artifact_artisan_type = flag:artisan_type_box + } + NOT = { + # Don't get it twice + any_character_artifact = { + exists = var:miniature_collection_tiny_box + } + } + any_court_position_holder = { + has_court_position = antiquarian_court_position + is_available_ai_adult = yes + } + } + + immediate = { + scope:inspiration_owner = { + create_artifact = { + name = tiny_box_trinket_name + description = tiny_box_trinket_description + type = miscellaneous + visuals = small_box + modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier + save_scope_as = tiny_box_trinket + template = child_toy_template + } + } + hidden_effect_new_object = { + scope:tiny_box_trinket = { + flag_as_trash_artifact = yes + set_variable = { + name = miniature_collection_tiny_box + } + } + } + random_court_position_holder = { + limit = { + has_court_position = antiquarian_court_position + is_available_ai_adult = yes + } + save_scope_as = antiquarian + } + } + + option = { + name = fund_inspiration.6101.a + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + root.dynasty ?= { + add_dynasty_prestige = miniscule_dynasty_prestige_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { + name = fund_inspiration.6101.b + add_learning_lifestyle_xp = medium_lifestyle_xp + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + else_if = { + limit = { + has_trait = lifestyle_poet + has_trait_xp = { + trait = lifestyle_poet + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_poet + value = 10 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = -0.5 + } + } + } + + option = { + name = fund_inspiration.6101.c + scope:tiny_box_trinket = { + set_owner = root + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = minor_court_grandeur_gain + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + + +#Tiny sculpture miniature + +fund_inspiration.6102 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6102.desc + theme = realm + + override_background = { + reference = corridor_night + } + left_portrait = { + character = scope:inspiration_owner + animation = schadenfreude + } + + right_portrait = { + character = root + animation = pain + } + + cooldown = { years = 5 } + + trigger = { + scope:inspiration_owner = { + exists = var:artifact_artisan_type + var:artifact_artisan_type = flag:artisan_type_sculpture + } + NOT = { + # Don't get it twice + any_character_artifact = { + exists = var:miniature_collection_tiny_sculpture + } + } + } + + immediate = { + save_scope_as = statue_owner + scope:inspiration_owner = { + create_artifact = { + name = tiny_sculpture_trinket_name + description = tiny_sculpture_trinket_description + type = miscellaneous + visuals = pocket_figurine + modifier = artifact_dynasty_opinion_1_modifier + save_scope_as = tiny_sculpture_trinket + template = child_toy_template + } + } + hidden_effect_new_object = { + scope:tiny_sculpture_trinket = { + flag_as_trash_artifact = yes + set_variable = { + name = miniature_collection_tiny_sculpture + } + } + } + increase_wounds_effect = { REASON = miniatures } + } + + option = { + name = fund_inspiration.6102.a + scope:inspiration_owner = { + save_scope_as = physician + } + random_list = { + 50 = { + modifier = { + factor = scope:inspiration_owner.learning + } + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + hidden_effect = { + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.cure_toast + + show_as_tooltip = { + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + } + } + } + } + 50 = { + increase_wounds_effect = { REASON = miniatures } + hidden_effect = { + destroy_artifact = scope:tiny_sculpture_trinket + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.failure_toast + custom_tooltip = fund_inspiration.6102.failure_toast_desc + } + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { + name = fund_inspiration.6102.b + trigger = { court_physician_available_trigger = yes } + save_court_physician_as_effect = { SCOPE_NAME = physician } + random_list = { + 25 = { + modifier = { + factor = scope:physician.physician_safe_treatment_skill_factor + } + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + hidden_effect = { + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.cure_toast + + show_as_tooltip = { + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + } + } + } + } + 50 = { + hidden_effect = { + destroy_artifact = scope:tiny_sculpture_trinket + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.failure_toast + custom_tooltip = fund_inspiration.6102.failure_toast_desc + } + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { + name = fund_inspiration.6102.c + save_scope_as = physician + random_list = { + 25 = { + modifier = { + factor = root.learning + } + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + hidden_effect = { + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.cure_toast + + show_as_tooltip = { + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + } + scope:tiny_sculpture_trinket = { + set_owner = root + } + } + } + } + 50 = { + increase_wounds_effect = { REASON = miniatures } + hidden_effect = { + destroy_artifact = scope:tiny_sculpture_trinket + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.failure_toast + custom_tooltip = fund_inspiration.6102.failure_toast_desc + } + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } +} + +# Tiny cabinet miniature + +fund_inspiration.6103 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6103.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = happiness + } + + right_portrait = { + character = root + animation = boredom + } + + cooldown = { years = 5 } + + trigger = { + scope:inspiration_owner = { + exists = var:artifact_artisan_type + var:artifact_artisan_type = flag:artisan_type_cabinet + #Mena and Indian cabinets are tables and diwans! + NOR = { + artifact_use_indian_building_visuals_trigger = yes + artifact_use_mena_building_visuals_trigger = yes + } + } + NOT = { + # Don't get it twice + any_character_artifact = { + exists = var:miniature_collection_tiny_cabinet + } + } + } + + immediate = { + scope:inspiration_owner = { + create_artifact = { + name = tiny_cabinet_trinket_name + description = tiny_cabinet_trinket_description + type = miscellaneous + visuals = cabinet_trinket + modifier = artifact_build_time_2_modifier + save_scope_as = tiny_cabinet_trinket + template = child_toy_template + } + } + hidden_effect_new_object = { + scope:tiny_cabinet_trinket = { + flag_as_trash_artifact = yes + set_variable = { + name = miniature_collection_tiny_cabinet + } + } + } + } + + option = { + name = fund_inspiration.6103.a + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = respect_opinion + opinion = 10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 0.5 + } + } + } + + option = { + name = fund_inspiration.6103.b + end_inspiration_sponsorship = scope:inspiration + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = respect_opinion + opinion = 10 + } + scope:tiny_cabinet_trinket = { + set_owner = root + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } +} + + + +#Tiny throne miniature + +fund_inspiration.6104 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6104.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + right_portrait = { + character = root + animation = happiness + } + + cooldown = { years = 5 } + + trigger = { + scope:inspiration_owner = { + exists = var:artifact_artisan_type + var:artifact_artisan_type = flag:artisan_type_throne + } + NOT = { + # Don't get it twice + any_character_artifact = { + exists = var:miniature_collection_tiny_throne + } + } + } + + immediate = { + scope:inspiration_owner = { + create_artifact = { + name = tiny_throne_trinket_name + description = tiny_throne_trinket_description + type = miscellaneous + visuals = tiny_throne_trinket + modifier = artifact_child_opinion_2_modifier + save_scope_as = tiny_throne_trinket + template = child_toy_template + } + } + hidden_effect_new_object = { + scope:tiny_throne_trinket = { + flag_as_trash_artifact = yes + set_variable = { + name = miniature_collection_tiny_throne + } + } + } + } + + option = { + name = fund_inspiration.6104.a + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = respect_opinion + opinion = 10 + } + scope:tiny_throne_trinket = { + set_owner = root + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { + name = fund_inspiration.6104.b + trigger = { + OR = { + age < 5 + age > 18 + } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = dismissive_opinion + opinion = -10 + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = minor_court_grandeur_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { + name = fund_inspiration.6104.c + trigger = { + age > 5 + age < 18 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = dismissive_opinion + opinion = -10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } +} + + +#Ruler collected all the miniatures! + +fund_inspiration.6105 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6105.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + right_portrait = { + character = root + animation = happiness + } + override_background = { + reference = corridor_day + } + trigger = { + AND = { + any_character_artifact = { + exists = var:miniature_collection_tiny_chest + } + any_character_artifact = { + exists = var:miniature_collection_tiny_sculpture + } + any_character_artifact = { + exists = var:miniature_collection_tiny_cabinet + } + any_character_artifact = { + exists = var:miniature_collection_tiny_throne + } + any_character_artifact = { + exists = var:miniature_collection_tiny_box + } + } + NOT = { has_character_flag = has_had_fund_inspiration_6105_miniatures_event } + } + + immediate = { + add_character_flag = has_had_fund_inspiration_6105_miniatures_event + } + + option = { + name = fund_inspiration.6105.a + progress_towards_friend_effect = { + CHARACTER = scope:inspiration_owner + OPINION = default_friend_opinion + REASON = friend_miniature_game + } + add_character_modifier = { + modifier = playing_with_miniatures + years = 5 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { + name = fund_inspiration.6105.b + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = dismissive_opinion + opinion = -10 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +# Weaver is too much of a modernist + +scripted_trigger artistic_courtier_trigger = { + is_available_ai_adult = yes + is_courtier_of = root +} + +fund_inspiration.6200 = { + type = character_event + title = fund_inspiration.6200.t + desc = fund_inspiration.6200.desc + theme = realm + + left_portrait = { + character = scope:artistic_courtier_1 + animation = happiness + } + + right_portrait = { + character = scope:artistic_courtier_2 + animation = scheme + } + cooldown = { years = 5 } + + trigger = { + scope:inspiration = { + has_inspiration_type = weaver_inspiration + inspiration_owner = { #They know what tapestry they want to make + exists = var:artifact_tapestry_scene + var:artifact_tapestry_scene = flag:geometric_patterns + } + } + any_courtier_or_guest = { + artistic_courtier_trigger = yes + count >= 2 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_courtier = { + limit = { artistic_courtier_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 10 + learning > high_skill_rating + } + } + save_scope_as = artistic_courtier_1 + } + random_courtier = { + limit = { + artistic_courtier_trigger = yes + scope:artistic_courtier_1 != this + } + weight = { + base = 1 + modifier = { + factor = 10 + learning > high_skill_rating + } + } + save_scope_as = artistic_courtier_2 + } + random_child = { + limit = { + age < 12 + root = { is_parent_of = prev } + } + save_scope_as = child + } + } + + option = { + name = fund_inspiration.6200.a + trigger = { + NOT = { + government_has_flag = government_is_tribal # No changing amenities above what's legal for tribals + } + } + add_learning_lifestyle_xp = medium_lifestyle_xp + if = { + limit = { + amenity_level = { + target = court_fashion + value < medium_amenity_level + } + } + set_amenity_level = { type = court_fashion value = 3 } + } + else_if = { + limit = { + amenity_level = { + target = court_fashion + value < high_amenity_level + } + } + set_amenity_level = { type = court_fashion value = 4 } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { + name = fund_inspiration.6200.b + custom_tooltip = fund_inspiration.6200.b.tt + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_gain + } + add_prestige = medium_prestige_gain + end_inspiration_sponsorship = scope:inspiration + add_gold = root.medium_gold_value + scope:inspiration_owner = { + add_opinion = { + target = root + opinion = -20 + modifier = insulted_opinion + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { + name = fund_inspiration.6200.c + trigger = { + any_child = { + age < 12 + } + } + scope:child = { + add_learning_skill = 2 + add_opinion = { + target = root + opinion = 20 + modifier = supportive_parent + } + } + scope:inspiration_owner = { + add_opinion = { + target = root + opinion = -20 + modifier = insulted_opinion + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } +} + + +scripted_trigger homosexual_poet_trigger = { + OR = { + has_sexuality = homosexual + has_sexuality = bisexual + } + OR = { + trait_is_shunned_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } + trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } + } +} + +scripted_trigger unloved_poet_trigger = { + NOR = { + any_relation = { + type = lover + exists = yes + } + any_child = { + exists = yes + even_if_dead = yes + } + any_spouse = { + exists = yes + even_if_dead = yes + } + } +} + +fund_inspiration.6300 = { + type = character_event + title = fund_inspiration.6300.t + override_background = { + reference = study + } + desc = { + desc = fund_inspiration.6300.intro + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { + homosexual_poet_trigger = yes + } + } + desc = fund_inspiration.6300.homosexual_desc + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + unloved_poet_trigger = yes + } + } + desc = fund_inspiration.6300.no_relationship_desc + } + desc = fund_inspiration.6300.no_love_desc + } + } + theme = love + + left_portrait = { + character = scope:inspiration_owner + animation = worry + } + + trigger = { + scope:inspiration = { + inspiration_owner = { + exists = var:book_topic + OR = { + var:book_topic = flag:intrigue_the_art_of_love + var:book_topic = flag:seduction + var:book_topic = flag:fertility + var:book_topic = flag:love_sorcery + var:book_topic = flag:soulmate + } + NOR = { + any_relation = { + type = soulmate + always = yes + } + has_sexuality = asexual + has_trait = celibate + } + } + } + } + + immediate = { + random_vassal = { + limit = { has_trait = lifestyle_poet } + save_scope_as = inspiration_owner + } + } + + + option = { + name = fund_inspiration.6300.a + trigger = { + scope:inspiration_owner = { + unloved_poet_trigger = no + homosexual_poet_trigger = no + } + } + duel = { + skill = intrigue + target = scope:inspiration_owner + 6 = { + custom_tooltip = fund_inspiration.6300.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.3 + } + hidden_effect = { + send_interface_toast = { + left_icon = scope:inspiration_owner + title = fund_inspiration.6300.a.success + show_as_tooltip = { + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 2 } + } + } + } + } + } + 4 = { + custom_tooltip = fund_inspiration.6300.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.3 + } + hidden_effect = { + send_interface_toast = { + left_icon = scope:inspiration_owner + title = fund_inspiration.6300.a.failure + show_as_tooltip = { + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = -2 } + } + } + } + } + } + } + } + + option = { + name = fund_inspiration.6300.b + trigger = { + scope:inspiration_owner = { + homosexual_poet_trigger = no + unloved_poet_trigger = yes + is_attracted_to_gender_of = root + might_cheat_on_every_partner_trigger = yes + } + is_attracted_to_gender_of = scope:inspiration_owner + might_cheat_on_every_partner_trigger = yes + } + had_sex_with_effect = { + CHARACTER = scope:inspiration_owner + PREGNANCY_CHANCE = 25 + } + scope:inspiration_owner = { + progress_towards_lover_effect = { + CHARACTER = root + REASON = lover_inspiration_help + OPINION = default_lover_opinion + } + change_artifact_book_content_quality_effect = { AMOUNT = 4 } + } + } + + option = { + name = fund_inspiration.6300.c + trigger = { + is_attracted_to_gender_of = scope:inspiration_owner + OR = { + can_set_relation_potential_lover_trigger = { CHARACTER = scope:inspiration_owner } + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + scope:inspiration_owner = { + homosexual_poet_trigger = no + } + } + progress_towards_lover_effect = { + CHARACTER = scope:inspiration_owner + REASON = lover_inspiration_strikes + OPINION = 20 + } + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 4 } + } + } + + option = { + name = fund_inspiration.6300.d + trigger = { + scope:inspiration_owner = { + homosexual_poet_trigger = yes + } + OR = { + has_sexuality = homosexual + has_sexuality = bisexual + } + OR = { #Only really makes sense to get the later lover same sex love event if it actually is same sex love + AND = { + is_female = yes + scope:inspiration_owner = { is_female = yes } + } + AND = { + is_male = yes + scope:inspiration_owner = { is_male = yes } + } + } + is_attracted_to_gender_of = scope:inspiration_owner + OR = { + can_set_relation_potential_lover_trigger = { CHARACTER = scope:inspiration_owner } + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + } + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 4 } + } + progress_towards_lover_effect = { + CHARACTER = scope:inspiration_owner + REASON = lover_inspiration_allowed + OPINION = 20 + } + add_character_flag = fund_inspiration_6301_lover + trigger_event = { + id = fund_inspiration.6301 + days = 10 + } + } + option = { + name = fund_inspiration.6300.e + trigger = { + scope:inspiration_owner = { + homosexual_poet_trigger = yes + } + } + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 4 } + } + progress_towards_friend_effect = { + CHARACTER = scope:inspiration_owner + OPINION = 20 + REASON = friend_supported_poet + } + add_character_flag = fund_inspiration_6301_friend + trigger_event = { + id = fund_inspiration.6301 + days = 10 + } + } + option = { + name = fund_inspiration.6300.f + random_list = { + 6 = { + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 2 } + } + hidden_effect = { + send_interface_toast = { + left_icon = scope:inspiration_owner + title = fund_inspiration.6300.a.success + show_as_tooltip = { + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 2 } + } + } + } + } + } + + 4 = { + hidden_effect = { + send_interface_toast = { + left_icon = scope:inspiration_owner + title = fund_inspiration.6300.a.failure + show_as_tooltip = { + end_inspiration_sponsorship = scope:inspiration + } + } + } + end_inspiration_sponsorship = scope:inspiration + } + } + } +} + +#Poet sends you same sex love poetry if you encouraged them + +fund_inspiration.6301 = { + type = letter_event + opening = { + desc = fund_inspiration.6301.t + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = fund_inspiration_6301_lover + } + desc = fund_inspiration.6301.lover_desc + } + triggered_desc = { + trigger = { + has_character_flag = fund_inspiration_6301_friend + } + desc = fund_inspiration.6301.friend_desc + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { is_female = yes } + } + desc = fund_inspiration.6301.female_desc + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { is_male = yes } + } + desc = fund_inspiration.6301.male_desc + } + } + triggered_desc = { + trigger = { + trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } + } + desc = fund_inspiration.6301.crime_desc + } + } + sender = scope:inspiration_owner + + weight_multiplier = { + base = 1 + } + + + immediate = { + hidden_effect = { + scope:inspiration_owner = { + if = { + limit = { is_female = yes } + save_scope_as = owner + create_artifact = { + name = witch_queen_love_poem_name + description = witch_queen_love_poem_description + type = book + visuals = book + modifier = artifact_same_faith_opinion_negative_1_modifier + save_scope_as = witch_queen_love_poem + } + scope:witch_queen_love_poem = { + add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_2_modifier + add_artifact_modifier = artifact_tolerance_advantage_mod_1_modifier + flag_as_trash_artifact = yes + } + } + else = { + save_scope_as = owner + create_artifact = { + name = prince_archivist_love_poem_name + description = prince_archivist_love_poem_description + type = book + visuals = book + modifier = artifact_same_faith_opinion_negative_1_modifier + save_scope_as = prince_archivist_love_poem + } + scope:prince_archivist_love_poem = { + add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_2_modifier + add_artifact_modifier = artifact_tolerance_advantage_mod_1_modifier + flag_as_trash_artifact = yes + } + } + } + } + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 2 } + } + } + + after = { + remove_character_flag = fund_inspiration_6301_friend + remove_character_flag = fund_inspiration_6301_lover + } + + option = { + name = fund_inspiration.6301.a + if = { + limit = { + scope:inspiration_owner = { + is_male = yes + } + } + scope:prince_archivist_love_poem = { set_owner = root } + } + else = { + scope:witch_queen_love_poem = { set_owner = root } + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + if = { + limit = { has_character_flag = fund_inspiration_6301_lover } + progress_towards_lover_effect = { + CHARACTER = scope:inspiration_owner + REASON = lover_inspiration_treasure + OPINION = 20 + } + } + } + + option = { + name = fund_inspiration.6301.b + if = { + limit = { + scope:inspiration_owner = { + is_male = yes + } + } + scope:prince_archivist_love_poem = { set_owner = root } + } + else = { + scope:witch_queen_love_poem = { set_owner = root } + } + every_courtier_or_guest = { + limit = { + NOR = { + has_trait = compassionate + this = inspiration_owner + is_close_family_of = root + } + } + custom = all_courtiers_and_guests + add_opinion = { + target = root + modifier = insult_opinion + opinion = -10 + } + } + every_courtier = { + limit = { + has_trait = compassionate + } + custom = all_compassionate_in_the_court + add_opinion = { + target = root + modifier = pity_opinion + opinion = 15 + } + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_gain + } + if = { + limit = { has_character_flag = fund_inspiration_6301_friend } + progress_towards_friend_effect = { + CHARACTER = scope:inspiration_owner + OPINION = 20 + REASON = friend_arranged_reading + } + } + } +} + + +#Bringing music to the jungle by Isabella Welch + +fund_inspiration.6500 = { + type = character_event + title = fund_inspiration.6500.t + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6500.desc + desc = fund_inspiration.6500.action + } + + theme = hunting + override_background = { + reference = wilderness_forest + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + lower_left_portrait = { + character = scope:court_musician + } + + artifact = { + target = scope:leopard_hat + position = lower_center_portrait + } + + cooldown = { years = 15 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = jungle + } + } + NOT = { + any_character_artifact = { + has_variable = leopard_hat + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + if = { + limit = { employs_court_position = court_musician_court_position } + random_court_position_holder = { + type = court_musician_court_position + save_scope_as = court_musician + } + } + else_if ={ + limit = { employs_court_position = court_poet_court_position } + random_court_position_holder = { + type = court_poet_court_position + save_scope_as = court_musician + } + } + else_if = { + limit = { employs_court_position = court_jester_court_position } + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = court_musician + } + } + else_if = { + limit = { + any_courtier = { + has_trait = lifestyle_poet + } + } + random_courtier = { + limit = { has_trait = lifestyle_poet } + save_scope_as = court_musician + } + } + else = { + random_courtier = { + save_scope_as = court_musician + } + } + hidden_effect = { + set_artifact_rarity_common = yes + save_scope_as = owner # Needed for 'visuals = crown' + scope:inspiration_owner = { + create_artifact = { + name = leopard_hat_name + description = leopard_hat_description + template = crown_wearable_template + wealth = scope:wealth + quality = scope:quality + type = helmet + visuals = crown + modifier = artifact_prowess_2_modifier + save_scope_as = leopard_hat + } + hidden_effect_new_object = { + scope:leopard_hat = { + flag_as_trash_artifact = yes + set_variable = { + name = leopard_hat + value = yes + } + } + } + } + } + } + + option = { # Show everyone the music, will they like it? + name = fund_inspiration.6500.a + scope:inspiration_owner = { + duel = { + skill = diplomacy + value = 8 + 40 = { + desc = fund_inspiration.6500.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.6500.a.success + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + scope:inspiration_owner = { + add_diplomacy_skill = 2 + } + } + } + 10 = { + desc = fund_inspiration.6500.a.failure + send_interface_toast = { + title = fund_inspiration.6500.a.failure + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + increase_wounds_effect = { REASON = poison } + } + } + } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # Adventurer flees + name = fund_inspiration.6500.b + scope:inspiration_owner = { + duel = { + skill = prowess + value = 8 + 40 = { + desc = fund_inspiration.6500.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.6500.b.success + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + add_prowess_skill = 2 + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + } + } + 10 = { + desc = fund_inspiration.6500.b.failure + hidden_effect = { + send_interface_toast = { + title = fund_inspiration.6500.b.failure + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + increase_wounds_effect = { REASON = fight } + } + } + } + } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { # Adventurer fights a wild beast + name = fund_inspiration.6500.c + random_list = { + 10 = { + custom_tooltip = fund_inspiration.6500.c.tt + modifier = { + add = 25 + scope:inspiration_owner = { + has_trait = lifestyle_hunter + } + } + modifier = { + add = 25 + scope:inspiration_owner = { + prowess > medium_skill_rating + } + } + scope:leopard_hat = { + set_owner = scope:inspiration_owner + } + hidden_effect = { + send_interface_toast = { + title = fund_inspiration.6500.c.tt + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + } + } + } + + 10 = { + custom_tooltip = fund_inspiration.6500.c.tt_failure + modifier = { + add = 25 + scope:inspiration_owner = { + prowess < medium_skill_rating + } + } + hidden_effect = { + send_interface_toast = { + title = fund_inspiration.6500.c.tt_failure + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + increase_wounds_effect = { REASON = fight } + } + } + } + } + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + +# Dragging a boat up a cliff by Isabella Welch + +scripted_trigger sisyphus_nickname_trigger = { + OR = { + has_title = title:k_italy + has_title = title:k_romagna + has_title = title:k_sardinia + has_title = title:e_italy + is_roman_emperor_excluding_byzantium_trigger = yes + capital_province = { + geographical_region = world_europe_west_britannia + geographical_region = world_europe_west_germania + geographical_region = world_europe_west_francia + geographical_region = world_europe_west_iberia + geographical_region = world_europe_west + geographical_region = world_europe_south_italy + geographical_region = world_europe_south + } + culture = { has_cultural_pillar = heritage_byzantine } + } +} + +fund_inspiration.6501 = { + type = character_event + title = fund_inspiration.6501.t + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6501.desc + desc = fund_inspiration.6500.action + } + + theme = hunting + override_background = { + reference = wilderness_mountains + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = hills + } + } + } + + weight_multiplier = { + base = 1 + } + + option = { # Adventurer cuts their losses + name = fund_inspiration.6501.a + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = -2 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { # Adventurer attempts a ridiculous dragging of the boat over land + name = fund_inspiration.6501.b + scope:inspiration_owner = { + duel = { + skill = martial + value = 10 + 40 = { + desc = fund_inspiration.6501.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + modifier = { + add = 25 + scope:inspiration_owner = { + has_lifestyle = martial_lifestyle + } + } + modifier = { + add = 25 + scope:inspiration_owner = { + has_trait = strategist + } + } + root = { + send_interface_toast = { + title = fund_inspiration.6501.b.success + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + add_prowess_skill = 2 + if = { + limit = { + root = { sisyphus_nickname_trigger = yes } + } + give_nickname = nick_sisyphus + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + add_prestige = major_prestige_gain + } + } + } + 10 = { + desc = fund_inspiration.6501.b.failure + hidden_effect = { + root = { + send_interface_toast = { + title = fund_inspiration.6501.b.failure + left_icon = scope:inspiration_owner + remove_short_term_gold = major_gold_value + } + } + } + remove_short_term_gold = major_gold_value + } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + } + modifier = { + short_term_gold < massive_gold_value + factor = 0 + } + modifier = { + is_at_war = yes + factor = 0 + } + } + } + + option = { # Adventurer gives up and buys a new boat + name = fund_inspiration.6501.c + remove_short_term_gold = medium_gold_value + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + short_term_gold < major_gold_value + factor = 0 + } + modifier = { + is_at_war = yes + factor = 0 + } + } + } +} + +#Adventurer in the desert dreaming of you + +fund_inspiration.6502 = { + type = character_event + title = fund_inspiration.6502.t + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6502.desc + } + + theme = hunting + override_background = { + reference = wilderness_desert + } + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 20 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = desert + } + } + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + + weight_multiplier = { + base = 1 + } + + option = { # You are indeed missing your adventurer + name = fund_inspiration.6502.a + trigger = { + has_relation_potential_lover = scope:inspiration_owner + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + progress_towards_lover_effect = { + CHARACTER = scope:inspiration_owner + REASON = lover_adventurer_thirst + OPINION = 20 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { # try and wrangle the adventurer into bringing back better items + name = fund_inspiration.6502.b + trigger = { + NOT = { has_relation_potential_lover = scope:inspiration_owner } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + progress_towards_lover_effect = { + CHARACTER = scope:inspiration_owner + REASON = lover_adventurer_thirst + OPINION = 20 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + option = { # roll your eyes + name = fund_inspiration.6502.c + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -15 + } + scope:inspiration_owner = { + add_character_modifier = { + modifier = dying_of_thirst_modifier + years = 2 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +#Burial mound entry + +fund_inspiration.6503 = { + type = character_event + title = fund_inspiration.6503.t + theme = hunting + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6503.desc + desc = fund_inspiration.6500.action + } + + override_background = { + reference = wilderness_steppe + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 15 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = steppe + geographical_region = world_steppe_west + } + } + NOR = { + any_character_artifact = { + has_variable = kurgan_ornament + } + any_character_artifact = { + has_variable = kurgan_saddle + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + hidden_effect = { + scope:inspiration_owner = { + create_artifact = { + name = kurgan_ornament_name + description = kurgan_ornament_description + type = miscellaneous + visuals = small_box + modifier = artifact_court_grandeur_baseline_add_1_modifier + save_scope_as = kurgan_ornament + } + } + hidden_effect_new_object = { + scope:kurgan_ornament = { + flag_as_trash_artifact = yes + set_variable = { + name = kurgan_ornament + value = yes + } + } + } + } + hidden_effect = { + scope:inspiration_owner = { + create_artifact = { + name = kurgan_saddle_name + description = kurgan_saddle_description + type = miscellaneous + visuals = medium_box + modifier = artifact_monthly_martial_lifestyle_xp_1_modifier + save_scope_as = kurgan_saddle + } + } + hidden_effect_new_object = { + scope:kurgan_saddle = { + flag_as_trash_artifact = yes + set_variable = { + name = kurgan_saddle + value = yes + } + } + } + } + } + + option = { # get a fancy little bauble from the tomb + name = fund_inspiration.6503.a + scope:kurgan_ornament = { + set_owner = root + } + hidden_effect = { destroy_artifact = scope:kurgan_saddle } + scope:inspiration_owner = { + add_character_modifier = { + modifier = tomb_robber_modifier + years = 2 + } + } + add_character_modifier = { + modifier = tomb_robber_modifier + years = 2 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + option = { # study the saddles and horsemanship of the scythians + name = fund_inspiration.6503.b + scope:kurgan_saddle = { + set_owner = root + } + hidden_effect = { destroy_artifact = scope:kurgan_ornament } + scope:inspiration_owner = { + add_character_modifier = { + modifier = tomb_robber_modifier + years = 2 + } + } + add_character_modifier = { + modifier = tomb_robber_modifier + years = 2 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # refuse to rob the tomb + name = fund_inspiration.6503.c + add_character_modifier = { + modifier = respect_for_the_dead_modifier + years = 2 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } +} + +#Adventurer took a farmhand as a lover + +fund_inspiration.6504 = { + type = character_event + title = fund_inspiration.6504.t + theme = hunting + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6504.desc + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + desc = fund_inspiration.6504.pregnant + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + has_character_flag = adventurer_female_lover_flag + } + } + desc = fund_inspiration.6504.female_lover + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + has_character_flag = adventurer_male_lover_flag + has_sexuality = homosexual + } + } + desc = fund_inspiration.6504.male_lover_homosexual + } + desc = fund_inspiration.6504.male_lover + } + triggered_desc = { + trigger = { + NOT = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + } + desc = fund_inspiration.6504.lover_ultimatum + } + } + + override_background = { + reference = farmland + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = scope:adventurer_lover + animation = love + } + + immediate = { + scope:adventurer_homosexual_secret ?= { reveal_to = root } + scope:adventurer_lover_secret ?= { reveal_to = root } + } + + option = { # tell the adventurer to begone + name = fund_inspiration.6504.a + custom_tooltip = fund_inspiration.6504.a.tt + trigger = { + NOT = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_gain + } + end_inspiration_sponsorship = scope:inspiration + remove_courtier_or_guest = scope:inspiration_owner + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + + option = { # let the adventurer and their lover come to court + name = fund_inspiration.6504.b + trigger = { + NOT = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + } + add_courtier = scope:adventurer_lover + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_loss + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + scope:lover_homosexual_secret ?= { reveal_to = root } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + option = { # express sympathy for the child if the lover is pregnant + name = fund_inspiration.6504.c + trigger = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + add_courtier = scope:adventurer_lover + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_loss + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + scope:lover_homosexual_secret ?= { reveal_to = root } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + option = { # absolutely reject peasants in the court + name = fund_inspiration.6504.d + trigger = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_gain + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = -2 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } +} + +fund_inspiration.6513 = { + type = character_event + hidden = yes + cooldown = { years = 15 } + + weight_multiplier = { + base = 1 + modifier = { + scope:inspiration_owner = { has_trait = lustful } + factor = 2 + } + modifier = { + scope:inspiration_owner = { has_trait = rakish } + factor = 2 + } + } + + trigger = { + scope:inspiration = { has_inspiration_type = adventure_inspiration } + scope:inspiration_owner = { + location = { + terrain = farmlands + } + NOR = { + has_trait = chaste + has_sexuality = asexual + } + might_cheat_on_every_partner_trigger = yes + } + } + + immediate = { + scope:inspiration_owner = { + location = { save_scope_as = location_template } + } + if = { # Male adventurer impregnates someone + limit = { + scope:inspiration_owner = { # Must be male and attracted to women + is_male = yes + is_attracted_to_women = yes + can_have_children = yes + } + } + create_character = { + location = scope:inspiration_owner.location + template = adventurer_pregnant_lover_character + faith = scope:location_template.faith + culture = scope:location_template.culture + save_scope_as = adventurer_lover + } + scope:adventurer_lover = { + if = { + limit = { can_have_children = yes } + make_pregnant = { father = scope:inspiration_owner } + scope:inspiration_owner = { add_character_flag = adventurer_pregnant_lover_flag } + } + else = { + scope:inspiration_owner = { add_character_flag = adventurer_female_lover_flag } + } + } + } + else = { # Any other male or female lover combo + hidden_effect = { + random_list = { + 10 = { # Female lover + trigger = { + scope:inspiration_owner = { is_attracted_to_women = yes } + } + create_character = { + location = scope:inspiration_owner.location + template = adventurer_female_lover_character + faith = scope:location_template.faith + culture = scope:location_template.culture + save_scope_as = adventurer_lover + } + scope:inspiration_owner = { add_character_flag = adventurer_female_lover_flag } + } + 10 = { # Male lover + trigger = { + scope:inspiration_owner = { is_attracted_to_men = yes } + } + create_character = { + location = scope:inspiration_owner.location + template = adventurer_male_lover_character + faith = scope:location_template.faith + culture = scope:location_template.culture + save_scope_as = adventurer_lover + } + scope:inspiration_owner = { add_character_flag = adventurer_male_lover_flag } + } + } + } + } + scope:adventurer_lover = { # Catch bad sexuality matches + if = { + limit = { + NOT = { is_attracted_to_gender_of = scope:inspiration_owner } + } + set_sexuality = bisexual + } + } + scope:inspiration_owner = { + # Lover relation + set_random_lover_reason = { TARGET = scope:adventurer_lover } + # Lover secret + if = { + limit = { + any_secret = { + type = secret_lover + secret_target = scope:adventurer_lover + } + } + random_secret = { + type = secret_lover + limit = { + secret_target = scope:adventurer_lover + } + save_scope_as = adventurer_lover_secret + } + } + # Homosexual secret + if = { + limit = { + sex_same_as = scope:adventurer_lover + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = sodomite GENDER_CHARACTER = scope:inspiration_owner } + } + if = { + limit = { + NOT = { + any_secret = { type = secret_homosexual } + } + } + give_homosexual_secret_or_nothing_effect = yes + } + random_secret = { + type = secret_homosexual + save_scope_as = adventurer_homosexual_secret + } + } + } + # Other homosexual secret + scope:adventurer_lover = { + if = { + limit = { + sex_same_as = scope:inspiration_owner + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = sodomite GENDER_CHARACTER = scope:adventurer_lover } + } + if = { + limit = { + NOT = { + any_secret = { type = secret_homosexual } + } + } + give_homosexual_secret_or_nothing_effect = yes + } + random_secret = { + type = secret_homosexual + save_scope_as = lover_homosexual_secret + } + } + } + trigger_event = fund_inspiration.6504 + } +} + +#Oasis event, or, should I say, the CK3 beach episode + +fund_inspiration.6505 = { + type = character_event + title = fund_inspiration.6505.t + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6505.desc + } + theme = hunting + override_background = { + reference = wilderness_desert + } + left_portrait = { + character = scope:inspiration_owner + animation = happiness + } + artifact = { + target = scope:naked_tapestry + position = lower_center_portrait + } + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = oasis + } + } + NOT = { + any_character_artifact = { + has_variable = naked_tapestry + } + } + } + + weight_multiplier = { + base = 2 + } + + immediate = { + hidden_effect = { + save_scope_as = owner + set_artifact_rarity_common = yes + scope:inspiration_owner = { + create_artifact = { + name = naked_tapestry_name + description = naked_tapestry_description + visuals = tapestry + type = tapestry + quality = scope:quality + wealth = scope:wealth + modifier = artifact_attraction_opinion_2_modifier + save_scope_as = naked_tapestry + } + add_character_flag = is_naked + hidden_effect_new_object = { + scope:naked_tapestry = { + flag_as_trash_artifact = yes + set_variable = { + name = naked_tapestry + value = yes + } + } + } + } + } + } + + option = { # destroy the naked tapestry + name = { + trigger = { + has_trait = one_eyed + } + text = fund_inspiration.6505.a_one_eyed + } + name = { + trigger = { + has_trait = blind + } + text = fund_inspiration.6505.a_blind + } + name = fund_inspiration.6505.a + destroy_artifact = scope:naked_tapestry + reverse_add_opinion = { + target = scope:inspiration_owner + opinion = -20 + modifier = insulted_opinion + } + if = { + limit = { NOT = { has_faith = faith:adamites } } + add_piety = medium_piety_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { # appreciate the salacious tapestry... in private + name = fund_inspiration.6505.b + scope:naked_tapestry = { + set_owner = root + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + reverse_add_opinion = { + target = scope:inspiration_owner + opinion = 20 + modifier = pleased_opinion + } + if = { + limit = { + has_trait = chaste + } + remove_trait = chaste + add_trait = lustful + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { # flex the naked tapestry in front of your whole court + name = fund_inspiration.6505.c + trigger = { + NOT = { has_faith = faith:adamites } + } + scope:naked_tapestry = { + set_owner = root + } + every_courtier = { + limit = { + has_trait = lustful + } + custom = all_lustful_in_the_court + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + reverse_add_opinion = { + target = scope:inspiration_owner + opinion = 20 + modifier = pleased_opinion + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = minor_court_grandeur_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + option = { #adamites find it sacred + name = fund_inspiration.6505.d + trigger = { + has_faith = faith:adamites + } + scope:naked_tapestry = { + set_owner = root + } + add_piety = medium_piety_gain + reverse_add_opinion = { + target = scope:inspiration_owner + opinion = 20 + modifier = pleased_opinion + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + after = { + scope:inspiration_owner = { + if = { + limit = { has_character_flag = is_naked } + remove_character_flag = is_naked + } + } + } +} + +#Adventurer hasn't gone on the adventure, is in a local tavern by Isabella Welch +#as pope urban iii would say, 'the tavern sins' +scripted_trigger deadbeat_adventurer_trigger = { + OR = { + has_trait = rakish + has_trait = lazy + has_trait = drunkard + has_trait = gluttonous + has_trait = drunkard + has_trait = deceitful + has_trait = greedy + } + NOT = { has_character_flag = was_deadbeat } + adventure_inspiration_average_skill_value < high_inspiration_skill +} + +fund_inspiration.6400 = { + type = character_event + title = fund_inspiration.6400.t + desc = fund_inspiration.6400.desc + theme = realm + override_background = { + reference = tavern + } + left_portrait = { + character = scope:inspiration_owner + animation = scheme + } + right_portrait = { + character = root + animation = shock + } + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + scope:inspiration_owner = { + deadbeat_adventurer_trigger = yes + } + } + } + + weight_multiplier = { + base = 0.25 + modifier = { + add = 0.75 + scope:inspiration_owner = { + OR = { + has_trait = drunkard + has_trait = lazy + } + } + } + modifier = { + add = -0.25 + scope:inspiration_owner = { + adventure_inspiration_average_skill_value >= medium_inspiration_skill + } + } + } + + immediate = { + scope:inspiration = { + change_inspiration_progress = -5 + } + scope:inspiration_owner = { + if = { + limit = { + NOT = { has_trait = drunkard } + } + add_trait = drunkard + } + add_character_flag = was_deadbeat + } + hidden_effect = { + scope:inspiration_owner = { + set_location = { + location = root.capital_province + stick_to_location = yes + } + } + } + } + + option = { + name = fund_inspiration.6400.a + duel = { + skill = stewardship + target = scope:inspiration_owner + 30 = { + desc = fund_inspiration.6400.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.2 + } + send_interface_toast = { + title = fund_inspiration.6400.a.success + custom_tooltip = fund_inspiration.6400.a.success_continue + left_icon = scope:inspiration_owner + } + } + 20 = { + desc = fund_inspiration.6400.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.2 + } + send_interface_toast = { + title = fund_inspiration.6400.a.failure + left_icon = scope:inspiration_owner + remove_short_term_gold = minor_gold_value + end_inspiration_sponsorship = scope:inspiration + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 0.5 + } + } + } + + option = { + name = fund_inspiration.6400.b + end_inspiration_sponsorship = scope:inspiration + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + } + root.capital_county = { + add_county_modifier = { + modifier = county_chastised_beloved_adventurer_modifier + years = 25 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_greed = 0.5 + } + } + } +} + + +#Adventurer is being very precious, not really suited for the outdoors + +fund_inspiration.6506 = { + type = character_event + title = fund_inspiration.6506.t + desc = { + desc = fund_inspiration.6506.introduction + desc = fund_inspiration.6506.desc + } + + theme = hunting + override_background = { + reference = wilderness_steppe + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = wetlands + } + NOT = { + has_trait = rough_terrain_expert + } + } + NOT = { + any_character_artifact = { + has_variable = frogspawn_jar + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 0.5 + scope:inspiration_owner = { + OR = { + has_trait = craven + has_trait = lazy + has_trait = gluttonous + has_trait = irritable + has_trait = profligate + } + } + } + } + + immediate = { + scope:inspiration_owner = { + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + create_artifact = { + name = frogspawn_jar_name + description = frogspawn_jar_description + type = miscellaneous + visuals = glazed_jar + modifier = artifact_fertility_gain_1_modifier + save_scope_as = frogspawn_jar + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:frogspawn_jar = { + flag_as_trash_artifact = yes + set_variable = { + name = frogspawn_jar + value = yes + } + } + } + } + scope:frogspawn_jar = { + set_owner = root + } + } + + option = { #try and convince them to keep going + name = fund_inspiration.6506.a + scope:inspiration_owner = { + add_stress = major_stress_gain + } + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + scope:inspiration_owner = { + hidden_effect = { + duel = { + skill = prowess + value = 8 + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + change_artifact_quality_effect = { + AMOUNT = -2 + } + } + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + hidden_effect = { + add_character_flag = adventurer_stuck_in_swamp + } + } + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = 0.5 + } + } + } + + option = { #let them go to easier lands + name = fund_inspiration.6506.b + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = -2 + } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + } + } +} + +#Adventurer is travelling through reasonably pleasant lands, gets bullied by the county holder who doesn't like ROOT + +fund_inspiration.6507 = { + type = character_event + title = fund_inspiration.6507.t + desc = { + desc = fund_inspiration.6507.introduction + desc = fund_inspiration.6507.desc + } + + theme = hunting + override_background = { + reference = wilderness_steppe + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + + cooldown = { years = 20 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + NOT = { has_character_flag = had_fund_inspiration.6507 } + location = { + terrain = plains + exists = this.barony.holder + this.barony.holder = { + is_adult = yes + opinion = { + target = root + value <= low_negative_opinion + } + } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + scope:inspiration_owner = { + location = { + this.barony.holder = { save_scope_as = grumpy_liege } + } + add_character_flag = had_fund_inspiration.6507 + if = { + limit = { + NOR = { + has_trait = blind + has_trait = one_eyed + } + } + add_trait = one_eyed + } + else_if = { + limit = { + has_trait = one_eyed + NOT = { has_trait = blind } + } + add_trait = blind + } + } + } + + option = { #midly respond by denouncing the guy who did this + name = fund_inspiration.6507.a + hidden_effect = { + if = { + limit = { + scope:grumpy_liege = { + can_start_scheme = { + type = murder + target_character = scope:inspiration_owner + } + } + } + scope:grumpy_liege = { + start_scheme = { + type = murder + target_character = scope:inspiration_owner + } + } + } + } + scope:grumpy_liege = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -25 + } + } + scope:inspiration_owner = { + if = { + limit = { has_trait = brave } + remove_trait = brave + add_trait = craven + } + else_if = { + limit = { has_trait = trusting } + remove_trait = trusting + add_trait = paranoid + } + change_artifact_quality_effect = { + AMOUNT = -2 + } + } + if = { + limit = { + scope:inspiration_owner = { + can_start_scheme = { + type = murder + target_character = scope:grumpy_liege + } + } + } + scope:inspiration_owner = { + start_scheme = { + type = murder + target_character = scope:grumpy_liege + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.1 + ai_boldness = 0.1 + } + } + } + + option = { #help the slighted adventurer scheme + name = fund_inspiration.6507.b + trigger = { + scope:grumpy_liege = { + is_vassal_or_below_of = root + } + can_start_scheme = { + type = murder + target_character = scope:grumpy_liege + } + } + start_scheme = { + type = murder + target_character = scope:grumpy_liege + } + random_scheme = { + type = murder + limit = { + scheme_target_character = scope:grumpy_liege + } + save_scope_as = grumpy_liege_murder + } + try_to_force_assign_character_to_random_agent_slot_effect = { + SCHEME = scope:grumpy_liege_murder + CHAR = scope:inspiration_owner + YEARS = 20 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 40 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { #ignore everything and refuse to seek vengeance + name = fund_inspiration.6507.c + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = -4 + } + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_boldness = -0.5 + ai_rationality = 0.5 + } + } + } +} + +#Adventurer studying beavers in the Taiga + +fund_inspiration.6508 = { + type = character_event + title = fund_inspiration.6508.t + desc = { + desc = fund_inspiration.6508.introduction + desc = fund_inspiration.6508.desc + triggered_desc = { + trigger = { + employs_court_position = royal_architect_court_position + } + desc = fund_inspiration.6508.architect_desc + } + } + theme = hunting + override_background = { + reference = wilderness_steppe + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + lower_left_portrait = { + character = scope:royal_architect + } + lower_right_portrait = { + character = scope:child + } + + cooldown = { years = 15 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = taiga + } + } + NOR = { + any_character_artifact = { + has_variable = beaver_book + } + any_child = { + any_character_artifact = { + has_variable = beaver_book + } + } + any_court_position_holder = { + type = royal_architect_court_position + any_character_artifact = { + has_variable = beaver_book + } + } + } + } + + immediate = { + random_court_position_holder = { + type = royal_architect_court_position + save_scope_as = court_architect + } + scope:inspiration_owner = { + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + create_artifact = { + name = beaver_book_name + description = beaver_book_description + type = miscellaneous + visuals = book + modifier = artifact_build_time_2_modifier + save_scope_as = beaver_book + history = { + type = created + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:beaver_book = { + flag_as_trash_artifact = yes + set_variable = { + name = beaver_book + value = yes + } + } + } + add_learning_skill = 2 + } + random_child = { + limit = { + age < 15 + is_available_ai = yes + } + save_scope_as = child + } + } + option = { #study the beaver book yourself + name = fund_inspiration.6508.a + add_stewardship_lifestyle_xp = massive_lifestyle_xp + scope:beaver_book = { + set_owner = root + } + } + + option = { #give the book to your architect to study + name = fund_inspiration.6508.b + trigger = { exists = scope:court_architect } + custom_tooltip = fund_inspiration.6508.b.tt + scope:court_architect = { + add_stewardship_skill = 2 + set_variable = { + name = fund_inspiration_6508_architect_improvement + value = yes + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + scope:beaver_book = { + set_owner = scope:court_architect + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { #give the book to your child for fun + name = fund_inspiration.6508.c + trigger = { + exists = scope:child + } + scope:child = { + add_stewardship_skill = 2 + add_opinion = { + target = root + modifier = supportive_parent + opinion = 20 + } + } + scope:beaver_book = { + set_owner = scope:child + } + if = { + limit = { exists = scope:court_architect } + scope:court_architect = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.2 + ai_compassion = 0.5 + } + } + } + option = { #pay to encourage the adventurer to keep up good work + name = fund_inspiration.6508.d + trigger = { + NAND = { + any_child = { + age < 15 + is_available_ai = yes + } + employs_court_position = royal_architect_court_position + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + remove_short_term_gold = minor_gold_value + scope:beaver_book = { + set_owner = root + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + short_term_gold < minor_gold_value + factor = 0 + } + } + } +} + +#Adventurer vastly exaggerating what crocodiles look like + +fund_inspiration.6509 = { + type = character_event + title = fund_inspiration.6509.t + desc = { + desc = fund_inspiration.6509.intro_desc + desc = fund_inspiration.6509.desc + } + theme = hunting + override_background = { + reference = wilderness_steppe + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = floodplains + } + } + NOT = { + any_character_artifact = { + has_variable = crocodile_tapestry + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + + } + + option = { #make a crocodile tapestry and display it! the horror! + name = fund_inspiration.6509.a + remove_short_term_gold = medium_gold_value + + save_scope_as = owner + set_artifact_rarity_common = yes + create_artifact = { + name = crocodile_tapestry_name + description = crocodile_tapestry_description + type = tapestry + visuals = tapestry + modifier = artifact_dread_gain_mult_1_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = crocodile_tapestry + history = { + type = given + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:crocodile_tapestry = { + flag_as_trash_artifact = yes + set_variable = { + name = crocodile_tapestry + value = yes + } + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + } + modifier = { + short_term_gold < medium_gold_value + factor = 0 + } + } + } + + option = { #be afraid of the crocodile, but impressed by the adventurer + name = fund_inspiration.6509.b + add_stress = minor_stress_gain + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -0.5 + ai_rationality = -0.1 + } + } + } + + option = { #you know what crocodiles are, see em everyday + name = fund_inspiration.6509.c + trigger = { + any_held_title = { + this = title:k_egypt + } + } + add_learning_lifestyle_xp = medium_lifestyle_xp + add_prestige = medium_prestige_gain + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +#Adventurer meeting a vigilante band who hide in the forest + +fund_inspiration.6510 = { + type = character_event + title = fund_inspiration.6510.t + desc = { + desc = fund_inspiration.6510.intro_desc + desc = fund_inspiration.6510.desc + } + theme = hunting + override_background = { + reference = wilderness_forest + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + trigger = { + exists = scope:inspiration_owner.location.barony.holder + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = forest + } + NOT = { has_trait = greedy } + NOT = { is_councillor_of = root } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + scope:inspiration_owner = { + location = { + this.barony.holder = { save_scope_as = enemy_liege } + } + add_trait = improvident + } + + } + + option = { #make them your steward, they become good at understanding the people + name = fund_inspiration.6510.a + + trigger = { + scope:inspiration_owner = { + can_be_steward_trigger = { COURT_OWNER = root } + } + } + + root = { fire_councillor = cp:councillor_steward } + root = { + assign_councillor_type = { + type = councillor_steward + target = scope:inspiration_owner + } + } + scope:inspiration_owner = { + add_trait = peasant_leader + } + hidden_effect = { + end_inspiration_sponsorship = scope:inspiration + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 0.5 + } + } + } + + option = { #threaten to kill the adventurer for not returning + name = fund_inspiration.6510.b + duel = { + skill = intrigue + target = scope:inspiration_owner + 10 = { + custom_tooltip = fund_inspiration.6510.b.toast_outcome.positive + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.6510.b.toast_outcome.positive + custom_tooltip = fund_inspiration.6510.b.toast_outcome.positive.continue + left_icon = root + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + 20 = { + custom_tooltip = fund_inspiration.6510.b.toast_outcome.refusal + send_interface_toast = { + title = fund_inspiration.6510.b.toast_outcome.refusal + custom_tooltip = fund_inspiration.6510.b.toast_outcome.positive.flee + left_icon = root + scope:inspiration_owner = { + end_inspiration_sponsorship = scope:inspiration + add_prestige = medium_prestige_loss + hidden_effect = { + death = { death_reason = death_vanished } + } + } + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { # let em go, you don't need em + name = fund_inspiration.6510.c + end_inspiration_sponsorship = scope:inspiration + scope:inspiration_owner = { + hidden_effect = { + death = { death_reason = death_vanished } + } + } + ai_chance = { + base = 10 + } + } +} + +#Ageing or sick adventurer decides that the mountains are a last moment of beauty for them + +fund_inspiration.6511 = { + type = character_event + title = fund_inspiration.6511.t + desc = { + desc = fund_inspiration.6511.intro_desc + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { + age > 60 + } + } + desc = fund_inspiration.6511.old_age + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + health <= poor_health + } + } + desc = fund_inspiration.6511.poor_health + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + location = { + has_province_modifier = winter_harsh_modifier + } + } + } + desc = fund_inspiration.6511.winter + } + } + } + theme = death + override_background = { + reference = wilderness_mountains + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 15 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = mountains + } + OR = { + age > 60 + health <= poor_health + location = { + has_province_modifier = winter_harsh_modifier + } + } + } + } + + weight_multiplier = { + base = 0.5 + } + + immediate = { + scope:inspiration_owner = { + death = { + death_reason = death_ice + } + } + } + + option = { #these are conditions under which the adventurer can have a dramatic death, they aren't really there for you to select anything, just to tell you you were foolish for sending them into the snowy mountains + name = fund_inspiration.6511.a + #This event just informs you it has happened + } +} + +#Adventurer asking you to name the mountain + +fund_inspiration.6512 = { + type = character_event + title = fund_inspiration.6512.t + desc = { + desc = fund_inspiration.6512.intro_desc + desc = fund_inspiration.6512.desc + } + theme = hunting + override_background = { + reference = wilderness_mountains + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = desert_mountains + this.county.holder = { + NOR = { + this.top_liege = root + this.liege = root + this = root + } + } + } + } + NOT = { + any_character_artifact = { + has_variable = mountain_rock + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + scope:inspiration_owner = { + location = { + save_scope_as = mountain_location + } + hidden_effect = { + create_artifact = { + name = mountain_rock_name + description = mountain_rock_description + type = miscellaneous + visuals = rock + modifier = artifact_heavy_cavalry_toughness_1_modifier + save_scope_as = mountain_rock + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:mountain_rock = { + flag_as_trash_artifact = yes + set_variable = { + name = mountain_rock + value = yes + } + } + } + } + } + if = { + limit = { + any_relation = { type = lover } + } + random_relation = { + type = lover + save_scope_as = lover + } + } + if = { + limit = { + any_relation = { type = potential_rival } + } + random_relation = { + type = potential_rival + save_scope_as = rival + } + } + } + + after = { + if = { + limit = { + NOT = { has_character_flag = got_mountain_rock } + } + destroy_artifact = scope:mountain_rock + } + remove_character_flag = got_mountain_rock + } + + option = { #scoff at the idea of not respecting the local name + name = fund_inspiration.6512.a + add_prestige = medium_prestige_gain + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { #dig at the rocky mountains + name = fund_inspiration.6512.b + trigger = { + NOR = { + exists = scope:lover + is_cannibal_trigger = yes + is_male = yes + exists = scope:rival + has_trait = greedy + martial > 10 + intrigue > 10 + } + } + every_courtier_or_guest = { + limit = { age < 14 } + custom = custom.every_child_in_the_court + add_opinion = { + modifier = humorous_opinion + opinion = 10 + target = root + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { #name after your war god + name = fund_inspiration.6512.c + trigger = { + martial > 10 + NOR = { + exists = scope:lover + is_cannibal_trigger = yes + is_male = yes + exists = scope:rival + has_trait = greedy + intrigue > 10 + } + } + skill = martial + add_martial_skill = 1 + add_piety = minor_piety_gain + stress_impact = { + arrogant = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { #name after your fate god + name = fund_inspiration.6512.d + trigger = { + intrigue > 10 + NOR = { + exists = scope:lover + is_cannibal_trigger = yes + is_male = yes + exists = scope:rival + has_trait = greedy + martial > 10 + } + } + skill = intrigue + add_intrigue_skill = 1 + add_piety = minor_piety_gain + stress_impact = { + arrogant = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { #name after your beloved and become their soulmate, possibly + name = fund_inspiration.6512.e + trigger = { exists = scope:lover } + if = { + limit = { + can_set_relation_soulmate_trigger = { CHARACTER = scope:lover } + } + set_relation_soulmate = { reason = soulmate_named_mountain copy_reason = lover target = scope:lover } + } + else = { + reverse_add_opinion = { + target = scope:lover + opinion = 20 + modifier = love_opinion + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + option = { #flex that you like biting things + name = fund_inspiration.6512.f + trigger = { is_cannibal_trigger = yes } + trait = cannibal + add_dread = medium_dread_gain + stress_impact = { + humble = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + + } + + option = { #name after your... ahem... rod + name = fund_inspiration.6512.g + trigger = { + is_male = yes + has_trait = arrogant + } + add_character_modifier = { + modifier = phallic_mountain_modifier + years = 10 + } + stress_impact = { + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.7 + } + } + } + + option = { #name after your rival. that will teach them! + name = fund_inspiration.6512.h + trigger = { exists = scope:rival } + progress_towards_rival_effect = { + REASON = rival_name_inspiration + CHARACTER = scope:rival + OPINION = 0 + } + stress_impact = { + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + } + } + } + + option = { #force them to lug some rocks home + name = fund_inspiration.6512.i + trigger = { has_trait = greedy } + trait = greedy + scope:mountain_rock = { set_owner = root } + add_character_flag = got_mountain_rock + stress_impact = { + content = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.5 + } + } + } +} + +#################### +# Alchemist + +# Alchemy (Metal) - what subtype? +# by Linnéa Thimrén +fund_inspiration.8001 = { + type = character_event + title = fund_inspiration.8001.t + desc = fund_inspiration.8001.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = alchemy_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:artifact_alchemy_type + var:artifact_alchemy_type = flag:alchemy_type_metals + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:artifact_alchemy_type_metal_subtype + has_character_flag = had_event_fund_inspiration_8001 + has_character_flag = fund_alchemy_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_8001 + years = 20 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Gold + option = { + name = fund_inspiration.8001.a + custom_tooltip = fund_inspiration.8001.a.tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type_metal_subtype + value = flag:gold + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = 0.25 + } + } + } + + #Silver + option = { + name = fund_inspiration.8001.b + custom_tooltip = fund_inspiration.8001.b.tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type_metal_subtype + value = flag:silver + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.25 + } + } + } + + #Mercury + option = { + name = fund_inspiration.8001.c + custom_tooltip = fund_inspiration.8001.c.tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type_metal_subtype + value = flag:mercury + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + #Arsenic + option = { + name = fund_inspiration.8001.d + custom_tooltip = fund_inspiration.8001.d.tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type_metal_subtype + value = flag:arsenic + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.5 + } + } + } +} + + +# Get poisoned by a bad alchemist +# by Linnéa Thimrén +fund_inspiration.8011 = { + type = character_event + title = fund_inspiration.8011.t + desc = fund_inspiration.8011.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + + cooldown = { days = 1825 } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8011 } + has_no_inspiration_event_cooldown = yes + exists = var:artifact_alchemy_type + OR = { + var:artifact_alchemy_type = flag:alchemy_type_panacea + var:artifact_alchemy_type = flag:alchemy_type_immortality + } + } + } + + weight_multiplier = { + base = 0.1 + + modifier = { #More likely if they're not that bright + add = 0.75 + scope:inspiration_owner = { + has_trait = intellect_bad + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8011 + years = 5 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + add_character_modifier = { #Literally poisoned by gold... + modifier = poisonous_gold_modifier + years = 2 + } + } + + option = { #Forgive + name = fund_inspiration.8011.a + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + } + stress_impact = { + forgiving = medium_stress_impact_loss + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = forgiving + } + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_compassion = 0.5 + } + } + } + + option = { #Imprison + name = fund_inspiration.8011.b + if = { + limit = { exists = scope:inspiration } + end_inspiration_sponsorship = scope:inspiration + } + rightfully_imprison_character_effect = { + TARGET = scope:inspiration_owner + IMPRISONER = root + } + hidden_effect = { #To make sure we threw them in the dungeon + scope:inspiration_owner = { + if = { + limit = { + NOT = { is_in_prison_type = dungeon } + } + change_prison_type = dungeon + } + } + } + stress_impact = { + wrathful = medium_stress_impact_loss + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = vengeful + } + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.25 + } + } + } + + option = { #Execute + name = fund_inspiration.8011.c + hidden_effect = { + if = { + limit = { exists = scope:inspiration } + end_inspiration_sponsorship = scope:inspiration + } + } + scope:inspiration_owner = { + death = { death_reason = death_execution killer = root } + } + execute_opinion_effect = { VICTIM = scope:inspiration_owner EXECUTIONER = root } + stress_impact = { + wrathful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + forgiving = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 50 + has_trait = vengeful + } + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_compassion = -0.5 + } + } + } +} + +# Church disproves of you employing an alchemist +# by Linnéa Thimrén +fund_inspiration.8012 = { + type = character_event + title = fund_inspiration.8012.t + desc = fund_inspiration.8012.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + right_portrait = { + character = scope:court_chaplain + animation = anger + } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8012 } + has_no_inspiration_event_cooldown = yes + } + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } #Basically the Christian church were the only ones complaining about this + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_physically_able_adult = yes } + } + + weight_multiplier = { + base = 1 + modifier = { #Less likely to fire if the alchemist is zealous + add = -0.75 + scope:inspiration_owner = { + has_trait = zealous + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8012 + years = 5 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + cp:councillor_court_chaplain = { save_scope_as = court_chaplain } + } + + option = { # Fire them + name = fund_inspiration.8012.a + if = { + limit = { exists = scope:inspiration } + end_inspiration_sponsorship = scope:inspiration + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -30 + } + banish = yes # banish_effect not used for unlanded + } + add_piety = minor_piety_gain + scope:court_chaplain = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.75 + } + } + } + + option = { # Convince the chaplain that it's fine + name = fund_inspiration.8012.b + trigger = { + diplomacy >= high_skill_rating + } + show_as_unavailable = { + diplomacy < high_skill_rating + } + duel = { + skill = diplomacy + value = 8 + 40 = { + desc = fund_inspiration.8012.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.8012.b.success + left_icon = scope:court_chaplain + add_character_modifier = { + modifier = inspiration_alchemy_condoned_by_church_modifier + years = 5 + } + } + } + 10 = { + desc = fund_inspiration.8012.b.failure + send_interface_toast = { + title = fund_inspiration.8012.b.failure + left_icon = scope:court_chaplain + scope:court_chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + } + } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + ai_chance = { + base = 100 + } + } + + option = { # No! + name = fund_inspiration.8012.c + add_piety = medium_piety_loss + scope:court_chaplain = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } +} + +# Find a book from famous alchemist Jabir ibn Hayyan from the Islamic Golden Age +# by Linnéa Thimrén +fund_inspiration.8013 = { + type = character_event + title = fund_inspiration.8013.t + desc = fund_inspiration.8013.desc + theme = learning_medicine_focus + right_portrait = scope:inspiration_owner + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + cooldown = { days = 1825 } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8013 } + has_no_inspiration_event_cooldown = yes + } + current_date >= 900.1.1 #Jabir didn't start being mentioned until around here + is_ai = no #Only for players so we don't have too many books lying around + } + + weight_multiplier = { + base = 0.25 + modifier = { + add = 1 + culture = { has_cultural_pillar = heritage_arabic } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8013 + years = 5 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + random_held_title = { + title_tier = county + random_county_province = { + limit = { has_holding = yes } + save_scope_as = barony_market + } + } + hidden_effect = { + random_dummy_gender_effect = yes #Since the author will not be set + random_list = { #To create one of Jabir ibn Hayyan's books + 10 = { + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:the_great_book_of_mercy + } + } + 10 = { + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:the_book_of_seventy + } + } + } + } + } + + option = { #Study it + name = fund_inspiration.8013.a + custom_tooltip = fund_inspiration.8013.a_tt + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = scholar + has_lifestyle = learning_lifestyle + } + } + ai_value_modifier = { + ai_greed = -0.25 + } + } + } + + option = { #Give it to alchemist + name = fund_inspiration.8013.b + custom_tooltip = fund_inspiration.8013.b_tt + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + progress_towards_friend_effect = { + CHARACTER = root + OPINION = 0 + REASON = friend_given_book + } + } + } + hidden_effect = { + scope:newly_created_artifact = { + set_owner = { + target = scope:inspiration_owner + history = { + location = root.capital_province + actor = root + recipient = scope:inspiration_owner + type = given + } + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -0.25 + ai_compassion = 0.25 + } + } + } + + option = { #Sell it + name = fund_inspiration.8013.c + hidden_effect = { destroy_artifact = scope:newly_created_artifact } + add_gold = medium_gold_value + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + } + modifier = { + gold < 0 + add = 100 + } + } + } + + after = { + #To clean up variables set when creating the book + if = { + limit = { has_variable = book_artifact_subject } + remove_variable = book_artifact_subject + } + if = { + limit = { has_variable = book_artifact_topic } + remove_variable = book_artifact_topic + } + if = { + limit = { has_variable = quality } + remove_variable = quality + } + if = { + limit = { has_variable = wealth } + remove_variable = wealth + } + } +} + +# Alchemist never produces anything, just _thinks_ and ponders reality and the nature of matter +# by Linnéa Thimrén +fund_inspiration.8014 = { + type = character_event + title = fund_inspiration.8014.t + desc = fund_inspiration.8014.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + + cooldown = { days = 1825 } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8014 } + has_no_inspiration_event_cooldown = yes + } + } + + weight_multiplier = { + base = 0.5 + + modifier = { #More likely if they're not that bright + add = 1 + scope:inspiration_owner = { + has_trait = intellect_bad + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8014 + years = 5 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + option = { #Get to work!! + name = fund_inspiration.8014.a + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = -2 + } + } + } + stress_impact = { + impatient = minor_stress_impact_loss + patient = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = impatient + } + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + option = { #Take your time + name = fund_inspiration.8014.b + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + scope:inspiration = { + change_inspiration_progress = -3 + } + } + stress_impact = { + impatient = medium_stress_impact_gain + patient = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = patient + } + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { #Fire them + name = fund_inspiration.8014.c + custom_tooltip = fund_inspiration.8014.c.tt + add_gold = medium_gold_value + end_inspiration_sponsorship = scope:inspiration + #To clean out flags and stuff + inspiration_completion_effect = yes + stress_impact = { + compassionate = medium_stress_impact_gain + wrathful = medium_stress_impact_loss + } + ai_chance = { + base = 0 + } + } +} + + +# Plead with alchemist to resurrect family member/friend +# by Linnéa Thimrén +fund_inspiration.8015 = { + type = character_event + title = fund_inspiration.8015.t + desc = fund_inspiration.8015.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + right_portrait = scope:loved_one + + cooldown = { days = 1825 } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + NOT = { has_trait = callous } + OR = { #Someone you cared about a lot has died + exists = var:mourning_parent + exists = var:mourning_soulmate + exists = var:mourning_friend + } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8015 } + has_no_inspiration_event_cooldown = yes + } + } + + weight_multiplier = { + base = 1 + compare_modifier = { + value = ai_rationality + multiplier = -0.1 + } + modifier = { + add = -0.75 + has_trait = zealous + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8015 + years = 10 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + if = { + limit = { + exists = var:mourning_parent + } + var:mourning_parent = { save_scope_as = loved_one } + } + else_if = { + limit = { + exists = var:mourning_soulmate + } + var:mourning_soulmate = { save_scope_as = loved_one } + } + else_if = { + limit = { + exists = var:mourning_friend + } + var:mourning_friend = { save_scope_as = loved_one } + } + } + + option = { #Talk instead + name = fund_inspiration.8015.a + add_stress = medium_stress_loss + stress_impact = { + arrogant = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + option = { #Demand it! + name = fund_inspiration.8015.b + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + } + custom_tooltip = fund_inspiration.8015.b.tt + trigger_event = { + id = fund_inspiration.8016 + days = { 3 7 } + } + stress_impact = { + gregarious = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 50 + has_trait = arrogant + } + ai_value_modifier = { + ai_rationality = -0.25 + ai_boldness = 0.25 + } + } + } +} + + +# Follow-up event +# by Linnéa Thimrén +fund_inspiration.8016 = { + type = character_event + title = fund_inspiration.8015.t + desc = fund_inspiration.8016.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + right_portrait = scope:loved_one + + trigger = { + exists = scope:inspiration + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + exists = scope:inspiration_owner + scope:inspiration_owner = { + is_physically_able = yes + } + exists = scope:loved_one + } + + immediate = { + add_stress = medium_stress_gain + } + + option = { #Ugh + name = fund_inspiration.8016.a + stress_impact = { + arrogant = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + option = { #Imprison them + name = fund_inspiration.8016.b + rightfully_imprison_character_effect = { + TARGET = scope:inspiration_owner + IMPRISONER = root + } + ai_chance = { + base = 10 + modifier = { + add = 50 + has_trait = wrathful + } + ai_value_modifier = { + ai_rationality = -0.25 + ai_boldness = 0.25 + } + } + } +} + + +# Helping the court tutor +# by Linnéa Thimrén +scripted_trigger fund_inspiration_8017_court_tutor_scripted_trigger= { + is_available_ai_adult = yes + NOT = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:inspiration_owner } } +} + +fund_inspiration.8017 = { + type = character_event + title = fund_inspiration.8017.t + desc = fund_inspiration.8017.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + right_portrait = scope:court_tutor + + cooldown = { days = 1825 } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8017 } + has_no_inspiration_event_cooldown = yes + } + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + fund_inspiration_8017_court_tutor_scripted_trigger = yes + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8017 + years = 10 + } + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { + fund_inspiration_8017_court_tutor_scripted_trigger = yes + } + save_scope_as = court_tutor + } + } + + option = { # Encourage them + name = fund_inspiration.8017.a + scope:court_tutor = { + add_learning_skill = 1 + progress_towards_friend_effect = { + CHARACTER = scope:inspiration_owner + OPINION = 0 + REASON = friend_shared_knowledge + } + } + stress_impact = { + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.25 + } + } + } + + option = { # Back to work!! + name = fund_inspiration.8017.b + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + } + scope:court_tutor = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + } + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + wrathful = medium_stress_impact_loss + diligent = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = -0.2 + ai_boldness = 0.2 + } + } + } +} + + +# Add a dedication +# by Claudia Baldassi + +fund_inspiration.7001 = { + type = character_event + title = fund_inspiration.7001.t + desc = fund_inspiration.7001.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + lower_left_portrait = scope:dedication_a + lower_center_portrait = scope:dedication_b + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + exists = primary_spouse + add = 1 + } + modifier = { + any_close_family_member = { + only_if_dead = yes + days_since_death <= 365 + } + add = 1 + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_dedication_var + } + if = { + limit = { + primary_spouse ?= { + NOR = { + has_relation_rival = root + has_relation_nemesis = root + } + } + } + primary_spouse = { + save_scope_as = dedication_a + } + } + if = { + limit = { + any_close_family_member = { + only_if_dead = yes + days_since_death <= 365 + } + } + random_close_family_member = { + only_if_dead = yes + limit = { + days_since_death <= 365 + } + save_scope_as = dedication_b + } + } + } + + #Option A: spouse + option = { + name = fund_inspiration.7001.a + trigger = { + exists = scope:dedication_a + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_a_var + value = scope:dedication_a + } + } + reverse_add_opinion = { + target = scope:dedication_a + modifier = grateful_opinion + opinion = 40 + } + ai_chance = { + base = 100 + modifier = { + has_trait = family_first + add = 100 + } + modifier = { + has_trait = gregarious + add = 50 + } + modifier = { + has_focus = intrigue_temptation_focus + add = 50 + } + modifier = { + scope:dedication_a = { has_any_bad_relationship_with_root_trigger = yes } + add = -100 + } + } + } + + #Option B: dead relative + option = { + name = fund_inspiration.7001.b + trigger = { + exists = scope:dedication_b + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_b_var + value = scope:dedication_b + } + } + dynasty = { add_dynasty_prestige = medium_dynasty_prestige_gain } + ai_chance = { + base = 100 + } + } + + #Option C: God + option = { + name = fund_inspiration.7001.c + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_var + value = flag:dedication_c + } + } + add_piety = major_piety_gain + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option D: no one + option = { + name = fund_inspiration.7001.d + add_prestige = medium_prestige_gain + ai_chance = { + base = 80 + } + } +} + +fund_inspiration.7002 = { + type = character_event + title = fund_inspiration.7001.t + desc = fund_inspiration.7001.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + lower_left_portrait = scope:dedication_a + lower_center_portrait = scope:dedication_b + lower_right_portrait = scope:dedication_d + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + OR = { + any_relation = { + type = lover + } + exists = var:mourning_soulmate + } + } + + weight_multiplier = { + base = 1 + modifier = { + exists = var:mourning_soulmate + add = 2 + } + modifier = { + any_relation = { + type = lover + } + add = 1 + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_dedication_var + } + if = { + limit = { + any_relation = { + type = soulmate + NOT = { + any_secret = { + type = secret_lover + secret_target = root + } + } + } + } + random_relation = { + type = soulmate + limit = { + NOT = { + any_secret = { + type = secret_lover + secret_target = root + } + } + } + save_scope_as = dedication_a + } + } + else_if = { + limit = { + any_relation = { + type = lover + NOT = { + any_secret = { + type = secret_lover + secret_target = root + } + } + } + } + random_relation = { + type = lover + limit = { + NOT = { + any_secret = { + type = secret_lover + secret_target = root + } + } + } + save_scope_as = dedication_a + } + } + if = { + limit = { + exists = var:mourning_soulmate + } + var:mourning_soulmate = { + save_scope_as = dedication_b + } + } + if = { + limit = { + any_relation = { + type = soulmate + any_secret = { + type = secret_lover + secret_target = root + } + } + } + random_relation = { + type = soulmate + limit = { + any_secret = { + type = secret_lover + secret_target = root + } + } + save_scope_as = dedication_d + } + } + else_if = { + limit = { + any_relation = { + type = lover + any_secret = { + type = secret_lover + secret_target = root + } + } + } + random_relation = { + type = lover + limit = { + any_secret = { + type = secret_lover + secret_target = root + } + } + save_scope_as = dedication_d + } + } + if = { + limit = { + exists = scope:dedication_d + } + scope:dedication_d = { + random_secret = { + type = secret_lover + limit = { + secret_target = root + } + save_scope_as = lover_secret + } + } + } + } + + #Option A: public soulmate/lover + option = { + name = fund_inspiration.7001.a + trigger = { + exists = scope:dedication_a + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_a_var + value = scope:dedication_a + } + } + reverse_add_opinion = { + target = scope:dedication_a + modifier = grateful_opinion + opinion = 40 + } + ai_chance = { + base = 100 + modifier = { + has_focus = intrigue_temptation_focus + add = 50 + } + } + } + + #Option B: memory of lost soulmate + option = { + name = fund_inspiration.7001.b + trigger = { + exists = scope:dedication_b + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_b_var + value = scope:dedication_b + } + } + add_piety = medium_piety_gain + ai_chance = { + base = 125 + } + } + + #Option C: go public with soulmate/lover + option = { + name = fund_inspiration.7002.c + trigger = { + exists = scope:dedication_d + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_d_var + value = scope:dedication_d + } + } + if = { + limit = { + scope:dedication_d = { + is_married = no + } + } + reverse_add_opinion = { + target = scope:dedication_d + modifier = grateful_opinion + opinion = 40 + } + } + else = { + reverse_add_opinion = { + target = scope:dedication_d + modifier = angry_opinion + opinion = -30 + } + } + scope:lover_secret = { + expose_secret = root + } + ai_chance = { + base = 50 + modifier = { + has_trait = honest + add = 100 + } + } + } + + #Option D: none + option = { + name = fund_inspiration.7001.d + add_prestige = medium_prestige_gain + ai_chance = { + base = 80 + } + } +} + +fund_inspiration.7003 = { + type = character_event + title = fund_inspiration.7003.t + desc = { + desc = fund_inspiration.7003.desc + triggered_desc = { + trigger = { exists = scope:dedication_e } + desc = fund_inspiration.7003.desc_e + } + triggered_desc = { + trigger = { exists = scope:dedication_f } + desc = fund_inspiration.7003.desc_f + } + desc = fund_inspiration.7003.desc_end + } + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + lower_left_portrait = scope:dedication_e + lower_center_portrait = scope:dedication_f + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + OR = { + any_relation = { + type = potential_friend + } + any_relation = { + type = potential_lover + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_relation = { + type = potential_friend + } + any_relation = { + type = potential_lover + } + add = 2 + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_dedication_var + } + if = { + limit = { + any_relation = { + type = potential_friend + } + } + random_relation = { + type = potential_friend + save_scope_as = dedication_e + } + } + if = { + limit = { + any_relation = { + type = potential_lover + NAND = { + exists = scope:dedication_e + this = scope:dedication_e + } + } + } + random_relation = { + type = potential_lover + limit = { + NAND = { + exists = scope:dedication_e + this = scope:dedication_e + } + } + save_scope_as = dedication_f + } + } + } + + #Option A: potential friend + option = { + name = fund_inspiration.7003.a + trigger = { + exists = scope:dedication_e + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_e_var + value = scope:dedication_e + } + } + scope:dedication_e = { + set_relation_friend = { reason = friend_dedicated_artifact target = root } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = gregarious + add = 50 + } + } + } + + #Option B: potential lover + option = { + name = fund_inspiration.7003.b + trigger = { + exists = scope:dedication_f + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_f_var + value = scope:dedication_f + } + } + scope:dedication_f = { + set_relation_lover = { reason = lover_dedicated_artifact target = root involved_character = scope:inspiration_owner } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + } + ai_chance = { + base = 100 + modifier = { + has_focus = intrigue_temptation_focus + add = 50 + } + } + } + + #Option C: no + option = { + name = fund_inspiration.7003.c + ai_chance = 80 + } +} + +fund_inspiration.7004 = { + type = character_event + title = fund_inspiration.7004.t + desc = fund_inspiration.7004.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + lower_left_portrait = scope:dedication_g1 + lower_center_portrait = scope:dedication_g2 + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + any_vassal = { + count >= 2 + is_powerful_vassal = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_vassal = { + has_any_bad_relationship_with_root_trigger = yes + is_powerful_vassal = yes + } + add = 1 + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_dedication_var + } + random_vassal = { + limit = { + is_powerful_vassal = yes + } + save_scope_as = dedication_g1 + } + random_vassal = { + limit = { + is_powerful_vassal = yes + this != scope:dedication_g1 + } + save_scope_as = dedication_g2 + } + } + + #Option A: vassals + option = { + name = fund_inspiration.7004.a + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_g1_var + value = scope:dedication_g1 + } + set_variable = { + name = artifact_dedication_g2_var + value = scope:dedication_g2 + } + } + reverse_add_opinion = { + target = scope:dedication_g1 + modifier = grateful_opinion + opinion = 50 + } + reverse_add_opinion = { + target = scope:dedication_g2 + modifier = grateful_opinion + opinion = 50 + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = 50 + } + modifier = { + has_trait = arrogant + add = -50 + } + } + } + + #Option B: just me + option = { + name = fund_inspiration.7004.b + add_prestige = medium_prestige_gain + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_h_var + value = flag:dedication_h + } + } + stress_impact = { + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = -50 + } + modifier = { + has_trait = arrogant + add = 50 + } + } + } + + #Option C: no one + option = { + name = fund_inspiration.7004.c + add_piety = medium_piety_gain + ai_chance = { + base = 80 + } + } +} + +# Add your family motto +fund_inspiration.7010 = { + type = character_event + title = fund_inspiration.7010.t + desc = fund_inspiration.7010.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_dedication_var + } + } + + #Option A: family motto + option = { + name = fund_inspiration.7010.a + scope:inspiration_owner = { + set_variable = artifact_inscribe_motto_var + } + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + ai_chance = { + base = 100 + modifier = { + has_trait = family_first + add = 100 + } + modifier = { + has_focus = diplomacy_majesty_focus + add = 50 + } + } + } + + #Option B: no need + option = { + name = fund_inspiration.7010.b + add_piety = medium_piety_gain + ai_chance = { + base = 80 + modifier = { + has_trait = humble + add = 50 + } + } + } +} + +# Choose a theme for modifiers - weapons and armor +fund_inspiration.7100 = { + type = character_event + title = fund_inspiration.7100.t + desc = fund_inspiration.7100.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + } + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + } + trigger_if = { + limit = { + scope:inspiration_owner = { has_variable = artifact_weapon_type } + NOT = { + culture = { has_cultural_parameter = may_commission_kris } # daggers for this culture hold significant value + } + } + NOT = { scope:inspiration_owner.var:artifact_weapon_type = flag:artifact_weapon_type_dagger } + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_mod_choice_var + } + } + + #Option A: + option = { + name = fund_inspiration.7100.a + scope:inspiration_owner = { set_variable = chosen_casualties_mod } + custom_tooltip = fund_inspiration.7100.a.tt + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: raid + option = { + name = fund_inspiration.7100.b + trigger = { + can_raid_trigger = yes + } + scope:inspiration_owner = { set_variable = chosen_raid_mod } + custom_tooltip = fund_inspiration.7100.b.tt + ai_chance = { + base = 150 + } + } + + #Option C: knights + option = { + name = fund_inspiration.7100.c + scope:inspiration_owner = { set_variable = chosen_knights_mod } + custom_tooltip = fund_inspiration.7100.c.tt + ai_chance = { + base = 100 + modifier = { + has_trait = brave + add = 50 + } + modifier = { + has_focus = martial_chivalry_focus + add = 50 + } + } + } + + #Option D: terrain advantage + option = { + name = fund_inspiration.7100.d + trigger = { + scope:inspiration = { has_inspiration_type = weapon_inspiration } + } + scope:inspiration_owner = { set_variable = chosen_terrain_mod } + custom_tooltip = fund_inspiration.7100.d.tt + ai_chance = { + base = 100 + } + } + + #Option E: whatever + option = { + name = fund_inspiration.7100.e + custom_tooltip = fund_inspiration.7100.e.tt + ai_chance = { + base = 80 + } + } +} + +# Choose a theme for modifiers - regalia/crowns +fund_inspiration.7110 = { + type = character_event + title = fund_inspiration.7100.t + desc = fund_inspiration.7100.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + } + has_inspiration_type = smith_inspiration + } + trigger_if = { + limit = { + scope:inspiration_owner = { has_variable = artifact_smith_type } + } + NOR = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_brooch + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_goblet + } + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_mod_choice_var + } + } + + #Option A: independent ruler opinion + option = { + name = fund_inspiration.7110.a + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_crown + } + scope:inspiration_owner = { set_variable = chosen_ind_ruler_mod } + custom_tooltip = fund_inspiration.7110.a.tt + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = august + add = 50 + } + modifier = { + has_focus = diplomacy_majesty_focus + add = 50 + } + } + } + + #Option B: dynasty + option = { + name = fund_inspiration.7110.b + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + scope:inspiration_owner = { set_variable = chosen_dynasty_mod } + custom_tooltip = fund_inspiration.7110.b.tt + ai_chance = { + base = 100 + modifier = { + has_trait = family_first + add = 50 + } + modifier = { + has_focus = diplomacy_family_focus + add = 50 + } + } + } + + #Option C: dread/tyranny + option = { + name = fund_inspiration.7110.c + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + scope:inspiration_owner = { set_variable = chosen_dread_mod } + custom_tooltip = fund_inspiration.7110.c.tt + ai_chance = { + base = 100 + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = sadistic + add = 50 + } + modifier = { + has_trait = compassionate + add = -100 + } + modifier = { + has_focus = intrigue_intimidation_focus + add = 50 + } + } + } + + #Option D: attraction + option = { + name = fund_inspiration.7110.d + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + scope:inspiration_owner = { set_variable = chosen_attraction_mod } + custom_tooltip = fund_inspiration.7110.d.tt + ai_chance = { + base = 100 + modifier = { + has_trait = seducer + add = 50 + } + modifier = { + has_trait = lustful + add = 50 + } + modifier = { + has_trait = chaste + add = -100 + } + modifier = { + has_focus = intrigue_temptation_focus + add = 50 + } + } + } + + #Option E: vassals + option = { + name = fund_inspiration.7110.e + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_crown + } + scope:inspiration_owner = { set_variable = chosen_vassals_mod } + custom_tooltip = fund_inspiration.7110.e.tt + ai_chance = { + base = 100 + modifier = { + has_trait = gregarious + add = 50 + } + modifier = { + has_focus = stewardship_domain_focus + add = 50 + } + } + } + + #Option G: courtier and guest opinion + option = { + name = fund_inspiration.7110.g + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_crown + } + scope:inspiration_owner = { set_variable = chosen_court_op_mod } + custom_tooltip = fund_inspiration.7110.g.tt + ai_chance = { + base = 100 + } + } + + #Option F: whatever + option = { + name = fund_inspiration.7100.e + custom_tooltip = fund_inspiration.7100.e.tt + ai_chance = { + base = 80 + } + } +} + +# Choose a theme for modifiers - sculpture/throne +fund_inspiration.7120 = { + type = character_event + title = fund_inspiration.7100.t + desc = fund_inspiration.7100.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + } + has_inspiration_type = artisan_inspiration + } + trigger_if = { + limit = { + scope:inspiration_owner = { has_variable = artifact_artisan_type } + } + scope:inspiration_owner.var:artifact_artisan_type = flag:artisan_type_sculpture + scope:inspiration_owner.var:artifact_artisan_type = flag:artisan_type_throne + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_mod_choice_var + } + } + + #Option A: short reign + option = { + name = fund_inspiration.7120.a + trigger = { has_royal_court = yes } + scope:inspiration_owner = { set_variable = chosen_reign_mod } + custom_tooltip = fund_inspiration.7120.a.tt + ai_chance = { + base = 100 + modifier = { + has_trait = shy + add = 100 + } + modifier = { + has_trait = craven + add = 100 + } + modifier = { + has_trait = paranoid + add = 100 + } + } + } + + #Option B: dynasty + option = { + name = fund_inspiration.7110.b + scope:inspiration_owner = { set_variable = chosen_dynasty_mod } + custom_tooltip = fund_inspiration.7110.b.tt + ai_chance = { + base = 100 + modifier = { + has_trait = family_first + add = 50 + } + modifier = { + has_focus = diplomacy_family_focus + add = 50 + } + } + } + + #Option C: dread/tyranny + option = { + name = fund_inspiration.7110.c + scope:inspiration_owner = { set_variable = chosen_dread_mod } + custom_tooltip = fund_inspiration.7110.c.tt + ai_chance = { + base = 100 + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = sadistic + add = 50 + } + modifier = { + has_trait = compassionate + add = -100 + } + modifier = { + has_focus = intrigue_intimidation_focus + add = 50 + } + } + } + + #Option E: whatever + option = { + name = fund_inspiration.7100.e + custom_tooltip = fund_inspiration.7100.e.tt + ai_chance = { + base = 100 + } + } +} diff --git a/N3OW/events/dlc/ep2/ep2_tournament_events.txt b/N3OW/events/dlc/ep2/ep2_tournament_events.txt new file mode 100644 index 00000000..f8dc3ada --- /dev/null +++ b/N3OW/events/dlc/ep2/ep2_tournament_events.txt @@ -0,0 +1,14526 @@ +namespace = ep2_tournament_events + +################################################## +# DUEL +# 0001 - 0999 +# +# MELEE +# 1000 - 1499 +# +# ARCHERY +# 1500 - 1999 +# +# WRESTLING/FISTFIGHTING +# 2000 - 2999 +# +# QUINTAIN (Locale) +# 3500 - 3999 +# +# JOUST +# 4000 - 4499 +# +# RACE +# 4500 - 4999 +# +# RECITAL +# 5500 - 5999 +# +################################################## + +######################### +### SHARED EVENTS ### +######################### + +############## +### DUEL ### +############## + +# Opponent is limping... you think +ep2_tournament_events.0001 = { + type = activity_event + title = ep2_tournament_events.0001.t + desc = ep2_tournament_events.0001.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:versus_contestant + animation = pain + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_wrestling } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 0001 } + } + else_if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_duel } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0001 } + } + } + + # Work it out via smarts + option = { + name = ep2_tournament_events.0001.a + trigger = { + OR = { + has_trait = intellect_good + has_trait = shrewd + } + } + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + custom_tooltip = ep2_tournament_events.0001.a.tt + + stress_impact = { + base = miniscule_stress_impact_loss + paranoid = minor_stress_impact_loss + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Go for their leg + option = { + name = ep2_tournament_events.0001.b + + duel = { + skills = { intrigue prowess } + target = scope:versus_contestant + #Your intuition was correct + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.0001.b.tt.win + left_icon = root + right_icon = scope:versus_contestant + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + + desc = ep2_tournament_events.0001.b.tt.win + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + trusting = minor_stress_impact_gain + } + } + #Your opponent was bluffing + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.0001.b.tt.lose + left_icon = root + right_icon = scope:versus_contestant + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + desc = ep2_tournament_events.0001.b.tt.lose + + stress_impact = { + paranoid = minor_stress_impact_gain + trusting = minor_stress_impact_loss + } + } + } + + ai_chance = { + base = 100 + } + } + + # Ignore it + option = { + name = ep2_tournament_events.0001.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + paranoid = minor_stress_impact_gain + trusting = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } +} + +# Opponent plays to the crowd +ep2_tournament_events.0002 = { + type = activity_event + title = ep2_tournament_events.0002.t + desc = ep2_tournament_events.0002.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:versus_contestant + animation = throne_room_cheer_1 + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" + contest_versus_player_vs_ai_scope_effect = yes + if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_wrestling } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 0002 } + } + else_if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_duel } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0002 } + } + } + + # I'll show you! + option = { + name = ep2_tournament_events.0002.a + trigger = { + OR = { + has_trait = physique_good + has_trait = strong + } + } + custom_tooltip = ep2_tournament_events.0002.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_prestige = minor_prestige_gain + + scope:activity = { + add_activity_log_entry = { + key = tournament_pose_off_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + base = minor_stress_impact_loss + arrogant = medium_stress_impact_loss + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Demand they face you + option = { + name = ep2_tournament_events.0002.b + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Attack them from behind + option = { + name = ep2_tournament_events.0002.c + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + accolade_minimal_glory_loss_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } + + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +scripted_trigger contest_versus_wants_to_resign_trigger = { + OR = { + dread_modified_ai_boldness = { + dreaded_character = root + value <= medium_negative_ai_value + } + AND = { + has_trait = wounded + has_trait = craven + } + AND = { + NOT = { has_trait = brave } + has_trait_rank = { + trait = wounded + rank >= 2 + } + } + } +} + +# Opponent wants to quit +ep2_tournament_events.0003 = { + type = activity_event + title = ep2_tournament_events.0003.t + desc = { + desc = ep2_tournament_events.0003.desc + first_valid = { + triggered_desc = { # Dread + trigger = { + scope:versus_contestant = { + has_dread_level_towards = { + target = root + level > 0 + } + } + } + desc = ep2_tournament_events.0003.desc.dread + } + triggered_desc = { #Wounded and Craven + trigger = { + scope:versus_contestant = { + has_trait = wounded + has_trait = craven + } + } + desc = ep2_tournament_events.0003.desc.craven + } + triggered_desc = { # Badly wounded, not brave + trigger = { + scope:versus_contestant = { + NOT = { has_trait = brave } + has_trait_rank = { + trait = wounded + rank >= 2 + } + } + } + desc = ep2_tournament_events.0003.desc.wounded + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = personality_honorable + } + + right_portrait = { + character = scope:versus_contestant + animation = pain + } + + # Reasons for the opposition to quit: + # They dread you + # They have medium or high wounds and aren't brave + # They have any level of wounds and are craven + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matchee } + scope:versus_matcher = { contest_versus_wants_to_resign_trigger = yes } + } + trigger_else = { + scope:versus_matchee = { contest_versus_wants_to_resign_trigger = yes } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_wrestling } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 0003 } + } + else_if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_duel } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0003 } + } + } + + # Mock their cowardice + option = { + name = ep2_tournament_events.0003.a + trigger = { + NOT = { has_trait = craven } + scope:versus_contestant = { has_trait = craven } + } + accolade_minimal_glory_loss_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = tournament_mocked_opinion + opinion = -30 + } + + add_prestige = minor_prestige_gain + + scope:activity = { + add_activity_log_entry = { + key = tournament_mocked_cowardice_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Understand their cowardice + option = { + name = ep2_tournament_events.0003.b + trigger = { + has_trait = craven + scope:versus_contestant = { has_trait = craven } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 20 + } + + stress_impact = { + craven = medium_stress_impact_loss + arrogant = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Acknowledge their wounds + option = { + name = ep2_tournament_events.0003.c + trigger = { + scope:versus_contestant = { + NOT = { has_trait = brave } + OR = { + has_trait = wounded_2 + has_trait = wounded_3 + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_wounded_quit_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 20 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + sadistic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Tell them never to challenge you again + option = { + name = ep2_tournament_events.0003.d + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } + + stress_impact = { + arrogant = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_mocked_cowardice_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = compassionate + has_trait = humble + } + } + } + } + + # Tell them they fought well + option = { + name = ep2_tournament_events.0003.e + accolade_minimal_glory_gain_with_checks_effect = yes + reverse_add_opinion = { + target = scope:versus_contestant + modifier = compliment_opinion + opinion = 20 + } + + stress_impact = { + arrogant = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = arrogant + } + } + } + + after = { + tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } + } +} + +# Sword flies into the crowd +ep2_tournament_events.0004 = { + type = activity_event + title = ep2_tournament_events.0004.t + desc = ep2_tournament_events.0004.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:versus_contestant + animation = shock + } + + lower_center_portrait = { + character = scope:watching_crowd + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + + scope:activity = { + any_guest_subset_current_phase = { + name = spectator + is_alive = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0004 } + + scope:activity = { + random_guest_subset_current_phase = { + name = spectator + limit = { is_alive = yes } + save_scope_as = watching_crowd + } + } + + scope:watching_crowd = { + increase_wounds_no_death_effect = { REASON = death_spectator_injured } + + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + } + + # Blame your opponent + option = { + name = ep2_tournament_events.0004.a + + trigger = { + has_trait = deceitful + } + + scope:watching_crowd = { + add_opinion = { + target = scope:versus_contestant + modifier = hurt_opinion + opinion = -50 + } + } + + scope:versus_contestant = { + add_prestige = minor_prestige_loss + + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_failed_defuse_duel_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + sadistic = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = compassionate + has_trait = just + } + } + } + } + + # Apologise + option = { + name = ep2_tournament_events.0004.b + + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { #They accept your apology + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.0004.b.success + + send_interface_toast = { + title = ep2_tournament_events.0004.b.success + left_icon = root + right_icon = scope:watching_crowd + + scope:watching_crowd = { + add_opinion = { + target = root + modifier = forgiven_opinion + opinion = 15 + } + } + } + + desc = ep2_tournament_events.1001.c.success + } + 50 = { #They don't accept the apology + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.0004.b.failure + + send_interface_toast = { + title = ep2_tournament_events.0004.b.failure + left_icon = root + right_icon = scope:watching_crowd + + scope:watching_crowd = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -35 + } + } + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_duel_apology_log + tags = { bad } + score = 5 + character = root + target = scope:watching_crowd + } + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + honest = minor_stress_impact_loss + sadistic = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + deceitful = major_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = sadistic + has_trait = arbitrary + has_trait = deceitful + } + } + } + } + + # Take a swing at opponent whilst they're distracted + option = { + name = ep2_tournament_events.0004.c + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + accolade_minimal_glory_loss_with_checks_effect = yes + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -40 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + impatient = minor_stress_impact_loss + brave = medium_stress_impact_gain + patient = medium_stress_impact_gain + content = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = content + has_trait = patient + has_trait = brave + } + } + } + } +} + +# Kick opponent in the groin +ep2_tournament_events.0005 = { + type = activity_event + title = ep2_tournament_events.0005.t + desc = { + desc = ep2_tournament_events.0005.start + first_valid = { + triggered_desc = { + trigger = { + scope:versus_contestant = { is_eunuch_trigger = yes } + } + desc = ep2_tournament_events.0005.eunuch + } + triggered_desc = { + trigger = { + scope:versus_contestant = { is_eunuch_trigger = no } + } + desc = ep2_tournament_events.0005.pain + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:versus_contestant + triggered_animation = { # Normal + trigger = { + scope:versus_contestant = { is_eunuch_trigger = no } + } + animation = pain + } + triggered_animation = { # Unfettered by any weak spots. BUILT DIFFERENT. + trigger = { + scope:versus_contestant = { is_eunuch_trigger = yes } + } + animation = anger + } + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_trait = just + has_trait = compassionate + has_trait = gallant + } + add = -0.5 + } + modifier = { + OR = { + has_trait = arbitrary + has_trait = sadistic + has_trait = ambitious + } + add = 0.5 + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0005 } + } + + # Follow up + option = { + name = ep2_tournament_events.0005.a + + trigger = { + scope:versus_contestant = { is_eunuch_trigger = no } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + accolade_minimal_glory_loss_with_checks_effect = yes + + add_prestige = minor_prestige_loss + + add_character_modifier = { + modifier = tournament_low_blower_modifier + years = 10 + } + + scope:versus_contestant = { + add_prestige = minor_prestige_loss + + add_opinion = { + target = root + modifier = angry_opinion + opinion = -50 + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + sadistic = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + gallant = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + # Apologise + option = { + name = ep2_tournament_events.0005.b + + trigger = { + scope:versus_contestant = { is_eunuch_trigger = no } + } + + accolade_minimal_glory_gain_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -20 + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + honest = minor_stress_impact_loss + sadistic = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_vengefulness = -1 + } + } + } + + # Oh no, they're not susceptible to my secret technique! + option = { + name = ep2_tournament_events.0005.c + + trigger = { + scope:versus_contestant = { is_eunuch_trigger = yes } + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = dismissive_opinion + opinion = -25 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + impatient = minor_stress_impact_loss + brave = medium_stress_impact_gain + patient = medium_stress_impact_gain + content = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + } + } +} + +# You have a chance to end them rightly +ep2_tournament_events.0006 = { + type = activity_event + title = ep2_tournament_events.0006.t + desc = ep2_tournament_events.0006.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = scheme + } + + right_portrait = { + character = scope:versus_contestant + animation = worry + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0006 } + } + + # End them rightly! + option = { + name = ep2_tournament_events.0006.a + + flavor = ep2_tournament_events.0006.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_miniscule } + + accolade_minimal_glory_gain_with_checks_effect = yes + + add_character_modifier = { + modifier = tournament_roguish_duelist_modifier + years = 25 + } + + scope:versus_contestant = { + send_interface_toast = { #Send an interface toast so it's not just completely random if it's not an AI + title = ep2_tournament_events.0006.a.toast + left_icon = scope:versus_contestant + right_icon = root + + add_prestige = medium_prestige_loss + + add_character_modifier = { + modifier = tournament_ended_rightly_modifier + years = 15 + } + } + + add_opinion = { + target = root + modifier = tournament_ended_rightly_opinion + opinion = -60 + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ended_rightly_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + sadistic = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + } + + ai_chance = { + base = 30 #Deliberately lowered to ensure we don't see too much of this + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + # Just follow up normally + option = { + name = ep2_tournament_events.0006.b + + flavor = ep2_tournament_events.0006.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + stress_impact = { + just = miniscule_stress_impact_loss + arbitrary = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_vengefulness = -1 + } + } + } + + # Let them recover + option = { + name = ep2_tournament_events.0006.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + + accolade_minor_glory_gain_with_checks_effect = yes + + progress_towards_friend_effect = { + REASON = friend_duel_recovered + CHARACTER = scope:versus_contestant + OPINION = default_friend_opinion + } + + stress_impact = { + ambitious = medium_stress_impact_gain + craven = medium_stress_impact_gain + impatient = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + brave = miniscule_stress_impact_loss + patient = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + forgiving = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + } + } +} + +# Your opponent offers you money to take a dive +ep2_tournament_events.0007 = { + type = activity_event + title = ep2_tournament_events.0007.t + desc = ep2_tournament_events.0007.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:versus_contestant + animation = beg + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matcher } + scope:versus_matchee.gold > 100 + } + trigger_else = { scope:versus_matcher.gold > 100 } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0007 } + } + + # Accept + option = { + name = ep2_tournament_events.0007.a + + scope:versus_contestant = { + pay_short_term_gold = { + target = root + gold = { + value = scope:versus_contestant.major_gold_value + max = 100 + } + } + + add_opinion = { + target = root + modifier = relieved_opinion + opinion = 30 + } + } + + save_scope_as = resigner + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = duel SKILL = foot } + + scope:activity = { + add_activity_log_entry = { + key = tournament_suspicious_loss_log + tags = { bad } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = minor_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + } + } + + # Accept, but for a hook and half the gold + option = { + name = ep2_tournament_events.0007.b + + trigger = { + can_add_hook = { #Ensure they can be indebted to you + type = loyalty_hook + target = scope:versus_contestant + } + } + + add_hook = { + type = loyalty_hook + target = scope:versus_contestant + } + + save_scope_as = resigner + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = duel SKILL = foot } + + scope:activity = { + add_activity_log_entry = { + key = tournament_suspicious_loss_log + tags = { bad } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + honest = medium_stress_impact_gain + greedy = minor_stress_impact_gain + deceitful = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_energy = 1 + } + } + } + + # Refuse + option = { + name = ep2_tournament_events.0007.c + + scope:versus_contestant = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + + stress_impact = { + arbitrary = medium_stress_impact_gain + just = miniscule_stress_impact_loss + greedy = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_vengefulness = -1 + } + } + } +} + +# You try to read your opponent's move +ep2_tournament_events.0010 = { + type = activity_event + title = ep2_tournament_events.0010.t + desc = ep2_tournament_events.0010.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = marshal + } + + right_portrait = { + character = scope:versus_contestant + animation = sword_coup_degrace + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0010 } + } + + # Attempt a risky counter + option = { + name = ep2_tournament_events.0010.a + + duel = { + skills = { prowess intrigue } + target = scope:versus_contestant + 50 = { #You guess right + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.0010.a.success + + modifier = { + has_trait = lifestyle_blademaster + add = 10 + } + + modifier = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + add = 10 + } + + modifier = { + has_trait = shrewd + add = 2 + } + + send_interface_toast = { + title = ep2_tournament_events.0010.a.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 10 + } + } + min = 10 + } + 50 = { #You guess wrong + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.0010.a.failure + + modifier = { + scope:versus_contestant = { + has_trait = lifestyle_blademaster + } + add = 5 + } + + modifier = { + scope:versus_contestant = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + } + add = 5 + } + + send_interface_toast = { + title = ep2_tournament_events.0010.a.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_no_death_effect = { REASON = duel } + + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + min = 10 + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + impatient = miniscule_stress_impact_loss + patient = minor_stress_impact_gain + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } + + # Block it + option = { + name = ep2_tournament_events.0010.b + + duel = { + skills = { prowess martial } + target = scope:versus_contestant + 75 = { #It succeeds + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.0010.b.success + + modifier = { + has_trait = lifestyle_blademaster + add = 10 + } + + modifier = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + add = 10 + } + + send_interface_toast = { + title = ep2_tournament_events.0010.b.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 10 + } + } + min = 10 + } + 25 = { #It fails + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.0010.a.failure + + modifier = { + scope:versus_contestant = { + has_trait = lifestyle_blademaster + } + add = 7 + } + + modifier = { + scope:versus_contestant = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + } + add = 7 + } + + send_interface_toast = { + title = ep2_tournament_events.0010.a.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_no_death_effect = { REASON = duel } + } + min = 10 + } + } + + stress_impact = { + fickle = miniscule_stress_impact_loss + patient = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + stubborn = minor_stress_impact_gain + impatient = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.5 + } + } + } + + # Sidestep the blow entirely + option = { + name = ep2_tournament_events.0010.c + + flavor = ep2_tournament_events.0010.c.tt + + accolade_minimal_glory_gain_with_checks_effect = yes + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + + stress_impact = { + brave = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + impatient = minor_stress_impact_gain + patient = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = -1 + } + } + } +} + +# You attempt to fight with your other hand to surprise your opponent +ep2_tournament_events.0011 = { + type = activity_event + title = ep2_tournament_events.0011.t + desc = ep2_tournament_events.0011.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = aggressive_sword + } + + right_portrait = { + character = scope:versus_contestant + animation = sword_coup_degrace + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + + NOT = { #For obvious reasons + has_trait = maimed + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_woosh" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0011 } + save_scope_value_as = { + name = weapon_range + value = { + integer_range = { + min = 1 + max = 15 + } + } + } + } + + # Pop it to your hand with the greatest of ease + option = { + name = ep2_tournament_events.0011.a + + trigger = { + OR = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + has_trait = lifestyle_blademaster + has_trait = education_martial_prowess + } + } + + flavor = ep2_tournament_events.0011.a.tt + + add_character_modifier = tournament_ambidextrous_modifier + + accolade_minor_glory_gain_with_checks_effect = yes + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ambidextrous_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + base = minor_stress_impact_loss + deceitful = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + # Attempt to throw your weapon to your other hand + option = { + name = ep2_tournament_events.0011.b + + trigger = { + NOR = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + has_trait = lifestyle_blademaster + has_trait = education_martial_prowess + } + } + + flavor = ep2_tournament_events.0011.b.tt + + duel = { + skills = { prowess intrigue } + target = scope:versus_contestant + + 50 = { #It succeeds + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.0011.b.success + + modifier = { + has_trait = athletic + add = 5 + } + + modifier = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 15 + } + } + add = 5 + } + min = 5 + + modifier = { + has_trait = education_martial_prowess + add = 15 + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ambidextrous_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + send_interface_toast = { + title = ep2_tournament_events.0011.b.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + add_character_modifier = { + modifier = tournament_ambidextrous_modifier + years = 25 + } + } + } + 40 = { #It fails + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.0011.b.failure + + modifier = { + scope:versus_contestant = { + has_trait = lifestyle_blademaster + } + add = 7 + } + + modifier = { + scope:versus_contestant = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + } + add = 7 + } + min = 4 + + send_interface_toast = { + title = ep2_tournament_events.0011.b.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + + 10 = { #It fails horrendously + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 1 + + desc = ep2_tournament_events.0011.b.criticalfailure + + scope:activity = { + add_activity_log_entry = { + key = tournament_ambisinister_log + tags = { bad } + score = 5 + character = root + target = scope:versus_contestant + } + } + + send_interface_toast = { + title = ep2_tournament_events.0011.b.criticalfailure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + + add_character_modifier = { + modifier = tournament_ambisinister_modifier + years = 25 + } + + increase_wounds_no_death_effect = { REASON = duel } + + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + # Attempt to fight on, using your sword with two hands + option = { + name = ep2_tournament_events.0011.c + + flavor = ep2_tournament_events.0011.c.tt + + random_list = { + 50 = { + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:weapon_range + } + + send_interface_toast = { + title = ep2_tournament_events.0011.c.success + left_icon = root + right_icon = scope:versus_contestant + + custom_tooltip = ep2_tournament_events.0011.c.opinion + + scope:activity = { + random_guest_subset_current_phase = { + name = spectator + limit = { is_alive = yes } + + hidden_effect = { + add_opinion = { + target = root + opinion = 5 + modifier = impressed_opinion + } + } + } + } + } + } + 50 = { + send_interface_toast = { + title = ep2_tournament_events.0011.c.failure + left_icon = root + right_icon = scope:versus_contestant + + increase_wounds_no_death_effect = { REASON = duel } + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# GO GO GADGET DUELING CLOAK +# No but for real, it's taken from Di Grassi's manuals (yes, I know, slightly out of period, shhhh, rule of cool): +# "The cloak may be flung or thrown with the edge of the sword, when one standeth at the low ward, +# with the point of the sword turned backwards, on the left side and the left side with the cloak upon it, +# followed at large upon the arm up to the elbow: but not wrapped about it, and whilest he falseth a reverse, +# he may take the cloak on the edge of the sword and fling it towards his enemy, +# and then strike him with such a blow as shall be then most for his advantage deliver." +ep2_tournament_events.0012 = { + type = activity_event + title = ep2_tournament_events.0012.t + desc = ep2_tournament_events.0012.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + + left_portrait = { + character = root + animation = marshal + } + + right_portrait = { + character = scope:versus_contestant + animation = laugh + } + + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + + has_character_flag = cloak_duelist_flag #Ensure you are wearing your DUELING CLOAK + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0012 } + } + + # Proudly fight in the cloak + option = { + name = ep2_tournament_events.0012.a + + trigger = { + has_trait = arrogant + } + + if = { + limit = { + NOT = { + has_character_modifier = tournament_fashionable_duelist_modifier + } + } + add_character_modifier = { + modifier = tournament_fashionable_duelist_modifier + years = 20 + } + } + else = { + add_prestige = medium_prestige_gain + } + + accolade_medium_glory_gain_with_checks_effect = yes + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + + stress_impact = { + base = medium_stress_impact_loss + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 0.5 + } + } + } + + # Throw the cloak at your enemy + option = { + name = ep2_tournament_events.0012.b + + trigger = { + intrigue > 8 + } + show_as_unavailable = { + always = yes + } + + flavor = ep2_tournament_events.0012.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + scope:activity = { + add_activity_log_entry = { + key = tournament_dueling_cloak_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 1 + } + } + } + + # Dis-cloak thyself + option = { + name = ep2_tournament_events.0012.c + + flavor = ep2_tournament_events.0012.c.tt + + stress_impact = { + ambitious = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + content = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 0.5 + } + } + } + + # Insist on wearing it + option = { + name = ep2_tournament_events.0012.d + + trigger = { + NOT = { + has_trait = arrogant + } + } + + if = { + limit = { + NOT = { + has_character_modifier = tournament_fashionable_duelist_modifier + } + } + add_character_modifier = { + modifier = tournament_fashionable_duelist_modifier + years = 10 + } + } + else = { + add_prestige = medium_prestige_gain + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } + + after = { + remove_character_flag = cloak_duelist_flag + } +} + +# Try to distract your opponent with words +ep2_tournament_events.0020 = { + type = activity_event + title = ep2_tournament_events.0020.t + desc = { + desc = ep2_tournament_events.0020.desc + first_valid = { + triggered_desc = { + trigger = { + scope:secret = { + exists = this + } + } + desc = ep2_tournament_events.0020.secret + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:versus_contestant + animation = aggressive_sword + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0020 } + + scope:versus_contestant = { + random_secret = { + limit = { + is_known_by = root + } + save_scope_as = secret + } + } + } + + # Loudly reveal their secret + option = { + name = ep2_tournament_events.0020.a + + trigger = { + scope:secret = { + exists = this + } + OR = { + has_trait = sadistic + has_trait = callous + has_trait = arbitrary + } + } + + scope:secret = { + expose_secret = root + } + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + + accolade_minor_glory_loss_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -50 + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_secret_exposed_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + sadistic = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + + modifier = { + factor = 0 + NOR = { + has_trait = compassionate + has_trait = just + } + } + } + } + + # I know your seeeecreeeet! + option = { + name = ep2_tournament_events.0020.b + + trigger = { + scope:secret = { + exists = this + } + } + + add_internal_flag = special + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + accolade_minimal_glory_loss_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } + + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + sadistic = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 2 + ai_boldness = 2 + ai_honor = -2 + ai_compassion = -2 + } + } + } + + # Try to distract them + option = { + name = ep2_tournament_events.0020.c + + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { #They accept your apology + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.0020.c.success + + send_interface_toast = { + title = ep2_tournament_events.0020.c.success + left_icon = root + right_icon = scope:versus_contestant + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + } + 50 = { #They don't accept the apology + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.0020.c.failure + + send_interface_toast = { + title = ep2_tournament_events.0020.c.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + } + + stress_impact = { + just = medium_stress_impact_gain + honest = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_gain + deceitful = miniscule_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -1 + } + } + } + + # Decide against such underhanded tactics + option = { + name = ep2_tournament_events.0020.d + + accolade_minimal_glory_gain_with_checks_effect = yes + + stress_impact = { + just = miniscule_stress_impact_loss + honest = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = -0.5 + ai_honor = 1 + } + } + } +} + +# Remind your opponent you slept with their family member +ep2_tournament_events.0021 = { + type = activity_event + title = ep2_tournament_events.0021.t + desc = ep2_tournament_events.0021.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:versus_contestant + animation = dismissal + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matcher } + scope:versus_matchee = { + any_close_family_member = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + is_spouse_of = root + } + } + } + } + trigger_else = { + scope:versus_matcher = { + any_close_family_member = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + is_spouse_of = root + } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0021 } + + scope:versus_contestant = { + random_close_family_member = { + limit = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + is_spouse_of = root + } + } + save_scope_as = family + } + } + } + + # CoD lobby trash talk, 2009 + option = { + name = ep2_tournament_events.0021.a + + trigger = { + OR = { + has_trait = sadistic + has_trait = arrogant + } + + NOR = { + has_trait = chaste + has_trait = celibate + } + } + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = absolutely_horrified_opinion + opinion = -60 + } + + reverse_add_opinion = { + target = scope:family + modifier = insulted_opinion + opinion = -20 + } + + stress_impact = { + base = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 2 + ai_boldness = 2 + ai_honor = -2 + ai_compassion = -2 + } + } + } + + # Thou hast undone our mother! + option = { + name = ep2_tournament_events.0021.b + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + accolade_minimal_glory_gain_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -40 + } + + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + sadistic = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 2 + ai_boldness = 2 + ai_honor = -2 + ai_compassion = -2 + } + } + } + + # Stay out of it + option = { + name = ep2_tournament_events.0021.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -2 + ai_boldness = -2 + ai_honor = 2 + ai_compassion = 2 + } + } + } +} + +############### +### MELEE ### +############### + +# Melee spills over into nearby town +ep2_tournament_events.1001 = { + type = activity_event + title = ep2_tournament_events.1001.t + desc = ep2_tournament_events.1001.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + cooldown = { years = 1 } + + trigger = { + NOT = { + has_variable = tournament_village_destroyed + } + OR = { + involved_activity.activity_location = { + has_holding_type = church_holding + barony = { + lessee = { + this != root #it's not you + is_ai = yes + is_adult = yes + } + } + } + scope:activity.activity_location.province_owner != root + } + } + + immediate = { + play_sound_effect = "event:/SFX/Ambience/3DMapEmitters/Nature/sfx_amb_3d_fire" + scope:activity.activity_location.province_owner = { save_scope_as = mayor } + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1001 } + } + + # Make everyone stop + option = { + name = ep2_tournament_events.1001.a + + trigger = { + has_trait = august + } + + add_prestige = medium_prestige_value + + stress_impact = { + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = craven + has_trait = content + has_trait = humble + } + } + } + } + + # Stubbornly refuse to leave + option = { + name = ep2_tournament_events.1001.b + + trigger = { + has_trait = stubborn + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + scope:activity.activity_location = { + add_province_modifier = { + modifier = village_destroyed_modifier + years = 10 + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_village_burned_log + tags = { bad } + score = 5 + character = root + } + } + + stress_impact = { + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = craven + has_trait = content + has_trait = humble + } + } + } + } + + # Attempt to call a truce + option = { + name = ep2_tournament_events.1001.c + + duel = { + skill = diplomacy + value = high_skill_rating + + 50 = { #The contestants acquiesce + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1001.c.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_prestige = minor_prestige_gain + } + + desc = ep2_tournament_events.1001.c.success + } + 50 = { #Nobody listens + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1001.c.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + add_prestige = minor_prestige_loss + } + + desc = ep2_tournament_events.1001.c.failure + + scope:activity = { + add_activity_log_entry = { + key = tournament_village_burned_log + tags = { bad } + score = 5 + character = root + } + } + + scope:activity.activity_location = { + add_province_modifier = { + modifier = village_destroyed_modifier + years = 10 + } + } + + set_variable = { + days = 150 #Want it to last the entire duration of a tournament + name = tournament_village_destroyed + } + } + } + + stress_impact = { + brave = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Leave + option = { + name = ep2_tournament_events.1001.d + + set_variable = { + days = 150 #Want it to last the entire duration of a tournament + name = tournament_village_destroyed + } + + scope:activity.activity_location = { + add_province_modifier = { + modifier = village_destroyed_modifier + years = 10 + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_village_burned_log + tags = { bad } + score = 5 + character = root + } + } + + stress_impact = { + craven = minor_stress_impact_loss + content = miniscule_stress_impact_loss + brave = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + + modifier = { + factor = 0 + NOR = { + has_trait = brave + has_trait = ambitious + has_trait = arrogant + } + } + } + } +} + +# Village mayor approaches you furiously +ep2_tournament_events.1002 = { + type = activity_event + title = ep2_tournament_events.1002.t + desc = ep2_tournament_events.1002.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:mayor + animation = anger + } + cooldown = { years = 1 } + + trigger = { + has_variable = tournament_village_destroyed # ensure village actually got ruined + scope:activity.activity_location.province_owner != root + } + + immediate = { + scope:activity.activity_location.province_owner = { save_scope_as = mayor } + scope:activity.activity_location = { save_scope_as = holding } + } + + # Offer to rebuild using your expertise + option = { + name = ep2_tournament_events.1002.a + + trigger = { + has_trait = architect + } + + reverse_add_opinion = { + target = scope:mayor + opinion = 20 + modifier = pleased_opinion + } + + if = { + limit = { + this != scope:host + } + reverse_add_opinion = { + target = scope:host + opinion = 20 + modifier = pleased_opinion + } + } + + scope:holding = { + remove_province_modifier = village_destroyed_modifier + add_province_modifier = { + modifier = village_rebuilt_modifier + years = 10 + } + } + + stress_impact = { + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = content + has_trait = humble + } + } + } + } + + # Intimidate the mayor + option = { + name = ep2_tournament_events.1002.b + + trigger = { + dread >= high_dread + } + + add_internal_flag = special + + reverse_add_opinion = { + target = scope:mayor + opinion = -30 + modifier = scared_opinion + } + + stress_impact = { + sadistic = minor_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = content + has_trait = humble + has_trait = compassionate + } + } + } + } + + # Offer to pay for the damage + option = { + name = ep2_tournament_events.1002.c + + remove_short_term_gold = medium_gold_value + + scope:holding = { + remove_province_modifier = village_destroyed_modifier + } + + reverse_add_opinion = { + target = scope:mayor + opinion = 10 + modifier = kindness_opinion + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_village_paid_log + tags = { good } + score = 5 + character = root + target = scope:mayor + } + } + + stress_impact = { + greedy = major_stress_impact_gain + generous = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + # Send the mayor away + option = { + name = ep2_tournament_events.1002.d + + progress_towards_rival_effect = { + REASON = rival_melee_dismissed_mayor + CHARACTER = scope:mayor + OPINION = default_rival_opinion + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +# Your weapon is knocked from your grasp; retrieve it or switch to a reserve? +ep2_tournament_events.1003 = { + type = activity_event + title = ep2_tournament_events.1003.t + desc = ep2_tournament_events.1003.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + artifact = { + target = scope:tournament_weapon + position = lower_center_portrait + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { # Just to make sure there's still some alive people + name = qualified + contest_event_general_contestant_valid_trigger = yes + } + } + any_character_artifact = { + is_equipped = yes + artifact_slot_type = primary_armament + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1003 } + random_character_artifact = { + limit = { + is_equipped = yes + artifact_slot_type = primary_armament + } + unequip_artifact_from_owner = yes + save_scope_as = tournament_weapon + } + + save_scope_value_as = { + name = weapon_range + value = { + integer_range = { + min = 0 + max = 5 + } + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + + # Dive for it + option = { + name = ep2_tournament_events.1003.a + + random_list = { + 10 = { #You successfully retrieve it + custom_tooltip = ep2_tournament_events.1003.a.tt.success + + modifier = { #Strong and Athletic are nice catch-all traits for having quick reflexes + add = 5 + + OR = { + has_trait = strong + has_trait = athletic + } + } + modifier = { #add a good physique too, for the same reasons + add = 2 + + has_trait = physique_good + } + + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:weapon_range + } + + send_interface_toast = { + title = ep2_tournament_events.1003.a.tt.success + left_icon = root + + scope:tournament_weapon = { + equip_artifact_to_owner = yes + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + + arrogant = miniscule_stress_impact_loss + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + } + + 10 = { #You have to go back later and find it + custom_tooltip = ep2_tournament_events.1003.a.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.1003.a.tt.failure + left_icon = root + } + + stress_impact = { + base = miniscule_stress_impact_gain + + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + } + } + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOT = { + has_trait = arrogant + } + } + } + } + + # Switch to a different weapon + option = { + name = ep2_tournament_events.1003.b + + flavor = ep2_tournament_events.1003.b.tt + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + arrogant = medium_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { #Get out option + base = 100 + } + } +} + +# A comely [non-martial gender] has taken a wrong turn and ended up in the melee! +ep2_tournament_events.1004 = { + type = activity_event + title = ep2_tournament_events.1004.t + desc = ep2_tournament_events.1004.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:comely_stray + animation = worry + } + lower_center_portrait = { + character = scope:rescuer_knight + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_attending_character = { + count < 240 #Max is 250 but attendance is open so leaving some space + } + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + is_knight_of = root + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1004 } + create_character = { + template = beautiful_peasant_character + age = { age_compared_to_root_minus_ten_always_adult age_compared_to_root_plus_ten_always_adult } + gender_female_chance = root_attraction_based_female_chance + location = scope:activity.activity_location + faith = root.location.faith + culture = root.location.culture + save_scope_as = comely_stray + + } + scope:comely_stray = { + hidden_effect = { + add_to_activity = scope:activity + } + } + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + is_knight_of = root + } + save_scope_as = rescuer_knight + } + } + } + + # Lustful/Seducer option that has you escort them completely off the field of battle + option = { + name = ep2_tournament_events.1004.a + + trigger = { + OR = { + has_trait = lustful + has_trait = seducer + } + might_cheat_on_every_partner_trigger = yes + } + + flavor = ep2_tournament_events.1004.a.tt + + accolade_minor_glory_gain_with_checks_effect = yes + + had_sex_with_effect = { + CHARACTER = scope:comely_stray + PREGNANCY_CHANCE = 50 + } + + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:comely_stray } + } + set_relation_lover = { + TARGET = scope:comely_stray + REASON = lover_saved_melee + } + } + + remove_variable = contest_aptitude + + scope:activity = { + add_activity_log_entry = { + key = tournament_seducer_log + tags = { good } + score = 5 + character = root + target = scope:comely_stray + + # Effect + custom_description = { + text = tournament_contest_withdraw_tt + subject = root + } + } + } + + stress_impact = { + base = minor_stress_impact_loss + chaste = massive_stress_impact_gain #technically possible if you're a Seducer + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + compassionate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = brave + } + } + } + } + + # Well well, how would you like a dashing ladylord to sweep you off your feet? + option = { + name = ep2_tournament_events.1004.a # Same name as above to re-use loc + + trigger = { + NOR = { + has_trait = lustful + has_trait = seducer + } + } + + accolade_minimal_glory_gain_with_checks_effect = yes + + scope:comely_stray = { #Goodness, so dashing! + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 40 + } + } + + add_courtier = scope:comely_stray + + if = { + limit = { + can_start_scheme = { + type = seduce + target_character = scope:comely_stray + } + } + start_scheme = { + type = seduce + target_character = scope:comely_stray + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_swept_off_feet_log + tags = { good } + score = 5 + character = root + target = scope:comely_stray + } + } + + stress_impact = { + chaste = major_stress_impact_gain + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + compassionate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = brave + } + } + } + } + + # Send a knight to rescue them + option = { + name = ep2_tournament_events.1004.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + scope:rescuer_knight = { + accolade_minor_glory_gain_with_checks_effect = yes + } + + scope:comely_stray = { + add_opinion = { + modifier = grateful_opinion + target = scope:rescuer_knight + opinion = 40 + } + } + + stress_impact = { + lustful = major_stress_impact_gain + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = lustful + } + } + } + } + + # They can fend for themselves + option = { + name = ep2_tournament_events.1004.d + + scope:comely_stray = { + add_opinion = { + modifier = cruelty_opinion + target = root + opinion = -30 + } + } + + random_list = { + 7 = { #They escape unharmed + desc = ep2_tournament_events.1004.d.escape.tt + + show_chance = no #Make it uncertain for all three + + send_interface_toast = { + title = ep2_tournament_events.1004.d.escape.tt + left_icon = root + right_icon = scope:comely_stray + } + } + + 5 = { #They get injured + desc = ep2_tournament_events.1004.d.injured.tt + + show_chance = no + + send_interface_toast = { + title = ep2_tournament_events.1004.d.injured.tt + left_icon = root + right_icon = scope:comely_stray + + scope:comely_stray = { + increase_wounds_effect = { REASON = battle } + + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 35 + max = 100 + } + } + } + } + } + } + + 3 = { #They die + desc = ep2_tournament_events.1004.d.dead.tt + + show_chance = no + + scope:activity = { + add_activity_log_entry = { + key = tournament_melee_death_log + tags = { bad } + score = 5 + character = root + target = scope:comely_stray + } + } + + send_interface_toast = { + title = ep2_tournament_events.1004.d.dead.tt + left_icon = root + right_icon = scope:comely_stray + scope:comely_stray = { + death = { death_reason = death_wounds } + } + } + } + } + + stress_impact = { + lustful = major_stress_impact_gain + brave = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + lazy = minor_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = brave + has_trait = compassionate + } + } + } + } +} + +# Death Event: You step into a throat strike +ep2_tournament_events.1005 = { + type = activity_event + title = ep2_tournament_events.1005.t + desc = ep2_tournament_events.1005.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = poison + } + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + } + } + + # Die + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.a + + remove_variable = contest_aptitude + scope:activity = { + add_activity_log_entry = { + key = tournament_melee_death_log + tags = { bad } + score = 10 + character = root + } + } + + death = { + death_reason = death_tournament_melee_throat + } + + ai_chance = { + base = 100 + } + } +} + +# Ransom an opponent +ep2_tournament_events.1006 = { + type = activity_event + title = ep2_tournament_events.1006.t + desc = { + desc = ep2_tournament_events.1006.start + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_relation_rival = scope:surrendering_knight + has_relation_nemesis = scope:surrendering_knight + } + } + desc = ep2_tournament_events.1006.rival + } + triggered_desc = { + trigger = { + AND = { + NOR = { + has_relation_rival = scope:surrendering_knight + has_relation_nemesis = scope:surrendering_knight + } + scope:surrendering_knight.gold < 5 + } + } + desc = { + desc = ep2_tournament_events.1006.normal + desc = ep2_tournament_events.1006.broke + } + } + triggered_desc = { + trigger = { + NOR = { + has_relation_rival = scope:surrendering_knight + has_relation_nemesis = scope:surrendering_knight + } + } + desc = ep2_tournament_events.1006.normal + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = sword_coup_degrace + } + right_portrait = { + character = scope:surrendering_knight + animation = sword_yield_start + } + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + root = this + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + is_ai = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1006 } + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + is_ai = yes + } + save_scope_as = surrendering_knight + } + } + + save_scope_value_as = { #Save their gold + name = surrendering_knight_gold + value = scope:surrendering_knight.gold + } + + save_scope_value_as = { #Save a fifth of their gold as a ransom + name = gold_percentage + value = { + value = scope:surrendering_knight.gold + multiply = 0.2 + } + } + + if = { + limit = { + scope:surrendering_knight ?= { + any_equipped_character_artifact = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + } + } + } + } + scope:surrendering_knight = { + random_equipped_character_artifact = { + limit = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + } + } + save_scope_as = artifact + } + } + } + else = { + create_artifact_brooch_effect = { + OWNER = scope:surrendering_knight + SMITH = scope:surrendering_knight + } + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + + scope:surrendering_knight = { + accolade_medium_glory_loss_with_checks_effect = yes + } + } + + # Take their eye + option = { + name = ep2_tournament_events.1006.a + + trigger = { + OR = { + has_relation_rival = scope:surrendering_knight + has_relation_nemesis = scope:surrendering_knight + } + } + + add_internal_flag = special + + if = { + limit = { + scope:surrendering_knight = { + has_relation_nemesis = root + } + } + scope:surrendering_knight = { + add_trait = disfigured + } + } + else_if = { + limit = { + scope:surrendering_knight = { + has_relation_rival = root + } + } + scope:surrendering_knight = { + add_trait = one_eyed + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + compassionate = massive_stress_impact_gain + forgiving = massive_stress_impact_gain + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 25 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + # Take the ransom + option = { + name = ep2_tournament_events.1006.b + + trigger = { + scope:surrendering_knight.gold > 4 + } + + scope:surrendering_knight = { + pay_short_term_gold = { + target = root + gold = scope:gold_percentage + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ransom_log + tags = { good } + score = 5 + character = root + target = scope:surrendering_knight + } + } + + stress_impact = { # Deliberately low; we want the player to pick this option the most + greedy = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + generous = miniscule_stress_impact_gain + arbitrary = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = -0.5 + } + } + } + + # Take a piece of their armour/weaponry + option = { + name = ep2_tournament_events.1006.c + + trigger = { + scope:surrendering_knight = { + any_equipped_character_artifact = { + count >= 1 + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + } + } + } + } + + if = { + limit = { + scope:surrendering_knight = { + any_equipped_character_artifact = { + count >= 1 + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + } + save_temporary_scope_as = artifact + } + } + } + scope:artifact = { + set_owner = root + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ransom_log + tags = { good } + score = 5 + character = root + target = scope:surrendering_knight + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = -0.5 + } + } + } + + # Take a tiny amount of gold + option = { + name = ep2_tournament_events.1006.d + + trigger = { + scope:surrendering_knight = { + any_equipped_character_artifact = { + count = 0 + } + gold < 4 + } + } + + scope:surrendering_knight = { + pay_short_term_gold = { + target = root + gold = 5 + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ransom_log + tags = { good } + score = 5 + character = root + target = scope:surrendering_knight + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = -0.5 + } + } + } + + # Let them go free + option = { + name = ep2_tournament_events.1006.e + + add_prestige = 50 #Small bit of prestige for being gracious + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:surrendering_knight + opinion = 25 + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } +} + +# You take a minute at a refuge +ep2_tournament_events.1007 = { + type = activity_event + title = ep2_tournament_events.1007.t + desc = ep2_tournament_events.1007.desc + theme = tournament_contest + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:teammate_1 + } + lower_right_portrait = { + character = scope:teammate_2 + } + lower_left_portrait = { + character = scope:teammate_3 + } + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + root = this + exists = var:progress_to_victory + } + #Ensure there are two teams with at least 3 people each + any_guest_subset_current_phase = { + name = team_alpha + contest_event_general_contestant_valid_trigger = yes + count >= 3 + } + any_guest_subset_current_phase = { + name = team_beta + contest_event_general_contestant_valid_trigger = yes + count >= 3 + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_trotting" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1007 } + scope:activity = { + if = { # If you're in Team A, grab teammates + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = teammate_1 + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:teammate_1 + } + save_scope_as = teammate_2 + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + NOR = { + this = scope:teammate_1 + this = scope:teammate_2 + } + } + save_scope_as = teammate_3 + } + } + else = { # If you're in team B, grab those teammates + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + } + save_scope_as = teammate_1 + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:teammate_1 + } + save_scope_as = teammate_2 + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + NOR = { + this = scope:teammate_1 + this = scope:teammate_2 + } + } + save_scope_as = teammate_3 + } + } + } + } + + # Pay for some food and drink + option = { + name = ep2_tournament_events.1007.a + + remove_short_term_gold = medium_gold_value + + random_list = { + 10 = { #You are all somewhat refreshed + desc = ep2_tournament_events.1007.a.tt.success + show_chance = no + + hidden_effect = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + scope:teammate_1 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + scope:teammate_2 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + scope:teammate_3 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + } + + send_interface_toast = { + title = ep2_tournament_events.1007.a.tt.success + left_icon = root + + custom_tooltip = ep2_tournament_events.1007.a.result + } + } + 2 = { #It refreshes all of you a lot + desc = ep2_tournament_events.1007.a.tt.bigsuccess + show_chance = no + + hidden_effect = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + scope:teammate_1 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + scope:teammate_2 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + scope:teammate_3 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + } + + send_interface_toast = { + title = ep2_tournament_events.1007.a.tt.bigsuccess + left_icon = root + + custom_tooltip = ep2_tournament_events.1007.a.bigresult + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_gain + gluttonous = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = greedy + has_trait = avaricious + } + } + } + } + + # Share some inspiring words + option = { + name = ep2_tournament_events.1007.b + + flavor = ep2_tournament_events.1007.b.tt + + duel = { + skill = diplomacy + value = decent_skill_rating + + 50 = { #You inspire your troops + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.1007.b.tt.success + + hidden_effect = { + scope:teammate_1 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + scope:teammate_2 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + scope:teammate_3 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + } + + send_interface_toast = { + title = ep2_tournament_events.1007.b.tt.success + left_icon = root + + custom_tooltip = ep2_tournament_events.1007.b.result + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 50 = { #You fail to make an impact + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.1007.b.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.1007.b.tt.failure + left_icon = root + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + shy = medium_stress_impact_gain + lazy = minor_stress_impact_gain + greedy = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = shy + } + } + } + + # Rest alone + option = { + name = ep2_tournament_events.1007.c + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + stress_impact = { + shy = minor_stress_impact_loss + lazy = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + gregarious = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = gregarious + } + } + } +} + +# You encounter a famous knight in the melee +ep2_tournament_events.1011 = { + type = activity_event + title = ep2_tournament_events.1011.t + desc = { + desc = ep2_tournament_events.1011.start + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + desc = ep2_tournament_events.1011.equal + } + triggered_desc = { + trigger = { + NOR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + desc = ep2_tournament_events.1011.unequal + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:famous_knight + animation = sword_coup_degrace + } + cooldown = { years = 1 } + + trigger = { + exists = var:progress_to_victory_score + scope:activity = { + has_current_phase = tournament_phase_melee + OR = { + AND = { # If you're in Team A, they need to be in Team B + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + any_guest_subset_current_phase = { + name = team_beta + contest_event_general_contestant_valid_trigger = yes + has_trait = tourney_participant + is_healthy = yes + OR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + } + AND = { # If you're in Team B, they need to be in Team A + any_guest_subset_current_phase = { + name = team_beta + this = root + } + any_guest_subset_current_phase = { + name = team_alpha + contest_event_general_contestant_valid_trigger = yes + has_trait = tourney_participant + is_healthy = yes + OR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1011 } + scope:activity = { + if = { + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + has_trait = tourney_participant + is_healthy = yes + OR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + save_scope_as = famous_knight + } + } + else = { + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + has_trait = tourney_participant + is_healthy = yes + OR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + save_scope_as = famous_knight + } + } + } + save_scope_value_as = { + name = fight_range + value = { + integer_range = { + min = 1 + max = 9 + } + } + } + } + + # Throw dirt to give you an advantage before your duel + option = { + name = ep2_tournament_events.1011.a + + flavor = ep2_tournament_events.1011.a.tt + + trigger = { + OR = { + intrigue > 20 + has_trait = deceitful + has_trait = arbitrary + } + } + + random_list = { + 75 = { #You win + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:fight_range + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + add = 5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 90 + } + add = 15 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 60 + } + add = 5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 75 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 90 + } + add = 15 + } + desc = ep2_tournament_events.1011.a.success + send_interface_toast = { + title = ep2_tournament_events.1011.a.success + left_icon = root + right_icon = scope:famous_knight + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 25 = { #You lose + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:fight_range + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + } + add = 5 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + } + add = 10 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 90 + } + } + add = 15 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 60 + } + } + add = 5 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 75 + } + } + add = 10 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 90 + } + } + add = 15 + } + desc = ep2_tournament_events.1011.a.failure + send_interface_toast = { + title = ep2_tournament_events.1011.a.failure + left_icon = root + right_icon = scope:famous_knight + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_dirt_thrown_log + tags = { good } + score = 5 + character = root + target = scope:famous_knight + } + } + + stress_impact = { + craven = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + wrathful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = just + } + } + } + } + + # Engage them head on + option = { + name = ep2_tournament_events.1011.b + + trigger = { + OR = { #You are skilful in your own right + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + + random_list = { + 50 = { #You win + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:fight_range + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + add = 5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 90 + } + add = 15 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 60 + } + add = 5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 75 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 90 + } + add = 15 + } + desc = ep2_tournament_events.1011.a.success + send_interface_toast = { + title = ep2_tournament_events.1011.a.success + left_icon = root + right_icon = scope:famous_knight + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + } + } + 50 = { #You lose + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + } + add = 5 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + } + add = 10 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 90 + } + } + add = 15 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 60 + } + } + add = 5 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 75 + } + } + add = 10 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 90 + } + } + add = 15 + } + desc = ep2_tournament_events.1011.a.failure + send_interface_toast = { + title = ep2_tournament_events.1011.a.failure + left_icon = root + right_icon = scope:famous_knight + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_dirt_thrown_log + tags = { good } + score = 5 + character = root + target = scope:famous_knight + } + } + + stress_impact = { + craven = medium_stress_impact_gain + wrathful = miniscule_stress_impact_loss + brave = minor_stress_impact_loss + just = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_vengefulness = 0.5 + } + } + } + + # Ignore their challenge and slip away + option = { + name = ep2_tournament_events.1011.c + + trigger = { + OR = { #You are skilful in your own right + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:famous_knight + opinion = -30 + } + + stress_impact = { + brave = major_stress_impact_gain + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + craven = medium_stress_impact_loss + content = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = brave + has_trait = arrogant + } + } + } + } + + # Try to fight them + option = { + name = ep2_tournament_events.1011.b #Re-use loc from above + + trigger = { + NOR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + + random_list = { + 20 = { #You win + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:fight_range + } + modifier = { + has_trait = physique_good + add = 5 + } + modifier = { + has_trait = strong + add = 5 + } + modifier = { + has_trait = gallant + add = 5 + } + modifier = { + has_trait = lifestyle_blademaster + add = 10 + } + custom_tooltip = ep2_tournament_events.1011.a.success + send_interface_toast = { + title = ep2_tournament_events.1011.a.success + left_icon = root + right_icon = scope:famous_knight + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + accolade_medium_glory_gain_with_checks_effect = yes + } + } + 80 = { #You lose + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:fight_range + } + custom_tooltip = ep2_tournament_events.1011.a.failure + send_interface_toast = { + title = ep2_tournament_events.1011.a.failure + left_icon = root + right_icon = scope:famous_knight + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + + scope:famous_knight = { + accolade_minor_glory_gain_with_checks_effect = yes + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + } + + stress_impact = { + brave = medium_stress_impact_loss #In face of very unlikely odds! + ambitious = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + craven = major_stress_impact_gain + humble = medium_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_vengefulness = 0.5 + } + } + } + + # Try to escape + option = { + name = ep2_tournament_events.1011.c #Also re-using this + + trigger = { + NOR = { #You are skilful in your own right + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:famous_knight + opinion = -30 + } + + duel = { + skill = intrigue + target = scope:famous_knight + + 50 = { #You escape + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.1011.d.success + + send_interface_toast = { + title = ep2_tournament_events.1011.d.success + left_icon = root + right_icon = scope:famous_knight + + add_stress = medium_stress_loss + } + } + 50 = { #They catch you and smack you about + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.1011.d.failure + + send_interface_toast = { + title = ep2_tournament_events.1011.d.failure + left_icon = root + right_icon = scope:famous_knight + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + } + } + + stress_impact = { + brave = major_stress_impact_gain + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + craven = medium_stress_impact_loss + content = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = ambitious + has_trait = arrogant + } + } + } + } +} + +# You attempt to ambush an opponent in the trees +ep2_tournament_events.1012 = { + type = activity_event + title = ep2_tournament_events.1012.t + desc = ep2_tournament_events.1012.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:caught_opponent + animation = shock + } + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + } + } + scope:activity.activity_location = { #Ensure it's in a place where there could feasibly be some trees + NOR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + terrain = floodplains + terrain = mountains + terrain = oasis + terrain = steppe + terrain = wetlands + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_wood_woosh" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1012 } + scope:activity = { + if = { # If you're in Team A, grab opponent + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_beta + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = caught_opponent + } + } + else = { # If you're in team B, grab that opponent + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + } + save_scope_as = caught_opponent + } + } + } + } + + # You, a forest fighter, take huge advantage + option = { + name = ep2_tournament_events.1012.a + + trigger = { + OR = { + has_trait = forest_fighter + has_trait = jungle_stalker + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + scope:caught_opponent = { + pay_short_term_gold = { + target = root + gold = { + value = root.medium_gold_value + max = scope:caught_opponent.gold + } + } + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ambush_sprung_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -1 + ai_vengefulness = 1 + } + } + } + + # You are an honorable knight, and offer them fair duel + option = { + name = ep2_tournament_events.1012.b + + trigger = { + OR = { + has_trait = gallant + has_trait = just + } + } + + duel = { + skill = prowess + target = scope:caught_opponent + + 50 = { #You win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 20 + } + add = 5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 40 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + add = 15 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 80 + } + add = 20 + } + desc = ep2_tournament_events.1012.b.success + send_interface_toast = { + title = ep2_tournament_events.1012.b.success + left_icon = root + right_icon = scope:caught_opponent + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + accolade_minor_glory_gain_with_checks_effect = yes + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + 50 = { #You lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + modifier = { + scope:caught_opponent = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 20 + } + } + add = 5 + } + modifier = { + scope:caught_opponent = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 40 + } + } + add = 10 + } + modifier = { + scope:caught_opponent = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + } + add = 15 + } + modifier = { + scope:caught_opponent = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 80 + } + } + add = 20 + } + desc = ep2_tournament_events.1012.b.failure + send_interface_toast = { + title = ep2_tournament_events.1012.b.failure + left_icon = root + right_icon = scope:caught_opponent + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + scope:caught_opponent = { + accolade_minor_glory_gain_with_checks_effect = yes + } + } + } + } + + reverse_add_opinion = { + modifier = respect_opinion + target = scope:caught_opponent + opinion = 25 + } + + stress_impact = { + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + ai_boldness = 1 + } + } + } + + # You attempt an ambush + option = { + name = ep2_tournament_events.1012.c + + trigger = { + NOR = { + has_trait = forest_fighter + has_trait = jungle_stalker + } + } + + duel = { + skills = { martial intrigue } + target = scope:caught_opponent + + 60 = { #It works + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + modifier = { + has_trait = deceitful #Happy to do it! + add = 5 + } + modifier = { + has_trait = patient #Wait for the right time to strike + add = 5 + } + modifier = { + has_trait = lifestyle_hunter + add = 5 + } + modifier = { + has_trait = lifestyle_blademaster + add = 5 + } + modifier = { + has_trait = strategist + add = 5 + } + custom_tooltip = ep2_tournament_events.1012.c.success + scope:activity = { + add_activity_log_entry = { + key = tournament_ambush_sprung_log + tags = { good } + score = 5 + character = root + target = scope:caught_opponent + } + } + send_interface_toast = { + title = ep2_tournament_events.1012.c.success + left_icon = root + right_icon = scope:caught_opponent + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + scope:caught_opponent = { + pay_short_term_gold = { + target = root + gold = { + value = root.minor_gold_value + max = scope:caught_opponent.gold + } + } + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 40 = { #It doesn't work + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + modifier = { + has_trait = impatient + add = 5 + } + modifier = { + scope:caught_opponent = { + has_trait = strategist + } + add = 5 + } + modifier = { + scope:caught_opponent = { + has_trait = paranoid #Always watching out of the corner of their eye + } + add = 5 + } + custom_tooltip = ep2_tournament_events.1012.c.failure + send_interface_toast = { + title = ep2_tournament_events.1012.c.failure + left_icon = root + right_icon = scope:caught_opponent + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + pay_short_term_gold = { + target = scope:caught_opponent + gold = { + value = root.minor_gold_value + max = root.gold + } + } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -1 + ai_vengefulness = 1 + } + } + } + + # You let them go + option = { + name = ep2_tournament_events.1012.d + + stress_impact = { + brave = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + craven = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + honest = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# An opponent has fallen from their horse +ep2_tournament_events.1013 = { + type = activity_event + title = ep2_tournament_events.1013.t + desc = ep2_tournament_events.1013.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_lance_couched_gallop + } + right_portrait = { + character = scope:felled_participant + animation = pain + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { #Ensure each team has at least one participant + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = team_alpha + contest_event_general_contestant_valid_trigger = yes + is_healthy = yes + } + any_guest_subset_current_phase = { + name = team_beta + contest_event_general_contestant_valid_trigger = yes + is_healthy = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1013 } + scope:activity = { + if = { #Ensure it picks an opponent + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + is_healthy = yes + } + save_scope_as = felled_participant + } + } + else = { + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + is_healthy = yes + } + save_scope_as = felled_participant + } + } + } + + scope:felled_participant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + + # You escort them out of the fray + option = { + name = ep2_tournament_events.1013.a + + trigger = { + OR = { + has_trait = gallant + has_trait = just + } + } + + scope:felled_participant = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 25 + } + } + + set_nickname_effect = { #To give you something roleplay-ish + NICKNAME = nick_the_honorable + } + + stress_impact = { + base = minor_stress_impact_loss + compassionate = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + # You run them over + option = { + name = ep2_tournament_events.1013.b + + activity_tournament_change_contestant_score_effect = { SCORE = increase_miniscule } + + scope:felled_participant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + increase_wounds_no_death_effect = { REASON = battle } + + random = { + chance = 33 + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + + stress_impact = { + brave = minor_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + sadistic = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -1 + } + } + } + + # You dismount to offer them fair duel + option = { + name = ep2_tournament_events.1013.c + + duel = { + skills = { prowess martial } + target = scope:felled_participant + + 50 = { #You win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 25 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + add = 20 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + add = 30 + } + desc = ep2_tournament_events.1013.c.success + send_interface_toast = { + title = ep2_tournament_events.1013.c.success + left_icon = root + right_icon = scope:felled_participant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + scope:felled_participant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 50 = { #You lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + modifier = { + scope:felled_participant = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 25 + } + } + add = 10 + } + modifier = { + scope:felled_participant = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + add = 20 + } + modifier = { + scope:felled_participant = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + } + add = 30 + } + desc = ep2_tournament_events.1013.c.failure + send_interface_toast = { + title = ep2_tournament_events.1013.c.failure + left_icon = root + right_icon = scope:felled_participant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + scope:felled_participant = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 1 + ai_boldness = 1 + } + } + } + + # You let them go + option = { + name = ep2_tournament_events.1013.d + + stress_impact = { + brave = miniscule_stress_impact_gain + sadistic = minor_stress_impact_gain + craven = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.5 + ai_boldness = -0.5 + } + } + } +} + +# A mysterious knight is doing incredibly well +ep2_tournament_events.1015 = { + type = activity_event + title = ep2_tournament_events.1015.t + desc = ep2_tournament_events.1015.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + cooldown = { years = 5 } + + trigger = { + scope:activity = { + OR = { + AND = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + any_guest_subset_current_phase = { + name = team_alpha + contest_event_general_contestant_valid_trigger = yes + OR = { #Ensure it's someone meaningful to you + is_close_family_or_spouse_of_root_trigger = yes + has_relation_lover = root + has_relation_soulmate = root + has_character_modifier = ignores_gender_army_rules #In case Mulan ends up really good! + } + } + } + AND = { + any_guest_subset_current_phase = { + name = team_beta + this = root + } + any_guest_subset_current_phase = { + name = team_beta + contest_event_general_contestant_valid_trigger = yes + OR = { #Ensure it's someone meaningful to you + is_close_family_or_spouse_of_root_trigger = yes + has_relation_lover = root + has_relation_soulmate = root + has_character_modifier = ignores_gender_army_rules #In case Mulan ends up really good! + } + } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1015 } + scope:activity = { + if = { #Ensure it picks a member of your team + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + OR = { + is_close_family_or_spouse_of_root_trigger = yes + has_relation_soulmate = root + has_relation_lover = root + has_character_modifier = ignores_gender_army_rules + } + } + save_scope_as = mysterious_knight + } + } + else = { + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + OR = { + is_close_family_or_spouse_of_root_trigger = yes + has_relation_soulmate = root + has_relation_lover = root + has_character_modifier = ignores_gender_army_rules + } + } + save_scope_as = mysterious_knight + } + } + } + + hidden_effect = { + scope:mysterious_knight = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + } + } + + save_scope_value_as = { #For the chase scene number fuzzying + name = chase_range + value = { + integer_range = { + min = 1 + max = 9 + } + } + } + } + + # Follow along behind them to clean up in their wake + option = { + name = ep2_tournament_events.1015.a + + trigger = { + intrigue >= 15 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_gold = { minor_gold_value medium_gold_value } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + brave = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = -1 + ai_compassion = -1 + } + } + } + + # You must know who it is! Chase after them! + option = { + name = ep2_tournament_events.1015.b + + random_list = { + 50 = { #You catch them + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:chase_range + } + modifier = { + has_trait = athletic + add = 10 + } + modifier = { + has_trait = stubborn + add = 5 + } + desc = ep2_tournament_events.1015.b.success + custom_tooltip = ep2_tournament_events.1015.b.success.tt + + trigger_event = ep2_tournament_events.1016 + } + 50 = { #They get away + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:chase_range + } + modifier = { + OR = { + has_trait = wheezing + has_trait = spindly + } + add = 10 + } + modifier = { + OR = { + has_trait = clubfooted + has_trait = dwarf + } + add = 10 + } + modifier = { + current_weight > 80 + add = 5 + } + modifier = { + scope:mysterious_knight = { + has_trait = athletic + } + add = 10 + } + desc = ep2_tournament_events.1015.b.failure + send_interface_toast = { + title = ep2_tournament_events.1015.b.failure + left_icon = root + right_icon = scope:caught_opponent + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + } + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + # You let them go + option = { + name = ep2_tournament_events.1015.c + + stress_impact = { + diligent = minor_stress_impact_gain + stubborn = medium_stress_impact_gain + lazy = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } +} + +# Followup to 1015: it's your (notable person!) +ep2_tournament_events.1016 = { + type = activity_event + title = ep2_tournament_events.1016.t + desc = { + desc = ep2_tournament_events.1016.start + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = knows_mulan_flag + scope:mysterious_knight = { + has_character_modifier = ignores_gender_army_rules + } + } + desc = ep2_tournament_events.1016.mulan + } + triggered_desc = { + trigger = { + NOT = { + has_character_flag = knows_mulan_flag + } + scope:mysterious_knight = { + has_character_modifier = ignores_gender_army_rules + } + } + desc = ep2_tournament_events.1016.mulanunknown + } + triggered_desc = { + trigger = { + scope:mysterious_knight = { + OR = { #Catchall for relations + is_close_family_or_spouse_of_root_trigger = yes + has_relation_lover = root + has_relation_soulmate = root + } + } + } + desc = ep2_tournament_events.1016.relation + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:mysterious_knight + animation = marshal + } + cooldown = { years = 5 } + + immediate = { + hidden_effect = { + if = { + limit = { + scope:mysterious_knight = { + NOT = { + has_trait = tourney_participant + } + } + } + add_trait = tourney_participant + } + + if = { #Give them a stealthy big boost, so in-universe they don't look weird + limit = { + scope:mysterious_knight = { + has_trait = tourney_participant + } + } + scope:mysterious_knight = { + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_major_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_major_value + } + } + } + else = { + scope:mysterious_knight = { + add_trait = tourney_participant + + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_major_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_major_value + } + } + } + } + save_scope_value_as = { #For the chase scene number fuzzying + name = ability_range + value = { + integer_range = { + min = 1 + max = 9 + } + } + } + } + + # Protect me! + option = { + name = ep2_tournament_events.1016.a + + add_character_modifier = { #Add a powerful but temporary modifier + modifier = tournament_melee_protector_modifier + years = 1 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_rationality = 1 + } + } + } + + # You must teach me! + option = { + name = ep2_tournament_events.1016.b + + flavor = ep2_tournament_events.1016.b.tt + + random_list = { + 20 = { #You learn a lot + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:ability_range + } + modifier = { + learning > 10 + add = 10 + } + modifier = { + has_trait = shrewd + add = 5 + } + modifier = { + has_trait = lifestyle_blademaster + add = 5 + } + desc = ep2_tournament_events.1016.b.success + + send_interface_toast = { + title = ep2_tournament_events.1016.b.success + left_icon = root + right_icon = scope:mysterious_knight + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_major_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_major_value + } + } + else = { + add_trait = tourney_participant + + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_major_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_major_value + } + } + } + } + 80 = { #You learn a little + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:ability_range + } + desc = ep2_tournament_events.1016.b.failure + + send_interface_toast = { + title = ep2_tournament_events.1016.b.failure + left_icon = root + right_icon = scope:mysterious_knight + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + else = { + add_trait = tourney_participant + + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + arrogant = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 1 + } + } + } + + # I forbid this! + option = { + name = ep2_tournament_events.1016.c + + if = { #If you are their liege, demand they resign + limit = { + scope:mysterious_knight.liege = root + } + scope:mysterious_knight = { + if = { + limit = { exists = var:progress_to_victory } + remove_variable = progress_to_victory + } + if = { + limit = { exists = var:progress_to_victory_score } + remove_variable = progress_to_victory_score + } + if = { + limit = { exists = var:contest_aptitude } + remove_variable = contest_aptitude + } + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:mysterious_knight + opinion = -25 + } + + stress_impact = { + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + fickle = medium_stress_impact_gain + callous = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 1 + } + } + } +} + +# Cornered by three opposing knights +ep2_tournament_events.1017 = { + type = activity_event + title = ep2_tournament_events.1017.t + desc = ep2_tournament_events.1017.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:knight_1 + animation = sword_coup_degrace + } + lower_right_portrait = { + character = scope:knight_2 + } + lower_left_portrait = { + character = scope:knight_3 + } + cooldown = { years = 5 } + + trigger = { + scope:activity = { + OR = { + AND = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + any_guest_subset_current_phase = { + name = team_alpha + contest_event_general_contestant_valid_trigger = yes + this != root + } + } + AND = { + any_guest_subset_current_phase = { + name = team_beta + this = root + } + any_guest_subset_current_phase = { + name = team_beta + contest_event_general_contestant_valid_trigger = yes + this != root + } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_woosh" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1017 } + scope:activity = { + if = { # If you're in Team A, grab opponents in B + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_beta + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = knight_1 + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:knight_1 + } + save_scope_as = knight_2 + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + } + } + save_scope_as = knight_3 + } + } + else = { # If you're in team B, grab opponents in A + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + } + save_scope_as = knight_1 + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:knight_1 + } + save_scope_as = knight_2 + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + } + } + save_scope_as = knight_3 + } + } + } + + save_scope_value_as = { #Combine the knights' prowess + name = knight_prowess + value = { + add = scope:knight_1.prowess + add = scope:knight_3.prowess + add = scope:knight_3.prowess + } + } + + save_scope_value_as = { #Simulate your backups' combined prowess + name = prowess_range + value = { + integer_range = { + min = 10 + max = 35 + } + } + } + } + + # Take them all on! + option = { + name = ep2_tournament_events.1017.a + + duel = { + skill = prowess + value = scope:knight_prowess + + # Success + 50 = { + desc = ep2_tournament_events.1017.a.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + + send_interface_toast = { + title = ep2_tournament_events.1017.a.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_massive } + + add_prestige = 250 + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + # Failure + 50 = { + desc = ep2_tournament_events.1017.a.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + + send_interface_toast = { + title = ep2_tournament_events.1017.a.failure + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_effect = { REASON = battle } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + brave = minor_stress_impact_loss + stubborn = miniscule_stress_impact_loss + content = medium_stress_impact_gain + craven = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 0.5 + } + } + } + + # Call for backup + option = { + name = ep2_tournament_events.1017.b + + duel = { + skills = { prowess martial } + value = decent_skill_rating + + # Success + 50 = { + desc = ep2_tournament_events.1017.b.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1017.b.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + # Failure + 50 = { + desc = ep2_tournament_events.1017.b.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1017.b.failure + left_icon = root + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + brave = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + content = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = -0.5 + } + } + } +} + +scripted_trigger contest_house_united_trigger = { + contest_event_general_contestant_valid_trigger = yes + this != root + exists = house + house ?= { + this = root.house + any_house_member = { is_alive = yes } + } +} + +# You save a house member +ep2_tournament_events.1018 = { + type = activity_event + title = ep2_tournament_events.1018.t + desc = ep2_tournament_events.1018.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_gallop + } + right_portrait = { + character = scope:family + animation = admiration + } + cooldown = { years = 5 } + + trigger = { + exists = house + scope:activity = { + OR = { + AND = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + any_guest_subset_current_phase = { + name = team_alpha + contest_house_united_trigger = yes + } + } + AND = { + any_guest_subset_current_phase = { + name = team_beta + this = root + } + any_guest_subset_current_phase = { + name = team_beta + contest_house_united_trigger = yes + } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_flyby" + scope:activity = { + if = { # If you're in Team A, grab teammate + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { contest_house_united_trigger = yes } + save_scope_as = family + } + } + else = { # If you're in Team B, grab teammate + random_guest_subset_current_phase = { + name = team_beta + limit = { contest_house_united_trigger = yes } + save_scope_as = family + } + } + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ambush_sprung_log + tags = { good } + score = 5 + character = root + target = scope:family + } + } + } + + # House unity! + option = { + name = ep2_tournament_events.1018.a + + if = { + limit = { + house = { + NOT = { + has_house_modifier = tournament_house_unity_modifier + } + } + } + house = { + add_house_modifier = { + modifier = tournament_house_unity_modifier + years = 15 + desc = tournament_house_unity_modifier_desc + } + } + } + else = { + add_prestige = medium_prestige_value + } + + reverse_add_opinion = { + target = scope:family + opinion = 15 + modifier = respect_opinion + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + shy = miniscule_stress_impact_loss + content = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 25 #Deliberately low to keep the else from occurring too much for AI + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.5 + } + } + } + + # Love u fam + option = { + name = ep2_tournament_events.1018.b + + if = { + limit = { + NOT = { #Ensure that you're not AI, to avoid massive proliferation of the Loyal trait + is_ai = yes + } + scope:family = { + is_ai = yes + NOR = { + has_trait = disloyal + has_trait = loyal + } + } + } + scope:family = { + add_trait = loyal + } + } + + if = { + limit = { + can_add_hook = { + type = loyalty_hook + target = scope:family + } + } + add_hook = { + type = loyalty_hook + target = scope:family + } + } + + reverse_add_opinion = { + target = scope:family + opinion = 15 + modifier = loyalty_opinion + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } +} + +################### +### ARCHERY ### +################### + +# Attempt to put off an opponent by coughing +ep2_tournament_events.1501 = { + type = activity_event + title = ep2_tournament_events.1501.t + desc = { + desc = ep2_tournament_events.1501.desc + first_valid = { + triggered_desc = { + trigger = { + scope:competitor = { + has_any_secrets = yes + } + intrigue > 10 + } + desc = ep2_tournament_events.1501.secret + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + scripted_animation = bow_closed + } + right_portrait = { + character = scope:competitor + scripted_animation = bow_drawn + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + is_alive = yes + is_ai = yes # To ensure we don't reveal player secrets + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_flyby" + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 1501 } + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { + is_alive = yes + is_ai = yes # To ensure we don't reveal player secrets + } + save_scope_as = competitor + } + } + + if = { + limit = { + scope:competitor = { + any_secret = { + OR = { + secret_type = secret_deviant + secret_type = secret_witch + secret_type = secret_murder + secret_type = secret_disputed_heritage + secret_type = secret_non_believer + secret_type = secret_cannibal + } + } + } + } + scope:competitor = { + random_secret = { + limit = { + OR = { + secret_type = secret_deviant + secret_type = secret_witch + secret_type = secret_murder + secret_type = secret_disputed_heritage + secret_type = secret_non_believer + secret_type = secret_cannibal + } + } + save_scope_as = competitor_secret + } + } + } + } + + # Spread a rumour amongst the crowd + option = { + name = ep2_tournament_events.1501.a + + trigger = { + exists = scope:competitor_secret + + intrigue > 10 # Ensure you have decent enough intrigue to do this + } + + flavor = ep2_tournament_events.1501.a.tt + + scope:competitor_secret = { + expose_secret = root + } + + scope:competitor = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_archery_rumour_log + tags = { good } + score = 5 + character = root + target = scope:competitor + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = just + has_trait = honest + has_trait = forgiving + } + } + } + } + + # Cough loudly + option = { + name = ep2_tournament_events.1501.b + + flavor = ep2_tournament_events.1501.b.tt + + add_prestige = -25 + + scope:competitor = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_archery_cough_log + tags = { good } + score = 5 + character = root + target = scope:competitor + } + } + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 1 + } + } + } + + # Stay silent + option = { + name = ep2_tournament_events.1501.c + + scope:competitor = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_miniscule } + } + + stress_impact = { + deceitful = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + just = miniscule_stress_impact_loss + honest = miniscule_stress_impact_loss + forgiving = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + + ai_value_modifier = { + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } +} + +# It's a bit windy as you step up to shoot! +ep2_tournament_events.1502 = { + type = activity_event + title = ep2_tournament_events.1502.t + desc = ep2_tournament_events.1502.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + scripted_animation = bow_closed + } + cooldown = { years = 1 } + + trigger = { + is_in_guest_subset = { name = qualified } + scope:activity = { + any_guest_subset_current_phase = { #random qualified participant + name = qualified + contest_event_general_contestant_valid_trigger = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_flyby" + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 1502 } + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = contestant + } + } + } + + # Take the shot anyway, because you're an experienced marksman + option = { + name = ep2_tournament_events.1502.a + + trigger = { + OR = { #Make sure you're good at shooting a bow! + AND = { + has_trait = lifestyle_hunter + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= 50 + } + } + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 50 + } + } + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_prestige = medium_prestige_gain + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_major_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = 1 + } + } + } + + # Try and pin it on someone else + option = { + name = ep2_tournament_events.1502.b + + flavor = ep2_tournament_events.1502.b.tt + + duel = { + skill = diplomacy + value = medium_skill_rating + # Success + 1 = { + desc = ep2_tournament_events.1502.b.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1502.b.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + # Failure + 1 = { + desc = ep2_tournament_events.1502.b.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1502.b.failure + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + content = minor_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = -1 + } + } + } + + # Have a go despite the wind + option = { + name = ep2_tournament_events.1502.c + + duel = { + skill = prowess + value = high_skill_rating + # Success + 1 = { + desc = ep2_tournament_events.1502.c.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1502.c.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_major_value + } + } + } + } + # Failure + 1 = { + desc = ep2_tournament_events.1502.c.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1502.c.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + content = miniscule_stress_impact_loss + honest = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } +} + +# Bored waiting for your turn, try some mischief? +ep2_tournament_events.1503 = { + type = activity_event + title = ep2_tournament_events.1503.t + desc = ep2_tournament_events.1503.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:contestant + scripted_animation = bow_closed + } + cooldown = { years = 1 } + + trigger = { + is_in_guest_subset = { name = qualified } + scope:activity = { + any_guest_subset_current_phase = { #random qualified participant + name = qualified + contest_event_general_contestant_valid_trigger = yes + NOT = { + any_secret = { + NOT = { is_known_by = root } + } + } + save_temporary_scope_as = participant_1 + } + any_guest_subset_current_phase = { #random qualified participant with a secret + name = qualified + this != scope:participant_1 + contest_event_general_contestant_valid_trigger = yes + # Won't reveal a secret to you which you already know. + any_secret = { + NOT = { is_known_by = root } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_wood_woosh" + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 1503 } + scope:activity = { + random_guest_subset_current_phase = { #random qualified participant + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + NOT = { + any_secret = { + NOT = { is_known_by = root } + } + } + } + save_scope_as = contestant + } + random_guest_subset_current_phase = { #random qualified participant with a secret + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:contestant + # Won't reveal a secret to you which you already know. + any_secret = { + NOT = { is_known_by = root } + } + } + save_scope_as = secret_haver + random_secret = { + limit = { + NOT = { is_known_by = root } + } + save_scope_as = secret + } + } + } + } + + # Move the line back a few feet + option = { + name = ep2_tournament_events.1503.a + + flavor = ep2_tournament_events.1503.a.tt + + duel = { + skill = intrigue + target = scope:contestant + # Success + 1 = { + desc = ep2_tournament_events.1503.a.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1503.a.success + left_icon = root + right_icon = scope:contestant + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + # Failure + 1 = { + desc = ep2_tournament_events.1503.a.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_cheating_caught_log + tags = { good } + score = 5 + character = root + target = scope:contestant + } + } + + send_interface_toast = { + title = ep2_tournament_events.1503.a.failure + left_icon = root + right_icon = scope:contestant + + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + content = minor_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + ai_honor = -1 + } + } + } + + # Go and talk to the crowd + option = { + name = ep2_tournament_events.1503.b + + flavor = ep2_tournament_events.1503.b.flavor + + # Success, find a secret + duel = { + skills = { diplomacy intrigue } + value = medium_skill_rating + # Find a + 1 = { + desc = ep2_tournament_events.1503.b.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + custom_tooltip = ep2_tournament_events.1503.b.tt + + hidden_effect = { #So at to hide the secret until toast pops + send_interface_toast = { + title = ep2_tournament_events.1503.b.success + left_icon = root + + scope:secret = { + reveal_to_without_events_effect = { + CHARACTER = root + } + } + } + } + } + # Failure, find nothing + 1 = { + desc = ep2_tournament_events.1503.b.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1503.b.failure + left_icon = root + + add_stress = minor_stress_loss + } + } + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + # Bah, just wait it out + option = { + name = ep2_tournament_events.1503.c + + stress_impact = { + gregarious = miniscule_stress_impact_gain + deceitful = miniscule_stress_impact_gain + impatient = miniscule_stress_impact_gain + shy = miniscule_stress_impact_loss + honest = miniscule_stress_impact_loss + patient = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +################### +### WRESTLING ### +################### + +# You can use dirt to blind your opponent +ep2_tournament_events.2001 = { + type = activity_event + title = ep2_tournament_events.2001.t + desc = ep2_tournament_events.2001.desc + theme = tournament_contest + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = aggressive_unarmed + } + right_portrait = { + character = scope:versus_contestant + animation = rage + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2001 } + } + + # Throw dirt at them + option = { + name = ep2_tournament_events.2001.a + + custom_tooltip = ep2_tournament_events.2001.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + stress_impact = { + craven = medium_stress_impact_gain + brave = medium_stress_impact_loss + content = minor_stress_impact_gain + ambitious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = craven + has_trait = content + has_trait = humble + } + } + } + } + + # Don't throw the dirt + option = { + name = ep2_tournament_events.2001.b + + duel = { + skill = prowess + target = scope:versus_contestant + + 40 = { #You fight your way out + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.2004.d.tt.success + + send_interface_toast = { + title = ep2_tournament_events.2004.d.tt.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + 60 = { #You struggle fruitlessly + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.2004.d.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.2004.d.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + content = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = brave + has_trait = ambitious + has_trait = arrogant + } + } + } + } +} + +# You go for the ol' oil check +ep2_tournament_events.2002 = { + type = activity_event + title = ep2_tournament_events.2002.t + desc = ep2_tournament_events.2002.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_dishonorable + } + right_portrait = { + character = scope:versus_contestant + animation = shock + } + cooldown = { years = 1 } + + trigger = { + NOT = { #Make sure player has two hands with which to fight + has_trait = maimed + } + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + + save_scope_value_as = { + name = xp_range + value = { + integer_range = { + min = 1 + max = 5 + } + } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2002 } + } + + # Pokey poke + option = { + name = ep2_tournament_events.2002.a + + give_nickname = nick_the_dirty + + scope:versus_contestant = { + add_character_modifier = { + modifier = tournament_walking_funny_modifier + years = 3 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + every_close_family_member = { + custom = ep2_tournament_events.2002.a.tt + add_opinion = { + target = root + opinion = -10 + modifier = disgusted_opinion + } + } + + stress_impact = { + honest = major_stress_impact_gain + just = major_stress_impact_gain + arbitrary = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = honest + has_trait = just + } + } + } + } + + # I'd rather not + option = { + name = ep2_tournament_events.2002.b + + flavor = ep2_tournament_events.2002.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + else = { + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + honest = minor_stress_impact_loss + just = minor_stress_impact_loss + arbitrary = major_stress_impact_gain + deceitful = major_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = arbitrary + has_trait = deceitful + } + } + } + } +} + +# Your friend distracts the ref; use the chair? +ep2_tournament_events.2003 = { + type = activity_event + title = ep2_tournament_events.2003.t + desc = ep2_tournament_events.2003.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:versus_contestant + animation = worry + } + lower_left_portrait = { + character = scope:friend + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + scope:activity = { + any_attending_character = { + is_alive = yes + NOR = { + this = scope:versus_matchee + this = scope:versus_matcher + } + OR = { + has_relation_friend = root + has_relation_best_friend = root + } + } + } + } + + immediate = { + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2003 } + involved_activity = { + random_attending_character = { + limit = { + is_alive = yes + NOR = { + this = scope:versus_matchee + this = scope:versus_matcher + } + OR = { + has_relation_friend = root + has_relation_best_friend = root + } + } + save_scope_as = friend + } + } + save_scope_value_as = { + name = xp_range + value = { + integer_range = { + min = 1 + max = 5 + } + } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_ref_distracted_log + tags = { good } + score = 5 + character = root + target = scope:friend + } + } + } + + # Viva la raza! + option = { + name = ep2_tournament_events.2003.a + + trigger = { + OR = { + has_trait = deceitful + has_trait = arbitrary + } + } + + custom_tooltip = ep2_tournament_events.2003.a.tt + + give_nickname = nick_the_cheater + + reverse_add_opinion = { + modifier = cheater_opinion + target = scope:versus_contestant + opinion = -40 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + stress_impact = { + base = minor_stress_impact_loss + brave = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + just = major_stress_impact_gain + honest = major_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = just + has_trait = brave + has_trait = honest + } + } + } + } + + # Hit them with the chair + option = { + name = ep2_tournament_events.2003.b + + flavor = ep2_tournament_events.2003.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + content = minor_stress_impact_gain + ambitious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = brave + has_trait = content + } + } + } + } + + # Choose the honourable route + option = { + name = ep2_tournament_events.2003.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + else = { + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + compassionate = medium_stress_impact_loss + craven = medium_stress_impact_gain + brave = medium_stress_impact_loss + just = medium_stress_impact_loss + sadistic = medium_stress_impact_gain + callous = minor_stress_impact_gain + content = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = craven + has_trait = ambitious + } + } + } + } +} + +# Opponent has a high weight +ep2_tournament_events.2004 = { + type = activity_event + title = ep2_tournament_events.2004.t + desc = ep2_tournament_events.2004.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:versus_contestant + animation = personality_bold + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matchee } + scope:versus_matcher = { current_weight >= 70 } + } + trigger_else = { + scope:versus_matchee = { current_weight >= 70 } + } + } + + immediate = { + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2004 } + } + + # Tire them out by moving them around + option = { + name = ep2_tournament_events.2004.a + + trigger = { + OR = { + has_trait = shrewd + has_trait = intellect_good + scope:versus_contestant = { + has_trait = wheezing + } + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + ai_chance = { + base = 100 + } + } + + # Just pick them up lol + option = { + name = ep2_tournament_events.2004.b + + trigger = { + OR = { + has_trait = strong + has_trait = physique_good_1 + has_trait = physique_good_2 + has_trait = physique_good_3 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Medieval sumo + option = { + name = ep2_tournament_events.2004.c + + trigger = { + current_weight > 50 + NOT = { + has_trait = strong + has_trait = physique_good + } + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_sumo_wrestling_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + brave = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Attempt to target their legs + option = { + name = ep2_tournament_events.2004.d + + duel = { + skill = prowess + target = scope:versus_contestant + + 50 = { #You wear them down + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.2004.d.tt.success + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + 50 = { #You fail to make an impact + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.2004.d.tt.failure + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + + ai_chance = { + base = 100 + } + } + + # Take them head-on + option = { + name = ep2_tournament_events.2004.e + + add_prestige = minor_prestige_gain + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + craven = minor_stress_impact_gain + brave = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = craven + } + } + } +} + +scripted_trigger suitably_amorous_opponent = { + is_physically_able_adult = yes + can_marry_trigger = yes + is_concubine = no + is_attracted_to_gender_of = root + NOT = { + has_trait = chaste + has_trait = celibate + } +} + +# You and your opponent end up in a rather amorous position +ep2_tournament_events.2005 = { + type = activity_event + title = ep2_tournament_events.2005.t + desc = ep2_tournament_events.2005.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:versus_contestant + animation = flirtation + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + scope:versus_matcher = { + is_attracted_to_gender_of = scope:versus_matchee + might_cheat_on_every_partner_trigger = yes + } + scope:versus_matchee = { + is_attracted_to_gender_of = scope:versus_matcher + might_cheat_on_every_partner_trigger = yes + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2005 } + } + + # Give 'em a good tumble + option = { + name = ep2_tournament_events.2005.a + trigger = { + OR = { + has_trait = rakish + has_trait = seducer + has_trait = lustful + } + NOT = { + has_trait = chaste + } + } + + had_sex_with_effect = { + CHARACTER = scope:versus_contestant + PREGNANCY_CHANCE = 50 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + stress_impact = { + base = minor_stress_impact_loss + } + + tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } + + ai_chance = { + base = 100 + } + } + + # See if they're interested + option = { + name = ep2_tournament_events.2005.b + + trigger = { + NOR = { + has_trait = rakish + has_trait = seducer + has_trait = lustful + } + } + + random_list = { + 5 = { #They are amenable to your advances + custom_tooltip = ep2_tournament_events.2005.b.tt.success + + had_sex_with_effect = { + CHARACTER = scope:versus_contestant + PREGNANCY_CHANCE = 50 + } + + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = lustful + } + } + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = seducer + } + } + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = rakish + } + } + modifier = { + add = 1 + scope:versus_contestant = { + trait_compatibility = { + target = root + value >= medium_positive_trait_compatibility + } + } + } + modifier = { + add = -100 + scope:versus_contestant = { + has_trait = celibate + } + } + + send_interface_toast = { + title = ep2_tournament_events.2005.b.tt.success + left_icon = root + right_icon = scope:versus_contestant + } + + stress_impact = { + base = minor_stress_impact_loss + lustful = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + rakish = minor_stress_impact_loss + seducer = minor_stress_impact_loss + } + + tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } + } + + 6 = { #They are flattered but decline + custom_tooltip = ep2_tournament_events.2005.b.tt.failure + modifier = { + add = 5 + scope:versus_contestant = { + trait_compatibility = { + target = root + value >= medium_positive_trait_compatibility + } + } + } + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = celibate + } + } + + send_interface_toast = { + title = ep2_tournament_events.2005.b.tt.failure + left_icon = root + right_icon = scope:versus_contestant + } + + stress_impact = { + lustful = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + + 4 = { #They are horrified and angry + custom_tooltip = ep2_tournament_events.2005.b.tt.criticalfailure + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = chaste + } + } + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = celibate + } + } + + send_interface_toast = { + title = ep2_tournament_events.2005.b.tt.criticalfailure + left_icon = root + right_icon = scope:versus_contestant + } + + stress_impact = { + base = minor_stress_impact_gain + lustful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + } + + stress_impact = { + chaste = major_stress_impact_gain + celibate = massive_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = celibate + has_trait = chaste + } + } + } + } + + # Take advantage to win the contest + option = { + name = ep2_tournament_events.2005.c + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + stress_impact = { + just = medium_stress_impact_gain + deceitful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = just + } + } + } +} + +# Death Event: Your opponent piledrivers you on to your head +ep2_tournament_events.2006 = { + type = activity_event + title = ep2_tournament_events.2006.t + desc = ep2_tournament_events.2006.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:versus_contestant + animation = rage + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2006 } + } + + # Die + option = { + name = ep2_tournament_events.2006.a + + hidden_effect = { + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } + } + death = { + death_reason = death_tournament_piledriver + } + scope:activity = { + add_activity_log_entry = { + key = tournament_wrestling_death_log + tags = { bad } + score = 10 + character = root + } + } + ai_chance = { + base = 100 + } + } +} + +# A person storms the ring to protest a decision in your favour +ep2_tournament_events.2007 = { + type = activity_event + title = ep2_tournament_events.2007.t + desc = ep2_tournament_events.2007.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:versus_contestant + animation = worry + } + lower_right_portrait = { + character = scope:opponent_friend + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + scope:activity = { + any_attending_character = { + is_alive = yes + is_adult = yes + NOR = { + this = scope:versus_matchee + this = scope:versus_matcher + } + trigger_if = { + limit = { root = scope:versus_matchee } + has_relation_friend = scope:versus_matcher + } + trigger_else = { has_relation_friend = scope:versus_matchee } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + + scope:activity = { + random_guest_subset_current_phase = { + name = spectator + limit = { + is_alive = yes + is_adult = yes + NOR = { + this = scope:versus_matchee + this = scope:versus_matcher + } + trigger_if = { + limit = { root = scope:versus_matchee } + has_relation_friend = scope:versus_matcher + } + trigger_else = { has_relation_friend = scope:versus_matchee } + } + save_scope_as = opponent_friend + } + } + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ring_stormed_log + tags = { good } + score = 5 + character = root + target = scope:opponent_friend + } + } + } + + # Guards! Have this miscreant removed! + option = { + name = ep2_tournament_events.2007.a + + add_prestige = -50 + + progress_towards_rival_effect = { + REASON = rival_wrestling_liar + CHARACTER = scope:opponent_friend + OPINION = 0 + } + + stress_impact = { + wrathful = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + calm = medium_stress_impact_gain + content = medium_stress_impact_gain + honest = major_stress_impact_gain + just = major_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = just + has_trait = honest + } + } + } + } + + # Argue with them + option = { + name = ep2_tournament_events.2007.b + + duel = { + skill = diplomacy + target = scope:opponent_friend + #You win the debate + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_tournament_events.2007.b.tt.success + + send_interface_toast = { + title = ep2_tournament_events.2007.b.tt.success + left_icon = root + right_icon = scope:opponent_friend + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + #They win the debate + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_tournament_events.2007.b.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.2007.b.tt.failure + left_icon = root + right_icon = scope:opponent_friend + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + stubborn = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + fickle = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = fickle + has_trait = lazy + } + } + } + } + + # Admit it, gain nickname + option = { + name = ep2_tournament_events.2007.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + give_nickname = nick_the_honest + + add_prestige = medium_prestige_value + + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:opponent_friend + opinion = 20 + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:versus_contestant + opinion = 20 + } + + stress_impact = { + honest = minor_stress_impact_loss + just = minor_stress_impact_loss + arbitrary = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_vengefulness = -0.5 + } + } + } +} + +# What part of your opponent's body do you focus on? +ep2_tournament_events.2501 = { + type = activity_event + title = ep2_tournament_events.2501.t + desc = ep2_tournament_events.2501.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:versus_contestant + animation = throne_room_cheer_1 + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2501 } + } + + # Aim for the head + option = { + name = ep2_tournament_events.2501.a + random_list = { + 5 = { #You knock them out! + custom_tooltip = ep2_tournament_events.2501.a.tt.criticalsuccess + modifier = { + add = 5 + prowess > high_skill_rating + } + modifier = { + add = -5 + prowess < low_skill_rating + } + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.criticalsuccess + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_prestige = minor_prestige_gain + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + 20 = { #It works reasonably well + custom_tooltip = ep2_tournament_events.2501.a.tt.success + modifier = { + add = 10 + prowess > high_skill_rating + } + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 20 = { #Your opponent sees it coming + custom_tooltip = ep2_tournament_events.2501.a.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + ai_chance = { + base = 100 + } + } + + # Aim for the body + option = { + name = ep2_tournament_events.2501.b + random_list = { + 10 = { #It works well + custom_tooltip = ep2_tournament_events.2501.a.tt.criticalsuccess + modifier = { + add = 5 + prowess > high_skill_rating + } + add_prestige = minor_prestige_gain + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.criticalsuccess + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 10 = { #It works reasonably well + custom_tooltip = ep2_tournament_events.2501.a.tt.success + modifier = { + add = 10 + prowess > high_skill_rating + } + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + } + 10 = { #Your opponent sees it coming + custom_tooltip = ep2_tournament_events.2501.a.tt.failure + modifier = { + add = 10 + prowess < low_skill_rating + } + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + add_prestige = minor_prestige_loss + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + } + ai_chance = { + base = 100 + } + } + + # Attack their legs + option = { + name = ep2_tournament_events.2501.c + random_list = { + 1 = { #It works well + custom_tooltip = ep2_tournament_events.2501.a.tt.criticalsuccess + modifier = { + add = -5 + prowess < low_skill_rating + } + add_prestige = minor_prestige_gain + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.criticalsuccess + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 30 = { #It works reasonably well + custom_tooltip = ep2_tournament_events.2501.a.tt.success + + modifier = { + add = 10 + prowess > high_skill_rating + } + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + } + 5 = { #Your opponent sees it coming + + custom_tooltip = ep2_tournament_events.2501.a.tt.failure + modifier = { + add = 10 + prowess < low_skill_rating + } + + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + add_prestige = minor_prestige_loss + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + } + + ai_chance = { + base = 100 + } + } +} + +# Your finger pops out of its socket! +ep2_tournament_events.2502 = { + type = activity_event + title = ep2_tournament_events.2502.t + desc = ep2_tournament_events.2502.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:versus_contestant + animation = personality_dishonorable + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2502 } + } + + # Try and pop it back in + option = { + name = ep2_tournament_events.2502.a + custom_tooltip = ep2_tournament_events.2502.a.tt + random_list = { + 5 = { #It works + desc = ep2_tournament_events.2502.a.tt.success + modifier = { + add = 30 + has_trait = lifestyle_physician + } + modifier = { + add = 10 + has_trait = lifestyle_herbalist + } + + send_interface_toast = { + title = ep2_tournament_events.2502.a.tt.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + add_prestige = minor_prestige_gain + } + } + 20 = { #It doesn't work + desc = ep2_tournament_events.2502.a.tt.failure + modifier = { + add = 10 + has_trait = physique_bad + } + + send_interface_toast = { + title = ep2_tournament_events.2502.a.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_character_modifier = { + modifier = tournament_dislocated_finger_modifier + years = 1 + } + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_finger_popped_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + craven = medium_stress_impact_gain + impatient = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = craven + } + } + } + + # Work around it + option = { + name = ep2_tournament_events.2502.b + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + add_character_modifier = { + modifier = tournament_dislocated_finger_modifier + years = 1 + } + + ai_chance = { + base = 100 + } + } + + # Concede + option = { + name = ep2_tournament_events.2502.c + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } + + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + content = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = ambitious + } + } + } + } +} + +scripted_trigger contest_wrestling_eye_poke_trigger = { + OR = { + has_trait = sadistic + has_trait = deceitful + ai_compassion <= low_positive_ai_value + } +} + +# Your opponent tries eye-poking you +ep2_tournament_events.2503 = { + type = activity_event + title = ep2_tournament_events.2503.t + desc = ep2_tournament_events.2503.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = grief + } + right_portrait = { + character = scope:versus_contestant + animation = personality_cynical + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matchee } + scope:versus_matcher = { contest_wrestling_eye_poke_trigger = yes } + } + trigger_else = { + scope:versus_matchee = { contest_wrestling_eye_poke_trigger = yes } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2503 } + } + + # Poke them back + option = { + name = ep2_tournament_events.2503.a + + trigger = { + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = deceitful + has_trait = arbitrary + has_trait = callous + has_trait = sadistic + } + NOT = { + has_trait = one_eyed + } + } + + custom_tooltip = ep2_tournament_events.2503.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + add_prestige = minor_prestige_loss + + add_character_modifier = { + modifier = tournament_blurry_vision_modifier + years = 3 + } + + scope:versus_contestant = { + add_character_modifier = { + modifier = tournament_blurry_vision_modifier + years = 3 + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + craven = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + } + } + + # Complain to get them disqualified, and take some time to recover + option = { + name = ep2_tournament_events.2503.b + + trigger = { + NOT = { + has_trait = one_eyed + } + } + + duel = { + skill = diplomacy + target = scope:versus_contestant + #You get them disqualified + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_tournament_events.2503.b.tt.success + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + #You fail to get them disqualified + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_tournament_events.2503.b.tt.failure + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + + + } + + # Continue the fight + option = { + name = ep2_tournament_events.2503.c + + trigger = { + NOT = { + has_trait = one_eyed + } + } + + custom_tooltip = ep2_tournament_events.2503.c.tt + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + add_character_modifier = { + modifier = tournament_blurry_vision_modifier + years = 3 + } + } + + # Continue the fight but with no working eyes + option = { + name = ep2_tournament_events.2503.d + + trigger = { + has_trait = one_eyed + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_character_modifier = { + modifier = tournament_really_blurry_vision_modifier + years = 5 + } + } +} + +# Your berserker opponent bites your nose off +ep2_tournament_events.2504 = { + type = activity_event + title = ep2_tournament_events.2504.t + desc = ep2_tournament_events.2504.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = grief + } + right_portrait = { + character = scope:versus_contestant + animation = rage + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matchee } + scope:versus_matcher = { has_trait = berserker } + } + trigger_else = { + scope:versus_matchee = { has_trait = berserker } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2504 } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = physician + } + + add_stress = major_stress_gain + } + + # Aaaaaaaaagggghhhh! Disqualify them! + option = { + name = ep2_tournament_events.2504.a + + custom_tooltip = ep2_tournament_events.2504.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_trait = disfigured + + tournament_contest_versus_disqualification_effect = { DISQUALIFIED = scope:versus_contestant MATCH = root CONTEST = wrestling SKILL = pugilism } + + scope:activity = { + add_activity_log_entry = { + key = tournament_berserker_log + tags = { bad } + score = 5 + character = root + target = scope:versus_contestant + } + } + + ai_chance = { + base = 100 + + } + } + + # Get me my physician! I don't need to participate any further! + option = { + name = ep2_tournament_events.2504.b + + trigger = { + court_physician_available_trigger = yes + } + + custom_tooltip = ep2_tournament_events.2504.b.tt + + random_list = { + #Your physician works miracles + 2 = { + modifier = { + add = 5 + scope:physician = { + learning > average_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + learning > high_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + has_trait = lifestyle_herbalist + } + } + modifier = { + add = 20 + scope:physician = { + has_trait = lifestyle_physician + } + } + custom_tooltip = ep2_tournament_events.2504.b.tt.criticalsuccess + increase_wounds_effect = { REASON = fight } + } + #Your physician saves your nose + 10 = { + modifier = { + add = 5 + scope:physician = { + learning > average_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + learning > high_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + has_trait = lifestyle_herbalist + } + } + modifier = { + add = 20 + scope:physician = { + has_trait = lifestyle_physician + } + } + custom_tooltip = ep2_tournament_events.2504.b.tt.success + increase_wounds_effect = { REASON = fight } + add_trait = scarred + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 25 + max = 60 + } + } + } + } + #Your physician is unable to save your nose + 10 = { + modifier = { + add = 5 + scope:physician = { + learning < average_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + learning < low_skill_rating + } + } + custom_tooltip = ep2_tournament_events.2504.b.tt.failure + increase_wounds_effect = { REASON = fight } + add_trait = disfigured + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + craven = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + } + } + + # Find me a physician! I don't need to participate any further! + option = { + name = ep2_tournament_events.2504.c + + trigger = { + court_physician_available_trigger = no + } + + custom_tooltip = ep2_tournament_events.2504.c.tt + + increase_wounds_effect = { REASON = fight } + add_trait = disfigured + + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } + + stress_impact = { + base = miniscule_stress_impact_loss + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + craven = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + } + } +} + +# Death event: opponent kicks your head through 180 degrees +ep2_tournament_events.2506 = { + type = activity_event + title = ep2_tournament_events.2506.t + desc = ep2_tournament_events.2506.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:versus_contestant + animation = shock + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + } + + # Urk! + option = { + name = ep2_tournament_events.2506.a + + hidden_effect = { + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_wrestling_death_log + tags = { bad } + score = 10 + character = root + } + } + + death = { + death_reason = death_tournament_roundhouse + } + + ai_chance = { + base = 100 + } + } +} + +# Discombobulate +ep2_tournament_events.2507 = { + type = activity_event + title = ep2_tournament_events.2507.t + desc = ep2_tournament_events.2507.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_callous + } + right_portrait = { + character = scope:versus_contestant + animation = rage + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2507 } + } + + # ...do it again + option = { + name = ep2_tournament_events.2507.a + + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = wrathful + } + } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + scope:versus_contestant = { + add_character_modifier = { + modifier = tournament_discombobulated_modifier + years = 10 + } + + add_opinion = { + modifier = hate_opinion + target = root + opinion = -60 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Finish the fight quickly + option = { + name = ep2_tournament_events.2507.b + + flavor = ep2_tournament_events.2507.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:versus_contestant + opinion = 10 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + sadistic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Persuade them to give up + option = { + name = ep2_tournament_events.2507.c + + duel = { + skill = diplomacy + value = medium_skill_rating + # Success + 1 = { + desc = ep2_tournament_events.2507.c.success + modifier = { + add = 10 + has_trait = compassionate + } + modifier = { + add = 2 + has_trait = humble + } + modifier = { + add = 5 + has_trait = patient + } + modifier = { + add = 5 + has_trait = education_diplomacy + } + modifier = { + add = 10 + has_trait = intellect_good + } + modifier = { + add = 15 + has_trait = shrewd + } + modifier = { + add = 20 + has_trait = diplomat + } + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + send_interface_toast = { + title = ep2_tournament_events.2507.c.success + left_icon = root + right_icon = scope:versus_contestant + add_prestige = minor_prestige_gain + reverse_add_opinion = { + modifier = kindness_opinion + target = scope:versus_contestant + opinion = 20 + } + tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } + } + min = 5 + } + # Failure + 1 = { + desc = ep2_tournament_events.2507.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + modifier = { + add = 10 + has_trait = callous + } + modifier = { + add = 5 + has_trait = arrogant + } + modifier = { + add = 2 + has_trait = impatient + } + modifier = { + add = 5 + has_trait = intellect_bad + } + modifier = { + add = 10 + has_trait = lisping + } + send_interface_toast = { + title = ep2_tournament_events.2507.c.failure + left_icon = root + right_icon = scope:versus_contestant + add_prestige = minor_prestige_loss + reverse_add_opinion = { + modifier = insult_opinion + target = scope:versus_contestant + opinion = -30 + } + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + min = 5 + } + } + + ai_chance = { + base = 100 + } + } +} + +################## +### QUINTAIN ### +################## + +scripted_trigger tournament_events_3501_knight_trigger = { + age < 25 #Need to be young to prove themselves! + is_ai = yes #No players! + can_be_knight_trigger = { ARMY_OWNER = root } # CAN be a knight... + is_knight = no #...but isn't currently + is_landed = no #is not landed, to avoid taking anyone good + NOR = { #is not employed, to avoid taking anyone useful + has_council_position = councillor_spouse + has_council_position = councillor_marshal + has_council_position = councillor_court_chaplain + has_council_position = councillor_steward + has_council_position = councillor_spymaster + } + this != root #isn't you, or the either knight +} + +# Two young knights vie for your attention +ep2_tournament_events.3501 = { + type = activity_event + title = ep2_tournament_events.3501.t + desc = ep2_tournament_events.3501.desc + theme = tournament_contest + left_portrait = { + character = root + animation = personality_callous + } + lower_right_portrait = { + character = scope:knight1 + } + lower_left_portrait = { + character = scope:knight2 + } + cooldown = { years = 1 } + + trigger = { + this = scope:host + scope:activity = { + any_guest_subset_current_phase = { + name = contestant + count >= 2 + tournament_events_3501_knight_trigger = yes + is_alive = yes + } + has_current_phase = tournament_phase_joust + } + } + + immediate = { + scope:activity = { + random_guest_subset_current_phase = { + name = contestant + limit = { + tournament_events_3501_knight_trigger = yes + is_alive = yes + } + save_scope_as = knight1 + } + random_guest_subset_current_phase = { + name = contestant + limit = { + tournament_events_3501_knight_trigger = yes + is_alive = yes + this != scope:knight1 + } + save_scope_as = knight2 + } + } + } + + # Pick Knight 1 + option = { + name = ep2_tournament_events.3501.a + + add_courtier = scope:knight1 + + scope:knight1 = { + + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 50 + } + + accolade_medium_glory_gain_with_checks_effect = yes + + scope:knight2 = { + add_opinion = { + modifier = hate_opinion + target = scope:knight1 + opinion = -60 + } + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_quintain_choice_log_1 + tags = { good } + score = 5 + character = root + target = scope:knight1 + } + } + + ai_chance = { + base = 100 + } + } + + # Pick Knight 2 + option = { + name = ep2_tournament_events.3501.b + + add_courtier = scope:knight2 + + scope:knight2 = { + + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 50 + } + + accolade_medium_glory_gain_with_checks_effect = yes + + scope:knight1 = { + add_opinion = { + modifier = hate_opinion + target = scope:knight2 + opinion = -60 + } + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_quintain_choice_log_2 + tags = { good } + score = 5 + character = root + target = scope:knight2 + } + } + + ai_chance = { + base = 100 + } + } + + # Pick whoever wins the next match! + option = { + name = ep2_tournament_events.3501.c + scope:knight1 = { + duel = { + skill = prowess + target = scope:knight2 + 50 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + desc = ep2_tournament_events.knight_1_wins + scope:activity = { + add_activity_log_entry = { + key = tournament_quintain_choice_log_1 + tags = { good } + score = 5 + character = root + target = scope:knight1 + } + } + send_interface_toast = { + title = ep2_tournament_events.knight_1_wins + left_icon = root + right_icon = scope:knight1 + add_courtier = scope:knight1 + scope:knight1 = { + accolade_minor_glory_gain_with_checks_effect = yes + } + } + } + 50 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + } + desc = ep2_tournament_events.knight_2_wins + scope:activity = { + add_activity_log_entry = { + key = tournament_quintain_choice_log_2 + tags = { good } + score = 5 + character = root + target = scope:knight2 + } + } + send_interface_toast = { + title = ep2_tournament_events.knight_2_wins + left_icon = root + right_icon = scope:knight2 + add_courtier = scope:knight2 + scope:knight2 = { + accolade_minor_glory_gain_with_checks_effect = yes + } + } + } + } + } + ai_chance = { + base = 100 + } + } + + # Pick neither + option = { + name = ep2_tournament_events.3501.d + + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + + scope:knight1 = { + + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + + progress_towards_rival_effect = { + REASON = rival_quintain_knight_anger + CHARACTER = scope:knight2 + OPINION = 0 + } + } + + scope:knight2 = { + + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + + progress_towards_rival_effect = { + REASON = rival_quintain_knight_anger + CHARACTER = scope:knight1 + OPINION = 0 + } + } + + ai_chance = { + base = 100 + } + } +} + +# Quintain breaks +ep2_tournament_events.3502 = { + type = activity_event + title = ep2_tournament_events.3502.t + desc = ep2_tournament_events.3502.desc + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:competitor + animation = personality_honorable + } + cooldown = { years = 1 } + + trigger = { + this = scope:host + scope:activity = { + any_guest_subset_current_phase = { + name = contestant + contest_event_general_contestant_valid_trigger = yes + } + has_current_phase = tournament_phase_joust + } + } + + immediate = { + scope:activity = { + random_guest_subset_current_phase = { + name = contestant + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = competitor + } + activity_location.province_owner = { save_scope_as = mayor } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_broken_quintain_log + tags = { bad } + score = 5 + character = scope:mayor + } + } + } + + option = { # Punish the builder + name = ep2_tournament_events.3502.a + + trigger = { + this = scope:host + } + + if = { + limit = { activity_is_competing_trigger = yes} + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + + add_prestige = medium_prestige_loss + + progress_towards_rival_effect = { + REASON = rival_quintain_collapse_blame + CHARACTER = scope:mayor + OPINION = default_rival_opinion + } + + stress_impact = { + base = miniscule_stress_impact_gain + calm = minor_stress_impact_gain + wrathful = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = forgiving + } + } + } + + option = { # Criticise the host + name = ep2_tournament_events.3502.b + + trigger = { + this != scope:host + } + + progress_towards_rival_effect = { + REASON = rival_quintain_collapse_blame + CHARACTER = scope:mayor + OPINION = default_rival_opinion + } + + reverse_add_opinion = { + target = scope:host + modifier = angry_opinion + opinion = -30 + } + + stress_impact = { + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = forgiving + } + } + } + + option = { # Pay for its repair + name = ep2_tournament_events.3502.c + + remove_short_term_gold = medium_gold_value + + add_prestige = minor_prestige_gain + + if = { + limit = { + this != scope:host + } + reverse_add_opinion = { + target = scope:host + modifier = grateful_opinion + opinion = 30 + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + generous = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Pull out + name = ep2_tournament_events.3502.d + + reverse_add_opinion = { + target = scope:competitor + modifier = compliment_opinion + opinion = 20 + } + + stress_impact = { + arrogant = minor_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = stubborn + has_trait = arrogant + has_trait = brave + } + } + } + } +} + +# Hapless knight ends up on the quintain +ep2_tournament_events.3503 = { + type = activity_event + title = ep2_tournament_events.3503.t + desc = ep2_tournament_events.3503.desc + theme = tournament_contest + left_portrait = { + character = root + animation = laugh + } + right_portrait = { + character = scope:hapless_knight + animation = pain + } + cooldown = { years = 1 } + + trigger = { + this = scope:host + scope:activity = { + any_guest_subset_current_phase = { + name = contestant + contest_event_general_contestant_valid_trigger = yes + is_landed = no #Make sure they're not a noble + is_lowborn = yes #...and again + prowess < medium_skill_rating #Make sure they're likely to actually be bad + is_alive = yes #duh + } + has_current_phase = tournament_phase_joust + } + } + + immediate = { + scope:activity = { + random_guest_subset_current_phase = { + name = contestant + limit = { + contest_event_general_contestant_valid_trigger = yes + is_landed = no #Make sure they're not a noble + is_lowborn = yes #...and again + prowess < medium_skill_rating #Make sure they're likely to actually be bad + is_alive = yes #duh + } + save_scope_as = hapless_knight + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + add_activity_log_entry = { + key = tournament_hapless_knight_log + tags = { good } + score = 5 + character = root + target = scope:hapless_knight + } + } + scope:hapless_knight = { accolade_minor_glory_loss_with_checks_effect = yes } + } + + option = { # Offer them a place as a jester + name = ep2_tournament_events.3503.a + + trigger = { + #Make sure you can actually offer them a jester position + can_appoint_char_to_court_position = { + CHAR = scope:hapless_knight + COURT_POS = court_jester_court_position + } + } + + random_list = { + 24 = { #They accept + + modifier = { #A humble person might be more likely to accept + add = 40 + scope:hapless_knight = { + has_trait = humble + } + } + + + modifier = { #A fickle person is less likely to adhere to their profession + add = 20 + scope:hapless_knight = { + has_trait = fickle + } + } + + modifier = { #A lazy person sees the opportunity for a comfortable life with minimal effort + add = 20 + scope:hapless_knight = { + has_trait = lazy + } + } + + modifier = { #Perhaps more likely if they're good at it + add = 10 + scope:hapless_knight = { + aptitude:court_jester_court_position >= 2 + } + } + + modifier = { #A gregarious person loves interacting with people + add = 5 + scope:hapless_knight = { + has_trait = gregarious + } + } + + desc = ep2_tournament_events.3503.a.tt.success + + send_interface_toast = { + title = ep2_tournament_events.3503.a.tt.success + left_icon = root + right_icon = scope:hapless_knight + hidden_effect = { + scope:hapless_knight = { set_employer = root } + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:hapless_knight + } + + scope:hapless_knight = { + save_scope_as = resigner + tournament_contest_versus_resignation_effect = { RESIGNER = scope:hapless_knight CONTEST = joust SKILL = horse } + } + } + } + 76 = { #They refuse + modifier = { #An arrogant person would almost never accept + add = 200 + scope:hapless_knight = { + has_trait = arrogant + } + } + + modifier = { #A stubborn person doesn't want a career change + add = 50 + scope:hapless_knight = { + has_trait = stubborn + } + } + + desc = ep2_tournament_events.3503.a.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.3503.a.tt.failure + left_icon = root + right_icon = scope:hapless_knight + + progress_towards_rival_effect = { + REASON = rival_quintain_collapse_blame + CHARACTER = scope:hapless_knight + OPINION = default_rival_opinion + } + } + } + } + + ai_chance = { + base = 100 + } + } + + option = { # Try to get them banned + name = ep2_tournament_events.3503.b + + progress_towards_rival_effect = { + REASON = rival_tournament_attempted_banning + CHARACTER = scope:hapless_knight + OPINION = default_rival_opinion + } + + duel = { + skill = diplomacy + target = scope:hapless_knight + # Success + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.3503.b.tt.success + + send_interface_toast = { + title = ep2_tournament_events.3503.b.tt.success + left_icon = root + right_icon = scope:enemy + + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + + scope:hapless_knight = { + add_prestige = minor_prestige_loss + add_character_flag = tournament_not_competing + custom_tooltip = tournament_not_competing_tt + } + scope:activity = { + remove_from_guest_subset = { + name = contestant + target = scope:hapless_knight + } + add_to_guest_subset = { + name = spectator + target = scope:hapless_knight + } + } + } + } + # Failure + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.3503.b.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.3503.b.tt.failure + left_icon = root + right_icon = scope:enemy + + add_prestige = minor_prestige_loss + } + } + } + + ai_chance = { + base = 100 + } + } + + option = { # You decide you quite like them + name = ep2_tournament_events.3503.c + + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + + progress_towards_friend_effect = { + REASON = friend_joust_endearment + CHARACTER = scope:hapless_knight + OPINION = default_friend_opinion + } + + stress_impact = { + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + option = { # Laugh at them + name = ep2_tournament_events.3503.d + custom_tooltip = available_because_intent_tt + trigger = { has_activity_intent = reduce_stress_intent } + + progress_towards_rival_effect = { + REASON = rival_contest_mockery + CHARACTER = scope:hapless_knight + OPINION = default_rival_opinion + } + + scope:hapless_knight = { + add_prestige = medium_prestige_loss + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + + stress_impact = { + base = major_stress_impact_loss + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +#Death event: Quintain hits you +ep2_tournament_events.3504 = { + type = activity_event + title = ep2_tournament_events.3504.t + desc = ep2_tournament_events.3504.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = pain + } + + trigger = { + is_participant_in_activity = scope:activity + scope:activity = { + has_current_phase = tournament_phase_joust + } + } + + option = { # Ouch! + name = ep2_tournament_events.3504.a + + random_list = { + 1 = { + show_chance = no + increase_wounds_effect = { REASON = accident } + } + 1 = { + show_chance = no + add_trait = incapable + } + 1 = { + show_chance = no + death = { + death_reason = death_tournament_quintain_hit + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_quintain_death_log + tags = { bad } + score = 10 + character = root + } + } + } + } + + ai_chance = { + base = 100 + } + } +} + +################# +### JOUST ### +################# + +# You get injured +ep2_tournament_events.4001 = { + type = activity_event + title = ep2_tournament_events.4001.t + desc = ep2_tournament_events.4001.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_loss + } + right_portrait = { + character = scope:versus_contestant + animation = jockey_lance_couched_gallop + } + cooldown = { months = 2 } + + trigger = { + #DLC check. + #has_ep2_dlc_trigger = yes + + #Standard checks. + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4001 } + scope:activity = { + add_activity_log_entry = { + key = tournament_joust_injury_log + tags = { bad } + score = 5 + character = root + } + } + } + + option = { # Pull through + name = ep2_tournament_events.4001.a + + trigger = { + OR = { + has_trait = physique_good + has_trait = strong + } + } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + + increase_wounds_no_death_effect = { REASON = battle } + + add_prestige = medium_prestige_gain + + stress_impact = { + base = miniscule_stress_impact_gain + fickle = minor_stress_impact_gain + stubborn = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { # Stay in, get wounded + name = ep2_tournament_events.4001.b + + increase_wounds_no_death_effect = { REASON = battle } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + + add_prestige = medium_prestige_gain + + stress_impact = { + base = minor_stress_impact_gain + fickle = minor_stress_impact_gain + stubborn = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + option = { # Pull out + name = ep2_tournament_events.4001.c + + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = joust SKILL = horse } + + stress_impact = { + base = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + craven = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = stubborn + has_trait = arrogant + has_trait = brave + } + } + } + } +} + +# Your opponent is knocked off their horse +ep2_tournament_events.4002 = { + type = activity_event + title = ep2_tournament_events.4002.t + desc = ep2_tournament_events.4002.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_lance_tilted + } + right_portrait = { + trigger = { + this != involved_activity.activity_host + } + character = scope:versus_contestant + animation = pain + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4002 } + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_knocked_off_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + } + + option = { # Help them up and give them a shield + name = ep2_tournament_events.4002.a + + trigger = { + OR = { + has_trait = just + has_trait = gregarious + has_trait = compassionate + } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 40 + } + + add_prestige = medium_prestige_gain + + custom_tooltip = ep2_tournament_events.4001.a.tt + + hidden_effect = { + every_courtier_or_guest = { + add_opinion = { + target = root + opinion = 10 + modifier = reputation_opinion + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { # Help them up + name = ep2_tournament_events.4002.b + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 15 + } + + add_prestige = minor_prestige_gain + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + stress_impact = { + just = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + option = { # Ah well + name = ep2_tournament_events.4002.c + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + stress_impact = { + just = minor_stress_impact_gain + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +# Your opponent is using a massive lance +ep2_tournament_events.4003 = { + type = activity_event + title = ep2_tournament_events.4003.t + desc = ep2_tournament_events.4003.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_loss + } + right_portrait = { + trigger = { + this != involved_activity.activity_host + } + character = scope:versus_contestant + animation = jockey_lance_couched_gallop + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_trotting" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4003 } + } + + option = { # Protest to the authorities + name = ep2_tournament_events.4003.a + + trigger = { + OR = { + has_trait = just + has_trait = honest + has_trait = irritable + } + } + + flavor = ep2_tournament_events.4003.a.tt + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = annoyed_opinion + opinion = -40 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_prestige = minor_prestige_loss + + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + just = minor_stress_impact_loss + craven = minor_stress_impact_loss + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = ambitious + } + } + } + } + + option = { # Ask them not to use it + name = ep2_tournament_events.4003.b + + duel = { + skill = diplomacy + target = scope:versus_contestant + # Success + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.4003.b.tt.win + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + } + # Failure + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep2_tournament_events.4003.b.tt.lose + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + just = minor_stress_impact_loss + craven = minor_stress_impact_loss + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = ambitious + } + } + } + } + option = { # Joust them anyway + name = ep2_tournament_events.4003.c + + add_prestige = medium_prestige_gain + + duel = { + skills = { prowess martial } + value = decent_skill_rating + # Success + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.4003.c.tt.win + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + # Failure + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.4003.c.tt.lose + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + just = minor_stress_impact_gain + craven = minor_stress_impact_gain + brave = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = craven + } + } + } + } +} + +# Your opponent challenges you to a duel on foot +ep2_tournament_events.4004 = { + type = activity_event + title = ep2_tournament_events.4004.t + desc = ep2_tournament_events.4004.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_lance_tilted + } + right_portrait = { + trigger = { + this != involved_activity.activity_host + } + character = scope:versus_contestant + animation = marshal + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4004 } + } + + option = { # Accept + name = ep2_tournament_events.4004.a + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 30 + } + + duel = { + skill = prowess + target = scope:versus_contestant + # Success + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.4004.a.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + # Failure + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep2_tournament_events.4004.a.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + add_prestige = minor_prestige_loss + + stress_impact = { + ambitious = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + craven = minor_stress_impact_gain + brave = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = craven + } + } + } + } + + option = { # Refuse + name = ep2_tournament_events.4004.b + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = disappointed_opinion + opinion = -30 + } + + ai_chance = { + base = 100 + } + } + + option = { # Accept, but insist upon fighting WITH LANCES + name = ep2_tournament_events.4004.c + + trigger = { + OR = { + has_trait = dull + has_trait = intellect_bad + } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = tournament_confused_opinion + opinion = -40 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_prestige = minor_prestige_loss + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } +} + +# Your opponent is injured but tilts anyway +ep2_tournament_events.4005 = { + type = activity_event + title = ep2_tournament_events.4005.t + desc = ep2_tournament_events.4005.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_lance_tilted + } + right_portrait = { + character = scope:versus_contestant + animation = jockey_loss + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_wood_clash" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4005 } + scope:activity = { + add_activity_log_entry = { + key = tournament_joust_injury_log + tags = { bad } + score = 5 + character = scope:versus_contestant + } + } + } + + option = { # Tilt against them + name = ep2_tournament_events.4005.a + + flavor = ep2_tournament_events.4005.a.tt + + if = { # If they're a coward they'll like you less + limit = { + scope:versus_contestant = { + has_trait = craven + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = cruelty_opinion + opinion = -10 + } + } + else_if = { # If they're brave, stubborn or chivalric they'll respect you for respecting their wishes + limit = { + scope:versus_contestant = { + OR = { + has_trait = brave + has_trait = stubborn + has_trait = gallant + } + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = tournament_respected_wishes_opinion + opinion = 30 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + add_prestige = miniscule_prestige_loss + + ai_chance = { + base = 100 + } + } + + option = { # Refuse to tilt against them + name = ep2_tournament_events.4005.b + + flavor = ep2_tournament_events.4005.b.tt + + if = { # If they're chivalric they'll respect you even more for being knightly + limit = { + scope:versus_contestant = { + has_trait = gallant + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 50 + } + } + + else_if = { # If they're not chivalric they'll still respect you + limit = { + scope:versus_contestant = { + NOT = { + has_trait = gallant + } + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 20 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_prestige = medium_prestige_gain + + stress_impact = { + compassionate = medium_stress_impact_loss + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + just = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { # Tilt against them in an underhanded way that guarantees victory + name = ep2_tournament_events.4005.c + + flavor = ep2_tournament_events.4005.c.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_prestige = medium_prestige_loss + + if = { # If they're chivalric they'll hate you you even more for being knightly + limit = { + scope:versus_contestant = { + has_trait = gallant + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -60 + } + } + + else_if = { # If they're not chivalric they'll still hate you, just less so + limit = { + scope:versus_contestant = { + NOT = { + has_trait = gallant + } + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -40 + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + } + } + } + } +} + +# Your opponent asks for a mercy pass +ep2_tournament_events.4006 = { + type = activity_event + title = ep2_tournament_events.4006.t + desc = ep2_tournament_events.4006.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_lance_tilted + } + right_portrait = { + trigger = { + this != involved_activity.activity_host + } + character = scope:versus_contestant + animation = jockey_idle + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_flyby" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4006 } + scope:activity = { + add_activity_log_entry = { + key = tournament_mercy_pass_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + } + + option = { # Show mercy + name = ep2_tournament_events.4006.a + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = tournament_mercy_opinion + opinion = 30 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_prestige = minor_prestige_gain + + stress_impact = { + compassionate = medium_stress_impact_loss + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + just = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { # No mercy + name = ep2_tournament_events.4006.b + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = cruelty_opinion + opinion = -30 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + stress_impact = { + compassionate = medium_stress_impact_gain + sadistic = medium_stress_impact_loss + callous = minor_stress_impact_loss + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + } + } + } + } +} + +# Your opponent is mistreating their groom +ep2_tournament_events.4007 = { + type = activity_event + title = ep2_tournament_events.4007.t + desc = ep2_tournament_events.4007.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_idle + } + right_portrait = { + character = scope:groom + outfit_tags = { beggar_rags } + animation = admiration + } + lower_right_portrait = { + character = scope:versus_contestant + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4007 } + create_character = { + location = root.location + faith = scope:versus_contestant.faith + culture = scope:versus_contestant.culture + random_traits_list = { + count = 1 + education_martial_1 = {} + education_martial_2 = {} + } + dynasty = none + age = { 18 22 } + random_traits = yes + gender_female_chance = { + if = { + limit = { scope:versus_contestant.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:versus_contestant.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = groom + } + } + + + option = { # Laugh at the groom + name = ep2_tournament_events.4007.a + + trigger = { + has_trait = callous + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = tournament_agreed_opinion + opinion = 30 + } + + reverse_add_opinion = { + target = root + modifier = tournament_mocked_opinion + opinion = -30 + } + + stress_impact = { + base = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = gregarious + } + } + } + + option = { # Offer the groom a job + name = ep2_tournament_events.4007.b + + flavor = ep2_tournament_events.4007.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } + + scope:groom = { + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } + } + + add_courtier = scope:groom + + ai_chance = { + base = 100 + } + } + + option = { # Pay groom to unsettle opponent's horse + name = ep2_tournament_events.4007.c + + flavor = ep2_tournament_events.4007.c.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + scope:groom = { + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -50 + } + } + + pay_short_term_gold = { + target = scope:groom + gold = minor_gold_value + } + + stress_impact = { + just = medium_stress_impact_gain + ambitious = minor_stress_impact_loss + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = greedy + } + } + } + } + + option = { # Let it go + name = ep2_tournament_events.4007.d + + ai_chance = { + base = 100 + } + } +} + +# Crowd heckles you +ep2_tournament_events.4008 = { + type = activity_event + title = ep2_tournament_events.4008.t + desc = ep2_tournament_events.4008.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { months = 2 } + + left_portrait = { + character = root + animation = jockey_loss + } + right_portrait = { + character = scope:versus_contestant + animation = jockey_lance_tilted + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4008 } + scope:activity = { + add_activity_log_entry = { + key = tournament_crowd_heckled_log + tags = { bad } + score = 5 + character = root + } + } + } + + # Continue with the contest + option = { + name = ep2_tournament_events.4008.a + random_list = { + 45 = { #You win + + modifier = { #Skill buff + add = 15 + prowess > high_skill_rating + } + + modifier = { + add = 10 + has_trait = brave #Brave enough to ignore it + } + + modifier = { + add = 10 + has_trait = calm #Calm enough to ignore the abuse + } + + modifier = { + add = -10 + OR = { + has_trait = wrathful #Too angry to not care + has_trait = arrogant #How dare they! + has_trait = craven #Aaahhh, scary! + } + } + + desc = ep2_tournament_events.4008.a.success + + send_interface_toast = { + title = ep2_tournament_events.4008.a.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + } + } + 25 = { #You lose + + desc = ep2_tournament_events.4008.a.failure + + send_interface_toast = { + title = ep2_tournament_events.4008.a.failure + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + base = miniscule_stress_impact_gain + } + } + } + 15 = { #You get injured by the crowd throwing stuff at you + modifier = { + add = 10 + has_trait = sadistic + } + modifier = { + add = 10 + has_trait = callous + } + modifier = { + add = 15 + OR = { + has_trait = murderer + has_trait = incestuous + has_trait = sodomite + has_trait = cannibal + has_trait = deviant + has_trait = kinslayer + has_trait = adulterer + has_trait = fornicator + has_trait = excommunicated + } + } + + desc = ep2_tournament_events.4008.a.criticalfailure + + send_interface_toast = { + title = ep2_tournament_events.4008.a.criticalfailure + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_prestige = minor_prestige_loss + + increase_wounds_effect = { REASON = fight } + + random = { + chance = 25 + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + + stress_impact = { + base = minor_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + + } + } + + # Throw the contest + option = { + name = ep2_tournament_events.4008.b + + add_prestige = minor_prestige_loss + + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = joust SKILL = horse } + + stress_impact = { + brave = medium_stress_impact_gain + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = brave + } + } + } +} + +# Lend opponent a lance +ep2_tournament_events.4009 = { + type = activity_event + title = ep2_tournament_events.4009.t + desc = ep2_tournament_events.4009.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { months = 2 } + + left_portrait = { + character = root + animation = jockey_lance_tilted + } + right_portrait = { + character = scope:versus_contestant + animation = jockey_idle + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4009 } + } + + # Mock them + option = { + name = ep2_tournament_events.4009.a + trigger = { + OR = { + has_trait = sadistic + has_trait = arrogant + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + progress_towards_rival_effect = { + REASON = rival_contest_mockery + CHARACTER = scope:hapless_knight + OPINION = default_rival_opinion + } + + stress_impact = { + sadistic = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + just = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = gregarious + } + } + } + } + # Lend them a lance + option = { + name = ep2_tournament_events.4009.b + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + add_prestige = medium_prestige_gain + + scope:activity = { + add_activity_log_entry = { + key = tournament_lent_lance_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 30 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + generous = minor_stress_impact_loss + just = minor_stress_impact_loss + arbitrary = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = arbitrary + } + } + } + } + # Continue + option = { + name = ep2_tournament_events.4009.c + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + add_prestige = minor_prestige_loss + + stress_impact = { + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + just = minor_stress_impact_gain + arbitrary = minor_stress_impact_loss + callous = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = just + } + } + } + } +} + +################# +### RECITAL ### +################## + +# Previous entrant's verse is similar to yours +ep2_tournament_events.5501 = { + type = activity_event + title = ep2_tournament_events.5501.t + desc = ep2_tournament_events.5501.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:enemy + animation = scheme + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + this != root + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = enemy + } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5501 } + } + + # Show them it's all about the delivery + option = { + name = ep2_tournament_events.5501.a + trigger = { + OR = { + has_trait = lifestyle_poet + has_trait = education_learning_3 + has_trait = education_learning_4 + has_trait = education_learning_5 + has_trait = shrewd + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + arrogant = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + } + } + } + + # Improvise + option = { + name = ep2_tournament_events.5501.b + + random_list = { + 9 = { #It goes well + + modifier = { #Skill buff + add = 15 + diplomacy > high_skill_rating + } + + modifier = { #Big buff if you're a poet + add = 15 + has_trait = lifestyle_poet + } + + modifier = { #More diplo! + add = 10 + OR = { + has_trait = education_learning_3 + has_trait = education_learning_4 + has_trait = education_learning_5 + } + } + + modifier = { #Being learned helps + add = 5 + learning > high_skill_rating + } + + modifier = { #Always good to be an extrovert in these situations + add = 5 + has_trait = gregarious + } + + modifier = { #Blanket coverage for smarts + add = 5 + OR = { + has_trait = shrewd + has_trait = intellect_good + } + } + + desc = ep2_tournament_events.5501.b.success + + send_interface_toast = { + title = ep2_tournament_events.5501.b.success + left_icon = root + right_icon = scope:enemy + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + } + } + 10 = { #It doesn't go well + + desc = ep2_tournament_events.5501.b.failure + + send_interface_toast = { + title = ep2_tournament_events.5501.b.failure + left_icon = root + right_icon = scope:enemy + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + base = miniscule_stress_impact_gain + } + } + } + } + + ai_chance = { + base = 100 + } + } + # Protest + option = { + name = ep2_tournament_events.5501.c + + add_prestige = minor_prestige_loss + + duel = { + skills = { diplomacy intrigue } + target = scope:enemy + #They DID plan it! + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5501.c.success + left_icon = root + right_icon = scope:enemy + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + add_prestige = minor_prestige_gain + } + + desc = ep2_tournament_events.5501.c.success + + stress_impact = { + base = miniscule_stress_impact_loss + paranoid = major_stress_impact_loss #I KNEW IT! + just = minor_stress_impact_loss + } + } + #You look like a fool + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5501.c.failure + left_icon = root + right_icon = scope:enemy + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + add_prestige = minor_prestige_loss + } + + desc = ep2_tournament_events.5501.c.failure + + stress_impact = { + base = miniscule_stress_impact_gain + paranoid = medium_stress_impact_gain + just = medium_stress_impact_gain + } + } + } + + ai_chance = { + base = 100 + } + } +} + +# Contestant plagiarises verse +ep2_tournament_events.5502 = { + type = activity_event + title = ep2_tournament_events.5502.t + desc = { + desc = ep2_tournament_events.5502.start + first_valid = { + triggered_desc = { + trigger = { + scope:contestant = { + has_friendly_relationship_trigger = { + CHARACTER = root + } + culture != scope:activity.activity_location.culture + } + } + desc = ep2_tournament_events.5502.friend + } + triggered_desc = { + trigger = { + scope:contestant = { + culture != scope:activity.activity_location.culture + } + } + desc = ep2_tournament_events.5502.culture + } + } + desc = ep2_tournament_events.5502.end + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:contestant + animation = shock + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + culture != scope:activity.activity_location.culture + this != root + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + culture != scope:activity.activity_location.culture + } + save_scope_as = contestant + } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5502 } + scope:activity = { + add_activity_log_entry = { + key = tournament_plagiarism_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + } + + # This isn't their fault! + option = { + name = ep2_tournament_events.5502.a + + duel = { + skills = { diplomacy } + value = decent_skill_rating + + #You convince the crowd + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5502.c.success + left_icon = root + right_icon = scope:contestant + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 35 + } + } + } + + desc = ep2_tournament_events.5502.c.success + + stress_impact = { + base = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + just = minor_stress_impact_loss + lazy = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + } + + #The crowd turn against them + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5502.c.failure + left_icon = root + right_icon = scope:contestant + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + + desc = ep2_tournament_events.5502.c.failure + + stress_impact = { + base = miniscule_stress_impact_gain + } + } + } + + ai_chance = { + base = 100 + } + } + + # Join in with the booing + option = { + name = ep2_tournament_events.5502.b + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + add_prestige = minor_prestige_loss + } + + progress_towards_rival_effect = { + REASON = rival_recital_booing + CHARACTER = scope:contestant + OPINION = default_rival_opinion + } + + stress_impact = { + gregarious = minor_stress_impact_gain + just = medium_stress_impact_gain + lazy = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + honest = major_stress_impact_gain + deceitful = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = honest + } + } + } + } + + # Leave the contestant to suffer + option = { + name = ep2_tournament_events.5502.c + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + + stress_impact = { + gregarious = miniscule_stress_impact_gain + just = miniscule_stress_impact_gain + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = honest + } + } + } +} + +# Stage fright +ep2_tournament_events.5503 = { + type = activity_event + title = ep2_tournament_events.5503.t + desc = { + desc = ep2_tournament_events.5503.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = avaricious + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + } + } + desc = ep2_tournament_events.5503.rich + } + triggered_desc = { + trigger = { + OR = { + has_trait = seducer + AND = { + has_trait = deviant + has_trait = lustful + } + } + } + desc = ep2_tournament_events.5503.seducer + } + triggered_desc = { + desc = ep2_tournament_events.5503.fallback + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = contestant + } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5503 } + } + + # Fall back on a stock poem + option = { + name = ep2_tournament_events.5503.a + trigger = { + has_trait = lifestyle_poet + } + + flavor = ep2_tournament_events.5503.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + + ai_chance = { + base = 200 + } + } + + # Behold! Free coin! + option = { + name = ep2_tournament_events.5503.b + + trigger = { + OR = { + has_trait = avaricious + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + } + } + + flavor = ep2_tournament_events.5503.b.tt + + remove_short_term_gold = tiny_gold_value + + stress_impact = { + base = miniscule_stress_impact_loss + greedy = major_stress_impact_gain + generous = minor_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 200 + } + } + + # Give the crowd what they want + option = { + name = ep2_tournament_events.5503.c + + trigger = { + OR = { + has_trait = seducer + AND = { + has_trait = deviant + has_trait = lustful + } + } + } + + flavor = ep2_tournament_events.5503.c.tt + + if = { + limit = { + faith = { + NOR = { + trait_is_virtue = lustful + trait_is_sin = lustful + } + } + } + add_prestige = minor_prestige_loss + add_character_modifier = { + modifier = tournament_performative_sensuousness_modifier + years = 5 + } + } + else_if = { + limit = { + faith = { + trait_is_sin = lustful + } + } + add_piety = medium_piety_loss + add_character_modifier = { + modifier = tournament_performative_sensuousness_modifier + years = 10 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + ai_chance = { + base = 200 + } + } + + # Distract the crowd + option = { + name = ep2_tournament_events.5503.d + + duel = { + skills = { intrigue diplomacy } + value = decent_skill_rating + #You successfully distract the crowd + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5503.d.win + left_icon = root + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + + desc = ep2_tournament_events.5503.d.win + + stress_impact = { + base = miniscule_stress_impact_loss + deceitful = minor_stress_impact_loss + } + } + #The crowd aren't fooled + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5503.d.lose + left_icon = root + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + desc = ep2_tournament_events.5503.d.lose + + stress_impact = { + base = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + } + } + + ai_chance = { + base = 100 + } + } + + # Try and fail + option = { + name = ep2_tournament_events.5503.e + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + stress_impact = { + base = miniscule_stress_impact_gain + arrogant = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +# A downpour begins +ep2_tournament_events.5504 = { + type = activity_event + title = ep2_tournament_events.5504.t + desc = ep2_tournament_events.5504.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + activity_location = { is_drylands_or_desert_trigger = no } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5504 } + scope:activity = { + add_activity_log_entry = { + key = tournament_downpour_begins_log + tags = { good } + score = 5 + character = root + } + } + } + + # Continue + option = { + name = ep2_tournament_events.5504.a + + duel = { + skills = { diplomacy } + value = decent_skill_rating + + 50 = { #You utilise the rain successfully + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + modifier = { #Skill buff + add = 15 + diplomacy > high_skill_rating + } + + modifier = { #Big buff if you're a poet + add = 15 + has_trait = lifestyle_poet + } + + modifier = { #More diplo! + add = 10 + OR = { + has_trait = education_learning_3 + has_trait = education_learning_4 + has_trait = education_learning_5 + } + } + + modifier = { #Being learned helps + add = 5 + learning > high_skill_rating + } + + modifier = { #Not scared of a bit of thunder + add = 5 + has_trait = brave + } + + modifier = { #Blanket coverage for smarts + add = 5 + OR = { + has_trait = shrewd + has_trait = intellect_good + } + } + + send_interface_toast = { + title = ep2_tournament_events.5504.a.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + + desc = ep2_tournament_events.5504.a.success + + stress_impact = { + base = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + } + } + + 50 = { #You are drowned out by the downpour + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + modifier = { #Skill debuff + add = -10 + diplomacy < high_skill_rating + } + + modifier = { #Aaahhhh, loud noises! + add = -5 + has_trait = craven + } + + send_interface_toast = { + title = ep2_tournament_events.5504.a.failure + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + + + desc = ep2_tournament_events.5504.a.failure + + stress_impact = { + base = miniscule_stress_impact_gain + craven = medium_stress_impact_gain + } + } + } + + + ai_chance = { + base = 100 + } + } + + # Run away scared + option = { + name = ep2_tournament_events.5504.b + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + brave = medium_stress_impact_gain + shy = miniscule_stress_impact_loss + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = brave + } + } + } +} + +# You see a chance to insult an opponent +ep2_tournament_events.5505 = { + type = activity_event + title = ep2_tournament_events.5505.t + desc = { + desc = ep2_tournament_events.5505.desc + first_valid = { + triggered_desc = { + trigger = { + scope:enemy = { + AND = { + is_female = no + OR = { + has_trait = chaste + has_trait = celibate + } + } + } + } + desc = ep2_tournament_events.5505.start.malevirgin + } + triggered_desc = { + trigger = { + scope:enemy = { + AND = { + is_female = yes + OR = { + has_trait = chaste + has_trait = celibate + } + } + } + } + desc = ep2_tournament_events.5505.start.femalevirgin + } + triggered_desc = { + trigger = { + scope:enemy = { + age > 60 + } + } + desc = ep2_tournament_events.5505.start.old + } + triggered_desc = { + trigger = { + scope:enemy = { + current_weight > 50 + } + } + desc = ep2_tournament_events.5505.start.fat + } + triggered_desc = { + trigger = { + scope:enemy = { + has_trait = compassionate + } + NOT = { + has_trait = compassionate + } + } + desc = ep2_tournament_events.5505.start.soft + } + triggered_desc = { + trigger = { + has_trait = compassionate + } + desc = ep2_tournament_events.5505.start.compassionate + } + triggered_desc = { + desc = ep2_tournament_events.5505.start.fallback + } + } + desc = ep2_tournament_events.5505.end + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:enemy + animation = anger + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + this != root + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = enemy + } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5505 } + } + + # Call them a virgin + option = { + name = ep2_tournament_events.5505.maidenless + trigger = { + scope:enemy = { + OR = { + has_trait = chaste + has_trait = celibate + } + } + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + + progress_towards_rival_effect = { + REASON = rival_recital_insult + CHARACTER = scope:enemy + OPINION = default_rival_opinion + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_insulted_opponent_log + tags = { good } + score = 5 + character = root + target = scope:enemy + } + } + + stress_impact = { + chaste = medium_stress_impact_gain + celibate = medium_stress_impact_gain + sadistic = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = chaste + has_trait = celibate + } + } + } + } + + # Call them old + option = { + name = ep2_tournament_events.5505.old + trigger = { + scope:enemy = { + age > 60 + } + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + + progress_towards_rival_effect = { + REASON = rival_recital_insult + CHARACTER = scope:enemy + OPINION = default_rival_opinion + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_insulted_opponent_log + tags = { good } + score = 5 + character = root + target = scope:enemy + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + } + } + } + } + + # Call them fat + option = { + name = ep2_tournament_events.5505.fat + trigger = { + scope:enemy = { + current_weight > 50 + } + NOT = { + current_weight > 50 + } + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + + progress_towards_rival_effect = { + REASON = rival_recital_insult + CHARACTER = scope:enemy + OPINION = default_rival_opinion + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_insulted_opponent_log + tags = { good } + score = 5 + character = root + target = scope:enemy + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + } + } + } + } + + # Try, and fail, to insult them + option = { + name = ep2_tournament_events.5505.idiot + trigger = { + OR = { + has_trait = dull + has_trait = intellect_bad + } + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + reverse_add_opinion = { + target = scope:enemy + modifier = tournament_confused_opinion + opinion = -5 + } + + stress_impact = { + base = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Imply you'll flay them + option = { + name = ep2_tournament_events.5505.torturer + trigger = { + has_trait = torturer + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + progress_towards_rival_effect = { + REASON = rival_recital_insult + CHARACTER = scope:enemy + OPINION = default_rival_opinion + } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_minor_value + } + } + + reverse_add_opinion = { + target = scope:enemy + modifier = disgusted_opinion + opinion = -40 + } + + every_close_family_member = { + custom = ep2_tournament_events.5505.opinion.tt + limit = { + NOT = { + has_trait = sadistic + } + location = root.location + } + add_opinion = { + target = root + opinion = -20 + modifier = disgusted_opinion + } + } + + stress_impact = { + base = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + gregarious = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + } + } + } + } + + # Be nice + option = { + name = ep2_tournament_events.5505.compassionate + + trigger = { + has_trait = compassionate + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + progress_towards_friend_effect = { + REASON = friend_recital_compliment + CHARACTER = scope:enemy + OPINION = default_friend_opinion + } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + sadistic = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + compassionate = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = arrogant + } + } + } + } + + # Insult them + option = { + name = ep2_tournament_events.5505.fallback + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + progress_towards_rival_effect = { + REASON = rival_recital_insult + CHARACTER = scope:enemy + OPINION = default_rival_opinion + } + + stress_impact = { + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + gregarious = minor_stress_impact_gain + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_insulted_opponent_log + tags = { good } + score = 5 + character = root + target = scope:enemy + } + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + } + } + } + } + + # ...never mind + option = { + name = ep2_tournament_events.5505.getout + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + stress_impact = { + sadistic = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + compassionate = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = arrogant + } + } + } + } +} + +######################### +### HONSE RANCING ### +######################### + +# Choose your ~~fighter~~ jockey +ep2_tournament_events.4500 = { + type = activity_event + title = ep2_tournament_events.4500.t + desc = { + desc = ep2_tournament_events.4500.desc + triggered_desc = { # Knight + trigger = { + scope:jockey1 = { + is_knight_of = root + } + } + desc = ep2_tournament_events.4500.knight + } + triggered_desc = { # Guest + trigger = { + scope:jockey1 = { + is_knight_of = root + } + scope:jockey2 = { is_in_the_same_court_as_or_guest = root } + } + desc = ep2_tournament_events.4500.guest + } + triggered_desc = { + trigger = { + scope:jockey1 = { + is_knight_of = root + } + scope:jockey2 = { + is_in_the_same_court_as_or_guest = root + } + } + desc = ep2_tournament_events.4500.nobody + } + triggered_desc = { # Nobody + trigger = { + NOR = { + scope:jockey1 = { + is_knight_of = root + } + scope:jockey2 = { + is_in_the_same_court_as_or_guest = root + } + } + } + desc = ep2_tournament_events.4500.fallback + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + right_portrait = scope:jockey1 + lower_right_portrait = scope:jockey2 + lower_left_portrait = scope:jockey3 + + trigger = { + is_ai = no + } + + immediate = { + #Knight + if = { + limit = { + any_knight = { + location = root.location + is_participant_in_activity = scope:activity + is_adult = yes + is_landed = no + is_healthy = yes + NOT = { + is_in_guest_subset = { name = qualified } + } + } + } + random_knight = { + limit = { + location = root.location + is_participant_in_activity = scope:activity + is_adult = yes + is_landed = no + is_healthy = yes + NOT = { + is_in_guest_subset = { name = qualified } + } + } + weight = { + base = 1 + modifier = { add = prowess } + } + save_scope_as = jockey1 + } + } + else = { + create_character = { + template = tournament_locale_character + culture = root.location.culture + faith = root.location.faith + location = root.location + gender_female_chance = root_soldier_female_chance + save_scope_as = jockey1 + } + scope:jockey1 = { + add_character_flag = generated_jockey + add_to_list = potential_jockeys + } + } + # Courtiers/Guests + if = { + limit = { + any_courtier_or_guest = { + location = root.location + is_participant_in_activity = scope:activity + is_adult = yes + is_healthy = yes + NOR = { + is_in_guest_subset = { name = qualified } + this = scope:jockey1 + is_spouse_of = root + is_concubine = yes + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + random_courtier_or_guest = { + limit = { + location = root.location + is_participant_in_activity = scope:activity + is_adult = yes + is_healthy = yes + NOR = { + is_in_guest_subset = { name = qualified } + this = scope:jockey1 + is_spouse_of = root + is_concubine = yes + } + } + weight = { + base = 1 + modifier = { add = prowess } + } + save_scope_as = jockey2 + } + } + else = { + create_character = { + template = tournament_locale_character + culture = root.location.culture + faith = root.location.faith + location = root.location + gender_female_chance = root_soldier_female_chance + save_scope_as = jockey2 + } + scope:jockey2 = { + add_character_flag = generated_jockey + add_to_list = potential_jockeys + } + } + #Randos + create_character = { + template = tournament_locale_character + culture = root.location.culture + faith = root.location.faith + location = root.location + gender_female_chance = root_soldier_female_chance + save_scope_as = jockey3 + } + scope:jockey3 = { + add_character_flag = generated_jockey + add_to_list = potential_jockeys + } + } + + # Choose Jockey 1 + option = { + name = ep2_tournament_events.4500.a + flavor = ep2_tournament_events.4500.knight.tt + scope:jockey1 = { + tournament_choose_jockey_effect = yes + accolade_medium_glory_gain_with_checks_effect = yes + } + ai_chance = { + base = 1 + modifier = { add = scope:jockey1.contest_horse_aptitude_value } + } + } + # Choose Jockey 2 + option = { + name = ep2_tournament_events.4500.b + flavor = ep2_tournament_events.4500.guest.tt + scope:jockey2 = { + tournament_choose_jockey_effect = yes + accolade_medium_glory_gain_with_checks_effect = yes + } + ai_chance = { + base = 1 + modifier = { add = scope:jockey2.contest_horse_aptitude_value } + } + } + # Choose Jockey 3 + option = { + name = ep2_tournament_events.4500.c + flavor = ep2_tournament_events.4500.nobody.tt + scope:jockey3 = { + tournament_choose_jockey_effect = yes + accolade_medium_glory_gain_with_checks_effect = yes + } + ai_chance = { + base = 1 + modifier = { add = scope:jockey3.contest_horse_aptitude_value } + } + } + + after = { + # Cull spare jockeys + every_in_list = { + list = potential_jockeys + limit = { + has_character_flag = generated_jockey + NOT = { root.var:horse_race_jockey ?= this } + } + silent_disappearance_effect = yes + } + } +} + +######################### +### EXTRA ARCHERY ### +######################### + +# You try to liven up the Contest +# Archery +ep2_tournament_events.6501 = { + type = activity_event + title = ep2_tournament_events.6501.t + desc = ep2_tournament_events.6501.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = bow_closed + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_flyby" + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6501 } + } + + # Stand on one leg a fencepost + option = { + name = ep2_tournament_events.6501.a + trigger = { + has_trait = arrogant + } + + duel = { + skill = prowess + value = high_skill_rating + #You succeed! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # I'm used to this :sunglasses: + factor = 2 + has_trait = one_legged + } + + send_interface_toast = { + title = ep2_tournament_events.6501.a.tt.win + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_prestige = major_prestige_value + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_major_value + } + } + } + if = { + limit = { + OR = { + location = { + OR = { + geographical_region = world_europe + geographical_region = world_asia_minor + } + } + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + } + give_nickname = nick_monopod + } + else = { + give_nickname = nick_sure_footed + } + + desc = ep2_tournament_events.6501.a.tt.win + + stress_impact = { + arrogant = medium_stress_impact_loss + shy = medium_stress_impact_gain + brave = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + } + } + #You slip and fall + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.6501.a.tt.lose + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_effect = { REASON = wounds } + } + + desc = ep2_tournament_events.6501.a.tt.lose + + stress_impact = { + base = minor_stress_impact_gain + arrogant = major_stress_impact_gain + } + } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_archery_livened_log + tags = { good } + score = 5 + character = root + } + } + stress_impact = { + craven = minor_stress_impact_gain + shy = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 30 + } + } + + # Try to fire an arrow blindfolded + option = { + name = ep2_tournament_events.6501.b + duel = { + skill = prowess + value = high_skill_rating + #You succeed! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.6501.b.tt.win + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + add_prestige = medium_prestige_value + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + + desc = ep2_tournament_events.6501.b.tt.win + + stress_impact = { + arrogant = minor_stress_impact_loss + shy = minor_stress_impact_gain + brave = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + } + } + #You slip and fall + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.6501.a.tt.lose + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_prestige = minor_prestige_loss + } + + desc = ep2_tournament_events.6501.b.tt.lose + + stress_impact = { + arrogant = medium_stress_impact_gain + } + } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_archery_livened_log + tags = { good } + score = 5 + character = root + } + } + ai_chance = { + base = 100 + } + } + + # Leave it + option = { + name = ep2_tournament_events.6501.c + stress_impact = { + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +# A competitor injures themself +# Joust +ep2_tournament_events.6502 = { + type = activity_event + title = ep2_tournament_events.6502.t + desc = ep2_tournament_events.6502.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:versus_contestant + animation = loss_1 + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 6502 } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = physician + } + scope:activity = { + add_activity_log_entry = { + key = tournament_joust_injury_log + tags = { bad } + score = 5 + character = scope:versus_contestant + } + } + } + + # Slyly delight in their fall and injure them further + option = { + name = ep2_tournament_events.6502.a + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + } + } + + flavor = ep2_tournament_events.6502.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + increase_wounds_no_death_effect = { REASON = wounds } + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 65 + } + } + } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = hurt_opinion + opinion = -40 + } + + stress_impact = { + sadistic = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + just = medium_stress_impact_gain + gregarious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = gregarious + } + } + } + } + + # Fetch your doctor + option = { + name = ep2_tournament_events.6502.b + + trigger = { + court_physician_available_trigger = yes + } + + add_prestige = minor_prestige_gain + + random_list = { + #Your physician does well + 2 = { + modifier = { + add = 5 + scope:physician = { + learning > average_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + learning > high_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + has_trait = lifestyle_herbalist + } + } + modifier = { + add = 20 + scope:physician = { + has_trait = lifestyle_physician + } + } + desc = ep2_tournament_events.6502.b.tt.success + + send_interface_toast = { + title = ep2_tournament_events.6502.b.tt.success + left_icon = root + right_icon = scope:versus_contestant + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 30 + } + } + } + #Your physician doesn't do so hot + 10 = { + modifier = { + add = 5 + scope:physician = { + learning < average_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + learning < high_skill_rating + } + } + desc = ep2_tournament_events.6502.b.tt.failure + send_interface_toast = { + title = ep2_tournament_events.6502.b.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + scope:competitor = { + if = { + limit = { + NOT = { + scope:versus_contestant = { + has_trait = scarred + } + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + } + } + } + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 20 + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + generous = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = arbitrary + } + } + } + } + + # Help them up + option = { + name = ep2_tournament_events.6502.c + + trigger = { + NOT = { + has_trait = callous + has_trait = sadistic + } + } + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_no_death_effect = { REASON = wounds } + } + + add_prestige = minor_prestige_gain + + stress_impact = { + compassionate = miniscule_stress_impact_loss + generous = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Shake your head and move on + option = { + name = ep2_tournament_events.6502.d + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_no_death_effect = { REASON = wounds } + + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +# A wayward arrow hits a bystander +# Archery +ep2_tournament_events.6503 = { + type = activity_event + title = ep2_tournament_events.6503.t + desc = ep2_tournament_events.6503.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:competitor1 + animation = shame + } + lower_right_portrait = { + character = scope:competitor2 + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + count >= 2 + name = qualified + contest_event_general_contestant_valid_trigger = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_impact" + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6503 } + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = competitor1 + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6503 } + } + random_guest_subset_current_phase = { + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:competitor1 + } + save_scope_as = competitor2 + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6503 } + } + } + scope:competitor2 = { + increase_wounds_no_death_effect = { + REASON = spectator_injured + } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_wayward_arrow_log + tags = { bad } + score = 5 + character = scope:competitor2 + } + } + } + + # Heal the person + option = { + name = ep2_tournament_events.6503.a + trigger = { + has_trait = lifestyle_herbalist + } + reverse_add_opinion = { + target = scope:competitor2 + modifier = grateful_opinion + opinion = 40 + } + reverse_add_opinion = { + target = scope:competitor1 + modifier = relieved_opinion + opinion = 10 + } + scope:competitor2 = { + add_character_modifier = { + modifier = safe_wound_treatment_success_low_modifier + years = 2 + } + } + progress_towards_friend_effect = { + REASON = friend_treated_wounds + CHARACTER = scope:competitor2 + OPINION = 0 + } + stress_impact = { + base = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + # Call for a medic + option = { + name = ep2_tournament_events.6503.b + remove_short_term_gold = minor_gold_value + reverse_add_opinion = { + target = scope:competitor2 + modifier = grateful_opinion + opinion = 40 + } + reverse_add_opinion = { + target = scope:competitor1 + modifier = relieved_opinion + opinion = 10 + } + scope:competitor2 = { + add_character_modifier = { + modifier = safe_wound_treatment_success_low_modifier + years = 2 + } + } + progress_towards_friend_effect = { + REASON = friend_treated_wounds + CHARACTER = scope:competitor2 + OPINION = 0 + } + stress_impact = { + base = miniscule_stress_impact_gain + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { #More likely if you don't have a lot of gold + factor = 0 + gold < root.minor_gold_value + } + } + } + + # This isn't my concern + option = { + name = ep2_tournament_events.6503.c + scope:competitor1 = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + scope:competitor2 = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_stress = minor_stress_gain + + progress_towards_rival_effect = { + REASON = rival_refused_to_help_wound + CHARACTER = scope:competitor1 + OPINION = default_rival_opinion + } + } + ai_chance = { + base = 100 + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_decisions_events.txt b/N3OW/events/dlc/ep3/ep3_decisions_events.txt new file mode 100644 index 00000000..b8d45c53 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_decisions_events.txt @@ -0,0 +1,8076 @@ +################################################### +## EP3 Decision Events +## +## 0001 - 0006 Triumph Decision +## 1000 Find Charioteer Decision +## 2000 Governor Confirmation Decision +## 3000 Restore Greece Decision +## 3100 Prepare Greek Fire Dromons +## 3200 Mass Arrests Decision +## 4000 Re-establish the original Eastern Empire +## 4010 - 4019 Ask for help/a crusade +## 4020 - 4029 Evagelize the Slavs +## 4030 Recreate the ERE +## 4040 Reintroduce the Grain Dole +## 4050 Consolidate Rule +## 4060 Convert to Feudalism from Administrative +## 4070 Convert to Administrative from Feudalism +## 5001 Knight of the Swan +## 7000 Gather Provisions +## 4080 Found Salon +## 4090 Renounce Governorship +## 5000 Commission Icon +## 5010 Hire Chief Eunuch +## 5020 - 5021 Embrace Heresy +################################################### + +namespace = ep3_decisions_event + +scripted_trigger ep3_decisions_event_valid_prisoner_trigger = { + exists = scope:triumph_enemy_defeated + OR = { + # they are vassals or knights of the defeated + liege = scope:triumph_enemy_defeated + liege.liege = scope:triumph_enemy_defeated + liege.liege.liege = scope:triumph_enemy_defeated + # they are the defeated (e.g. pretender or previous liege) + this = scope:triumph_enemy_defeated + # they participated recently in a rebellion war vs you + any_memory = { + memory_age_years < 5 + OR = { # Using a rebellious CB + var:war_cb ?= flag:war_memory_cb_independence + var:war_cb ?= flag:war_memory_cb_tyranny + var:war_cb ?= flag:war_memory_cb_depose + var:war_cb ?= flag:war_memory_cb_fracture + } + OR = { + AND = { # Personally lost the war + memory_owner = scope:triumph_enemy_defeated + has_memory_type = war_lost + var:war_attacker = scope:triumph_enemy_defeated + } + AND = { # Joined the losing war + has_memory_type = joined_allys_war + var:war_attacker = scope:triumph_enemy_defeated + var:war_ally = scope:triumph_enemy_defeated + } + AND = { # Personally lost the war you started + memory_owner = scope:triumph_enemy_defeated + has_memory_type = war_lost + var:war_attacker = root + } + AND = { # Joined the losing war you started + has_memory_type = joined_allys_war + var:war_attacker = root + var:war_ally = scope:triumph_enemy_defeated + } + } + } + } + # no "women and children" + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:triumph_enemy_defeated } + is_adult = yes +} + +scripted_trigger ep3_decisions_event_valid_hostage_trigger = { + exists = scope:triumph_enemy_defeated + is_hostage = yes + warden = root + home_court = scope:triumph_enemy_defeated + location = root.location + age >= 7 +} + +# Parade through the city +ep3_decisions_event.0001 = { + type = character_event + window = fullscreen_event + title = ep3_decisions_event.0001.t + desc = { + desc = ep3_decisions_event.0001.intro + first_valid = { + triggered_desc = { + trigger = { + # In Constantinople + location = province:496 + } + desc = ep3_decisions_event.0001.desc_const + } + desc = ep3_decisions_event.0001.desc_other + } + first_valid = { + triggered_desc = { + trigger = { + exists = var:ep3_valid_triumph_victory + } + desc = ep3_decisions_event.0001.desc + } + desc = ep3_decisions_event.0001.desc_no_war + } + desc = ep3_decisions_event.0001.desc_end + } + theme = emperor + override_background = { reference = ep3_triumph } + + immediate = { + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_hold_triumph" + # if we have won a war, save the defeated enemy + var:ep3_valid_triumph_victory ?= { + save_scope_as = triumph_enemy_defeated + } + # if we have relevant prisoners, find one + if = { + limit = { + any_prisoner = { + ep3_decisions_event_valid_prisoner_trigger = yes + } + } + random_prisoner = { + limit = { + this = scope:triumph_enemy_defeated + } + alternative_limit = { + ep3_decisions_event_valid_prisoner_trigger = yes + is_landed = yes + } + alternative_limit = { + ep3_decisions_event_valid_prisoner_trigger = yes + } + save_scope_as = valid_prisoner + } + } + # if we have a relevant hostage, save them + if = { + limit = { + any_courtier = { + ep3_decisions_event_valid_hostage_trigger = yes + } + } + random_courtier = { + limit = { + ep3_decisions_event_valid_hostage_trigger = yes + } + save_scope_as = enemy_hostage + } + } + # if we have a relevant artifact, save it + if = { + limit = { + exists = scope:triumph_enemy_defeated + exists = var:byz_valid_for_trophy + var:byz_valid_for_trophy = { + save_temporary_scope_as = artifact_check + } + scope:artifact_check = { + previous_owner ?= scope:triumph_enemy_defeated + } + } + var:byz_valid_for_trophy = { + save_scope_as = sacked_artifact + } + } + # Create a memory right away + create_character_memory = { + type = byz_held_triumph + } + #Used in loc + scope:new_memory = { + set_variable = { + name = triumph_location + value = root.location + } + } + #Used in loc + root.location = { save_scope_as = t_location } + #Otherwise the error log screams + if = { + limit = { + any_memory = { + has_variable = triumph_location + } + } + } + #Add legitimacy + add_legitimacy = medium_legitimacy_gain + } + + #Option A: to the Hippodrome + option = { + name = ep3_decisions_event.0001.a + flavor = ep3_decisions_event.0001.a.flavor + custom_tooltip = ep3_decisions_event.0001.a.tt + add_character_flag = triumph_hippodrome + trigger_event = { + id = ep3_decisions_event.0002 + days = 1 + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = cynical + add = 50 + } + modifier = { + has_trait = ambitious + add = 50 + } + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 0.5 + } + } + } + + #Option B: to Hagia Sophia + option = { + name = ep3_decisions_event.0001.b + flavor = ep3_decisions_event.0001.b.flavor + custom_tooltip = ep3_decisions_event.0001.b.tt + add_character_flag = triumph_hagia_sophia + trigger_event = { + id = ep3_decisions_event.0003 + days = 1 + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = 50 + } + modifier = { + has_trait = zealous + add = 50 + } + modifier = { + has_trait = content + add = 50 + } + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + after = { + remove_variable = ep3_valid_triumph_victory + remove_variable = byz_valid_for_trophy + } +} + +# At the Hippodrome +ep3_decisions_event.0002 = { + type = character_event + title = ep3_decisions_event.0002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:triumph_enemy_defeated } + desc = ep3_decisions_event.0002.desc_enemy + } + desc = ep3_decisions_event.0002.desc_no_war + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:triumph_enemy_defeated + exists = scope:valid_prisoner + } + desc = ep3_decisions_event.0002.desc_prisoner + } + desc = ep3_decisions_event.0002.desc_no_prisoner + } + triggered_desc = { + trigger = { + exists = scope:triumph_enemy_defeated + exists = scope:sacked_artifact + } + desc = ep3_decisions_event.0002.desc_artifact + } + triggered_desc = { + trigger = { + exists = scope:enemy_hostage + } + desc = ep3_decisions_event.0002.desc_hostage + } + desc = ep3_decisions_event.0002.desc_conclusion + } + theme = emperor + override_background = { reference = ep3_hippodrome_track } + left_portrait = { + character = root + animation = jockey_wave + camera = camera_event_horse_left + } + right_portrait = { + trigger = { + exists = scope:valid_prisoner + } + character = scope:valid_prisoner + override_imprisonment_visuals = yes + animation = prisonhouse + outfit_tags = { beggar_rags } + } + lower_right_portrait = scope:enemy_hostage + artifact = { + position = lower_left_portrait + target = scope:sacked_artifact + } + + #Option A: humiliate the prisoners + option = { + name = ep3_decisions_event.0002.a + flavor = ep3_decisions_event.0002.a.tt + trigger = { exists = scope:valid_prisoner } + trigger_event = { + id = ep3_decisions_event.0004 + days = 1 + } + ai_chance = { + base = 200 + modifier = { + has_trait = just + add = 50 + } + modifier = { + has_trait = vengeful + add = 100 + } + modifier = { + has_trait = sadistic + add = 50 + } + modifier = { + has_trait = callous + add = 50 + } + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + #Option B: parade and distribute the spoils to the crowd + option = { + name = ep3_decisions_event.0002.b + flavor = ep3_decisions_event.0002.b.tt + trigger = { + exists = scope:triumph_enemy_defeated + NOT = { exists = scope:sacked_artifact } + } + remove_treasury_or_gold = minor_treasury_or_gold_value + change_influence = major_influence_gain + add_legitimacy = minor_legitimacy_gain + trigger_event = ep3_decisions_event.0007 + stress_impact = { + greedy = major_stress_impact_gain + generous = medium_stress_impact_loss + } + ai_chance = { + base = 200 + modifier = { + has_trait = greedy + add = -100 + } + ai_value_modifier = { + ai_greed = -0.5 + ai_sociability = 0.5 + } + } + } + + #Option E: parade the spoils, destroy the symbols, and distribute the gold + option = { + name = ep3_decisions_event.0002.e + flavor = ep3_decisions_event.0002.e.tt + trigger = { + exists = scope:triumph_enemy_defeated + exists = scope:sacked_artifact + } + change_influence = major_influence_gain + add_prestige = major_prestige_gain + destroy_artifact = scope:sacked_artifact + add_legitimacy = minor_legitimacy_gain + if = { + limit = { + scope:triumph_enemy_defeated.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:triumph_enemy_defeated.culture + value = medium_negative_culture_acceptance + desc = cultural_acceptance_triumph_offensive + } + } + } + if = { + limit = { + scope:triumph_enemy_defeated = { is_alive = yes } + } + scope:triumph_enemy_defeated = { + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -50 + } + } + } + trigger_event = ep3_decisions_event.0007 + stress_impact = { + greedy = minor_stress_impact_gain + generous = medium_stress_impact_loss + zealous = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 250 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 0.75 + ai_rationality = -0.25 + } + } + } + + #Option C: distribute gold and food to the crowd + option = { + name = ep3_decisions_event.0002.c + flavor = ep3_decisions_event.0002.c.tt + trigger = { + NOT = { exists = scope:triumph_enemy_defeated } + } + # This is a correspective of option B, but all the money must come from your own pockets + remove_short_term_gold = major_gold_value + change_influence = major_influence_gain + add_legitimacy = minor_legitimacy_gain + trigger_event = ep3_decisions_event.0007 + stress_impact = { + greedy = major_stress_impact_gain + generous = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = -100 + } + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + } + } + } + + #Option D: address the crowd + option = { + name = ep3_decisions_event.0002.d + flavor = ep3_decisions_event.0002.d.tt + custom_tooltip = ep3_decisions_event.0002.d.custom_tooltip + trigger_event = { + id = ep3_decisions_event.0005 + days = 1 + } + ai_chance = { + base = 150 + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = gregarious + add = 50 + } + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +# At Hagia Sophia +ep3_decisions_event.0003 = { + type = character_event + title = ep3_decisions_event.0003.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:triumph_enemy_defeated } + desc = ep3_decisions_event.0003.desc + } + desc = ep3_decisions_event.0003.desc_no_war + } + triggered_desc = { + trigger = { + exists = scope:enemy_hostage + } + desc = ep3_decisions_event.0003.desc_hostage + } + } + theme = emperor + override_background = { reference = ep3_hagia_sophia } + left_portrait = { + character = scope:actor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + trigger = { + exists = scope:enemy_hostage + } + character = scope:enemy_hostage + animation = sadness + } + lower_right_portrait = scope:triumph_enemy_defeated + artifact = { + position = lower_left_portrait + target = scope:sacked_artifact + } + + immediate = { + + } + + #Option C: hostage + option = { + name = ep3_decisions_event.0003.c + flavor = ep3_decisions_event.0003.c.tt + trigger = { exists = scope:enemy_hostage } + if = { + limit = { + scope:triumph_enemy_defeated.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:triumph_enemy_defeated.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_triumph_peace + } + } + } + add_diplomacy_lifestyle_xp = major_lifestyle_xp + if = { + limit = { + scope:triumph_enemy_defeated = { is_alive = yes } + } + scope:triumph_enemy_defeated = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 50 + } + } + } + scope:enemy_hostage = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 50 + } + } + ai_chance = { + base = 200 + modifier = { + has_trait = forgiving + add = 100 + } + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 0.5 + } + } + } + + #Option B: dedicate to God + option = { + name = ep3_decisions_event.0003.b + trigger = { + exists = scope:triumph_enemy_defeated + NOT = { exists = scope:sacked_artifact } + } + add_piety = major_piety_gain + add_character_modifier = { + modifier = ep3_triumph_of_god_modifier + years = 10 + } + ai_chance = { + base = 200 + modifier = { + has_trait = zealous + add = 50 + } + modifier = { + has_trait = humble + add = 100 + } + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option D: dedicate the spoils to God + option = { + name = ep3_decisions_event.0003.d + trigger = { + exists = scope:triumph_enemy_defeated + exists = scope:sacked_artifact + } + custom_tooltip = ep3_decisions_event.0003.d.tt_artifact + hidden_effect = { destroy_artifact = scope:sacked_artifact } + add_piety = massive_piety_gain + add_legitimacy = minor_legitimacy_gain + add_character_modifier = { + modifier = ep3_triumph_of_god_modifier + years = 10 + } + faith = { + change_fervor = { + value = 1 + desc = fervor_gain_triumph_of_god + } + } + ai_chance = { + base = 250 + modifier = { + has_trait = zealous + add = 100 + } + modifier = { + has_trait = greedy + add = -150 + } + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 0.5 + } + } + } + + #Option A: receive blessing + option = { + name = ep3_decisions_event.0003.a + add_piety = medium_piety_gain + add_character_modifier = { + modifier = ep3_blessed_in_triumph_modifier + years = 10 + } + add_legitimacy = minor_legitimacy_gain + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 50 + } + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + after = { trigger_event = ep3_decisions_event.0007 } +} + +# Deal with the prisoners +ep3_decisions_event.0004 = { + type = character_event + title = ep3_decisions_event.0004.t + desc = { + desc = ep3_decisions_event.0004.desc + triggered_desc = { + trigger = { + exists = scope:enemy_hostage + } + desc = ep3_decisions_event.0004.desc_hostage + } + } + theme = emperor + override_background = { reference = ep3_hippodrome } + left_portrait = { + character = root + animation = war_defender + } + right_portrait = { + character = scope:valid_prisoner + override_imprisonment_visuals = yes + animation = prisonhouse + outfit_tags = { beggar_rags } + } + lower_center_portrait = scope:enemy_hostage + + immediate = { + # needed in the blinding effects + save_scope_as = actor + scope:valid_prisoner = { save_scope_as = recipient } + } + + #Option A: blind + option = { + name = ep3_decisions_event.0004.a + trigger = { + scope:valid_prisoner = { + NOT = { has_trait = blind } + } + } + # Effects, opinions, and stress for blinding + blind_recipient_effect = yes + blind_opinion_effect = yes + blind_castrate_and_disfigure_effect = yes #stress is here + # The people love a traditionally Byzantine show of strength + # You uphold the Byzantine traditions + add_character_modifier = { + modifier = ep3_triumph_traditional_punishments_modifier + years = 5 + } + change_influence = medium_influence_gain + add_legitimacy = minor_legitimacy_gain + if = { + limit = { + exists = scope:enemy_hostage + } + scope:enemy_hostage = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + } + } + if = { + limit = { + scope:triumph_enemy_defeated = { is_alive = yes } + } + scope:triumph_enemy_defeated = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + } + } + ai_chance = { + base = 300 + ai_value_modifier = { + ai_vengefulness = 0.5 + } + } + } + + #Option B: execute + option = { + name = ep3_decisions_event.0004.b + execute_prisoner_effect = { #stress is here + VICTIM = scope:valid_prisoner + EXECUTIONER = root + } + # The people are afraid of the show of strength + add_character_modifier = { + modifier = ep3_triumph_public_executioner_modifier + years = 5 + } + if = { + limit = { + exists = scope:enemy_hostage + } + scope:enemy_hostage = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -30 + } + } + } + if = { + limit = { + scope:triumph_enemy_defeated = { is_alive = yes } + } + scope:triumph_enemy_defeated = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -30 + } + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = sadistic + add = 100 + } + modifier = { + has_trait = paranoid + add = 50 + } + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 0.5 + } + } + } + + #Option C: pardon + option = { + name = ep3_decisions_event.0004.c + scope:valid_prisoner = { release_from_prison = yes } + if = { + limit = { + can_add_hook = { + target = scope:valid_prisoner + type = indebted_hook + } + } + add_hook = { + target = scope:valid_prisoner + type = indebted_hook + } + } + # The people think you are nice + change_influence = major_influence_gain + if = { + limit = { + exists = scope:enemy_hostage + } + scope:enemy_hostage = { + add_opinion = { + target = root + modifier = merciful_opinion + opinion = 20 + } + } + } + if = { + limit = { + scope:triumph_enemy_defeated = { is_alive = yes } + } + scope:triumph_enemy_defeated = { + add_opinion = { + target = root + modifier = merciful_opinion + opinion = 30 + } + } + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + vengeful = major_stress_impact_gain + paranoid = major_stress_impact_gain + trusting = medium_stress_impact_loss + forgiving = major_stress_impact_loss + compassionate = major_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = forgiving + add = 100 + } + modifier = { + has_trait = content + add = 50 + } + modifier = { + has_trait = compassionate + add = 50 + } + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + after = { trigger_event = ep3_decisions_event.0007 } +} + +# Make a speech +ep3_decisions_event.0005 = { + type = character_event + title = ep3_decisions_event.0005.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:triumph_enemy_defeated } + desc = ep3_decisions_event.0005.desc_victory + } + desc = ep3_decisions_event.0005.desc_no_war + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:triumph_enemy_defeated + exists = scope:valid_prisoner + } + desc = ep3_decisions_event.0005.desc_prisoner + } + desc = ep3_decisions_event.0005.desc_politics + } + triggered_desc = { + trigger = { + exists = scope:enemy_hostage + } + desc = ep3_decisions_event.0005.desc_hostage + } + } + theme = emperor + override_background = { reference = ep3_hippodrome } + left_portrait = { + character = root + animation = war_defender + } + right_portrait = { + trigger = { + exists = scope:enemy_hostage + } + character = scope:enemy_hostage + animation = sadness + } + lower_center_portrait = scope:valid_prisoner + + immediate = { + # The people are excited to see and hear you + add_prestige = medium_prestige_gain + } + + #Option A: promise victories + option = { + name = ep3_decisions_event.0005.a + flavor = ep3_decisions_event.0005.tt + duel = { + value = average_skill_rating + skill = martial + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_decisions_event.0005.a.success + send_interface_toast = { + title = ep3_decisions_event.success + left_icon = root + custom_tooltip = ep3_decisions_event.a.tt + add_character_modifier = { + modifier = ep3_triumph_promised_victories_modifier + years = 10 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_decisions_event.0005.a.failure + send_interface_toast = { + title = ep3_decisions_event.failure + left_icon = root + custom_tooltip = ep3_decisions_event.a.tt_no + } + } + } + add_character_flag = triumph_promised_victories + ai_chance = { + base = 100 + modifier = { + has_trait = wrathful + add = 50 + } + modifier = { + has_trait = ambitious + add = 50 + } + modifier = { + has_trait = brave + add = 50 + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } + + #Option B: promise stability + option = { + name = ep3_decisions_event.0005.b + flavor = ep3_decisions_event.0005.tt + duel = { + value = average_skill_rating + skill = diplomacy + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_decisions_event.0005.b.success + send_interface_toast = { + title = ep3_decisions_event.success + left_icon = root + custom_tooltip = ep3_decisions_event.b.tt + add_character_modifier = { + modifier = ep3_triumph_promised_stability_modifier + years = 10 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_decisions_event.0005.a.failure + send_interface_toast = { + title = ep3_decisions_event.failure + left_icon = root + custom_tooltip = ep3_decisions_event.b.tt_no + } + } + } + add_character_flag = triumph_promised_stability + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + add = 50 + } + modifier = { + has_trait = just + add = 50 + } + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 0.5 + } + } + } + + #Option C: promise prosperity + option = { + name = ep3_decisions_event.0005.c + flavor = ep3_decisions_event.0005.tt + duel = { + value = average_skill_rating + skill = stewardship + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_decisions_event.0005.c.success + send_interface_toast = { + title = ep3_decisions_event.success + left_icon = root + custom_tooltip = ep3_decisions_event.c.tt + add_character_modifier = { + modifier = ep3_triumph_promised_prosperity_modifier + years = 10 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_decisions_event.0005.a.failure + send_interface_toast = { + title = ep3_decisions_event.failure + left_icon = root + custom_tooltip = ep3_decisions_event.c.tt_no + } + } + } + add_character_flag = triumph_promised_prosperity + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = 50 + } + modifier = { + has_trait = diligent + add = 50 + } + ai_value_modifier = { + ai_greed = 1 + } + } + } + + after = { + trigger_event = ep3_decisions_event.0007 + trigger_event = { + id = ep3_decisions_event.0006 + months = { 45 59 } + } + } +} + +# Follow-up, some years later +ep3_decisions_event.0006 = { + type = character_event + title = ep3_decisions_event.0006.t + desc = { + desc = ep3_decisions_event.0006.desc + first_valid = { + triggered_desc = { + trigger = { has_character_flag = triumph_promised_victories } + desc = ep3_decisions_event.0006.desc_victory + } + triggered_desc = { + trigger = { has_character_flag = triumph_promised_stability } + desc = ep3_decisions_event.0006.desc_stability + } + triggered_desc = { + trigger = { has_character_flag = triumph_promised_prosperity } + desc = ep3_decisions_event.0006.desc_prosperity + } + } + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = triumph_promise_kept + } + desc = ep3_decisions_event.0006.desc_yes + } + desc = ep3_decisions_event.0006.desc_no + } + } + theme = emperor + left_portrait = { + character = root + triggered_animation = { + trigger = { has_character_flag = triumph_promise_kept } + animation = happiness + } + triggered_animation = { + trigger = { NOT = { has_character_flag = triumph_promise_kept } } + animation = shame + } + } + right_portrait = { + character = scope:talker + animation = worry + } + + trigger = { + OR = { + has_character_flag = triumph_promised_prosperity + has_character_flag = triumph_promised_victories + has_character_flag = triumph_promised_stability + } + } + + immediate = { + random_memory = { + memory_type = byz_held_triumph + limit = { + memory_age_years < 5 + } + save_scope_as = triumph_memory + } + if = { + limit = { + has_character_flag = triumph_promised_victories + has_variable = ep3_valid_triumph_victory + } + add_character_flag = triumph_promise_kept + } + else_if = { + limit = { + has_character_flag = triumph_promised_stability + NOT = { + any_memory = { + memory_age_years < scope:triumph_memory.memory_age_years + OR = { + var:war_cb ?= flag:war_memory_cb_independence + var:war_cb ?= flag:war_memory_cb_tyranny + var:war_cb ?= flag:war_memory_cb_depose + var:war_cb ?= flag:war_memory_cb_fracture + } + } + } + } + add_character_flag = triumph_promise_kept + } + else_if = { + limit = { + has_character_flag = triumph_promised_prosperity + } + add_character_flag = triumph_promise_kept + } + if = { + limit = { + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + location = root.location + } + } + cp:councillor_steward = { save_scope_as = talker } + } + else_if = { + limit = { + any_courtier_or_guest = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + is_adult = yes + } + } + random_courtier_or_guest = { + limit = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + is_adult = yes + } + save_scope_as = talker + } + } + else = { + random_courtier_or_guest = { + limit = { is_adult = yes } #There should always be at least one to grab + save_scope_as = talker + } + } + } + + #Promise kept + option = { + name = ep3_decisions_event.0006.a + trigger = { has_character_flag = triumph_promise_kept } + change_influence = major_influence_gain + # The people believe in you + add_legitimacy = minor_legitimacy_gain + } + + #Promise not kept + option = { + name = ep3_decisions_event.0006.b + trigger = { NOT = { has_character_flag = triumph_promise_kept } } + change_influence = minor_influence_loss + # The people are disappointed + add_legitimacy = minor_legitimacy_loss + } + + after = { + remove_character_flag = triumph_promised_prosperity + remove_character_flag = triumph_promised_victories + remove_character_flag = triumph_promised_stability + remove_character_flag = triumph_promise_kept + } +} + +# Conclusion Event +ep3_decisions_event.0007 = { + type = character_event + window = fullscreen_event + title = ep3_decisions_event.0007.t + desc = { + desc = ep3_decisions_event.0007.desc + first_valid = { + triggered_desc = { + trigger = { has_character_flag = triumph_hagia_sophia } + desc = ep3_decisions_event.0007.hagia_sophia + } + desc = ep3_decisions_event.0007.hippodrome + } + } + theme = emperor + override_background = { reference = ep3_triumph } + + immediate = { + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_hold_triumph" + change_influence = major_influence_gain + } + + option = { + name = ep3_decisions_event.0007.a + custom_tooltip = ep3_decisions_event.0007.a.tt + } + + after = { + if = { + limit = { has_character_flag = triumph_hippodrome } + remove_character_flag = triumph_hippodrome + } + if = { + limit = { has_character_flag = triumph_hagia_sophia} + remove_character_flag = triumph_hagia_sophia + } + } +} + +############################################## +### Find a Charioteer +### by Chad Uhl +scripted_trigger mediocre_charioteer_trigger = { + can_be_employed_as = charioteer_court_position + is_available_healthy_ai_adult = yes + has_any_charioteer_trait = no + prowess >= 7 +} + +scripted_trigger good_charioteer_trigger = { + can_be_employed_as = charioteer_court_position + is_available_healthy_ai_adult = yes + has_any_charioteer_trait = yes + has_trait = education_martial + prowess >= 14 +} + +ep3_decisions_event.1000 = { + type = character_event + title = ep3_decisions_event.1000.t + desc = { + desc = ep3_decisions_event.1000.desc + triggered_desc = { + trigger = { exists = scope:stolen_charioteer } + desc = ep3_decisions_event.1000.desc.stolen_charioteer + } + } + theme = administrative + + left_portrait = { + character = scope:mediocre_charioteer + animation = happiness + } + right_portrait = { + character = scope:good_charioteer + animation = personality_honorable + } + lower_center_portrait = scope:stolen_charioteer + + immediate = { + # Find a mediocre one + if = { # check for a mediocre character in the pool + limit = { + any_pool_character = { + province = root.capital_province + mediocre_charioteer_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { mediocre_charioteer_trigger = yes } + save_scope_as = mediocre_charioteer + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = root_soldier_female_chance + age = { 16 30 } + culture = root.location.culture + faith = root.location.faith + random_traits_list = { + count = 1 + education_martial_1 = {} + education_intrigue_1 = {} + education_intrigue_2 = {} + } + random_traits_list = { + count = 2 + ambitious = {} + arrogant = {} + deceitful = {} + diligent = {} + impatient = {} + honest = {} + brave = {} + lustful = {} + wrathful = {} + } + random_traits = yes + prowess = { + min_template_low_skill + max_template_average_skill + } + save_scope_as = mediocre_charioteer + } + } + + # Find a good one + if = { # check for a GOOD character in the pool + limit = { + any_pool_character = { + province = root.capital_province + good_charioteer_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { good_charioteer_trigger = yes } + save_scope_as = good_charioteer + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = root_soldier_female_chance + age = { 16 30 } + culture = root.location.culture + faith = root.location.faith + random_traits_list = { + count = 1 + education_martial_1 = {} + education_martial_2 = {} + education_martial_3 = {} + } + random_traits_list = { + count = 2 + ambitious = {} + arrogant = {} + deceitful = {} + diligent = {} + impatient = {} + honest = {} + brave = {} + lustful = {} + wrathful = {} + } + random_traits = yes + prowess = { + min_template_decent_skill + max_template_decent_skill + } + save_scope_as = good_charioteer + } + hidden_effect = { + scope:good_charioteer = { + if = { + limit = { has_any_charioteer_trait = no } + random_list = { + 1 = { + add_trait = charioteer_green + add_trait_xp = { + trait = charioteer_green + value = 10 + } + } + 1 = { + add_trait = charioteer_blue + add_trait_xp = { + trait = charioteer_blue + value = 10 + } + } + 1 = { + add_trait = charioteer_white + add_trait_xp = { + trait = charioteer_white + value = 10 + } + } + 1 = { + add_trait = charioteer_red + add_trait_xp = { + trait = charioteer_red + value = 10 + } + } + } + } + } + } + } + + # Optional: Steal one from another character (only for human players) + if = { + limit = { is_ai = no } + } + top_liege = { + every_vassal_or_below = { + limit = { + employs_court_position = charioteer_court_position + is_ai = yes + } + court_position:charioteer_court_position = { + add_to_list = charioteers + } + } + } + if = { + limit = { list_size:charioteers >= 1 } + random_in_list = { + list = charioteers + save_scope_as = stolen_charioteer + } + } + + } + + option = { + name = ep3_decisions_event.1000.a + custom_tooltip = ep3_decisions_event.1000.a.aptitude + pay_treasury_or_gold = { + target = scope:mediocre_charioteer + value = low_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:mediocre_charioteer } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:mediocre_charioteer + COURT_POS = charioteer_court_position + } + } + appoint_court_position = { + recipient = scope:mediocre_charioteer + court_position = charioteer_court_position + } + } + else_if = { + limit = { + employs_court_position = charioteer_court_position + } + random_court_position_holder = { + type = charioteer_court_position + save_scope_as = current_charioteer + } + replace_court_position = { + recipient = scope:mediocre_charioteer + holder = scope:current_charioteer + court_position = charioteer_court_position + } + } + } + + option = { + name = ep3_decisions_event.1000.b + custom_tooltip = ep3_decisions_event.1000.b.aptitude + pay_treasury_or_gold = { + target = scope:good_charioteer + value = high_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:good_charioteer } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:good_charioteer + COURT_POS = charioteer_court_position + } + } + appoint_court_position = { + recipient = scope:good_charioteer + court_position = charioteer_court_position + } + } + else_if = { + limit = { + employs_court_position = charioteer_court_position + } + random_court_position_holder = { + type = charioteer_court_position + save_scope_as = current_charioteer + } + replace_court_position = { + recipient = scope:good_charioteer + holder = scope:current_charioteer + court_position = charioteer_court_position + } + } + } + + option = { + name = ep3_decisions_event.1000.c + custom_tooltip = ep3_decisions_event.1000.c.aptitude + trigger = { exists = scope:stolen_charioteer } + pay_treasury_or_gold = { + target = scope:stolen_charioteer + value = high_skill_court_physician_cost + } + change_influence = medium_influence_loss + hidden_effect = { add_courtier = scope:stolen_charioteer } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:stolen_charioteer + COURT_POS = charioteer_court_position + } + } + appoint_court_position = { + recipient = scope:stolen_charioteer + court_position = charioteer_court_position + } + } + else_if = { + limit = { + employs_court_position = charioteer_court_position + } + random_court_position_holder = { + type = charioteer_court_position + save_scope_as = current_charioteer + } + replace_court_position = { + recipient = scope:stolen_charioteer + holder = scope:current_charioteer + court_position = charioteer_court_position + } + } + } + + option = { + name = ep3_decisions_event.1000.d + } +} + +############################################## +### Find a Bookmaker +### by Chad Uhl +scripted_trigger mediocre_bookmaker_trigger = { + can_be_employed_as = bookmaker_court_position + is_available_healthy_ai_adult = yes + stewardship >= 7 +} + +scripted_trigger good_bookmaker_trigger = { + can_be_employed_as = bookmaker_court_position + is_available_healthy_ai_adult = yes + stewardship >= 14 + has_trait = education_stewardship +} + +ep3_decisions_event.1010 = { + type = character_event + title = ep3_decisions_event.1010.t + desc = ep3_decisions_event.1010.desc + theme = administrative + + left_portrait = { + character = scope:mediocre_bookmaker + animation = happiness + } + right_portrait = { + character = scope:good_bookmaker + animation = personality_honorable + } + + immediate = { + # Find a mediocre one + if = { # check for a mediocre character in the pool + limit = { + any_pool_character = { + province = root.capital_province + mediocre_bookmaker_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { mediocre_bookmaker_trigger = yes } + save_scope_as = mediocre_bookmaker + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = root_soldier_female_chance + age = { 16 30 } + culture = root.location.culture + faith = root.location.faith + random_traits_list = { + count = 1 + education_stewardship_1 = {} + education_intrigue_1 = {} + education_intrigue_2 = {} + } + random_traits = yes + stewardship = { + min_template_low_skill + max_template_average_skill + } + save_scope_as = mediocre_bookmaker + } + } + + # Find a good one + if = { # check for a GOOD character in the pool + limit = { + any_pool_character = { + province = root.capital_province + good_bookmaker_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { good_bookmaker_trigger = yes } + save_scope_as = good_bookmaker + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = root_soldier_female_chance + age = { 16 30 } + culture = root.location.culture + faith = root.location.faith + random_traits_list = { + count = 1 + education_stewardship_1 = {} + education_stewardship_2 = {} + education_stewardship_3 = {} + } + random_traits = yes + stewardship = { + min_template_decent_skill + max_template_decent_skill + } + save_scope_as = good_bookmaker + } + } + } + + option = { + name = ep3_decisions_event.1010.a + custom_tooltip = ep3_decisions_event.1010.a.aptitude + pay_treasury_or_gold = { + target = scope:mediocre_bookmaker + value = low_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:mediocre_bookmaker } + court_position_grant_effect = { + CANDIDATE = scope:mediocre_bookmaker + POS = bookmaker + EMPLOYER = root + } + } + + option = { + name = ep3_decisions_event.1010.b + custom_tooltip = ep3_decisions_event.1010.b.aptitude + pay_treasury_or_gold = { + target = scope:good_bookmaker + value = high_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:good_bookmaker } + court_position_grant_effect = { + CANDIDATE = scope:good_bookmaker + POS = bookmaker + EMPLOYER = root + } + } + + option = { + name = ep3_decisions_event.1000.d + } +} + + + +############################################## +# Confirm Governorship +# directed by Joe Parkin +# based on the book by P. Homage +# +# 2001 -> Liege welcomes Governor +# 2002 -> Governor learns of rejection (end) +# 2010 -> Liege receives Governor +# 2011 -> Governor learns of result (end) +# 2080 -> Confirmation invalidated info +# 2090 -> Invalidation handling + +scripted_trigger admin_confirmation_valid_trigger = { # Confirmation is still valid + is_alive = yes + is_imprisoned = no + var:confirmation_liege_scope ?= { + is_alive = yes + is_imprisoned = no + } + liege ?= var:confirmation_liege_scope +} + +scripted_effect admin_confirmation_refuse_effect = { + scope:confirmation_vassal = { + change_influence = medium_influence_loss + add_opinion = { + modifier = refusal_opinion + target = scope:confirmation_liege + opinion = -20 + } + } +} + +scripted_effect admin_confirmation_clear_variable_effect = { + current_travel_plan ?= { + if = { + limit = { is_paused = yes } + resume_travel_plan = yes + } + } + # Vassal + if = { + limit = { has_variable = confirmation_cooldown_vassal } + remove_variable = confirmation_cooldown_vassal + } + # Liege + if = { + limit = { has_variable = confirmation_liege_scope } + remove_variable = confirmation_liege_scope + } +} + +ep3_decisions_event.2001 = { + type = letter_event + opening = ep3_decisions_event.2001.opening + sender = { + character = scope:confirmation_vassal + animation = throne_room_bow_1 + } + desc = ep3_decisions_event.2001.desc + + trigger = { + scope:confirmation_vassal = { + is_alive = yes + is_imprisoned = no + } + } + + on_trigger_fail = { + scope:confirmation_vassal = { + if = { + limit = { is_alive = no } + trigger_event = ep3_decisions_event.2090 + } + } + } + + option = { + name = ep3_decisions_event.2001.a + trigger = { + scope:confirmation_vassal = { admin_confirmation_valid_trigger = yes } + } + custom_tooltip = ep3_decisions_event.2001.a.tt + trigger_event = ep3_decisions_event.2010 + ai_chance = { base = 100 } + } + + option = { + name = ep3_decisions_event.2001.b + flavor = ep3_decisions_event.2001.b.tt + admin_confirmation_refuse_effect = yes + scope:confirmation_vassal = { + trigger_event = { on_action = admin_confirmation_invalid_on_action } + } + if = { + limit = { + NOT = { has_relation_rival = scope:confirmation_vassal } + } + stress_impact = { + arrogant = medium_stress_impact_gain + just = medium_stress_impact_gain + } + } + else = { + stress_impact = { base = medium_stress_impact_loss } + } + ai_chance = { + base = -4 + modifier = { + add = 5 + opinion = { + target = scope:confirmation_vassal + value < 0 + } + } + modifier = { + add = 45 + has_relation_rival = scope:confirmation_vassal + } + } + } +} + +ep3_decisions_event.2002 = { + type = letter_event + opening = ep3_decisions_event.2002.opening + desc = ep3_decisions_event.2002.desc + sender = scope:confirmation_liege + + trigger = { admin_confirmation_valid_trigger = yes } + + immediate = { + show_as_tooltip = { admin_confirmation_refuse_effect = yes } + } + + option = { + name = ep3_decisions_event.2002.a + } + + after = { admin_confirmation_clear_variable_effect = yes } +} + +scripted_effect admin_confirmation_liege_reward_effect = { + scope:confirmation_liege = { + if = { + limit = { has_royal_court = yes has_dlc_feature = royal_court } + change_current_court_grandeur = miniscule_court_grandeur_gain + } + add_prestige = minor_prestige_gain + change_influence = minor_influence_gain + dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + } +} + +scripted_effect admin_confirmation_vassal_reward_effect = { + scope:confirmation_vassal = { admin_confirmation_vassal_reward_guts_effect = yes } + admin_confirmation_clear_variable_effect = yes +} + +# Liege receives Governor +ep3_decisions_event.2010 = { + type = character_event # to avoid too much in the court for ruler + title = ep3_decisions_event.2010.t + desc = { + desc = ep3_decisions_event.2010.desc + #What kind of theme is it? + first_valid = { + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_civilian + } + } + desc = ep3_decisions_event.2010.desc_theme_civilian + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_military + } + } + desc = ep3_decisions_event.2010.desc_theme_military + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_frontier + } + } + desc = ep3_decisions_event.2010.desc_theme_frontier + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_imperial + } + } + desc = ep3_decisions_event.2010.desc_theme_imperial + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_naval + } + } + desc = ep3_decisions_event.2010.desc_theme_naval + } + #Is small + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + OR = { + AND = { + highest_held_title_tier = tier_kingdom + sub_realm_size <= 5 + } + AND = { + highest_held_title_tier = tier_duchy + sub_realm_size <= 2 + } + AND = { + highest_held_title_tier <= tier_county + sub_realm_size <= 1 + } + } + } + } + desc = ep3_decisions_event.2010.desc_theme_small + } + #Is big + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + OR = { + AND = { + highest_held_title_tier = tier_kingdom + sub_realm_size >= 20 + } + AND = { + highest_held_title_tier <= tier_duchy + sub_realm_size >= 8 + } + } + } + } + desc = ep3_decisions_event.2010.desc_theme_big + } + + desc = ep3_decisions_event.2010.desc_theme_balanced + } + #Who lives there? + first_valid = { + #Friendly foreigners + triggered_desc = { + trigger = { + scope:confirmation_vassal.capital_county.culture = { + this != root.culture + cultural_acceptance = { + target = root.culture + value >= 30 + } + } + } + desc = ep3_decisions_event.2010.desc_cool_foreigners + } + #Weird foreigners + triggered_desc = { + trigger = { + scope:confirmation_vassal.capital_county.culture = { + this != root.culture + } + } + desc = ep3_decisions_event.2010.desc_weird_foreigners + } + #Same culture as emperor + desc = ep3_decisions_event.2010.desc_same_culture + } + #What faith are they? + first_valid = { + #State faith, but not emperor's faith + triggered_desc = { + trigger = { + faith != scope:confirmation_vassal.capital_county.faith + primary_title.state_faith = { + this = scope:confirmation_vassal.capital_county.faith + } + } + desc = ep3_decisions_event.2010.desc_state_faith + } + #Awful heretics + triggered_desc = { + trigger = { + faith != scope:confirmation_vassal.capital_county.faith + faith = { + faith_hostility_level = { + target = scope:confirmation_vassal.capital_county.faith + value >= faith_hostile_level + } + } + } + desc = ep3_decisions_event.2010.desc_heretic_faith + } + #Different faith,but alright + triggered_desc = { + trigger = { + faith != scope:confirmation_vassal.capital_county.faith + } + desc = ep3_decisions_event.2010.desc_accepted_faith + } + #Emperor's faith + desc = ep3_decisions_event.2010.desc_my_faith + } + #Does he like you? + random_valid = { + triggered_desc = { + trigger = { + #He hates you + scope:confirmation_vassal = { + opinion = { + target = root + value < -50 + } + } + } + desc = ep3_decisions_event.2010.desc_hate + } + triggered_desc = { + trigger = { + #He loves you + scope:confirmation_vassal = { + opinion = { + target = root + value > 50 + } + } + } + desc = ep3_decisions_event.2010.desc_love + } + triggered_desc = { + trigger = { + #He is old as shit and meh on you + scope:confirmation_vassal = { + age > 55 + health < fine_health + } + } + desc = ep3_decisions_event.2010.desc_decrepit + } + triggered_desc = { + trigger = { + #He is young as shit and meh on you + scope:confirmation_vassal = { + age < 25 + } + } + desc = ep3_decisions_event.2010.desc_young + } + triggered_desc = { + trigger = { + #He sucks at his job + scope:confirmation_vassal = { + governor_efficiency < 0.75 + } + } + desc = ep3_decisions_event.2010.desc_incompetent + } + triggered_desc = { + trigger = { + #He's great at his job' + scope:confirmation_vassal = { + governor_efficiency > 1.25 + } + } + desc = ep3_decisions_event.2010.desc_skilled + } + #He's just meh + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + NOR = { + opinion = { + target = root + value > 50 + } + opinion = { + target = root + value < -50 + } + AND = { + age > 55 + health < fine_health + } + age < 25 + governor_efficiency < 0.75 + governor_efficiency > 1.25 + } + } + } + desc = ep3_decisions_event.2010.desc_generic_outro + } + + } + } + theme = emperor + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_duty" } + + left_portrait = scope:confirmation_liege + right_portrait = { + character = scope:confirmation_vassal + animation = throne_room_bow_1 + } + + trigger = { + #is_available = yes + scope:confirmation_vassal = { + is_alive = yes + is_imprisoned = no + } + } + + immediate = { + save_opinion_value_as = { + name = opinion_of_petitioner + target = scope:confirmation_vassal + } + scope:confirmation_vassal = { + save_scope_as = second + assign_quirk_effect = yes + } + } + + + option = { + name = ep3_decisions_event.2010.a + show_as_tooltip = { + scope:confirmation_vassal = { + add_prestige = minor_prestige_gain + change_influence = medium_influence_gain + } + } + } + + after = { + admin_confirmation_liege_reward_effect = yes + scope:confirmation_vassal = { trigger_event = ep3_decisions_event.2011 } + } +} + +# Governor learns of result (end) +ep3_decisions_event.2011 = { + type = court_event + title = ep3_decisions_event.2010.t + desc = { + desc = ep3_decisions_event.2011.desc + #Is this administration a shitshow? + random_valid = { + triggered_desc = { + trigger = { + scope:confirmation_liege = { + age <= 20 + } + } + desc = ep3_decisions_event.2011.desc_child + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + faith = { + NOR = { + this = scope:confirmation_liege.primary_title.state_faith + this = scope:confirmation_liege.capital_county.faith + } + } + } + } + desc = ep3_decisions_event.2011.desc_heretic + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + is_at_war = yes + any_character_war = { + OR = { + AND = { + is_attacker = scope:confirmation_liege + attacker_war_score <= 60 + } + AND = { + is_defender = scope:confirmation_liege + defender_war_score <= 60 + } + } + } + } + } + desc = ep3_decisions_event.2011.desc_war + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + OR = { + AND = { + diplomacy < average_skill_rating + stewardship < average_skill_rating + martial < average_skill_rating + intrigue < average_skill_rating + learning < average_skill_rating + } + capital_county = { + county_control < 90 + } + legitimacy_level < 2 + } + } + } + desc = ep3_decisions_event.2011.desc_poorly_run + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + OR = { + AND = { + diplomacy >= average_skill_rating + stewardship >= average_skill_rating + martial >= average_skill_rating + intrigue >= average_skill_rating + learning >= average_skill_rating + } + AND = { + has_trait = governor + has_trait_xp = { + trait = governor + value >= 75 + } + + } + legitimacy_level >= 4 + } + } + } + desc = ep3_decisions_event.2011.desc_well_run + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + OR = { + AND = { + is_female = yes + has_realm_law = male_preference_law + } + AND = { + is_male = yes + has_realm_law = female_preference_law + } + } + legitimacy_level < 5 + } + } + desc = ep3_decisions_event.2011.desc_gender + } + desc = ep3_decisions_event.2011.desc_typical_palace + } + #What does emperor think of you? + first_valid = { + #Loathes you + triggered_desc = { + trigger = { + reverse_opinion = { + target = scope:confirmation_liege + value < -50 + } + } + desc = ep3_decisions_event.2011.desc_hate + } + #Loves you + triggered_desc = { + trigger = { + reverse_opinion = { + target = scope:confirmation_liege + value > 50 + } + } + desc = ep3_decisions_event.2011.desc_love + } + #meh + desc = ep3_decisions_event.2011.desc_meh + } + #What kind of theme do you have? + first_valid = { + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_civilian + } + } + desc = ep3_decisions_event.2011.desc_theme_civilian + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_military + } + } + desc = ep3_decisions_event.2011.desc_theme_military + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_frontier + } + } + desc = ep3_decisions_event.2011.desc_theme_frontier + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_imperial + } + } + desc = ep3_decisions_event.2011.desc_theme_imperial + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_naval + } + } + desc = ep3_decisions_event.2011.desc_theme_naval + } + #Is small + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + OR = { + AND = { + highest_held_title_tier = tier_kingdom + sub_realm_size <= 5 + } + AND = { + highest_held_title_tier = tier_duchy + sub_realm_size <= 2 + } + AND = { + highest_held_title_tier <= tier_county + sub_realm_size <= 1 + } + } + } + } + desc = ep3_decisions_event.2011.desc_theme_small + } + #Is big + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + OR = { + AND = { + highest_held_title_tier = tier_kingdom + sub_realm_size >= 20 + } + AND = { + highest_held_title_tier <= tier_duchy + sub_realm_size >= 8 + } + } + } + } + desc = ep3_decisions_event.2011.desc_theme_big + } + desc = ep3_decisions_event.2011.desc_theme_balanced + } + desc = ep3_decisions_event.2011.desc_outro + } + theme = administrative + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_duty" } + court_scene = { + button_position_character = scope:confirmation_liege + court_owner = scope:confirmation_liege + show_timeout_info = no + roles = { + scope:confirmation_vassal = { + group = petitioners_group + animation = throne_room_bow_1 + } + } + } + + trigger = { admin_confirmation_valid_trigger = yes } + + immediate = { + scope:confirmation_liege = { + save_scope_as = second + assign_quirk_effect = yes + if = { + limit = { has_royal_court = yes } + open_view_data = { + view = royal_court + secondary_actor = scope:confirmation_vassal + player = scope:confirmation_vassal + } + } + } + } + + + option = { + name = ep3_decisions_event.2011.a + } + + after = { + admin_confirmation_vassal_reward_effect = yes + if = { + limit = { + scope:confirmation_liege = { has_royal_court = yes } + } + close_view = { + view = royal_court + player = scope:confirmation_vassal + } + } + } +} + +#Confirmation no longer available +ep3_decisions_event.2080 = { + type = character_event + title = ep3_decisions_event.2080.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + NOT = { government_allows = administrative } + primary_title.tier = scope:confirmation_liege.primary_title.tier + } + } + desc = ep3_decisions_event.2080.desc.court + } + triggered_desc = { + trigger = { is_imprisoned = yes } + desc = ep3_decisions_event.2080.desc.imprisoned + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + is_alive = no + killer ?= root + } + } + desc = ep3_decisions_event.2080.desc.liege_dead_me + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { is_alive = no } + } + desc = ep3_decisions_event.2080.desc.liege_dead + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + is_imprisoned = yes + imprisoner ?= root + } + } + desc = ep3_decisions_event.2080.desc.liege_imprisoned_me + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { is_imprisoned = yes } + } + desc = ep3_decisions_event.2080.desc.liege_imprisoned + } + } + triggered_desc = { + trigger = { + exists = liege + NOR = { + liege = root + liege = scope:confirmation_liege + } + AND = { # Of the Emperor + top_liege ?= { highest_held_title_tier = tier_empire } + government_allows = administrative + liege ?= top_liege + } + } + desc = ep3_decisions_event.2080.desc.new_liege + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { is_alive = yes } + exists = liege + liege != root + } + desc = ep3_decisions_event.2080.desc + } + } + theme = administrative + left_portrait = { + character = scope:confirmation_liege + triggered_animation = { + trigger = { is_imprisoned = yes } + animation = prisondungeon + } + triggered_animation = { + trigger = { is_alive = no } + animation = idle + } + triggered_animation = { + trigger = { is_available = no } + animation = dismissal + } + } + right_portrait = { + character = liege + trigger = { + liege != scope:confirmation_liege + } + } + + trigger = { admin_confirmation_valid_trigger = no } + + immediate = { + # Transfer the variable to a scope for loc & such. + var:homage_liege_scope ?= { save_scope_as = homage_liege } + } + + option = { + name = { + text = ep3_decisions_event.2080.a_court + trigger = { has_royal_court = yes } + } + name = { + text = ep3_decisions_event.2080.a_prison + trigger = { is_imprisoned = yes } + } + name = { + text = ep3_decisions_event.2080.a_liege + trigger = { + scope:confirmation_liege = { + is_alive = yes + is_imprisoned = no + } + } + } + name = { + text = ep3_decisions_event.2080.a + trigger = { always = yes } + } + } + + after = { admin_confirmation_clear_variable_effect = yes } +} + +# Invalidation handling +ep3_decisions_event.2090 = { + hidden = yes + immediate = { + if = { + limit = { + scope:confirmation_liege = { + OR = { + is_alive = no + is_imprisoned = yes + is_travelling = yes + } + } + } + send_interface_toast = { + title = admin_confirmation_costs_refunded + left_icon = root + if = { # Remove variable preventing you + limit = { has_variable = confirmation_grace } + remove_variable = confirmation_grace + } + # Refund any costs + add_prestige = standard_activity_cost + } + trigger_event = ep3_decisions_event.2080 + } + else = { + scope:confirmation_liege = { trigger_event = ep3_decisions_event.2001 } + } + current_travel_plan ?= { + delay_travel_plan = { days = 90 } + } + } +} + + +######################################################### +### Restore Backwater Greek Counties Decision Events +### by Chad Uhl + +# Event for the Governor when they've completely removed the backwater modifiers +ep3_decisions_event.3000 = { + type = letter_event + opening = ep3_decisions_event.3001.opening + desc = ep3_decisions_event.3000.desc + sender = top_liege + + immediate = { + show_as_tooltip = { + every_sub_realm_county = { + limit = { + title_province = { + geographical_region = greek_backwater_modifier_region + } + } + remove_county_modifier = backwater_county_modifier + } + } + } + + option = { + name = ep3_decisions_event.3000.a + # Big influence gain + change_influence = massive_influence_gain + # Modifier to improve Stewardship, which in turn improves Governor Efficiency + add_character_modifier = { + modifier = restored_greek_theme_modifier + } + # Let the player know that they are getting boosted governor efficiency + custom_tooltip = restored_greek_theme_gov_efficiency_tt + # Improve relationship with the emperor + reverse_add_opinion = { + target = liege + modifier = impressed_opinion + opinion = 20 + } + } +} + +# Event for the emperor when all the counties of Greece have been rid of the backwater modifier +ep3_decisions_event.3001 = { + type = character_event + title = ep3_decisions_event.3001.t + desc = ep3_decisions_event.3001.desc + theme = emperor + override_background = { reference = council_chamber } + + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:interlocutor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + + trigger = { + any_sub_realm_county = { + title_province = { geographical_region = greek_backwater_modifier_region } + } + any_sub_realm_county = { + count = 0 + title_province = { + geographical_region = greek_backwater_modifier_region + } + has_county_modifier = backwater_county_modifier + } + } + + # If the emperor isn't valid for this event yet, check next year + on_trigger_fail = { + if = { # If the emperor no longer holds any county in this region, then we remove all the modifiers and just call it quits + limit = { + any_sub_realm_county = { + count = 0 + title_province = { + geographical_region = greek_backwater_modifier_region + } + } + } + every_county_in_region = { + region = greek_backwater_modifier_region + limit = { + has_county_modifier = backwater_county_modifier + } + remove_county_modifier = backwater_county_modifier + } + } + else = { # If the emperor still holds counties in Greece, we will check all this again in a year to see the status + trigger_event = { + id = ep3_decisions_event.3001 + years = 1 + } + } + } + + immediate = { + # Find an interlocutor + if = { + limit = { exists = cp:councillor_steward } + cp:councillor_steward = { save_scope_as = interlocutor } + } + else_if = { + limit = { exists = cp:councillor_chancellor } + cp:councillor_chancellor = { save_scope_as = interlocutor } + } + else_if = { + limit = { + any_councillor = { } + } + random_councillor = { + save_scope_as = interlocutor + } + } + else = { + ordered_vassal = { + order_by = stewardship + save_scope_as = interlocutor + } + } + + # Create the tooltip showing that all the modifiers have been removed + show_as_tooltip = { + custom_tooltip = { + text = every_county_in_greece_tt + every_county_in_region = { + region = greek_backwater_modifier_region + limit = { + holder = { + OR = { + this = root + any_liege_or_above = { + this = root + } + } + } + } + remove_county_modifier = backwater_county_modifier + } + } + } + } + + option = { # Celebrate the Empire's wealth and abundance + name = ep3_decisions_event.3001.a + add_legitimacy = minor_legitimacy_gain + change_influence = major_influence_gain + } +} + + +######################################################### +### Prepare Greek Fire Dromons +### by Jason Cantalini + +# Event for the holder of constantinople when they opt into the decision +ep3_decisions_event.3100 = { + type = character_event + title = ep3_decisions_event.3100.t + desc = ep3_decisions_event.3100.desc + theme = war + override_background = { reference = docks } + + left_portrait = { + character = root + animation = debating + } + right_portrait = { + character = scope:aide + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + + immediate = { + # Find an interlocutor + if = { + limit = { exists = cp:councillor_marshal } + cp:councillor_steward = { save_scope_as = aide } + } + else_if = { + limit = { exists = cp:councillor_steward } + cp:councillor_chancellor = { save_scope_as = aide } + } + else_if = { + limit = { + any_councillor = { } + } + random_councillor = { + save_scope_as = aide + } + } + else_if = { + limit = { + vassal_count >= 1 + } + ordered_vassal = { + order_by = martial + save_scope_as = aide + } + } + else_if = { + limit = { + any_courtier = { + is_alive = yes + } + } + ordered_courtier = { + order_by = martial + save_scope_as = aide + } + } + else = { + random_pool_character = { + province = root.capital_province + limit = { + is_adult = yes + } + save_scope_as = aide + } + } + } + + option = { #Use the city's native capabilities to produce what's needed + name = ep3_decisions_event.3100.a + trigger = { + influence >= major_influence_value + } + show_as_unavailable = { influence < massive_influence_value } + save_scope_as = actor + add_character_flag = { + flag = took_greek_fire_decision_flag + years = 10 + } + begin_scheme_with_agents_effect = { + SCHEME_TYPE = prepare_fire_dromons_scheme + TARGET_TYPE = target_title + TARGET_SCOPE = root.capital_county + # Success. + AGENT_1 = agent_alchemist + AGENT_2 = agent_draughtsman + # Speed. + AGENT_3 = agent_drillmaster + AGENT_4 = agent_supplier + AGENT_5 = agent_bureaucrat_title + } + custom_tooltip = defensive_fire_dromons_success_tooltip + custom_tooltip = defensive_fire_dromons_custom_desc + custom_tooltip = defensive_fire_dromons_buildings_desc + change_influence = major_influence_loss + + stress_impact = { + compassionate = medium_stress_impact_gain + calm = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + } + modifier = { + factor = 0 + influence < massive_influence_value + } + modifier = { + factor = 0 + } + } + } + option = { #Have the latins manufacture ships + name = ep3_decisions_event.3100.b + trigger = { + treasury >= major_gold_value_static_max + } + show_as_unavailable = { treasury < massive_gold_value_static_max } + save_scope_as = actor + add_character_flag = { + flag = took_greek_fire_decision_flag + years = 10 + } + begin_scheme_with_agents_effect = { + SCHEME_TYPE = prepare_fire_dromons_scheme + TARGET_TYPE = target_title + TARGET_SCOPE = root.capital_county + # Success. + AGENT_1 = agent_alchemist + AGENT_2 = agent_draughtsman + # Speed. + AGENT_3 = agent_drillmaster + AGENT_4 = agent_supplier + AGENT_5 = agent_bureaucrat_title + } + custom_tooltip = defensive_fire_dromons_success_tooltip + custom_tooltip = defensive_fire_dromons_custom_desc + custom_tooltip = defensive_fire_dromons_buildings_desc + remove_treasury_or_gold = major_gold_value_static_max + + stress_impact = { + compassionate = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + calm = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + factor = 0 + treasury < massive_gold_value_static_max + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = paranoid + } + } + } + } + option = { #Actually... never mind + name = ep3_decisions_event.3100.c + remove_decision_cooldown = prepare_greek_fire_dromons_decision + stress_impact = { + sadistic = minor_stress_impact_gain + callous = miniscule_stress_impact_gain + ambitious = miniscule_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + has_trait = compassionate + has_trait = calm + has_trait = content + } + } + } + } +} + + +######################################################### +### Mass Arrests Decision Events +### by Chad Uhl + +#ep3_decisions_event.3200 = { +# type = character_event +# title = ep3_decisions_event.3200.t +# desc = ep3_decisions_event.3200.desc +# theme = emperor +# +# left_portrait = { +# character = scope:pf_1.house_head +# animation = spymaster +# } +# right_portrait = { +# character = scope:pf_2.house_head +# animation = scheme +# } +# lower_left_portrait = scope:pf_3.house_head +# lower_center_portrait = scope:pf_4.house_head +# lower_right_portrait = scope:pf_5.house_head +# +# immediate = { +# every_powerful_family = { +# limit = { NOT = { root.house ?= this } } +# add_to_list = powerful_families +# } +# ordered_powerful_family = { +# limit = { +# NOR = { +# root.house ?= this +# scope:pf_1 ?= this +# scope:pf_2 ?= this +# scope:pf_3 ?= this +# scope:pf_4 ?= this +# scope:pf_5 ?= this +# } +# } +# order_by = house_power_score +# max = 5 +# check_range_bounds = no +# +# if = { +# limit = { +# exists = scope:pf_4 +# list_size:powerful_families >= 5 +# } +# save_scope_as = pf_5 +# } +# else_if = { +# limit = { +# exists = scope:pf_3 +# list_size:powerful_families >= 4 +# } +# save_scope_as = pf_4 +# } +# else_if = { +# limit = { +# exists = scope:pf_2 +# list_size:powerful_families >= 3 +# } +# save_scope_as = pf_3 +# } +# else_if = { +# limit = { +# exists = scope:pf_1 +# list_size:powerful_families >= 2 +# } +# save_scope_as = pf_2 +# } +# else = { +# save_scope_as = pf_1 +# } +# } +# } +# +# option = { +# name = ep3_decisions_event.3200.a +# trigger = { exists = scope:pf_1 } +# highlight_portrait = scope:pf_1.house_head +# scope:pf_1 = { 3200_house_member_effect = yes } +# add_legitimacy = medium_legitimacy_loss +# add_tyranny = massive_tyranny_gain +# +# if = { +# limit = { scope:pf_1.house_head = { is_ai = yes } } +# trigger_event = { +# id = ep3_decisions_event.3201 +# days = 5 +# } +# } +# +# ai_chance = { +# base = 50 +# modifier = { +# has_any_good_relationship_with_character_trigger = { CHARACTER = scope:pf_1.house_head } +# factor = 0 +# } +# modifier = { +# has_relation_nemesis = scope:pf_1.house_head +# add = 100 +# } +# modifier = { +# has_relation_rival = scope:pf_1.house_head +# add = 50 +# } +# } +# } +# +# option = { +# name = ep3_decisions_event.3200.b +# trigger = { exists = scope:pf_2 } +# highlight_portrait = scope:pf_2.house_head +# scope:pf_2 = { 3200_house_member_effect = yes } +# add_legitimacy = medium_legitimacy_loss +# add_tyranny = massive_tyranny_gain +# +# if = { +# limit = { scope:pf_2.house_head = { is_ai = yes } } +# trigger_event = { +# id = ep3_decisions_event.3201 +# days = 5 +# } +# } +# +# ai_chance = { +# base = 40 +# modifier = { +# has_any_good_relationship_with_character_trigger = { CHARACTER = scope:pf_2.house_head } +# factor = 0 +# } +# modifier = { +# has_relation_nemesis = scope:pf_2.house_head +# add = 100 +# } +# modifier = { +# has_relation_rival = scope:pf_2.house_head +# add = 50 +# } +# } +# } +# +# option = { +# name = ep3_decisions_event.3200.c +# trigger = { exists = scope:pf_3 } +# highlight_portrait = scope:pf_3.house_head +# scope:pf_3 = { 3200_house_member_effect = yes } +# add_legitimacy = medium_legitimacy_loss +# add_tyranny = massive_tyranny_gain +# +# if = { +# limit = { scope:pf_3.house_head = { is_ai = yes } } +# trigger_event = { +# id = ep3_decisions_event.3201 +# days = 5 +# } +# } +# +# ai_chance = { +# base = 30 +# modifier = { +# has_any_good_relationship_with_character_trigger = { CHARACTER = scope:pf_3.house_head } +# factor = 0 +# } +# modifier = { +# has_relation_nemesis = scope:pf_3.house_head +# add = 100 +# } +# modifier = { +# has_relation_rival = scope:pf_3.house_head +# add = 50 +# } +# } +# } +# +# option = { +# name = ep3_decisions_event.3200.d +# trigger = { exists = scope:pf_4 } +# highlight_portrait = scope:pf_4.house_head +# scope:pf_4 = { 3200_house_member_effect = yes } +# add_legitimacy = medium_legitimacy_loss +# add_tyranny = massive_tyranny_gain +# +# if = { +# limit = { scope:pf_4.house_head = { is_ai = yes } } +# trigger_event = { +# id = ep3_decisions_event.3201 +# days = 5 +# } +# } +# +# ai_chance = { +# base = 20 +# modifier = { +# has_any_good_relationship_with_character_trigger = { CHARACTER = scope:pf_4.house_head } +# factor = 0 +# } +# modifier = { +# has_relation_nemesis = scope:pf_4.house_head +# add = 100 +# } +# modifier = { +# has_relation_rival = scope:pf_4.house_head +# add = 50 +# } +# } +# } +# +# option = { +# name = ep3_decisions_event.3200.e +# trigger = { exists = scope:pf_5 } +# highlight_portrait = scope:pf_5.house_head +# scope:pf_5 = { 3200_house_member_effect = yes } +# add_legitimacy = medium_legitimacy_loss +# add_tyranny = massive_tyranny_gain +# +# if = { +# limit = { scope:pf_5.house_head = { is_ai = yes } } +# trigger_event = { +# id = ep3_decisions_event.3201 +# days = 5 +# } +# } +# +# ai_chance = { +# base = 10 +# modifier = { +# has_any_good_relationship_with_character_trigger = { CHARACTER = scope:pf_5.house_head } +# factor = 0 +# } +# modifier = { +# has_relation_nemesis = scope:pf_5.house_head +# add = 100 +# } +# modifier = { +# has_relation_rival = scope:pf_5.house_head +# add = 50 +# } +# } +# } +# +# option = { # I changed my mind +# name = ep3_decisions_event.3200.f +# remove_decision_cooldown = mass_arrests_decision +# } +#} + +# House head begs for release +ep3_decisions_event.3201 = { + type = character_event + title = ep3_decisions_event.3201.t + desc = ep3_decisions_event.3201.desc + theme = emperor + + left_portrait = { + character = scope:imprisoned_house_head + animation = prisonhouse + override_imprisonment_visuals = yes + } + right_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + + trigger = { + scope:imprisoned_house_head = { + is_alive = yes + is_imprisoned_by = root + } + } + + option = { # Release Them + name = ep3_decisions_event.3201.a + scope:imprisoned_house_head = { + release_from_prison = yes + } + if = { + limit = { + can_add_hook = { + target = scope:imprisoned_house_head + type = liege_favour_strong_hook + } + } + add_hook = { + target = scope:imprisoned_house_head + type = liege_favour_strong_hook + } + } + + scope:imprisoned_house_head = { + if = { + limit = { + NOR = { + # Cannot have any of these traits + has_trait = vengeful + has_trait = wrathful + has_trait = ambitious + + # And not already be loyal + has_trait = loyal + + # And not be a rival + NOT = { has_relation_rival = root } + } + is_ai = yes + } + random = { + chance = { + value = 15 + if = { + limit = { + has_trait = craven + } + add = 15 + } + if = { + limit = { + has_trait = content + } + add = 10 + } + if = { + limit = { + has_trait = forgiving + } + add = 5 + } + if = { + limit = { + has_trait = honest + } + add = 5 + } + if = { + limit = { + has_trait = trusting + } + add = 5 + } + } + add_trait = loyal + } + } + } + + ai_chance = { + base = 50 + modifier = { + has_trait = vengeful + factor = 0 + } + modifier = { + OR = { + has_trait = forgiving + has_trait = trusting + } + factor = 2 + } + } + } + + option = { # No + name = ep3_decisions_event.3201.b + add_dread = medium_dread_gain + + ai_chance = { + base = 50 + modifier = { + OR = { + has_trait = forgiving + has_trait = trusting + } + factor = 0 + } + } + } +} + + +######################################################### +### Re-establish the original Eastern Empire +### by Claudia Baldassi + +ep3_decisions_event.4000 = { + type = character_event + title = ep3_decisions_event.4000.t + desc = ep3_decisions_event.4000.desc + theme = emperor + override_background = { reference = ep3_hippodrome_track } + left_portrait = { + character = root + animation = jockey_wave + camera = camera_event_horse_left + } + + immediate = { + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_hold_triumph" + retake_eastern_provinces_decision_effect = yes + create_character_memory = { + type = byz_theodosian_border_memory + } + } + + option = { + name = ep3_decisions_event.4000.a + } +} + +scripted_effect send_help_from_called_effect = { + scope:caller = { + pay_treasury_or_gold = { + target = scope:called + value = major_treasury_or_gold_value + } + spawn_army = { + levies = 4000 + men_at_arms = { + type = conrois + men = 500 + } + location = scope:caller.capital_province + origin = scope:called.capital_province + war = scope:our_war + name = ep3_religious_volunteers_army + } + } + scope:called = { + add_character_modifier = { + modifier = ep3_sent_help_to_east_modifier + years = 10 + } + } +} + +#Ask an ally for war help +ep3_decisions_event.4010 = { + type = letter_event + opening = ep3_decisions_event.4010.t + desc = ep3_decisions_event.4010.desc + sender = scope:caller + + immediate = { + save_scope_as = called + faith.religious_head = { save_scope_as = pope } + } + + #Option A: we will help + option = { + name = ep3_decisions_event.4010.a + scope:caller = { + trigger_event = { + id = ep3_decisions_event.4015 + days = 2 + } + } + show_as_tooltip = { + send_help_from_called_effect = yes + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_sociability = 0.5 + } + } + } + #Option B: ask the pope + option = { + name = ep3_decisions_event.4010.b + flavor = ep3_decisions_event.4010.b.tt_2 + save_scope_as = sponsor + scope:pope = { + trigger_event = { + id = ep3_decisions_event.4012 + days = 2 + } + } + scope:caller = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4010.b.tt + left_icon = root + right_icon = scope:pope + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:pope + multiplier = 1 + } + opinion_modifier = { + who = scope:pope + opinion_target = root + multiplier = 2 + } + } + } + #Option C: no + option = { + name = ep3_decisions_event.4010.c + scope:caller = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4010.c.tt + left_icon = scope:called + } + } + ai_chance = { + base = 25 + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = -2 + } + } + } +} + +scripted_trigger ask_help_valid_for_crusades_trigger = { +# There is in the world a christian faith with crusades and a HoF to call them (mainly Catholic) + religion:christianity_religion = { + exists = var:variable_ghw_unlocked + NOT = { exists = var:variable_first_ghw_cooldown } + } + scope:pope = { + is_imprisoned = no + faith = { + has_doctrine_parameter = great_holy_wars_active + fervor >= 60 + } + } +} + +#Ask the pope +ep3_decisions_event.4011 = { + type = letter_event + opening = ep3_decisions_event.4010.t + desc = ep3_decisions_event.4010.desc + sender = scope:caller + + immediate = { + save_scope_as = called + save_scope_as = pope + } + + #Option A: send help + option = { + name = ep3_decisions_event.4010.a + scope:caller = { + trigger_event = { + id = ep3_decisions_event.4015 + days = 2 + } + } + show_as_tooltip = { + send_help_from_called_effect = yes + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 0.5 + } + } + } + #Option B: call crusade + option = { + name = ep3_decisions_event.4011.b + trigger = { + faith = { + NOT = { exists = great_holy_war } + } + ask_help_valid_for_crusades_trigger = yes + } + if = { + limit = { + faith = { + fervor >= 60 + fervor < 75 + } + } + faith = { + change_fervor = { + value = minor_fervor_value + desc = called_for_help_fervor + } + } + } + scope:caller = { + trigger_event = { + id = ep3_decisions_event.4013 + days = 3 + } + } + ai_chance = { + base = 100 + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = 2 + } + ai_value_modifier = { + ai_zeal = 2 + } + } + } + #Option C: no + option = { + name = ep3_decisions_event.4011.c + scope:caller = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4010.c.tt + left_icon = scope:called + } + } + ai_chance = { + base = 25 + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = -2 + } + } + } +} + +#The ally asks the pope +ep3_decisions_event.4012 = { + type = letter_event + opening = ep3_decisions_event.4012.t + desc = ep3_decisions_event.4012.desc + sender = scope:sponsor + + immediate = { + save_scope_as = called + save_scope_as = pope + } + + #Option A: send help + option = { + name = ep3_decisions_event.4012.a + scope:caller = { + trigger_event = { + id = ep3_decisions_event.4015 + days = 2 + } + } + scope:sponsor = { + send_interface_toast = { + title = ep3_decisions_event.4012.a.tt + left_icon = scope:pope + right_icon = scope:caller + show_as_tooltip = { + send_help_from_called_effect = yes + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:sponsor + multiplier = 1 + } + } + } + #Option B: call crusade + option = { + name = ep3_decisions_event.4012.b + trigger = { + faith = { + NOT = { exists = great_holy_war } + } + ask_help_valid_for_crusades_trigger = yes + } + if = { + limit = { + faith = { + fervor >= 60 + fervor < 75 + } + } + faith = { + change_fervor = { + value = minor_fervor_value + desc = called_for_help_fervor + } + } + } + scope:caller = { + trigger_event = { + id = ep3_decisions_event.4013 + days = 3 + } + } + scope:sponsor = { + send_interface_toast = { + title = ep3_decisions_event.4012.b.tt + left_icon = scope:pope + right_icon = scope:caller + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + } + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:sponsor + multiplier = 2 + } + } + } + #Option C: no + option = { + name = ep3_decisions_event.4011.c + scope:caller = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4010.c.tt + left_icon = scope:called + } + } + scope:sponsor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4010.c.tt + left_icon = scope:called + } + } + ai_chance = { + base = 25 + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = -1 + } + opinion_modifier = { + who = root + opinion_target = scope:sponsor + multiplier = -2 + } + } + } +} + +#The pope asks for support for a crusade +ep3_decisions_event.4013 = { + type = letter_event + opening = ep3_decisions_event.4013.t + desc = ep3_decisions_event.4013.desc + sender = scope:pope + + #Option A: pledge to send money + option = { + name = ep3_decisions_event.4013.a + custom_tooltip = ep3_decisions_event.4013.a.tt + add_character_flag = pledged_money_to_crusade_support + create_character_memory = { + type = western_help_pope + participants = { pope = scope:pope enemy = scope:enemy } + } + scope:pope = { + trigger_event = { + id = ep3_decisions_event.4014 + days = 3 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 1 + ai_greed = -0.5 + } + modifier = { + scope:our_war = { + is_defender = root + attacker_war_score > 30 + } + add = 50 + } + modifier = { + scope:our_war = { + is_defender = root + attacker_war_score > 60 + } + add = 100 + } + modifier = { + scope:our_war = { + is_attacker = root + defender_war_score > 30 + } + add = 50 + } + modifier = { + scope:our_war = { + is_attacker = root + defender_war_score > 60 + } + add = 100 + } + modifier = { + factor = 0 + gold <= massive_gold_value + } + } + } + #Option B: nevermind then + option = { + name = ep3_decisions_event.4013.b + scope:pope = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4013.b.tt + left_icon = scope:caller + } + } + scope:sponsor ?= { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4013.b.tt + left_icon = scope:caller + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + +scripted_effect ask_help_crusade_setup_effect = { + great_holy_war = { + set_war_declarer = scope:ghw_sponsor + if = { + limit = { is_directed_ghw = no } + undirected_ghw_recipient_selection_effect = yes + } + } + if = { + limit = { scope:ghw_sponsor.gold > 0 } + great_holy_war = { + change_war_chest_gold = { + value = scope:ghw_sponsor.gold + divide = 2 + max = 5000 + } + } + scope:ghw_sponsor = { + remove_short_term_gold = { + value = gold + divide = 2 + max = 5000 + } + } + } + great_holy_war = { + pledge_attacker = scope:ghw_sponsor + set_variable = { + name = redirect_cost + value = 500 + } + } + #If no Claimant or Title Holder is available to be the Papal choice and the Crusade has not proceeded far enough to have a favoritebeneficiary, select a fallback Recipient so that the CB's tooltip does not appear incomplete. + if = { #Random Courtier in the Pope's court. + limit = { + NOT = { exists = faith.great_holy_war.ghw_title_recipient } + exists = scope:ghw_sponsor + exists = scope:the_faith.great_holy_war + scope:ghw_sponsor = { + any_courtier = { + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + } + } + scope:ghw_sponsor = { + random_courtier = { + alternative_limit = { + scope:the_faith = { has_doctrine = doctrine_gender_male_dominated } + is_male = yes + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + alternative_limit = { + scope:the_faith = { has_doctrine = doctrine_gender_female_dominated } + is_female = yes + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + limit = { + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + save_scope_as = fallback_recipient + add_character_flag = flag_is_ghw_fallback_recipient + } + } + } + else_if = { #Else Generate a fallback recipient. + limit = { + NOT = { exists = faith.great_holy_war.ghw_title_recipient } + } + create_character = { + location = scope:ghw_sponsor.capital_province + template = new_commander_character + faith = scope:the_faith + culture = scope:ghw_sponsor.culture + save_scope_as = fallback_recipient + gender_female_chance = { + if = { + limit = { + scope:the_faith = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + scope:the_faith = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { + add = 50 + } + } + } + scope:fallback_recipient = { add_character_flag = flag_is_ghw_fallback_recipient } + } + great_holy_war = { + set_variable = { + name = var_fallback_recipient + value = scope:fallback_recipient + } + } + every_player = { #Inform players + limit = { + faith = scope:the_faith + highest_held_title_tier >= tier_county + this != scope:ghw_sponsor + } + trigger_event = great_holy_war.0003 #Send event immediately for player, then delay it for all the AIs. + } + every_player = { #Inform defending players + limit = { + OR = { + faith = scope:target_faith #All infidels. + any_liege_or_above = { + scope:the_faith.great_holy_war = { has_pledged_defender = prev } + } + AND = { + faith != scope:the_faith + scope:the_faith.great_holy_war = { has_pledged_defender = prev } + } + } + } + trigger_event = great_holy_war.0050 + } + #Attackers Pledge to the Crusade. (AI only) + every_faith_ruler = { + limit = { + is_ai = yes + is_landed = yes + highest_held_title_tier >= tier_county + NOR = { + this = scope:ghw_sponsor + scope:the_faith.great_holy_war = { has_pledged_attacker = prev } + target_is_liege_or_above = scope:target_character + } + } + trigger_event = { + #AI pledging. There is a chance the AI might pledge after the Crusade starts, but it's a lot less likely. + id = great_holy_war.0020 + days = { 50 450 } + } + } + every_faith_holy_order = { + trigger_event = { + #Holy orders always join + id = great_holy_war.0090 + days = { 30 60 } + } + } + #Defenders Pledge to the Crusade. (AI only) + scope:target_character = { + religion = { + every_faith = { + every_faith_ruler = { + limit = { + is_ai = yes + is_landed = yes + highest_held_title_tier >= tier_county + NOT = { + scope:the_faith.great_holy_war = { has_pledged_defender = prev } + } + } + trigger_event = { + #AI counterpledging. Unlike attackers, defenders should be selected much faster during the preparation phase and then stop. + id = great_holy_war.0021 + days = { 25 150 } + } + } + } + } + faith = { + every_faith_holy_order = { + trigger_event = { + # Holy orders always join + id = great_holy_war.0091 + days = { 30 60 } + } + } + } + } +} + +#Responded yes to the pope +ep3_decisions_event.4014 = { + type = letter_event + opening = ep3_decisions_event.4010.t + desc = ep3_decisions_event.4014.desc + sender = scope:caller + + #Option A: unleash the crusade! + option = { + name = ep3_decisions_event.4014.a + faith = { save_scope_as = the_faith } + save_scope_as = ghw_sponsor + scope:enemy = { save_scope_as = target_character } + # Launch the preparation phase + faith = { + start_great_holy_war = { + target_character = scope:target_character + target_title = scope:target_kingdom + delay = { 365 545 } + } + } + scope:target_character.faith = { save_scope_as = target_faith } + faith = { ask_help_crusade_setup_effect = yes } + if = { + limit = { + scope:caller = { + has_character_flag = pledged_money_to_crusade_support + } + } + scope:caller = { + send_interface_toast = { + title = ep3_decisions_event.4014.a.tt + left_icon = scope:ghw_sponsor + remove_treasury_or_gold = massive_treasury_or_gold_value + scope:ghw_sponsor.faith.great_holy_war = { + change_war_chest_gold = { + value = scope:caller.massive_gold_value + } + } + } + } + } + } + after = { + scope:caller = { remove_character_flag = pledged_money_to_crusade_support } + } +} + +#Called offers help in exchange for something +ep3_decisions_event.4015 = { + type = letter_event + opening = ep3_decisions_event.4013.t + desc = ep3_decisions_event.4015.desc + sender = scope:called + + #Option A: accept + option = { + name = ep3_decisions_event.4015.a + scope:called = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4015.a.tt + left_icon = scope:caller + scope:caller = { + pay_treasury_or_gold = { + target = scope:called + value = major_treasury_or_gold_value + } + spawn_army = { + levies = 4000 + men_at_arms = { + type = conrois + men = 500 + } + location = scope:caller.capital_province + origin = scope:called.capital_province + war = scope:our_war + name = ep3_religious_volunteers_army + } + create_character_memory = { + type = western_help_ally + participants = { ally = scope:called enemy = scope:enemy } + } + } + add_character_modifier = { + modifier = ep3_sent_help_to_east_modifier + years = 10 + } + } + } + ai_chance = { + base = 100 + modifier = { + scope:our_war = { + is_defender = root + attacker_war_score > 30 + } + add = 50 + } + modifier = { + scope:our_war = { + is_defender = root + attacker_war_score > 60 + } + add = 100 + } + modifier = { + scope:our_war = { + is_attacker = root + defender_war_score > 30 + } + add = 50 + } + modifier = { + scope:our_war = { + is_attacker = root + defender_war_score > 60 + } + add = 100 + } + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + factor = 0 + treasury_or_gold <= major_treasury_or_gold_value + } + } + } + + #Option B: refuse + option = { + name = ep3_decisions_event.4015.b + scope:called = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4013.b.tt + left_icon = scope:caller + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + + +ep3_decisions_event.4020 = { + type = character_event + title = ep3_decisions_event.4020.t + desc = ep3_decisions_event.4020.desc + theme = emperor + override_background = { reference = ep3_hagia_sophia } + + left_portrait = { + character = root + animation = prayer + } + right_portrait = { + character = scope:evangelizer + animation = wedding_priest + } + lower_right_portrait = scope:pagan + + immediate = { + if = { + limit = { + has_title = title:e_byzantium + } + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + valid_for_pagan_conversion_trigger = yes + } + save_scope_as = pagan + } + } + else = { + random_neighboring_and_across_water_realm_same_rank_owner = { + limit = { + valid_for_pagan_conversion_trigger = yes + } + save_scope_as = pagan + } + } + scope:pagan.primary_title = { save_scope_as = title_to_convert } + random_pool_character = { + province = root.location + limit = { + faith = root.faith + learning >= 18 + } + save_scope_as = evangelizer + } + if = { + limit = { + NOT = { exists = scope:evangelizer } + } + random_list = { + 25 = { + trigger = { NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_female } } } + create_character = { + location = root.location + name = "Kyrillos" + template = ep3_evangelizer_template + gender_female_chance = 0 + save_scope_as = evangelizer + } + } + 25 = { + trigger = { NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_female } } } + create_character = { + location = root.location + name = "Methodios" + template = ep3_evangelizer_template + gender_female_chance = 0 + save_scope_as = evangelizer + } + } + 25 = { + trigger = { NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_female } } } + create_character = { + location = root.location + name = "Konstantinos" + template = ep3_evangelizer_template + gender_female_chance = 0 + save_scope_as = evangelizer + } + } + 25 = { + trigger = { NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_female } } } + create_character = { + location = root.location + name = "Michael" + template = ep3_evangelizer_template + gender_female_chance = 0 + save_scope_as = evangelizer + } + } + 25 = { + trigger = { NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_male } } } + create_character = { + location = root.location + template = ep3_evangelizer_template + gender_female_chance = 100 + save_scope_as = evangelizer + } + } + } + } + add_courtier = scope:evangelizer + save_scope_as = sender + location = { save_scope_as = starting_point } + } + + option = { + name = ep3_decisions_event.4020.a + custom_tooltip = ep3_decisions_event.4020.a.tt + scope:evangelizer = { + start_travel_plan = { + destination = scope:pagan.capital_province + on_arrival_event = ep3_decisions_event.4021 + on_arrival_destinations = all + return_trip = no # One way + } + } + } +} + +ep3_decisions_event.4021 = { + hidden = yes + + immediate = { + #scope:evangelizer = { set_location = { location = scope:pagan.capital_province stick_to_location = yes } } + scope:pagan = { add_visiting_courtier = scope:evangelizer } + if = { + limit = { + scope:pagan = { + OR = { + is_alive = no + is_landed = no + } + } + } + scope:title_to_convert.holder = { save_scope_as = pagan } + } + scope:pagan.faith = { save_scope_as = old_faith } + # Player event for scope:pagan + if = { + limit = { + scope:pagan = { is_ai = no } + } + scope:pagan = { + trigger_event = { + id = ep3_decisions_event.4022 + days = 1 + } + } + } + # AI event for the evangelizer + else = { + scope:evangelizer = { + trigger_event = { + id = ep3_decisions_event.4023 + days = 1 + } + } + } + } +} + +ep3_decisions_event.4022 = { + type = character_event + title = ep3_decisions_event.4020.t + desc = ep3_decisions_event.4022.desc + theme = emperor + + trigger = { + scope:evangelizer = { is_alive = yes } + } + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:evangelizer + animation = wedding_priest + } + lower_right_portrait = scope:sender + + #Option A: hear them out + option = { + name = ep3_decisions_event.4022.a + create_character_memory = { + type = was_evangelized_memory + participants = { missionary = scope:evangelizer sender = scope:sender } + } + set_character_faith_with_conversion = scope:evangelizer.faith + custom_tooltip = ep3_decisions_event.4022.a.tt + custom_tooltip = negotiated_alliance_delay_tt + show_as_tooltip = { + create_alliance = { + target = scope:sender + allied_through_owner = scope:pagan + allied_through_target = scope:sender + } + scope:sender = { + add_opinion = { + target = scope:pagan + modifier = event_negotiated_alliance_opinion + } + } + } + scope:evangelizer = { + add_character_flag = success_conversion + } + scope:sender = { + create_character_memory = { + type = evangelized_memory + participants = { missionary = scope:evangelizer pagan = scope:pagan } + } + } + stress_impact = { + zealous = major_stress_impact_gain + content = major_stress_impact_gain + craven = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + + #Option C: no thanks with stab + option = { + name = ep3_decisions_event.4022.c + flavor = ep3_decisions_event.4022.c.tt + add_piety = major_piety_gain + scope:evangelizer = { + death = { + death_reason = death_execution + killer = root + } + } + scope:sender = { + trigger_event = { + id = ep3_decisions_event.4026 + days = 3 + } + } + scope:pagan = { + add_character_flag = do_not_disturb_preachers + } + scope:title_to_convert = { + set_variable = do_not_disturb_preachers + } + stress_impact = { + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + gregarious = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + } + + #Option B: no thanks + option = { + name = ep3_decisions_event.4022.b + add_piety = medium_piety_gain + scope:evangelizer = { + add_character_flag = failed_conversion + } + } + + after = { + if = { + limit = { + scope:sender = { is_alive = yes } + scope:evangelizer = { is_alive = yes } + } + scope:evangelizer = { + start_travel_plan = { + destination = scope:sender.location + on_arrival_event = ep3_decisions_event.4024 + on_arrival_destinations = all + return_trip = no # One way + } + } + } + else_if = { + limit = { + scope:evangelizer = { is_alive = yes } + } + scope:evangelizer = { + start_travel_plan = { + destination = scope:starting_point + on_arrival_event = ep3_decisions_event.4024 + on_arrival_destinations = all + return_trip = no # One way + } + } + } + } +} + +ep3_decisions_event.4023 = { + type = character_event + title = ep3_decisions_event.4023.t + desc = ep3_decisions_event.4023.desc + theme = emperor + + trigger = { + scope:evangelizer = { is_alive = yes } + } + + left_portrait = { + character = root + animation = wedding_priest + } + right_portrait = { + character = scope:pagan + animation = thinking + } + lower_right_portrait = scope:sender + + immediate = { + scope:evangelizer = { + duel = { + skill = learning + target = scope:pagan + 50 = { # Convert + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:pagan = { + has_trait = fickle + } + add = 10 + } + modifier = { + scope:pagan = { + has_trait = craven + } + add = 10 + } + modifier = { + scope:pagan = { + has_trait = intellect_bad + } + add = 10 + } + scope:pagan = { + set_character_faith_with_conversion = scope:evangelizer.faith + create_character_memory = { + type = was_evangelized_memory + participants = { missionary = scope:evangelizer sender = scope:sender } + } + } + scope:sender = { + create_character_memory = { + type = evangelized_memory + participants = { missionary = scope:evangelizer pagan = scope:pagan } + } + } + show_as_tooltip = { + scope:pagan = { + create_alliance = { + target = scope:sender + allied_through_owner = scope:pagan + allied_through_target = scope:sender + } + } + scope:sender = { + add_opinion = { + target = scope:pagan + modifier = event_negotiated_alliance_opinion + } + } + } + scope:evangelizer = { + add_character_flag = success_conversion + } + } + 50 = { # Not convert + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:pagan = { + has_trait = theologian + } + add = 10 + } + modifier = { + scope:pagan = { + has_trait = stubborn + } + add = 10 + } + scope:pagan = { add_piety = medium_piety_gain } + scope:evangelizer = { + add_character_flag = failed_conversion + } + } + 5 = { # They _really_ don't wanna convert + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:pagan = { + has_trait = sadistic + } + add = 5 + } + modifier = { + scope:pagan = { + has_trait = callous + } + add = 5 + } + modifier = { + scope:pagan = { + has_trait = torturer + } + add = 5 + } + scope:pagan = { add_piety = major_piety_gain } + scope:evangelizer = { + death = { + death_reason = death_execution + killer = root + } + } + scope:sender = { + trigger_event = { + id = ep3_decisions_event.4026 + days = 3 + } + } + scope:pagan = { + add_character_flag = do_not_disturb_preachers + } + scope:title_to_convert = { + set_variable = do_not_disturb_preachers + } + } + } + } + } + + option = { + name = ep3_decisions_event.4023.a + } + + after = { + if = { + limit = { + scope:sender = { is_alive = yes } + scope:evangelizer = { is_alive = yes } + } + scope:evangelizer = { + start_travel_plan = { + destination = scope:sender.location + on_arrival_event = ep3_decisions_event.4024 + on_arrival_destinations = all + return_trip = no # One way + } + } + } + else_if = { + limit = { + scope:evangelizer = { is_alive = yes } + } + scope:evangelizer = { + start_travel_plan = { + destination = scope:starting_point + on_arrival_event = ep3_decisions_event.4024 + on_arrival_destinations = all + return_trip = no # One way + } + } + } + } +} + +ep3_decisions_event.4024 = { + hidden = yes + + immediate = { + if = { + limit = { + scope:sender = { is_alive = yes } + } + scope:sender = { + save_scope_as = recipient + trigger_event = { + id = ep3_decisions_event.4025 + days = 1 + } + } + } + else = { + scope:starting_point.barony.holder.top_liege = { + save_scope_as = new_sender + save_scope_as = recipient + trigger_event = { + id = ep3_decisions_event.4025 + days = 1 + } + } + } + } +} + +ep3_decisions_event.4025 = { + type = character_event + title = ep3_decisions_event.4020.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:new_sender + } + desc = ep3_decisions_event.4025.desc_new + } + desc = ep3_decisions_event.4025.desc_old + } + first_valid = { + triggered_desc = { + trigger = { + scope:evangelizer = { + has_character_flag = success_conversion + } + } + desc = ep3_decisions_event.4025.desc_success + } + desc = ep3_decisions_event.4025.desc_failure + } + } + theme = emperor + + left_portrait = { + character = scope:recipient + triggered_animation = { + trigger = { + scope:evangelizer = { has_character_flag = success_conversion } + } + animation = prayer + } + triggered_animation = { + trigger = { + scope:evangelizer = { has_character_flag = failed_conversion } + } + animation = disapproval + } + } + right_portrait = { + character = scope:evangelizer + animation = wedding_priest + } + lower_right_portrait = scope:pagan + + immediate = { + if = { + limit = { + scope:evangelizer = { + has_character_flag = success_conversion + } + } + show_as_tooltip = { + scope:pagan = { + set_character_faith_with_conversion = scope:evangelizer.faith + } + } + custom_tooltip = ep3_decisions_event.4025.a.tt + scope:pagan = { + create_alliance = { + target = scope:sender + allied_through_owner = scope:pagan + allied_through_target = scope:sender + } + } + scope:sender = { + add_opinion = { + target = scope:pagan + modifier = event_negotiated_alliance_opinion + } + } + gain_holy_legend_seed_tooltip_effect = yes + hidden_effect = { + legend_seed_great_deed_faith_effect = { + ANTAGONIST = scope:pagan + OLD_FAITH = scope:old_faith + } + } + } + } + + option = { + name = ep3_decisions_event.4025.a + trigger = { + scope:evangelizer = { + has_character_flag = success_conversion + } + } + change_influence = major_influence_gain + add_prestige = major_prestige_gain + } + + option = { + name = ep3_decisions_event.4025.b + trigger = { + scope:evangelizer = { + has_character_flag = failed_conversion + } + } + change_influence = medium_influence_gain + add_prestige = medium_prestige_gain + } +} + +ep3_decisions_event.4026 = { + type = character_event + title = ep3_decisions_event.4020.t + desc = ep3_decisions_event.4026.desc + theme = emperor + + left_portrait = { + character = root + animation = anger + } + lower_right_portrait = scope:pagan + lower_left_portrait = scope:evangelizer + + immediate = { + show_as_tooltip = { + scope:evangelizer = { + death = { + death_reason = death_execution + killer = scope:pagan + } + } + } + } + + # Option A: they will pay! + option = { + name = ep3_decisions_event.4026.a + change_influence = medium_influence_gain + add_prestige = medium_prestige_gain + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:pagan } + } + set_relation_rival = { + reason = rival_killed_religious_emissary + target = scope:pagan + } + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:pagan + modifier = hate_opinion + opinion = -50 + } + } + ai_chance = { + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } +} + +ep3_decisions_event.4030 = { + type = character_event + title = ep3_decisions_event.4030.t + desc = ep3_decisions_event.4030.desc + theme = byzantine + override_background = { reference = ep3_constantinople } + override_effect_2d = { + reference = legend_glow + } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + + immediate = { + recreate_ere_decision_effect = yes + create_character_memory = { + type = reformed_ere_memory + } + } + + option = { + name = ep3_decisions_event.4030.a + } +} + +ep3_decisions_event.4040 = { + type = character_event + title = ep3_decisions_event.4040.t + desc = ep3_decisions_event.4040.desc + theme = emperor + override_background = { reference = ep3_constantinople } + + left_portrait = { + character = root + animation = war_over_win + } + + immediate = { + show_as_tooltip = { + reinstitute_grain_dole_decision_effect = yes + } + create_character_memory = { + type = grain_dole_memory + } + } + + option = { + name = ep3_decisions_event.4040.a + } +} + +# Consolidate Rule +ep3_decisions_event.4050 = { + type = character_event + title = ep3_decisions_event.4050.t + desc = { + desc = ep3_decisions_event.4050.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:head_of_faith = { + OR = { + opinion = { + target = root + value <= -75 + } + has_relation_rival = root + } + } + } + desc = ep3_decisions_event.4050.desc.hate + } + desc = ep3_decisions_event.4050.desc.other + } + desc = ep3_decisions_event.4050.desc.outro + } + theme = emperor + override_background = { reference = temple } + + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = arrogant } + animation = disapproval + } + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = humble + has_trait = content + } + } + animation = obsequious_bow + } + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + + right_portrait = { + character = scope:head_of_faith + triggered_animation = { + trigger = { + OR = { + opinion = { + target = root + value <= -75 + } + has_relation_rival = root + } + } + animation = war_over_win + } + animation = admiration + } + + immediate = { + faith.religious_head = { + save_scope_as = head_of_faith + } + } + + option = { + name = ep3_decisions_event.4050.a + add_character_modifier = { + modifier = ep3_consolidated_rule_modifier + years = 15 + } + } + + option = { + name = ep3_decisions_event.4050.b + add_legitimacy = major_legitimacy_gain + } + + option = { + name = ep3_decisions_event.4050.c + trigger = { + scope:head_of_faith = { + OR = { + opinion = { + target = root + value <= -75 + } + has_relation_rival = root + } + } + can_add_hook = { + target = scope:head_of_faith + type = loyalty_hook + } + } + add_hook = { + type = loyalty_hook + target = scope:head_of_faith + } + } +} + + +######################################################### +### Convert to Administrative from Feudalism + +ep3_decisions_event.4060 = { + type = character_event + title = ep3_decisions_event.4060.t + desc = { + desc = ep3_decisions_event.4060.desc + first_valid = { #We talk a bit about the biggest non coverted vassal if there is one. + triggered_desc = { + trigger = { + exists = scope:obstinate_vassal + trigger_if = { + limit = { exists = scope:non_de_jure_vassal } + scope:obstinate_vassal.sub_realm_size >= scope:non_de_jure_vassal.sub_realm_size + } + trigger_if = { + limit = { exists = scope:non_state_faith_vassal } + scope:obstinate_vassal.sub_realm_size >= scope:non_state_faith_vassal.sub_realm_size + } + } + desc = ep3_decisions_event.4060.resistance.desc + } + triggered_desc = { + trigger = { + exists = scope:non_state_faith_vassal + trigger_if = { + limit = { exists = scope:non_de_jure_vassal } + scope:non_state_faith_vassal.sub_realm_size >= scope:non_de_jure_vassal.sub_realm_size + } + trigger_if = { + limit = { exists = scope:obstinate_vassal } + scope:non_state_faith_vassal.sub_realm_size >= scope:obstinate_vassal.sub_realm_size + } + } + desc = ep3_decisions_event.4060.state_faith.desc + } + triggered_desc = { + trigger = { + exists = scope:non_de_jure_vassal + trigger_if = { + limit = { exists = scope:non_state_faith_vassal } + scope:non_de_jure_vassal.sub_realm_size >= scope:non_state_faith_vassal.sub_realm_size + } + trigger_if = { + limit = { exists = scope:obstinate_vassal } + scope:non_de_jure_vassal.sub_realm_size >= scope:obstinate_vassal.sub_realm_size + } + } + desc = ep3_decisions_event.4060.de_jure.desc + } + } + desc = ep3_decisions_event.4060.outro.desc + } + theme = emperor + override_background = { reference = throne_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_right_portrait = { + character = scope:obstinate_vassal + } + lower_center_portrait = { + character = scope:non_state_faith_vassal + } + lower_left_portrait = { + character = scope:non_de_jure_vassal + } + + + immediate = { + show_as_tooltip = { + switch = { + trigger = has_government + japan_administrative_government = { change_government = japan_administrative_government } + celestial_government = { change_government = celestial_government } + meritocratic_government = { change_government = meritocratic_government } + steppe_admin_government = { change_government = steppe_admin_government } + fallback = { change_government = administrative_government } + } + if = { + limit = { + NOT = { has_character_flag = latin_emp_force_admin_flag } + top_liege = this + } + add_character_modifier = { modifier = first_admin_emperor } + } + } + hidden_effect = { + ordered_vassal = { + limit = { + NOR = { + government_has_flag = government_is_theocracy + government_has_flag = government_is_republic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_tribal + government_has_flag = government_is_administrative + } + primary_title = { + target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals + } + } + order_by = sub_realm_size + save_scope_as = non_de_jure_vassal + } + ordered_vassal = { + limit = { + NOR = { + government_has_flag = government_is_theocracy + government_has_flag = government_is_republic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_tribal + government_has_flag = government_is_administrative + primary_title = { + target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals + } + } + faith = scope:administrative_liege.faith #The future state faith + } + order_by = sub_realm_size + position = 0 + save_scope_as = non_state_faith_vassal + } + ordered_vassal = { + limit = { + NOR = { + government_has_flag = government_is_theocracy + government_has_flag = government_is_republic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_tribal + government_has_flag = government_is_administrative + primary_title = { + target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals + } + faith = scope:administrative_liege.faith #The future state faith + } + } + order_by = sub_realm_size + save_scope_as = obstinate_vassal + } + every_vassal_or_below = { + limit = { + is_ai = no + } + trigger_event = { + id = ep3_decisions_event.4065 + } + } + } + } + #Finally some Law and Order + option = { + name = ep3_decisions_event.4060.a + if = { + limit = { + OR = { + exists = scope:non_de_jure_vassal + exists = scope:obstinate_vassal + exists = scope:non_state_faith_vassal + } + } + custom_tooltip = vassal_did_not_become_administrative + } + } +} + +#Vassals get notified +ep3_decisions_event.4065 = { + type = letter_event + opening = ep3_decisions_event.4065.opening + desc = ep3_decisions_event.4065.desc + sender = { + character = scope:actor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + option = { + name = ep3_decisions_event.4065.a + trigger = { + OR = { + ep3_vassal_will_become_admin = yes + exists = scope:great_yuan_ruler + } + } + change_to_administrative_effect = yes + #Specifically for when great yuan is formed + if = { + limit = { + exists = scope:great_yuan_ruler + } + hidden_effect = { #This again only converts subvassals if they are AI - this event should also have triggered for other humans down the chain. + every_vassal = { #Everyone below also converts (could be Counts, could be Dukes) + limit = { + tgp_mongol_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (Could be Counts, could be Barons) + limit = { + tgp_mongol_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (could be Barons) + limit = { + tgp_mongol_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (could be Barons) + limit = { + tgp_mongol_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + } + } + } + } + } + } + #Firing from normal admin creation + else = { + hidden_effect = { #This again only converts subvassals if they are AI - this event should also have triggered for other humans down the chain. + every_vassal = { #Everyone below also converts (could be Counts, could be Dukes) + limit = { + ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (Could be Counts, could be Barons) + limit = { + ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (could be Barons) + limit = { + ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (could be Barons) + limit = { + ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + } + } + } + } + } + } + } + option = { + name = ep3_decisions_event.4065.b + trigger = { + ep3_vassal_will_become_admin = yes + } + scope:actor = { + add_opinion = { + modifier = annoyed_opinion + opinion = -20 + target = root + } + } + } + option = { + name = ep3_decisions_event.4065.c + trigger = { + ep3_vassal_will_become_admin = no + } + } +} + +######################################################### +### Convert to Feudalism from Administrative + +ep3_decisions_event.4070 = { + type = character_event + title = ep3_decisions_event.4070.t + desc = ep3_decisions_event.4070.desc + theme = emperor + override_background = { reference = throne_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = arrogant } + animation = personality_callous + } + triggered_animation = { + trigger = { has_trait = craven } + animation = worry + } + animation = personality_bold + } + immediate = { + show_as_tooltip = { + if = { + limit = { ep3_is_clan_inclined_trigger = yes } + change_government = clan_government + } + else = { change_government = feudal_government } + } + } + option = { + name = ep3_decisions_event.4070.a + } +} + +#Vassals get notified +ep3_decisions_event.4075 = { + type = letter_event + opening = ep3_decisions_event.4075.opening + desc = ep3_decisions_event.4070.desc + sender = { + character = scope:actor + animation = personality_rational + } + immediate = { + show_as_tooltip = { + if = { + limit = { ep3_is_clan_inclined_trigger = yes } + change_government = clan_government + } + else = { change_government = feudal_government } + } + } + #You are now a king! ... or duke. Or count? + option = { + name = ep3_decisions_event.4075.a + } +} + +################################################## +# Gather Provisions +# by Joe Parkin +# 7000-7009 +################################################## + +scripted_effect determine_provision_count_effect = { + save_scope_value_as = { + name = $NAME$_provisions_count + value = { + integer_range = { + min = 200 + max = 400 + } + multiply = { + value = 1 + add = { + value = $CHAR$.$SKILL$ + multiply = 0.01 + } + if = { + limit = { + domicile ?= { has_domicile_parameter = camp_improves_gather_provisions_decision } + } + add = 0.5 + } + } + ceiling = yes + } + } +} + +ep3_decisions_event.7000 = { + type = character_event + title = ep3_decisions_event.7000.t + desc = { + desc = ep3_decisions_event.7000.desc + first_valid = { + triggered_desc = { + trigger = { + location = { + OR = { + has_province_modifier = winter_mild_modifier + has_province_modifier = winter_normal_modifier + has_province_modifier = winter_harsh_modifier + } + } + } + desc = ep3_decisions_event.7000.winter_forage + } + triggered_desc = { + trigger = { + location = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = taiga + } + } + } + desc = ep3_decisions_event.7000.difficult_forage + } + triggered_desc = { + trigger = { + location = { + OR = { + terrain = farmlands + terrain = floodplains + terrain = wetlands + } + } + } + desc = ep3_decisions_event.7000.difficult_hunt + } + triggered_desc = { + trigger = { + location = { + OR = { + terrain = forest + terrain = hills + terrain = plains + } + } + } + desc = ep3_decisions_event.7000.good + } + desc = ep3_decisions_event.7000.fallback + } + } + theme = hunting + override_background = { reference = terrain } + left_portrait = { + character = root + animation = survey + } + right_portrait = { + character = scope:portrait + triggered_animation = { + trigger = { has_court_position = chief_forager_camp_officer } + animation = admiration + } + triggered_animation = { + trigger = { has_court_position = huntperson_camp_officer } + scripted_animation = bow_closed_blunt + } + } + lower_right_portrait = { + character = scope:huntperson + trigger = { + exists = scope:huntperson + exists = scope:portrait + scope:huntperson != scope:portrait + } + } + + immediate = { + save_scope_as = camp_owner + location = { save_scope_as = forage_province } + court_position:chief_forager_camp_officer ?= { + save_scope_as = chief_forager + save_scope_as = portrait + } + court_position:huntperson_camp_officer ?= { + save_scope_as = huntperson + if = { + limit = { NOT = { exists = scope:portrait } } + save_scope_as = portrait + } + } + determine_provision_count_effect = { NAME = learning CHAR = scope:camp_owner SKILL = learning } + determine_provision_count_effect = { NAME = prowess CHAR = scope:camp_owner SKILL = prowess } + if = { + limit = { + has_perk = golden_aplomb_perk + } + set_variable = { + name = has_golden_aplomb_perk + value = flag:yes + } + } + else = { + set_variable = { + name = has_golden_aplomb_perk + value = flag:no + } + } + } + + option = { # Forage + name = ep3_decisions_event.7000.a + flavor = ep3_decisions_event.7000.a_foraging + duel = { + skill = learning + value = decent_skill_rating + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.crit_success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.a.crit_success + left_icon = root + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_forage_base_value + multiply = 1.5 + } + } + } + } + } + 9 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.a.success + left_icon = root + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_forage_base_value + } + } + } + } + } + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.a.failure + left_icon = root + custom_tooltip = ep3_decisions_event.7000.no_provisions_tt + } + } + 2 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.crit_failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.a.failure + left_icon = root + if = { + limit = { + location = { + OR = { + has_province_modifier = winter_mild_modifier + has_province_modifier = winter_normal_modifier + has_province_modifier = winter_harsh_modifier + } + } + NOR = { + has_character_modifier = travel_mild_frostbite_modifier + has_character_modifier = travel_severe_frostbite_modifier + } + } + add_character_modifier = { + modifier = travel_mild_frostbite_modifier + years = 3 + } + } + else_if = { + limit = { + NOT = { has_trait = ill } + location = { + OR = { + terrain = floodplains + terrain = wetlands + terrain = oasis + terrain = farmlands + terrain = plains + } + } + } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + else = { + increase_wounds_effect = { REASON = wild_animal } + } + } + } + } + ai_chance = { + base = 1 + modifier = { add = learning } + } + } + + option = { # Hunt + name = ep3_decisions_event.7000.b + flavor = ep3_decisions_event.7000.b_trapping + duel = { + skill = prowess + value = decent_skill_rating + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.crit_success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.a.crit_success + left_icon = root + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_hunt_base_value + multiply = 1.5 + } + } + } + } + } + 9 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.a.success + left_icon = root + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_hunt_base_value + } + } + } + } + } + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.a.failure + left_icon = root + custom_tooltip = ep3_decisions_event.7000.no_provisions_tt + } + } + 2 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.crit_failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.a.crit_failure + left_icon = root + increase_wounds_effect = { REASON = wild_animal } + } + } + } + ai_chance = { + base = 1 + modifier = { add = prowess } + } + } + + option = { # Send Chief Forager + flavor = ep3_decisions_event.7000.a_flavor + name = { + trigger = { NOT = { exists = scope:chief_forager } } + text = ep3_decisions_event.7000.c + } + name = { + trigger = { exists = scope:chief_forager } + text = ep3_decisions_event.7000.c.named + } + trigger = { employs_court_position = chief_forager_camp_officer } + reason = have_chief_forager + show_as_unavailable = { always = yes } + scope:chief_forager ?= { + duel = { + skill = learning + value = decent_skill_rating + 2 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.c.crit_success + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.c.crit_success + left_icon = scope:chief_forager + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_forage_base_value + multiply = 1.75 + } + } + } + } + } + } + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.c.success + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.c.success + left_icon = scope:chief_forager + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_forage_base_value + multiply = 1.25 + } + } + } + } + } + } + 9 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.c.failure + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.c.failure + left_icon = scope:chief_forager + custom_tooltip = ep3_decisions_event.7000.no_provisions_tt + } + } + } + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.c.crit_failure + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.c.crit_failure + left_icon = scope:chief_forager + scope:chief_forager = { + if = { + limit = { + location = { + OR = { + has_province_modifier = winter_mild_modifier + has_province_modifier = winter_normal_modifier + has_province_modifier = winter_harsh_modifier + } + } + NOR = { + has_character_modifier = travel_mild_frostbite_modifier + has_character_modifier = travel_severe_frostbite_modifier + } + } + add_character_modifier = { + modifier = travel_mild_frostbite_modifier + years = 3 + } + } + else_if = { + limit = { + NOT = { has_trait = ill } + location = { + OR = { + terrain = floodplains + terrain = wetlands + terrain = oasis + terrain = farmlands + terrain = plains + } + } + } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + else = { + increase_wounds_effect = { REASON = wild_animal } + } + } + } + } + } + } + } + ai_chance = { + base = 1 + modifier = { + exists = court_position:chief_forager_camp_officer + add = court_position:chief_forager_camp_officer.learning + } + } + } + + option = { # Send Huntperson + flavor = ep3_decisions_event.7000.b_flavor + name = { + trigger = { NOT = { exists = scope:huntperson } } + text = ep3_decisions_event.7000.d + } + name = { + trigger = { exists = scope:huntperson } + text = ep3_decisions_event.7000.d.named + } + trigger = { employs_court_position = huntperson_camp_officer } + reason = have_huntperson + show_as_unavailable = { always = yes } + scope:huntperson ?= { + duel = { + skill = prowess + value = decent_skill_rating + 2 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.d.crit_success + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.d.crit_success + left_icon = scope:huntperson + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_hunt_base_value + multiply = 1.75 + } + } + } + } + } + } + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.d.success + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.d.success + left_icon = scope:huntperson + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_hunt_base_value + multiply = 1.25 + } + } + } + } + } + } + 9 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.d.failure + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.d.failure + left_icon = scope:huntperson + custom_tooltip = ep3_decisions_event.7000.no_provisions_tt + } + } + } + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.d.crit_failure + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.d.crit_failure + left_icon = scope:huntperson + scope:huntperson = { + increase_wounds_effect = { REASON = wild_animal } + } + } + } + } + } + } + ai_chance = { + base = 1 + modifier = { + exists = court_position:huntperson_camp_officer + add = court_position:huntperson_camp_officer.prowess + } + } + } + after = { + remove_variable = has_golden_aplomb_perk + } +} + +# Found Salon +ep3_decisions_event.4080 = { + type = character_event + title = ep3_decisions_event.4080.t + desc = { + desc = ep3_decisions_event.4080.desc.intro + first_valid = { + triggered_desc = { + trigger = { + root = character:andalusian_0003 + } + desc = ep3_decisions_event.4080.wallada + } + desc = ep3_decisions_event.4080.heir + } + desc = ep3_decisions_event.4080.desc.outro + } + theme = violet_poet + override_background = { reference = courtyard } + + left_portrait = { + character = root + animation = personality_honorable + } + + immediate = { + location = { + save_scope_as = location + } + } + + option = { + name = ep3_decisions_event.4080.a + if = { + limit = { + exists = dynasty + } + dynasty = { + add_dynasty_prestige = medium_dynasty_prestige_gain + } + } + add_prestige = major_prestige_gain + scope:location = { + add_province_modifier = { + modifier = ep3_poets_salon_modifier + years = 250 + } + } + add_character_modifier = { + modifier = ep3_founded_salon_modifier + } + } +} + +######################################################### +### Renounce Governorship + +ep3_decisions_event.4090 = { + type = character_event + title = ep3_decisions_event.4090.t + desc = ep3_decisions_event.4090.desc + theme = administrative + override_background = { reference = estate } + right_portrait = { + character = root + triggered_animation = { + trigger = { government_allows = merit } + animation = writing + } + triggered_animation = { + trigger = { has_trait_benevolent_trigger = yes } + animation = worry + } + animation = scheme + } + lower_left_portrait = scope:new_governor + + immediate = { + liege = { save_scope_as = liege } #For loc + } + + option = { + name = ep3_decisions_event.4090.a + name = { + trigger = { + government_allows = merit + } + text = ep3_decisions_event.4090.a_merit + } + + if = { + limit = { + involved_activity ?= { + has_activity_type = activity_imperial_examination + } + } + set_activity_intent = imperial_exam_taker_intent + } + + if = { + limit = { + government_allows = merit + } + add_character_modifier = { + modifier = ep3_renounced_governorship_merit + years = 15 + } + set_appointment_timeout = { + years = 3 + desc = appointment_timeout_desc_retired_governor + } + } + else = { + add_gold = massive_gold_value + add_character_modifier = { + modifier = ep3_renounced_governorship + years = 15 + } + } + force_step_down_landed_titles = yes + if = { + limit = { + tgp_is_any_minister = yes + } + liege = { save_scope_as = councillor_liege } # Needed for the effect + fired_minister_position_effect = yes + } + tgp_step_down_title_recipient_tooltip_effect = yes + } +} + +######################################################### +### Knight of the Swan + +ep3_decisions_event.5001 = { + type = character_event + title = ep3_decisions_event.5001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:adoring_fan = { is_spouse_of = root } + } + desc = ep3_decisions_event.5001.desc.spouse + } + desc = ep3_decisions_event.5001.desc.intro + } + desc = ep3_decisions_event.5001.desc + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:adoring_fan = { is_spouse_of = root } + } + animation = ecstasy + } + triggered_animation = { + trigger = { + has_trait = arrogant + } + animation = hero_flex + } + triggered_animation = { + trigger = { + has_trait = humble + } + animation = shame + } + animation = laugh + } + right_portrait = { + character = scope:adoring_fan + animation = admiration + } + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + override_effect_2d = { + reference = legend_glow + } + override_background = { reference = ce1_legendary_spring } + + immediate = { + dummy_opposite_gender_effect = { TARGET = root } + hidden_effect_new_object = { + save_scope_as = owner + set_artifact_rarity_illustrious = yes + create_artifact = { + name = artifact_knight_of_the_swan_name + description = artifact_knight_of_the_swan + type = armor_mail + visuals = armor + modifier = artifact_armor_knight_of_the_swan_artifact_modifier + wealth = 400 + quality = 400 + save_scope_as = newly_created_artifact + } + } + add_character_flag = wear_armor + if = { # If your spouse likes you we grab them + limit = { + any_spouse = { + is_available_healthy_ai_adult = yes + has_any_good_relationship_with_root_trigger = yes + } + } + random_spouse = { + limit = { + is_available_healthy_ai_adult = yes + has_any_good_relationship_with_root_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 5 + has_relation_lover = root + } + modifier = { + add = 3 + this = root.primary_spouse + } + } + save_scope_as = adoring_fan + } + } + else_if = { + limit = { + any_courtier_or_guest = { + is_available_ai_adult = yes + } + } + ordered_courtier_or_guest = { + limit = { is_available_healthy_ai_adult = yes } + order_by = sum_of_all_skills_value + save_scope_as = adoring_fan + } + } + else = { + create_character = { + location = root.location + template = ep3_common_fan_character + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + faith = root.capital_county.faith + culture = root.capital_county.culture + save_scope_as = adoring_fan + } + } + } + + option = { # Are you into protecting peasants + name = ep3_decisions_event.5001.a + add_character_modifier = { # Permanent + modifier = ep3_valiant_knight_modifier + } + + stress_impact = { + seducer = major_stress_impact_gain + rakish = major_stress_impact_gain + lustful = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = seducer + has_trait = rakish + has_trait = lustful + has_trait = craven + } + } + } + } + + option = { #...or are you into saving ladies + name = ep3_decisions_event.5001.b + custom_tooltip = ep3_courteous_knight_var_tt + add_character_modifier = { # Permanent + modifier = ep3_courteous_knight_modifier + } + + stress_impact = { + celibate = major_stress_impact_gain + chaste = medium_stress_impact_gain + just = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = celibate + has_trait = chaste + has_trait = just + has_trait = callous + } + } + } + } + + after = { + disburse_knight_errant_decision_rewards_effect = yes + trigger_event = { # We give you a Legendary Sighting - also added to the regular event triggers so if it doesn't trigger here it will eventually + id = hunt.2510 + days = { 30 90 } + } + trigger_event = { # Someone from your family may take an interest in you - also added to the laamp on_action, so if it doesn't trigger here it will eventually + id = ep3_decisions_event.5002 + days = { 30 90 } + } + } +} + +scripted_trigger ep3_decisions_event_5002_family_trigger = { + is_available_healthy_ai_adult = yes + OR = { + is_landed = yes + NOT = { is_courtier_of = root } + } + NOT = { is_spouse_of = root } + OR = { + has_relation_rival = root + has_relation_potential_rival = root + opinion = { + target = root + value <= 0 + } + } +} + +ep3_decisions_event.5002 = { + type = character_event + title = ep3_decisions_event.5002.t + desc = ep3_decisions_event.5002.desc + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = humble + has_trait = calm + } + } + animation = dismissal + } + animation = anger + } + right_portrait = { + character = scope:my_rival + animation = disapproval + } + + trigger = { + is_available = yes + is_landed = no + any_close_or_extended_family_member = { + ep3_decisions_event_5002_family_trigger = yes + } + NOT = { has_variable = had_ep3_decisions_event_5002 } + } + + immediate = { + set_variable = had_ep3_decisions_event_5002 + # We try to find someone that doesn't like you + random_close_or_extended_family_member = { + limit = { + ep3_decisions_event_5002_family_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 50 + has_relation_rival = root + } + modifier = { + add = 25 + has_relation_potential_rival = root + } + modifier = { + add = 25 + opinion = { + target = root + value <= -25 + } + } + modifier = { + add = 25 + is_landed = yes + } + } + save_scope_as = my_rival + } + } + + option = { # You got a point + name = ep3_decisions_event.5002.a + custom_tooltip = { + text = ep3_decisions_event_5002_a_tt + set_variable = ep3_grace_to_the_family_var + } + scope:my_rival = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + stress_impact = { + arrogant = major_stress_impact_gain + wrathful = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = arrogant + has_trait = wrathful + } + } + } + } + + option = { # Screw you + name = ep3_decisions_event.5002.b + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:my_rival } + } + set_relation_rival = { + target = scope:my_rival + reason = rival_called_me_a_disgrace + } + } + add_character_modifier = { + modifier = ep3_black_sheep + years = 10 + } + stress_impact = { + arrogant = major_stress_impact_loss + wrathful = major_stress_impact_loss + calm = medium_stress_impact_gain + humble = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = humble + has_trait = ambitious + } + } + } + } +} + +######################################################### +### Commission Icon Artifact +ep3_decisions_event.5000 = { + type = character_event + title = ep3_decisions_event.5000.t + desc = ep3_decisions_event.5000.desc + theme = faith + override_background = { reference = study } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:local_artisan + animation = obsequious_bow + } + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + override_effect_2d = { + reference = legend_glow + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + if = { + limit = { + scope:commission_trinket_icon = yes + } + create_artifact_trinket_icon_effect = { OWNER = root PAINTER = scope:local_artisan } + } + else_if = { + limit = { + scope:commission_court_icon_large = yes + } + create_artifact_court_icon_large_effect = { OWNER = root PAINTER = scope:local_artisan } + } + else = { + create_artifact_court_icon_small_effect = { OWNER = root PAINTER = scope:local_artisan } + } + } + + option = { # well done + name = ep3_decisions_event.5030.a + show_as_tooltip = { + scope:newly_created_artifact = { set_owner = root } + } + } +} + +### Hire Chief Eunuch +scripted_trigger mediocre_eunuch_trigger = { + has_trait = eunuch + can_be_employed_as = chief_eunuch_court_position + is_available_healthy_ai_adult = yes + diplomacy > average_skill_rating + intrigue > average_skill_rating +} + +scripted_trigger good_eunuch_trigger = { + has_trait = eunuch + can_be_employed_as = chief_eunuch_court_position + is_available_healthy_ai_adult = yes + NOR = { + is_landed = yes + has_trait = blind + } + OR = { + has_trait = education_diplomacy + has_trait = education_intrigue + } + diplomacy >= good_skill_level + intrigue >= good_skill_level +} + +ep3_decisions_event.5010 = { + type = character_event + title = ep3_decisions_event.5010.t + desc = ep3_decisions_event.5010.desc + theme = administrative + + left_portrait = { + character = scope:mediocre_eunuch + animation = happiness + } + right_portrait = { + character = scope:good_eunuch + animation = personality_honorable + } + + immediate = { + # Find a mediocre one + if = { # check for a mediocre character in the pool + limit = { + any_pool_character = { + province = root.capital_province + mediocre_eunuch_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { mediocre_eunuch_trigger = yes } + save_scope_as = mediocre_eunuch + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = 0 + age = { 16 65 } + culture = root.location.culture + faith = root.location.faith + random_traits_list = { + count = 1 + education_diplomacy_1 = {} + education_diplomacy_2 = {} + education_intrigue_1 = {} + education_intrigue_2 = {} + } + random_traits_list = { + count = 1 + eunuch_1 = {} + beardless_eunuch = {} + } + random_traits = yes + diplomacy = { + min_template_low_skill + max_template_average_skill + } + intrigue = { + min_template_low_skill + max_template_average_skill + } + save_scope_as = mediocre_eunuch + } + } + + # Find a good one + if = { # check for a GOOD character in the pool + limit = { + any_pool_character = { + province = root.capital_province + good_eunuch_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { good_eunuch_trigger = yes } + save_scope_as = good_eunuch + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = 0 + age = { 16 65 } + culture = root.culture + faith = root.faith + random_traits_list = { + count = 1 + education_diplomacy_3 = {} + education_diplomacy_4 = {} + education_intrigue_3 = {} + education_intrigue_4 = {} + } + random_traits_list = { + count = 1 + eunuch_1 = {} + beardless_eunuch = {} + } + random_traits = yes + diplomacy = { + min_template_average_skill + max_template_medium_skill + } + intrigue = { + min_template_average_skill + max_template_medium_skill + } + save_scope_as = good_eunuch + } + } + } + + option = { + name = ep3_decisions_event.5010.a + pay_treasury_or_gold = { + target = scope:mediocre_eunuch + value = low_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:mediocre_eunuch } + court_position_grant_effect = { POS = chief_eunuch CANDIDATE = scope:mediocre_eunuch EMPLOYER = root } + } + + option = { + name = ep3_decisions_event.5010.b + pay_treasury_or_gold = { + target = scope:good_eunuch + value = high_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:good_eunuch } + court_position_grant_effect = { POS = chief_eunuch CANDIDATE = scope:good_eunuch EMPLOYER = root } + } + + option = { + name = ep3_decisions_event.1000.d + } +} + +### Embrace Heresy +ep3_decisions_event.5020 = { + type = character_event + title = ep3_decisions_event.5020.t + desc = { + desc = ep3_decisions_event.5020.desc + triggered_desc = { + trigger = { + exists = scope:heresy_2 + } + desc = ep3_decisions_event.5020.desc_more + } + } + theme = faith + + left_portrait = { + character = root + animation = scheme + } + + immediate = { + top_liege ?= { + every_realm_county = { + limit = { + OR = { + faith = { + faith_is_interesting_heresy_to_state_faith_trigger = yes + } + any_neighboring_county = { + holder.top_liege ?= { + this != root.top_liege + } + faith = { + faith_is_interesting_heresy_to_state_faith_trigger = yes + } + } + } + } + every_neighboring_county = { + limit = { + holder.top_liege ?= { + this != root.top_liege + } + faith = { + faith_is_interesting_heresy_to_state_faith_trigger = yes + } + } + faith = { + add_to_list = available_heresies + } + } + if = { + limit = { + faith = { + faith_is_interesting_heresy_to_state_faith_trigger = yes + } + } + faith = { + add_to_list = available_heresies + } + } + } + } + ordered_in_list = { + list = available_heresies + order_by = num_county_followers + position = 1 + save_scope_as = heresy_1 + } + ordered_in_list = { + list = available_heresies + limit = { this != scope:heresy_1 } + order_by = num_county_followers + position = 1 + save_scope_as = heresy_2 + } + ordered_in_list = { + list = available_heresies + limit = { + this != scope:heresy_1 + this != scope:heresy_2 + } + order_by = num_county_followers + position = 1 + save_scope_as = heresy_3 + } + } + + option = { + name = ep3_decisions_event.5020.a + set_character_faith_with_conversion = scope:heresy_1 + add_heresiarch_trait_effect = yes + # Otherwise the conversion event will remove the trait + add_character_flag = converted_by_heresy_decision + scope:heresy_1 = { save_scope_as = heresy } + custom_tooltip = unlocks_demand_state_faith_decision + top_liege ?= { + every_vassal = { + limit = { + faith = scope:heresy_1 + } + root = { + if = { + limit = { + can_add_hook = { + target = prev + type = influence_hook + } + } + add_hook = { + target = prev + type = influence_hook + } + } + } + } + } + change_influence = { + value = minor_influence_gain + multiply = number_of_counties_with_heresy_1 + min = 150 + } + } + + option = { + name = ep3_decisions_event.5020.b + trigger = { + exists = scope:heresy_2 + } + set_character_faith_with_conversion = scope:heresy_2 + add_heresiarch_trait_effect = yes + # Otherwise the conversion event will remove the trait + add_character_flag = converted_by_heresy_decision + scope:heresy_2 = { save_scope_as = heresy } + custom_tooltip = unlocks_demand_state_faith_decision + top_liege ?= { + every_vassal = { + limit = { + faith = scope:heresy_2 + } + root = { + if = { + limit = { + can_add_hook = { + target = prev + type = influence_hook + } + } + add_hook = { + target = prev + type = influence_hook + } + } + } + } + } + change_influence = { + value = minor_influence_gain + multiply = number_of_counties_with_heresy_2 + min = 150 + } + } + + option = { + name = ep3_decisions_event.5020.c + trigger = { + exists = scope:heresy_3 + } + set_character_faith_with_conversion = scope:heresy_3 + add_heresiarch_trait_effect = yes + # Otherwise the conversion event will remove the trait + add_character_flag = converted_by_heresy_decision + scope:heresy_3 = { save_scope_as = heresy } + custom_tooltip = unlocks_demand_state_faith_decision + top_liege ?= { + every_vassal = { + limit = { + faith = scope:heresy_3 + } + root = { + if = { + limit = { + can_add_hook = { + target = prev + type = influence_hook + } + } + add_hook = { + target = prev + type = influence_hook + } + } + } + } + } + change_influence = { + value = minor_influence_gain + multiply = number_of_counties_with_heresy_3 + min = 150 + } + } + + option = { + name = ep3_decisions_event.5020.d + } + + after = { + if = { + limit = { + exists = scope:heresy + } + set_variable = { + name = heresy_embraced + value = scope:heresy + years = 50 + } + } + } +} + +ep3_decisions_event.5021 = { + type = character_event + title = ep3_decisions_event.5021.t + desc = ep3_decisions_event.5021.desc + theme = faith + + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:heretic + animation = scheme + } + + # Option A: change state faith + option = { + name = ep3_decisions_event.5021.a + scope:heretic = { + send_interface_message = { + type = event_generic_good + title = ep3_decisions_event.5021.a.tt + left_icon = root + root = { + primary_title = { set_state_faith = scope:heresy } + add_opinion = { + target = scope:heretic + modifier = forced_state_heresy_opinion + opinion = -50 + } + } + } + } + ai_chance = { + base = 50 + modifier = { + add = number_of_counties_with_heresy_acceptance + } + modifier = { + add = number_of_vassals_with_heresy_acceptance + } + modifier = { + add = influence_difference_value + } + modifier = { + scope:heretic.house = { is_powerful_family = yes } + add = 25 + } + modifier = { + scope:heretic.house = { is_dominant_family = yes } + add = 25 + } + modifier = { + scope:heretic = { + domicile ?= { + has_domicile_parameter = more_successful_heresies + location.county.faith = scope:heretic.faith + } + } + add = 25 + } + } + } + + # Option B: change state faith and convert + option = { + name = ep3_decisions_event.5021.b + scope:heretic = { + send_interface_message = { + type = event_generic_good + title = ep3_decisions_event.5021.a.tt + left_icon = root + root = { + primary_title = { set_state_faith = scope:heresy } + set_character_faith_with_conversion = scope:heresy + add_opinion = { + target = scope:heretic + modifier = forced_state_heresy_opinion + opinion = -50 + } + } + } + } + ai_chance = { + base = 0 + modifier = { + add = number_of_counties_with_heresy_acceptance + } + modifier = { + add = number_of_vassals_with_heresy_acceptance + } + modifier = { + add = influence_difference_value + } + modifier = { + scope:heretic.house = { is_powerful_family = yes } + add = 25 + } + modifier = { + scope:heretic.house = { is_dominant_family = yes } + add = 25 + } + modifier = { + has_trait = cynical + add = 20 + } + modifier = { + scope:heretic = { + domicile ?= { + has_domicile_parameter = more_successful_heresies + location.county.faith = scope:heretic.faith + } + } + add = 15 + } + modifier = { + has_trait = zealous + factor = 0 + } + } + } + + # Option C: just no + option = { + name = ep3_decisions_event.5021.c + scope:heretic = { + send_interface_message = { + type = event_generic_bad + title = ep3_decisions_event.5021.c.tt + left_icon = root + } + } + ai_chance = { + base = 250 + } + } +} + +### Commission Silk Regalia +ep3_decisions_event.5030 = { + type = character_event + title = ep3_decisions_event.5030.t + desc = ep3_decisions_event.5030.desc + theme = inspiration_complete + override_background = { reference = study } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:local_artisan + animation = obsequious_bow + } + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + override_effect_2d = { + reference = legend_glow + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + hidden_effect = { + set_artifact_rarity_famed = yes + create_artifact_regalia_effect = { + OWNER = root + SMITH = scope:local_artisan + } + scope:newly_created_artifact = { + set_artifact_name = silk_regalia_name + set_artifact_description = silk_regalia_description + } + } + } + + option = { # well done + name = ep3_decisions_event.5000.a + show_as_tooltip = { + scope:newly_created_artifact = { set_owner = root } + } + } +} + +######################################################### +### Separatist Uprising +ep3_decisions_event.6001 = { + type = character_event + title = ep3_decisions_event.6001.t + desc = { + desc = ep3_decisions_event.6001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:spouse + scope:spouse = { + culture = root.culture + } + } + desc = ep3_decisions_event.6001.desc.spouse_same_culture + } + triggered_desc = { + trigger = { + exists = scope:spouse + scope:spouse = { + culture != root.culture + } + } + desc = ep3_decisions_event.6001.desc.spouse_diff_culture + } + desc = ep3_decisions_event.6001.desc.no_spouse + } + desc = ep3_decisions_event.6001.desc.outro + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = callous + has_trait = ambitious + } + } + animation = scheme + } + animation = marshal_shield + } + right_portrait = { + trigger = { exists = scope:spouse } + character = scope:spouse + animation = admiration + } + lower_right_portrait = scope:liege + + immediate = { + location.county = { save_scope_as = county } + save_scope_as = laamp + location.duchy.holder.top_liege = { save_scope_as = liege } + if = { + limit = { exists = location.county.kingdom } + location.county.kingdom = { save_scope_as = kingdom_title } + } + scope:liege = { save_scope_as = target_military } + if = { + limit = { + any_spouse = { + is_available_healthy_ai_adult = yes + has_any_good_relationship_with_root_trigger = yes + } + } + random_spouse = { + limit = { + is_available_healthy_ai_adult = yes + has_any_good_relationship_with_root_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 5 + has_relation_lover = root + } + modifier = { + add = 3 + this = root.primary_spouse + } + } + save_scope_as = spouse + } + } + } + + option = { # Go to war NOW + name = ep3_decisions_event.6001.a + set_variable = separatist_uprising_decision_var + add_to_variable_list = { + name = separatist_uprising_decision_target_var + target = scope:liege + } + add_character_modifier = { + modifier = ep3_separatist_uprising + years = 15 + } + add_pressed_claim = location.duchy + spawn_army = { + name = culture_separatists + levies = { + value = 500 + multiply = { + value = scope:liege.primary_title.tier + } + } + location = root.location + origin = root.location + inheritable = no + } + spawn_army = { + name = culture_separatists + levies = { + value = 500 + multiply = { + value = scope:liege.primary_title.tier + } + } + location = root.location + origin = root.location + inheritable = no + } + spawn_army = { + name = culture_separatists + men_at_arms = { + type = handpicked_faithful + stacks = 2 + } + location = root.location + origin = root.location + inheritable = no + } + spawn_army = { + name = culture_separatists + men_at_arms = { + type = handpicked_faithful + stacks = 2 + } + location = root.location + origin = root.location + inheritable = no + } + spawn_army = { + name = culture_separatists + men_at_arms = { + type = handpicked_faithful + stacks = 2 + } + location = root.location + origin = root.location + inheritable = no + } + start_war = { + cb = claim_cb + target = location.duchy.holder.top_liege + claimant = root + target_title = location.duchy + } + stress_impact = { + calm = major_stress_impact_gain + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + root_military_strength_higher_than_military_target_value > target_military_strength_root_value + } + modifier = { + factor = 2 + OR = { + has_trait = reckless + has_trait = wrathful + has_trait = brave + } + } + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = craven + } + } + modifier = { # Asen and Peter always try to go to war with you + add = 1000 + primary_title = title:d_laamp_asen + } + } + } + + option = { # Just the claim pls + name = ep3_decisions_event.6001.b + set_variable = separatist_uprising_decision_var + add_gold = major_gold_value + add_pressed_claim = location.duchy + + stress_impact = { + celibate = major_stress_impact_gain + chaste = medium_stress_impact_gain + just = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + root_military_strength_higher_than_military_target_value < target_military_strength_root_value + } + modifier = { # Asen and Peter always try to go to war with you + factor = 0 + primary_title = title:d_laamp_asen + } + } + } + + option = { # Pacifist route + name = ep3_decisions_event.6001.c + show_as_unavailable = { always = yes } # We let you know that this route exists + trigger = { + # Friend or Lover + trigger_if = { + limit = { + OR = { + can_set_relation_potential_lover_trigger = { CHARACTER = scope:liege } + can_set_relation_lover_trigger = { CHARACTER = scope:liege } + } + } + custom_tooltip = { + text = separatist_uprising_decision_pacifist_option_friend_lover_tt + calc_true_if = { + amount >= 3 + any_spouse = { + is_lowborn = no + culture = root.location.county.culture + } + faith = root.location.county.faith + any_hooked_character = { this = scope:liege } + OR = { + has_relation_friend = scope:liege + has_relation_lover = scope:liege + } + prestige_level > scope:liege.prestige_level + } + } + } + # Only Friend + trigger_else = { + custom_tooltip = { + text = separatist_uprising_decision_pacifist_option_friend_tt + calc_true_if = { + amount >= 3 + any_spouse = { + is_lowborn = no + culture = root.location.county.culture + } + faith = root.location.county.faith + any_hooked_character = { this = scope:liege } + has_relation_friend = scope:liege + prestige_level > scope:liege.prestige_level + } + } + } + location.duchy = { + any_de_jure_county = { + this != scope:liege.capital_county + } + } + } + scope:liege = { save_scope_as = new_liege } + set_variable = separatist_uprising_decision_var + set_variable = became_landed_through_separatist_uprising_var + location.duchy = { + add_to_list = transfer_titles + # All De Jure Counties held by the liege will be moved over + every_de_jure_county = { + limit = { + holder = scope:liege + this != scope:liege.capital_county + } + add_to_list = transfer_titles + } + # If no counties can be taken from the liege, grab one from vassals + if = { + limit = { + NOT = { + any_in_list = { + list = transfer_titles + tier = tier_county + } + } + } + random_de_jure_county = { + limit = { + holder = { any_liege_or_above = { this = scope:liege } } + } + weight = { + base = 1 + modifier = { + add = 100 + NOR = { + holder.primary_title = this + holder.capital_county = this + } + } + } + add_to_list = transfer_titles + } + } + holder ?= { + if = { # Handle noble family heads you are stealing duchy from + limit = { + highest_held_title_tier = tier_duchy + any_held_title = { is_noble_family_title = yes } + any_held_title = { + count = 1 + title_tier = duchy + is_noble_family_title = no + } + } + if = { # Give titles to heir, keep noble family + limit = { primary_heir.house ?= house } + primary_heir = { save_scope_as = old_heir } + every_held_title = { + limit = { + NOR = { + is_landless_type_title = yes + is_noble_family_title = yes + } + } + add_to_list = heir_titles + } + } + else = { # Give titles to adventurer + every_held_title = { + limit = { + NOR = { + is_landless_type_title = yes + is_noble_family_title = yes + } + } + add_to_list = transfer_titles + } + } + } + } + } + if = { + limit = { + exists = scope:old_heir + any_in_list = { list = heir_titles } + } + hidden_effect = { + create_title_and_vassal_change = { + type = granted + save_scope_as = heir_change + add_claim_on_loss = no + } + every_in_list = { + list = heir_titles + limit = { tier >= tier_county } + change_title_holder_include_vassals = { + holder = scope:old_heir + change = scope:heir_change + } + } + resolve_title_and_vassal_change = scope:heir_change + } + } + ep3_become_landed_transfer_no_ennobled_modifier_effect = { + TITLE_RECEIVER = root + TITLE_LIST = transfer_titles + TYPE = granted + REASON = flag:culture_champion + } + hidden_effect = { + scope:old_heir ?= { + create_title_and_vassal_change = { + type = granted + save_scope_as = heir_change2 + add_claim_on_loss = no + } + change_liege = { + liege = root + change = scope:heir_change2 + } + resolve_title_and_vassal_change = scope:heir_change2 + } + every_courtier = { + set_variable = { + name = former_camp_leader + value = root + } + add_trait = adventurer_follower + } + } + add_pressed_claim = scope:kingdom_title + # Messages for nearby players + create_landed_ruler_message_effect = { + LANDED = root + FLAVOR_CHAR = scope:new_liege + FLAVOR_TITLE = scope:new_primary_title + REASON = flag:culture_champion + } + stress_impact = { + celibate = major_stress_impact_gain + chaste = medium_stress_impact_gain + just = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = celibate + has_trait = chaste + has_trait = just + has_trait = callous + } + } + modifier = { # Asen and Peter always try to go to war with you + factor = 0 + primary_title = title:d_laamp_asen + } + } + } + + option = { # Let me think about it + name = ep3_decisions_event.6001.d + + ai_chance = { + base = 0 + } + } +} + +# We give out the Populist Leader trait +ep3_decisions_event.6002 = { + type = character_event + title = ep3_decisions_event.6002.t + desc = ep3_decisions_event.6002.desc + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = callous + has_trait = ambitious + } + } + animation = chess_cocky + } + animation = celebrate_sword + } + lower_right_portrait = scope:defender + + option = { # Wahoo + name = ep3_decisions_event.6002.a + if = { + limit = { + has_trait = peasant_leader + } + remove_trait = peasant_leader + add_trait_force_tooltip = populist_leader + } + else = { + add_trait_force_tooltip = populist_leader + } + if = { # If you are Todor we remove your op Modifier + limit = { has_character_modifier = ep3_master_todor_modifier } + remove_character_modifier = ep3_master_todor_modifier + } + stress_impact = { + brave = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + } + ai_chance = { + base = 100 + } + } +} + + +################################################## +# Go Fish +# by Alexander Windahl +# 9001-9030 +################################################## +ep3_decisions_event.9001 = { + type = character_event + title = ep3_decisions_event.9001.t + desc = { + desc = ep3_decisions_event.9001.desc + + triggered_desc = { + trigger = { + exists = scope:potential_friend + } + desc = ep3_decisions_event.9001.friend + } + + first_valid = { + triggered_desc = { + trigger = { + location = { + #only ice-fish if water is frozen + has_province_modifier = winter_harsh_modifier + + } + } + desc = ep3_decisions_event.9001.ice_fishing + } + desc = ep3_decisions_event.9001.fishing + } + } + + theme = travel_sea + override_background = { reference = bp1_docks_tribal } + override_effect_2d = { + trigger = { + exists = scope:rain_day + } + reference = rain + } + + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:potential_friend + animation = admiration + } + + immediate = { + save_scope_as = camp_owner + location = { save_scope_as = fishing_province } + random_relation = { + type = potential_friend + limit = { + this != scope:camp_owner + is_physically_able_ai_adult = yes + location = scope:fishing_province + } + save_scope_as = potential_friend + } + random_rain_snow_chance_effect = yes + } + + option = { # Fish alone + name = ep3_decisions_event.9001.a + + stress_impact = { + reclusive = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + } + + custom_tooltip = ep3_decisions_event.9001.a.tt + + trigger_event = { id = ep3_decisions_event.9010 } + } + + option = { # Fish with your potential_friend + trigger = { + exists = scope:potential_friend + } + name = ep3_decisions_event.9001.b + + scope:potential_friend = { + add_opinion = { + target = root + modifier = happy_opinion + opinion = 10 + } + } + + ai_chance = { + base = 1 + } + + custom_tooltip = ep3_decisions_event.9001.b.tt + + trigger_event = { id = ep3_decisions_event.9020 } + } + + option = { # Rent a boat + add_character_flag = { + flag = ocean + years = 2 + } + if = { + limit = { + has_character_flag = ocean + } + } + name = ep3_decisions_event.9001.c + + trigger = { + short_term_gold >= medium_gold_value + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= 500 + } + } + remove_short_term_gold = minor_gold_value + + custom_tooltip = ep3_decisions_event.9001.c.tt + + ai_chance = { + base = 1 + } + + trigger_event = { id = ep3_decisions_event.9030 } + } +} + +ep3_decisions_event.9010 = { # Fish Alone + type = character_event + title = ep3_decisions_event.9010.t + desc = { + desc = ep3_decisions_event.9010.desc + } + + theme = travel_sea + override_background = { reference = bp1_docks_tribal } + override_effect_2d = { + trigger = { + exists = scope:rain_day + } + reference = rain + } + + left_portrait = { + character = root + animation = hunting_knife_start + } + + option = { + name = ep3_decisions_event.9010.a + + duel = { + skill = prowess + value = 22 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.nofish + left_icon = root + add_stress = minor_stress_impact_loss + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.9030.a.fish + left_icon = root + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = medium_stress_impact_loss + } + domicile = { + change_provisions = miniscule_provisions_value + } + } + } + } + ai_chance = { + base = 1 + } + } + + option = { + trigger = { + NOT = { + has_trait = wrathful + } + } + name = ep3_decisions_event.9010.b + + random_list = { + 99 = { #nothing happens + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9010.b.nothing + left_icon = root + stress_impact = { + base = medium_stress_impact_loss + calm = medium_stress_impact_loss + } + } + } + 1 = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.9010.b.trait + left_icon = root + add_trait = calm + stress_impact = { + base = medium_stress_impact_loss + calm = medium_stress_impact_loss + } + } + } + } + ai_chance = { + base = 1 + } + } +} + + +ep3_decisions_event.9020 = { # Fish With Your potential_friend + type = character_event + title = ep3_decisions_event.9020.t + desc = { + desc = ep3_decisions_event.9020.desc + } + + theme = travel_sea + override_background = { reference = bp1_docks_tribal } + override_effect_2d = { + trigger = { + exists = scope:rain_day + } + reference = rain + } + + left_portrait = { + character = root + animation = laugh + } + + right_portrait = { + character = scope:potential_friend + animation = happiness + } + + option = { #Become friends! + name = ep3_decisions_event.9020.a + + progress_towards_friend_effect = { + CHARACTER = scope:potential_friend + OPINION = yes + REASON = friend_fishing_trip + } + + random_list = { + 99 = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.nofish + left_icon = root + right_icon = scope:potential_friend + add_stress = medium_stress_impact_loss + } + } + 1 = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.fish + left_icon = root + right_icon = scope:potential_friend + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = major_stress_impact_loss + } + domicile = { + change_provisions = miniscule_provisions_value + } + } + } + } + + ai_chance = { + base = 1 + } + } + + option = { #Actually, the fish are more important + name = ep3_decisions_event.9020.b + + duel = { + skill = prowess + value = 20 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.nofish + left_icon = root + right_icon = scope:potential_friend + add_stress = medium_stress_impact_loss + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.9030.a.fish + left_icon = root + right_icon = scope:potential_friend + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = major_stress_impact_loss + } + domicile = { + change_provisions = miniscule_provisions_value + } + } + } + } + + ai_chance = { + base = 1 + } + } +} + +ep3_decisions_event.9030 = { # Fish On A Boat, your potential friend will join you + type = character_event + title = ep3_decisions_event.9030.t + desc = { + desc = ep3_decisions_event.9030.desc + + triggered_desc = { + trigger = { + exists = scope:potential_friend + } + desc = ep3_decisions_event.9030.friend + } + } + + theme = travel_sea + override_background = { reference = ocean } + override_effect_2d = { + trigger = { + exists = scope:rain_day + } + reference = rain + } + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:potential_friend + animation = personality_content + } + + option = { #You fish + name = ep3_decisions_event.9030.a + + duel = { + skill = prowess + value = 30 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.nofish + left_icon = root + right_icon = scope:potential_friend + add_stress = major_stress_impact_loss + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.9030.a.fish + left_icon = root + right_icon = scope:potential_friend + stress_impact = { + base = minor_stress_impact_loss + ambitious = major_stress_impact_loss + } + domicile = { + change_provisions = minor_provisions_value + } + } + } + } + + ai_chance = { + base = 1 + } + } + + option = { #Have your buddy fish + name = ep3_decisions_event.9030.b + trigger = { + exists = scope:potential_friend + } + + progress_towards_friend_effect = { + CHARACTER = scope:potential_friend + OPINION = yes + REASON = friend_fishing_trip + } + + random_list = { + 80 = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.nofish + left_icon = root + right_icon = scope:potential_friend + add_stress = major_stress_impact_loss + } + } + 20 = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.9030.a.fishfriend + left_icon = scope:potential_friend + add_stress = minor_stress_impact_loss + domicile = { + change_provisions = minor_provisions_value + } + } + } + } + + ai_chance = { + base = 1 + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_emperor_yearly_2.txt b/N3OW/events/dlc/ep3/ep3_emperor_yearly_2.txt new file mode 100644 index 00000000..c846c16c --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_emperor_yearly_2.txt @@ -0,0 +1,7034 @@ +namespace = ep3_emperor_yearly + +############################## +# EP3 Admin (Emperor) Events # +# by Claudia Baldassi # +# 2000 - 2999 # +############################## + +# Byzantine-only: you have reconquered an important city of the long-lost Empire + +ep3_emperor_yearly.2000 = { + type = character_event + window = fullscreen_event + title = ep3_emperor_yearly.2000.t + desc = { + desc = ep3_emperor_yearly.2000.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:county = title:c_antiocheia + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = ep3_emperor_yearly.2000.desc_antioch + } + triggered_desc = { + trigger = { + scope:county = title:c_antiocheia + } + desc = ep3_emperor_yearly.2000.desc_antioch_not_christ + } + triggered_desc = { + trigger = { + scope:county = title:c_jerusalem + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = ep3_emperor_yearly.2000.desc_jerusalem + } + triggered_desc = { + trigger = { + scope:county = title:c_jerusalem + } + desc = ep3_emperor_yearly.2000.desc_jerusalem_not_christ + } + triggered_desc = { + trigger = { + scope:county = title:c_alexandria + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = ep3_emperor_yearly.2000.desc_alexandria_not_christ + } + triggered_desc = { + trigger = { + scope:county = title:c_alexandria + } + desc = ep3_emperor_yearly.2000.desc_alexandria + } + #Maximum estent of the Roman Empire to the East (Trajan) - Abbadan + triggered_desc = { + trigger = { + scope:county = title:c_abbadan + } + desc = ep3_emperor_yearly.2000.desc_frontier + } + triggered_desc = { + trigger = { + scope:county = title:c_edessa + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = ep3_emperor_yearly.2000.desc_edessa + } + triggered_desc = { + trigger = { + scope:county = title:c_edessa + } + desc = ep3_emperor_yearly.2000.desc_edessa_not_christ + } + triggered_desc = { + trigger = { + scope:county = title:c_bari + } + desc = ep3_emperor_yearly.2000.desc_bari + } + triggered_desc = { + trigger = { + scope:county = title:c_siracusa + } + desc = ep3_emperor_yearly.2000.desc_syracuse + } + triggered_desc = { + trigger = { + scope:county = title:c_roma + } + desc = ep3_emperor_yearly.2000.desc_rome + } + triggered_desc = { + trigger = { + scope:county = title:c_ravenna + } + desc = ep3_emperor_yearly.2000.desc_ravenna + } + triggered_desc = { + trigger = { + scope:county = title:c_tunis + } + desc = ep3_emperor_yearly.2000.desc_carthago + } + triggered_desc = { + trigger = { + scope:county = title:c_tangiers + } + desc = ep3_emperor_yearly.2000.desc_tingis + } + triggered_desc = { + trigger = { + scope:county = title:c_murcia + } + desc = ep3_emperor_yearly.2000.desc_carthago_spartaria + } + triggered_desc = { + trigger = { + scope:county = title:c_lombardia + } + desc = ep3_emperor_yearly.2000.desc_milan + } + triggered_desc = { + trigger = { + scope:county = title:c_trier + } + desc = ep3_emperor_yearly.2000.desc_trier + } + triggered_desc = { + trigger = { + OR = { + scope:county = title:c_cumberland + scope:county = title:c_northumberland + } + } + desc = ep3_emperor_yearly.2000.desc_hadrians_wall + } + triggered_desc = { + trigger = { + scope:county = title:c_chandax + } + desc = ep3_emperor_yearly.2000.desc_chandax + } + triggered_desc = { + trigger = { + scope:county = title:c_tourraine + } + desc = ep3_emperor_yearly.2000.desc_tours + } + } + } + theme = war + override_background = { reference = ep3_triumph } + + trigger = { + has_ep3_dlc_trigger = yes + is_roman_emperor_trigger = yes + trigger_if = { + limit = { + scope:county = title:c_tourraine + } + NOT = { exists = var:ep3_reconquered_tourraine } + } + trigger_else_if = { + limit = { + scope:county = title:c_chandax + } + NOT = { exists = var:ep3_reconquered_chandax } + } + trigger_else_if = { + limit = { + OR = { + scope:county = title:c_cumberland + scope:county = title:c_northumberland + } + } + NOT = { exists = var:ep3_reconquered_hadrian } + } + trigger_else_if = { + limit = { + scope:county = title:c_trier + } + NOT = { exists = var:ep3_reconquered_trier } + } + trigger_else_if = { + limit = { + scope:county = title:c_lombardia + } + NOT = { exists = var:ep3_reconquered_lombardia } + } + trigger_else_if = { + limit = { + scope:county = title:c_murcia + } + NOT = { exists = var:ep3_reconquered_murcia } + } + trigger_else_if = { + limit = { + scope:county = title:c_tangiers + } + NOT = { exists = var:ep3_reconquered_tangiers } + } + trigger_else_if = { + limit = { + scope:county = title:c_tunis + } + NOT = { exists = var:ep3_reconquered_tunis } + } + trigger_else_if = { + limit = { + scope:county = title:c_ravenna + } + NOT = { exists = var:ep3_reconquered_ravenna } + } + trigger_else_if = { + limit = { + scope:county = title:c_roma + } + NOT = { exists = var:ep3_reconquered_roma } + } + trigger_else_if = { + limit = { + scope:county = title:c_siracusa + } + NOT = { exists = var:ep3_reconquered_siracusa } + } + trigger_else_if = { + limit = { + scope:county = title:c_bari + } + NOT = { exists = var:ep3_reconquered_bari } + } + trigger_else_if = { + limit = { + scope:county = title:c_edessa + } + NOT = { exists = var:ep3_reconquered_edessa } + } + trigger_else_if = { + limit = { + scope:county = title:c_abbadan + } + NOT = { exists = var:ep3_reconquered_abbadan } + } + trigger_else_if = { + limit = { + scope:county = title:c_alexandria + } + NOT = { exists = var:ep3_reconquered_alexandria } + } + trigger_else_if = { + limit = { + scope:county = title:c_jerusalem + } + NOT = { exists = var:ep3_reconquered_jerusalem } + } + trigger_else_if = { + limit = { + scope:county = title:c_antiocheia + } + NOT = { exists = var:ep3_reconquered_antiocheia } + } + trigger_else = { + always = no + } + } + + immediate = { + change_influence = massive_influence_gain + add_prestige = major_prestige_gain + } + + #Option A + option = { + name = ep3_emperor_yearly.2000.a + if = { + limit = { + OR = { + scope:county = title:c_antiocheia + scope:county = title:c_jerusalem + scope:county = title:c_alexandria + scope:county = title:c_roma + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_restored_pentarchy_seat_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_restored_pentarchy_seat_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_abbadan + scope:county = title:c_cumberland + scope:county = title:c_northumberland + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_maximum_border_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_maximum_border_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_ravenna + scope:county = title:c_tunis + scope:county = title:c_murcia + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_new_justinian_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_new_justinian_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_lombardia + scope:county = title:c_trier + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_western_tetrarch_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_western_tetrarch_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_tangiers + scope:county = title:c_tourraine + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_long_lost_province_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_long_lost_province_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_edessa + scope:county = title:c_bari + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_long_contested_province_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_long_contested_province_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_siracusa + scope:county = title:c_chandax + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_medi_gem_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_medi_gem_modifier + years = 10 + } + } + } + + after = { + if = { + limit = { + scope:county = title:c_antiocheia + } + set_global_variable = ep3_reconquered_antiocheia + } + else_if = { + limit = { + scope:county = title:c_jerusalem + } + set_global_variable = ep3_reconquered_jerusalem + } + else_if = { + limit = { + scope:county = title:c_alexandria + } + set_global_variable = ep3_reconquered_alexandria + } + else_if = { + limit = { + scope:county = title:c_abbadan + } + set_global_variable = ep3_reconquered_abbadan + } + else_if = { + limit = { + scope:county = title:c_edessa + } + set_global_variable = ep3_reconquered_edessa + } + else_if = { + limit = { + scope:county = title:c_bari + } + set_global_variable = ep3_reconquered_bari + } + else_if = { + limit = { + scope:county = title:c_siracusa + } + set_global_variable = ep3_reconquered_siracusa + } + else_if = { + limit = { + scope:county = title:c_roma + } + set_global_variable = ep3_reconquered_roma + } + else_if = { + limit = { + scope:county = title:c_ravenna + } + set_global_variable = ep3_reconquered_ravenna + } + else_if = { + limit = { + scope:county = title:c_tunis + } + set_global_variable = ep3_reconquered_tunis + } + else_if = { + limit = { + scope:county = title:c_tangiers + } + set_global_variable = ep3_reconquered_tangiers + } + else_if = { + limit = { + scope:county = title:c_murcia + } + set_global_variable = ep3_reconquered_murcia + } + else_if = { + limit = { + scope:county = title:c_lombardia + } + set_global_variable = ep3_reconquered_lombardia + } + else_if = { + limit = { + scope:county = title:c_trier + } + set_global_variable = ep3_reconquered_trier + } + else_if = { + limit = { + OR = { + scope:county = title:c_cumberland + scope:county = title:c_northumberland + } + } + set_global_variable = ep3_reconquered_hadrian + } + else_if = { + limit = { + scope:county = title:c_chandax + } + set_global_variable = ep3_reconquered_chandax + } + else_if = { + limit = { + scope:county = title:c_tourraine + } + set_global_variable = ep3_reconquered_tourraine + } + + if = { + limit = { + NOT = { + any_owned_story = { + type = ep3_story_cycle_restoring_rome + } + } + } + create_story = ep3_story_cycle_restoring_rome + } + } +} + +# Courtiers grumble about you sending an imperial prince/princess to marry abroad among barbarians + +scripted_trigger emperor_2010_valid_child_trigger = { + is_adult = yes + is_married = yes + primary_spouse.culture = { + NOT = { has_cultural_pillar = heritage_byzantine } + } + liege.culture = { + NOT = { has_cultural_pillar = heritage_byzantine } + } + location.culture = { + NOT = { has_cultural_pillar = heritage_byzantine } + } + is_travelling = no + culture = { has_cultural_pillar = heritage_byzantine } +} + +scripted_trigger emperor_2010_valid_courtier_trigger = { + is_available_healthy_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + culture = { has_cultural_pillar = heritage_byzantine } +} + +ep3_emperor_yearly.2010 = { + type = character_event + title = ep3_emperor_yearly.2010.t + desc = ep3_emperor_yearly.2010.desc + theme = emperor + left_portrait = { + character = scope:gossip_1 + animation = eyeroll + } + right_portrait = { + character = scope:gossip_2 + animation = throne_room_conversation_1 + } + lower_center_portrait = scope:sent_off + cooldown = { years = 50 } + + trigger = { + is_available_adult = yes + valid_for_byz_emperor_content_trigger = yes + any_child = { + emperor_2010_valid_child_trigger = yes + } + any_courtier = { + count >= 2 + emperor_2010_valid_courtier_trigger = yes + } + } + + immediate = { + random_child = { + limit = { + emperor_2010_valid_child_trigger = yes + } + save_scope_as = sent_off + } + random_courtier = { + limit = { + emperor_2010_valid_courtier_trigger = yes + } + save_scope_as = gossip_1 + } + random_courtier = { + limit = { + emperor_2010_valid_courtier_trigger = yes + this != scope:gossip_1 + } + save_scope_as = gossip_2 + } + scope:sent_off.primary_spouse = { save_scope_as = spouse } + } + + #Option A: it was necessary + option = { + name = ep3_emperor_yearly.2010.a + add_character_modifier = { + modifier = ep3_politics_before_all_modifier + years = 40 + } + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + stress_impact = { + arrogant = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + zealous = medium_stress_impact_gain + compassionate = major_stress_impact_gain + family_first = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = arrogant + } + modifier = { + add = -50 + has_trait = deceitful + } + modifier = { + add = 50 + has_trait = diplomat + } + modifier = { + add = 100 + has_trait = ambitious + } + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = family_first + } + } + } + + #Option B: a worthy sacrifice + option = { + name = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + text = ep3_emperor_yearly.2010.b + } + name = { + trigger = { + NOT = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + } + text = ep3_emperor_yearly.2010.b2 + } + add_character_modifier = { + modifier = ep3_everything_for_byz_modifier + years = 40 + } + add_piety = medium_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + add = 100 + } + modifier = { + has_trait = cynical + add = -50 + } + modifier = { + has_trait = humble + add = 75 + } + } + } + + #Option C: shut up + option = { + name = ep3_emperor_yearly.2010.c + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:gossip_1 + modifier = angry_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:gossip_2 + modifier = angry_opinion + opinion = -10 + } + stress_impact = { + humble = major_stress_impact_gain + } + ai_chance = { + base = 75 + modifier = { + has_trait = arrogant + add = 100 + } + } + } +} + +# Byzantine-only: The Patriarch refuses to crown you as new emperor because you have a criminal trait (e.g. kinslayer) + +ep3_emperor_yearly.2020 = { + type = character_event + title = ep3_emperor_yearly.2020.t + desc = ep3_emperor_yearly.2020.desc + theme = emperor + override_background = { reference = ep3_hagia_sophia } + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:patriarch + animation = anger + } + + trigger = { + has_ep3_dlc_trigger = yes + valid_for_byz_emperor_content_trigger = yes + exists = root.faith.religious_head + this != faith.religious_head + faith.religious_head = { + opinion = { + target = root + value <= 0 + } + location = root.location + } + has_any_criminal_trait_in_faith_trigger = { + CHARACTER = root + FAITH = root.faith + } + NOT = { has_character_flag = has_had_ep3_2020 } + } + + immediate = { + faith.religious_head = { save_scope_as = patriarch } + add_character_flag = has_had_ep3_2020 + random_character_trait = { + limit = { + save_temporary_scope_as = temp_trait + scoped_trait_is_criminal_in_faith_trigger = { TRAIT = scope:temp_trait FAITH = root.faith GENDER_CHARACTER = root } + } + save_scope_as = target_criminal_trait + } + } + + #Option A: repent + option = { + name = ep3_emperor_yearly.2020.a + flavor = ep3_emperor_yearly.2020.a.tt + change_influence = major_influence_loss + add_prestige = major_prestige_loss + custom_tooltip = ep3_emperor_yearly.2020.a.tt2 + + trigger_event = { + id = ep3_emperor_yearly.2021 + days = 366 + } + scope:patriarch = { + add_opinion = { + target = root + modifier = forgiven_opinion + } + } + + stress_impact = { + ambitious = medium_stress_impact_gain + cynical = major_stress_impact_gain + arrogant = major_stress_impact_gain + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { + has_trait = ambitious + add = -50 + } + modifier = { + has_trait = arrogant + add = -50 + } + } + } + + #Option B: ignore + option = { + name = ep3_emperor_yearly.2020.b + change_influence = major_influence_gain + add_prestige = major_prestige_gain + if = { + limit = { piety_level >= low_piety_level } + add_piety_level = -1 + } + else = { + add_piety = major_piety_loss + } + scope:patriarch = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -50 + } + } + + stress_impact = { + zealous = major_stress_impact_gain + humble = major_stress_impact_gain + arrogant = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + modifier = { + has_trait = zealous + add = -50 + } + modifier = { + has_trait = humble + add = -50 + } + } + } +} + +ep3_emperor_yearly.2021 = { + type = character_event + title = ep3_emperor_yearly.2021.t + desc = { + desc = ep3_emperor_yearly.2021.desc + first_valid = { + triggered_desc = { + trigger = { scope:patriarch = { is_alive = yes } } + desc = ep3_emperor_yearly.2021.desc_patriarch + } + desc = ep3_emperor_yearly.2021.desc_patriarch_new + } + desc = ep3_emperor_yearly.2021.desc_end + } + theme = crown + override_background = { reference = ep3_hagia_sophia } + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:patriarch_portrait + animation = wedding_priest + } + lower_right_portrait = { + trigger = { + scope:patriarch = { is_alive = no } + } + character = scope:patriarch + } + + trigger = { + exists = faith.religious_head + this != faith.religious_head + has_any_criminal_trait_in_faith_trigger = { + CHARACTER = root + FAITH = root.faith + } + } + + immediate = { + if = { + limit = { + scope:patriarch = { + is_alive = yes + faith = scope:patriarch.faith + } + } + scope:patriarch = { save_scope_as = patriarch_portrait } + } + else = { + faith.religious_head = { save_scope_as = patriarch_portrait } + } + } + + option = { + name = ep3_emperor_yearly.2021.a + add_legitimacy = minor_legitimacy_gain + remove_trait = scope:target_criminal_trait + } +} + +# The Patriarch refuses to crown a new emperor after a coup +scripted_trigger valid_clergy_gender_trigger = { + trigger_if = { + limit = { + root.faith = { has_doctrine_parameter = clergy_must_be_male } + } + is_male = yes + } + trigger_else_if = { + limit = { + root.faith = { has_doctrine_parameter = clergy_must_be_female } + } + is_male = no + } + trigger_else = { + always = yes + } + is_available_ai_adult = yes + has_education_learning_trigger = yes +} + +ep3_emperor_yearly.2030 = { + type = character_event + title = ep3_emperor_yearly.2030.t + desc = ep3_emperor_yearly.2030.desc + theme = crown + override_background = { reference = ep3_hagia_sophia } + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:patriarch + animation = anger + } + lower_center_portrait = scope:predecessor + lower_left_portrait = scope:new_patriarch + + trigger = { + exists = faith.religious_head + root != root.faith.religious_head + title:e_byzantium.previous_holder = { is_alive = yes } + faith.religious_head = { + opinion = { + target = root + value <= 0 + } + } + faith.religious_head = { + opinion = { + target = title:e_byzantium.previous_holder + value > 40 + } + } + # You have already had an event about the Patriarch complaining! + NOT = { has_character_flag = has_had_ep3_2020 } + } + + immediate = { + faith.religious_head = { save_scope_as = patriarch } + title:e_byzantium.previous_holder = { save_scope_as = predecessor } + hidden_effect = { + if = { + limit = { + any_courtier = { + valid_clergy_gender_trigger = yes + is_available_ai_adult = yes + } + } + random_courtier = { + limit = { + house = root.house + valid_clergy_gender_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + alternative_limit = { + valid_clergy_gender_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + alternative_limit = { + valid_clergy_gender_trigger = yes + } + save_scope_as = new_patriarch + add_character_flag = { + flag = need_priest_outfit + } + } + } + else_if = { + limit = { + any_pool_character = { + province = root.location + is_available_ai_adult = yes + valid_clergy_gender_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + valid_clergy_gender_trigger = yes + } + save_scope_as = new_patriarch + add_character_flag = { + flag = need_priest_outfit + } + } + } + else = { + create_character = { + template = priest_character_template + location = root.location + save_scope_as = new_patriarch + } + scope:new_patriarch = { + add_character_flag = patriarch_created + } + } + scope:new_patriarch = { + add_trait = loyal + } + } + #needed for loc + root = { save_scope_as = root_scope } + } + + # Option A: then it's time for a change! + option = { + name = ep3_emperor_yearly.2030.a + custom_tooltip = ep3_emperor_yearly.2030.a.tt + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = no + } + faith.religious_head_title = { + change_title_holder = { + holder = scope:new_patriarch + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + scope:patriarch = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -100 + } + } + scope:new_patriarch = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 60 + } + } + add_hook = { + target = scope:new_patriarch + type = favor_hook + } + every_vassal = { + vassal_stance = zealot + limit = { + this != scope:new_patriarch + } + custom = every_zealot_vassal + add_opinion = { + modifier = impious_opinion + target = root + opinion = -25 + } + } + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 20 + } + } + stress_impact = { + zealous = massive_stress_impact_gain + ambitious = minor_stress_impact_loss + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_boldness = 0.5 + } + modifier = { + has_trait = ambitious + add = 100 + } + modifier = { + has_trait = zealous + factor = 0 + } + } + } + + #Option B: I'll prove my worth + option = { + name = ep3_emperor_yearly.2030.b + add_character_modifier = { + modifier = ep3_emperor_proving_themselves_modifier + years = 15 + } + custom_tooltip = patriarch_support_2030_desc_tt + scope:predecessor = { + add_character_flag = { + flag = patriarch_support_2030 + years = 15 + } + } + stress_impact = { + humble = medium_stress_impact_gain + lazy = major_stress_impact_gain + content = major_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + after = { + if = { + limit = { + has_character_flag = has_had_ep3_2020 + } + remove_character_flag = has_had_ep3_2020 + } + if = { + limit = { + is_ai = yes + scope:new_patriarch = { + this != root.faith.religious_head + has_character_flag = patriarch_created + } + } + scope:new_patriarch = { silent_disappearance_effect = yes } + } + } +} + +# Patriarch who dislikes you protests you remarrying +ep3_emperor_yearly.2040 = { + type = character_event + title = ep3_emperor_yearly.2040.t + desc = ep3_emperor_yearly.2040.desc + theme = emperor + override_background = { reference = ep3_hagia_sophia } + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:patriarch + animation = anger + } + lower_left_portrait = scope:new_wife + + lower_right_portrait = scope:new_patriarch + + trigger = { + valid_for_byz_emperor_content_trigger = yes + faith = { + NOR = { + has_doctrine = doctrine_polygamy + has_doctrine = doctrine_concubines + } + } + exists = faith.religious_head + root != root.faith.religious_head + faith.religious_head = { + opinion = { + target = root + value <= 20 + } + } + #Only dead previous spouses: if divorce is disallowed by your faith, you can't have previous spouses who are alive; if divorce is allowed, there is no reason to nag about your previous spouses; if divorce is approved (by the HoF), it means that the previous wedding has been annuled, so there's nothing to complain about. + any_former_spouse = { + even_if_dead = yes + is_alive = no + count >= 2 + } + NOT = { has_character_flag = ep3_has_had_2040 } + } + + immediate = { + add_character_flag = ep3_has_had_2040 + faith.religious_head = { save_scope_as = patriarch } + primary_spouse = { save_scope_as = new_wife } + random_former_spouse = { + even_if_dead = yes + limit = { is_alive = no } + save_scope_as = old_wife_1 + } + random_former_spouse = { + even_if_dead = yes + limit = { + is_alive = no + this != scope:old_wife_1 + } + save_scope_as = old_wife_2 + } + hidden_effect = { + create_character = { + template = priest_character_template + location = root.location + save_scope_as = new_patriarch + } + scope:new_patriarch = { + add_trait = loyal + } + } + #needed for loc + root = { save_scope_as = root_scope } + } + + #Option A: replace him! + option = { + name = ep3_emperor_yearly.2040.a + custom_tooltip = ep3_emperor_yearly.2030.a.tt + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = no + } + faith.religious_head_title = { + change_title_holder = { + holder = scope:new_patriarch + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + add_piety = major_piety_loss + scope:patriarch = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -100 + } + } + scope:new_patriarch = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 60 + } + } + add_hook = { + target = scope:new_patriarch + type = favor_hook + } + every_vassal = { + vassal_stance = zealot + limit = { + this != scope:new_patriarch + } + custom = every_zealot_vassal + add_opinion = { + modifier = impious_opinion + target = root + opinion = -35 + } + } + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 10 + } + } + stress_impact = { + zealous = massive_stress_impact_gain + content = major_stress_impact_gain + ambitious = minor_stress_impact_loss + lustful = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_boldness = 0.5 + } + modifier = { + has_trait = ambitious + add = 100 + } + modifier = { + has_trait = lustful + add = 50 + } + modifier = { + has_trait = zealous + factor = 0 + } + } + } + + #Option B: bribe + option = { + name = ep3_emperor_yearly.2040.b + add_piety = medium_piety_loss + pay_short_term_gold = { + target = scope:patriarch + gold = major_gold_value + } + scope:patriarch = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + add_character_modifier = { + modifier = ep3_blessed_union_modifier + years = 25 + } + stress_impact = { + honest = major_stress_impact_gain + greedy = major_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = -0.5 + } + } + } + + #Option C: you try to convince him it's fine + option = { + name = ep3_emperor_yearly.2040.c + duel = { + target = scope:patriarch + skills = { diplomacy learning } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2040.c.success + send_interface_toast = { + title = ep3_emperor_yearly.2040.c.success.tt + left_icon = scope:patriarch + add_character_modifier = { + modifier = ep3_blessed_union_modifier + years = 25 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2040.c.failure + send_interface_toast = { + title = ep3_emperor_yearly.2040.c.failure.tt + left_icon = scope:patriarch + add_character_modifier = { + modifier = ep3_non_blessed_union_modifier + years = 25 + } + } + } + } + stress_impact = { + shy = major_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_energy = 1 + } + } + } +} + +# Flavor event hailing the new emperor, recounting when and if their family last held the throne +ep3_emperor_yearly.2050 = { + type = character_event + title = { + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:last_emperor + } + desc = ep3_emperor_yearly.2050.t2 + } + desc = ep3_emperor_yearly.2050.t + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:last_emperor + } + desc = ep3_emperor_yearly.2050.desc + } + desc = ep3_emperor_yearly.2050.desc_first + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill = diplomacy } + } + desc = ep3_emperor_yearly.2050.desc_diplo + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill = martial } + } + desc = ep3_emperor_yearly.2050.desc_martial + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill = stewardship } + } + desc = ep3_emperor_yearly.2050.desc_stewardship + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill = intrigue } + } + desc = ep3_emperor_yearly.2050.desc_intrigue + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill = learning } + } + desc = ep3_emperor_yearly.2050.desc_learning + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill_including_prowess = prowess } + } + desc = ep3_emperor_yearly.2050.desc_prowess + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + } + desc = ep3_emperor_yearly.2050.desc_fallback + } + desc = ep3_emperor_yearly.2050.desc_first_accomplish + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + } + desc = ep3_emperor_yearly.2050.desc_body + } + } + theme = crown + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = personality_bold + } + + lower_right_portrait = { + trigger = { exists = scope:last_emperor } + character = scope:last_emperor + } + + immediate = { + #scope:title comes from the on_action that triggers the event + scope:title = { + if = { + limit = { + any_past_holder = { + house = root.house + this != root + } + } + ordered_past_holder_reversed = { + limit = { + house = root.house + this != root + } + position = 1 + save_scope_as = last_emperor + } + } + } + } + + option = { + name = ep3_emperor_yearly.2050.a + } +} + +# Hold Court event: Councillor/court position asks you to organize a large celebration for the anniversary of the foundation of Constantinople (11 May) +scripted_trigger valid_date_foundation_constantinople_trigger = { + OR = { + AND = { + current_date > 923.5.11 + current_date <= 924.5.11 + } + AND = { + current_date > 1023.5.11 + current_date <= 1024.5.11 + } + AND = { + current_date > 1123.5.11 + current_date <= 1124.5.11 + } + AND = { + current_date > 1223.5.11 + current_date <= 1224.5.11 + } + AND = { + current_date > 1323.5.11 + current_date <= 1324.5.11 + } + AND = { + current_date > 1423.5.11 + current_date <= 1424.5.11 + } + } +} + +ep3_emperor_yearly.2060 = { + type = court_event + title = ep3_emperor_yearly.2060.t + desc = { + desc = ep3_emperor_yearly.2060.desc + triggered_desc = { + trigger = { + OR = { + valid_date_foundation_constantinople_trigger = yes + AND = { + current_date > 1323.5.11 + current_date <= 1324.5.11 + } + } + } + desc = ep3_emperor_yearly.2060.desc_century + } + } + theme = court + court_scene = { + button_position_character = scope:2060_councillor + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:2060_councillor = { + group = petitioners_group + animation = personality_honorable + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + valid_for_byz_emperor_content_trigger = yes + # You have Constantinople! + any_realm_county = { + this = title:c_byzantion + } + OR = { + cp:councillor_chancellor ?= { + has_court_event_flag = no + is_available_ai_adult = yes + } + cp:councillor_steward ?= { + has_court_event_flag = no + is_available_ai_adult = yes + } + any_court_position_holder = { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + } + + weight_multiplier = { + base = 1 + + modifier = { + capital_county = title:c_byzantion + add = 1 + } + # The foundation was in 324 - we wanna make it more likely if it's X centuries + modifier = { + valid_date_foundation_constantinople_trigger = yes + add = 4 + } + # This is the 1000 years from foundation! + modifier = { + current_date > 1323.5.11 + current_date <= 1324.5.11 + add = 5 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + if = { + limit = { + cp:councillor_chancellor ?= { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + cp:councillor_chancellor = { + save_scope_as = 2060_councillor + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + cp:councillor_steward ?= { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + cp:councillor_steward = { + save_scope_as = 2060_councillor + court_event_character_flag_effect = yes + } + } + else = { + random_court_position_holder = { + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = 2060_councillor + court_event_character_flag_effect = yes + } + } + court_event_character_flag_effect = yes + # for loc + title:b_constantinople = { + save_scope_as = queen_city + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: greatest celebration for the century or millennia + option = { + name = ep3_emperor_yearly.2060.a + trigger = { + valid_date_foundation_constantinople_trigger = yes + } + title:c_byzantion = { + add_county_modifier = { + modifier = ep3_century_celebration_county_modifier + years = 5 + } + } + add_character_flag = { + flag = constantinople_birthday_flag + years = 5 + } + custom_tooltip = constantinople_birthday_flag_tt + remove_treasury_or_gold = major_treasury_or_gold_value + stress_impact = { + greedy = medium_stress_impact_gain + paranoid = major_stress_impact_gain + arrogant = minor_stress_impact_loss + ambitious = medium_stress_impact_loss + generous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_sociability = 0.5 + } + } + } + + # Option B: celebration + option = { + name = ep3_emperor_yearly.2060.b + trigger = { + NOT = { + valid_date_foundation_constantinople_trigger = yes + } + } + title:c_byzantion = { + add_county_modifier = { + modifier = ep3_foundation_celebration_county_modifier + years = 5 + } + } + add_character_flag = { + flag = constantinople_birthday_flag + years = 5 + } + custom_tooltip = constantinople_birthday_flag_tt + remove_treasury_or_gold = major_treasury_or_gold_value + stress_impact = { + greedy = medium_stress_impact_gain + paranoid = major_stress_impact_gain + arrogant = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + generous = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_sociability = 0.5 + } + } + } + # Option C: not the right time + option = { + name = ep3_emperor_yearly.2060.c + stress_impact = { + arrogant = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } + after = { + clear_court_event_participation = yes + scope:2060_councillor = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Hold Court event: Foreigners bring exotic diplomatic gifts: what are you supposed to do with a giraffe?? +ep3_emperor_yearly.2070 = { + type = court_event + title = ep3_emperor_yearly.2070.t + desc = ep3_emperor_yearly.2070.desc + theme = court + court_scene = { + button_position_character = scope:ambassador + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:ambassador = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + lower_left_portrait = scope:ambassador_liege + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 25 } + + trigger = { + is_valid_for_east_asian_events_geo_trigger = no + has_ep3_dlc_trigger = yes + NOT = { + # You don't own any province where giraffes could reasonably be + any_realm_county = { + any_county_province = { + geographical_region = custom_sub_saharan_africa_immediate + } + } + + } + any_county_in_region = { + region = custom_sub_saharan_africa_immediate + holder = { is_ai = yes } + holder.top_liege = { is_ai = yes } + } + #Admin only + government_allows = administrative + #Admin Emperor + top_liege = this + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.2 + any_county_in_region = { + region = custom_sub_saharan_africa_immediate + faith.religion = root.faith.religion + } + } + modifier = { + add = 0.3 + any_county_in_region = { + region = custom_sub_saharan_africa_immediate + faith = root.faith + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + random_county_in_region = { + region = custom_sub_saharan_africa_immediate + limit = { + holder = { is_ai = yes } + holder.top_liege = { is_ai = yes } + faith = root.faith + } + alternative_limit = { + holder = { is_ai = yes } + holder.top_liege = { is_ai = yes } + faith.religion = root.faith.religion + } + alternative_limit = { + holder = { is_ai = yes } + holder.top_liege = { is_ai = yes } + } + save_scope_as = giraffe_county + } + scope:giraffe_county.holder.top_liege = { + save_scope_as = ambassador_liege + } + create_character = { + template = ambassador_template + location = root.location + faith = scope:giraffe_county.faith + culture = scope:giraffe_county.culture + gender_female_chance = 50 + save_scope_as = ambassador + } + court_event_character_flag_effect = yes + scope:ambassador = { + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: accept gifts + option = { + name = ep3_emperor_yearly.2070.a + add_character_modifier = { + modifier = ep3_exotic_giraffe_modifier + years = 20 + } + if = { + limit = { + scope:ambassador_liege = { + in_diplomatic_range = root + } + } + scope:ambassador_liege = { + add_opinion = { + target = root + modifier = accepted_gift_opinion + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = gregarious + add = -25 + } + modifier = { + has_trait = zealous + add = -25 + } + } + } + + #Option B: bribe the ambassador + option = { + name = ep3_emperor_yearly.2070.b + flavor = ep3_emperor_yearly.2070.b.tt + duel = { + skills = { diplomacy intrigue } + target = scope:ambassador + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:ambassador.faith.religion = root.faith.religion + add = 10 + } + modifier = { + scope:ambassador.faith = root.faith + add = 10 + } + modifier = { + OR = { + scope:ambassador_liege = { has_royal_court = no } + scope:ambassador_liege = { + court_grandeur_current_level < root.court_grandeur_current_level + } + } + add = 15 + } + modifier = { + diplomacy >= high_skill_rating + add = 10 + } + modifier = { + legitimacy_level >= scope:ambassador_liege.legitimacy_level + add = 10 + } + #Everyone is impressed by your automata etc + modifier = { + valid_for_byz_emperor_content_trigger = yes + add = 10 + } + desc = ep3_emperor_yearly.2070.b.success + send_interface_toast = { + left_icon = scope:ambassador + title = ep3_emperor_yearly.2070.b.success.tt + add_courtier = scope:ambassador + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + faith = { + faith_hostility_level = { + target = scope:ambassador.faith + value > faith_astray_level + } + } + add = 15 + } + modifier = { + diplomacy <= mediocre_skill_rating + add = 10 + } + modifier = { + scope:ambassador_liege = { + court_grandeur_current_level > root.court_grandeur_current_level + } + add = 15 + } + desc = ep3_emperor_yearly.2070.b.failure + send_interface_toast = { + left_icon = scope:ambassador + title = ep3_emperor_yearly.2070.b.failure.tt + add_courtier = scope:ambassador + pay_short_term_gold = { + target = scope:ambassador + gold = medium_gold_value + } + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = honest + add = -25 + } + modifier = { + has_trait = just + add = -25 + } + modifier = { + has_trait = paranoid + add = -25 + } + } + } + + #Option C: opt out + option = { + name = ep3_emperor_yearly.2070.c + flavor = ep3_emperor_yearly.2070.c.tt + add_treasury_or_gold = minor_treasury_or_gold_value + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + has_trait = lazy + add = 25 + } + } + } + + after = { + clear_court_event_participation = yes + if = { + limit = { + is_ai = yes + scope:ambassador = { liege != root } + } + scope:ambassador = { + silent_disappearance_effect = yes + } + } + else_if = { + limit = { + is_ai = no + scope:ambassador = { liege != root } + } + hidden_effect = { + scope:ambassador = { + move_to_pool_at = scope:ambassador_liege.capital_province + } + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Someone suggests opening a (grammar) school for the poor +ep3_emperor_yearly.2080 = { + type = court_event + title = ep3_emperor_yearly.2080.t + desc = { + desc = ep3_emperor_yearly.2080.desc + first_valid = { + triggered_desc = { + trigger = { + valid_for_byz_emperor_content_trigger = yes + } + desc = ep3_emperor_yearly.2080.desc_byz + } + desc = ep3_emperor_yearly.2080.desc_gen + } + } + theme = court + court_scene = { + button_position_character = scope:school_proposer + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:school_proposer = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 25 } + + trigger = { + has_ep3_dlc_trigger = yes + #Only admin systems tolerate education as a mean for social advancement + government_allows = administrative + #Emperor + top_liege = this + #Not ongoing in the same capital + capital_county = { + NOT = { + has_county_modifier = ep3_grammar_school_county_modifier + } + } + #Ongoing building construction in the capital + capital_county = { + any_county_province = { + has_ongoing_construction = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + valid_for_byz_emperor_content_trigger = yes + } + modifier = { + add = 1 + employs_court_position = high_almoner_court_position + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + court_event_character_flag_effect = yes + capital_county = { + save_scope_as = school_county + } + if = { + limit = { + any_court_position_holder = { + type = high_almoner_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = high_almoner_court_position + limit = { + is_available_ai_adult = yes + } + save_scope_as = school_proposer + } + } + else_if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_ai_adult = yes } + } + cp:councillor_court_chaplain = { save_scope_as = school_proposer } + } + else = { + random_courtier = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = school_proposer + } + } + scope:school_proposer = { court_event_character_flag_effect = yes } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Build the school + option = { + name = ep3_emperor_yearly.2080.a + flavor = ep3_emperor_yearly.2080.a.tt + capital_county = { + add_county_modifier = { + modifier = ep3_school_building_county_modifier + years = 5 + } + } + trigger_event = { + id = ep3_emperor_yearly.2081 + years = 5 + } + remove_treasury_or_gold = medium_treasury_or_gold_value + stress_impact = { + greedy = major_stress_impact_gain + arrogant = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_compassion = 1 + } + } + } + + # Option B: opt out + option = { + name = ep3_emperor_yearly.2080.b + stress_impact = { + compassionate = major_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_energy = -0.5 + } + } + } + + after = { + scope:school_proposer = { clear_court_event_participation = yes } + clear_court_event_participation = yes + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +ep3_emperor_yearly.2081 = { + hidden = yes + + trigger = { + scope:school_county.holder = root + } + + on_trigger_fail = { + scope:school_county.holder ?= { + trigger_event = ep3_emperor_yearly.2081 + } + } + + immediate = { + scope:school_county = { + add_county_modifier = { + modifier = ep3_grammar_school_county_modifier + years = 50 + } + } + } +} + +# Very popular mime is making offers and demands +ep3_emperor_yearly.2090 = { + type = court_event + title = ep3_emperor_yearly.2090.t + desc = ep3_emperor_yearly.2090.desc + theme = court + lower_right_portrait = scope:marshal + court_scene = { + button_position_character = scope:mime + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:mime = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + # Only Byz has famous mimes + valid_for_byz_emperor_content_trigger = yes + # Ongoing increase control task + cp:councillor_marshal ?= { + is_performing_council_task = task_increase_control + } + NOT = { employs_court_position = court_jester_court_position } + can_employ_court_position_type = court_jester_court_position + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_marshal = { + councillor_task_target ?= { + save_scope_as = control_target + } + } + if = { + limit = { + any_pool_character = { + province = root.location + has_character_flag = famous_mime + } + } + random_pool_character = { + province = root.location + limit = { + has_character_flag = famous_mime + } + save_scope_as = mime + } + } + else_if = { + limit = { + any_pool_character = { + province = root.location + culture = root.capital_county.culture + faith = { + this = root.capital_county.faith + has_dominant_ruling_gender = prev + } + diplomacy >= 14 + } + } + random_pool_character = { + province = root.location + limit = { + culture = root.capital_county.culture + faith = { + this = root.capital_county.faith + has_dominant_ruling_gender = prev + } + diplomacy >= 14 + } + save_scope_as = mime + } + hidden_effect = { + if = { + limit = { + scope:mime = { + NOT = { has_trait = shrewd } + } + } + scope:mime = { add_trait = shrewd } + } + if = { + limit = { + scope:mime = { + NOT = { has_trait = athletic } + } + } + scope:mime = { add_trait = athletic } + } + } + } + else = { + create_character = { + location = root.location + template = mime_template + save_scope_as = mime + } + } + scope:mime = { + court_event_character_flag_effect = yes + add_character_flag = famous_mime + } + cp:councillor_marshal = { + save_scope_as = marshal + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: hire to help + option = { + name = ep3_emperor_yearly.2090.a + add_courtier = scope:mime + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:mime + } + scope:mime = { + add_character_flag = famous_mime_control + } + custom_tooltip = ep3_emperor_yearly.2090.a.tt + stress_impact = { + arrogant = medium_stress_impact_gain + callous = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + # Option B: hire for yourself + option = { + name = ep3_emperor_yearly.2090.b + add_courtier = scope:mime + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:mime + } + scope:mime = { + add_character_flag = famous_mime_court + } + custom_tooltip = ep3_emperor_yearly.2090.b.tt + stress_impact = { + diligent = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + # Option C: opt out + option = { + name = ep3_emperor_yearly.2090.c + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + + after = { + scope:mime = { + clear_court_event_participation = yes + } + clear_court_event_participation = yes + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Different copies of a diplomatic treaty with a neighbor don't match. +scripted_trigger 2100_valid_neighboring_county_trigger = { + any_neighboring_county = { + holder.top_liege = root + } + save_temporary_scope_as = check_county + NOT = { + root = { + has_claim_on = scope:check_county + } + } +} + +ep3_emperor_yearly.2100 = { + type = court_event + title = ep3_emperor_yearly.2100.t + desc = ep3_emperor_yearly.2100.desc + theme = court + court_scene = { + button_position_character = scope:chancellor + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:chancellor = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + government_allows = administrative + top_liege = this + any_neighboring_top_liege_realm_owner = { + is_ai = yes + NOT = { is_at_war_with = root } + custom_tooltip = { + text = ep3_emperor_yearly.2100.angry_error_log + any_top_realm_border_county = { + 2100_valid_neighboring_county_trigger = yes + } + } + } + cp:councillor_chancellor ?= { + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + valid_for_byz_emperor_content_trigger = yes + } + modifier = { + add = 4 + cp:councillor_court_chaplain ?= { + is_performing_council_task = task_fabricate_claim + } + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_chancellor = { + save_scope_as = chancellor + court_event_character_flag_effect = yes + } + random_neighboring_top_liege_realm_owner = { + limit = { + is_ai = yes + NOT = { is_at_war_with = root } + any_top_realm_border_county = { + 2100_valid_neighboring_county_trigger = yes + } + } + random_top_realm_border_county = { + limit = { + 2100_valid_neighboring_county_trigger = yes + } + save_scope_as = contested_county + } + save_scope_as = neighbor + } + random_top_realm_border_county = { + limit = { + any_neighboring_county = { + this = scope:contested_county + } + NOT = { + scope:neighbor = { has_claim_on = prev } + } + } + save_scope_as = our_county + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: try to gain claim + option = { + name = ep3_emperor_yearly.2100.a + duel = { + skill = diplomacy + target = scope:neighbor + 60 = { #Success: get claim + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2100.a.success + send_interface_toast = { + title = ep3_emperor_yearly.2100.a.success.tt + left_icon = scope:neighbor + add_pressed_claim = scope:contested_county + } + } + 35 = { #Failure: no claim + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2100.a.failure + send_interface_toast = { + title = ep3_emperor_yearly.2100.a.failure.tt + left_icon = scope:neighbor + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + } + } + 5 = { #Crit failure: get them a claim + trigger = { + exists = scope:our_county + } + compare_modifier = { + value = scope:duel_value + multiplier = -4.5 + } + desc = ep3_emperor_yearly.2100.a.crit_fail + send_interface_toast = { + title = ep3_emperor_yearly.2100.a.crit_fail.tt + left_icon = scope:neighbor + scope:neighbor = { + add_pressed_claim = scope:our_county + } + } + } + } + stress_impact = { + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -0.5 + } + } + } + + # Option B: let's collaborate + option = { + name = ep3_emperor_yearly.2100.b + trigger = { + NOR = { + has_truce = scope:neighbor + is_allied_to = scope:neighbor + } + } + add_truce_both_ways = { + character = scope:neighbor + years = 5 + name = TRUCE_COLLABORATION + } + scope:neighbor = { + add_opinion = { + target = root + modifier = collaborative_opinion + opinion = 30 + } + } + stress_impact = { + vengeful = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = major_stress_impact_gain + ambitious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 1 + } + } + } + + # Option C: opt out + option = { + name = ep3_emperor_yearly.2100.c + add_intrigue_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } + + after = { + clear_court_event_participation = yes + scope:chancellor = { clear_court_event_participation = yes } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Merchants of a foreign culture offer their services as translators and interpreters. +ep3_emperor_yearly.2110 = { + type = court_event + title = ep3_emperor_yearly.2110.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture = scope:provincial_culture + } + desc = ep3_emperor_yearly.2110.desc_same + } + desc = ep3_emperor_yearly.2110.desc_other + } + desc = ep3_emperor_yearly.2110.desc + } + theme = court + court_scene = { + button_position_character = scope:merchant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:merchant = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + OR = { + has_ep3_dlc_trigger = yes + has_tgp_dlc_trigger = yes + } + government_allows = administrative + top_liege = this + any_realm_county = { + culture != root.capital_county.culture + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + valid_for_byz_emperor_content_trigger = yes + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + court_event_character_flag_effect = yes + root.capital_county.culture = { save_scope_as = capital_culture } + random_realm_county = { + limit = { + culture != scope:capital_culture + } + save_scope_as = provincial_county + culture = { save_scope_as = provincial_culture } + } + random_pool_character = { + province = scope:provincial_county.title_province + limit = { + stewardship >= 14 + culture = scope:provincial_culture + } + save_scope_as = merchant + } + if = { + limit = { + exists = scope:merchant + } + scope:merchant = { + hidden_effect = { + move_to_pool_at = root.location + learn_language_of_culture = scope:capital_culture + if = { + limit = { + NOT = { + has_trait = lifestyle_traveler + } + } + add_trait = lifestyle_traveler + add_random_tiered_trait_track_xp_effect = { + TRAIT = lifestyle_traveler + TRACK = travel + LEVEL_1 = yes + LEVEL_3 = no + } + add_random_tiered_trait_track_xp_effect = { + TRAIT = lifestyle_traveler + TRACK = danger + LEVEL_1 = yes + LEVEL_3 = no + } + } + } + } + } + else = { + create_character = { + location = root.location + template = good_merchant_template + culture = scope:provincial_culture + faith = scope:provincial_county.faith + save_scope_as = merchant + } + hidden_effect = { + scope:merchant = { + if = { + limit = { + NOT = { + knows_language_of_culture = scope:capital_culture + } + } + learn_language_of_culture = scope:capital_culture + } + add_character_flag = created + } + } + } + scope:merchant = { court_event_character_flag_effect = yes } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Send to local administration + option = { + name = ep3_emperor_yearly.2110.a + scope:capital_culture = { + change_cultural_acceptance = { + target = scope:provincial_culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + scope:merchant = { + hidden_effect = { + move_to_pool_at = scope:provincial_county + } + } + #Governor + scope:provincial_county.duchy.holder = { + hidden_effect = { add_courtier = scope:merchant } + } + stress_impact = { + ambitious = minor_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + modifier = { + has_trait = ambitious + add = -25 + } + } + } + + # Option B: Send to central administration + option = { + name = ep3_emperor_yearly.2110.b + scope:capital_culture = { + change_cultural_acceptance = { + target = scope:provincial_culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + add_courtier = scope:merchant + change_influence = medium_influence_gain + pay_treasury_or_gold = { + target = scope:merchant + value = minor_treasury_or_gold_value + } + stress_impact = { + lazy = medium_stress_impact_gain + greedy = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { + has_trait = lazy + add = -25 + } + } + } + + # Option C: opt out + option = { + name = ep3_emperor_yearly.2110.c + add_prestige = minor_prestige_gain + scope:merchant = { add_character_flag = unused } + stress_impact = { + gregarious = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + after = { + scope:merchant = { + clear_court_event_participation = yes + if = { + limit = { + root = { is_ai = yes } + has_character_flag = created + has_character_flag = unused + } + silent_disappearance_effect = yes + } + } + clear_court_event_participation = yes + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Your Byz spouse or child-in-law at court is accused of being arrogant and pretentious +scripted_trigger 2120_valid_byz_spouse_trigger = { + is_alive = yes + culture = { has_cultural_pillar = heritage_byzantine } + location = root.location + is_available_ai_adult = yes +} +scripted_trigger 2120_valid_non_byz_complainer_trigger = { + culture = { + NOT = { has_cultural_pillar = heritage_byzantine } + } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + is_available_ai_adult = yes + location = root.location +} + +ep3_emperor_yearly.2120 = { + type = court_event + title = ep3_emperor_yearly.2120.t + desc = ep3_emperor_yearly.2120.desc + theme = court + court_scene = { + button_position_character = scope:complainer + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:complainer = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + has_ep3_dlc_trigger = yes + # You and your capital are not Byz + NOR = { + culture = { + has_cultural_pillar = heritage_byzantine + } + capital_county.culture = { + has_cultural_pillar = heritage_byzantine + } + } + # You have a spouse or in-law at court who is Byz + OR = { + any_spouse = { + 2120_valid_byz_spouse_trigger = yes + save_temporary_scope_as = byz_char + } + any_child = { + any_spouse = { + 2120_valid_byz_spouse_trigger = yes + save_temporary_scope_as = byz_char + } + } + } + # Someone who could complain + any_courtier = { + 2120_valid_non_byz_complainer_trigger = yes + NOT = { is_close_family_of = scope:byz_char } + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + court_event_character_flag_effect = yes + random_spouse = { + limit = { + 2120_valid_byz_spouse_trigger = yes + } + save_scope_as = the_byz + } + if = { + limit = { + NOT = { exists = scope:the_byz } + } + random_child = { + limit = { + any_spouse = { + 2120_valid_byz_spouse_trigger = yes + } + } + random_spouse = { + limit = { + 2120_valid_byz_spouse_trigger = yes + } + save_scope_as = the_byz + } + } + } + random_courtier = { + limit = { + 2120_valid_non_byz_complainer_trigger = yes + NOT = { is_close_family_of = scope:the_byz } + } + save_scope_as = complainer + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: side with Byz + option = { + name = ep3_emperor_yearly.2120.a + culture = { + change_cultural_acceptance = { + target = scope:the_byz.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + scope:the_byz = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + temperate = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = -25 + } + modifier = { + has_trait = temperate + add = -25 + } + modifier = { + has_trait = content + add = -25 + } + } + } + + # Option B: side with courtier + option = { + name = ep3_emperor_yearly.2120.b + culture = { + change_cultural_acceptance = { + target = scope:the_byz.culture + value = miniscule_negative_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + add_character_modifier = { + modifier = defender_of_values_modifier + years = 15 + } + scope:the_byz = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + stress_impact = { + humble = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = ambitious + add = -25 + } + modifier = { + has_trait = fickle + add = -25 + } + } + } + + # Option C: opt out + option = { + name = ep3_emperor_yearly.2120.c + stress_impact = { + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + has_trait = diligent + add = -25 + } + } + } + + after = { + clear_court_event_participation = yes + scope:complainer = { clear_court_event_participation = yes } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +#A prisoner (house arrest) is allowed into the court to plead for freedom +ep3_emperor_yearly.2130 = { + type = court_event + title = ep3_emperor_yearly.2130.t + desc = ep3_emperor_yearly.2130.desc + theme = court + court_scene = { + button_position_character = scope:prisoner + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:prisoner = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + government_allows = administrative + top_liege = this + any_prisoner = { + is_in_prison_type = house_arrest + is_ai = yes + age >= 14 + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + court_event_character_flag_effect = yes + random_prisoner = { + limit = { + is_in_prison_type = house_arrest + is_ai = yes + age >= 14 + } + save_scope_as = prisoner + } + scope:prisoner = { court_event_character_flag_effect = yes } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Pardon + option = { + name = ep3_emperor_yearly.2130.a + scope:prisoner = { release_from_prison = yes } + consume_all_criminal_reasons_effect = { + LIEGE = root + CRIMINAL = scope:prisoner + } + if = { + limit = { + can_add_hook = { + target = scope:prisoner + type = favor_hook + } + } + add_hook = { + target = scope:prisoner + type = favor_hook + } + } + change_influence = minor_influence_gain + stress_impact = { + forgiving = major_stress_impact_loss + compassionate = major_stress_impact_loss + just = medium_stress_impact_loss + vengeful = massive_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + } + } + } + + # Option B: Require support + option = { + name = ep3_emperor_yearly.2130.b + trigger = { + scope:prisoner = { + government_allows = administrative + is_vassal_or_below_of = root + is_landed_or_landless_administrative = yes + } + } + scope:prisoner = { + release_from_prison = yes + change_influence = major_influence_loss + } + change_influence = major_influence_gain + stress_impact = { + honest = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = major_stress_impact_gain + content = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + } + } + + # Option C: work for me + option = { + name = ep3_emperor_yearly.2130.c + trigger = { + scope:prisoner = { + NOR = { + is_vassal_or_below_of = root + is_landed_or_landless_administrative = yes + is_landed = yes + } + } + } + scope:prisoner = { release_from_prison = yes } + hidden_effect = { add_courtier = scope:prisoner } + custom_tooltip = { + text = ep3_emperor_yearly.2130.c.tt + add_character_flag = ep3_2130_ex_prisoner + } + stress_impact = { + honest = major_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + # Option D: ask for troops + option = { + name = ep3_emperor_yearly.2130.d + trigger = { + scope:prisoner = { + is_landed = yes + NOT = { is_vassal_or_below_of = root } + } + } + scope:prisoner = { + release_from_prison = yes + add_character_modifier = { + modifier = ep3_mercenaries_abroad_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_mercenaries_from_abroad_modifier + years = 10 + } + stress_impact = { + craven = medium_stress_impact_gain + honest = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + # Option E: Ignore + option = { + name = ep3_emperor_yearly.2130.e + add_prestige = minor_prestige_gain + stress_impact = { + base = minor_stress_impact_gain + } + ai_chance = { + base = 75 + modifier = { + has_trait = vengeful + add = 25 + } + modifier = { + has_trait = deceitful + add = -25 + } + modifier = { + has_trait = forgiving + add = -25 + } + } + } + + after = { + clear_court_event_participation = yes + scope:prisoner = { clear_court_event_participation = yes } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Plunder the tombs of previous emperors if in debt + +ep3_emperor_yearly.2140 = { + type = character_event + title = ep3_emperor_yearly.2140.t + desc = ep3_emperor_yearly.2140.desc + theme = emperor + override_background = { reference = ep3_constantinople } + left_portrait = { + character = root + animation = personality_greedy + } + cooldown = { years = 50 } + + trigger = { + valid_for_byz_emperor_content_trigger = yes + gold < 0 + } + + weight_multiplier = { + base = 1 + modifier = { + gold < -150 + add = 1 + } + modifier = { + gold < -300 + add = 2 + } + modifier = { + factor = 0.5 + has_trait = zealous + } + } + + # Option A: Let's do it + option = { + name = ep3_emperor_yearly.2140.a + add_treasury_or_gold = major_treasury_or_gold_value + add_character_modifier = { + modifier = ep3_grave_robber_modifier + years = 20 + } + root.capital_province = { + add_province_modifier = { + modifier = ep3_imperial_tombs_violated_province_modifier + years = 10 + } + } + stress_impact = { + zealous = massive_stress_impact_gain + gregarious = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + # Option B: Not worth it + option = { + name = ep3_emperor_yearly.2140.b + add_piety = minor_piety_gain + change_influence = minor_influence_gain + stress_impact = { + greedy = massive_stress_impact_gain + diligent = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } +} + +# Governor/Emperor: You are told about a new Stylite "saint" in your area + +ep3_emperor_yearly.2150 = { + type = character_event + title = ep3_emperor_yearly.2150.t + desc = { + desc = ep3_emperor_yearly.2150.desc + first_valid = { + triggered_desc = { + trigger = { + scope:saint = { has_nickname = nick_the_stylite } + } + desc = ep3_emperor_yearly.2150.desc.stylite + } + triggered_desc = { + trigger = { + scope:saint = { has_nickname = nick_the_grazer } + } + desc = ep3_emperor_yearly.2150.desc.grazer + } + triggered_desc = { + trigger = { + scope:saint = { has_nickname = nick_the_iron_wearer } + } + desc = ep3_emperor_yearly.2150.desc.iron + } + } + desc = ep3_emperor_yearly.2150.desc.end + } + theme = administrative + left_portrait = { + character = root + animation = thinking + } + lower_right_portrait = scope:saint + cooldown = { years = 25 } + + trigger = { + OR = { + valid_for_byz_governor_content_trigger = yes + valid_for_byz_emperor_content_trigger = yes + } + any_sub_realm_county = { + faith = faith:orthodox + } + } + + weight_multiplier = { + base = 1 + #More common in early dates + modifier = { + add = 1 + current_date < 1000.1.1 + } + modifier = { + add = 1 + has_trait = zealous + } + modifier = { + add = 1 + has_trait = cynical + } + modifier = { + is_ai = yes + factor = 0.1 + } + } + + immediate = { + if = { + limit = { + capital_province.county.faith = faith:orthodox + } + capital_province = { + save_scope_as = capital + } + } + else = { + random_sub_realm_county = { + limit = { + faith = faith:orthodox + } + random_province = { + save_scope_as = capital + } + } + } + random_pool_character = { + province = root.location + limit = { + faith = faith:orthodox + can_be_clergy_due_to_gender_trigger = yes + is_available_ai_adult = yes + OR = { + has_trait = eccentric + has_trait = zealous + has_trait = saint + has_trait = lifestyle_mystic + has_nickname = nick_the_stylite + has_nickname = nick_the_grazer + has_nickname = nick_the_iron_wearer + } + learning >= 16 + } + save_scope_as = saint + } + if = { + limit = { + NOT = { exists = scope:saint } + } + create_character = { + template = stylite_saint_character + faith = faith:orthodox + culture = scope:capital.county.culture + location = root.location + save_scope_as = saint + } + } + hidden_effect = { + if = { + limit = { + scope:saint = { + NOT = { + has_trait = eccentric + } + } + } + scope:saint = { + add_trait = eccentric + } + } + scope:saint = { + add_trait = inappetetic + add_trait = wounded_1 + change_current_weight = -50 + random_list = { + # is a holy man + 50 = { + add_character_flag = real_holy_man + modifier = { + has_trait = zealous + add = 20 + } + modifier = { + has_trait = education_learning_1 + add = 5 + } + modifier = { + has_trait = education_learning_2 + add = 10 + } + modifier = { + has_trait = education_learning_3 + add = 15 + } + modifier = { + has_trait = education_learning_4 + add = 20 + } + modifier = { + has_trait = saint + add = 25 + } + modifier = { + has_trait = lifestyle_mystic + add = 15 + } + modifier = { + has_trait = honest + add = 15 + } + modifier = { + has_trait = scholar + add = 10 + } + modifier = { + has_trait = theologian + add = 10 + } + modifier = { + has_trait = chaste + add = 10 + } + modifier = { + has_trait = temperate + add = 10 + } + modifier = { + has_trait = wrathful + add = 15 + } + modifier = { + has_trait = arrogant + add = 10 + } + modifier = { + has_trait = humble + add = 10 + } + modifier = { + has_trait = arbitrary + add = 15 + } + modifier = { + has_trait = callous + add = 10 + } + modifier = { + has_trait = reclusive + add = 25 + } + } + # is a crook + 50 = { + add_character_flag = is_a_crook + modifier = { + has_trait = education_intrigue_1 + add = 5 + } + modifier = { + has_trait = education_intrigue_2 + add = 10 + } + modifier = { + has_trait = education_intrigue_3 + add = 15 + } + modifier = { + has_trait = education_intrigue_4 + add = 20 + } + modifier = { + has_trait = whole_of_body + add = 15 + } + modifier = { + has_trait = deceitful + add = 20 + } + modifier = { + has_trait = lifestyle_reveler + add = 30 + } + modifier = { + has_trait = lustful + add = 10 + } + modifier = { + has_trait = greedy + add = 10 + } + modifier = { + has_trait = patient + add = 15 + } + modifier = { + has_trait = brave + add = 15 + } + modifier = { + has_trait = paranoid + add = 10 + } + modifier = { + has_trait = compassionate + add = 15 + } + } + } + random_list = { + 33 = { + give_nickname = nick_the_stylite + } + 33 = { + give_nickname = nick_the_grazer + } + 33 = { + give_nickname = nick_the_iron_wearer + } + } + } + } + } + + #Option A: all hail the saint! + option = { + name = ep3_emperor_yearly.2150.a + flavor = ep3_emperor_yearly.2150.a.tt + pay_treasury_or_gold = { + target = scope:saint + value = minor_treasury_or_gold_value + } + if = { + limit = { + can_employ_court_position_type = cave_hermit_court_position + scope:saint = { can_be_employed_as = cave_hermit_court_position } + } + court_position_grant_effect = { + EMPLOYER = root + POS = cave_hermit + CANDIDATE = scope:saint + } + } + scope:capital.county = { + change_county_control = major_county_control_gain + } + add_piety = minor_piety_gain + stress_impact = { + cynical = major_stress_impact_gain + comfort_eater = medium_stress_impact_gain + just = minor_stress_impact_gain + greedy = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = -0.5 + } + modifier = { + treasury_or_gold < tiny_treasury_or_gold_value + factor = 0 + } + modifier = { + has_trait = cynical + factor = 0 + } + } + } + + #Option B: put him to the test + option = { + name = ep3_emperor_yearly.2150.b + duel = { + skills = { intrigue learning } + target = scope:saint + # you find the truth + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2150.b.tt.success + show_as_tooltip = { + if = { + limit = { + top_liege = this + } + change_influence = major_influence_gain + } + else = { + add_character_flag = { + flag = ep3_2150_found_truth + years = 25 + } + custom_tooltip = ep3_emperor_yearly.2150.b.tt + change_influence = minor_influence_gain + } + random_list = { + 50 = { + show_chance = no + desc = ep3_emperor_yearly.2150.b.tt.holy + scope:capital.county = { + add_county_modifier = { + modifier = land_of_holy_county_modifier + years = 25 + } + } + } + 50 = { + show_chance = no + desc = ep3_emperor_yearly.2150.b.tt.crook + scope:capital.county = { + add_county_modifier = { + modifier = no_crooks_county_modifier + years = 25 + } + } + } + } + } + hidden_effect = { + send_interface_toast = { + title = ep3_emperor_yearly.2150.b.tt.success + left_icon = scope:saint + type = event_generic_neutral + if = { + limit = { + top_liege = this + } + change_influence = major_influence_gain + } + else = { + add_character_flag = { + flag = ep3_2150_found_truth + years = 25 + } + custom_tooltip = ep3_emperor_yearly.2150.b.tt + change_influence = minor_influence_gain + } + if = { + limit = { + scope:saint = { has_character_flag = real_holy_man } + } + custom_tooltip = ep3_emperor_yearly.2150.b.tt.holy + scope:capital.county = { + add_county_modifier = { + modifier = land_of_holy_county_modifier + years = 25 + } + } + } + else = { + custom_tooltip = ep3_emperor_yearly.2150.b.tt.crook + scope:capital.county = { + add_county_modifier = { + modifier = no_crooks_county_modifier + years = 25 + } + } + } + } + } + } + # you have no idea + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2150.b.tt.failure + send_interface_toast = { + title = ep3_emperor_yearly.2150.b.tt.failure + left_icon = scope:saint + type = event_generic_neutral + custom_tooltip = ep3_emperor_yearly.2150.b.tt.continue + change_influence = minor_influence_loss + } + scope:saint = { add_character_flag = follow_up_2150 } + trigger_event = { + id = ep3_emperor_yearly.2151 + years = 3 + } + } + } + stress_impact = { + lazy = major_stress_impact_gain + arbitrary = major_stress_impact_gain + fickle = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 0.5 + } + modifier = { + has_trait = lazy + add = -75 + } + } + } + + #Option C: he's clearly a fake! + option = { + name = ep3_emperor_yearly.2150.c + scope:capital.county = { + change_county_control = minor_county_control_loss + } + if = { + limit = { + top_liege = this + } + change_influence = medium_influence_gain + } + else = { + increase_governance_effect = { VALUE = 2 } + change_influence = miniscule_influence_gain + } + stress_impact = { + zealous = major_stress_impact_gain + diligent = medium_stress_impact_gain + just = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = 0.5 + } + } + } + + after = { + if = { + limit = { + scope:saint = { + NOT = { + has_character_flag = follow_up_2150 + } + } + } + scope:saint = { + remove_character_flag = real_holy_man + remove_character_flag = is_a_crook + } + if = { + limit = { + is_ai = yes + scope:saint = { has_any_court_position = no } + } + scope:saint = { silent_disappearance_effect = yes } + } + } + } +} + +ep3_emperor_yearly.2151 = { + type = character_event + title = ep3_emperor_yearly.2150.t + desc = { + desc = ep3_emperor_yearly.2151.desc + first_valid = { + triggered_desc = { + trigger = { + scope:saint = { has_character_flag = real_holy_man } + } + desc = ep3_emperor_yearly.2151.desc_saint + } + desc = ep3_emperor_yearly.2151.desc_crook + } + } + theme = administrative + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chaplain + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_right_portrait = scope:saint + + trigger = { + scope:saint = { is_alive = yes } + OR = { + valid_for_byz_governor_content_trigger = yes + valid_for_byz_emperor_content_trigger = yes + } + any_sub_realm_county = { + faith = faith:orthodox + this = scope:capital.county + } + exists = cp:councillor_court_chaplain + } + + on_trigger_fail = { + if = { + limit = { + scope:saint = { is_alive = yes } + } + scope:saint = { + remove_character_flag = real_holy_man + remove_character_flag = is_a_crook + remove_character_flag = follow_up_2150 + } + } + } + + immediate = { + if = { + limit = { + scope:saint = { has_character_flag = real_holy_man } + } + scope:capital.county = { + add_county_modifier = { + modifier = ep3_persecuting_saints_county_modifier + years = 5 + } + } + } + else = { + scope:capital.county = { + add_county_modifier = { + modifier = ep3_conmen_among_us_county_modifier + years = 5 + } + } + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { + name = ep3_emperor_yearly.2151.a + } + + after = { + scope:saint = { + remove_character_flag = real_holy_man + remove_character_flag = is_a_crook + remove_character_flag = follow_up_2150 + } + if = { + limit = { + is_ai = yes + } + scope:saint = { silent_disappearance_effect = yes } + } + } +} + +# Governor: If you border with nomadic people, they keep moving people into your borders + +scripted_trigger ep3_2160_valid_neighbor_trigger = { + liege != root.liege + OR = { + government_has_flag = government_is_tribal + culture = { + OR = { + has_cultural_tradition = tradition_horse_lords + has_cultural_tradition = tradition_saharan_nomads + has_cultural_tradition = tradition_desert_nomads + } + } + } + is_ai = yes +} + +ep3_emperor_yearly.2160 = { + type = character_event + title = ep3_emperor_yearly.2160.t + desc = ep3_emperor_yearly.2160.desc + theme = war + left_portrait = { + character = root + animation = eyeroll + } + lower_right_portrait = scope:nomad_neighbor + cooldown = { years = 25 } + + trigger = { + valid_for_byz_governor_content_trigger = yes + any_neighboring_realm_same_rank_owner = { + ep3_2160_valid_neighbor_trigger = yes + any_sub_realm_county = { + any_neighboring_county = { + holder = root + } + } + } + } + + immediate = { + random_neighboring_realm_same_rank_owner = { + limit = { + ep3_2160_valid_neighbor_trigger = yes + } + save_scope_as = nomad_neighbor + } + scope:nomad_neighbor = { + random_sub_realm_county = { + limit = { + any_neighboring_county = { + holder = root + } + } + save_scope_as = nomad_county + } + } + scope:nomad_county = { + random_neighboring_county = { + limit = { + holder = root + } + save_scope_as = our_county + } + } + } + + # Option A: welcome them + option = { + name = ep3_emperor_yearly.2160.a + flavor = ep3_emperor_yearly.2160.a.tt + scope:our_county = { + add_county_modifier = { + modifier = ep3_settling_nomads_county_modifier + years = 25 + } + } + culture = { + change_cultural_acceptance = { + target = scope:nomad_neighbor.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + add = -100 + } + modifier = { + has_trait = callous + add = -25 + } + modifier = { + has_trait = gregarious + add = 25 + } + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + # Option B: diplomatic escalation + option = { + name = ep3_emperor_yearly.2160.b + flavor = ep3_emperor_yearly.2160.b.flavor + duel = { + skill = diplomacy + target = scope:nomad_neighbor + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2160.b.tt.success + send_interface_toast = { + title = ep3_emperor_yearly.2160.b.success + left_icon = scope:nomad_neighbor + type = event_generic_neutral + add_pressed_claim = scope:nomad_county + add_character_flag = { + flag = ep3_2160_success + years = 25 + } + custom_tooltip = ep3_emperor_yearly.2160.b.tt + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2160.b.tt.failure + send_interface_toast = { + title = ep3_emperor_yearly.2160.b.failure + left_icon = scope:nomad_neighbor + type = event_generic_neutral + scope:nomad_neighbor = { add_pressed_claim = scope:our_county } + add_character_flag = { + flag = ep3_2160_failure + years = 25 + } + custom_tooltip = ep3_emperor_yearly.2160.b.tt2 + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + shy = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } +} + +# People are hiding from you, in your low-control province, in tunnels, in fairy chimneys, and within mountains + +ep3_emperor_yearly.2170 = { + type = character_event + title = ep3_emperor_yearly.2170.t + desc = ep3_emperor_yearly.2170.desc + theme = stewardship + left_portrait = { + character = root + animation = thinking + } + cooldown = { years = 25 } + + trigger = { + OR ={ + valid_for_byz_governor_content_trigger = yes + has_tgp_dlc_trigger = yes + } + + any_sub_realm_county = { + OR = { + any_county_province = { has_building = fairy_chimneys } + AND = { + county_control <= 50 + county_has_province_with_terrain = { + terrain = mountains + terrain = hills + terrain = forest + terrain = jungle + terrain = desert_mountains + terrain = steppe + terrain = desert + } + } + } + NOR = { + has_county_modifier = ep3_tunnels_encouraged_county_modifier + has_county_modifier = ep3_population_control_county_modifier + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_sub_realm_county = { + limit = { + NOR = { + has_county_modifier = ep3_tunnels_encouraged_county_modifier + has_county_modifier = ep3_population_control_county_modifier + } + any_county_province = { has_building = fairy_chimneys } + } + save_scope_as = our_county + } + if = { + limit = { + NOT = { exists = scope:our_county } + } + ordered_sub_realm_county = { + limit = { + NOR = { + has_county_modifier = ep3_tunnels_encouraged_county_modifier + has_county_modifier = ep3_population_control_county_modifier + } + county_has_province_with_terrain = { + terrain = mountains + terrain = hills + terrain = forest + terrain = jungle + terrain = desert_mountains + terrain = steppe + terrain = desert + } + } + order_by = { + value = county_control + multiply = -1 + } + save_scope_as = our_county + } + } + } + + # Option A: encourage it as defense + option = { + name = ep3_emperor_yearly.2170.a + scope:our_county = { + add_county_modifier = { + modifier = ep3_tunnels_encouraged_county_modifier + years = 50 + } + } + change_influence = major_influence_gain + stress_impact = { + greedy = major_stress_impact_gain + paranoid = medium_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { + has_trait = paranoid + add = -75 + } + modifier = { + has_trait = greedy + factor = 0 + } + } + } + + # Option B: discourage it for taxation + option = { + name = ep3_emperor_yearly.2170.b + scope:our_county = { + add_county_modifier = { + modifier = ep3_population_control_county_modifier + years = 50 + } + } + add_character_flag = { + flag = ep3_2170_success + years = 25 + } + custom_tooltip = ep3_emperor_yearly.2160.b.tt + stress_impact = { + generous = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + +# Traveling pilgrims come to an estate - response from the estate owner + +ep3_emperor_yearly.2180 = { + type = character_event + title = ep3_emperor_yearly.2180.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + location = top_liege.capital_province + } + desc = ep3_emperor_yearly.2180.desc_capital + } + desc = ep3_emperor_yearly.2180.desc + } + first_valid = { + triggered_desc = { + trigger = { + top_liege = scope:event_host.top_liege + } + desc = ep3_emperor_yearly.2180.desc_fellow + } + desc = ep3_emperor_yearly.2180.desc_foreigner + } + } + theme = travel + left_portrait = { + character = root + animation = worry + } + lower_right_portrait = scope:event_host + cooldown = { years = 10 } + + trigger = { + is_available_travelling = yes + is_location_valid_for_travel_event_on_land = yes + involved_activity ?= { + has_activity_type = activity_pilgrimage + } + location = { + any_province_domicile = { + is_domicile_type = estate + owner ?= { + dynasty != root.dynasty + is_available = yes + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + location = { + any_province_domicile = { + is_domicile_type = estate + owner.religion = root.religion + } + } + add = 0.5 + } + modifier = { + location = { + any_province_domicile = { + is_domicile_type = estate + owner.faith = root.faith + } + } + add = 0.5 + } + } + + immediate = { + location = { + random_province_domicile = { + limit = { + is_domicile_type = estate + owner ?= { + dynasty != root.dynasty + is_available = yes + faith = root.faith + } + } + alternative_limit = { + is_domicile_type = estate + owner ?= { + dynasty != root.dynasty + is_available = yes + religion = root.religion + } + } + alternative_limit = { + is_domicile_type = estate + owner ?= { + dynasty != root.dynasty + is_available = yes + } + } + owner ?= { + save_scope_as = event_host + } + } + save_scope_as = location + } + #for the response event + root = { save_scope_as = pilgrim } + } + + # Option A: let's approach the estate + option = { + name = ep3_emperor_yearly.2180.a + flavor = ep3_emperor_yearly.2180.a.tt + current_travel_plan = { + delay_travel_plan = { + days = 7 + } + } + scope:event_host = { + trigger_event = { + id = ep3_emperor_yearly.2181 + days = 1 + } + } + stress_impact = { + shy = medium_stress_impact_gain + zealous = medium_stress_impact_gain + reclusive = major_stress_impact_gain + impatient = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + # Option B: better make hurry instead + option = { + name = ep3_emperor_yearly.2180.b + add_piety = minor_piety_gain + stress_impact = { + craven = minor_stress_impact_gain + gregarious = medium_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } +} + +ep3_emperor_yearly.2181 = { + type = character_event + title = ep3_emperor_yearly.2180.t + desc = { + desc = ep3_emperor_yearly.2181.desc + first_valid = { + triggered_desc = { + trigger = { + top_liege = scope:pilgrim.top_liege + } + desc = ep3_emperor_yearly.2181.desc_fellow + } + desc = ep3_emperor_yearly.2181.desc_foreigner + } + } + theme = stewardship + left_portrait = { + character = root + animation = chaplain + } + right_portrait = { + character = scope:pilgrim + animation = beg + } + + trigger = { + scope:pilgrim = { is_alive = yes } + } + + immediate = { + top_liege = { save_scope_as = liege } + } + + # Option A: give advice on the area + option = { + name = ep3_emperor_yearly.2181.a + flavor = ep3_emperor_yearly.2181.a_flavor + scope:pilgrim = { + send_interface_toast = { + type = event_generic_good_text + title = ep3_emperor_yearly.2181.a.tt + left_icon = root + current_travel_plan = { + add_travel_plan_modifier = { + modifier = ep3_lay_of_the_land_modifier + } + } + } + } + add_character_modifier = { + modifier = ep3_friendly_host_modifier + years = 10 + } + stress_impact = { + shy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + cynical = minor_stress_impact_gain + reclusive = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + # Option B: give guides and guards + option = { + name = ep3_emperor_yearly.2181.b + flavor = ep3_emperor_yearly.2181.b_flavor + scope:pilgrim = { + send_interface_toast = { + type = event_generic_good_text + title = ep3_emperor_yearly.2181.b.tt + left_icon = root + current_travel_plan = { + add_travel_plan_modifier = { + modifier = ep3_guides_and_guards_modifier + } + } + } + } + change_influence = minor_influence_loss + if = { + limit = { + faith = scope:pilgrim.faith + } + add_character_modifier = { + modifier = ep3_pilgrim_protector_same_modifier + years = 10 + } + } + else = { + add_character_modifier = { + modifier = ep3_pilgrim_protector_other_modifier + years = 10 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + greedy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_zeal = 0.5 + } + modifier = { + scope:pilgrim.faith = root.faith + add = 150 + } + } + } + + # Option C: this is not a hotel - opt out + option = { + name = ep3_emperor_yearly.2181.c + scope:pilgrim = { + send_interface_toast = { + type = event_generic_bad_text + title = ep3_emperor_yearly.2181.c.tt + left_icon = root + + pay_short_term_gold = { + target = root + gold = tiny_gold_value + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + ai_zeal = -1 + } + } + } +} + +# Emperor/Governor: Landowners have been hoarding grain to resell it during food shortages + +scripted_trigger ep3_2190_valid_domicile_owner_trigger = { + NOR = { + dynasty = root.dynasty + this = root + } + is_available_ai_adult = yes + opinion = { + target = root + value <= 20 + } +} + +ep3_emperor_yearly.2190 = { + type = character_event + title = ep3_emperor_yearly.2190.t + desc = ep3_emperor_yearly.2190.desc + theme = administrative + override_background = { reference = ep3_relaxing_room } + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:landowner + animation = eyeroll + } + cooldown = { years = 15 } + + trigger = { + OR = { + valid_for_byz_governor_content_trigger = yes + valid_for_byz_emperor_content_trigger = yes + } + capital_province = { + any_province_domicile = { + is_domicile_type = estate + owner ?= { + ep3_2190_valid_domicile_owner_trigger = yes + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + capital_province = { + any_province_domicile = { + is_domicile_type = estate + owner ?= { + ep3_2190_valid_domicile_owner_trigger = yes + OR = { + has_trait = greedy + has_trait = deceitful + has_trait = arbitrary + } + } + } + } + add = 2 + } + modifier = { + capital_province = { + any_province_domicile = { + is_domicile_type = estate + owner ?= { + ep3_2190_valid_domicile_owner_trigger = yes + OR = { + has_trait = generous + has_trait = humble + has_trait = honest + has_trait = just + } + } + } + } + factor = 0 + } + } + + immediate = { + capital_province = { + random_province_domicile = { + limit = { + is_domicile_type = estate + owner ?= { + ep3_2190_valid_domicile_owner_trigger = yes + } + } + owner = { + save_scope_as = landowner + } + } + save_scope_as = capital + } + liege = { save_scope_as = liege } + save_scope_as = root_scope + } + + # Option A: Make an example + option = { + name = ep3_emperor_yearly.2190.a + if = { + limit = { + top_liege = this + } + every_vassal = { + limit = { + OR = { + has_vassal_stance = courtly + has_vassal_stance = parochial + } + this != scope:landowner + } + custom = every_courtly_parochial_vassal + add_opinion = { + target = root + modifier = targeting_nobility_opinion + } + } + } + else = { + custom_tooltip = ep3_emperor_yearly.2150.b.tt + add_character_flag = { + flag = ep3_2190_honest + years = 25 + } + liege = { + every_vassal = { + limit = { + OR = { + has_vassal_stance = courtly + has_vassal_stance = parochial + } + NOR = { + this = scope:landowner + this = root + } + } + custom = every_courtly_parochial_fellow_vassal + add_opinion = { + target = root + modifier = targeting_nobility_opinion + } + } + } + } + capital_province.county = { + add_county_modifier = { + modifier = ep3_open_granary_county_modifier + years = 15 + } + } + scope:landowner = { + change_influence = medium_influence_loss + remove_short_term_gold = medium_gold_value + add_opinion = { + target = root + modifier = ruined_me_opinion + } + } + stress_impact = { + greedy = medium_stress_impact_gain + content = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_sociability = -0.5 + } + modifier = { + has_trait = brave + add = 25 + } + modifier = { + has_trait = just + add = 25 + } + modifier = { + has_trait = craven + add = -75 + } + modifier = { + scope:landowner = { + gold < medium_gold_value + } + factor = 0 + } + } + } + + # Option B: get bribed + option = { + name = ep3_emperor_yearly.2190.b + scope:landowner = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + add_opinion = { + target = root + modifier = accepted_bribe_opinion + opinion = 20 + } + } + change_influence = miniscule_influence_loss + stress_impact = { + honest = major_stress_impact_gain + just = major_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 0.5 + } + modifier = { + has_trait = honest + factor = 0 + } + modifier = { + has_trait = just + factor = 0 + } + modifier = { + has_trait = diligent + add = -50 + } + modifier = { + scope:landowner = { + gold < medium_gold_value + } + factor = 0 + } + } + } + + # Option C: wrist-slap - opt out + option = { + name = ep3_emperor_yearly.2190.c + scope:landowner = { + add_opinion = { + target = root + modifier = off_the_hook_opinion + opinion = 5 + } + } + stress_impact = { + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# A governor who doesn't like the emperor can seize the tax gold about to go to the emperor +ep3_emperor_yearly.2200 = { + type = character_event + title = ep3_emperor_yearly.2200.t + + desc = { + first_valid = { + #You have a ceremonial monarch + triggered_desc = { + trigger = { + tgp_realm_has_ceremonial_liege_trigger = yes + } + desc = ep3_emperor_yearly.2200.desc.c_monarch + } + #Not ceremonial monarch + desc = ep3_emperor_yearly.2200.desc + } + } + theme = stewardship + override_background = relaxing_room + left_portrait = { + character = root + animation = personality_greedy + } + lower_right_portrait = scope:liege + lower_left_portrait = scope:ceremonial_monarch + cooldown = { years = 10 } + + trigger = { + is_governor = yes + NOT = { is_at_war_with = liege } + OR = { + opinion = { + target = liege + value < 0 + } + has_relation_potential_rival = liege + has_relation_rival = liege + house_has_feud_relation_with_trigger = { TARGET = liege } + liege = { house_has_feud_relation_with_trigger ={ TARGET = root } } + } + } + + weight_multiplier = { + base = 1 + modifier = { + valid_for_byz_governor_content_trigger = yes + add = 1 + } + } + + immediate = { + liege = { save_scope_as = liege } + primary_title = { save_scope_as = governorship } + liege.capital_county = { save_scope_as = capital } + if = { + limit = { + tgp_realm_has_ceremonial_liege_trigger = yes + } + top_liege.primary_title.var:administrative_ui_special_title.holder = { + save_scope_as = ceremonial_monarch + } + } + } + + # Option A: why not? + option = { + name = ep3_emperor_yearly.2200.a + add_gold = major_gold_value + add_character_flag = { + flag = ep3_embezzling_governor + years = 10 + } + custom_tooltip = ep3_emperor_yearly.2160.b.tt2 + increase_governance_effect = { VALUE = -4 } + if = { + limit = { + NOT = { has_trait = disloyal } + } + random = { + chance = 35 + send_interface_toast = { + title = ep3_emperor_yearly.2200.a.tt + left_icon = root + add_trait_force_tooltip = disloyal + } + } + } + if = { + limit = { + any_scheme = { + type = depose + scheme_target_character = scope:liege + } + } + random_scheme = { + type = depose + limit = { + scheme_target_character = scope:liege + } + add_scheme_modifier = { + type = scheme_grand_ambitions_embezzling_modifier + } + } + } + stress_impact = { + honest = major_stress_impact_gain + just = major_stress_impact_gain + loyal = major_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + # Option B: never! + option = { + name = ep3_emperor_yearly.2200.b + if = { + limit = { + NOT = { has_trait = loyal } + } + random = { + chance = 35 + send_interface_toast = { + title = ep3_emperor_yearly.2200.b.tt + left_icon = root + add_trait_force_tooltip = loyal + } + } + } + stress_impact = { + deceitful = minor_stress_impact_gain + greedy = minor_stress_impact_gain + disloyal = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +# Make up a prophecy to present to the emperor to support your candidacy to a certain position +ep3_emperor_yearly.2210 = { + type = character_event + title = ep3_emperor_yearly.2210.t + desc = { + desc = ep3_emperor_yearly.2210.desc + triggered_desc = { + trigger = { + NOR = { + has_trait = zealous + has_trait = loyal + } + liege = { + OR = { + has_trait = eccentric + has_trait = zealous + has_trait = trusting + has_character_modifier = bp1_superstition_modifier + } + } + } + desc = ep3_emperor_yearly.2210.desc_believe + } + triggered_desc = { + trigger = { + faith.religion = { is_in_family = rf_abrahamic } + } + desc = ep3_emperor_yearly.2210.desc_jacob + } + } + theme = realm + override_background = { reference = estate } + left_portrait = { + character = root + animation = schadenfreude + } + cooldown = { years = 25 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + liege = { is_available_adult = yes } + # candidate to a governorship (or the empire) + any_heir_title = { + tier > tier_county + holder ?= { + government_allows = administrative + has_realm_law_flag = appointment_type_succession + } + } + is_landed = no + } + + weight_multiplier = { + base = 1 + modifier = { + has_trait = deceitful + add = 0.5 + } + modifier = { + has_trait = eccentric + add = 0.5 + } + modifier = { + has_trait = zealous + add = 0.5 + } + modifier = { + liege = { has_character_modifier = bp1_superstition_modifier } + add = 0.5 + } + modifier = { + liege = { + OR = { + has_trait = zealous + has_trait = eccentric + has_trait = trusting + } + } + add = 0.5 + } + } + + immediate = { + random_heir_title = { + limit = { + holder ?= { + government_allows = administrative + has_realm_law_flag = appointment_type_succession + } + tier > tier_county + } + save_scope_as = potential_title + } + liege = { save_scope_as = liege } + # For the responding event + root = { save_scope_as = vassal } + } + + #Option A: yes + option = { + name = ep3_emperor_yearly.2210.a + change_influence = minor_influence_loss + if = { + limit = { + scope:liege = { is_ai = no } + } + custom_tooltip = ep3_emperor_yearly.2210.a.tt + scope:liege = { + trigger_event = { + id = ep3_emperor_yearly.2211 + days = 1 + } + } + } + else = { + duel = { + skills = { intrigue learning } + target = scope:liege + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:liege = { has_trait = eccentric } + add = 20 + } + modifier = { + scope:liege = { has_trait = zealous } + add = 20 + } + modifier = { + scope:liege = { has_trait = trusting } + add = 20 + } + modifier = { + scope:liege = { has_character_modifier = bp1_superstition_modifier } + add = 30 + } + desc = ep3_emperor_yearly.2210.a.success + send_interface_toast = { + title = ep3_emperor_yearly.2210.a.success.tt + left_icon = scope:liege + scope:potential_title = { + change_appointment_investment = { + target = root + value = appointment_score_major_value + } + } + } + } + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + has_trait = honest + add = 10 + } + modifier = { + scope:liege = { has_trait = cynical } + add = 20 + } + modifier = { + scope:liege.faith = { this != root.faith } + add = 15 + } + desc = ep3_emperor_yearly.2210.a.failure + send_interface_toast = { + title = ep3_emperor_yearly.2210.a.failure.tt + left_icon = scope:liege + change_influence = minor_influence_loss + } + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + cynical = minor_stress_impact_gain + loyal = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = deceitful + add = 50 + } + modifier = { + liege = { has_trait = eccentric } + add = 75 + } + modifier = { + liege = { has_trait = zealous } + add = 75 + } + modifier = { + liege = { has_character_modifier = bp1_superstition_modifier } + add = 100 + } + } + } + + #Option B: no + option = { + name = ep3_emperor_yearly.2210.b + change_influence = miniscule_influence_gain + stress_impact = { + deceitful = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_honor = 0.5 + } + } + } +} + +ep3_emperor_yearly.2211 = { + type = character_event + title = ep3_emperor_yearly.2210.t + desc = ep3_emperor_yearly.2211.desc + theme = vassal + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:vassal + animation = debating + } + + immediate = { + } + + # Option A: super yes + option = { + name = ep3_emperor_yearly.2211.a + trigger = { + OR = { + has_trait = eccentric + has_trait = zealous + has_trait = trusting + has_character_modifier = bp1_superstition_modifier + } + } + scope:potential_title = { + change_appointment_investment = { + target = scope:vassal + value = appointment_score_major_value + } + } + add_piety = minor_piety_gain + stress_impact = { + base = massive_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = eccentric + add = 50 + } + modifier = { + has_trait = zealous + add = 50 + } + modifier = { + has_trait = trusting + add = 50 + } + modifier = { + has_character_modifier = bp1_superstition_modifier + add = 50 + } + } + } + + # Option B: yes + option = { + name = ep3_emperor_yearly.2211.b + trigger = { + NOR = { + has_trait = eccentric + has_trait = zealous + has_character_modifier = bp1_superstition_modifier + } + } + scope:potential_title = { + change_appointment_investment = { + target = scope:vassal + value = appointment_score_medium_value + } + } + if = { + limit = { + can_add_hook = { + target = scope:vassal + type = favor_hook + } + } + add_hook = { + target = scope:vassal + type = favor_hook + } + } + else = { + change_influence = minor_influence_gain + } + stress_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_rationality = -0.5 + } + } + } + + # Option D: super no + option = { + name = ep3_emperor_yearly.2211.d + trigger = { + OR = { + has_trait = cynical + has_trait = callous + has_trait = sadistic + faith != scope:vassal.faith + } + } + add_character_modifier = { + modifier = ep3_unbeliever_in_signs_modifier + years = 25 + } + scope:vassal = { + change_influence = major_influence_loss + } + stress_impact = { + zealous = major_stress_impact_gain + } + ai_chance = { + base = 150 + modifier = { + has_trait = cynical + add = 50 + } + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = sadistic + add = 50 + } + modifier = { + faith != scope:vassal.faith + add = 50 + } + } + } + + # Option C: no + option = { + name = ep3_emperor_yearly.2211.c + scope:vassal = { + change_influence = minor_influence_loss + } + change_influence = minor_influence_gain + ai_chance = { + base = 100 + } + } +} + +# Shepherds moved close to a monastery with wives and children + +scripted_trigger ep3_2220_valid_county_trigger = { + faith = { has_doctrine = tenet_monasticism } + any_county_province = { + OR = { + has_holding_type = church_holding + ep3_2220_famous_monastery_trigger = yes + } + } + any_county_province = { + NOR = { + has_holding_type = church_holding + ep3_2220_famous_monastery_trigger = yes + } + OR = { + has_building_or_higher = hill_farms_01 + has_building_or_higher = pastures_01 + has_building_or_higher = farm_estates_01 + } + } +} + +scripted_trigger ep3_2220_famous_monastery_trigger = { + OR = { + this = province:678 #Sumela + this = province:3796 #Meteora + this = province:3776 #Mt.Athos + this = province:6032 #St.Catherine + this = province:5764 #Jvari + this = province:3729 #Hosios Loukas + } +} + +ep3_emperor_yearly.2220 = { + type = character_event + title = ep3_emperor_yearly.2220.t + desc = ep3_emperor_yearly.2220.desc + theme = vassal + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chaplain + animation = throne_room_messenger_3 + } + cooldown = { years = 20 } + + trigger = { + valid_for_byz_governor_content_trigger = yes + any_sub_realm_county = { + ep3_2220_valid_county_trigger = yes + } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_sub_realm_county = { + ep3_2220_valid_county_trigger = yes + any_county_province = { + ep3_2220_famous_monastery_trigger = yes + } + } + add = 2 + } + } + + immediate = { + random_sub_realm_county = { + limit = { + ep3_2220_valid_county_trigger = yes + any_county_province = { + ep3_2220_famous_monastery_trigger = yes + } + } + alternative_limit = { + ep3_2220_valid_county_trigger = yes + } + random_county_province = { + limit = { + ep3_2220_famous_monastery_trigger = yes + } + alternative_limit = { + has_holding_type = church_holding + OR = { + has_building_or_higher = scriptorium_01 + has_building_or_higher = monastic_schools_01 + } + } + alternative_limit = { + has_holding_type = church_holding + } + save_scope_as = monastery + } + random_county_province = { + limit = { + NOR = { + has_holding_type = church_holding + ep3_2220_famous_monastery_trigger = yes + } + OR = { + has_building_or_higher = hill_farms_01 + has_building_or_higher = pastures_01 + has_building_or_higher = farm_estates_01 + } + } + save_scope_as = shepherd_province + } + save_scope_as = interested_county + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + # Option A: Shepherds' side + option = { + name = ep3_emperor_yearly.2220.a + scope:interested_county = { + add_county_modifier = { + modifier = ep3_roaming_shepherds_county_modifier + years = 20 + } + } + add_prestige = medium_prestige_gain + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + } + } + } + + # Option B: Monks' side + option = { + name = ep3_emperor_yearly.2220.b + scope:interested_county = { + add_county_modifier = { + modifier = ep3_monastic_quiet_county_modifier + years = 20 + } + } + change_influence = minor_influence_gain + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } + + # Option C: it's their problem + option = { + name = ep3_emperor_yearly.2220.c + change_influence = miniscule_influence_loss + stress_impact = { + base = minor_stress_impact_loss + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + has_trait = diligent + add = -40 + } + } + } +} + +# Public sentiment turns against foreign merchants and riots break out in their section of the city + +ep3_emperor_yearly.2230 = { + type = character_event + title = ep3_emperor_yearly.2230.t + desc = ep3_emperor_yearly.2230.desc + theme = administrative + left_portrait = { + character = root + animation = worry + } + cooldown = { years = 35 } + + trigger = { + OR = { + AND = { + is_governor = yes + government_has_flag = government_is_administrative + } + valid_for_byz_governor_content_trigger = yes + valid_for_byz_emperor_content_trigger = yes + } + capital_county = { county_control <= 75 } + } + + weight_multiplier = { + base = 1 + modifier = { + capital_county = { + county_control <= 50 + } + add = 1 + } + modifier = { + OR = { + valid_for_byz_governor_content_trigger = yes + valid_for_byz_emperor_content_trigger = yes + } + add = 1 + } + } + + immediate = { + capital_county = { save_scope_as = capital } + capital_province.barony = { save_scope_as = city } + } + + # Option A: repress + option = { + name = ep3_emperor_yearly.2230.a + add_character_modifier = { + modifier = ep3_law_and_order_modifier + years = 20 + } + if = { + limit = { + top_liege = this + } + change_influence = medium_influence_gain + } + else = { + if = { + limit = { + has_trait = governor + } + add_trait_xp = { + trait = governor + value = small_lifestyle_random_xp_high + } + } + else = { + add_trait = governor + } + } + stress_impact = { + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + patient = medium_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { + has_trait = compassionate + add = -50 + } + modifier = { + has_trait = forgiving + add = -50 + } + modifier = { + has_trait = patient + add = -25 + } + } + } + + # Option B: exploit + option = { + name = ep3_emperor_yearly.2230.b + add_gold = medium_gold_value + change_influence = massive_influence_value + scope:capital = { + add_county_modifier = { + modifier = ep3_rampaging_disorders_county_modifier + years = 15 + } + } + stress_impact = { + generous = major_stress_impact_gain + just = major_stress_impact_gain + honest = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + has_trait = generous + add = -50 + } + modifier = { + has_trait = just + add = -50 + } + modifier = { + has_trait = honest + add = -25 + } + modifier = { + has_trait = compassionate + add = -25 + } + } + } + + # Option C: find a compromise + option = { + name = ep3_emperor_yearly.2230.c + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2230.c_success + send_interface_toast = { + title = ep3_emperor_yearly.2230.c_success.tt + left_icon = root + change_influence = medium_influence_gain + add_character_modifier = { + modifier = ep3_crowd_bender_modifier + years = 20 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2230.c_failure + send_interface_toast = { + title = ep3_emperor_yearly.2230.c_failure.tt + left_icon = root + scope:capital = { + add_county_modifier = { + modifier = ep3_rampaging_disorders_county_modifier + years = 15 + } + } + } + } + } + stress_impact = { + vengeful = major_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + patient = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + modifier = { + has_trait = vengeful + add = -50 + } + modifier = { + has_trait = callous + add = -50 + } + modifier = { + has_trait = sadistic + add = -50 + } + modifier = { + has_trait = patient + add = -25 + } + modifier = { + has_trait = wrathful + add = -25 + } + } + } +} + +# An obnoxious "scholar" close to you keeps quoting the Classics out of place + +scripted_trigger ep3_valid_greek_culture_trigger = { + OR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + this = culture:greek + any_parent_culture_or_above = { this = culture:greek } + } +} + +scripted_trigger ep3_2240_valid_courtier_trigger = { + culture = { + OR = { + has_graphical_east_asia_culture_group_trigger = yes + ep3_valid_greek_culture_trigger = yes + } + } + + OR = { + knows_language = language_greek + learning >= 10 + has_trait = education_learning_1 + has_trait = education_learning_2 + has_trait = education_learning_3 + } + + OR = { + has_trait = arrogant + has_trait = eccentric + has_trait = gregarious + } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } +} + +ep3_emperor_yearly.2240 = { + type = character_event + title = ep3_emperor_yearly.2240.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:the_scholar = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + desc = ep3_emperor_yearly.2240.desc_quote_confucius + } + random_valid = { + desc = ep3_emperor_yearly.2240.desc_quote_a + desc = ep3_emperor_yearly.2240.desc_quote_b + desc = ep3_emperor_yearly.2240.desc_quote_c + triggered_desc = { + trigger = { + scope:the_scholar = { knows_language = language_latin } + } + desc = ep3_emperor_yearly.2240.desc_quote_latin + } + } + } + desc = ep3_emperor_yearly.2240.desc_outro + } + theme = learning + override_background = { reference = ep3_medi_market } + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:the_scholar + animation = debating + } + cooldown = { years = 25 } + + trigger = { + OR = { + has_ep3_dlc_trigger = yes + has_tgp_dlc_trigger = yes + } + is_landed_or_landless_administrative = yes + government_allows = administrative + culture = { + OR = { + has_graphical_east_asia_culture_group_trigger = yes + ep3_valid_greek_culture_trigger = yes + } + } + any_courtier_or_guest = { + ep3_2240_valid_courtier_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + culture = culture:greek + add = 1 + } + modifier = { + any_courtier_or_guest = { + ep3_2240_valid_courtier_trigger = yes + knows_language = language_latin + } + add = 1 + } + modifier = { + any_courtier_or_guest = { + ep3_2240_valid_courtier_trigger = yes + is_of_major_interest_trigger = { CHARACTER = root } + } + add = 1 + } + } + + immediate = { + random_courtier_or_guest = { + limit = { + ep3_2240_valid_courtier_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 3 + knows_language = language_latin + } + modifier = { + add = 2 + is_of_major_interest_trigger = { CHARACTER = root } + } + } + save_scope_as = the_scholar + } + } + + # Option A: outwit + option = { + name = ep3_emperor_yearly.2240.a + flavor = ep3_emperor_yearly.2240.a.flavor + duel = { + skill = learning + target = scope:the_scholar + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2240.a_success + send_interface_toast = { + title = ep3_emperor_yearly.2240.a_success.tt + left_icon = root + right_icon = scope:the_scholar + change_influence = massive_influence_gain + scope:the_scholar = { change_influence = major_influence_loss } + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2240.a_failure + send_interface_toast = { + title = ep3_emperor_yearly.2240.a_failure.tt + left_icon = root + right_icon = scope:the_scholar + change_influence = major_influence_loss + scope:the_scholar = { change_influence = massive_influence_gain } + } + } + } + stress_impact = { + dull = major_stress_impact_gain + shy = medium_stress_impact_gain + humble = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + has_trait = dull + add = -50 + } + modifier = { + has_trait = shy + add = -25 + } + modifier = { + has_trait = humble + add = -25 + } + } + } + + # Option B: just shut up! + option = { + name = ep3_emperor_yearly.2240.b + add_dread = minor_dread_gain + change_influence = minor_influence_gain + scope:the_scholar = { + change_influence = medium_influence_loss + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + add_opinion = { + target = root + modifier = hurt_opinion + opinion = -25 + } + } + stress_impact = { + base = medium_stress_impact_loss + humble = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = calm + add = -25 + } + modifier = { + scope:the_scholar.dynasty ?= root.dynasty + add = -75 + } + modifier = { + scope:the_scholar = { is_heir_of = root } + factor = 0 + } + } + } + + # Option C: ignore - opt-out + option = { + name = ep3_emperor_yearly.2240.c + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +### STATE FAITH EVENTS ### + +# Your liege changed the state faith (reaction) +ep3_emperor_yearly.2300 = { + type = character_event + title = ep3_emperor_yearly.2300.t + desc = ep3_emperor_yearly.2300.desc + theme = administrative + left_portrait = { + character = root + animation = reading + } + lower_right_portrait = scope:liege_loc + + immediate = { + liege = { save_scope_as = liege_loc } + liege.capital_province = { save_scope_as = capital } + } + + #Option A: Outrageous + option = { + name = ep3_emperor_yearly.2300.a + trigger = { + faith != liege.primary_title.state_faith + } + add_piety = medium_piety_gain + stress_impact = { + calm = minor_stress_impact_gain + cynical = medium_stress_impact_gain + humble = medium_stress_impact_gain + loyal = major_stress_impact_gain + } + } + + #Option B: The emperor must be right + option = { + name = ep3_emperor_yearly.2300.b + trigger = { + faith != liege.primary_title.state_faith + } + set_character_faith = liege.primary_title.state_faith + stress_impact = { + zealous = major_stress_impact_gain + disloyal = major_stress_impact_gain + arrogant = major_stress_impact_gain + loyal = major_stress_impact_loss + } + } + + #Option C: Finally + option = { + name = ep3_emperor_yearly.2300.c + trigger = { + faith = liege.primary_title.state_faith + } + add_piety = medium_piety_gain + stress_impact = { + zealous = major_stress_impact_loss + loyal = major_stress_impact_loss + } + } +} + +# Your liege demands that you make more of an effort to convert your counties, who don't follow the state faith +ep3_emperor_yearly.2310 = { + type = letter_event + opening = ep3_emperor_yearly.2310.t + desc = { + desc = ep3_emperor_yearly.2310.desc + triggered_desc = { + trigger = { + faith != top_liege.primary_title.state_faith + } + desc = ep3_emperor_yearly.2310.desc_you_too + } + } + sender = scope:liege_loc + + trigger = { + is_governor = yes + government_allows = state_faith + exists = top_liege.primary_title.state_faith + top_liege.faith = top_liege.primary_title.state_faith + any_sub_realm_county = { + faith != root.top_liege.primary_title.state_faith + } + top_liege = { is_ai = yes } + } + + immediate = { + top_liege = { save_scope_as = liege_loc } + cp:councillor_court_chaplain ?= { save_scope_as = chaplain } + random_sub_realm_county = { + limit = { + faith != root.top_liege.primary_title.state_faith + } + weight = { + base = 1 + modifier = { + this = root.capital_county + add = 100 + } + } + save_scope_as = target_county + } + } + + #Option A: start converting county + option = { + name = ep3_emperor_yearly.2310.a + trigger = { + exists = scope:chaplain + scope:chaplain.faith = root.top_liege.primary_title.state_faith + } + scope:chaplain = { + set_council_task = { + task_type = task_conversion + target = scope:target_county.title_province + } + } + increase_governance_effect = { VALUE = 10 } + scope:liege_loc = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 20 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + lazy = medium_stress_impact_gain + disloyal = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + } + modifier = { + has_trait = disloyal + add = -50 + } + modifier = { + has_trait = lazy + add = -50 + } + opinion_modifier = { + who = root + opinion_target = scope:liege_loc + } + } + } + + #Option B: no thanks + option = { + name = ep3_emperor_yearly.2310.b + trigger = { + faith != top_liege.primary_title.state_faith + } + add_piety = medium_piety_gain + scope:liege_loc = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + stress_impact = { + loyal = major_stress_impact_gain + zealous = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_zeal = 0.5 + } + opinion_modifier = { + opinion_target = scope:liege_loc + multiplier = -1 + } + } + } + + #Option C: I'll convert myself for starters + option = { + name = ep3_emperor_yearly.2310.c + trigger = { + faith != top_liege.primary_title.state_faith + } + set_character_faith = top_liege.primary_title.state_faith + change_influence = medium_influence_gain + stress_impact = { + zealous = major_stress_impact_gain + disloyal = major_stress_impact_gain + arrogant = major_stress_impact_gain + loyal = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_zeal = -0.5 + } + modifier = { + has_trait = loyal + add = 100 + } + modifier = { + has_trait = disloyal + add = -50 + } + opinion_modifier = { + opinion_target = scope:liege_loc + } + } + } + + #Option D: I'll think about it + option = { + name = ep3_emperor_yearly.2310.d + trigger = { + faith = top_liege.primary_title.state_faith + } + scope:liege_loc = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + ai_chance = { + base = 100 + opinion_modifier = { + who = root + opinion_target = scope:liege_loc + multiplier = -1 + } + } + } +} + +# HoF helps you change state faith +ep3_emperor_yearly.2320 = { + type = character_event + title = ep3_emperor_yearly.2320.t + desc = ep3_emperor_yearly.2320.desc + theme = faith + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:hof + animation = wedding_priest + } + + cooldown = { years = 20 } + + trigger = { + government_allows = administrative + government_allows = state_faith + exists = primary_title.state_faith + top_liege = this + highest_held_title_tier >= tier_empire + faith != primary_title.state_faith + faith.fervor > primary_title.state_faith.fervor + exists = faith.religious_head + faith.religious_head != root + primary_title.state_faith.religious_head ?= { + this != root.faith.religious_head + } + } + + immediate = { + faith.religious_head = { save_scope_as = hof } + } + + weight_multiplier = { + base = 1 + # More likely if you are close to affording the (discounted) change state faith decision + modifier = { + OR = { + influence >= 7000 + piety >= 3000 + } + add = 1 + } + # Less likely if you are far from affording the (discounted) change state faith decision + modifier = { + OR = { + influence <= 3000 + piety <= 2000 + } + factor = 0.5 + } + } + + #Option A: thanks + option = { + name = ep3_emperor_yearly.2320.a + custom_tooltip = ep3_emperor_yearly.2320.a.tt + add_character_flag = { + flag = ep3_hof_state_faith_discount + years = 10 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: no thanks + option = { + name = ep3_emperor_yearly.2320.b + every_vassal = { + limit = { + faith = root.primary_title.state_faith + } + custom = every_vassal_state_faith + add_opinion = { + target = root + modifier = pious_opinion + opinion = 5 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } +} + +# Your State faith's fervor is too low (heresy risk) +ep3_emperor_yearly.2330 = { + type = character_event + title = ep3_emperor_yearly.2330.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:hof + } + desc = ep3_emperor_yearly.2330.desc_hof + } + desc = ep3_emperor_yearly.2330.desc + } + desc = ep3_emperor_yearly.2330.desc_end + triggered_desc = { + trigger = { + exists = scope:hof + } + desc = ep3_emperor_yearly.2330.desc_end_hof + } + } + theme = faith + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + trigger = { + exists = scope:hof + } + character = scope:hof + animation = debating + } + + cooldown = { years = 20 } + + trigger = { + government_allows = administrative + government_allows = state_faith + exists = primary_title.state_faith + top_liege = this + highest_held_title_tier >= tier_empire + faith = primary_title.state_faith + faith.fervor < 40 + } + + immediate = { + if = { + limit = { + exists = faith.religious_head + faith.religious_head != root + } + faith.religious_head = { save_scope_as = hof } + } + } + + weight_multiplier = { + base = 1 + # More likely if fervor is very low + modifier = { + faith = { + fervor < 30 + } + add = 1 + } + modifier = { + faith = { + fervor < 20 + } + add = 1 + } + modifier = { + faith = { + fervor < 10 + } + add = 1 + } + } + + #Option A: let's do something + option = { + name = ep3_emperor_yearly.2330.a + flavor = ep3_emperor_yearly.2330.a.tt + faith = { + change_fervor = { + value = minor_fervor_gain + desc = state_faith_fervor_campaign + } + } + add_piety = major_piety_loss + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: it's probably fine + option = { + name = ep3_emperor_yearly.2330.b + stress_impact = { + zealous = massive_stress_impact_gain + diligent = major_stress_impact_gain + loyal = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_zeal = -0.5 + } + modifier = { + add = 50 + has_trait = eccentric + } + modifier = { + add = -50 + has_trait = loyal + } + } + } +} + +# You (either emperor or governor) do not practice your state faith and someone complains +ep3_emperor_yearly.2340 = { + type = character_event + title = ep3_emperor_yearly.2340.t + desc = ep3_emperor_yearly.2340.desc + theme = administrative + left_portrait = { + character = root + animation = eyeroll + } + right_portrait = { + character = scope:complainer + animation = debating + } + + cooldown = { years = 10 } + + trigger = { + government_allows = administrative + OR = { + #emperor + AND = { + top_liege = this + highest_held_title_tier >= tier_empire + } + #governor + is_governor = yes + } + government_allows = state_faith + exists = top_liege.primary_title.state_faith + faith != top_liege.primary_title.state_faith + trigger_if = { + limit = { + top_liege = this + } + any_vassal = { + house ?= { + is_powerful_family = yes + } + faith = top_liege.primary_title.state_faith + is_available_ai_adult = yes + } + } + trigger_else = { + top_liege = { + any_vassal = { + faith = top_liege.primary_title.state_faith + is_available_ai_adult = yes + } + } + } + } + + immediate = { + # If emperor + if = { + limit = { + top_liege = this + } + # Find a vassal from a powerful family + random_vassal = { + limit = { + house ?= { + is_powerful_family = yes + } + faith = root.primary_title.state_faith + is_available_ai_adult = yes + } + save_scope_as = complainer + } + } + # If governor + else = { + # find a fellow vassal - prio to neighbors, powerful families, zealots + top_liege = { + random_vassal = { + limit = { + faith = top_liege.primary_title.state_faith + is_available_ai_adult = yes + } + weight = { + base = 1 + modifier = { + any_neighboring_realm_same_rank_owner = { + this = root + } + add = 50 + } + modifier = { + house ?= { + is_powerful_family = yes + } + add = 25 + } + modifier = { + has_trait = zealous + add = 25 + } + modifier = { + has_vassal_stance = zealot + add = 15 + } + } + save_scope_as = complainer + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + top_liege = this + add = 0.5 + } + } + + #Option A: Maybe I should fall in line... + option = { + name = ep3_emperor_yearly.2340.a + set_character_faith = top_liege.primary_title.state_faith + if = { + limit = { + top_liege = this + } + add_legitimacy = minor_legitimacy_gain + } + else = { + change_influence = medium_influence_gain + } + stress_impact = { + zealous = massive_stress_impact_gain + stubborn = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_zeal = -0.5 + } + modifier = { + has_trait = diligent + add = 50 + } + modifier = { + has_trait = loyal + add = 50 + } + } + } + + #Option B: Blah blah blah... + option = { + name = ep3_emperor_yearly.2340.b + if = { + limit = { + top_liege = this + } + every_vassal = { + limit = { + faith = root.primary_title.state_faith + } + custom = every_vassal_state_faith + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + } + else = { + top_liege = { + every_vassal = { + limit = { + faith = top_liege.primary_title.state_faith + } + custom = every_fellow_vassal_state_faith + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + } + } + add_piety = major_piety_gain + stress_impact = { + zealous = major_stress_impact_loss + lazy = medium_stress_impact_loss + eccentric = medium_stress_impact_loss + diligent = medium_stress_impact_gain + loyal = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = -0.5 + } + modifier = { + has_trait = loyal + add = -50 + } + modifier = { + has_trait = eccentric + add = 50 + } + } + } +} + +### NOBLE FAMILIES MAINTENANCE ### + +# You are not from a Powerful Family - react to a new Powerful Family emerging + +ep3_emperor_yearly.2400 = { + type = character_event + title = ep3_emperor_yearly.2400.t + desc = ep3_emperor_yearly.2400.desc + theme = administrative + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:new_family + animation = toast_goblet + } + + trigger = { + government_allows = administrative + house ?= { + is_powerful_family = no + } + NOT = { + #cooldown + has_character_flag = 8020_powerful_family_cooldown + } + } + + immediate = { + add_character_flag = { + flag = 8020_powerful_family_cooldown + years = 10 + } + } + + option = { + name = ep3_emperor_yearly.2400.a + custom_tooltip = 8020_powerful_family_desc + } +} + +# Your family is now a Powerful Family + +ep3_emperor_yearly.2401 = { + type = character_event + title = ep3_emperor_yearly.2401.t + desc = ep3_emperor_yearly.2401.desc + theme = administrative + left_portrait = { + character = root + animation = ecstasy + } + + trigger = { + government_allows = administrative + house ?= { + is_powerful_family = yes + } + } + + immediate = { + # For the tooltip + root = { save_scope_as = new_family } + } + + option = { + name = ep3_emperor_yearly.2401.a + custom_tooltip = 8020_powerful_family_desc + } +} + +# A new noble family is introduced to the empire + +ep3_emperor_yearly.2410 = { + type = character_event + title = ep3_emperor_yearly.2410.t + desc = ep3_emperor_yearly.2410.desc + theme = administrative + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:noble_family_head + animation = happy_teacher + } + + trigger = { + government_allows = administrative + is_available = yes + exists = scope:noble_family_head + exists = scope:new_title + NOR = { + this.house ?= scope:new_title.holder.house + has_character_flag = 2410_noble_family_cooldown + } + } + + on_trigger_fail = { + if = { + limit = { + exists = scope:noble_family_head + exists = scope:new_title + OR = { + has_character_flag = 2410_noble_family_cooldown + is_available = no + } + } + send_interface_message = { + title = 2410_noble_family_tt + type = msg_new_powerful_family + left_icon = scope:noble_family_head + right_icon = scope:new_title + desc = 2410_noble_family_tt_desc + } + } + } + + immediate = { + add_character_flag = { + flag = 2410_noble_family_cooldown + years = 5 + } + scope:new_title.holder = { + save_scope_as = new_family + save_scope_as = noble_family_head + } + } + + option = { + name = ep3_emperor_yearly.2410.a + custom_tooltip = 2410_noble_family_tt_desc + } +} + +# A new family (and not the emperor's) has become dominant +ep3_emperor_yearly.2420 = { + type = character_event + title = ep3_emperor_yearly.2420.t + desc = ep3_emperor_yearly.2420.desc + theme = administrative + left_portrait = { + character = scope:noble_family_head + animation = personality_dishonorable + } + + trigger = { + government_allows = administrative + is_available = yes + NOT = { + #cooldown + has_character_flag = 2420_noble_family_cooldown + } + } + + on_trigger_fail = { + if = { + limit = { + OR = { + has_character_flag = 2420_noble_family_cooldown + is_available = no + } + } + send_interface_message = { + title = 2420_noble_family_tt + type = msg_new_powerful_family + left_icon = scope:noble_family_head + desc = 2420_noble_family_tt_desc + } + } + } + + immediate = { + add_character_flag = { + flag = 2420_noble_family_cooldown + years = 5 + } + } + + option = { + name = ep3_emperor_yearly.2420.a + custom_tooltip = 2420_noble_family_tt_desc + } +} diff --git a/N3OW/events/dlc/ep3/ep3_emperor_yearly_3.txt b/N3OW/events/dlc/ep3/ep3_emperor_yearly_3.txt new file mode 100644 index 00000000..352ed6d0 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_emperor_yearly_3.txt @@ -0,0 +1,1947 @@ +namespace = ep3_emperor_yearly + +############################ +# EP3 Admin Emperor Events # +# by Jason Cantalini # +# 3000 - 3500 # +############################ + +# Byzantine-only: your Varangians loot the palace after succession + +ep3_emperor_yearly.3000 = { + type = character_event + title = ep3_emperor_yearly.3000.t + desc = { + desc = ep3_emperor_yearly.3000.desc + first_valid = { + triggered_desc = { + trigger = { + scope:varangian_leader = { + is_courtier_of = root + } + } + desc = ep3_emperor_yearly.3000.desc_leader + } + desc = ep3_emperor_yearly.3000.desc_no_leader + } + } + theme = emperor + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:varangian_leader + animation = celebrate_axe + camera = camera_event_very_left + } + lower_right_portrait = { + character = scope:varangian_2 + } + lower_left_portrait = { + character = scope:varangian_3 + } + lower_center_portrait = { + character = scope:dead_emperor + } + + trigger = { + has_ep3_dlc_trigger = yes + primary_title = { has_variable = founded_varangian_guard } + } + + immediate = { + save_scope_as = root_scope + #Choose which malus to use + random_list = { + #Artifact is damaged + 10 = { + trigger = { + any_character_artifact = { + artifact_durability > 45 + } + } + add_character_flag = malus_broken_artifact + random_character_artifact = { + limit = { + artifact_durability > 45 + } + save_scope_as = broken_artifact + } + save_scope_value_as = { + name = varangian_gold + value = { + value = 0 + add = { + value = var:varangian_regiments + multiply = 30 + } + } + } + } + #Artifact is stolen + 10 = { + trigger = { + any_character_artifact = { + artifact_wealth_quality_average_value < 20 + } + } + random_character_artifact = { + limit = { + artifact_wealth_quality_average_value < 20 + } + save_scope_as = stolen_artifact + } + add_character_flag = malus_stolen_artifact + save_scope_value_as = { + name = varangian_gold + value = { + value = 0 + add = { + value = var:varangian_regiments + multiply = 30 + } + } + } + } + ##Court grandeur lost + 10 = { + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + } + add_character_flag = malus_court_grandeur + save_scope_value_as = { + name = varangian_gold + value = { + value = 0 + add = { + value = var:varangian_regiments + multiply = 30 + } + } + } + } + ##Gold is lost + 10 = { + save_scope_value_as = { + name = varangian_gold + value = { + value = 0 + add = { + value = var:varangian_regiments + multiply = 50 + } + } + } + } + } + + #Choose which bonus to give a refuser + random_list = { + 5 = { + trigger = { + is_adult = yes + } + add_character_flag = refuse_bonus_dread + } + 10 = { + add_character_flag = refuse_bonus_prestige + } + 5 = { + add_character_flag = refuse_bonus_opinion + } + } + + #Choose which bonus to give an accepter + random_list = { + 10 = { + trigger = { + max_number_maa_soldiers_of_base_type = { + type = heavy_infantry + value >= 300 + } + } + add_character_flag = accept_bonus_heavy_infantry + } + 10 = { + add_character_flag = accept_bonus_scheme_resist + } + 10 = { + add_character_flag = accept_bonus_army + } + 10 = { + add_character_flag = accept_bonus_legitimacy + } + } + + #Save a first Varangian to be the boss + if = { + limit = { + any_court_position_holder = { + type = akolouthos_court_position + ep3_varangian_trigger = yes + is_available = yes + } + } + random_court_position_holder = { + type = akolouthos_court_position + save_scope_as = varangian_leader + } + } + else_if = { + limit = { + any_court_position_holder = { + type = bodyguard_court_position + ep3_varangian_trigger = yes + is_available = yes + } + } + random_court_position_holder = { + type = bodyguard_court_position + limit = { + ep3_varangian_trigger = yes + is_available = yes + } + save_scope_as = varangian_leader + } + } + else_if = { + limit = { + any_courtier = { + ep3_varangian_trigger = yes + is_available_adult = yes + } + } + random_courtier = { + limit = { + ep3_varangian_trigger = yes + is_available_adult = yes + } + save_scope_as = varangian_leader + } + } + else_if = { + limit = { + current_date < 1066 + } + #Norse + create_character = { + template = varangian_template + location = root.location + culture = culture:norse + faith = root.faith + dynasty = none + save_scope_as = varangian_leader + } + scope:varangian_leader = { + add_character_flag = need_military_outfit + } + hidden_effect = { add_visiting_courtier = scope:varangian_leader } + } + else = { + #Anglo-Saxon + create_character = { + template = varangian_template + location = root.location + culture = culture:anglo_saxon + faith = root.faith + dynasty = none + save_scope_as = varangian_leader + } + scope:varangian_leader = { + add_character_flag = need_military_outfit + } + hidden_effect = { add_visiting_courtier = scope:varangian_leader } + } + #Save another Varangian + if = { + limit = { + exists = scope:varangian_leader + any_court_position_holder = { + type = bodyguard_court_position + ep3_varangian_trigger = yes + is_available = yes + this != scope:varangian_leader + } + } + random_court_position_holder = { + type = bodyguard_court_position + limit = { + ep3_varangian_trigger = yes + is_available = yes + this != scope:varangian_leader + } + save_scope_as = varangian_2 + } + } + else_if = { + limit = { + exists = scope:varangian_leader + any_courtier = { + ep3_varangian_trigger = yes + is_available_adult = yes + this != scope:varangian_leader + } + } + random_courtier = { + limit = { + ep3_varangian_trigger = yes + is_available_adult = yes + this != scope:varangian_leader + } + save_scope_as = varangian_2 + } + } + #Save a third + if = { + limit = { + exists = scope:varangian_leader + exists = scope:varangian_2 + any_court_position_holder = { + type = bodyguard_court_position + ep3_varangian_trigger = yes + is_available = yes + NOR = { + this = scope:varangian_leader + this = scope:varangian_2 + } + } + } + random_court_position_holder = { + type = bodyguard_court_position + limit = { + ep3_varangian_trigger = yes + is_available = yes + NOR = { + this = scope:varangian_leader + this = scope:varangian_2 + } + } + save_scope_as = varangian_3 + } + } + else_if = { + limit = { + exists = scope:varangian_leader + exists = scope:varangian_2 + any_courtier = { + ep3_varangian_trigger = yes + is_available_adult = yes + NOR = { + this = scope:varangian_leader + this = scope:varangian_2 + } + } + } + random_courtier = { + limit = { + ep3_varangian_trigger = yes + is_available_adult = yes + NOR = { + this = scope:varangian_leader + this = scope:varangian_2 + } + } + save_scope_as = varangian_3 + } + } + } + + #Have the Akolouthos seize some of the spoils + option = { + name = ep3_emperor_yearly.3000.a + flavor = ep3_emperor_yearly.3000.a.flavor + trigger = { + employs_court_position = akolouthos_court_position + any_court_position_holder = { + type = akolouthos_court_position + aptitude = { + court_position = akolouthos_court_position + value >= 3 + } + } + } + add_internal_flag = special + custom_tooltip = akolouthos_aptitude_option_unlock + + #Random refuse bonus effect + if = { + limit = { + has_character_flag = refuse_bonus_prestige + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_prestige = massive_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + add_prestige = major_prestige_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + if = { + limit = { + has_character_flag = refuse_bonus_dread + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_dread = major_dread_gain + add_prestige = major_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + add_dread = medium_dread_gain + add_prestige = medium_prestige_gain + } + else = { + add_dread = minor_dread_gain + add_prestige = minor_prestige_gain + } + } + if = { + limit = { + has_character_flag = refuse_bonus_opinion + } + if = { + limit = { + var:varangian_regiments >= 7 + } + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 30 + target = root + } + } + add_prestige = major_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 20 + target = root + } + } + add_prestige = medium_prestige_gain + } + else = { + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 10 + target = root + } + } + add_prestige = minor_prestige_gain + } + } + change_influence = medium_influence_gain + + remove_treasury_or_gold = { + value = { + value = 0 + add = { + value = scope:varangian_gold + multiply = 0.4 + } + } + } + #Negative heavy inf and scheme resistance modifier + add_character_modifier = { + modifier = disrespected_varangians_modifier + years = 10 + } + if = { + limit = { + scope:varangian_leader = { + is_courtier_of = root + } + } + if = { + limit = { + scope:varangian_leader = { has_trait = loyal } + } + scope:varangian_leader = { remove_trait = loyal } + reverse_add_opinion = { + target = scope:varangian_leader + modifier = angry_opinion + opinion = -20 + } + } + else = { + reverse_add_opinion = { + target = scope:varangian_leader + modifier = hate_opinion + opinion = -40 + } + } + } + if = { + limit = { + exists = scope:varangian_2 + } + if = { + limit = { + scope:varangian_2 = { has_trait = loyal } + } + scope:varangian_2 = { remove_trait = loyal } + reverse_add_opinion = { + target = scope:varangian_2 + modifier = angry_opinion + opinion = -20 + } + } + else = { + reverse_add_opinion = { + target = scope:varangian_2 + modifier = hate_opinion + opinion = -40 + } + } + } + if = { + limit = { + exists = scope:varangian_3 + } + if = { + limit = { + scope:varangian_3 = { has_trait = loyal } + } + scope:varangian_3 = { remove_trait = loyal } + reverse_add_opinion = { + target = scope:varangian_3 + modifier = angry_opinion + opinion = -20 + } + } + else = { + reverse_add_opinion = { + target = scope:varangian_3 + modifier = hate_opinion + opinion = -40 + } + } + } + #Apply randomized_malus + if = { + limit = { + has_character_flag = malus_court_grandeur + var:varangian_regiments >= 7 + } + change_current_court_grandeur = minor_court_grandeur_loss + } + if = { + limit = { + has_character_flag = malus_broken_artifact + var:varangian_regiments >= 7 + } + scope:broken_artifact = { + add_durability = -20 + } + } + if = { + limit = { + NOT = { + scope:varangian_leader = { + is_courtier_of = root + } + } + } + hidden_effect = { + scope:varangian_leader = { move_to_pool = yes } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + generous = medium_stress_impact_gain + content = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = paranoid + has_trait = generous + has_trait = content + has_trait = just + } + } + modifier = { + factor = 3 + short_term_gold <= 300 + } + modifier = { + factor = 0.5 + OR = { + has_trait = content + has_trait = just + } + } + } + } + #Chastise the Varangians + option = { + trigger = { + age >= 12 + } + name = ep3_emperor_yearly.3000.b + flavor = ep3_emperor_yearly.3000.b.flavor + #Random refuse bonus effect + if = { + limit = { + has_character_flag = refuse_bonus_prestige + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_prestige = massive_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + add_prestige = major_prestige_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + if = { + limit = { + has_character_flag = refuse_bonus_dread + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_dread = major_dread_gain + add_prestige = major_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + add_dread = medium_dread_gain + add_prestige = medium_prestige_gain + } + else = { + add_dread = minor_dread_gain + add_prestige = minor_prestige_gain + } + } + if = { + limit = { + has_character_flag = refuse_bonus_opinion + } + if = { + limit = { + var:varangian_regiments >= 7 + } + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 30 + target = root + } + } + add_prestige = major_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 20 + target = root + } + } + add_prestige = medium_prestige_gain + } + else = { + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 10 + target = root + } + } + add_prestige = minor_prestige_gain + } + } + + if = { + limit = { + var:varangian_regiments > 0 + } + remove_long_term_gold = { + value = scope:varangian_gold + } + } + + #show custom payout tooltip + if = { + limit = { + exists = scope:varangian_3 + } + custom_tooltip = major_gold_to_varangians_tooltip + } + else_if = { + limit = { + exists = scope:varangian_2 + } + custom_tooltip = medium_gold_to_varangians_tooltip + } + else_if = { + limit = { + scope:varangian_leader = { + is_courtier_of = root + } + } + custom_tooltip = minor_gold_to_varangians_tooltip + } + + if = { + limit = { + scope:varangian_leader = { + is_courtier_of = root + } + } + if = { + limit = { + scope:varangian_leader = { has_trait = loyal } + } + scope:varangian_leader = { remove_trait = loyal } + } + else = { + reverse_add_opinion = { + target = scope:varangian_leader + modifier = angry_opinion + opinion = -20 + } + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_leader + gold = 25 + } + } + } + if = { + limit = { + exists = scope:varangian_2 + } + if = { + limit = { + scope:varangian_2 = { has_trait = loyal } + } + scope:varangian_2 = { remove_trait = loyal } + } + else = { + reverse_add_opinion = { + target = scope:varangian_2 + modifier = angry_opinion + opinion = -20 + } + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_2 + gold = 25 + } + } + } + if = { + limit = { + exists = scope:varangian_3 + } + if = { + limit = { + scope:varangian_3 = { has_trait = loyal } + } + scope:varangian_3 = { remove_trait = loyal } + } + else = { + reverse_add_opinion = { + target = scope:varangian_3 + modifier = angry_opinion + opinion = -20 + } + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_3 + gold = 25 + } + } + } + #Negative heavy inf and scheme resistance modifier + add_character_modifier = { + modifier = disrespected_varangians_modifier + years = 10 + } + #Apply randomized_malus + ep3_palace_looting_random_malus_effect = yes + + if = { + limit = { + NOT = { + scope:varangian_leader = { + is_courtier_of = root + } + } + } + hidden_effect = { + scope:varangian_leader = { move_to_pool = yes } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + generous = minor_stress_impact_gain + content = minor_stress_impact_gain + just = miniscule_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = paranoid + has_trait = generous + has_trait = content + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = generous + has_trait = content + has_trait = just + } + } + } + } + #It's just tradition + option = { + name = ep3_emperor_yearly.3000.c + flavor = ep3_emperor_yearly.3000.c.flavor + if = { + limit = { + has_character_flag = accept_bonus_legitimacy + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_legitimacy = major_legitimacy_gain + } + else_if = { + limit = { + var:varangian_regiments >= 3 + } + add_legitimacy = medium_legitimacy_gain + } + else = { + add_legitimacy = minor_legitimacy_gain + } + } + if = { + limit = { + has_character_flag = accept_bonus_heavy_infantry + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_character_modifier = { + modifier = loyal_varangians_modifier + years = 10 + } + add_legitimacy = medium_legitimacy_gain + } + else_if = { + limit = { + var:varangian_regiments >= 3 + } + add_character_modifier = { + modifier = loyal_varangians_modifier + years = 10 + } + add_legitimacy = miniscule_legitimacy_gain + } + else = { + add_character_modifier = { + modifier = loyal_varangians_modifier + years = 10 + } + } + } + if = { + limit = { + has_character_flag = accept_bonus_scheme_resist + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_character_modifier = { + modifier = attentive_varangians_modifier + years = 10 + } + add_legitimacy = medium_legitimacy_gain + } + else_if = { + limit = { + var:varangian_regiments >= 3 + } + add_character_modifier = { + modifier = attentive_varangians_modifier + years = 10 + } + add_legitimacy = miniscule_legitimacy_gain + } + else = { + add_character_modifier = { + modifier = attentive_varangians_modifier + years = 10 + } + } + } + if = { + limit = { + has_character_flag = accept_bonus_army + } + if = { + limit = { + var:varangian_regiments >= 7 + } + spawn_army = { + name = eager_varangian_army + levies = 600 + men_at_arms = { + type = varangian_guards + stacks = 4 + } + location = root.capital_province + uses_supply = yes + inheritable = no + } + } + else_if = { + limit = { + var:varangian_regiments >= 3 + } + spawn_army = { + name = eager_varangian_army + levies = 300 + men_at_arms = { + type = varangian_guards + stacks = 2 + } + location = root.capital_province + uses_supply = yes + inheritable = no + } + } + else = { + spawn_army = { + name = eager_varangian_army + levies = 100 + men_at_arms = { + type = varangian_guards + stacks = 1 + } + location = root.capital_province + uses_supply = yes + inheritable = no + } + } + } + + if = { + limit = { + var:varangian_regiments > 0 + } + remove_long_term_gold = { + value = scope:varangian_gold + } + } + + + #show custom payout tooltip + if = { + limit = { + exists = scope:varangian_3 + } + custom_tooltip = major_gold_to_varangians_tooltip + } + else_if = { + limit = { + exists = scope:varangian_2 + } + custom_tooltip = medium_gold_to_varangians_tooltip + } + else_if = { + limit = { + scope:varangian_leader = { + is_courtier_of = root + } + } + custom_tooltip = minor_gold_to_varangians_tooltip + } + + if = { + limit = { + scope:varangian_leader = { + is_courtier_of = root + } + } + reverse_add_opinion = { + target = scope:varangian_leader + modifier = loyalty_opinion + opinion = 60 + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_leader + gold = 25 + } + } + } + if = { + limit = { + exists = scope:varangian_2 + } + reverse_add_opinion = { + target = scope:varangian_2 + modifier = loyalty_opinion + opinion = 60 + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_2 + gold = 25 + } + } + } + if = { + limit = { + exists = scope:varangian_3 + } + reverse_add_opinion = { + target = scope:varangian_3 + modifier = loyalty_opinion + opinion = 60 + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_3 + gold = 25 + } + } + } + + #Apply randomized_malus + ep3_palace_looting_random_malus_effect = yes + + stress_impact = { + generous = miniscule_stress_impact_loss + paranoid = minor_stress_impact_loss + greedy = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = -0.5 + ai_vengefulness = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = vengeful + has_trait = arrogant + has_trait = arbitrary + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = arrogant + has_trait = arbitrary + } + } + } + } + after = { + if = { + limit = { + scope:varangian_leader = { + has_character_flag = need_military_outfit + } + } + scope:varangian_leader = { + remove_character_flag = need_military_outfit + } + } + if = { + limit = { + has_character_flag = malus_broken_artifact + } + remove_character_flag = malus_broken_artifact + } + if = { + limit = { + has_character_flag = malus_stolen_artifact + } + remove_character_flag = malus_stolen_artifact + } + if = { + limit = { + has_character_flag = malus_court_grandeur + } + remove_character_flag = malus_court_grandeur + } + if = { + limit = { + has_character_flag = refuse_bonus_dread + } + remove_character_flag = refuse_bonus_dread + } + if = { + limit = { + has_character_flag = refuse_bonus_opinion + } + remove_character_flag = refuse_bonus_opinion + } + if = { + limit = { + has_character_flag = refuse_bonus_prestige + } + remove_character_flag = refuse_bonus_prestige + } + if = { + limit = { + has_character_flag = accept_bonus_heavy_infantry + } + remove_character_flag = accept_bonus_heavy_infantry + } + if = { + limit = { + has_character_flag = accept_bonus_scheme_resist + } + remove_character_flag = accept_bonus_scheme_resist + } + if = { + limit = { + has_character_flag = accept_bonus_army + } + remove_character_flag = accept_bonus_army + } + if = { + limit = { + has_character_flag = accept_bonus_legitimacy + } + remove_character_flag = accept_bonus_legitimacy + } + } +} + +#Byzantine emperor sends fireships to defend the strait of Marmara +ep3_emperor_yearly.3010 = { + hidden = yes + + trigger = { + #province is strait of Marmara + scope:army.location = { + OR = { + this = province:947 + this = province:950 + this = province:948 + this = province:8667 + this = province:8668 + this = province:8665 + } + } + #A lot of jank would be introduced by multiplayer and armies continuing to move, unpaused + has_multiple_players = no + title:c_byzantion = { has_county_modifier = defensive_fire_dromons_modifier } + NOT = { has_character_flag = used_fire_dromons } + #this event is really going to f up the enemy army in a way no player will appreciate + is_ai = yes + + #Is it at war with powerful ruler whose capital is Constantinople + any_war_enemy = { + is_landed = yes + capital_county = title:c_byzantion + capital_province = { is_occupied = no } + culture = { + OR = { + this = culture:greek + any_parent_culture_or_above = { this = culture:greek } + } + } + } + } + + immediate = { + save_scope_as = invader + scope:army.army_commander ?= { save_scope_as = invading_commander } + random_war_enemy = { + limit = { + is_landed = yes + capital_county = title:c_byzantion + capital_province = { is_occupied = no } + culture = { + OR = { + this = culture:greek + any_parent_culture_or_above = { this = culture:greek } + } + } + } + save_scope_as = marmara_defender + } + scope:marmara_defender = { + trigger_event = ep3_emperor_yearly.3011 + } + } +} + +ep3_emperor_yearly.3011 = { + type = character_event + title = ep3_emperor_yearly.3011.t + desc = { + desc = ep3_emperor_yearly.3011.intro + first_valid = { + triggered_desc = { + trigger = { + scope:invader = { + this = scope:invading_commander + } + } + desc = ep3_emperor_yearly.3011.liege_attacking + } + desc = ep3_emperor_yearly.3011.commander_attacking + } + desc = ep3_emperor_yearly.3011.desc + triggered_desc = { + trigger = { + knows_language = language_greek + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = ep3_emperor_yearly.3011.kyrie_eleison + } + } + theme = war + override_background = { reference = ep3_constantinople } + left_portrait = { + character = scope:city_defender + animation = survey + camera = camera_event_left_away + } + lower_right_portrait = { + character = scope:invading_commander + } + + immediate = { + #perspective character for event window + if = { + limit = { + is_available = yes + } + save_scope_as = city_defender + } + else_if = { + limit = { + cp:councillor_marshal ?= { + is_available = yes + } + } + cp:councillor_marshal = { + save_scope_as = city_defender + } + } + else_if = { + limit = { + OR = { + has_diarchy_type = temporary_regency + has_diarchy_type = regency + } + diarch = { + is_available = yes + } + } + diarch = { save_scope_as = city_defender } + } + else = { + save_scope_as = city_defender + } + scope:city_defender = { + add_character_flag = need_military_outfit + } + scope:invader = { + if = { + limit = { + any_knight = { + is_in_army = yes + this != scope:invading_commander + } + } + random_knight = { + limit = { + is_in_army = yes + this != scope:invading_commander + } + save_scope_as = knight_1 + } + } + if = { + limit = { + any_knight = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:invading_commander + } + } + } + random_knight = { + limit = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:invading_commander + } + } + save_scope_as = knight_2 + } + } + if = { + limit = { + any_knight = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:invading_commander + } + } + } + random_knight = { + limit = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:invading_commander + } + } + save_scope_as = knight_3 + } + } + if = { + limit = { + any_knight = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:knight_3 + this = scope:invading_commander + } + } + } + random_knight = { + limit = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:knight_3 + this = scope:invading_commander + } + } + save_scope_as = knight_4 + } + } + if = { + limit = { + any_knight = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:knight_3 + this = scope:knight_4 + this = scope:invading_commander + } + } + } + random_knight = { + limit = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:knight_3 + this = scope:knight_4 + this = scope:invading_commander + } + } + save_scope_as = knight_5 + } + } + } + } + #Use the greek fire ships + option = { + name = ep3_emperor_yearly.3011.a + add_character_flag = { + flag = used_fire_dromons + days = 30 + } + custom_tooltip = unable_to_use_fire_ships_tooltip + scope:city_defender = { + duel = { + skill = martial + target = scope:invading_commander + 35 = { #Your fleet ruins the enemy + desc = ep3_emperor_yearly.3011.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -34 + } + modifier = { + has_trait = forder + add = 20 + } + modifier = { + highest_held_title_tier >= tier_empire + + add = 10 + } + modifier = { + scope:army = { + army_size <= 1000 + } + add = 10 + } + modifier = { + scope:army = { + #Big enough army to actually siege the city + army_size < 2500 + } + add = 10 + } + modifier = { + scope:invading_commander = { + has_trait = reckless + } + add = 10 + } + modifier = { + has_trait = reckless + add = 10 + } + modifier = { + has_trait = aggressive_attacker + add = 10 + } + modifier = { + has_trait = military_engineer + add = 10 + } + modifier = { + scope:invading_commander = { + has_trait = aggressive_attacker + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_01 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_03 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_05 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_07 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_01 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_03 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_05 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_07 + } + add = 5 + } + show_as_tooltip = { ep3_greek_fire_success_effect = yes } + root = { add_character_flag = successful_greek_fire_attack } + } + 50 = { #Your fleet does some damage + desc = ep3_emperor_yearly.3011.a.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + has_trait = forder + add = 40 + } + modifier = { + scope:army = { + #Big enough army to actually siege the city + army_size < 2500 + } + add = 20 + } + modifier = { + scope:army = { + army_size <= 1000 + } + add = 20 + } + modifier = { + scope:invading_commander = { + has_trait = reckless + } + add = 20 + } + modifier = { + scope:invading_commander = { + has_trait = aggressive_attacker + } + add = 10 + } + modifier = { + has_trait = aggressive_attacker + add = 20 + } + modifier = { + has_trait = military_engineer + add = 20 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_01 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_03 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_05 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_07 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_01 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_03 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_05 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_07 + } + add = 10 + } + show_as_tooltip = { ep3_greek_fire_fail_effect = yes } + root = { add_character_flag = failed_greek_fire_attack } + } + 15 = { #Your fleet does a little damage and... ruins themselves + desc = ep3_emperor_yearly.3011.a.critical_fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -14 + } + modifier = { + scope:invading_commander = { + has_trait = forder + } + add = 40 + } + modifier = { + scope:invading_commander = { + has_trait = organizer + } + add = 20 + } + modifier = { + scope:invading_commander = { + has_trait = cautious_leader + } + add = 20 + } + modifier = { + has_trait = cautious_leader + add = 20 + } + + modifier = { + scope:army = { + army_size >= 5000 + } + add = 20 + } + modifier = { + scope:army = { + army_size >= 10000 + } + add = 20 + } + show_as_tooltip = { ep3_greek_fire_crit_fail_effect = yes } + root = { add_character_flag = crit_failed_greek_fire_attack } + } + } + } + trigger_event = ep3_emperor_yearly.3012 + stress_impact = { + compassionate = medium_stress_impact_gain + cautious_leader = medium_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 1 + } + modifier = { + add = 20 + scope:city_defender = { + martial >= high_skill_rating + } + } + modifier = { + add = 20 + scope:invading_commander = { + martial <= high_skill_rating + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = compassionate + has_trait = cautious_leader + } + } + modifier = { + factor = 2 + scope:army = { + army_size >= 4000 + } + } + modifier = { + factor = 2 + scope:army = { + army_size >= 7000 + } + } + } + } + #Don't attack + option = { + name = ep3_emperor_yearly.3011.b + if = { + limit = { + scope:army = { + #Big enough army to actually siege the city + army_size >= 4000 + } + } + add_prestige = medium_prestige_loss + } + else_if = { + limit = { + scope:army = { + army_size >= 3000 + } + } + add_prestige = minor_prestige_loss + } + else = { + add_prestige = miniscule_prestige_loss + } + stress_impact = { + vengeful = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + sadistic = miniscule_stress_impact_gain + reckless = minor_stress_impact_gain + brave = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + } + modifier = { + add = 20 + scope:city_defender = { + martial < decent_skill_rating + } + } + modifier = { + add = 20 + scope:invading_commander = { + martial > very_high_skill_rating + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = reckless + has_trait = brave + } + } + modifier = { + factor = 2 + scope:army = { + army_size <= 2000 + } + } + modifier = { + factor = 2 + scope:army = { + army_size < 1000 + } + } + } + } + after = { + scope:city_defender = { remove_character_flag = need_military_outfit } + } +} + +ep3_emperor_yearly.3012 = { + type = character_event + title = ep3_emperor_yearly.3012.t + desc = { + desc = ep3_emperor_yearly.3012.intro + #Triggered desc based on success + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = successful_greek_fire_attack + } + desc = ep3_emperor_yearly.3012.attack_success + } + triggered_desc = { + trigger = { + has_character_flag = failed_greek_fire_attack + } + desc = ep3_emperor_yearly.3012.attack_fail + } + triggered_desc = { + trigger = { + has_character_flag = crit_failed_greek_fire_attack + } + desc = ep3_emperor_yearly.3012.attack_crit_fail + } + } + } + theme = war + override_background = { reference = ocean } + widget = { + gui = "event_window_widget_vfx_heavy_smoke" + container = "foreground_shader_vfx_container" + } + right_portrait = { + character = scope:invading_commander + triggered_animation = { + trigger = { + root = { has_character_flag = successful_greek_fire_attack } + } + animation = sword_yield_start + } + triggered_animation = { + trigger = { + root = { has_character_flag = failed_greek_fire_attack } + } + animation = fear + } + triggered_animation = { + trigger = { + root = { has_character_flag = crit_failed_greek_fire_attack } + } + animation = sword_coup_degrace + } + } + + immediate = { + play_music_cue = "mx_cue_war_declared" + #show effect as tooltip here + create_character_memory = { + type = endured_greek_fire_memory + participants = { + attacker = root + } + } + } + + option = { + name = { + trigger = { has_character_flag = successful_greek_fire_attack } + text = ep3_emperor_yearly.3012.a_success + } + name = { + trigger = { has_character_flag = failed_greek_fire_attack } + text = ep3_emperor_yearly.3012.a_fail + } + name = { + trigger = { has_character_flag = crit_failed_greek_fire_attack } + text = ep3_emperor_yearly.3012.a_crit_fail + } + + if = { + limit = { has_character_flag = successful_greek_fire_attack + } + ep3_greek_fire_success_effect = yes + } + if = { + limit = { + has_character_flag = failed_greek_fire_attack + } + ep3_greek_fire_fail_effect = yes + } + if = { + limit = { + has_character_flag = crit_failed_greek_fire_attack + } + ep3_greek_fire_crit_fail_effect = yes + } + #Apply memory to invading commander? + if = { + limit = { + has_character_flag = successful_greek_fire_attack + } + stress_impact = { + sadistic = medium_stress_impact_loss + paranoid = minor_stress_impact_loss + vengeful = medium_stress_impact_loss + callous = minor_stress_impact_loss + } + } + } + after = { + if = { + limit = { has_character_flag = successful_greek_fire_attack + } + remove_character_flag = successful_greek_fire_attack + } + if = { + limit = { + has_character_flag = failed_greek_fire_attack + } + remove_character_flag = failed_greek_fire_attack + } + if = { + limit = { + has_character_flag = crit_failed_greek_fire_attack + } + remove_character_flag = crit_failed_greek_fire_attack + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_eparch_events.txt b/N3OW/events/dlc/ep3/ep3_eparch_events.txt new file mode 100644 index 00000000..f764fba3 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_eparch_events.txt @@ -0,0 +1,1879 @@ +######################## +# EP3 Eparch Events +######################## +namespace = ep3_eparch_event + +### Fortify the Capital +ep3_eparch_event.0001 = { + type = character_event + title = ep3_eparch_event.0001.t + desc = { + desc = ep3_eparch_event.0001.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:defensive_war = { defender_war_score > 10 } + } + desc = ep3_eparch_event.0001.desc_winning_war + } + triggered_desc = { + trigger = { + scope:defensive_war = { defender_war_score < -10 } + } + desc = ep3_eparch_event.0001.desc_losing_war + } + desc = ep3_eparch_event.0001.desc_undecided_war + } + desc = ep3_eparch_event.0001.desc_outro + } + theme = administrative + override_background = { reference = ep3_city_gate } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = craven + has_trait = paranoid + } + } + animation = paranoia + } + triggered_animation = { + trigger = { + OR = { + has_trait = brave + has_trait = diligent + has_trait = ambitious + } + } + animation = inspect_weapon + } + animation = worry + } + + cooldown = { years = 10 } + + trigger = { + has_court_position = eparch_court_position + liege = { + any_character_war = { + is_war_leader = prev + is_defender = prev + } + capital_province ?= { + NOT = { has_province_modifier = ep3_eparch_fortified_capital_modifier } + is_occupied = no + any_army_in_location = { + NOR = { + is_army_in_siege = yes + is_army_in_raid = yes + } + } + } + } + } + + immediate = { + save_scope_as = eparch + liege = { + save_scope_as = emperor + random_character_war = { + limit = { + is_war_leader = prev + is_defender = prev + } + primary_attacker = { save_scope_as = attacker } + save_scope_as = defensive_war + } + capital_province = { save_scope_as = capital } + } + } + + option = { # The capital MUST be protected! + name = ep3_eparch_event.0001.a + + remove_treasury_or_gold = major_treasury_or_gold_value + if = { + limit = { has_trait = governor } + increase_governance_effect = { VALUE = 4 } + } + scope:capital = { + add_province_modifier = { + modifier = ep3_eparch_fortified_capital_modifier + years = 20 + } + } + + # Follow up event for the liege + scope:emperor = { trigger_event = ep3_eparch_event.0002 } + + stress_impact = { + greedy = medium_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 3 + has_trait = diligent + } + modifier = { # Wants to protect themself, the enemey MIGHT actually get here + factor = 2 + has_trait = paranoid + } + modifier = { # Wants to make sure the citizens are safe + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < major_treasury_or_gold_value + } + } + } + + option = { # A moderate improvement should suffice. + name = ep3_eparch_event.0001.b + + remove_treasury_or_gold = minor_treasury_or_gold_value + scope:capital = { + add_province_modifier = { + modifier = ep3_eparch_somewhat_fortified_capital_modifier + years = 10 + } + } + + stress_impact = { + # None + } + + ai_chance = { + base = 20 + + modifier = { + factor = 4 + has_trait = temperate + } + modifier = { + factor = 2 + has_trait = content + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < minor_treasury_or_gold_value + } + } + } + + option = { # Surely the capital is not in any danger? + name = ep3_eparch_event.0001.c + + stress_impact = { + craven = medium_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 5 + has_trait = lazy + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 2 + has_trait = brave + } + modifier = { + factor = 0 + has_trait = craven + } + } + } +} + +# Liege follow up +ep3_eparch_event.0002 = { + type = character_event + title = ep3_eparch_event.0001.t + desc = { + desc = ep3_eparch_event.0002.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:emperor_is_home } + desc = ep3_eparch_event.0002.desc_at_home + } + desc = ep3_eparch_event.0002.desc_away + } + } + theme = emperor + override_background = { + trigger = { exists = scope:emperor_is_home } + reference = ep3_city_gate + } + override_background = { + trigger = { is_commanding_army = yes } + reference = army_camp + } + override_background = { + reference = terrain + } + left_portrait = { + character = root + triggered_animation = { + trigger = { exists = scope:emperor_is_home } + animation = war_defender + } + animation = reading + } + right_portrait = { + character = scope:emperor_is_home + triggered_animation = { + trigger = { + OR = { + has_trait = brave + has_trait = diligent + has_trait = ambitious + } + } + animation = inspect_weapon + } + animation = steward + } + lower_right_portrait = { + character = scope:emperor_is_away + } + + trigger = { + } + + immediate = { + show_as_tooltip = { + scope:capital = { + add_province_modifier = { + modifier = ep3_eparch_fortified_capital_modifier + years = 20 + } + } + } + + # Scopes for portraits, descs, etc. + if = { + limit = { + location = scope:capital + } + scope:eparch = { save_scope_as = emperor_is_home } + } + else = { + scope:eparch = { save_scope_as = emperor_is_away } + } + } + + option = { # Such diligence ought to be rewarded! + name = ep3_eparch_event.0002.a + + scope:eparch = { + send_interface_message = { + type = event_generic_good + title = eparch_reward_msg_title + left_icon = root + + root = { + pay_short_term_gold = { + target = scope:eparch + gold = medium_gold_value + } + } + } + } + progress_towards_friend_effect = { + REASON = friend_rewarding_duties + CHARACTER = scope:eparch + OPINION = default_friend_opinion + } + + stress_impact = { + greedy = medium_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = just + } + modifier = { + factor = 3 + has_trait = generous + } + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_gold < medium_gold_value + } + } + } + + option = { # They are only doing their job. + name = ep3_eparch_event.0002.b + + stress_impact = { + # None + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = greedy + } + modifier = { + factor = 2 + has_trait = callous + } + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 2 + has_trait = content + } + } + } +} + +### Losing Control +ep3_eparch_event.0005 = { + type = character_event + title = ep3_eparch_event.0005.t + desc = ep3_eparch_event.0005.desc + theme = administrative + override_background = { + trigger = { scope:capital = province:496 } + reference = ep3_constantinople + } + override_background = { reference = market } + left_portrait = { + character = root + animation = worry + } + + cooldown = { years = 10 } + + trigger = { + has_court_position = eparch_court_position + liege = { + capital_province.county ?= { + county_control < 90 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + capital_province.county ?= { + county_control < 60 + } + factor = 1.1 + } + modifier = { + capital_province.county ?= { + county_control < 30 + } + factor = 1.2 + } + } + + immediate = { + save_scope_as = eparch + liege = { + save_scope_as = emperor + capital_province = { save_scope_as = capital } + + if = { + limit = { + exists = cp:councillor_marshal + NOT = { cp:councillor_marshal = root } + } + cp:councillor_marshal = { save_scope_as = marshal } + } + } + } + + option = { # Let's pay for some extra hands to patrol the streets + name = ep3_eparch_event.0005.a + + remove_treasury_or_gold = medium_treasury_or_gold_value + if = { + limit = { has_trait = governor } + increase_governance_effect = { VALUE = 4 } + } + scope:emperor = { + send_interface_message = { + type = send_interface_message_good + title = ep3_eparch_event.0005.success_liege + left_icon = scope:capital.county + right_icon = scope:eparch + + scope:capital.county = { + change_county_control = 5 + } + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 3 + has_trait = education_martial + } + modifier = { + factor = 2 + has_trait = paranoid + } + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < medium_treasury_or_gold_value + } + } + } + + option = { # Perhaps we can turn the criminals against each other? + name = ep3_eparch_event.0005.b + + duel = { + skill = intrigue + value = decent_skill_rating + 50 = { # Success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + desc = ep3_eparch_event.0005.b_success_tt + send_interface_toast = { + title = ep3_eparch_event.0005.b_success + left_icon = scope:capital.county + + add_intrigue_lifestyle_xp = medium_lifestyle_xp + + scope:emperor = { + send_interface_message = { + type = send_interface_message_good + title = ep3_eparch_event.0005.success_liege + left_icon = scope:capital.county + right_icon = scope:eparch + + scope:capital.county = { + change_county_control = 10 + } + } + } + } + } + 50 = { # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -49 + } + desc = ep3_eparch_event.0005.b_failure_tt + send_interface_toast = { + title = ep3_eparch_event.0005.b_failure + left_icon = scope:capital.county + + scope:emperor = { + send_interface_message = { + type = send_interface_message_bad + title = ep3_eparch_event.0005.failure_liege + left_icon = scope:capital.county + right_icon = scope:eparch + + scope:capital.county = { + change_county_control = -5 + } + } + } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = deceitful + } + modifier = { + factor = 2 + has_trait = vengeful + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + option = { # Marshal might be able to help? + name = ep3_eparch_event.0005.c + + trigger = { + exists = scope:marshal + } + + change_influence = medium_influence_loss + scope:marshal = { + random = { + chance = { + value = 10 + add = { + value = scope:marshal.intrigue + multiply = 2 + } + max = 90 + } + + send_interface_toast = { + left_icon = scope:eparch + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:eparch + } + } + add_hook = { + type = favor_hook + target = scope:eparch + } + } + } + } + } + scope:emperor = { + send_interface_message = { + type = send_interface_message_good + title = ep3_eparch_event.0005.success_liege + left_icon = scope:capital.county + right_icon = scope:eparch + + scope:capital.county = { + change_county_control = 5 + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = trusting + } + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 2 + has_trait = humble + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + option = { # No need to overreact. The situation is not THAT desperate. + name = ep3_eparch_event.0005.d + + eparch_neglecting_duty_effect = yes + + stress_impact = { + diligent = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 5 + has_trait = lazy + } + modifier = { + factor = 2 + has_trait = content + } + modifier = { + factor = 0 + has_trait = diligent + } + } + } +} + +### Sickness Strikes +ep3_eparch_event.0010 = { + type = character_event + title = ep3_eparch_event.0010.t + desc = ep3_eparch_event.0010.desc + theme = administrative + override_background = { + trigger = { scope:capital = province:496 } + reference = ep3_constantinople + } + override_background = { reference = market } + left_portrait = { + character = root + animation = disbelief + } + + cooldown = { years = 10 } + + trigger = { + has_court_position = eparch_court_position + liege = { + capital_province ?= { + any_province_epidemic = { count > 0 } + } + } + } + + immediate = { + save_scope_as = eparch + liege = { + save_scope_as = emperor + capital_province = { save_scope_as = capital } + } + if = { + limit = { + employs_court_position = court_physician_court_position + } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = physician + } + } + liege = { + capital_province ?= { + random_province_epidemic = { + weight = { + base = 1 + modifier = { + add = 30 + outbreak_intensity >= apocalyptic + } + modifier = { + add = 20 + outbreak_intensity >= major + } + } + + save_scope_as = capital_plague + } + } + } + } + + option = { # Drastic measures are required. Quarantine the city! + name = ep3_eparch_event.0010.a + + trigger = { + scope:capital = { + any_province_epidemic = { + OR = { + outbreak_intensity = major + outbreak_intensity = apocalyptic + } + } + } + } + + remove_treasury_or_gold = major_treasury_or_gold_value + scope:capital = { + every_province_epidemic = { + if = { + limit = { + outbreak_intensity = major + } + set_epidemic_outbreak_intensity = minor + } + else_if = { + limit = { + outbreak_intensity = apocalyptic + } + set_epidemic_outbreak_intensity = major + } + } + } + + stress_impact = { + fickle = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 3 + has_trait = eccentric + } + modifier = { + factor = 2 + has_trait = wrathful + } + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < major_treasury_or_gold_value + } + } + } + + option = { # Scour the city for physicians and put them to work. + name = ep3_eparch_event.0010.b + + change_influence = medium_influence_loss + scope:capital = { + add_province_modifier = { + modifier = ep3_eparch_plague_protection_modifier + years = 20 + } + } + + stress_impact = { + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = deceitful + } + modifier = { + factor = 2 + has_trait = diligent + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 0.5 + has_trait = greedy + } + } + } + + option = { # My physician can help! + name = ep3_eparch_event.0010.c + + trigger = { + exists = scope:physician + } + + scope:physician = { + duel = { + value = decent_skill_rating + localization = duel_aptitude_challenge + 10 = { # Success + compare_modifier = { + value = scope:physician.aptitude:court_physician_court_position + multiplier = 20 + min = -9 + } + desc = ep3_eparch_event.0010.c_success_tt + send_interface_toast = { + title = ep3_eparch_event.0010.c_success + left_icon = scope:capital.county + + scope:capital = { + add_province_modifier = { + modifier = ep3_eparch_physician_at_work_modifier + years = 25 + } + } + } + } + 90 = { # Failure + compare_modifier = { + value = scope:physician.aptitude:court_physician_court_position + multiplier = -20 + min = -89 + } + desc = ep3_eparch_event.0010.c_failure_tt + send_interface_toast = { + title = ep3_eparch_event.0010.c_failure + left_icon = scope:capital.county + + root = { change_influence = major_influence_loss } + } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = generous + } + modifier = { + factor = 1.5 + has_trait = diligent + } + modifier = { + factor = 0.5 + has_trait = greedy + } + } + } + + option = { # A slight cough isn't going to kill anyone... + name = ep3_eparch_event.0010.d + + eparch_neglecting_duty_effect = yes + + stress_impact = { + diligent = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = arbitrary + } + modifier = { + factor = 2 + has_trait = cynical + } + modifier = { + factor = 2 + has_trait = sadistic + } + modifier = { + factor = 2 + has_trait = callous + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = compassionate + } + } + } + } +} + +### University Needs Teachers +ep3_eparch_event.0015 = { + type = character_event + title = ep3_eparch_event.0015.t + desc = ep3_eparch_event.0015.desc + theme = administrative + override_background = { + trigger = { scope:capital = province:496 } + reference = ep3_constantinople + } + override_background = { reference = bp2_university } + left_portrait = { + character = root + animation = reading + } + lower_left_portrait = scope:teacher_my_house + lower_center_portrait = scope:teacher_powerful_family + lower_right_portrait = scope:teacher_local_scholar + + cooldown = { years = 10 } + + trigger = { + has_court_position = eparch_court_position + liege = { + capital_province ?= { + is_higher_studies_location = yes + } + } + } + + immediate = { + save_scope_as = eparch + liege = { + save_scope_as = emperor + capital_province = { + save_scope_as = capital + save_scope_as = location # For the teacher trigger used below + } + } + + # Look for and save suitable candidates + # Find a candidate within root's own house + house = { + random_house_member = { + limit = { + is_courtier = yes + liege = { # It's your direct courtier or the courtier of an AI character + OR = { + this = scope:eparch + is_ai = yes + } + } + any_heir_title = { count < 1 } # Is not an heir to any titles + is_available_adult_education_teacher = yes # Is a suitable teacher + } + save_scope_as = teacher_my_house + } + } + # Find a candidate from a powerful family + liege = { + random_powerful_family = { + limit = { + NOR = { + this = scope:eparch.house + this = scope:emperor.house + } + any_house_member = { + is_courtier = yes + liege = { is_ai = yes } # Is a courtier of an AI character + any_heir_title = { count < 1 } # Is not an heir to any titles + is_available_adult_education_teacher = yes # Is a suitable teacher + } + } + random_house_member = { + limit = { + is_courtier = yes + liege = { is_ai = yes } # Is a courtier of an AI character + any_heir_title = { count < 1 } # Is not an heir to any titles + is_available_adult_education_teacher = yes # Is a suitable teacher + } + save_scope_as = teacher_powerful_family + house.house_head = { save_scope_as = powerful_house_head } + } + } + } + # Find/create a local scholar + if = { + limit = { + any_pool_character = { + province = scope:capital + is_available_adult_education_teacher = yes + NOR = { + has_character_flag = teacher_1 + has_character_flag = teacher_2 + } + } + } + random_pool_character = { + province = scope:capital + limit = { + is_available_adult_education_teacher = yes + NOR = { + has_character_flag = teacher_1 + has_character_flag = teacher_2 + } + } + save_scope_as = teacher_local_scholar + } + } + else = { + create_character = { + # Below is based on the adult_education_teacher template + age = { 35 75 } + random_traits_list = { + count = 1 + education_diplomacy_4 = {} + education_martial_4 = {} + education_stewardship_4 = {} + education_intrigue_4 = {} + education_learning_4 = {} + education_diplomacy_5 = {} + education_martial_5 = {} + education_stewardship_5 = {} + education_intrigue_5 = {} + education_learning_5 = {} + } + diplomacy = { + min_template_average_skill + max_template_decent_skill + } + martial = { + min_template_average_skill + max_template_decent_skill + } + stewardship = { + min_template_average_skill + max_template_decent_skill + } + intrigue = { + min_template_average_skill + max_template_decent_skill + } + learning = { + min_template_average_skill + max_template_decent_skill + } + random_traits = yes + dynasty = none + faith = scope:capital.faith + culture = scope:capital.culture + gender_female_chance = { + if = { + limit = { scope:capital.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:capital.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + location = scope:capital + save_scope_as = teacher_local_scholar + } + } + } + + option = { # As it happens, I know the perfect candidate! + name = ep3_eparch_event.0015.a + + trigger = { + exists = scope:teacher_my_house + } + + remove_treasury_or_gold = major_treasury_or_gold_value + house = { + add_house_modifier = { + modifier = ep3_eparch_university_influence_modifier + years = 25 + } + } + scope:teacher_my_house = { + save_scope_as = teacher_tt + custom_tooltip = { + text = teacher_moves_to_capital_tt + move_to_pool_at = scope:capital + add_character_flag = teacher_1 + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 5 + has_trait = family_first + } + modifier = { + factor = 3 + has_trait = ambitious + } + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 2 + has_trait = just + scope:teacher_my_house.sum_of_all_skills_value > scope:teacher_powerful_family.sum_of_all_skills_value + scope:teacher_my_house.sum_of_all_skills_value > scope:teacher_local_scholar.sum_of_all_skills_value + } + modifier = { + factor = 0.5 + has_trait = honest + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < major_treasury_or_gold_value + } + } + } + + option = { # The X family has a worthy candidate. + name = ep3_eparch_event.0015.b + + trigger = { + exists = scope:teacher_powerful_family + } + + if = { + limit = { + can_add_hook = { + target = scope:powerful_house_head + type = favor_hook + } + } + add_hook = { + target = scope:powerful_house_head + type = favor_hook + } + } + scope:powerful_house_head = { + add_opinion = { + modifier = respect_opinion + opinion = 20 + target = scope:eparch + } + send_interface_message = { + type = msg_admin_eparch_with_text_good + title = ep3_eparch_event.0015.b.msg.t + desc = ep3_eparch_event.0015.b.msg.desc + left_icon = scope:eparch + right_icon = scope:teacher_powerful_family + + change_influence = medium_influence_gain + house = { + add_house_modifier = { + modifier = ep3_eparch_university_influence_modifier + years = 25 + } + } + } + } + scope:teacher_powerful_family = { + save_scope_as = teacher_tt + custom_tooltip = { + text = teacher_moves_to_capital_tt + move_to_pool_at = scope:capital + add_character_flag = teacher_1 + } + } + + stress_impact = { + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = trusting + } + modifier = { + factor = 2 + has_trait = just + scope:teacher_powerful_family.sum_of_all_skills_value > scope:teacher_my_house.sum_of_all_skills_value + scope:teacher_powerful_family.sum_of_all_skills_value > scope:teacher_local_scholar.sum_of_all_skills_value + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + option = { # There is bound to be a scholar I can hire within the city + name = ep3_eparch_event.0015.c + + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:teacher_local_scholar = { + save_scope_as = teacher_tt + custom_tooltip = { + text = teacher_moves_to_capital_tt + add_character_flag = teacher_1 + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = just + scope:teacher_local_scholar.sum_of_all_skills_value > scope:teacher_my_house.sum_of_all_skills_value + scope:teacher_local_scholar.sum_of_all_skills_value > scope:teacher_powerful_family.sum_of_all_skills_value + } + modifier = { + factor = 2 + has_trait = humble + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < medium_treasury_or_gold_value + } + } + } + + option = { # Actually. How about you come work for me? + name = ep3_eparch_event.0015.d + + trigger = { + NOT = { exists = scope:teacher_my_house } + } + + change_influence = medium_influence_loss + add_courtier = scope:teacher_local_scholar + eparch_neglecting_duty_effect = yes + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = greedy + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 2 + has_trait = deceitful + } + modifier = { + factor = 0 + has_trait = content + } + modifier = { # The AI shouldn't spend influence it doesn't have + factor = 0 + influence < medium_influence_value + } + } + } + + option = { # They will have to make do for now. + name = ep3_eparch_event.0015.e + + eparch_neglecting_duty_effect = yes + + ai_chance = { + base = 10 + + modifier = { + factor = 3 + has_trait = lazy + } + modifier = { + factor = 0 + has_trait = diligent + } + } + } +} + +### For Services Rendered +ep3_eparch_event.0020 = { + type = character_event + title = ep3_eparch_event.0020.t + desc = { + desc = ep3_eparch_event.0020.desc_intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:reward_gold + } + desc = ep3_eparch_event.0020.desc_gold + } + triggered_desc = { + trigger = { + exists = scope:reward_artifact + } + desc = ep3_eparch_event.0020.desc_artifact + } + triggered_desc = { + trigger = { + exists = scope:reward_hook_removal + } + desc = ep3_eparch_event.0020.desc_hook_removal + } + triggered_desc = { + trigger = { + exists = scope:reward_emperor_hook + } + desc = ep3_eparch_event.0020.desc_emperor_hook + } + } + } + theme = administrative + override_background = { reference = corridor_night } + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { + exists = scope:reward_gold + } + animation = betting + } + triggered_animation = { + trigger = { + exists = scope:reward_artifact + } + animation = inspect_weapon + } + triggered_animation = { + trigger = { + exists = scope:reward_hook_removal + } + animation = toast + } + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_right_portrait = scope:peer_with_hook + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + cooldown = { years = 20 } + + trigger = { + has_court_position = eparch_court_position + } + + weight_multiplier = { + base = 1 + + modifier = { # Neglecting your duty reduces the chance to receive rewards + add = { + value = var:eparch_neglecting_duty + multiply = -1 # To make this a negative value + divide = 100 # To make the value fit the scale + min = -0.8 + } + exists = var:eparch_neglecting_duty + } + } + + immediate = { + save_scope_as = eparch + liege = { + save_scope_as = emperor + capital_province = { + save_scope_as = capital + } + } + + # Generate a reward + hidden_effect = { + random_list = { + 10 = { # Gold + save_scope_as = reward_gold + } + 10 = { # Artifact + save_scope_as = reward_artifact + random_list = { # Randomize the artifact type + 10 = { + create_artifact_weapon_effect = { OWNER = root CREATOR = scope:emperor SET_WEAPON_TYPE = flag:artifact_weapon_type_axe } + } + 10 = { + create_artifact_weapon_effect = { OWNER = root CREATOR = scope:emperor SET_WEAPON_TYPE = flag:artifact_weapon_type_mace } + } + 10 = { + create_artifact_weapon_effect = { OWNER = root CREATOR = scope:emperor SET_WEAPON_TYPE = flag:artifact_weapon_type_sword } + } + 10 = { + create_artifact_armor_effect = { OWNER = root CREATOR = scope:emperor SET_ARMOR_TYPE = flag:no } + } + 10 = { + create_artifact_regalia_effect = { OWNER = root SMITH = scope:emperor } + } + 10 = { + create_artifact_crown_effect = { OWNER = root SMITH = scope:emperor } + } + 10 = { + create_artifact_brooch_effect = { OWNER = root SMITH = scope:emperor } + } + } + } + 10 = { # Hook Removal + trigger = { + liege = { + any_vassal = { + has_usable_hook = root + is_ai = yes + } + } + } + save_scope_as = reward_hook_removal + liege = { + random_vassal = { + limit = { + has_usable_hook = root + is_ai = yes + } + save_scope_as = peer_with_hook + } + } + } + 10 = { # Gain hook on emperor + trigger = { + can_add_hook = { + target = scope:emperor + type = favor_hook + } + } + save_scope_as = reward_emperor_hook + } + } + } + } + + option = { + name = ep3_eparch_event.0020.a + + # We apply the actual effects here, instead of in the immediate, because it looks better in-game + if = { # Add the gold + limit = { + exists = scope:reward_gold + } + add_gold = major_gold_value + } + if = { # We create the artifact above, but let's make sure we show it + limit = { + exists = scope:newly_created_artifact + } + scope:newly_created_artifact = { + show_as_tooltip = { + set_owner = root + } + } + } + if = { # Spend the hook on the peer-vassal + limit = { + exists = scope:reward_hook_removal + } + scope:peer_with_hook ?= { + use_hook = root + } + } + if = { # Add hook on emperor + limit = { + exists = scope:reward_emperor_hook + } + add_hook = { + target = scope:emperor + type = favor_hook + } + } + + ai_chance = { + base = 10 + } + } +} + +### Eparch: Neglect of Duty +ep3_eparch_event.9000 = { + type = character_event + title = ep3_eparch_event.9000.t + desc = ep3_eparch_event.9000.desc + theme = emperor + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:eparch + animation = shame + } + + trigger = { + employs_court_position = eparch_court_position + OR = { + NOT = { exists = var:eparch_neglecting_duty } + AND = { + exists = var:eparch_neglecting_duty + var:eparch_neglecting_duty <= 10 + } + } + } + + immediate = { + # Let's make sure we have all of our scopes + if = { + limit = { + NOT = { exists = scope:eparch } + } + random_court_position_holder = { + type = eparch_court_position + save_scope_as = eparch + } + } + if = { + limit = { + NOT = { exists = scope:emperor } + } + save_scope_as = emperor + } + if = { + limit = { + NOT = { exists = scope:capital } + } + capital_province = { save_scope_as = capital } + } + } + + option = { # Unacceptable! Have them fired at once! + name = ep3_eparch_event.9000.a + + show_as_tooltip = { + revoke_court_position = { + recipient = scope:eparch + court_position = eparch_court_position + } + scope:eparch = { + change_influence = massive_influence_loss + } + } + add_dread = 10 + if = { + limit = { + scope:eparch = { has_hook = root } + } + custom_tooltip = eparch_hook_warning + change_influence = major_influence_loss + } + scope:eparch = { + save_scope_as = eparch_is_fired + trigger_event = ep3_eparch_event.9001 + } + + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = minor_stress_impact_gain + wrathful = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 3 + has_trait = wrathful + } + modifier = { + factor = 3 + has_trait = vengeful + } + modifier = { + factor = 2 + has_trait = callous + } + modifier = { + factor = 2 + has_trait = impatient + } + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 0 + scope:eparch = { has_hook = root } + } + } + } + + option = { # Consider this a warning. But you will owe me! + name = ep3_eparch_event.9000.b + + change_influence = medium_influence_gain + + show_as_tooltip = { + if = { # If the eparch has a hook on us, spend that hook + limit = { + scope:eparch = { has_hook = root } + } + scope:eparch = { use_hook = root } + } + else_if = { # Otherwise, let's add a hook on the eparch if we can + limit = { + can_add_hook = { + type = favor_hook + target = scope:eparch + } + } + add_hook = { + type = favor_hook + target = scope:eparch + } + } + } + scope:eparch = { + save_scope_as = eparch_is_warned + trigger_event = ep3_eparch_event.9001 + } + + stress_impact = { + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + + modifier = { + factor = 4 + has_trait = deceitful + } + modifier = { + factor = 2 + has_trait = patient + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 0 + has_trait = honest + } + } + } + + option = { # I will turn a blind eye to this. For now. + name = ep3_eparch_event.9000.c + + scope:eparch = { + save_scope_as = eparch_gets_away_with_it + trigger_event = ep3_eparch_event.9001 + } + + stress_impact = { + vengeful = medium_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + + modifier = { + factor = 4 + has_trait = trusting + } + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 2 + has_trait = humble + } + modifier = { + factor = 1.5 + has_trait = craven + } + modifier = { + factor = 1.5 + has_trait = shy + } + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = just + } + } + } + } +} + +# Notify Eparch of liege's action +ep3_eparch_event.9001 = { + type = character_event + title = ep3_eparch_event.9000.t + desc = { + triggered_desc = { + trigger = { + OR = { + exists = scope:eparch_is_fired + exists = scope:eparch_is_warned + } + } + desc = ep3_eparch_event.9001.intro + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:eparch_is_fired + } + desc = ep3_eparch_event.9001.desc_fired + } + triggered_desc = { + trigger = { + exists = scope:eparch_is_warned + } + desc = ep3_eparch_event.9001.desc_warned + } + desc = ep3_eparch_event.9001.desc_nothing + } + } + theme = administrative + override_background = { reference = throne_room_scope } + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:eparch_is_fired + } + animation = stress + } + triggered_animation = { + trigger = { + exists = scope:eparch_is_warned + } + animation = worry + } + animation = shame + } + right_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { + exists = scope:eparch_is_fired + } + animation = dismissal + } + triggered_animation = { + trigger = { + exists = scope:eparch_is_warned + } + animation = scheme + } + animation = disapproval + } + + trigger = { + scope:emperor = { is_alive = yes } + scope:eparch = { is_alive = yes } + } + + immediate = { + scope:emperor = { save_scope_as = background_throne_room_scope } + } + + option = { # What? FIRED!? + name = ep3_eparch_event.9001.a + + trigger = { + exists = scope:eparch_is_fired + } + + change_influence = massive_influence_loss + scope:emperor = { + revoke_court_position = { + recipient = scope:eparch + court_position = eparch_court_position + } + } + } + + option = { # Well, that could have ended much worse I suppose. + name = ep3_eparch_event.9001.b + + trigger = { + exists = scope:eparch_is_warned + } + + if = { # If the eparch has a hook on the emperor, spend that hook + limit = { + has_hook = scope:emperor + } + use_hook = scope:emperor + } + else_if = { # Otherwise, let's add a hook on the eparch if we can + limit = { + scope:emperor = { + can_add_hook = { + type = favor_hook + target = scope:eparch + } + } + } + scope:emperor = { + add_hook = { + type = favor_hook + target = scope:eparch + } + } + } + } + + option = { # I can consider myself lucky. + name = ep3_eparch_event.9001.c + + trigger = { + NOR = { + exists = scope:eparch_is_fired + exists = scope:eparch_is_warned + } + } + + change_influence = minor_influence_gain + } +} diff --git a/N3OW/events/dlc/ep3/ep3_governor_yearly_3.txt b/N3OW/events/dlc/ep3/ep3_governor_yearly_3.txt new file mode 100644 index 00000000..0d2b5207 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_governor_yearly_3.txt @@ -0,0 +1,9178 @@ +namespace = ep3_governor_yearly + +################################################## +# EP3 Governor Events +# by Jason Cantalini + + +##################################### +# Pastures New # +# by Jason Cantalini # +# 3001 # +##################################### + +#Your newly bought lands and the poor local governor inspire you to... avarice +ep3_governor_yearly.3001 = { + type = character_event + title = ep3_governor_yearly.3001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + NOT = { has_trait = cynical } + } + desc = ep3_governor_yearly.3001.desc_christian + } + desc = ep3_governor_yearly.3001.desc_other + } + desc = ep3_governor_yearly.3001.desc_mid + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_greek } + } + desc = ep3_governor_yearly.3001.desc_greek + } + desc = ep3_governor_yearly.3001.desc_non_greek + } + desc = ep3_governor_yearly.3001.desc + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_garden + } + desc = ep3_governor_yearly.3001.desc_garden + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_garden_leisure + } + desc = ep3_governor_yearly.3001.desc_garden_leisure + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_garden_fruit + } + desc = ep3_governor_yearly.3001.desc_garden_fruit + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_grazing_land + } + desc = ep3_governor_yearly.3001.desc_grazing_land + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_horse_pasture + } + desc = ep3_governor_yearly.3001.desc_horse_pasture + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_camel_pasture + } + desc = ep3_governor_yearly.3001.desc_camel_pasture + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_grain_field + } + desc = ep3_governor_yearly.3001.desc_grain_field + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_vineyard + } + desc = ep3_governor_yearly.3001.desc_vineyard + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_olive + } + desc = ep3_governor_yearly.3001.desc_olive + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_silk + } + desc = ep3_governor_yearly.3001.desc_silk + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_tea + } + desc = ep3_governor_yearly.3001.desc_tea + } + } + } + theme = administrative + override_background = { + trigger = { + OR = { + has_character_flag = domicile_new_built_garden + has_character_flag = domicile_new_built_garden_leisure + has_character_flag = domicile_new_built_garden_fruit + } + } + reference = garden + } + override_background = { + trigger = { + OR = { + has_character_flag = domicile_new_built_garden + has_character_flag = domicile_new_built_garden_leisure + has_character_flag = domicile_new_built_garden_fruit + } + } + reference = garden + } + override_background = { + trigger = { + OR = { + has_character_flag = domicile_new_built_grazing_land + has_character_flag = domicile_new_built_horse_pasture + has_character_flag = domicile_new_built_camel_pasture + } + scope:root_domicile_province = { + OR = { + terrain = drylands + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = floodplains + } + } + } + reference = drylands + } + override_background = { + trigger = { + OR = { + has_character_flag = domicile_new_built_grazing_land + has_character_flag = domicile_new_built_horse_pasture + has_character_flag = domicile_new_built_camel_pasture + } + scope:root_domicile_province = { + OR = { + terrain = plains + terrain = farmlands + terrain = wetlands + terrain = jungle + } + } + } + reference = plains + } + override_background = { + trigger = { + OR = { + has_character_flag = domicile_new_built_grazing_land + has_character_flag = domicile_new_built_horse_pasture + has_character_flag = domicile_new_built_camel_pasture + } + scope:root_domicile_province = { + OR = { + terrain = mountains + terrain = hills + terrain = forest + terrain = taiga + } + } + } + reference = ep2_travel_settlement_hills + } + #Farm/orchard type ones + override_background = { + trigger = { + NOR = { + has_character_flag = domicile_new_built_grazing_land + has_character_flag = domicile_new_built_horse_pasture + has_character_flag = domicile_new_built_camel_pasture + has_character_flag = domicile_new_built_garden + has_character_flag = domicile_new_built_garden_leisure + has_character_flag = domicile_new_built_garden_fruit + } + scope:root_domicile_province = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + terrain = oasis + terrain = floodplains + } + } + } + reference = ep2_travel_settlement_desert + } + override_background = { + trigger = { + NOR = { + has_character_flag = domicile_new_built_grazing_land + has_character_flag = domicile_new_built_horse_pasture + has_character_flag = domicile_new_built_camel_pasture + has_character_flag = domicile_new_built_garden + has_character_flag = domicile_new_built_garden_leisure + has_character_flag = domicile_new_built_garden_fruit + } + scope:root_domicile_province = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + terrain = oasis + terrain = floodplains + } + } + } + reference = ep2_travel_settlement_farm + } + + left_portrait = { + character = root + animation = happy_teacher + } + lower_right_portrait = { + character = scope:governor + } + + cooldown = { + years = 10 + } + + trigger = { + has_ep3_dlc_trigger = yes + government_has_flag = government_is_administrative + any_held_title = { + is_noble_family_title = yes + } + domicile.domicile_location.county.holder = { + government_has_flag = government_is_administrative + governor_efficiency <= 0.75 + NOR = { + this = root + liege ?= root + top_liege = root + this = root.top_liege + is_at_war_with = root + root = { + has_dread_level_towards = { + target = prev + level >= 2 + } + } + } + highest_held_title_tier >= root.highest_held_title_tier + highest_held_title_tier >= tier_duchy + } + is_available_allow_travelling = yes + age >= 14 + } + + immediate = { + domicile.domicile_location = { + save_scope_as = root_domicile_province + duchy = { + save_scope_as = target_theme + } + } + domicile.domicile_location.county.holder = { + save_scope_as = governor + } + save_scope_as = landlord + } + + #The governor is useless! Time to snap up lots of land + option = { + name = ep3_governor_yearly.3001.a + flavor = ep3_governor_yearly.3001.a.flavor + + custom_tooltip = ep3_governor_yearly.3001.a_govs_low + change_influence = minor_influence_loss + + remove_short_term_gold = medium_gold_value + + #Gotta be a shark if you want hella real domicile + duel = { + skills = { stewardship intrigue } + target = scope:governor + 60 = { #The governor is useless and you are a great landlord + desc = ep3_governor_yearly.3001.a_success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -59 + } + modifier = { + influence_level >= 3 + add = 20 + } + modifier = { + influence_level >= 4 + add = 40 + } + modifier = { + governor_efficiency >= 1.25 + add = 20 + } + + send_interface_toast = { + title = ep3_governor_yearly.3001.a_success + left_icon = root + right_icon = scope:governor + house = { + add_house_modifier = { + modifier = vast_tracts_of_land_modifier + years = 50 + } + } + if = { + limit = { + has_lifestyle = intrigue_lifestyle + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + else = { + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + } + } + 40 = { #You look like a treasonous fool + desc = ep3_governor_yearly.3001.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + modifier = { + influence_level <= 1 + add = 20 + } + modifier = { + governor_efficiency <= 0.75 + add = 20 + } + send_interface_toast = { + title = ep3_governor_yearly.3001.a_failure + left_icon = root + right_icon = scope:governor + add_prestige = minor_prestige_loss + custom_tooltip = ep3_governor_yearly.3001.b_gov_response + #governor chooses how to react + scope:governor = { + trigger_event = { + id = ep3_governor_yearly.3002 + days = 30 + } + } + } + #keep track of how much land the governor notices missing + add_character_flag = vast_lands_stolen + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + content = major_stress_impact_gain + humble = medium_stress_impact_gain + just = major_stress_impact_gain + generous = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -1 + } + modifier = { + add = -100 + OR = { + intrigue <= low_skill_rating + stewardship <= low_skill_rating + AND = { + intrigue <= medium_skill_rating + stewardship <= medium_skill_rating + } + } + } + modifier = { + add = 100 + OR = { + intrigue >= very_high_skill_rating + stewardship >= very_high_skill_rating + AND = { + intrigue >= decent_skill_rating + stewardship >= decent_skill_rating + } + } + } + modifier = { + add = -100 + scope:governor = { + OR = { + intrigue >= very_high_skill_rating + stewardship >= very_high_skill_rating + AND = { + intrigue >= medium_skill_rating + stewardship >= medium_skill_rating + } + } + } + } + modifier = { + add = -100 + scope:governor = { + OR = { + intrigue <= low_skill_rating + stewardship <= low_skill_rating + AND = { + intrigue <= medium_skill_rating + stewardship <= medium_skill_rating + } + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + has_trait = just + has_trait = generous + has_trait = patient + short_term_gold <= medium_gold_value + AND = { + intrigue <= low_skill_rating + stewardship <= low_skill_rating + } + } + } + } + } + #Sneak yourself some tenants you maybe shouldn't get + option = { + name = ep3_governor_yearly.3001.b + flavor = ep3_governor_yearly.3001.b.flavor + house = { + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + if = { + limit = { + has_lifestyle = intrigue_lifestyle + } + add_intrigue_lifestyle_xp = minor_lifestyle_xp + } + else = { + add_stewardship_lifestyle_xp = minor_lifestyle_xp + } + remove_short_term_gold = minor_gold_value + change_influence = miniscule_influence_loss + custom_tooltip = ep3_governor_yearly.3001.b_gov_response + #governor chooses how to react + scope:governor = { + trigger_event = { + id = ep3_governor_yearly.3002 + days = 30 + } + } + + stress_impact = { + content = medium_stress_impact_gain + humble = medium_stress_impact_gain + just = medium_stress_impact_gain + patient = miniscule_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + has_trait = just + has_trait = patient + } + } + } + } + #Offer help to the governor to stop other landlords + option = { + name = ep3_governor_yearly.3001.c + flavor = ep3_governor_yearly.3001.c.flavor + + change_influence = minor_influence_gain + increase_governance_effect = { VALUE = 10 } + scope:governor = { + increase_governance_effect = { VALUE = 5 } + } + reverse_add_opinion = { + target = scope:governor + modifier = grateful_opinion + opinion = 20 + } + + stress_impact = { + greedy = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + arrogant = miniscule_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -1 + ai_honor = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = arbitrary + has_trait = ambitious + has_trait = arrogant + } + } + } + } +} + +##################################### +# Taxpayers to Tenants # +# by Jason Cantalini # +# 3002 # +##################################### + +scripted_trigger ep3_governor_yearly_3002_tax_farmer_trigger = { + age >= 18 + is_available = yes + save_temporary_scope_as = tax_farmer + root.faith = { + has_dominant_ruling_gender = scope:tax_farmer + } + NOT = { + this = root.cp:councillor_court_chaplain + } +} + +#A landholder is snapping up your taxpayers' properties! +ep3_governor_yearly.3002 = { + type = character_event + title = ep3_governor_yearly.3002.t + desc = { + desc = ep3_governor_yearly.3002.desc + first_valid = { + triggered_desc = { + trigger = { + scope:tax_farmer.culture = { has_cultural_pillar = language_greek } + } + desc = ep3_governor_yearly.3002_insult_greek + } + triggered_desc = { + trigger = { + scope:tax_farmer.culture = { has_cultural_pillar = language_armenian } + scope:landlord = { + is_female = no + } + } + desc = ep3_governor_yearly.3002_insult_armenian + } + desc = ep3_governor_yearly.3002_insult_generic + } + desc = ep3_governor_yearly.3002.desc_mid + first_valid = { + triggered_desc = { + trigger = { + scope:landlord = { has_character_flag = vast_lands_stolen } + } + desc = ep3_governor_yearly.3002_half_duchy + } + desc = ep3_governor_yearly.3002_some_of_duchy + } + desc = ep3_governor_yearly.3002.desc_outro + } + + theme = administrative + override_background = { + reference = study + } + left_portrait = { + character = root + animation = reading + camera = camera_event_left_forward + } + right_portrait = { + character = scope:tax_farmer + animation = debating + } + lower_right_portrait = { + character = scope:landlord + } + + trigger = { + scope:landlord = { + is_alive = yes + } + } + + immediate = { + #need to grab some mook to be the face of tax collection + if = { + limit = { + any_vassal_or_below = { + OR = { + any_held_title = { + this = scope:root_domicile_province.barony + } + any_vassal = { + any_held_title = { + this = scope:root_domicile_province.barony + } + } + } + age >= 18 + is_available = yes + NOR = { + government_has_flag = government_is_theocracy + this = root.cp:councillor_court_chaplain + this = scope:landlord + } + } + } + random_vassal_or_below = { + limit = { + OR = { + any_held_title = { + this = scope:root_domicile_province.barony + } + any_vassal = { + any_held_title = { + this = scope:root_domicile_province.barony + } + } + } + age >= 18 + is_available = yes + NOR = { + government_has_flag = government_is_theocracy + this = root.cp:councillor_court_chaplain + this = scope:landlord + } + } + save_scope_as = tax_farmer + } + } + if = { + limit = { + NOT = { + exists = scope:tax_farmer + } + } + top_liege = { + random_vassal = { + limit = { + is_landless_administrative = yes + age >= 18 + is_available = yes + this != scope:landlord + domicile.domicile_location.duchy = { + this = scope:target_theme + } + } + save_scope_as = tax_farmer + } + } + } + if = { + limit = { + NOT = { + exists = scope:tax_farmer + } + } + random_courtier_or_guest = { + limit = { ep3_governor_yearly_3002_tax_farmer_trigger = yes } + save_scope_as = tax_farmer + } + } + if = { + limit = { + NOT = { + exists = scope:tax_farmer + } + } + random_pool_character = { + province = root.capital_province + limit = { ep3_governor_yearly_3002_tax_farmer_trigger = yes } + save_scope_as = tax_farmer + } + } + if = { + limit = { + NOT = { + exists = scope:tax_farmer + } + } + create_character = { + template = estate_owner_character + location = root.capital_province + save_scope_as = tax_farmer + } + scope:tax_farmer = { + add_character_flag = temp_character + } + } + } + + #I HAVE THE INFLUENCE TO SEE HIS ASS PUT IN JAIL + option = { + trigger = { + OR = { + influence_level >= 3 + scope:landlord = { + is_landed = no + } + } + } + name = ep3_governor_yearly.3002.a + flavor = ep3_governor_yearly.3002.a.flavor + reason = influence_level + #You have to exert yourself more to frame someone who didn't grab much land + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + change_influence = minor_influence_loss + } + else = { + change_influence = medium_influence_loss + } + + #downgrade the landlord's lands from what they should be - will be actually changed in mirror event + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + } + else = { + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = some_smallholds_modifier + years = 50 + } + } + } + } + #He's a criminal now + add_opinion = { + modifier = stolen_land_opinion + target = scope:landlord + } + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:landlord } + } + if = { + limit = { has_relation_potential_rival = scope:landlord + } + add_character_flag = governor_becomes_rival + } + else = { + add_character_flag = governor_becomes_potential_rival + show_as_tooltip = { + progress_towards_rival_effect = { + REASON = rival_accused_of_stealing_land + CHARACTER = scope:landlord + OPINION = 0 + } + } + reverse_add_opinion = { + modifier = angry_opinion + target = scope:landlord + opinion = -30 + } + } + } + else = { + reverse_add_opinion = { + target = scope:landlord + modifier = angry_opinion + opinion = -30 + } + } + add_character_flag = governor_accuses_crime + + + stress_impact = { + vengeful = minor_stress_impact_loss + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + humble = miniscule_stress_impact_gain + } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_honor = -1 + ai_vengefulness = 1 + } + modifier = { + factor = 3 + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = honest + has_trait = forgiving + has_trait = compassionate + has_trait = patient + has_trait = humble + influence <= minor_influence_value + } + } + } + } + #You're gonna be mean to the peasants regardless + option = { + trigger = { + OR = { + dread >= 40 + has_trait = sadistic + has_trait = arbitrary + } + } + name = ep3_governor_yearly.3002.b + flavor = ep3_governor_yearly.3002.b.flavor + + scope:root_domicile_province.county = { + add_county_modifier = { + modifier = taxed_and_pressganged_tenants_modifier + years = 10 + } + } + add_dread = minor_dread_gain + add_character_flag = governor_uses_force + #downgrade landlord's new lands again + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + } + else = { + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = some_smallholds_modifier + years = 50 + } + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + content = minor_stress_impact_gain + generous = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = content + has_trait = generous + has_trait = forgiving + has_trait = just + } + } + } + } + #You can try to make a scandal of this to save some face + option = { + name = ep3_governor_yearly.3002.c + flavor = ep3_governor_yearly.3002.c.flavor + + #governor loses more or less governor efficiency based on scale of lands + #Show correct amount of lands that landlord got + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + add_character_flag = { + flag = ep3_governor_yearly_3002_landlord_wins + years = 10 + } + custom_tooltip = ep3_governor_yearly.3000_governance_loss + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = vast_tracts_of_land_modifier + years = 50 + } + } + } + } + else = { + add_character_flag = { + flag = ep3_governor_yearly_3002_landlord_fight + years = 10 + } + custom_tooltip = ep3_governor_yearly.3000_miniscule_governance_loss + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + } + + #Embarrass the landlord + scope:landlord = { + add_prestige = minor_prestige_loss + } + + reverse_add_opinion = { + modifier = annoyed_opinion + target = scope:landlord + opinion = -20 + } + add_character_flag = governor_scandalizes + + stress_impact = { + forgiving = minor_stress_impact_gain + generous = miniscule_stress_impact_gain + arbitrary = miniscule_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = arbitrary + has_trait = forgiving + } + } + } + } + #Well played, landholder. Well played. + option = { + name = ep3_governor_yearly.3002.d + flavor = ep3_governor_yearly.3002.d.flavor + + #governor loses more or less governor efficiency based on scale of lands + #Show correct amount of lands that landlord got + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + add_character_flag = { + flag = ep3_governor_yearly_3002_landlord_dominates + years = 10 + } + custom_tooltip = ep3_governor_yearly.3000_major_governance_loss + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = vast_tracts_of_land_modifier + years = 50 + } + } + } + } + else = { + add_character_flag = { + flag = ep3_governor_yearly_3002_landlord_wins + years = 10 + } + custom_tooltip = ep3_governor_yearly.3000_governance_loss + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + } + change_influence = minor_influence_gain + scope:landlord = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + add_character_flag = governor_backs_down + + stress_impact = { + vengeful = medium_stress_impact_gain + diligent = minor_stress_impact_gain + greedy = miniscule_stress_impact_gain + arrogant = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_vengefulness = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = vengeful + has_trait = arrogant + has_trait = wrathful + has_trait = diligent + } + } + } + } + after = { + #Get rid of a guy we just created + if = { + limit = { + scope:tax_farmer = { + has_character_flag = temp_character + } + #but only if root isn't a player with watchful eyes of flesh + is_ai = yes + } + scope:tax_farmer = { + silent_disappearance_effect = yes + } + } + #mirror letter event to end chain + scope:landlord = { + trigger_event = { + id = ep3_governor_yearly.3003 + days = 1 + } + } + } +} + +# 3003 +#The governor has a reply for you +ep3_governor_yearly.3003 = { + type = letter_event + opening = ep3_governor_yearly.3003.t + desc = { + first_valid = { + #desc is based on governor's response + triggered_desc = { + trigger = { + scope:governor = { has_character_flag = governor_accuses_crime } + } + desc = ep3_governor_yearly.3003.desc_accused_of_crime + } + triggered_desc = { + trigger = { + scope:governor = { has_character_flag = governor_uses_force } + } + desc = ep3_governor_yearly.3003.desc_force_used + } + triggered_desc = { + trigger = { + scope:governor = { has_character_flag = governor_scandalizes } + } + desc = ep3_governor_yearly.3003.desc_scandal + } + triggered_desc = { + trigger = { + scope:governor = { has_character_flag = governor_backs_down } + } + desc = ep3_governor_yearly.3003.desc_backs_down + } + } + } + sender = scope:governor + + trigger = { + scope:governor = { + OR = { + has_character_flag = governor_accuses_crime + has_character_flag = governor_uses_force + has_character_flag = governor_scandalizes + has_character_flag = governor_backs_down + } + is_alive = yes + } + } + + immediate = { + #Need to show effects from mirror event and potentially downgrade the landlord's new lands modifier + if = { + limit = { + scope:governor = { has_character_flag = governor_accuses_crime } + } + #Need to actually do the modifier switch, since the last event doesn't + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + scope:landlord.house = { + remove_house_modifier = vast_tracts_of_land_modifier + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + else = { + scope:landlord.house = { + remove_house_modifier = productive_lands_modifier + add_house_modifier = { + modifier = some_smallholds_modifier + years = 50 + } + } + } + show_as_tooltip = { + scope:governor = { + add_opinion = { + modifier = stolen_land_opinion + target = scope:landlord + } + } + if = { + limit = { + scope:governor = { has_character_flag = governor_becomes_rival } + } + scope:governor = { + set_relation_rival = { + target = root + reason = rival_accused_of_stealing_land + } + } + } + else_if = { + limit = { + scope:governor = { has_character_flag = governor_becomes_potential_rival } + } + scope:governor = { + progress_towards_rival_effect = { + REASON = rival_accused_of_stealing_land + CHARACTER = scope:landlord + OPINION = 0 + } + } + } + } + } + else_if = { + limit = { + scope:governor = { has_character_flag = governor_uses_force } + } + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + scope:landlord.house = { + remove_house_modifier = vast_tracts_of_land_modifier + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + else = { + scope:landlord.house = { + remove_house_modifier = productive_lands_modifier + add_house_modifier = { + modifier = some_smallholds_modifier + years = 50 + } + } + } + reverse_add_opinion = { + modifier = angry_opinion + target = scope:governor + opinion = -20 + } + show_as_tooltip = { + scope:root_domicile_province.county = { + add_county_modifier = { + modifier = taxed_and_pressganged_tenants_modifier + years = 10 + } + } + } + } + else_if = { + limit = { + scope:governor = { has_character_flag = governor_scandalizes } + } + add_prestige = minor_prestige_loss + reverse_add_opinion = { + modifier = angry_opinion + target = scope:governor + opinion = -20 + } + } + } + + option = { + name = { + trigger = { + scope:governor = { has_character_flag = governor_accuses_crime } + } + text = ep3_governor_yearly.3003.a_accused_of_crime + } + name = { + trigger = { + scope:governor = { has_character_flag = governor_uses_force } + } + text = ep3_governor_yearly.3003.a_force_used + } + name = { + trigger = { + scope:governor = { has_character_flag = governor_accuses_crime } + } + text = ep3_governor_yearly.3003.a_accused_of_crime + } + name = { + trigger = { + scope:governor = { has_character_flag = governor_backs_down } + } + text = ep3_governor_yearly.3003.a_backs_down + } + if = { + limit = { + scope:governor = { has_character_flag = governor_backs_down } + } + #give landlord some prestige because he got away with his shenanigans + add_prestige = miniscule_prestige_gain + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = 0.25 + } + } + } + after = { + #clean up flags from the event chain + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + scope:landlord = { + remove_character_flag = vast_lands_stolen + } + } + if = { + limit = { + scope:governor = { + has_character_flag = governor_accuses_crime + } + } + scope:governor = { + remove_character_flag = governor_accuses_crime + } + } + if = { + limit = { + scope:governor = { + has_character_flag = governor_uses_force + } + } + scope:governor = { + remove_character_flag = governor_uses_force + } + } + if = { + limit = { + scope:governor = { + has_character_flag = governor_scandalizes + } + } + scope:governor = { + remove_character_flag = governor_scandalizes + } + } + if = { + limit = { + scope:governor = { + has_character_flag = governor_backs_down + } + } + scope:governor = { + remove_character_flag = governor_backs_down + } + } + } +} + +##################################### +# Still, the Basileus Fights # +# by Jason Cantalini # +# 3010 # +##################################### + +#A governor considers how to react to the emperor's longstanding, dragged-out war +ep3_governor_yearly.3010 = { + type = character_event + title = ep3_governor_yearly.3010.t + desc = { + desc = ep3_governor_yearly.3010.desc + first_valid = { + triggered_desc = { + trigger = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + desc = ep3_governor_yearly.3010.desc_defender + } + desc = ep3_governor_yearly.3010.desc_attacker + } + desc = ep3_governor_yearly.3010.desc_mid + first_valid = { + triggered_desc = { + trigger = { + OR = { + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score > 20 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score > 20 + } + } + } + } + desc = ep3_governor_yearly.3010.desc_winning + } + triggered_desc = { + trigger = { + OR = { + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score < -20 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score < -20 + } + } + } + } + desc = ep3_governor_yearly.3010.desc_losing + } + desc = ep3_governor_yearly.3010.desc_middling + } + } + + theme = emperor + override_background = { + reference = battlefield + } + override_effect_2d = { + reference = flies + } + left_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + animation = stayback + } + triggered_animation = { + trigger = { + scope:emperor = { + is_attacker_in_war = scope:war + } + } + animation = inspect_weapon + } + camera = camera_event_very_left + } + right_portrait = { + character = scope:foe + triggered_animation = { + trigger = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + animation = aggressive_mace + } + triggered_animation = { + trigger = { + scope:emperor = { + is_attacker_in_war = scope:war + } + } + animation = stayback + } + camera = camera_event_very_right + } + + trigger = { + is_governor = yes + is_imprisoned = no + exists = scope:war + liege ?= { + any_character_war = { + this = scope:war + attacker_war_score < 80 + defender_war_score < 80 + } + } + is_at_war = no + NOT = { + any_ally = { + is_at_war_with = liege + any_character_war = { + this = scope:war + } + } + } + age >= 12 + } + + immediate = { + save_scope_as = governor + liege = { + save_scope_as = emperor + } + scope:emperor = { + add_character_flag = need_military_outfit + } + if = { + limit = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + scope:war = { + primary_attacker = { + save_scope_as = foe + } + } + } + else = { + scope:war = { + primary_defender = { + save_scope_as = foe + } + } + } + scope:foe = { + add_character_flag = need_military_outfit + } + } + + #Join the emperor in this war + option = { + name = ep3_governor_yearly.3010.a + flavor = ep3_governor_yearly.3010.a.flavor + if = { + limit = { + scope:emperor = { + is_ai = yes + } + } + random_list = { + 50 = { #Emperor accepts your help + desc = ep3_governor_yearly.3010.a.success + + modifier = { + ep3_emperors_war_strength_value < ep3_emperors_foe_war_strength_value + add = 25 + } + modifier = { + ep3_emperors_war_strength_double_value < ep3_emperors_foe_war_strength_value + add = 100 + } + modifier = { + OR = { + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score < -20 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score < -20 + } + } + } + add = 50 + } + modifier = { + reverse_opinion = { + target = scope:emperor + value >= 50 + } + add = 25 + } + modifier = { + reverse_opinion = { + target = scope:emperor + value >= 80 + } + add = 25 + } + modifier = { + scope:emperor = { + gold <= 0 + } + add = 50 + } + modifier = { + scope:emperor = { + monthly_character_income < 0 + } + add = 75 + } + modifier = { + scope:emperor = { + ai_boldness < low_negative_ai_value + } + add = 50 + } + show_as_tooltip = { + ep3_governor_yearly_3010_war_aid_effect = yes + } + trigger_event = { + id = ep3_governor_yearly.3012 + days = 1 + } + } + 50 = { #Emperor turns down your help + desc = ep3_governor_yearly.3010.a.fail + modifier = { + current_military_strength < strong_governor_military_value + add = 25 + } + modifier = { + ep3_emperors_war_strength_value > ep3_emperors_foe_war_strength_value + add = 25 + } + modifier = { + ep3_emperors_war_strength_value > ep3_emperors_foe_war_strength_double_value + add = 100 + } + modifier = { + OR = { + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score > 20 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score > 20 + } + } + } + add = 50 + } + modifier = { + reverse_opinion = { + target = scope:emperor + value <= -30 + } + add = 25 + } + modifier = { + reverse_opinion = { + target = scope:emperor + value <= -60 + } + add = 25 + } + modifier = { + is_powerful_vassal = no + add = 25 + } + modifier = { + NOT = { + house = { + is_powerful_family = yes + } + } + add = 25 + } + modifier = { + scope:emperor = { + gold >= massive_gold_value + } + add = 25 + } + modifier = { + scope:emperor = { + ai_boldness > low_negative_ai_value + } + add = 50 + } + add_character_flag = governor_war_aid_deal_failed + trigger_event = { + id = ep3_governor_yearly.3012 + days = 1 + } + } + } + } + else = { + #Trigger letter event for player emperor + scope:emperor = { + trigger_event = { + id = ep3_governor_yearly.3011 + days = 1 + } + } + } + stress_impact = { + brave = miniscule_stress_impact_loss + diligent = minor_stress_impact_loss + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + ai_honor = 1 + } + modifier = { + add = -50 + OR = { + diplomacy <= low_skill_rating + intrigue <= low_skill_rating + } + } + #The war has been dragging on for more than 3 years + modifier = { + add = 50 + OR = { + scope:att_governor_5 ?= this + scope:att_governor_6 ?= this + scope:def_governor_5 ?= this + scope:def_governor_6 ?= this + } + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = content + has_trait = paranoid + has_trait = lazy + has_trait = disloyal + is_powerful_vassal = no + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score > 20 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score > 20 + } + } + } + } + } + } + #Foment unrest against the weak emperor + option = { + name = ep3_governor_yearly.3010.b + flavor = ep3_governor_yearly.3010.b.flavor + if = { + limit = { + is_powerful_vassal = yes + + scope:emperor = { + has_realm_law = acclamation_succession_law + } + NOR = { + has_claim_on = scope:emperor.primary_title + AND = { + culture = { + has_cultural_parameter = physical_disfigurement_blocks_inheritance + } + OR = { + has_trait = eunuch + has_trait = disfigured + has_trait = blind + } + } + AND = { + scope:emperor.culture = { + has_cultural_parameter = physical_disfigurement_blocks_inheritance + } + OR = { + has_trait = eunuch + has_trait = disfigured + has_trait = blind + } + } + } + } + if = { + limit = { + OR = { + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score > 50 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score > 50 + } + } + } + } + change_influence = massive_influence_loss + } + else = { + change_influence = major_influence_loss + } + + scope:emperor = { + send_interface_message = { + type = msg_governor_challenges_weakness + title = msg_claimed_weak_emperors_title.t + desc = msg_claimed_weak_emperors_title.flavor + right_icon = root + + root = { + add_unpressed_claim = scope:emperor.primary_title + progress_towards_rival_effect = { + REASON = rival_challenged_weak_emperor + CHARACTER = scope:emperor + OPINION = -50 + } + } + } + } + } + else = { + if = { + limit = { + is_a_faction_member = yes + } + scope:emperor = { + send_interface_message = { + type = msg_governor_challenges_weakness + title = msg_claimed_weak_emperors_title.t.2 + desc = msg_claimed_weak_emperors_title.flavor.2 + right_icon = root + root = { add_joined_faction_discontent = 30 } + } + } + } + else_if = { + limit = { + scope:emperor = { + has_realm_law = acclamation_succession_law + } + is_candidate_for_title_trigger = { + TITLE = scope:emperor.primary_title + CANDIDATE = root + } + NOT = { + has_character_flag = decried_weakness_score + + } + } + custom_tooltip = governor_challenges_weakness_candidate_score + add_character_flag = { + flag = decried_weakness_score + years = 5 + } + } + change_influence = medium_influence_gain + reverse_add_opinion = { + target = scope:emperor + modifier = angry_opinion + opinion = -25 + } + } + stress_impact = { + ambitious = miniscule_stress_impact_loss + forgiving = medium_stress_impact_gain + content = major_stress_impact_gain + humble = major_stress_impact_gain + trusting = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = 0.5 + } + #The war has been dragging on for more than 3 years + modifier = { + add = 100 + OR = { + scope:att_governor_5 ?= this + scope:att_governor_6 ?= this + scope:def_governor_5 ?= this + scope:def_governor_6 ?= this + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level <= 2 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level <= 1 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level >= 5 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level >= 4 + } + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = content + has_trait = humble + has_trait = trusting + has_trait = just + scope:att_governor_1 ?= this + scope:att_governor_2 ?= this + scope:def_governor_1 ?= this + scope:def_governor_2 ?= this + is_powerful_vassal = no + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score >= 0 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score >= 0 + } + } + } + } + } + } + #The emperor is distracted... time to extend my grasp here + option = { + name = ep3_governor_yearly.3010.c + flavor = ep3_governor_yearly.3010.c.flavor + increase_governance_effect = { VALUE = 10 } + add_character_modifier = { + modifier = ep3_exploited_weak_master_modifier + years = 10 + } + stress_impact = { + greedy = minor_stress_impact_loss + just = major_stress_impact_gain + diligent = major_stress_impact_gain + generous = medium_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = diligent + has_trait = generous + has_trait = honest + } + } + } + } + #I will make pious donations and pray for victory + option = { + name = ep3_governor_yearly.3010.d + add_piety = medium_piety_gain + remove_short_term_gold = minor_gold_value + stress_impact = { + zealous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = ambitious + } + } + } + } + after = { + scope:emperor = { + remove_character_flag = need_military_outfit + } + scope:foe = { + remove_character_flag = need_military_outfit + } + } +} + +#Player emperor chooses whether to accept governor's aid deal +ep3_governor_yearly.3011 = { + type = letter_event + opening = { + desc = ep3_governor_yearly.3011.opening + } + desc = ep3_governor_yearly.3011.desc + sender = scope:governor + + immediate = { + } + #Accept the exchange + option = { + name = ep3_governor_yearly.3011.a + show_as_tooltip = { + scope:governor = { + ep3_governor_yearly_3010_war_aid_effect = yes + } + } + stress_impact = { + craven = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + stubborn = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + brave = miniscule_stress_impact_gain + } + } + #Refuse the exchange + option = { + name = ep3_governor_yearly.3011.b + scope:governor = { add_character_flag = governor_war_aid_deal_failed } + stress_impact = { + craven = medium_stress_impact_gain + trusting = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + } + after = { + scope:governor = { + trigger_event = { + id = ep3_governor_yearly.3012 + days = 1 + } + } + } +} + +#Governor gets emperor's response +ep3_governor_yearly.3012 = { + type = letter_event + opening = { + desc = ep3_governor_yearly.3012.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = governor_war_aid_deal_failed + } + desc = ep3_governor_yearly.3012.desc_fail + } + desc = ep3_governor_yearly.3012.desc_success + } + } + sender = scope:emperor + + + #Alright then + option = { + + name = { + trigger = { + knows_language = language_greek + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + text = ep3_governor_yearly.3012.kyrie_eleison + } + name = { + trigger = { + NAND = { + knows_language = language_greek + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + NOT = { + has_character_flag = governor_war_aid_deal_failed + } + } + text = ep3_emperor_yearly.3011.a_to_war + } + name = { + trigger = { + NAND = { + knows_language = language_greek + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + has_character_flag = governor_war_aid_deal_failed + } + text = ep3_emperor_yearly.3011.a_no_war + } + if = { + limit = { + NOT = { + has_character_flag = governor_war_aid_deal_failed + } + } + ep3_governor_yearly_3010_war_aid_effect = yes + } + } + after = { + if = { + limit = { + has_character_flag = governor_war_aid_deal_failed + } + remove_character_flag = governor_war_aid_deal_failed + } + } +} + +##################################### +# God Appointed... Him? # +# by Jason Cantalini # +# 3020 # +##################################### + +#The emperor has an unacceptable trait and a governor wants to make a stink about it +ep3_governor_yearly.3020 = { + type = character_event + title = ep3_governor_yearly.3020.t + desc = { + desc = ep3_governor_yearly.3020.desc + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = condemning_physical_trait + } + desc = ep3_governor_yearly.3020.desc_physical + } + desc = ep3_governor_yearly.3020.desc_crime + } + } + + theme = emperor + override_background = { + reference = throne_room + } + left_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + + trigger = { + age >= 12 + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + OR = { + is_governor = yes + is_landless_administrative = yes + } + liege = { + NOR = { + has_character_flag = had_ep3_governor_yearly_3020 + has_character_modifier = emperor_repented_for_flaws_modifier + } + valid_for_byz_emperor_content_trigger = yes + save_temporary_scope_as = emperor_temp + legitimacy_level < 5 + government_has_flag = government_is_administrative + top_liege = this + OR = { + #Emperor has criminal trait + AND = { + has_trait = incestuous + NOT = { + root = { is_incestuous_trigger = yes } + } + trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + } + AND = { + has_trait = kinslayer + NOT = { + root = { has_trait = kinslayer } + } + } + AND = { + has_trait = adulterer + NOT = { + root = { has_trait = adulterer } + } + trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + } + AND = { + has_trait = fornicator + NOT = { + root = { + OR = { + has_trait = fornicator + has_trait = adulterer + } + } + } + trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + } + AND = { + has_trait = deviant + NOT = { + root = { is_deviant_trigger = yes } + } + trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + } + AND = { + has_trait = witch + NOT = { + root = { is_witch_trigger = yes } + } + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + } + AND = { + has_trait = sodomite + root = { + NOR = { + has_trait = sodomite + any_secret = { + type = secret_homosexual + } + } + } + trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + } + AND = { + has_trait = cannibal + NOT = { + root = { is_cannibal_trigger = yes } + } + trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + } + AND = { + root.culture = { + has_cultural_parameter = physical_disfigurement_blocks_inheritance + } + OR = { + has_trait = eunuch_1 + has_trait = beardless_eunuch + has_trait = blind + has_trait = maimed + has_trait = one_eyed + has_trait = one_legged + has_trait = hunchbacked + has_trait = dwarf + has_trait = incapable + has_trait = clubfooted + has_trait = disfigured + } + } + } + } + OR = { + is_ai = no + opinion = { + target = liege + value <= 40 + } + } + } + immediate = { + save_scope_as = minister + liege = { + save_scope_as = emperor + add_character_flag = { + flag = had_ep3_governor_yearly_3020 + years = 1 + } + random_list = { + 1 = { + trigger = { + has_trait = incestuous + NOT = { + root = { is_incestuous_trigger = yes } + } + trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = scope:emperor } + } + random_character_trait = { + limit = { + this = trait:incestuous + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = kinslayer + NOT = { + root = { has_trait = kinslayer } + } + } + random_character_trait = { + limit = { + OR = { + this = trait:kinslayer_1 + this = trait:kinslayer_2 + this = trait:kinslayer_3 + } + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = adulterer + NOT = { + root = { has_trait = adulterer } + } + trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = scope:emperor } + } + random_character_trait = { + limit = { + this = trait:adulterer + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = fornicator + NOT = { + root = { + OR = { + has_trait = fornicator + has_trait = adulterer + } + } + } + trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = root.faith GENDER_CHARACTER = scope:emperor } + } + random_character_trait = { + limit = { + this = trait:fornicator + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = deviant + NOT = { + root = { is_deviant_trigger = yes } + } + trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = scope:emperor } + } + random_character_trait = { + limit = { + this = trait:deviant + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = witch + NOT = { + root = { is_witch_trigger = yes } + } + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = scope:emperor } + } + random_character_trait = { + limit = { + this = trait:witch + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = sodomite + root = { + NOR = { + has_trait = sodomite + any_secret = { + type = secret_homosexual + } + } + } + trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:emperor } + } + random_character_trait = { + limit = { + this = trait:sodomite + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = cannibal + NOT = { + root = { is_cannibal_trigger = yes } + } + trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = scope:emperor } + } + random_character_trait = { + limit = { + this = trait:cannibal + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + root.culture = { + has_cultural_parameter = physical_disfigurement_blocks_inheritance + } + OR = { + has_trait = eunuch + has_trait = blind + has_trait = maimed + has_trait = one_eyed + has_trait = one_legged + has_trait = hunchbacked + has_trait = dwarf + has_trait = incapable + has_trait = clubfooted + has_trait = disfigured + } + } + random_character_trait = { + limit = { + OR = { + this = trait:eunuch_1 + this = trait:beardless_eunuch + this = trait:blind + this = trait:maimed + this = trait:one_eyed + this = trait:one_legged + this = trait:hunchbacked + this = trait:dwarf + this = trait:incapable + this = trait:clubfooted + this = trait:disfigured + } + } + save_scope_as = target_trait + root ={ add_character_flag = condemning_physical_trait } + } + } + } + } + } + #Secretly spread dissent and make the emperor a laughingstock + option = { + name = ep3_governor_yearly.3020.a + flavor = ep3_governor_yearly.3020.a.flavor + duel = { + skill = intrigue + target = scope:emperor + 55 = { #The gossips go wild heeding your words + desc = ep3_governor_yearly.3020.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -54 + } + modifier = { + add = 30 + influence_level >= 2 + } + modifier = { + add = 30 + influence_level >= 4 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.3020.a.success + left_icon = scope:emperor + add_intrigue_lifestyle_xp = medium_lifestyle_xp + change_influence = medium_influence_gain + #Emperor gets toast that they're losing influence + scope:emperor = { + send_interface_message = { + type = msg_unflattering_imperial_trait_gossip + title = msg_unflattering_imperial_trait_gossip.t + desc = msg_unflattering_imperial_trait_gossip.flavor + change_influence = minor_influence_loss + add_stress = miniscule_stress_gain + } + } + } + + } + 45 = { #No one pays you any heed + desc = ep3_governor_yearly.3020.a.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -44 + } + modifier = { + add = 30 + scope:emperor = { influence_level >= 2 } + } + modifier = { + add = 30 + scope:emperor = { influence_level >= 4 } + } + modifier = { + add = 30 + scope:emperor = { legitimacy_level >= 3 } + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3020.a.fail + left_icon = scope:emperor + add_stress = minor_stress_gain + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + trusting = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = -1 + } + modifier = { + add = 25 + intrigue >= high_skill_rating + scope:emperor = { + intrigue <= mediocre_skill_rating + } + } + modifier = { + add = -50 + intrigue <= mediocre_skill_rating + scope:emperor = { + intrigue >= high_skill_rating + } + } + modifier = { + factor = 0 + OR = { + intrigue <= low_skill_rating + scope:emperor = { + intrigue >= very_high_skill_rating + } + scope:emperor = { + dread >= 90 + } + scope:emperor = { + legitimacy_level >= 5 + } + has_trait = honest + has_trait = trusting + has_trait = compassionate + has_trait = forgiving + } + } + } + } + #I should write a letter of warning and urge the emperor to seek god's forgiveness + option = { + name = ep3_governor_yearly.3020.b + flavor = ep3_governor_yearly.3020.flavor + #Faction gains discontent + if = { + limit = { + is_a_faction_member = yes + } + add_joined_faction_discontent = 20 + add_prestige = minor_prestige_gain + } + else_if = { + limit = { + NOR = { + has_trait = eunuch + has_trait = blind + has_trait = maimed + has_trait = one_eyed + has_trait = one_legged + has_trait = hunchbacked + has_trait = dwarf + has_trait = incapable + has_trait = clubfooted + has_trait = disfigured + has_character_flag = insulted_trait_candidate_score + + } + is_candidate_for_title_trigger = { + TITLE = scope:emperor.primary_title + CANDIDATE = root + } + } + custom_tooltip = governor_insulted_imperial_trait_candidate_score + add_character_flag = { + flag = insulted_trait_candidate_score + years = 5 + } + } + else = { + add_prestige = medium_prestige_gain + add_piety = minor_piety_gain + } + #Increases powerful family rating + #Emperor loses prestige and legitimacy + show_as_tooltip = { + scope:emperor = { + add_prestige = minor_prestige_loss + add_legitimacy = minor_legitimacy_loss + } + } + reverse_add_opinion = { + modifier = insulted_opinion + target = scope:emperor + opinion = -30 + } + scope:emperor = { + trigger_event = { + id = ep3_governor_yearly.3021 + days = 1 + } + } + stress_impact = { + zealous = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 0.5 + ai_vengefulness = 0.5 + } + modifier = { + add = -50 + OR = { + scope:emperor = { + dread >= 25 + } + opinion = { + target = scope:emperor + value >= 20 + } + } + } + modifier = { + add = 50 + OR = { + scope:emperor = { + legitimacy_level <= 1 + } + opinion = { + target = scope:emperor + value < -50 + } + } + } + modifier = { + factor = 0 + OR = { + scope:emperor = { + dread > 50 + } + opinion = { + target = scope:emperor + value > 0 + } + has_trait = content + has_trait = forgiving + has_trait = compassionate + has_trait = content + } + } + } + } + #I'm just going to do my job and keep my nose clean + option = { + name = ep3_governor_yearly.3020.c + if = { + limit = { + is_governor = yes + } + increase_governance_effect = { VALUE = 5 } + } + else = { + add_gold = tiny_gold_value + } + stress_impact = { + vengeful = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_boldness = -0.5 + ai_zeal = -0.5 + ai_sociability = -0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = paranoid + has_trait = sadistic + has_trait = wrathful + has_trait = zealous + } + } + } + } +} + +#Emperor receives rude message from governor +ep3_governor_yearly.3021 = { + type = letter_event + opening = { + desc = ep3_governor_yearly.3021.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:minister = { has_character_flag = condemning_physical_trait } + } + desc = ep3_governor_yearly.3021.desc_physical + } + desc = ep3_governor_yearly.3021.desc_crime + } + } + sender = scope:minister + + immediate = { + show_as_tooltip = { + scope:minister = { + if = { + limit = { + is_a_faction_member = yes + } + add_joined_faction_discontent = 20 + add_prestige = minor_prestige_gain + } + else_if = { + limit = { + NOR = { + has_trait = eunuch + has_trait = blind + has_trait = maimed + has_trait = one_eyed + has_trait = one_legged + has_trait = hunchbacked + has_trait = dwarf + has_trait = incapable + has_trait = clubfooted + has_trait = disfigured + } + is_candidate_for_title_trigger = { + TITLE = scope:emperor.primary_title + CANDIDATE = root + } + } + custom_tooltip = governor_insulted_imperial_trait_candidate_score + add_character_flag = insulted_trait_candidate_score + } + else = { + add_prestige = medium_prestige_gain + add_piety = minor_piety_gain + } + } + } + add_prestige = minor_prestige_loss + add_legitimacy = minor_legitimacy_loss + custom_tooltip = ep3_governor_yearly.3021.bad_trait + } + + #I suppose I should seek God's favor + option = { + name = ep3_governor_yearly.3021.a + flavor = ep3_governor_yearly.3021.a.flavor + add_character_modifier = { + modifier = emperor_repented_for_flaws_modifier + years = 10 + } + custom_tooltip = ep3_governor_yearly.3021.blocker + add_prestige = medium_prestige_loss + stress_impact = { + zealous = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + arrogant = major_stress_impact_gain + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = -1 + ai_honor = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = stubborn + has_trait = wrathful + has_trait = arrogant + has_trait = vengeful + prestige < major_prestige_value + } + } + } + } + #Impertinence! + option = { + name = ep3_governor_yearly.3021.b + stress_impact = { + humble = miniscule_stress_impact_gain + zealous = miniscule_stress_impact_gain + trusting = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_boldness = 1 + ai_rationality = -1 + } + modifier = { + factor = 0.5 + OR = { + has_trait = humble + has_trait = zealous + has_trait = trusting + } + } + } + } + after = { + if = { + limit = { + scope:minister = { + has_character_flag = condemning_physical_trait + } + } + scope:minister = { + remove_character_flag = condemning_physical_trait + } + } + } +} + +##################################### +# Quiet Times # +# by Jason Cantalini # +# 3030 # +##################################### + +#The empire has been at peace for years and prosperity is growing +ep3_governor_yearly.3030 = { + type = character_event + title = ep3_governor_yearly.3030.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = ep3_governor_yearly.3030.desc_christian + } + desc = ep3_governor_yearly.3030.desc_generic + } + desc = ep3_governor_yearly.3030.desc + } + theme = administrative + override_background = { + trigger = { + location.culture ?= { has_graphical_mediterranean_culture_group_trigger = yes } + } + reference = estate + } + override_background = { + trigger = { + NOT = { + location.culture ?= { has_graphical_mediterranean_culture_group_trigger = yes } + } + } + reference = courtyard + } + left_portrait = { + character = root + animation = writing + } + lower_right_portrait = scope:emperor + + trigger = { + basic_is_valid_for_yearly_events_trigger = yes + is_landed = yes + government_allows = administrative + top_liege != this + years_from_game_start >= 4 + is_at_war = no + age >= 12 + capital_county = { + county_control >= 100 + } + primary_title = { + NOT = { + has_variable = admin_war_aftermath_var + } + } + top_liege = { + is_at_war = no + primary_title = { + NOT = { + has_variable = admin_war_aftermath_var + } + } + capital_county = { + county_control >= 100 + } + } + OR = { + liege = root.top_liege + liege = { + is_at_war = no + primary_title = { + NOT = { + has_variable = admin_war_aftermath_var + } + } + } + } + NOT = { + any_sub_realm_county = { + any_province = { + any_province_epidemic = { } + } + } + } + } + immediate = { + top_liege = { + save_scope_as = emperor + } + } + #We will become soft if we do not fight + option = { + name = ep3_governor_yearly.3030.a + flavor = ep3_governor_yearly.3030.a.flavor + trigger = { + OR = { + any_neighboring_top_liege_realm_owner = { + any_realm_county = { + any_neighboring_county = { + OR = { + holder = root + holder.liege = root + } + } + } + } + NOT = { + has_character_flag = warmongering_admin + } + } + } + if = { + limit = { + NOT = { + has_character_flag = warmongering_admin + } + } + #You get access to a CB...? + add_character_flag = warmongering_admin + custom_tooltip = access_to_admin_raid_tooltip + custom_tooltip = admin_raid_gives_modifier_tooltip + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_loyal_troops_raid_modifier + } + } + add_character_modifier = ep3_loyal_troops_raid_modifier + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_loyal_troops_2_raid_modifier + } + } + add_character_modifier = ep3_loyal_troops_2_raid_modifier + remove_character_modifier = ep3_loyal_troops_raid_modifier + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_loyal_troops_3_raid_modifier + } + } + add_character_modifier = ep3_loyal_troops_3_raid_modifier + remove_character_modifier = ep3_loyal_troops_2_raid_modifier + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_loyal_troops_4_raid_modifier + } + } + add_character_modifier = ep3_loyal_troops_4_raid_modifier + remove_character_modifier = ep3_loyal_troops_3_raid_modifier + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_loyal_troops_5_raid_modifier + } + } + add_character_modifier = ep3_loyal_troops_5_raid_modifier + remove_character_modifier = ep3_loyal_troops_4_raid_modifier + } + else = { + add_martial_lifestyle_xp = medium_lifestyle_xp + } + stress_impact = { + lazy = major_stress_impact_gain + compassionate = medium_stress_impact_gain + content = major_stress_impact_gain + calm = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_compassion = -1 + ai_boldness = 1 + } + modifier = { + factor = 0 + OR = { + NOT = { + any_neighboring_top_liege_realm_owner = { + any_realm_county = { + any_neighboring_county = { + OR = { + holder = root + holder.liege = root + } + } + } + } + } + has_trait = lazy + has_trait = compassionate + has_trait = content + has_trait = calm + has_trait = humble + } + } + } + } + #I should further the cause of peace and harmony in my governorship + option = { + name = ep3_governor_yearly.3030.b + increase_governance_effect = { VALUE = 15 } + add_character_modifier = { + modifier = ep3_peaceful_administrator_modifier + years = 10 + } + stress_impact = { + lazy = minor_stress_impact_gain + paranoid = major_stress_impact_gain + wrathful = medium_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_vengefulness = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = paranoid + has_trait = wrathful + has_trait = sadistic + } + } + } + } + #We are free to relish a cozy life with our families! + option = { + name = ep3_governor_yearly.3030.c + + #Some kind of estate bonus + #New estate sub-building type? + if = { + limit = { + house = { + house_head = root + } + NOT = { + has_character_flag = ep3_construct_grand_solar + } + } + add_character_flag = ep3_construct_grand_solar + custom_tooltip = can_construct_solar_tooltip + custom_tooltip = solar_estate_effect_tooltip + add_stress = major_stress_loss + house = { + every_house_member = { + custom = custom.every_house_member + limit = { + NOT = { + has_relation_rival = root + } + is_imprisoned = no + this != root + } + add_stress = major_stress_loss + } + } + } + else = { + add_stress = major_stress_loss + house = { + every_house_member = { + custom = custom.every_house_member + limit = { + NOT = { + has_relation_rival = root + } + is_imprisoned = no + this != root + } + add_stress = major_stress_loss + add_opinion = { + modifier = love_opinion + target = root + opinion = 20 + } + } + } + } + stress_impact = { + diligent = minor_stress_impact_gain + impatient = minor_stress_impact_gain + callous = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = impatient + has_trait = callous + has_trait = ambitious + } + } + } + } +} + +##################################### +# Basileus Autokrator! # +# by Jason Cantalini # +# 3040 # +##################################### + +#Emperor has high legitimacy +ep3_governor_yearly.3040 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + has_cultural_pillar = language_greek + } + } + desc = ep3_governor_yearly.3040.t_greek + } + desc = ep3_governor_yearly.3040.t + } + } + desc = ep3_governor_yearly.3040.desc + theme = emperor + override_effect_2d = { + reference = legend_glow + } + override_background = { + trigger = { + scope:emperor = { capital_county = title:c_byzantion } + } + reference = ep3_constantinople + } + override_background = { + trigger = { + NOT = { + scope:emperor = { capital_county = title:c_byzantion } + } + } + reference = throne_room + } + left_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + camera = camera_event_left_forward + } + right_portrait = { + character = scope:candidate + animation = throne_room_bow_1 + } + + trigger = { + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + OR = { + is_governor = yes + is_landless_administrative = yes + } + is_at_war = no + top_liege = { + is_imprisoned = no + legitimacy_level >= 4 + has_government = administrative_government + } + age >= 12 + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 3 + top_liege = { + is_imprisoned = no + legitimacy_level >= 5 + } + } + } + + immediate = { + save_scope_as = root_scope + top_liege = { + save_scope_as = emperor + } + if = { + limit = { + scope:emperor.house = { + any_house_member = { + this != scope:emperor + is_ai = yes + save_temporary_scope_as = aspirant + is_candidate_for_title_trigger = { + TITLE = scope:emperor.primary_title + CANDIDATE = scope:aspirant + } + #Ensure they're actually a visible candidate currently in contention + OR = { + is_close_family_of = scope:emperor + AND = { + is_vassal_of = scope:emperor + is_landed = yes + } + scope:emperor.primary_title = { + any_succession_appointment_investors = { + count > 1 + candidate = scope:aspirant + } + } + } + } + } + } + scope:emperor.house = { + every_house_member = { + limit = { + this != scope:emperor + is_ai = yes + save_temporary_scope_as = aspirant + is_candidate_for_title_trigger = { + TITLE = scope:emperor.primary_title + CANDIDATE = scope:aspirant + } + #Ensure they're actually a visible candidate currently in contention + OR = { + is_close_family_of = scope:emperor + AND = { + is_vassal_of = scope:emperor + is_landed = yes + } + scope:emperor.primary_title = { + any_succession_appointment_investors = { + count > 1 + candidate = scope:aspirant + } + } + } + } + add_to_list = imperial_house_candidates + } + } + ordered_in_list = { + list = imperial_house_candidates + order_by = "appointment_candidate_score(scope:emperor.primary_title)" + position = 0 + save_scope_as = candidate + } + } + } + + + #My family should really be closer to his... + option = { + trigger = { + exists = house + house != scope:emperor.house + } + name = ep3_governor_yearly.3040.a + flavor = ep3_governor_yearly.3040.a.flavor + + root = { + if = { + limit = { + NOT = { + house = { + has_variable = intermarrying_with_var + var:intermarrying_with_var = { + this = scope:emperor.house + } + } + } + } + #Increased marriage acceptance + house = { + set_variable = { + name = intermarrying_with_var + value = scope:emperor.house + years = 30 + } + } + scope:emperor.house = { + set_variable = { + name = intermarrying_with_var + value = root.house + years = 30 + } + } + custom_tooltip = ep3_governor_yearly_3040_marriage_tooltip + add_character_flag = { + flag = ep3_intermarrying_gov + days = 5 + } + + } + } + scope:emperor.house = { + every_house_member = { + custom = custom.every_house_member_emperor + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 10 + } + } + } + if = { + limit = { + scope:emperor = { + is_ai = no + } + } + scope:emperor = { + send_interface_message = { + type = msg_governor_compliments_legitimacy + title = msg_governor_compliments_legitimacy.t + right_icon = root + + dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + reverse_add_opinion = { + target = root + modifier = respect_opinion + opinion = 25 + } + if = { + limit = { + root = { + has_character_flag = ep3_intermarrying_gov + + } + } + custom_tooltip = ep3_governor_yearly_3040_marriage_tooltip + } + } + } + } + else = { + scope:emperor = { + dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + hidden_effect = { + reverse_add_opinion = { + target = root + modifier = respect_opinion + opinion = 25 + } + } + } + } + + dynasty = { add_dynasty_prestige = 25 } + + stress_impact = { + paranoid = minor_stress_impact_gain + shy = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value <= 25 + } + } + modifier = { + factor = 0 + OR = { + opinion = { + target = scope:emperor + value <= -25 + } + has_trait = paranoid + has_trait = shy + has_trait = content + } + } + } + } + #This family is sticking around, I should get in good with his heir + option = { + trigger = { + exists = scope:candidate + intrigue > average_skill_rating + } + name = ep3_governor_yearly.3040.b + flavor = ep3_governor_yearly.3040.b.flavor + if = { + limit = { + can_add_hook = { + target = scope:candidate + type = favor_hook + } + } + add_hook = { + type = favor_hook + target = scope:candidate + } + } + else = { + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:candidate + opinion = 40 + } + } + custom_tooltip = sycophant_boosts_credibility_candidate_score + scope:candidate = { + add_character_flag = { + flag = boosted_by_sycophant_score + years = 20 + } + } + hidden_effect = { + add_opinion = { + target = scope:candidate + modifier = respect_opinion + opinion = 30 + } + } + change_influence = minor_influence_gain + + stress_impact = { + impatient = medium_stress_impact_gain + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_rationality = 0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:candidate + value < 0 + } + } + modifier = { + factor = 0 + OR = { + opinion = { + target = scope:candidate + value <= -50 + } + has_trait = impatient + has_trait = just + has_trait = honest + } + } + } + } + #This guy isn't going anywhere. We need to fortify our self-sufficiency + option = { + name = ep3_governor_yearly.3040.c + flavor = ep3_governor_yearly.3040.c.flavor + add_character_modifier = { + modifier = independent_administrator_modifier + years = 20 + } + if = { + limit = { + any_maa_regiment = { + is_title_maa_regiment = no + can_upgrade_maa = yes + } + } + random_maa_regiment = { + limit = { + is_title_maa_regiment = no + can_upgrade_maa = yes + } + change_maa_regiment_size = { + size = 1 + reinforce = yes + } + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_skoutatoi + } + capital_province = { + NOR = { + terrain = farmlands + terrain = forest + terrain = wetlands + } + } + } + create_maa_regiment = { + type = skoutatoi + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_akritai + } + capital_province = { + OR = { + terrain = forest + terrain = wetlands + } + } + } + create_maa_regiment = { + type = akritai + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_ballistrai + } + capital_province = { + terrain = farmlands + } + } + create_maa_regiment = { + type = ballistrai + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_ayrudzi + } + } + create_maa_regiment = { + type = ayrudzi + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_hussar + } + } + create_maa_regiment = { + type = hussar + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_monaspa + } + } + create_maa_regiment = { + type = monaspa + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_cataphract_archers + } + } + create_maa_regiment = { + type = cataphract_archers + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_mubarizun + } + } + create_maa_regiment = { + type = mubarizun + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_tawashi + } + } + create_maa_regiment = { + type = tawashi + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_conrois + } + } + create_maa_regiment = { + type = conrois + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + has_trait = nomadic_philosophy + } + } + create_maa_regiment = { + type = horse_archers + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_pike_columns + } + } + create_maa_regiment = { + type = picchieri + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_druzhina + } + } + create_maa_regiment = { + type = druzhina + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + mpo_can_recruit_nomad_heavy_cavalry_maa_trigger = yes + } + create_maa_regiment = { + type = nomad_lancers + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + mpo_can_recruit_nomad_maa_trigger = yes + } + create_maa_regiment = { + type = heavy_horse_archers + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_advanced_bowmaking + } + capital_province = { + NOR = { + terrain = desert + terrain = drylands + terrain = plains + } + } + } + create_maa_regiment = { + type = crossbowmen + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_war_camels + } + capital_province = { + OR = { + terrain = desert + terrain = drylands + } + } + } + create_maa_regiment = { + type = camel_rider + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = farmlands + terrain = floodplains + } + } + culture = { + has_innovation = innovation_quilted_armor + } + short_term_gold >= 200 + } + create_maa_regiment = { + type = armored_footmen + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = plains + terrain = drylands + } + } + } + create_maa_regiment = { + type = light_horsemen + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = forest + terrain = taiga + terrain = hills + } + } + } + create_maa_regiment = { + type = bowmen + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = jungle + terrain = wetlands + } + } + } + create_maa_regiment = { + type = light_footmen + check_can_recruit = no + size = 1 + } + } + else = { + create_maa_regiment = { + type = pikemen_unit + check_can_recruit = no + size = 1 + } + } + remove_short_term_gold = minor_gold_value + + stress_impact = { + trusting = medium_stress_impact_gain + humble = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_sociability = -0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value >= 40 + } + } + modifier = { + add = 50 + any_neighboring_top_liege_realm_owner = { + any_realm_county = { + any_neighboring_county = { + OR = { + holder = root + holder.liege = root + } + } + } + } + } + modifier = { + factor = 0 + OR = { + short_term_gold <= medium_gold_value + opinion = { + target = scope:emperor + value >= 75 + } + has_trait = generous + has_trait = trusting + has_trait = humble + } + } + } + } + #I should use his image to reinforce my governance and drive enlistment + option = { + name = ep3_governor_yearly.3040.d + flavor = ep3_governor_yearly.3040.d.flavor + trigger = { + is_governor = yes + } + add_prestige = minor_prestige_gain + if = { + limit = { + any_maa_regiment = { + is_title_maa_regiment = yes + can_upgrade_maa = yes + } + } + every_maa_regiment = { + limit = { + is_title_maa_regiment = yes + can_upgrade_maa = yes + } + change_maa_regiment_size = { + size = 1 + reinforce = yes + } + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_cataphract + } + short_term_gold >= 300 + capital_province = { + NOR = { + terrain = hills + terrain = mountains + terrain = desert_mountains + terrain = wetlands + } + } + } + create_maa_regiment = { + type = cataphract + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_skoutatoi + } + capital_province = { + NOR = { + terrain = farmlands + terrain = forest + terrain = wetlands + } + } + } + create_maa_regiment = { + type = skoutatoi + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_akritai + } + capital_province = { + OR = { + terrain = forest + terrain = wetlands + } + } + } + create_maa_regiment = { + type = akritai + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_ballistrai + } + capital_province = { + terrain = farmlands + } + } + create_maa_regiment = { + type = ballistrai + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_ayrudzi + } + } + create_maa_regiment = { + type = ayrudzi + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_monaspa + } + } + create_maa_regiment = { + type = monaspa + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_cataphract_archers + } + } + create_maa_regiment = { + type = cataphract_archers + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_hussar + } + } + create_maa_regiment = { + type = hussar + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_mubarizun + } + } + create_maa_regiment = { + type = mubarizun + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_tawashi + } + } + create_maa_regiment = { + type = tawashi + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_conrois + } + } + create_maa_regiment = { + type = conrois + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + has_trait = nomadic_philosophy + } + } + create_maa_regiment = { + type = horse_archers + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_pike_columns + } + } + create_maa_regiment = { + type = picchieri + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_druzhina + } + } + create_maa_regiment = { + type = druzhina + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + mpo_can_recruit_nomad_heavy_cavalry_maa_trigger = yes + } + create_maa_regiment = { + type = nomad_lancers + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + mpo_can_recruit_nomad_maa_trigger = yes + } + create_maa_regiment = { + type = heavy_horse_archers + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_advanced_bowmaking + } + capital_province = { + NOR = { + terrain = desert + terrain = drylands + terrain = plains + } + } + } + create_maa_regiment = { + type = crossbowmen + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_war_camels + } + capital_province = { + OR = { + terrain = desert + terrain = drylands + } + } + } + create_maa_regiment = { + type = camel_rider + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = farmlands + terrain = floodplains + } + } + culture = { + has_innovation = innovation_quilted_armor + } + short_term_gold >= 200 + } + create_maa_regiment = { + type = armored_footmen + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = plains + terrain = drylands + } + } + } + create_maa_regiment = { + type = light_horsemen + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = forest + terrain = taiga + terrain = hills + } + } + } + create_maa_regiment = { + type = bowmen + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = jungle + terrain = wetlands + } + } + } + create_maa_regiment = { + type = light_footmen + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else = { + create_maa_regiment = { + type = pikemen_unit + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + stress_impact = { + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_energy = 0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value < -0 + } + } + modifier = { + add = 50 + any_neighboring_top_liege_realm_owner = { + any_realm_county = { + any_neighboring_county = { + OR = { + holder = root + holder.liege = root + } + } + } + } + } + modifier = { + factor = 0 + OR = { + short_term_gold <= medium_gold_value + has_trait = greedy + has_trait = ambitious + } + } + } + } +} + +##################################### +# God Appointed... Him? # +# by Jason Cantalini # +# 3050 # +##################################### + +#Emperor has low legitimacy +ep3_governor_yearly.3050 = { + type = character_event + title = ep3_governor_yearly.3050.t + desc = { + desc = ep3_governor_yearly.3050.desc + first_valid = { + #Emperor is a mess + triggered_desc = { + trigger = { + has_character_flag = demon_emperor_madness + } + desc = ep3_governor_yearly.3050.mess + } + #Emperor is useless + triggered_desc = { + trigger = { + has_character_flag = demon_emperor_sloth + } + desc = ep3_governor_yearly.3050.shiftless + } + #Emperor is a cowardly worm + triggered_desc = { + trigger = { + has_character_flag = demon_emperor_fear + } + desc = ep3_governor_yearly.3050.coward + } + #Emperor is a monster + triggered_desc = { + trigger = { + has_character_flag = demon_emperor_cruel + } + desc = ep3_governor_yearly.3050.cruel + } + #Emperor just plain sucks + desc = ep3_governor_yearly.3050.generic_bad + } + desc = ep3_governor_yearly.3050.outro + } + theme = emperor + override_effect_2d = { + reference = flies + } + override_background = { + trigger = { + scope:emperor.capital_county.culture = { + OR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + has_cultural_pillar = heritage_latin + has_graphical_mediterranean_culture_group_trigger = yes + } + } + NOR = { + has_character_flag = demon_emperor_cruel + has_character_flag = demon_emperor_generic + } + } + reference = ep3_byzantine_feast + } + override_background = { + trigger = { + scope:emperor.capital_county.culture = { + NOR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + has_cultural_pillar = heritage_latin + has_graphical_mediterranean_culture_group_trigger = yes + } + } + NOR = { + has_character_flag = demon_emperor_cruel + has_character_flag = demon_emperor_generic + } + } + reference = corridor_night + } + override_background = { + trigger = { + has_character_flag = demon_emperor_cruel + } + reference = bp1_bonfire + } + override_background = { + trigger = { + has_character_flag = demon_emperor_generic + } + reference = bedchamber + } + left_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { + root = { + has_character_flag = demon_emperor_madness + } + } + animation = aggressive_unarmed + } + triggered_animation = { + trigger = { + root = { + has_character_flag = demon_emperor_sloth + } + } + animation = throne_room_kneel_1 + } + triggered_animation = { + trigger = { + root = { + has_character_flag = demon_emperor_fear + } + } + animation = paranoia + } + triggered_animation = { + trigger = { + root = { + has_character_flag = demon_emperor_cruel + } + } + animation = manic + } + triggered_animation = { + trigger = { + root = { + has_character_flag = demon_emperor_generic + } + } + animation = eccentric + } + } + lower_right_portrait = scope:faith_head + + trigger = { + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + OR = { + is_governor = yes + is_landless_administrative = yes + } + is_at_war = no + top_liege = { + has_legitimacy = yes + legitimacy_level < 2 + age >= 8 + } + age >= 12 + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 3 + top_liege = { + is_imprisoned = no + legitimacy_level < 1 + } + } + } + + immediate = { + save_scope_as = root_scope + top_liege = { + save_scope_as = emperor + } + random_list = { + 3 = { + trigger = { + scope:emperor = { + ai_rationality <= low_negative_ai_value + } + } + modifier = { + factor = 4 + scope:emperor = { + ai_rationality <= high_negative_ai_value + } + } + add_character_flag = { + flag = demon_emperor_madness + days = 5 + } + if = { + limit = { + scope:emperor = { + is_adult = yes + } + } + scope:emperor = { add_character_flag = is_naked } + } + } + 3 = { + trigger = { + scope:emperor = { + ai_energy <= low_negative_ai_value + } + } + modifier = { + factor = 4 + scope:emperor = { + ai_energy <= high_negative_ai_value + } + } + add_character_flag = { + flag = demon_emperor_sloth + days = 5 + } + if = { + limit = { + scope:emperor = { + is_adult = yes + } + } + scope:emperor = { add_character_flag = is_naked } + } + } + 3 = { + trigger = { + scope:emperor = { + ai_boldness <= low_negative_ai_value + } + } + modifier = { + factor = 4 + scope:emperor = { + ai_boldness <= high_negative_ai_value + } + } + add_character_flag = { + flag = demon_emperor_fear + days = 5 + } + } + 3 = { + trigger = { + scope:emperor = { + ai_compassion <= low_negative_ai_value + } + } + modifier = { + factor = 4 + scope:emperor = { + ai_compassion <= high_negative_ai_value + } + } + add_character_flag = { + flag = demon_emperor_cruel + days = 5 + } + } + 1 = { + modifier = { + factor = 15 + scope:emperor = { + ai_honor <= high_negative_ai_value + } + } + add_character_flag = { + flag = demon_emperor_generic + days = 5 + } + if = { + limit = { + scope:emperor = { + is_adult = yes + } + } + scope:emperor = { add_character_flag = is_naked } + } + } + } + if = { + limit = { + maa_regiments_max_count > maa_regiments_count + any_maa_regiment = { + is_title_maa_regiment = yes + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + is_title_maa_regiment = yes + } + position = 0 + save_scope_value_as = { + name = regiment_size + value = maa_size + } + save_scope_as = regiment + } + } + if = { + limit = { + OR = { + has_trait = zealous + piety_level >= 3 + } + exists = root.faith.religious_head + NOT = { + root.faith.religious_head = { + this = root + } + } + } + root.faith.religious_head = { save_scope_as = faith_head } + } + } + #DEMON! + option = { + name = ep3_governor_yearly.3050.a + trigger = { + OR = { + has_trait = zealous + piety_level >= 3 + } + } + reason = piety_level + add_piety = major_piety_gain + scope:emperor = { + add_opinion = { + modifier = insulted_opinion + target = root + opinion = -50 + } + } + if = { + limit = { + exists = scope:faith_head + } + scope:faith_head = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + stress_impact = { + paranoid = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + cynical = major_stress_impact_gain + calm = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = calm + has_trait = forgiving + } + } + } + } + #Why should the troops answer to such a poser... and not me? + option = { + name = ep3_governor_yearly.3050.b + trigger = { + is_governor = yes + influence_level >= 3 + } + reason = influence_level + add_character_flag = { + flag = low_legitimacy_admin_factions_flag + years = 20 + } + scope:emperor = { + send_interface_message = { + type = msg_governor_challenging_illegitimacy + title = msg_governor_challenging_illegitimacy.t + desc = msg_governor_challenging_illegitimacy.desc + right_icon = scope:root_scope + + custom_tooltip = ep3_governor_yearly_3050_factions_emp_tooltip + add_legitimacy = miniscule_legitimacy_loss + } + } + + if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 1 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 1 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 2 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 2 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 3 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 3 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 4 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 4 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 5 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 5 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 6 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 6 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 7 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 7 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 8 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 8 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 9 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 9 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 10 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 10 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 11 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 11 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 12 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 12 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 13 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 13 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 14 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 14 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value >= 15 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 15 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else = { + add_prestige = medium_prestige_gain + change_influence = minor_influence_gain + } + add_trait = disloyal + + stress_impact = { + disloyal = minor_stress_impact_loss + loyal = medium_stress_impact_gain + just = major_stress_impact_gain + trusting = medium_stress_impact_gain + humble = major_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -1 + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value < -20 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value < -70 + } + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value >= 0 + } + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = trusting + has_trait = humble + has_trait = content + has_trait = loyal + } + opinion = { + target = scope:emperor + value >= 60 + } + } + } + } + #He needs my support! + option = { + name = ep3_governor_yearly.3050.c + flavor = ep3_governor_yearly.3050.c.flavor + scope:emperor = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + + scope:emperor = { + send_interface_message = { + type = msg_governor_supports_rule + title = msg_governor_supports_rule.t + desc = msg_governor_supports_rule.desc + right_icon = scope:root_scope + + add_legitimacy = miniscule_legitimacy_gain + random = { + chance = 20 + root = { add_trait = loyal } + } + } + } + stress_impact = { + loyal = miniscule_stress_impact_loss + arbitrary = major_stress_impact_gain + paranoid = medium_stress_impact_gain + fickle = medium_stress_impact_gain + deceitful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 2 + ai_compassion = 0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value < -20 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value > 20 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value > 70 + } + } + modifier = { + factor = 0 + OR = { + has_trait = arbitrary + has_trait = paranoid + has_trait = fickle + has_trait = deceitful + } + opinion = { + target = scope:emperor + value <= 70 + } + } + } + } + #A perfect time to get involved in imperial politics... and neglect my other duties + option = { + name = ep3_governor_yearly.3050.d + + if = { + limit = { + is_governor = yes + NOT = { has_character_flag = ep3_governor_yearly_3050_neglect_duties } + } + change_influence = medium_influence_gain + #Lose governor efficiency + custom_tooltip = ep3_governor_yearly_3050_neglect_duties_tooltip + add_character_flag = { + flag = ep3_governor_yearly_3050_neglect_duties + years = 10 + } + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_neglecting_house_head_duties_modifier + } + } + change_influence = minor_influence_gain + add_character_modifier = { + modifier = ep3_neglecting_house_head_duties_modifier + years = 10 + } + } + else = { + change_influence = medium_influence_gain + add_prestige = minor_prestige_loss + } + + stress_impact = { + diligent = medium_stress_impact_gain + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 0.5 + ai_energy = -0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value <= -70 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value < 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value >= 50 + } + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = honest + has_trait = humble + } + opinion = { + target = scope:emperor + value >= 80 + } + } + } + } + after = { + if = { + limit = { + scope:emperor = { + has_character_flag = is_naked + } + } + scope:emperor = { + remove_character_flag = is_naked + } + } + } +} + +##################################### +# A Resplendent Coronation # +# by Jason Cantalini # +# 3060 # +##################################### + +#Admin Imperial Succession event +ep3_governor_yearly.3060 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:new_holder = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + desc = ep3_governor_yearly.3060.t_regent + } + desc = ep3_governor_yearly.3060.t + } + } + desc = { + #The old Basileus is dead or usurped + first_valid = { + triggered_desc = { + trigger = { + scope:new_holder = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + desc = ep3_governor_yearly.3060.intro_regent + } + triggered_desc = { + trigger = { + scope:previous_holder = { + is_alive = yes + NOT = { + has_character_flag = abdicated_from_throne + } + } + } + desc = ep3_governor_yearly.3060.intro_usurper + } + desc = ep3_governor_yearly.3060.intro_deceased + } + #Where is new Basileus being acclaimed? + first_valid = { + triggered_desc = { + trigger = { + scope:new_holder = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + desc = ep3_governor_yearly.3060.desc_regent + } + triggered_desc = { + trigger = { + scope:emperor = { + has_character_flag = ep3_new_emperor_afield + } + } + desc = ep3_governor_yearly.3060.desc_afield + } + desc = ep3_governor_yearly.3060.desc_temple + } + #Is it Byzantine or nah? + first_valid = { + triggered_desc = { + trigger = { + scope:new_holder = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + desc = ep3_governor_yearly.3060.desc_regent_acclaim + } + triggered_desc = { + trigger = { + scope:emperor = { + religion = { + this = religion:christianity_religion + } + primary_title = { + this = title:e_byzantium + } + #is either a Byzantine themselves or has a byzantine around to indicate any interest in Byzantine traditions + OR = { + culture = { + has_cultural_pillar = heritage_byzantine + OR = { + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:greek + } + } + any_vassal = { + culture = { + OR = { + has_cultural_pillar = heritage_byzantine + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:greek + } + } + } + } + is_female = no + } + } + desc = ep3_governor_yearly.3060.desc_byzantine + } + triggered_desc = { + trigger = { + scope:emperor = { + religion = { + this = religion:christianity_religion + } + primary_title = { + this = title:e_byzantium + } + OR = { + culture = { + has_cultural_pillar = heritage_byzantine + OR = { + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:greek + } + } + any_vassal = { + culture = { + OR = { + has_cultural_pillar = heritage_byzantine + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:greek + } + } + } + } + is_female = yes + } + } + desc = ep3_governor_yearly.3060.desc_byzantine_femme + } + desc = ep3_governor_yearly.3060.desc_generic + } + #Emperor's legitimacy + first_valid = { + triggered_desc = { + trigger = { + scope:new_holder = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + desc = ep3_governor_yearly.3060.desc_regent_legit + } + triggered_desc = { + trigger = { + scope:emperor = { + legitimacy_level >= 4 + } + } + desc = ep3_governor_yearly.3060.desc_high_legit + } + triggered_desc = { + trigger = { + scope:emperor = { + legitimacy_level < 4 + legitimacy_level >= 2 + } + } + desc = ep3_governor_yearly.3060.desc_medium_legit + } + desc = ep3_governor_yearly.3060.desc_low_legit + } + } + theme = emperor + override_background = { + trigger = { + scope:emperor = { + capital_county = title:c_byzantion + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + NOT = { + has_character_flag = ep3_new_emperor_afield + } + } + } + reference = ep3_hagia_sophia + } + override_background = { + trigger = { + NOT = { + scope:emperor = { + capital_county = title:c_byzantion + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + } + scope:emperor = { + tgp_is_ceremonial_regent_trigger = no # Not 'actual' ruler + NOT = { + has_character_flag = ep3_new_emperor_afield + } + } + } + reference = temple + } + override_background = { + trigger = { + scope:emperor = { + has_character_flag = ep3_new_emperor_afield + location = { + OR = { + terrain = desert + terrain = drylands + terrain = oasis + terrain = desert_mountains + terrain = floodplains + } + } + } + } + reference = ce1_legendary_oasis + } + override_background = { + trigger = { + scope:emperor = { + has_character_flag = ep3_new_emperor_afield + location = { + NOR = { + terrain = desert + terrain = drylands + terrain = oasis + terrain = desert_mountains + terrain = floodplains + } + } + } + } + reference = ce1_legendary_spring + } + override_background = { + trigger = { + exists = scope:background_throne_room_scope + scope:emperor = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + reference = throne_room_scope + } + left_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_win + } + right_portrait = { + character = scope:ceremonial_liege + animation = holding_hu + camera = camera_event_right_forward + } + lower_right_portrait = scope:previous_holder + trigger = { + exists = scope:emperor + scope:emperor = { + is_alive = yes + } + top_liege ?= { + this = scope:emperor + } + } + immediate = { + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_become_emperor" + tgp_save_realm_ceremonial_liege_effect = yes + if = { + limit = { + scope:ceremonial_liege = scope:emperor + } + clear_saved_scope = ceremonial_liege + } + scope:ceremonial_liege ?= { save_scope_as = background_throne_room_scope } + save_scope_as = root_scope + if = { + limit = { + scope:emperor = { + OR = { + is_travelling = yes + is_in_army = yes + } + #Is not at sea + location = { + exists = holder + } + } + } + scope:emperor = { + add_character_flag = { + flag = ep3_new_emperor_afield + days = 30 + } + } + } + scope:emperor = { + location = { + save_scope_as = emp_location + } + } + if = { + limit = { + has_ach_dlc_trigger = yes + scope:emperor = { + has_realm_law = uncrowned + } + } + custom_tooltip = admin_coronation_still_req_tt + } + } + #My positive relation? This is amazing news! + option = { + name = ep3_governor_yearly.3060.a + trigger = { + OR = { + has_relation_friend = scope:emperor + has_relation_potential_friend = scope:emperor + has_relation_lover = scope:emperor + has_relation_soulmate = scope:emperor + is_allied_to = scope:emperor + is_close_family_of = scope:emperor + house = scope:emperor.house + is_spouse_of = scope:emperor + } + NOR = { + has_relation_rival = scope:emperor + reverse_opinion = { + target = scope:emperor + value <= -25 + } + } + } + if = { + limit = { + scope:emperor = { + legitimacy_level >= 5 + } + } + add_gold = medium_gold_value + change_influence = medium_influence_gain + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 4 + } + } + add_gold = medium_gold_value + change_influence = minor_influence_gain + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 3 + } + } + add_gold = minor_gold_value + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:emperor + opinion = 5 + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 2 + } + } + add_gold = minor_gold_value + scope:emperor = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 1 + } + } + scope:emperor = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 15 + } + } + add_gold = tiny_gold_value + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + else = { + scope:emperor = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + add_gold = tiny_gold_value + change_influence = miniscule_influence_loss + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + hidden_effect = { + add_opinion = { + modifier = loyalty_opinion + target = scope:emperor + opinion = 10 + } + } + if = { + limit = { + scope:emperor = { + legitimacy_level <= 1 + } + } + stress_impact = { + base = minor_stress_impact_loss + greedy = miniscule_stress_impact_loss + } + } + else = { + stress_impact = { + base = medium_stress_impact_loss + greedy = miniscule_stress_impact_loss + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + ai_energy = 1 + } + modifier = { + add = 50 + has_trait = loyal + } + modifier = { + add = 50 + has_trait = greedy + } + modifier = { + add = 50 + scope:emperor = { + influence_level >= 3 + } + } + modifier = { + add = 50 + scope:emperor = { + influence_level >= 4 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 3 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 4 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 5 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 2 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 1 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 0 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value >= 75 + } + } + modifier = { + add = 25 + opinion = { + target = scope:emperor + value >= 25 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value < 0 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value <= -25 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value <= -75 + } + } + } + } + #I am a detractor of this emperor + option = { + name = ep3_governor_yearly.3060.b + flavor = ep3_governor_yearly.3060.b.flavor + if = { + limit = { + scope:emperor = { + legitimacy_level >= 5 + } + } + if = { + limit = { + scope:previous_holder = { + is_alive = yes + NOR = { + has_character_flag = abdicated_from_throne + this = root + } + } + } + scope:previous_holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 80 + } + } + if = { + limit = { + has_multiple_players = no + is_ai = no + scope:previous_holder = { + is_ruler = no + NOT = { + has_relation_rival = root + } + } + } + add_courtier = scope:previous_holder + scope:previous_holder = { + every_traveling_family_member = { + limit = { + this != scope:previous_holder + } + root = { add_courtier = prev } + hidden_effect = { + return_to_court = yes + } + } + } + } + } + change_influence = major_influence_loss + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -80 + } + } + #Add modifier + add_character_modifier = { + modifier = ep3_head_of_opposition_modifier + years = 10 + } + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 4 + } + } + if = { + limit = { + scope:previous_holder = { + is_alive = yes + NOR = { + has_character_flag = abdicated_from_throne + this = root + } + } + } + scope:previous_holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 60 + } + } + if = { + limit = { + has_multiple_players = no + is_ai = no + scope:previous_holder = { + is_ruler = no + NOT = { + has_relation_rival = root + } + } + } + add_courtier = scope:previous_holder + scope:previous_holder = { + every_traveling_family_member = { + limit = { + this != scope:previous_holder + } + root = { add_courtier = prev } + hidden_effect = { + return_to_court = yes + } + } + } + } + } + change_influence = medium_influence_loss + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -40 + } + } + #Add modifier + add_character_modifier = { + modifier = ep3_head_of_opposition_modifier + years = 5 + } + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 3 + } + } + if = { + limit = { + scope:previous_holder = { + is_alive = yes + NOR = { + has_character_flag = abdicated_from_throne + this = root + } + } + } + scope:previous_holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 40 + } + } + if = { + limit = { + has_multiple_players = no + is_ai = no + scope:previous_holder = { + is_ruler = no + NOT = { + has_relation_rival = root + } + } + } + add_courtier = scope:previous_holder + scope:previous_holder = { + every_traveling_family_member = { + root = { add_courtier = prev } + hidden_effect = { + return_to_court = yes + } + } + } + } + } + add_prestige = medium_prestige_gain + change_influence = miniscule_influence_gain + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -50 + } + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 2 + } + } + if = { + limit = { + scope:previous_holder = { + is_alive = yes + NOR = { + has_character_flag = abdicated_from_throne + this = root + } + } + } + scope:previous_holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + } + add_prestige = minor_prestige_gain + change_influence = minor_influence_gain + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -40 + } + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 1 + } + } + if = { + limit = { + scope:previous_holder = { + is_alive = yes + NOR = { + has_character_flag = abdicated_from_throne + this = root + } + } + } + scope:previous_holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + add_prestige = miniscule_prestige_gain + change_influence = medium_influence_gain + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -40 + } + } + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + else = { + change_influence = medium_influence_gain + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -20 + } + } + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + hidden_effect = { + add_opinion = { + modifier = contempt_opinion + target = scope:emperor + opinion = -20 + } + } + + if = { + limit = { + scope:emperor = { + legitimacy_level >= 4 + } + } + stress_impact = { + trusting = medium_stress_impact_gain + content = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + craven = medium_stress_impact_gain + humble = medium_stress_impact_gain + loyal = medium_stress_impact_gain + } + } + else = { + stress_impact = { + loyal = medium_stress_impact_gain + } + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 1 + ai_energy = 1 + } + modifier = { + add = 50 + has_trait = disloyal + } + modifier = { + add = -50 + house ?= scope:emperor.house + } + modifier = { + add = -100 + scope:emperor = { + has_hook = root + } + } + modifier = { + add = 25 + scope:emperor = { + influence_level <= 1 + } + } + modifier = { + add = -50 + scope:emperor = { + influence_level >= 3 + } + } + modifier = { + add = -50 + scope:emperor = { + influence_level >= 4 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level >= 3 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level >= 4 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level >= 5 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level <= 2 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level <= 1 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level <= 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value >= 75 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value > 0 + } + } + modifier = { + add = 25 + opinion = { + target = scope:emperor + value <= -25 + } + } + modifier = { + add = 25 + opinion = { + target = scope:emperor + value <= -50 + } + } + modifier = { + add = 25 + opinion = { + target = scope:emperor + value <= -75 + } + } + modifier = { + factor = 0 + has_trait = loyal + } + modifier = { + factor = 0 + scope:emperor = { + legitimacy_level >= 4 + } + OR = { + has_trait = trusting + has_trait = content + has_trait = paranoid + has_trait = craven + has_trait = humble + } + } + } + } + #I am a supporter of this emperor + option = { + name = ep3_governor_yearly.3060.c + flavor = { + first_valid = { + triggered_desc = { + trigger = { + scope:emperor = { tgp_is_ceremonial_regent_trigger = yes } + } + desc = ep3_governor_yearly.3060.c.flavor_regent + } + triggered_desc = { + trigger = { + scope:emperor = { + legitimacy_level >= 4 + } + } + desc = ep3_governor_yearly.3060.c.flavor_high_legit + } + triggered_desc = { + trigger = { + scope:emperor = { + legitimacy_level <= 1 + } + } + desc = ep3_governor_yearly.3060.c.flavor_low_legit + } + desc = ep3_governor_yearly.3060.c.flavor_med_legit + } + } + #High legitimacy: gain influence and a little opinion with emp + #Low legitimacy: lose opinion and gain big opinion with emp + + if = { + limit = { + scope:emperor = { + legitimacy_level >= 5 + } + } + change_influence = medium_influence_gain + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 4 + } + } + reverse_add_opinion = { + modifier = support_opinion + target = scope:emperor + opinion = 10 + } + change_influence = minor_influence_gain + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 3 + } + } + change_influence = miniscule_influence_loss + reverse_add_opinion = { + modifier = support_opinion + target = scope:emperor + opinion = 10 + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 2 + } + } + change_influence = minor_influence_loss + scope:emperor = { + add_opinion = { + modifier = support_opinion + target = root + opinion = 20 + } + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 1 + } + } + scope:emperor = { + add_opinion = { + modifier = support_opinion + target = root + opinion = 30 + } + } + change_influence = medium_influence_loss + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + else = { + scope:emperor = { + add_opinion = { + modifier = support_opinion + target = root + opinion = 50 + } + } + change_influence = major_influence_loss + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + hidden_effect = { + add_opinion = { + modifier = loyalty_opinion + target = scope:emperor + opinion = 10 + } + } + if = { + limit = { + scope:emperor = { + legitimacy_level <= 1 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + craven = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + disloyal = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + } + else = { + stress_impact = { + disloyal = medium_stress_impact_gain + } + } + + ai_chance = { + base = 0 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + ai_energy = 1 + } + modifier = { + add = 100 + has_trait = loyal + } + modifier = { + add = 50 + house ?= scope:emperor.house + } + modifier = { + add = 100 + scope:emperor = { + has_hook = root + } + } + modifier = { + add = -25 + scope:emperor = { + influence_level <= 1 + } + } + modifier = { + add = 50 + scope:emperor = { + influence_level >= 3 + } + } + modifier = { + add = 50 + scope:emperor = { + influence_level >= 4 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 3 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 4 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 5 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 2 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 1 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 0 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value >= 75 + } + } + modifier = { + add = 25 + opinion = { + target = scope:emperor + value >= 25 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value < 0 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value <= -25 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value <= -75 + } + } + modifier = { + factor = 0 + has_trait = disloyal + } + modifier = { + factor = 0 + scope:emperor = { + legitimacy_level <= 1 + } + OR = { + has_trait = disloyal + has_trait = arrogant + has_trait = craven + has_trait = paranoid + has_trait = ambitious + has_trait = fickle + } + } + } + } + #No opinion... + option = { + name = { + trigger = { + scope:emperor = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + text = ep3_governor_yearly.3060.d.regent + } + name = { + trigger = { + scope:emperor = { tgp_is_ceremonial_regent_trigger = no } # Not 'actual' ruler + } + text = ep3_governor_yearly.3060.d + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + ai_sociability = -1 + } + } + } +} + +scripted_trigger ep3_governor_yearly_3070_racer_trigger = { + is_alive = yes + is_adult = yes + age < 45 + is_available = yes + ai_energy >= low_negative_ai_value + NOT = { + has_character_modifier = obese_modifier + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:liege } + NOT = { is_primary_heir_of = scope:liege } +} + +scripted_trigger ep3_governor_yearly_3070_close_governor_trigger = { + is_governor = yes + NOR = { + this = root + house = root.house + primary_heir = root + primary_heir.house ?= { + this = root.house + } + } + any_sub_realm_county = { + count >= ep3_governor_yearly_3070_governorship_value + } +} + +##################################### +# A Well-Traveled Tongue # +# by Jason Cantalini # +# 3070 # +##################################### + +#You are very distant from the emperor and a traveler from the imperial court is visiting to mock you +ep3_governor_yearly.3070 = { + type = character_event + title = ep3_governor_yearly.3070.t + desc = { + desc = ep3_governor_yearly.3070.intro + first_valid = { + triggered_desc = { + trigger = { + is_landed = yes + } + desc = ep3_governor_yearly.3070.landed + } + desc = ep3_governor_yearly.3070.unlanded + } + first_valid = { + triggered_desc = { + trigger = { + scope:liege.culture = { + has_cultural_parameter = hosts_chariot_races + } + } + desc = ep3_governor_yearly.3070.chariot + } + desc = ep3_governor_yearly.3070.horse + } + desc = ep3_governor_yearly.3070.desc + } + #Loc for young racer making fun of you + theme = administrative + override_background = { + reference = terrain_travel + } + + left_portrait = { + character = scope:rider + animation = jockey_gallop + camera = camera_event_horse_left + } + + right_portrait = { + character = scope:charioteer + animation = chariot_neutral + camera = camera_event_chariot_right + } + + lower_right_portrait = scope:close_governor + + trigger = { + top_liege != this + government_allows = administrative + OR = { + AND = { + is_landed = yes + NOT = { + any_sub_realm_county = { + any_neighboring_county = { + holder = root.liege + } + } + } + } + AND = { + is_landless_administrative = yes + #This will make absolutely no sense if landless root's domicile is in liege's capital province + domicile.domicile_location = { + this != root.top_liege.capital_province + } + #Either liege is top liege or root's domicile is in liege's sub realm + OR = { + liege = { + top_liege = this + } + liege = { + top_liege != this + any_sub_realm_county = { + this = root.domicile.domicile_location.county + } + } + } + } + } + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_at_war = no + trigger_if = { + limit = { + is_landed = yes + } + capital_province = { + save_temporary_scope_as = root_capital_temp + } + } + trigger_else = { + domicile = { + domicile_location = { + save_temporary_scope_as = root_capital_temp + } + } + } + OR = { + #EMPEROR LIEGE + #Long range if both imperial capital and root's are coastal + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 200000 + } + #Medium range for one or the other + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + OR = { + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 150000 + } + #Short range if neither is coastal + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + NOR = { + liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 100000 + } + + #KING LIEGE + #Long range if both imperial capital and root's are coastal + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 100000 + } + #Medium range for one or the other + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + OR = { + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 75000 + } + #Short range if neither is coastal + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 50000 + } + } + liege = { + save_temporary_scope_as = temp_liege + + any_courtier_or_guest = { + NOT = { + is_foreign_court_guest = yes + } + is_alive = yes + is_adult = yes + age <= 45 + is_available = yes + ai_energy >= low_negative_ai_value + NOT = { + has_character_modifier = obese_modifier + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:temp_liege } + NOT = { is_primary_heir_of = scope:temp_liege } + } + } + } + + cooldown = { + years = 10 + } + + immediate = { + if = { + limit = { + is_landed = yes + } + capital_province = { + save_scope_as = root_capital + } + } + else = { + domicile = { + domicile_location = { + save_scope_as = root_capital + } + } + } + liege = { + save_scope_as = liege + } + scope:liege = { + if = { + limit = { + culture = { + has_cultural_parameter = hosts_chariot_races + } + } + if = { + limit = { + any_court_position_holder = { + type = charioteer_court_position + ep3_governor_yearly_3070_racer_trigger = yes + } + } + random_court_position_holder = { + type = charioteer_court_position + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = charioteer + } + } + else_if = { + limit = { + house = { + any_house_member = { + is_courtier_of = scope:liege + ep3_governor_yearly_3070_racer_trigger = yes + } + } + } + house = { + random_house_member = { + limit = { + is_courtier_of = scope:liege + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = charioteer + } + } + } + else_if = { + limit = { + any_courtier = { + ep3_governor_yearly_3070_racer_trigger = yes + } + } + random_courtier = { + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = charioteer + } + } + else = { + random_pool_guest = { + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = charioteer + } + } + scope:charioteer = { + save_scope_as = racer + } + } + else = { + if = { + limit = { + any_court_position_holder = { + type = charioteer_court_position + ep3_governor_yearly_3070_racer_trigger = yes + } + } + random_court_position_holder = { + type = charioteer_court_position + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = rider + } + } + else_if = { + limit = { + house ?= { + any_house_member = { + is_courtier_of = scope:liege + ep3_governor_yearly_3070_racer_trigger = yes + } + } + } + house = { + random_house_member = { + limit = { + is_courtier_of = scope:liege + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = rider + } + } + } + else_if = { + limit = { + any_courtier = { + ep3_governor_yearly_3070_racer_trigger = yes + } + } + random_courtier = { + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = rider + } + } + else = { + random_pool_guest = { + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = rider + } + } + scope:rider = { + save_scope_as = racer + } + } + } + if = { + limit = { + scope:liege = { + any_vassal = { + ep3_governor_yearly_3070_close_governor_trigger = yes + } + any_sub_realm_county = { + any_neighboring_county = { + holder = scope:liege + } + } + } + } + scope:liege = { + random_vassal = { + limit = { + ep3_governor_yearly_3070_close_governor_trigger = yes + any_sub_realm_county = { + any_neighboring_county = { + holder = scope:liege + } + } + } + save_scope_as = close_governor + } + } + } + else_if = { + limit = { + scope:liege = { + any_vassal = { + ep3_governor_yearly_3070_close_governor_trigger = yes + save_temporary_scope_as = temp_vassal + "scope:liege.capital_province.squared_distance(scope:temp_vassal.capital_province)" < 25000 + } + + } + } + scope:liege = { + random_vassal = { + limit = { + ep3_governor_yearly_3070_close_governor_trigger = yes + save_temporary_scope_as = temp_vassal + ep3_governor_yearly_3070_close_governor_trigger = yes + "scope:liege.capital_province.squared_distance(scope:temp_vassal.capital_province)" < 25000 + } + save_scope_as = close_governor + } + } + } + } + #You're blind if you don't see the opportunities out here + option = { + name = ep3_governor_yearly.3070.a + trigger = { + has_trait = governor + has_trait_xp = { + trait = governor + value >= 40 + } + } + increase_governance_effect = { VALUE = 5 } + add_prestige = minor_prestige_gain + root.primary_title = { + ordered_title_heir = { + order_by = "appointment_candidate_score(root.primary_title)" + max = 1 + limit = { + house = root.house + } + root.primary_title = { + change_appointment_investment = { + target = prev + value = appointment_score_minor_value + } + } + } + } + stress_impact = { + fickle = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_greed = -0.5 + ai_energy = -0.5 + ai_honor = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = fickle + has_trait = ambitious + has_trait = arrogant + } + } + } + } + #I'll move my domicile + option = { + name = ep3_governor_yearly.3070.b + trigger = { + is_landed = no + } + change_influence = medium_influence_gain + domicile = { + move_domicile = scope:liege.capital_province + } + house = { + every_house_member = { + custom = custom.every_house_member + limit = { + NOR = { + this = root + this = scope:liege + } + age > 3 + } + change_influence = miniscule_influence_gain + add_opinion = { + modifier = uprooted_family_opinion + target = root + opinion = -20 + } + } + } + + every_spouse = { + change_influence = miniscule_influence_gain + add_opinion = { + modifier = uprooted_family_opinion + target = root + opinion = -20 + } + } + remove_short_term_gold = minor_gold_value + stress_impact = { + stubborn = minor_stress_impact_gain + lazy = medium_stress_impact_gain + content = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 1 + + } + modifier = { + factor = 0 + OR = { + has_trait = stubborn + has_trait = lazy + has_trait = shy + has_trait = content + short_term_gold < minor_gold_value + } + } + } + } + #I need to get a more relevant appointment... + option = { + trigger = { + exists = scope:close_governor + } + name = ep3_governor_yearly.3070.c + flavor = ep3_governor_yearly.3070.c.flavor + scope:close_governor.primary_title = { + change_appointment_investment = { + target = root + value = appointment_score_medium_value + } + } + scope:racer = { + add_hook = { + type = favor_hook + target = root + } + } + + stress_impact = { + humble = medium_stress_impact_gain + content = medium_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_greed = 1 + + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + has_trait = content + } + } + } + } + #He's right... we need to improve the roads or this place will remain irrelevant + option = { + name = ep3_governor_yearly.3070.d + trigger = { + is_landed = yes + } + remove_treasury_or_gold = medium_treasury_or_gold_value + duel = { + skills = { stewardship learning } + value = medium_skill_rating + 55 = { #Your road-building efforts go well + desc = ep3_governor_yearly.3070.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -54 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.3070.d.success + increase_governance_effect = { VALUE = 10 } + change_influence = minor_influence_gain + every_sub_realm_county = { + custom = custom.every_sub_realm_county + change_development_progress = medium_development_progress_gain + } + + } + } + 45 = { #Your province remains isolated... but now it's poorer + desc = ep3_governor_yearly.3070.d.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -44 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3070.d.fail + change_influence = miniscule_influence_loss + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_rationality = 1 + } + modifier = { + add = 50 + OR = { + stewardship > very_high_skill_rating + learning > very_high_skill_rating + AND = { + stewardship >= high_skill_rating + learning >= high_skill_rating + } + } + } + modifier = { + add = -50 + OR = { + stewardship < average_skill_rating + learning < average_skill_rating + AND = { + stewardship <= medium_skill_rating + learning <= medium_skill_rating + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_treasury_or_gold < medium_treasury_or_gold_value + stewardship < low_skill_rating + learning < low_skill_rating + } + } + } + } + #My quaint little corner of the world is nice + option = { + name = ep3_governor_yearly.3070.e + if = { + limit = { + culture != capital_county.culture + } + culture = { + change_cultural_acceptance = { + target = root.capital_county.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_content_governor + } + } + } + else_if = { + limit = { + culture = scope:liege.culture + has_dlc_feature = diverge_culture + NOT = { + has_character_flag = diverging_culture_discount + } + } + add_character_flag = diverging_culture_discount + custom_tooltip = diverging_culture_discount_tooltip + } + else_if = { + limit = { + culture = scope:liege.culture + } + add_piety = minor_piety_gain + } + else = { + add_character_modifier = { + modifier = contented_governing_countrymen_modifier + years = 10 + desc = contented_governing_countrymen_modifier_tooltip + } + } + change_influence = minor_influence_loss + if = { + limit = { + OR = { + culture != capital_county.culture + culture = scope:liege.culture + } + } + stress_impact = { + base = medium_stress_impact_loss + impatient = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + impatient = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_greed = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = ambitious + has_trait = arrogant + has_trait = impatient + } + } + } + } +} + +##################################### +# Taken by the Sea # +# by Jason Cantalini # +# 3080 # +##################################### + +scripted_trigger ep3_governor_yearly_3080_captain_trigger = { + is_alive = yes + is_adult = yes + age <= 55 + is_available = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + OR = { + prowess > low_skill_rating + martial > low_skill_rating + } + is_foreign_court_guest = no + NOR = { + is_primary_heir_of = root + is_player_heir_of = root + } +} + +#You are very distant from the emperor and shipments to you are being lost +ep3_governor_yearly.3080 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:liege.capital_county = { + is_coastal_county = yes + } + NOT = { + any_sub_realm_county = { + is_coastal_county = no + } + } + } + desc = ep3_governor_yearly.3080.t_sea + } + desc = ep3_governor_yearly.3080.t + } + } + desc = { + desc = ep3_governor_yearly.3080.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:rebel_faction + } + desc = ep3_governor_yearly.3080.desc_faction + } + desc = ep3_governor_yearly.3080.desc + } + } + theme = administrative + override_background = { + trigger = { + scope:liege.capital_county = { + is_coastal_county = yes + } + NOT = { + any_sub_realm_county = { + is_coastal_county = no + } + } + } + reference = ocean + } + override_background = { + trigger = { + OR = { + scope:liege.capital_county = { + is_coastal_county = no + } + any_sub_realm_county = { + is_coastal_county = no + } + } + } + reference = terrain_travel + } + + left_portrait = { + character = root + animation = anger + camera = camera_event_left_forward + } + + right_portrait = { + character = scope:captain + triggered_animation = { + trigger = { + exists = scope:rebel_faction + } + animation = throne_room_two_handed_passive_1 + } + triggered_animation = { + trigger = { + NOT = { + exists = scope:rebel_faction + } + } + animation = survey + } + camera = camera_event_right_pointing_left + } + lower_right_portrait = scope:liege + + trigger = { + is_landed = yes + government_has_flag = government_is_administrative + top_liege != this + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_at_war = no + age >= 8 + capital_province = { + save_temporary_scope_as = root_capital_temp + } + OR = { + #EMPEROR LIEGE + #Long range if both imperial capital and root's are coastal + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 400000 + } + #Medium range for one or the other + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + OR = { + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 300000 + } + #Short range if neither is coastal + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + NOR = { + liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 200000 + } + + #KING LIEGE + #Long range if both imperial capital and root's are coastal + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 200000 + } + #Medium range for one or the other + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + OR = { + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 150000 + } + #Short range if neither is coastal + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 100000 + } + } + OR = { + any_knight = { + ep3_governor_yearly_3080_captain_trigger = yes + } + any_courtier_or_guest = { + ep3_governor_yearly_3080_captain_trigger = yes + } + } + } + + cooldown = { + years = 10 + } + + immediate = { + capital_province = { + save_scope_as = root_capital + } + liege = { + save_scope_as = liege + } + if = { + limit = { + any_knight = { + ep3_governor_yearly_3080_captain_trigger = yes + } + } + random_knight = { + limit = { + ep3_governor_yearly_3080_captain_trigger = yes + } + save_scope_as = captain + } + } + else_if = { + limit = { + any_courtier = { + ep3_governor_yearly_3080_captain_trigger = yes + } + } + random_courtier = { + limit = { + ep3_governor_yearly_3080_captain_trigger = yes + } + save_scope_as = captain + } + } + else = { + random_pool_guest = { + limit = { + ep3_governor_yearly_3080_captain_trigger = yes + } + save_scope_as = captain + } + } + if = { + limit = { + any_targeting_faction = { + OR = { + faction_is_type = populist_faction + faction_is_type = peasant_faction + } + } + } + random_targeting_faction = { + limit = { + OR = { + faction_is_type = populist_faction + faction_is_type = peasant_faction + } + } + save_scope_as = rebel_faction + } + } + if = { + limit = { + exists = scope:rebel_faction + } + capital_county = { + change_county_control = miniscule_county_control_loss + } + } + else = { + add_character_flag = { + flag = ep3_governor_ignored_isolation + years = 5 + } + custom_tooltip = ep3_governor_ignored_isolation_tooltip + } + } + #Long-term improvements are needed or this will only happen again + option = { + trigger = { + has_trait = governor + stewardship >= very_high_skill_rating + } + name = ep3_governor_yearly.3080.a + if = { + limit = { + exists = scope:rebel_faction + NOT = { + has_character_modifier = ep3_face_of_empire_modifier + } + } + add_character_modifier = { + modifier = ep3_face_of_empire_modifier + years = 20 + } + } + else = { + capital_county = { + change_development_progress = medium_development_progress_gain + } + } + increase_governance_effect = { VALUE = 5 } + stress_impact = { + diligent = miniscule_stress_impact_loss + impatient = medium_stress_impact_gain + fickle = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = impatient + has_trait = fickle + has_trait = trusting + } + } + } + } + #I need to get out of here... + option = { + name = ep3_governor_yearly.3080.b + change_influence = minor_influence_gain + add_character_modifier = { + modifier = ep3_anxious_for_new_assignment_modifier + years = 5 + desc = ep3_anxious_for_new_assignment_desc + } + custom_tooltip = ep3_anxious_for_new_assignment_tooltip + stress_impact = { + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + humble = minor_stress_impact_gain + calm = minor_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_honor = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = just + has_trait = humble + has_trait = calm + has_trait = content + } + } + } + } + #We can take care of the rebels ourselves + option = { + trigger = { + exists = scope:rebel_faction + } + name = ep3_governor_yearly.3080.c + duel = { + skills = { martial diplomacy } + value = medium_skill_rating + 55 = { #You subdue them + desc = ep3_governor_yearly.3080.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -54 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.3080.c.success + increase_governance_effect = { VALUE = 10 } + if = { + limit = { + scope:captain = { + is_acclaimed = yes + } + } + scope:captain.accolade = { + add_glory = medium_glory_gain + } + } + else = { + scope:rebel_faction = { + add_faction_discontent = medium_discontent_loss + } + } + capital_county = { + change_county_control = minor_county_control_gain + } + } + } + 35 = { #The rebs remain angry + desc = ep3_governor_yearly.3080.c.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -34 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3080.c.fail + scope:captain = { + increase_wounds_effect = { REASON = fight } + } + scope:rebel_faction = { + add_faction_discontent = minor_discontent_gain + } + } + } + 10 = { #The rebs are very very angry + desc = ep3_governor_yearly.3080.c.crit_fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -9 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3080.c.crit_fail + + scope:captain = { + death = { + death_reason = death_disappearance + } + } + capital_county = { + change_county_control = medium_county_control_loss + } + scope:rebel_faction = { + add_faction_discontent = medium_discontent_gain + } + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 1 + } + modifier = { + add = -50 + OR = { + diplomacy < average_skill_rating + martial < average_skill_rating + AND = { + diplomacy <= medium_skill_rating + martial <= medium_skill_rating + } + } + } + modifier = { + add = 50 + OR = { + diplomacy >= very_high_skill_rating + martial >= very_high_skill_rating + AND = { + diplomacy >= decent_skill_rating + martial >= decent_skill_rating + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = lazy + diplomacy < low_skill_rating + martial < low_skill_rating + AND = { + diplomacy <= decent_skill_rating + martial <= decent_skill_rating + } + } + } + } + } + + #Go, find the lost post-haste! + option = { + trigger = { + NOT = { exists = scope:rebel_faction } + } + name = ep3_governor_yearly.3080.d + duel = { + skills = { diplomacy intrigue } + value = medium_skill_rating + 55 = { #You manage to recover lost shipments and scrounge replacements up + desc = ep3_governor_yearly.3080.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -54 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.3080.d.success + increase_governance_effect = { VALUE = 10 } + remove_character_flag = ep3_governor_ignored_isolation + custom_tooltip = ep3_governor_ignored_isolation_removal_tooltip + } + } + 35 = { #You find nothing + desc = ep3_governor_yearly.3080.d.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -34 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3080.d.fail + } + } + 10 = { #You waste money on a total debacle + desc = ep3_governor_yearly.3080.d.crit_fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -9 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3080.d.crit_fail + + capital_county = { + change_development_progress = medium_development_progress_loss + } + } + } + } + stress_impact = { + craven = minor_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 0.5 + } + modifier = { + add = -50 + OR = { + diplomacy < average_skill_rating + intrigue < average_skill_rating + AND = { + diplomacy <= medium_skill_rating + intrigue <= medium_skill_rating + } + } + } + modifier = { + add = 50 + OR = { + diplomacy >= very_high_skill_rating + intrigue >= very_high_skill_rating + AND = { + diplomacy >= decent_skill_rating + intrigue >= decent_skill_rating + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = lazy + diplomacy < low_skill_rating + intrigue < low_skill_rating + AND = { + diplomacy <= decent_skill_rating + intrigue <= decent_skill_rating + } + } + } + } + } + + #Whaddaya gonna do *shrug* + option = { + name = ep3_governor_yearly.3080.e + stress_impact = { + base = minor_stress_impact_loss + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + greedy = minor_stress_impact_gain + lazy = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_greed = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = paranoid + has_trait = ambitious + has_trait = greedy + } + } + } + } + after = { + if = { + limit = { + scope:captain ?= { + has_character_flag = need_military_outfit + } + } + scope:captain = { + remove_character_flag = need_military_outfit + } + } + } +} + +##################################### +# The Heart of the Byzantine Empire # +# by Jason Cantalini # +# 3090 # +##################################### + +#Your estate/province is at the center of the action and it's great +ep3_governor_yearly.3090 = { + type = character_event + title = ep3_governor_yearly.3090.t + desc = { + desc = ep3_governor_yearly.3090.desc + first_valid = { + triggered_desc = { + trigger = { + is_landed = yes + } + desc = ep3_governor_yearly.3090.landed + } + desc = ep3_governor_yearly.3090.unlanded + } + } + + theme = administrative + override_background = { + trigger = { + scope:root_capital.county = { + culture = { + OR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + } + } + reference = ep3_city_gate + } + override_background = { + trigger = { + scope:root_capital.county = { + culture_has_east_asian_heritage_pillar_trigger = yes + } + } + reference = market + } + override_background = { + trigger = { + scope:root_capital.county = { + culture = { + NOR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + culture_has_east_asian_heritage_pillar_trigger = no + } + } + } + reference = tour_arrival + } + + left_portrait = { + character = root + animation = jockey_wave + camera = camera_event_horse_left + } + lower_right_portrait = scope:liege + + trigger = { + age >= 8 + top_liege != this + government_allows = administrative + exists = domicile + trigger_if = { + limit = { + is_landed = yes + } + capital_province = { + save_temporary_scope_as = root_capital_temp + } + } + trigger_else = { + domicile = { + domicile_location = { + save_temporary_scope_as = root_capital_temp + } + } + } + OR = { + is_landed = yes + is_landless_administrative = yes + } + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_at_war = no + + #Capital is not a border province + NOT = { + scope:root_capital_temp.county = { + any_neighboring_county = { + holder = { + top_liege != root.top_liege + } + } + } + } + scope:root_capital_temp.county = { + culture = root.top_liege.capital_county.culture + } + + OR = { + scope:root_capital_temp = { + this = root.top_liege.capital_province + } + #EMPEROR LIEGE + #Long range if both imperial capital and root's are coastal + AND = { + is_landed = yes + top_liege = { + highest_held_title_tier >= tier_empire + } + top_liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 80000 + } + #Medium range for one or the other + AND = { + is_landed = yes + top_liege = { + highest_held_title_tier >= tier_empire + } + OR = { + top_liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 70000 + } + #Short range if neither is coastal + AND = { + is_landed = yes + top_liege = { + highest_held_title_tier >= tier_empire + } + NOR = { + top_liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 60000 + } + + #KING top_liege + #Long range if both imperial capital and root's are coastal + AND = { + OR = { + top_liege = { + highest_held_title_tier <= tier_kingdom + } + is_landless_ruler = yes + } + top_liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 40000 + } + #Medium range for one or the other + AND = { + OR = { + top_liege = { + highest_held_title_tier <= tier_kingdom + } + is_landless_ruler = yes + } + OR = { + top_liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 35000 + } + #Short range if neither is coastal + AND = { + OR = { + top_liege = { + highest_held_title_tier <= tier_kingdom + } + is_landless_ruler = yes + } + top_liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 30000 + } + } + OR = { + top_liege = { + highest_held_title_tier <= tier_empire + realm_size >= 50 + } + top_liege = { + highest_held_title_tier <= tier_kingdom + realm_size >= 20 + } + } + } + + cooldown = { + years = 10 + } + + immediate = { + if = { + limit = { + is_landed = yes + } + capital_province = { save_scope_as = root_capital } + } + else = { + domicile.domicile_location = { save_scope_as = root_capital } + } + top_liege = { save_scope_as = liege } + } + #Broker access to the halls of power in exchange for $$$ + option = { + name = ep3_governor_yearly.3090.a + flavor = ep3_governor_yearly.3090.a.flavor + add_gold = major_gold_value + change_influence = miniscule_influence_loss + + stress_impact = { + generous = medium_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = compassionate + has_trait = generous + short_term_gold < minor_gold_value + } + } + } + } + + + #Expand your local investments + option = { + name = ep3_governor_yearly.3090.b + if = { + limit = { + NOT = { + house = { + has_house_modifier = ep3_invested_in_power_center_modifier + } + } + } + house = { + add_house_modifier = { + modifier = ep3_invested_in_power_center_modifier + years = 50 + } + } + increase_governance_effect = { VALUE = 5 } + } + else_if = { + limit = { + OR = { + is_landless_ruler = yes + domicile.domicile_location = root.capital_province + } + NOT = { + has_character_modifier = ep3_cosmopolitan_domicile_modifier + } + } + add_character_modifier = { + modifier = ep3_cosmopolitan_domicile_modifier + years = 10 + } + } + else_if = { + limit = { + is_landed = yes + } + increase_governance_effect = { VALUE = 10 } + capital_county = { + change_development_progress = minor_development_progress_gain + } + } + else = { + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + remove_short_term_gold = minor_gold_value + + stress_impact = { + impatient = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = fickle + has_trait = impatient + short_term_gold < minor_gold_value + } + } + } + } + + #Host a dinner with some influential persons + option = { + name = ep3_governor_yearly.3090.c + flavor = ep3_governor_yearly.3090.c.flavor + #Add opinion with local lords and landless admin + change_influence = medium_influence_gain + if = { + limit = { + is_landed = yes + } + scope:liege = { + every_vassal = { + custom = custom.every_realm_vassal_local_estate + limit = { + domicile.domicile_location ?= { + county = { + holder = { + OR = { + this = root + liege = root + } + } + } + } + this != root + } + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 10 + } + } + } + every_vassal = { + custom = custom.every_vassal + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 10 + } + + } + } + else = { + scope:liege = { + every_vassal = { + custom = custom.every_vassal_same_domicile_location + limit = { + domicile.domicile_location ?= scope:root_capital + this != root + } + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { scope:root_capital.county.holder = root.top_liege } + scope:liege = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 10 + } + } + } + if = { + limit = { + scope:liege = { + any_close_family_member = { + is_adult = yes + location = scope:root_capital + this != root + } + } + } + scope:liege = { + random_close_family_member = { + limit = { + is_adult = yes + location = scope:root_capital + this != root + } + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 10 + } + } + } + } + if = { + limit = { + scope:liege = { + any_councillor = { + is_adult = yes + location = scope:root_capital + this != root + } + } + } + scope:liege = { + random_councillor = { + limit = { + is_adult = yes + location = scope:root_capital + this != root + } + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 10 + } + } + } + } + } + stress_impact = { + shy = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = temperate + } + } + } + } +} + +##################################### +# Our Empire, Pandemonium # +# by Jason Cantalini # +# 3100 # +##################################### + +scripted_trigger ep3_governor_yearly_3100_messenger_trigger = { + is_alive = yes + is_adult = yes + age <= 55 + is_travelling = no + is_in_army = no + is_imprisoned = no + has_contagious_deadly_disease_trigger = no + is_incapable = no + is_foreign_court_guest = no + trigger_if = { + limit = { + exists = scope:liege_temp + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:liege_temp } + NOR = { + is_primary_heir_of = scope:liege_temp + is_player_heir_of = scope:liege_temp + is_close_family_of = scope:liege_temp + is_spouse_of = scope:liege_temp + } + } + trigger_else = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:liege } + NOR = { + is_primary_heir_of = scope:liege + is_player_heir_of = scope:liege + is_close_family_of = scope:liege + is_spouse_of = scope:liege + } + } + +} + +scripted_trigger ep3_governor_yearly_3100_crappy_liege_trigger = { + #Liege sucks + liege = { + has_active_diarchy = no + OR = { + #Bad governor (won't work on emperors) + governor_efficiency <= 0.6 + #Generally shite + AND = { + diplomacy <= low_skill_rating + martial <= low_skill_rating + stewardship <= low_skill_rating + intrigue <= low_skill_rating + learning <= low_skill_rating + } + + } + } +} + +#Liege is in debt / region or empire is poorly governed +ep3_governor_yearly.3100 = { + type = character_event + title = ep3_governor_yearly.3100.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + liege = { + gold <= -50 + } + ep3_governor_yearly_3100_crappy_liege_trigger = yes + } + } + desc = ep3_governor_yearly.3100.intro_liege + } + desc = ep3_governor_yearly.3100.intro_governors + } + desc = ep3_governor_yearly.3100.desc + first_valid = { + triggered_desc = { + trigger = { + liege = { + gold <= -50 + } + } + desc = ep3_governor_yearly.3100.desc_liege_debt + } + triggered_desc = { + trigger = { + ep3_governor_yearly_3100_crappy_liege_trigger = yes + } + desc = ep3_governor_yearly.3100.desc_liege_skill + } + desc = ep3_governor_yearly.3100.desc_governors + } + } + + theme = administrative + + left_portrait = { + character = root + animation = war_defender + } + right_portrait = { + character = scope:messenger + animation = obsequious_bow + } + lower_right_portrait = scope:liege + + trigger = { + NOT = { + has_government = celestial_government + } + age >= 12 + top_liege != this + government_allows = administrative + OR = { + is_landed = yes + is_landless_administrative = yes + } + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_at_war = no + OR = { + #liege is in debt + liege = { + gold <= -50 + } + ep3_governor_yearly_3100_crappy_liege_trigger = yes + #Governors of empire suck + liege = { + any_vassal = { + government_allows = administrative + is_landed = yes + add_to_temporary_list = admin_vassals + } + any_in_list = { + list = admin_vassals + percent >= 0.5 + governor_efficiency <= 0.8 + } + } + } + liege = { + save_temporary_scope_as = liege_temp + OR = { + any_courtier = { + ep3_governor_yearly_3100_messenger_trigger = yes + } + any_pool_guest = { + ep3_governor_yearly_3100_messenger_trigger = yes + } + } + } + governor_efficiency > 0.75 + } + + cooldown = { + years = 10 + } + immediate = { + if = { + limit = { + is_landed = yes + } + capital_province = { + save_scope_as = root_capital + } + } + else = { + domicile = { + domicile_location = { + save_scope_as = root_capital + } + } + } + liege = { + save_scope_as = liege + assign_quirk_effect = yes + } + #Save random courtier to be messenger + scope:liege = { + if = { + limit = { + any_courtier = { + ep3_governor_yearly_3100_messenger_trigger = yes + } + } + random_courtier = { + limit = { + ep3_governor_yearly_3100_messenger_trigger = yes + } + save_scope_as = messenger + } + } + else = { + random_pool_guest = { + limit = { + ep3_governor_yearly_3100_messenger_trigger = yes + } + save_scope_as = messenger + } + } + } + + #Choose negative trait that might be gained + random_list = { + 5 = { + trigger = { + NOR = { + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = ambitious + has_trait = diligent + } + OR = { + ai_energy <= low_negative_ai_value + ai_compassion >= low_positive_ai_value + } + } + add_character_flag = { + flag = ep3_governor_yearly_3100_depressed + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = reclusive + has_trait = gregarious + } + ai_sociability <= low_negative_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_reclusive + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = irritable + has_trait = calm + } + ai_vengefulness >= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_irritable + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = drunkard + has_trait = temperate + AND = { + faith_forbids_alcohol_trigger = yes + has_trait = zealous + } + } + ai_energy <= low_negative_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_drunkard + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = hashishiyah + has_trait = temperate + } + ai_energy <= low_negative_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_hashishiyah + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = comfort_eater + has_trait = temperate + } + ai_greed >= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_comfort_eater + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = contrite + has_trait = arrogant + has_trait = vengeful + has_trait = sadistic + has_trait = callous + } + ai_compassion >= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_contrite + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = improvident + has_trait = greedy + has_trait = sadistic + has_trait = callous + } + ai_greed <= low_negative_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_improvident + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = rakish + has_trait = chaste + has_trait = celibate + has_sexuality = asexual + } + is_adult = yes + ai_sociability >= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_rakish + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = profligate + has_trait = temperate + has_trait = diligent + } + ai_rationality <= low_negative_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_profligate + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = flagellant + has_trait = cynical + } + ai_zeal >= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_flagellant + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = gluttonous + has_trait = inappetetic + } + ai_greed <= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_inappetetic + days = 20 + } + } + } + save_scope_as = root_scope + } + #My example should be followed more closely + option = { + name = ep3_governor_yearly.3100.a + trigger = { + governor_efficiency >= 1.25 + } + reason = governor_efficiency + change_influence = major_influence_gain + add_prestige = medium_prestige_gain + + custom_tooltip = ep3_following_governorship_example_tooltip + if = { + limit = { + OR = { + scope:liege = { + gold <= -50 + } + ep3_governor_yearly_3100_crappy_liege_trigger = yes + } + is_ai = no + } + scope:liege = { + increase_governance_effect = { VALUE = 20 } + } + } + else_if = { + limit = { + OR = { + scope:liege = { + gold <= -50 + } + ep3_governor_yearly_3100_crappy_liege_trigger = yes + } + } + scope:liege = { + increase_governance_effect = { VALUE = 10 } + } + } + else_if = { + limit = { + is_ai = no + } + hidden_effect = { + scope:liege = { + every_vassal = { + increase_governance_effect = { VALUE = 10 } + } + } + } + } + else = { + hidden_effect = { + scope:liege = { + every_vassal = { + increase_governance_effect = { VALUE = 5 } + } + } + } + } + stress_impact = { + base = major_stress_impact_gain + diligent = major_stress_impact_loss + just = minor_stress_impact_loss + administrator = minor_stress_impact_loss + loyal = miniscule_stress_impact_loss + lazy = major_stress_impact_gain + content = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_energy = 1 + ai_honor = 1 + } + modifier = { + add = -100 + stress_level >= 1 + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = content + has_trait = arbitrary + stress_level >= 2 + } + } + } + } + #Urge the Emperor to amend this state of affairs + option = { + name = ep3_governor_yearly.3100.b + duel = { + skill = diplomacy + value = medium_skill_rating + 55 = { #The emperor is impressed by your conviction + desc = ep3_governor_yearly.3100.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -54 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.3100.b.success + left_icon = scope:liege + change_influence = minor_influence_gain + scope:liege = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + } + } + 45 = { #The emperor is offended + desc = ep3_governor_yearly.3100.b.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -44 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3100.b.fail + left_icon = scope:liege + scope:liege = { + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -30 + } + } + } + } + } + hidden_effect = { + if = { + limit = { + ep3_governor_yearly_3100_crappy_liege_trigger = yes + top_liege = this + + } + scope:liege = { + send_interface_message = { + type = msg_governor_upset_about_skill + title = msg_governor_upset_about_skill.t + desc = msg_governor_upset_about_skill.desc + right_icon = scope:root_scope + + reverse_add_opinion = { + modifier = frustrated_opinion + target = scope:root_scope + opinion = -10 + } + } + } + } + else_if = { + limit = { + ep3_governor_yearly_3100_crappy_liege_trigger = yes + top_liege != this + + } + scope:liege = { + send_interface_message = { + type = msg_governor_upset_about_governance + title = msg_governor_upset_about_governance.t + desc = msg_governor_upset_about_governance.desc + right_icon = scope:root_scope + + reverse_add_opinion = { + modifier = frustrated_opinion + target = scope:root_scope + opinion = -10 + } + } + } + } + else_if = { + limit = { + liege = { + gold <= -50 + } + } + scope:liege = { + send_interface_message = { + type = msg_governor_upset_about_insolvency + title = msg_governor_upset_about_insolvency.t + desc = msg_governor_upset_about_insolvency.desc + right_icon = scope:root_scope + + reverse_add_opinion = { + modifier = frustrated_opinion + target = scope:root_scope + opinion = -15 + } + } + } + } + else = { + scope:liege = { + send_interface_message = { + type = msg_governor_upset_about_bad_govs + title = msg_governor_upset_about_bad_govs.t + desc = msg_governor_upset_about_bad_govs.desc + right_icon = scope:root_scope + + reverse_add_opinion = { + modifier = frustrated_opinion + target = scope:root_scope + opinion = -10 + } + } + } + } + } + stress_impact = { + stubborn = miniscule_stress_impact_loss + shy = miniscule_stress_impact_gain + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_sociability = 1 + } + + modifier = { + add = 50 + diplomacy >= very_high_skill_rating + } + modifier = { + add = -50 + has_trait = shy + } + modifier = { + add = -50 + diplomacy <= decent_skill_rating + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = humble + diplomacy < average_skill_rating + } + } + } + } + #Things are bad... I need to grab stuff for myself + option = { + name = ep3_governor_yearly.3100.c + flavor = ep3_governor_yearly.3100.c.flavor + if = { + limit = { + is_landed = yes + } + add_gold = medium_gold_value + capital_county = { + change_development_progress = medium_development_progress_loss + } + add_prestige = medium_prestige_loss + } + else = { + add_gold = minor_gold_value + add_prestige = medium_prestige_loss + } + stress_impact = { + greedy = miniscule_stress_impact_loss + just = medium_stress_impact_gain + generous = medium_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = -100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + + modifier = { + add = -50 + prestige < major_prestige_value + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = generous + has_trait = honest + prestige < medium_prestige_value + } + } + } + } + #God, I can't think about this miserable state of affairs... + option = { + name = ep3_governor_yearly.3100.d + flavor = ep3_governor_yearly.3100.d.flavor + #Reduce governor efficiency + add_character_modifier = { + modifier = ep3_ignoring_realm_decline_modifier + years = 10 + desc = ep3_ignoring_realm_decline_tooltip + } + custom_tooltip = ep3_ignoring_realm_decline_years_tooltip + random_list = { + 45 = { + add_stress = minor_stress_impact_loss + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_reclusive + + } + add_trait = reclusive + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_irritable + } + add_trait = irritable + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_drunkard + } + add_trait = drunkard + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_hashishiyah + } + add_trait = hashishiyah + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_comfort_eater + } + add_trait = comfort_eater + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_flagellant + } + add_trait = flagellant + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_contrite + } + add_trait = contrite + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_improvident + } + add_trait = improvident + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_rakish + } + add_trait = rakish + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_hashishiyah + } + add_trait = hashishiyah + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_profligate + } + add_trait = profligate + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_inappetetic + } + add_trait = inappetetic + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_depressed + } + add_trait = depressed_1 + } + } + stress_impact = { + lazy = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + depressed_1 = miniscule_stress_impact_loss + depressed_genetic = miniscule_stress_impact_loss + diligent = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_greed = -1 + } + + modifier = { + add = -50 + prestige < major_prestige_value + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = ambitious + has_trait = stubborn + prestige < medium_prestige_value + } + } + } + } +} + diff --git a/N3OW/events/dlc/ep3/ep3_governor_yearly_8.txt b/N3OW/events/dlc/ep3/ep3_governor_yearly_8.txt new file mode 100644 index 00000000..6c638bcb --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_governor_yearly_8.txt @@ -0,0 +1,4489 @@ +namespace = ep3_governor_yearly + +################################################## +# EP3 Governor Events +# by Joe Parkin + +scripted_trigger ep3_governor_involved_with_root_or_liege_trigger = { + OR = { + trigger_if = { + limit = { exists = house } + OR = { + root.house ?= house + root.top_liege.house ?= house + } + } + is_close_family_of = root + is_close_family_of = root.top_liege + is_consort_of = root + is_consort_of = root.top_liege + has_any_scripted_relation = root + has_any_scripted_relation = root.top_liege + } +} + +##################################### +# Scratching Backs # +# by Joe Parkin # +# 8010 # +##################################### + +scripted_trigger ep3_governor_8010_governor_trigger = { + this != root + is_available_adult = yes + is_governor = yes + is_ai = yes + ep3_governor_involved_with_root_or_liege_trigger = no + NOR = { + house_has_feud_relation_with_trigger = { TARGET = root } + has_trait = content + has_trait = honest + has_trait = humble + } +} + +scripted_effect ep3_governor_8010_offer_demand_effect = { + switch = { + trigger = $FLAG_SCOPE$ + flag:hook = { + $RECEIVER$ = { + add_hook = { + target = $GIVER$ + type = obligation_hook + } + } + } + flag:candidacy = { + $TITLE$ = { + change_appointment_investment = { + target = $TITLE_RECEIVER$ + value = appointment_score_minor_value + } + } + } + flag:influence = { + $RECEIVER$ = { change_influence = medium_influence_gain } + } + flag:gold = { + $GIVER$ = { + pay_short_term_gold = { + gold = medium_gold_value + target = $RECEIVER$ + } + } + } + } +} + +ep3_governor_yearly.8010 = { + type = letter_event + opening = ep3_governor_yearly.8010.opening + desc = { + desc = ep3_governor_yearly.8010.desc + first_valid = { + triggered_desc = { + trigger = { scope:governor_request = flag:hook } + desc = ep3_governor_yearly.8010.hook + } + triggered_desc = { + trigger = { scope:governor_request = flag:candidacy } + desc = ep3_governor_yearly.8010.candidacy + } + triggered_desc = { + trigger = { scope:governor_request = flag:influence } + desc = ep3_governor_yearly.8010.influence + } + desc = ep3_governor_yearly.8010.gold + } + desc = ep3_governor_yearly.8010.end + } + sender = { + character = scope:governor + animation = schadenfreude + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + top_liege = { + any_vassal = { ep3_governor_8010_governor_trigger = yes } + } + } + + immediate = { + top_liege = { + random_vassal = { + limit = { + ep3_governor_8010_governor_trigger = yes + OR = { + has_trait = ambitious + has_trait = arrogant + has_trait = deceitful + } + any_neighboring_realm_same_rank_owner = { this = root } + } + alternative_limit = { + ep3_governor_8010_governor_trigger = yes + OR = { + has_trait = ambitious + has_trait = arrogant + has_trait = deceitful + } + } + alternative_limit = { ep3_governor_8010_governor_trigger = yes } + weight = { + base = 100 + modifier = { add = ai_energy } + modifier = { add = ai_boldness } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + } + save_scope_as = governor + ordered_heir_title = { + limit = { + has_order_of_succession = appointment + tier >= tier_duchy + } + order_by = "place_in_line_of_succession(root)" + save_scope_as = their_title + } + save_scope_as = their_title_receiver + if = { + limit = { + NOR = { + exists = scope:their_title + primary_heir ?= root.top_liege + } + } + primary_heir ?= { + ordered_heir_title = { + limit = { + has_order_of_succession = appointment + tier >= tier_duchy + } + order_by = "place_in_line_of_succession(scope:governor.primary_heir)" + save_scope_as = their_title + } + save_scope_as = their_title_receiver + } + } + if = { + limit = { + NOT = { exists = scope:their_title } + } + top_liege.primary_title = { save_scope_as = their_title } + } + if = { + limit = { + NOT = { exists = scope:title_receiver } + } + save_scope_as = title_receiver + } + } + } + ordered_heir_title = { + limit = { + has_order_of_succession = appointment + tier >= tier_duchy + } + order_by = "place_in_line_of_succession(root)" + save_scope_as = title + } + save_scope_as = title_receiver + if = { + limit = { + NOR = { + exists = scope:title + primary_heir ?= root.top_liege + } + } + primary_heir ?= { + ordered_heir_title = { + limit = { + has_order_of_succession = appointment + tier >= tier_duchy + } + order_by = "place_in_line_of_succession(root.primary_heir)" + save_scope_as = title + } + save_scope_as = title_receiver + } + } + if = { + limit = { + NOT = { exists = scope:title } + } + top_liege.primary_title = { save_scope_as = title } + } + if = { + limit = { + NOT = { exists = scope:title_receiver } + } + save_scope_as = title_receiver + } + hidden_effect = { + random_list = { + 10 = { + trigger = { + NOT = { + scope:governor = { has_hook = root } + } + } + modifier = { add = scope:governor.intrigue } + save_scope_value_as = { + name = governor_request + value = flag:hook + } + } + 10 = { + trigger = { + exists = scope:their_title + exists = scope:their_title_receiver + scope:their_title = { has_order_of_succession = appointment } + } + modifier = { + add = 10 + scope:governor = { has_trait = ambitious } + } + modifier = { + add = 10 + scope:governor = { has_claim_on = root.top_liege.primary_title } + } + save_scope_value_as = { + name = governor_request + value = flag:candidacy + } + } + 10 = { + save_scope_value_as = { + name = governor_request + value = flag:influence + } + } + 10 = { + trigger = { root.gold > root.major_gold_value } + modifier = { + add = { + value = scope:governor.ai_greed + multiply = 0.25 + } + } + save_scope_value_as = { + name = governor_request + value = flag:gold + } + } + } + random_list = { + 5 = { + trigger = { + NOR = { + scope:governor_request ?= flag:hook + has_hook = scope:governor + } + } + modifier = { add = scope:governor.intrigue } + save_scope_value_as = { + name = governor_offer + value = flag:hook + } + } + 10 = { + trigger = { + NOT = { scope:governor_request ?= flag:candidacy } + exists = scope:title + exists = scope:title_receiver + scope:their_title = { has_order_of_succession = appointment } + } + modifier = { + add = 10 + has_trait = ambitious + } + modifier = { + add = 10 + has_claim_on = root.top_liege.primary_title + } + save_scope_value_as = { + name = governor_offer + value = flag:candidacy + } + } + 10 = { + trigger = { + NOT = { scope:governor_request ?= flag:influence } + } + save_scope_value_as = { + name = governor_offer + value = flag:influence + } + } + 10 = { + trigger = { + NOT = { scope:governor_request ?= flag:gold } + scope:governor.gold > scope:governor.major_gold_value + } + modifier = { + gold < minor_gold_value + add = 10 + } + modifier = { + gold < 0 + add = 10 + } + save_scope_value_as = { + name = governor_offer + value = flag:gold + } + } + } + } + } + + option = { # Accept + name = ep3_governor_yearly.8010.a + ep3_governor_8010_offer_demand_effect = { + FLAG_SCOPE = scope:governor_offer + GIVER = scope:governor + RECEIVER = root + TITLE = scope:title + TITLE_RECEIVER = scope:title_receiver + } + ep3_governor_8010_offer_demand_effect = { + FLAG_SCOPE = scope:governor_request + GIVER = root + RECEIVER = scope:governor + TITLE = scope:their_title + TITLE_RECEIVER = scope:their_title_receiver + } + reverse_add_opinion = { + target = scope:governor + modifier = pleased_opinion + opinion = 10 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 2 + ai_boldness = 1 + ai_honor = -2 + ai_energy = 1 + } + } + } + + option = { # Reverse + name = ep3_governor_yearly.8010.b + duel = { + skills = { intrigue diplomacy } + target = scope:governor + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8010.b.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8010.b.success + right_icon = scope:governor + ep3_governor_8010_offer_demand_effect = { + FLAG_SCOPE = scope:governor_offer + GIVER = root + RECEIVER = scope:governor + TITLE = scope:their_title + TITLE_RECEIVER = scope:their_title_receiver + } + ep3_governor_8010_offer_demand_effect = { + FLAG_SCOPE = scope:governor_request + GIVER = scope:governor + RECEIVER = root + TITLE = scope:title + TITLE_RECEIVER = scope:title_receiver + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8010.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8010.b.failure + right_icon = scope:governor + reverse_add_opinion = { + target = scope:governor + modifier = annoyed_opinion + opinion = -15 + } + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -1 + } + } + } + + option = { # Refuse + name = ep3_governor_yearly.8010.c + reverse_add_opinion = { + target = scope:governor + modifier = disappointed_opinion + opinion = -10 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +##################################### +# Provincial Leverage # +# by Joe Parkin # +# 8020 # +##################################### + +scripted_trigger ep3_governor_8020_estate_holder_trigger = { + this != root + is_ai = yes + domicile ?= { + is_domicile_type = estate + OR = { + domicile_location.county.holder ?= root + domicile_location.county.holder.liege ?= root + domicile_location.county.holder.liege.liege ?= root + } + num_domicile_buildings >= 3 + } + is_available_adult = yes + ep3_governor_involved_with_root_or_liege_trigger = no +} + +scripted_effect ep3_governor_8020_fail_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8020.failure + right_icon = scope:estate_owner + + scope:estate_owner = { save_scope_as = recipient } # For loc reasons + custom_tooltip = { + text = raid_estate_destroy_buildings_tt + scope:other_estate = { + destroy_random_estate_building_variable_effect = yes + destroy_random_estate_building_effect = yes + } + } + } +} + +ep3_governor_yearly.8020 = { + type = character_event + title = ep3_governor_yearly.8020.t + desc = { + desc = ep3_governor_yearly.8020.desc + } + theme = administrative + override_background = { reference = estate } + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:estate_owner + animation = disapproval + } + + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + is_governor = yes + domicile ?= { is_domicile_type = estate } + top_liege = { + any_vassal_or_below = { ep3_governor_8020_estate_holder_trigger = yes } + } + } + + immediate = { + domicile = { save_scope_as = my_estate } + top_liege = { + random_vassal_or_below = { + limit = { ep3_governor_8020_estate_holder_trigger = yes } + save_scope_as = estate_owner + domicile = { save_scope_as = other_estate } + } + } + } + + option = { # Extort + name = ep3_governor_yearly.8020.a + flavor = ep3_governor_yearly.8020.reason + reverse_add_opinion = { + target = scope:estate_owner + modifier = extorted_me_opinion + opinion = -20 + } + save_scope_value_as = { + name = extort_chance + value = { + value = 0 + add = { + value = scope:estate_owner.ai_greed + multiply = 0.25 + } + } + } + save_scope_value_as = { + name = gold_value + value = { + value = 0 + add = { + value = scope:estate_owner.minor_gold_value + multiply = root.stewardship + divide = 2 + } + } + } + save_scope_as = extorted + duel = { + skill = stewardship + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + modifier = { add = scope:extort_chance } + modifier = { + scope:estate_owner.short_term_gold < scope:gold_value + factor = 0.1 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8020.success + right_icon = scope:estate_owner + scope:estate_owner = { + pay_short_term_gold = { + target = root + gold = scope:gold_value + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + ep3_governor_8020_fail_effect = yes + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -2 + ai_energy = 1 + } + } + } + + option = { # Favor + name = ep3_governor_yearly.8020.b + flavor = ep3_governor_yearly.8020.reason + reverse_add_opinion = { + target = scope:estate_owner + modifier = extorted_me_opinion + opinion = -20 + } + save_scope_as = extorted + save_scope_value_as = { + name = extort_chance + value = { + value = 50 + add = { + value = scope:estate_owner.ai_honor + multiply = 0.25 + } + max = 75 + min = 25 + } + } + duel = { + skill = intrigue + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + modifier = { add = scope:extort_chance } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8020.success + right_icon = scope:estate_owner + add_hook = { + target = scope:estate_owner + type = obligation_hook + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + ep3_governor_8020_fail_effect = yes + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -1 + } + } + } + + option = { # Good word + name = ep3_governor_yearly.8020.c + flavor = ep3_governor_yearly.8020.reason + reverse_add_opinion = { + target = scope:estate_owner + modifier = extorted_me_opinion + opinion = -20 + } + save_scope_as = extorted + save_scope_value_as = { + name = extort_chance + value = { + value = 50 + add = { + value = scope:estate_owner.ai_energy + multiply = 0.25 + } + max = 75 + min = 25 + } + } + save_scope_value_as = { + name = influence_value + value = { + value = minor_influence_gain + multiply = diplomacy + divide = 2 + } + } + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + modifier = { add = scope:extort_chance } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8020.success + right_icon = scope:estate_owner + change_influence = scope:influence_value + scope:estate_owner = { change_influence = minor_influence_loss } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + ep3_governor_8020_fail_effect = yes + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -1 + ai_honor = 1 + } + } + } + + option = { # Friendly + name = ep3_governor_yearly.8020.d + reverse_add_opinion = { + target = scope:estate_owner + modifier = friendliness_opinion + opinion = 15 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +##################################### +# Accidental Grace # +# by Joe Parkin # +# 8030 # +##################################### + +scripted_trigger ep3_governor_yearly_8030_informer_trigger = { + is_available_adult = yes + OR = { + is_courtier = yes + AND = { + highest_held_title_tier = tier_barony + has_government = republic_government + } + } + ep3_governor_involved_with_root_or_liege_trigger = no +} + +ep3_governor_yearly.8030 = { + type = character_event + title = ep3_governor_yearly.8030.t + desc = { + desc = ep3_governor_yearly.8030.desc + random_valid = { + triggered_desc = { + trigger = { + scope:estate = { + OR = { + has_domicile_building_or_higher = barracks_01 + has_domicile_building_or_higher = watchtower_01 + has_domicile_building_or_higher = guardhouse_01 + } + } + } + desc = ep3_governor_yearly.8030.martial + } + triggered_desc = { + trigger = { + scope:estate = { + OR = { + has_domicile_building_or_higher = garden_01 + has_domicile_building_or_higher = grazing_land_01 + has_domicile_building_or_higher = grain_field_01 + has_domicile_building_or_higher = vineyard_01 + has_domicile_building_or_higher = olive_01 + } + } + } + desc = ep3_governor_yearly.8030.agriculture + } + triggered_desc = { + trigger = { + scope:estate = { + OR = { + has_domicile_building_or_higher = market_01 + has_domicile_building_or_higher = workshop_01 + has_domicile_building_or_higher = guardhouse_01 + } + } + } + desc = ep3_governor_yearly.8030.commerce + } + desc = ep3_governor_yearly.8030.fallback + } + } + theme = administrative + override_background = { reference = estate } + left_portrait = { + character = root + animation = admiration + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + domicile ?= { + is_domicile_type = estate + num_domicile_buildings >= 3 + domicile_location.county = { + OR = { + holder = root + holder = { is_vassal_of = root } + } + } + } + NOT = { + any_sub_realm_county = { + OR = { + has_county_modifier = ep3_governor_yearly_8030_stifled_modifier + has_county_modifier = ep3_governor_yearly_8030_benign_modifier + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = governor_efficiency + divide = 100 + } + } + } + + immediate = { + domicile = { save_scope_as = estate } + } + + option = { # Tax it + name = ep3_governor_yearly.8030.a + add_treasury_or_gold = medium_treasury_or_gold_value + stress_impact = { + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 0.5 + } + } + } + + option = { # Encourage it + name = ep3_governor_yearly.8030.b + increase_governance_effect = { VALUE = 5 } + add_character_modifier = { + modifier = ep3_governor_yearly_8030_benign_char_modifier + years = 10 + } + scope:estate.domicile_location.county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8030_benign_modifier + years = 10 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + callous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 0.5 + } + } + } + + option = { # Leave it + name = ep3_governor_yearly.8030.c + stress_impact = { + diligent = minor_stress_impact_gain + greedy = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + ai_energy = -1 + } + } + } +} + +##################################### +# Dynastic Distractions # +# by Joe Parkin # +# 8040 # +##################################### + +scripted_trigger ep3_governor_yearly_8040_complainant_trigger = { + is_available_adult = yes + is_ai = yes + highest_held_title_tier <= tier_county + ep3_governor_involved_with_root_or_liege_trigger = no + capital_county.duchy = root.domicile.domicile_location.duchy +} + +ep3_governor_yearly.8040 = { + type = character_event + title = ep3_governor_yearly.8040.t + desc = ep3_governor_yearly.8040.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:complainant + animation = debating + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + domicile ?= { + is_domicile_type = estate + num_domicile_buildings >= 3 + } + any_vassal_or_below = { ep3_governor_yearly_8040_complainant_trigger = yes } + NOT = { + any_sub_realm_county = { + OR = { + has_county_modifier = ep3_governor_yearly_8030_stifled_modifier + has_county_modifier = ep3_governor_yearly_8030_benign_modifier + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = governor_efficiency + divide = 100 + multiply = -1 + } + } + } + + immediate = { + domicile = { save_scope_as = estate } + random_vassal_or_below = { + limit = { ep3_governor_yearly_8040_complainant_trigger = yes } + weight = { + base = 1 + modifier = { + add = 1 + government_has_flag = government_is_republic + } + modifier = { + add = -1 + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + } + } + modifier = { + add = -2 + government_has_flag = government_is_theocracy + } + modifier = { + add = 10 + liege ?= root + } + } + save_scope_as = complainant + } + } + + option = { # Focus on province + name = ep3_governor_yearly.8040.a + increase_governance_effect = { VALUE = 5 } + add_character_modifier = { + modifier = ep3_governor_yearly_8040_province_development_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:complainant + modifier = respect_opinion + opinion = 15 + } + stress_impact = { + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = 1 + ai_greed = -1 + } + } + } + + option = { # Focus on estate + name = ep3_governor_yearly.8040.b + add_character_modifier = { + modifier = ep3_governor_yearly_8040_domicile_development_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:complainant + modifier = annoyed_opinion + opinion = -15 + } + stress_impact = { + generous = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = 1 + ai_greed = -1 + } + } + } + + option = { # Try to do both + name = ep3_governor_yearly.8040.d + duel = { + skill = stewardship + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8040.d.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8040.d.success + add_character_modifier = { + modifier = ep3_governor_yearly_8040_across_things_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:complainant + modifier = impressed_opinion + opinion = 15 + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8040.d.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8040.d.failure + add_character_modifier = { + modifier = ep3_governor_yearly_8040_overwhelmed_modifier + years = 10 + } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + humble = minor_stress_impact_gain + calm = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + ai_energy = -1 + } + } + } + + option = { # Defer + name = ep3_governor_yearly.8040.c + reverse_add_opinion = { + target = scope:complainant + modifier = angry_opinion + opinion = -30 + } + add_character_modifier = { + modifier = ep3_governor_yearly_8040_shirker_modifier + years = 5 + } + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -0.5 + ai_honor = -0.5 + } + } + } +} + +##################################### +# Enemy at the Gates # +# by Joe Parkin # +# 8050 # +##################################### + +scripted_trigger ep3_governor_8050_war_trigger = { + primary_defender = root.top_liege + casus_belli = { + any_target_title = { is_de_jure_liege_or_above_target = root.primary_title } + } + NOT = { + any_war_participant = { this = root } + } +} + +ep3_governor_yearly.8050 = { + type = character_event + title = ep3_governor_yearly.8050.t + desc = { + desc = ep3_governor_yearly.8050.desc + first_valid = { + triggered_desc = { + trigger = { always = yes } + desc = ep3_governor_yearly.8050.kingdom + } + desc = ep3_governor_yearly.8050.neighbour + } + desc = ep3_governor_yearly.8050.end + } + theme = administrative + override_background = { reference = ep3_city_gate } + left_portrait = { + character = root + animation = worry + } + lower_left_portrait = scope:war_liege + lower_right_portrait = scope:war_attacker + + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + government_has_flag = government_is_administrative + is_available_adult = yes + is_governor = yes + top_liege = { + is_at_war = yes + any_character_war = { ep3_governor_8050_war_trigger = yes } + } + NOT = { + is_at_war_with = top_liege + } + } + + immediate = { + top_liege = { + save_scope_as = war_liege + random_character_war = { + limit = { ep3_governor_8050_war_trigger = yes } + save_scope_as = war + primary_attacker = { save_scope_as = war_attacker } + casus_belli = { + ordered_target_title = { + limit = { is_de_jure_liege_or_above_target = root.primary_title } + order_by = tier + save_scope_as = target_title + } + } + } + } + } + + option = { # Send soldiers + name = ep3_governor_yearly.8050.a + scope:war = { add_defender = root } + top_liege.primary_title = { + change_appointment_investment = { + target = root + value = appointment_score_minor_value + } + } + add_character_modifier = { + modifier = ep3_governor_yearly_8050_imperial_recruiter_modifier + years = 10 + } + stress_impact = { + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 1 + ai_energy = 1 + } + } + } + + option = { # Request reinforcements + name = ep3_governor_yearly.8050.b + add_character_modifier = { + modifier = ep3_governor_yearly_8050_imperial_fortification_modifier + years = 10 + } + stress_impact = { + brave = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 1 + ai_boldness = -1 + ai_greed = -1 + } + } + } + + option = { # Request gold + name = ep3_governor_yearly.8050.c + add_treasury_or_gold = top_liege.medium_treasury_or_gold_value + change_influence = medium_influence_loss + add_character_modifier = { + modifier = ep3_governor_yearly_8050_imperial_resources_modifier + years = 10 + } + stress_impact = { + generous = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + } + } + + option = { # Nothing + name = ep3_governor_yearly.8050.d + stress_impact = { + greedy = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +##################################### +# Provincial Rackets # +# by Joe Parkin # +# 8060 # +##################################### + +scripted_trigger ep3_governor_yearly_8060_complainant_trigger = { + is_available_adult = yes + OR = { + is_courtier = yes + AND = { + highest_held_title_tier = tier_barony + has_government = republic_government + } + } + ep3_governor_involved_with_root_or_liege_trigger = no +} + +scripted_effect ep3_governor_yearly_8060_success_effect = { + add_short_term_gold = scope:gold + custom_tooltip = { + text = ep3_governor_yearly.8060.efficiency_tt + add_character_flag = { + flag = ep3_8060_efficiency_drop + years = 10 + } + } +} + +ep3_governor_yearly.8060 = { + type = character_event + title = ep3_governor_yearly.8060.t + desc = ep3_governor_yearly.8060.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = steward + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + OR = { + any_vassal_or_below = { ep3_governor_yearly_8060_complainant_trigger = yes } + any_courtier = { ep3_governor_yearly_8060_complainant_trigger = yes } + } + } + + option = { # Take gold + name = ep3_governor_yearly.8060.a + save_scope_as = intrigue + save_scope_value_as = { + name = gold + value = { + value = minor_gold_value + multiply = { + value = intrigue + divide = 3 + } + add = { 1 2 } + min = 50 + } + } + duel = { + skill = intrigue + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8060.a.success + show_as_tooltip = { ep3_governor_yearly_8060_success_effect = yes } + trigger_event = { + id = ep3_governor_yearly.8061 + days = 5 + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8060.a.failure + custom_tooltip = ep3_governor_yearly.8060.a.failure_tt + trigger_event = { + id = ep3_governor_yearly.8062 + days = 5 + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } + + option = { # Cook books + name = ep3_governor_yearly.8060.b + save_scope_as = stewardship + save_scope_value_as = { + name = gold + value = { + value = tiny_gold_value + multiply = { + value = stewardship + divide = 3 + } + add = { 1 2 } + min = 25 + } + } + duel = { + skill = stewardship + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8060.a.success + show_as_tooltip = { ep3_governor_yearly_8060_success_effect = yes } + trigger_event = { + id = ep3_governor_yearly.8061 + days = 5 + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8060.a.failure + custom_tooltip = ep3_governor_yearly.8060.a.failure_tt + trigger_event = { + id = ep3_governor_yearly.8062 + days = 5 + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = 0.5 + } + } + } + + option = { # Bolster treasury + name = ep3_governor_yearly.8060.c + remove_short_term_gold = medium_gold_value + increase_governance_effect = { VALUE = 5 } + add_character_modifier = { + modifier = ep3_bolstered_governor_treasury_modifier + years = 10 + } + stress_impact = { + arbitrary = minor_stress_impact_gain + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + option = { # Do nothing + name = ep3_governor_yearly.8060.d + stress_impact = { + fickle = minor_stress_impact_gain + arbitrary = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -1 + } + } + } +} + +ep3_governor_yearly.8061 = { + hidden = yes + type = character_event + + immediate = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8060.embezzle_tt + ep3_governor_yearly_8060_success_effect = yes + } + } +} + +ep3_governor_yearly.8062 = { + type = character_event + title = ep3_governor_yearly.8060.t + desc = ep3_governor_yearly.8062.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:complainant + animation = chancellor + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + has_domicile = yes + } + + immediate = { + every_courtier = { + limit = { ep3_governor_yearly_8060_complainant_trigger = yes } + add_to_list = complainants + } + domicile = { save_scope_as = estate } + every_vassal_or_below = { + limit = { + ep3_governor_yearly_8060_complainant_trigger = yes + primary_title.title_capital_county = scope:estate.domicile_location.county + } + alternative_limit = { + ep3_governor_yearly_8060_complainant_trigger = yes + primary_title.title_capital_county.duchy = scope:estate.domicile_location.duchy + } + alternative_limit = { ep3_governor_yearly_8060_complainant_trigger = yes } + add_to_list = complainants + } + random_in_list = { + list = complainants + weight = { + base = 1 + modifier = { + add = { + value = ai_energy + multiply = 0.25 + } + } + modifier = { + add = { + value = ai_honor + multiply = 0.25 + } + } + modifier = { add = stewardship } + } + save_scope_as = complainant + } + ep3_governor_yearly_8060_success_effect = yes + } + + option = { # Convince + name = ep3_governor_yearly.8062.a + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8062.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8062.a.success + left_icon = scope:complainant + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8062.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8062.a.failure + left_icon = scope:complainant + change_influence = medium_influence_loss + reverse_add_opinion = { + target = scope:complainant + modifier = insulted_opinion + opinion = -15 + } + } + } + } + stress_impact = { + honest = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Threaten + name = ep3_governor_yearly.8062.b + random_list = { + 100 = { + modifier = { add = dread } + opinion_modifier = { + who = scope:complainant + opinion_target = root + multiplier = 0.5 + } + modifier = { + add = { + value = scope:complainant.ai_energy + min = 0 + } + } + modifier = { + add = { + value = scope:complainant.ai_boldness + min = 0 + } + } + min = 20 + desc = ep3_governor_yearly.8062.b.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8062.b.success + left_icon = scope:complainant + scope:complainant = { + add_hook = { + target = root + type = favor_hook + } + } + } + } + 100 = { + modifier = { + add = { + value = scope:complainant.ai_energy + max = 0 + } + } + modifier = { + add = { + value = scope:complainant.ai_boldness + max = 0 + } + } + min = 20 + desc = ep3_governor_yearly.8062.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8062.b.failure + left_icon = scope:complainant + change_influence = medium_influence_loss + reverse_add_opinion = { + target = scope:complainant + modifier = threatened_opinion + opinion = -15 + } + } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + option = { # Bribe + name = ep3_governor_yearly.8062.c + random_list = { + 100 = { + modifier = { + add = { + value = scope:complainant.ai_greed + min = 0 + } + } + modifier = { + add = { + value = scope:complainant.ai_honor + max = 0 + } + } + min = 1 + desc = ep3_governor_yearly.8062.c.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8062.c.success + left_icon = scope:complainant + pay_short_term_gold = { + target = scope:complainant + gold = minor_gold_value + } + } + } + 100 = { + modifier = { + add = { + value = scope:complainant.ai_greed + max = 0 + } + } + modifier = { + add = { + value = scope:complainant.ai_honor + min = 0 + } + } + min = 1 + desc = ep3_governor_yearly.8062.c.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8062.c.failure + left_icon = scope:complainant + change_influence = medium_influence_loss + reverse_add_opinion = { + target = scope:complainant + modifier = disgusted_opinion + opinion = -15 + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = -1 + } + } + } + + option = { # Give it back + name = ep3_governor_yearly.8062.d + remove_short_term_gold = scope:gold + reverse_add_opinion = { + target = scope:complainant + modifier = suspicious_opinion + opinion = -10 + } + stress_impact = { + greedy = medium_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = -0.5 + ai_honor = 0.5 + } + } + } +} + +##################################### +# A Governor's Work # +# by Joe Parkin # +# 8070 # +##################################### + +ep3_governor_yearly.8070 = { + type = character_event + title = ep3_governor_yearly.8070.t + desc = ep3_governor_yearly.8070.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = boredom + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + NOT = { + has_trait = ambitious + has_trait = diligent + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = governor_efficiency + divide = 100 + multiply = -1 + } + } + } + + option = { # Work hard + name = ep3_governor_yearly.8070.a + increase_governance_effect = { VALUE = 10 } + add_stewardship_skill = 1 + stress_impact = { + base = medium_stress_impact_gain + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = 0.5 + } + } + } + + option = { # Find someone to help + name = ep3_governor_yearly.8070.b + remove_short_term_gold = medium_gold_value + stress_impact = { + lazy = major_stress_impact_loss + stubborn = minor_stress_impact_gain + greedy = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = -1 + ai_honor = -0.5 + } + } + } + + option = { # Ignore work + name = ep3_governor_yearly.8070.c + add_character_modifier = { + modifier = ep3_governor_yearly_8070_ignore_modifier + years = 5 + } + stress_impact = { + base = medium_stress_impact_loss + lazy = massive_stress_impact_loss + diligent = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = -1 + ai_honor = -0.5 + } + } + } +} + +##################################### +# Malignant Magistrate # +# by Joe Parkin # +# 8080 # +##################################### + +ep3_governor_yearly.8080 = { + type = character_event + title = ep3_governor_yearly.8080.t + desc = ep3_governor_yearly.8080.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + character = scope:magistrate + animation = beg + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + NOR = { + has_character_modifier = ep3_governor_yearly_8080_tense_bureaucracy_modifier + has_character_modifier = ep3_governor_yearly_8080_jumpy_bureaucracy_modifier + has_character_modifier = ep3_governor_yearly_8080_corrupt_bureaucracy_modifier + } + } + + immediate = { + create_character = { + template = ep3_magistrate_character + location = root.capital_province + culture = root.capital_county.culture + faith = root.capital_county.faith + dynasty = none + save_scope_as = magistrate + } + } + + option = { # Punish + name = ep3_governor_yearly.8080.a + increase_governance_effect = { VALUE = 5 } + add_character_modifier = { + modifier = ep3_governor_yearly_8080_tense_bureaucracy_modifier + years = 10 + } + stress_impact = { + arbitrary = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + option = { # Execute + name = ep3_governor_yearly.8080.b + add_dread = minor_dread_gain + add_character_modifier = { + modifier = ep3_governor_yearly_8080_jumpy_bureaucracy_modifier + years = 10 + } + scope:magistrate = { + death = { + death_reason = death_execution + killer = root + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = 1 + } + } + } + + option = { # Embezzle + name = ep3_governor_yearly.8080.c + add_short_term_gold = medium_gold_value + add_character_modifier = { + modifier = ep3_governor_yearly_8080_corrupt_bureaucracy_modifier + years = 10 + } + scope:magistrate = { silent_disappearance_effect = yes } + stress_impact = { + honest = minor_stress_impact_gain + generous = minor_stress_impact_gain + diligent = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } + + option = { # Recruit + name = ep3_governor_yearly.8080.d + add_courtier = scope:magistrate + add_hook = { + target = scope:magistrate + type = loyalty_hook + } + add_character_modifier = { + modifier = ep3_governor_yearly_8080_corrupt_bureaucracy_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:magistrate + modifier = grateful_opinion + opinion = 15 + } + stress_impact = { + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -1 + } + } + } + after = { + scope:magistrate = { + silent_disappearance_ai_effect = yes + } + } +} + +##################################### +# Politics of Spite # +# by Joe Parkin # +# 8090 # +##################################### + +scripted_trigger ep3_governor_yearly_8090_title_trigger = { + OR = { + tier = tier_duchy + tier = tier_kingdom + } + save_temporary_scope_as = title_temp + any_past_holder = { + ep3_governor_yearly_8090_past_holder_trigger = { TITLE = scope:title_temp } + } +} + +scripted_trigger ep3_governor_yearly_8090_past_holder_trigger = { + house ?= { + NOR = { + $TITLE$.holder.house ?= this + $TITLE$.holder.top_liege.house ?= this + } + any_house_member = { ep3_governor_yearly_8090_house_member_trigger = yes } + } +} + +scripted_trigger ep3_governor_yearly_8090_house_member_trigger = { + is_ai = yes + is_adult = yes + is_healthy = yes + is_landed = no + any_held_title = { is_noble_family_title = yes } + ep3_governor_involved_with_root_or_liege_trigger = no +} + +ep3_governor_yearly.8090 = { + type = character_event + title = ep3_governor_yearly.8090.t + desc = ep3_governor_yearly.8090.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = worry + } + lower_right_portrait = scope:old_holder + + cooldown = { years = 15 } + + trigger = { + is_available_adult = yes + is_governor = yes + any_held_title = { ep3_governor_yearly_8090_title_trigger = yes } + } + + immediate = { + ordered_held_title = { + limit = { ep3_governor_yearly_8090_title_trigger = yes } + save_scope_as = disputed_title + random_past_holder = { + limit = { + ep3_governor_yearly_8090_past_holder_trigger = { TITLE = scope:disputed_title } + } + house = { + random_house_member = { + limit = { ep3_governor_yearly_8090_house_member_trigger = yes } + save_scope_as = old_holder + } + } + } + } + } + + option = { # Antagonize + name = ep3_governor_yearly.8090.a + set_relation_rival = { + target = scope:old_holder + reason = rival_ep3_province_claim + } + duel = { + skills = { stewardship intrigue } + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8090.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8090.a.success + right_icon = scope:old_holder + scope:old_holder = { change_influence = minor_influence_loss } + primary_title = { + change_appointment_investment = { + target = scope:old_holder + value = appointment_score_medium_loss_value + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8090.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8090.a.failure + right_icon = scope:old_holder + change_influence = minor_influence_loss + primary_title = { + change_appointment_investment = { + target = scope:old_holder + value = appointment_score_medium_value + } + } + } + } + } + stress_impact = { + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + option = { # Placate + name = ep3_governor_yearly.8090.b + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + min = 5 + opinion_modifier = { + who = scope:old_holder + opinion_target = root + multiplier = 0.5 + } + change_influence = minor_influence_gain + reverse_add_opinion = { + target = scope:old_holder + modifier = friendliness_opinion + opinion = 15 + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + min = 5 + primary_title = { + change_appointment_investment = { + target = scope:old_holder + value = appointment_score_minor_value + } + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + shy = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.5 + } + } + } + + option = { # Compensate + name = ep3_governor_yearly.8090.c + pay_short_term_gold = { + target = scope:old_holder + gold = minor_gold_value + } + random = { + chance = 25 + modifier = { + add = { + value = scope:old_holder.ai_greed + multiply = -0.5 + } + } + progress_towards_rival_effect = { + REASON = rival_ep3_province_claim + CHARACTER = scope:old_holder + OPINION = default_rival_opinion + } + } + stress_impact = { + honest = minor_stress_impact_gain + generous = minor_stress_impact_gain + diligent = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = 0.5 + } + } + } + + option = { # Do nothing + name = ep3_governor_yearly.8090.d + primary_title = { + change_appointment_investment = { + target = scope:old_holder + value = appointment_score_minor_value + } + } + random = { + chance = 25 + modifier = { + add = { + value = scope:old_holder.ai_vengefulness + multiply = 0.5 + } + } + progress_towards_rival_effect = { + REASON = rival_ep3_province_claim + CHARACTER = scope:old_holder + OPINION = default_rival_opinion + } + } + stress_impact = { + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +##################################### +# Nefarious Neighbor # +# by Joe Parkin # +# 8100 # +##################################### + +scripted_trigger ep3_governor_yearly_8100_governor_trigger = { + is_ai = yes + ep3_governor_involved_with_root_or_liege_trigger = no + is_available_adult = yes + is_governor = yes + highest_held_title_tier = root.highest_held_title_tier + opinion = { + target = root + value < 25 + } + any_close_family_member = { + can_appoint_for_title = root.primary_title + is_adult = yes + } +} + +ep3_governor_yearly.8100 = { + type = character_event + title = ep3_governor_yearly.8100.t + desc = ep3_governor_yearly.8100.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:target_family_member + animation = thinking + } + lower_center_portrait = scope:governor + lower_right_portrait = scope:neighboring_promoted_char + + cooldown = { years = 15 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + is_governor = yes + any_neighboring_realm_same_rank_owner = { + ep3_governor_yearly_8100_governor_trigger = yes + save_temporary_scope_as = temp_governor + any_close_family_member = { + can_appoint_for_title = root.primary_title + is_adult = yes + } + } + any_close_family_member = { + can_appoint_for_title = scope:temp_governor.primary_title + is_adult = yes + house ?= root.house + } + } + + immediate = { + random_neighboring_realm_same_rank_owner = { + limit = { ep3_governor_yearly_8100_governor_trigger = yes } + weight = { + base = 1 + modifier = { + has_relation_rival = root + add = 1 + } + modifier = { + add = { + value = "opinion(root)" + multiply = -0.25 + max = 0 + } + } + } + save_scope_as = governor + random_close_family_member = { + limit = { + can_appoint_for_title = root.primary_title + is_adult = yes + } + save_scope_as = neighboring_promoted_char + } + } + primary_title = { + change_appointment_investment = { + target = scope:neighboring_promoted_char + value = appointment_score_medium_value + } + } + random_close_family_member = { + limit = { + can_appoint_for_title = scope:governor.primary_title + is_adult = yes + house ?= root.house + } + save_scope_as = target_family_member + } + } + + option = { # Do same + name = ep3_governor_yearly.8100.a + scope:governor.primary_title = { + change_appointment_investment = { + target = scope:target_family_member + value = appointment_score_minor_value + } + } + progress_towards_rival_effect = { + REASON = rival_ep3_governor_friction + CHARACTER = scope:governor + OPINION = default_rival_opinion + } + stress_impact = { + calm = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + option = { # Denounce + name = ep3_governor_yearly.8100.b + change_influence = minor_influence_loss + primary_title = { + change_appointment_investment = { + target = scope:neighboring_promoted_char + value = appointment_score_minor_loss_value + } + } + progress_towards_rival_effect = { + REASON = rival_ep3_governor_friction + CHARACTER = scope:governor + OPINION = default_rival_opinion + } + stress_impact = { + arrogant = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = 1 + } + } + } + + option = { # Governor + name = ep3_governor_yearly.8100.c + trigger = { + has_trait = governor + NOT = { + scope:governor = { has_trait = governor } + } + } + primary_title = { + change_appointment_investment = { + target = scope:neighboring_promoted_char + value = appointment_score_major_loss_value + } + } + progress_towards_rival_effect = { + REASON = rival_ep3_governor_friction + CHARACTER = scope:governor + OPINION = default_rival_opinion + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = 1 + } + } + } + + option = { # Ignore + name = ep3_governor_yearly.8100.d + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } +} + +##################################### +# Pugnacious Peers # +# by Joe Parkin # +# 8110 # +##################################### + +scripted_trigger ep3_governor_yearly_8110_governor_trigger = { + is_ai = yes + ep3_governor_involved_with_root_or_liege_trigger = no + is_available_adult = yes + is_governor = yes + highest_held_title_tier = root.highest_held_title_tier +} + +scripted_trigger ep3_governor_yearly_8110_second_trigger = { + opinion = { + target = $FIRST$ + value < 50 + } + reverse_opinion = { + target = $FIRST$ + value < 50 + } + ep3_governor_involved_with_root_or_liege_trigger = no + NOR = { + this = $FIRST$ + is_close_family_of = $FIRST$ + is_consort_of = $FIRST$ + has_relation_friend = $FIRST$ + has_relation_lover = $FIRST$ + house ?= $FIRST$.house + } +} + +ep3_governor_yearly.8110 = { + type = character_event + title = ep3_governor_yearly.8110.t + desc = ep3_governor_yearly.8110.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = scheme + } + lower_center_portrait = scope:governor_1 + lower_right_portrait = scope:governor_2 + + cooldown = { years = 15 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + is_governor = yes + any_neighboring_realm_same_rank_owner = { + ep3_governor_yearly_8100_governor_trigger = yes + save_temporary_scope_as = governor_1_temp + } + any_neighboring_realm_same_rank_owner = { + ep3_governor_yearly_8100_governor_trigger = yes + ep3_governor_yearly_8110_second_trigger = { FIRST = scope:governor_1_temp } + } + } + + immediate = { + random_neighboring_realm_same_rank_owner = { + limit = { ep3_governor_yearly_8100_governor_trigger = yes } + weight = { + base = 1 + modifier = { + primary_title.kingdom = root.primary_title.kingdom + add = 1 + } + } + save_scope_as = governor_1 + } + random_neighboring_realm_same_rank_owner = { + limit = { + ep3_governor_yearly_8100_governor_trigger = yes + ep3_governor_yearly_8110_second_trigger = { FIRST = scope:governor_1 } + } + weight = { + base = 1 + modifier = { + primary_title.kingdom = root.primary_title.kingdom + add = 1 + } + } + save_scope_as = governor_2 + } + scope:governor_1 = { + progress_towards_rival_effect = { + REASON = rival_ep3_governor_friction + CHARACTER = scope:governor_2 + OPINION = default_rival_opinion + } + } + } + + option = { # Try to escalate + name = ep3_governor_yearly.8110.a + change_influence = minor_influence_loss + duel = { + skill = intrigue + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8110.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8110.a.success + left_icon = scope:governor_1 + right_icon = scope:governor_2 + scope:governor_1 = { + progress_towards_rival_effect = { + REASON = rival_ep3_governor_friction + CHARACTER = scope:governor_2 + OPINION = default_rival_opinion + } + add_merit_if_relevant_effect = { + MERIT = minor_merit_loss + } + } + scope:governor_2 = { + add_merit_if_relevant_effect = { + MERIT = minor_merit_loss + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8110.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8110.a.failure + left_icon = scope:governor_1 + right_icon = scope:governor_2 + add_merit_if_relevant_effect = { + MERIT = minor_merit_loss + } + custom_tooltip = { + text = ep3_governor_yearly.8110.a.failure_tt + reverse_add_opinion = { + target = scope:governor_1 + modifier = angry_opinion + opinion = -25 + } + reverse_add_opinion = { + target = scope:governor_2 + modifier = angry_opinion + opinion = -25 + } + } + } + } + } + stress_impact = { + honest = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = 1 + } + } + } + + option = { # Side with 1 + name = ep3_governor_yearly.8110.b + reverse_add_opinion = { + target = scope:governor_1 + modifier = friendliness_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:governor_2 + modifier = unfriendly_opinion + opinion = -15 + } + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } + + option = { # Side with 2 + name = ep3_governor_yearly.8110.c + reverse_add_opinion = { + target = scope:governor_2 + modifier = friendliness_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:governor_1 + modifier = unfriendly_opinion + opinion = -15 + } + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } + + option = { # Call for unity + name = ep3_governor_yearly.8110.d + change_influence = minor_influence_gain + add_merit_if_relevant_effect = { + MERIT = miniscule_merit_value + } + custom_tooltip = { + text = ep3_governor_yearly.8110.d.tt + reverse_add_opinion = { + target = scope:governor_1 + modifier = annoyed_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:governor_2 + modifier = annoyed_opinion + opinion = -15 + } + } + stress_impact = { + calm = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } +} + +##################################### +# An Act of God # +# by Joe Parkin # +# 8120 # +##################################### + +scripted_trigger ep3_governor_yearly_8120_county_trigger = { + county_control >= 75 + OR = { + ep3_governor_yearly_8120_earthquake_trigger = yes + ep3_governor_yearly_8120_storm_trigger = yes + ep3_governor_yearly_8120_flood_trigger = yes + } + NOT = { + any_county_province_epidemic = {} + } +} + +scripted_trigger ep3_governor_yearly_8120_earthquake_trigger = { + any_county_province = { + geographical_region = world_asia_minor + OR = { + terrain = mountains + terrain = desert_mountains + } + } +} + +scripted_trigger ep3_governor_yearly_8120_storm_trigger = { + is_coastal_county = yes +} + +scripted_trigger ep3_governor_yearly_8120_flood_trigger = { + OR = { + is_riverside_county = yes + any_county_province = { + terrain = wetlands + OR = { + is_coastal = yes + is_riverside_province = yes + } + } + } +} + +ep3_governor_yearly.8120 = { + type = character_event + title = ep3_governor_yearly.8120.t + desc = { + desc = ep3_governor_yearly.8120.desc + first_valid = { + triggered_desc = { + trigger = { + scope:disaster_county = { is_coastal_county = yes } + } + desc = ep3_governor_yearly.8120.storm + } + desc = ep3_governor_yearly.8120.storm + } + desc = ep3_governor_yearly.8120.ending + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = worry + } + + cooldown = { years = 15 } + + trigger = { + is_available_adult = yes + is_governor = yes + any_sub_realm_county = { ep3_governor_yearly_8120_county_trigger = yes } + NOR = { + has_character_modifier = ep3_governor_yearly_8120_relief_leader_modifier + has_character_modifier = ep3_governor_yearly_8120_relief_botched_modifier + any_sub_realm_county = { has_county_modifier = ep3_governor_yearly_8120_relief_aid_modifier } + } + } + + immediate = { + random_sub_realm_county = { + limit = { ep3_governor_yearly_8120_county_trigger = yes } + weight = { + base = 1 + modifier = { + holder = root + add = 1 + } + } + save_scope_as = disaster_county + change_county_control = -30 + change_development_progress_with_overflow = -50 + } + } + + option = { # Oversee recovery + name = ep3_governor_yearly.8120.a + duel = { + skill = stewardship + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + min = 3 + desc = ep3_governor_yearly.8120.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8120.a.success + right_icon = scope:disaster_county + increase_governance_effect = { VALUE = 5 } + scope:disaster_county = { + change_county_control = 20 + change_development_progress_with_overflow = 40 + } + add_character_modifier = { + modifier = ep3_governor_yearly_8120_relief_leader_modifier + years = 10 + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + min = 3 + desc = ep3_governor_yearly.8120.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8120.a.failure + right_icon = scope:disaster_county + add_character_modifier = { + modifier = ep3_governor_yearly_8120_relief_botched_modifier + years = 10 + } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = 1 + } + } + } + + option = { # Offer aid + name = ep3_governor_yearly.8120.b + remove_treasury_or_gold = minor_treasury_or_gold_value + scope:disaster_county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8120_relief_aid_modifier + years = 5 + } + } + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + modifier = { + treasury_or_gold < medium_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Ignore + name = ep3_governor_yearly.8120.c + add_piety = minor_piety_gain + add_character_modifier = { + modifier = ep3_governor_yearly_8120_relief_rejected_modifier + years = 10 + } + stress_impact = { + cynical = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } +} + +##################################### +# Avarice and Opportunity # +# by Joe Parkin # +# 8130 # +##################################### + +ep3_governor_yearly.8130 = { + type = character_event + title = ep3_governor_yearly.8130.t + desc = { + desc = ep3_governor_yearly.8130.desc + + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = steward + } + lower_center_portrait = scope:governor_1 + lower_right_portrait = scope:governor_2 + + cooldown = { years = 15 } + + trigger = { + is_available_adult = yes + is_governor = yes + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + gold < 0 + } + modifier = { + add = 1 + gold < minor_gold_value + } + } + + option = { # Harsh tax + name = ep3_governor_yearly.8130.a + add_character_modifier = { + modifier = ep3_governor_yearly_8130_raised_taxes_modifier + years = 5 + } + stress_impact = { + generous = medium_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } + + option = { # Minor tax + name = ep3_governor_yearly.8130.b + add_treasury_or_gold = minor_treasury_or_gold_value + add_character_modifier = { + modifier = ep3_governor_yearly_8130_special_levy_modifier + years = 5 + } + stress_impact = { + generous = minor_stress_impact_gain + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.5 + ai_honor = -0.5 + } + } + } + + option = { # Invest into province + name = ep3_governor_yearly.8130.c + change_influence = medium_influence_loss + increase_governance_effect = { VALUE = 5 } + add_character_modifier = { + modifier = ep3_governor_yearly_8130_raised_almonage_modifier + years = 5 + } + stress_impact = { + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.5 + ai_honor = -0.5 + } + } + } + + option = { # Do nothing + name = ep3_governor_yearly.8130.d + stress_impact = { + greedy = medium_stress_impact_gain + generous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_honor = 1 + } + } + } +} + +##################################### +# Checking the House # +# by Joe Parkin # +# 8140 # +##################################### + +scripted_trigger ep3_governor_8140_estate_holder_trigger = { + domicile ?= { + is_domicile_type = estate + OR = { + domicile_location.county.holder ?= root + domicile_location.county.holder.liege ?= root + domicile_location.county.holder.liege.liege ?= root + } + num_domicile_buildings >= 3 + } + this != root + is_ai = yes + is_available_adult = yes + ep3_governor_involved_with_root_or_liege_trigger = no +} + +ep3_governor_yearly.8140 = { + type = character_event + title = ep3_governor_yearly.8140.t + desc = ep3_governor_yearly.8140.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + character = scope:peasant + animation = beg + } + lower_center_portrait = scope:estate_owner + + cooldown = { years = 15 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + is_governor = yes + top_liege = { + any_vassal_or_below = { ep3_governor_8140_estate_holder_trigger = yes } + } + } + + immediate = { + top_liege = { + random_vassal_or_below = { + limit = { ep3_governor_8140_estate_holder_trigger = yes } + save_scope_as = estate_owner + domicile = { + save_scope_as = estate + domicile_location.county = { save_scope_as = estate_county } + } + } + } + create_character = { + template = peasant_character + location = root.capital_province + dynasty = none + culture = scope:estate.domicile_location.county.culture + faith = scope:estate.domicile_location.county.faith + gender_female_chance = { + if = { + limit = { scope:estate_county.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:estate_county.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { add = 50 } + } + save_scope_as = peasant + } + scope:estate_county = { change_development_progress_with_overflow = -50 } + } + + option = { # Fine family + name = ep3_governor_yearly.8140.a + change_influence = minor_influence_loss + increase_governance_effect = { VALUE = 5 } + remove_treasury_or_gold = medium_treasury_or_gold_value + progress_towards_rival_effect = { + REASON = rival_family_estate_fined + CHARACTER = scope:estate_owner + OPINION = default_rival_opinion + } + stress_impact = { + arbitrary = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + modifier = { + treasury_or_gold < major_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Reason with family + name = ep3_governor_yearly.8140.b + change_influence = medium_influence_loss + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + reverse_add_opinion = { + target = scope:estate_owner + modifier = respect_opinion + opinion = 15 + } + scope:estate_county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8140_negotiated_modifier + years = 10 + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + reverse_add_opinion = { + target = scope:estate_owner + modifier = contempt_opinion + opinion = -15 + } + scope:estate_county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8140_ignored_modifier + years = 10 + } + } + } + } + stress_impact = { + arbitrary = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + option = { # Side with family + name = ep3_governor_yearly.8140.c + change_influence = minor_influence_gain + progress_towards_friend_effect = { + REASON = friend_family_estate_permission + CHARACTER = scope:estate_owner + OPINION = default_friend_opinion + } + scope:estate_county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8140_defended_modifier + years = 10 + } + } + stress_impact = { + just = minor_stress_impact_gain + humble = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 0.5 + ai_honor = -0.5 + } + } + } + + option = { # Ignore + name = ep3_governor_yearly.8140.d + scope:estate_county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8140_ignored_modifier + years = 10 + } + } + stress_impact = { + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + after = { + scope:peasant = { silent_disappearance_effect = yes } + } +} + +##################################### +# End of the Tether # +# by Joe Parkin # +# 8150 # +##################################### + +scripted_trigger ep3_governor_yearly_8150_county_trigger = { + OR = { + ep3_governor_yearly_8150_create_faction_chance_trigger = { TYPE = populist } + ep3_governor_yearly_8150_create_faction_chance_trigger = { TYPE = peasant } + } +} + +scripted_trigger ep3_governor_yearly_8150_create_faction_chance_trigger = { + county_opinion < -25 + title_create_faction_type_chance = { + type = $TYPE$_faction + target = root + value >= 10 + } +} + +scripted_trigger ep3_governor_yearly_8150_existing_faction_trigger = { + OR = { + faction_is_type = peasant_faction + faction_is_type = populist_faction + } + NOT = { has_variable = ep3_governor_yearly_8150_ignored } +} + +scripted_effect ep3_governor_yearly_8150_create_faction_effect = { + title_create_faction = { + type = $TYPE$_faction + target = root + } + add_to_list = rebel_counties + random_title_joined_faction = { + limit = { faction_is_type = $TYPE$_faction } + save_scope_as = targeting_faction + } +} + +scripted_effect ep3_governor_yearly_8150_county_modifier_effect = { + every_in_list = { + list = rebel_counties + custom = ep3_governor_yearly.8150.county_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8150_$MODIFIER$_modifier + years = 10 + } + } + hidden_effect = { + every_in_list = { + list = potential_rebel_counties + add_county_modifier = { + modifier = ep3_governor_yearly_8150_$MODIFIER$_modifier + years = 10 + } + } + } +} + +ep3_governor_yearly.8150 = { + type = character_event + title = ep3_governor_yearly.8150.t + desc = { + desc = ep3_governor_yearly.8150.desc + first_valid = { + triggered_desc = { + trigger = { + scope:targeting_faction = { faction_is_type = populist_faction } + scope:marshal.culture != scope:targeting_faction.var:faction_culture + } + desc = ep3_governor_yearly.8150.culture + } + triggered_desc = { + trigger = { + scope:targeting_faction = { faction_is_type = populist_faction } + scope:marshal.faith != scope:targeting_faction.var:faction_faith + } + desc = ep3_governor_yearly.8150.faith + } + desc = ep3_governor_yearly.8150.peasant + } + desc = ep3_governor_yearly_8150.end + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:marshal + animation = worry + } + lower_right_portrait = scope:rebel_leader + + cooldown = { years = 15 } + + trigger = { + is_available_adult = yes + is_governor = yes + OR = { + any_targeting_faction = { ep3_governor_yearly_8150_existing_faction_trigger = yes } + any_held_county = { ep3_governor_yearly_8150_county_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = governor_efficiency + divide = 100 + multiply = -1 + } + } + } + + immediate = { + # A military character + cp:councillor_marshal ?= { save_scope_as = marshal } + if = { + limit = { NOT = { exists = scope:marshal } } + ordered_knight = { + order_by = age + save_scope_as = marshal + } + } + if = { + limit = { NOT = { exists = scope:marshal } } + ordered_courtier = { + limit = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + order_by = age + save_scope_as = marshal + } + } + if = { + limit = { + any_targeting_faction = { ep3_governor_yearly_8150_existing_faction_trigger = yes } + } + random_targeting_faction = { + limit = { ep3_governor_yearly_8150_existing_faction_trigger = yes } + weight = { + base = 1 + modifier = { + add = { + value = faction_discontent + multiply = 0.25 + } + } + } + save_scope_as = targeting_faction + every_faction_county_member = { add_to_list = rebel_counties } + } + } + else = { + random_held_county = { + limit = { ep3_governor_yearly_8150_county_trigger = yes } + weight = { + base = 1 + modifier = { + add = { + value = county_opinion + multiply = -1 + } + } + } + if = { + limit = { ep3_governor_yearly_8150_create_faction_chance_trigger = { TYPE = populist } } + ep3_governor_yearly_8150_create_faction_effect = { TYPE = populist } + } + else = { ep3_governor_yearly_8150_create_faction_effect = { TYPE = peasant } } + } + } + ordered_in_list = { + list = rebel_counties + order_by = { + value = 0 + subtract = county_opinion + } + save_scope_as = rebel_county + } + if = { # Error suppression + limit = { exists = scope:targeting_faction } + root = { + every_held_county = { + limit = { + NOT = { any_title_joined_faction = { this = scope:targeting_faction } } + can_title_join_faction = scope:targeting_faction + } + add_to_list = potential_rebel_counties + } + } + } + save_scope_value_as = { + name = potential_rebel_count + value = { + value = 0 + every_in_list = { + list = potential_rebel_counties + add = 1 + } + divide = 10 + ceiling = yes + } + } + } + + option = { # Placate leaders + name = ep3_governor_yearly.8150.a + remove_treasury_or_gold = minor_treasury_or_gold_value + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8150.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8150.a.success + right_icon = scope:rebel_county + increase_governance_effect = { VALUE = 5 } + ep3_governor_yearly_8150_county_modifier_effect = { MODIFIER = placated } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8150.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8150.a.failure + right_icon = scope:rebel_county + ep3_governor_yearly_8150_county_modifier_effect = { MODIFIER = insulted } + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + just = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 0.5 + ai_honor = -0.5 + ai_greed = -0.5 + ai_energy = 0.5 + } + modifier = { + treasury_or_gold < medium_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Grant requests + name = ep3_governor_yearly.8150.b + remove_treasury_or_gold = medium_treasury_or_gold_value + ep3_governor_yearly_8150_county_modifier_effect = { MODIFIER = concession } + stress_impact = { + arrogant = medium_stress_impact_gain + stubborn = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = -0.5 + } + modifier = { + treasury_or_gold < major_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Crackdown + name = ep3_governor_yearly.8150.c + change_influence = minor_influence_gain + if = { + limit = { + scope:targeting_faction = { faction_is_type = populist_faction } + culture != scope:targeting_faction.var:faction_culture + } + culture = { + change_cultural_acceptance = { + target = scope:targeting_faction.var:faction_culture + value = medium_cultural_acceptance_loss + desc = cultural_acceptance_ep3_governor_yearly_8150_crackdown + } + } + add_character_modifier = { + modifier = ep3_governor_yearly_8150_minority_crackdown_modifier + years = 10 + } + } + else_if = { + limit = { + scope:targeting_faction = { faction_is_type = populist_faction } + faith != scope:targeting_faction.var:faction_faith + } + add_character_modifier = { + modifier = ep3_governor_yearly_8150_minority_crackdown_modifier + years = 10 + } + } + else = { + add_character_modifier = { + modifier = ep3_governor_yearly_8150_peasant_crackdown_modifier + years = 10 + } + } + reverse_add_opinion = { + target = scope:marshal + modifier = pleased_opinion + opinion = 15 + } + ep3_governor_yearly_8150_county_modifier_effect = { MODIFIER = crackdown } + scope:targeting_faction = { + add_faction_discontent = { -10 -20 } + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_boldness = 0.5 + ai_energy = 0.5 + } + } + } + + option = { # Ignore + name = ep3_governor_yearly.8150.d + scope:targeting_faction = { + add_faction_discontent = { 8 18 } + custom_tooltip = { + text = ep3_governor_yearly.8150.d.tt + set_variable = ep3_governor_yearly_8150_ignored + } + } + ordered_in_list = { + list = potential_rebel_counties + max = scope:potential_rebel_count + check_range_bounds = no + order_by = { + value = 0 + subtract = county_opinion + } + title_join_faction = scope:targeting_faction + } + stress_impact = { + diligent = medium_stress_impact_gain + craven = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -1 + ai_energy = -1 + } + } + } +} + +##################################### +# Equitable Access # +# by Joe Parkin # +# 8160 # +##################################### + +scripted_trigger ep3_governor_yearly_8160_culture_trigger = { + culture = { + NOR = { + this = root.culture + this = root.top_liege.culture + } + cultural_acceptance = { + target = root.top_liege.culture + value < 75 + } + } +} + +scripted_trigger ep3_governor_yearly_8160_faith_trigger = { + faith = { + NOR = { + this = root.faith + this = root.top_liege.faith + } + faith_hostility_level = { + target = root.top_liege.faith + value > 1 + } + } +} + +ep3_governor_yearly.8160 = { + type = character_event + title = ep3_governor_yearly.8160.t + desc = { + desc = ep3_governor_yearly.8160.desc + first_valid = { + triggered_desc = { + trigger = { + scope:minority_county = { ep3_governor_yearly_8160_culture_trigger = yes } + culture = top_liege.culture + scope:councillor.culture != top_liege.culture + } + desc = ep3_governor_yearly.8160.culture_councillor + } + triggered_desc = { + trigger = { + scope:minority_county = { ep3_governor_yearly_8160_culture_trigger = yes } + culture != top_liege.culture + scope:councillor.culture = top_liege.culture + } + desc = ep3_governor_yearly.8160.culture_self + } + triggered_desc = { + trigger = { + scope:minority_county = { ep3_governor_yearly_8160_culture_trigger = yes } + } + desc = ep3_governor_yearly.8160.culture + } + desc = ep3_governor_yearly.8160.faith + } + first_valid = { + triggered_desc = { + trigger = { scope:minority_county = { ep3_governor_yearly_8160_culture_trigger = yes } } + desc = ep3_governor_yearly.8160.culture_end + } + desc = ep3_governor_yearly.8160.faith_end + } + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + character = scope:councillor + animation = dismissal + } + lower_center_portrait = scope:administrator + + cooldown = { years = 15 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + is_governor = yes + any_sub_realm_county = { + OR = { + ep3_governor_yearly_8160_culture_trigger = yes + ep3_governor_yearly_8160_faith_trigger = yes + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + ep3_governor_yearly_8160_culture_trigger = yes + ep3_governor_yearly_8160_faith_trigger = no + } + alternative_limit = { ep3_governor_yearly_8160_culture_trigger = yes } + alternative_limit = { ep3_governor_yearly_8160_faith_trigger = yes } + weight = { + base = 1 + modifier = { add = development_level } + modifier = { + holder = root + factor = 2 + } + } + save_scope_as = minority_county + } + if = { + limit = { scope:minority_county = { ep3_governor_yearly_8160_culture_trigger = yes } } + if = { + limit = { + cp:councillor_steward ?= { + NOR = { + culture = scope:minority_county.culture + has_trait = humble + has_trait = compassionate + } + } + } + cp:councillor_steward = { save_scope_as = councillor } + } + if = { + limit = { NOT = { exists = scope:councillor } } + ordered_courtier = { + limit = { + NOR = { + culture = scope:minority_county.culture + has_trait = humble + has_trait = compassionate + } + } + order_by = stewardship + save_scope_as = councillor + } + } + save_scope_as = culture + } + else = { + cp:councillor_court_chaplain = { save_scope_as = councillor } + if = { + limit = { NOT = { exists = scope:councillor } } + random_courtier = { + limit = { + faith = root.faith + is_clergy = yes + } + alternative_limit = { faith = root.faith } + weight = { + base = 1 + modifier = { add = learning } + modifier = { + has_trait = zealous + add = 10 + } + } + save_scope_as = councillor + } + } + } + create_character = { + template = pool_repopulate_stewardship + culture = scope:minority_county.culture + faith = scope:minority_county.faith + location = root.location + gender_female_chance = { + if = { + limit = { scope:minority_county.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:minority_county.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = administrator + } + } + + option = { # Encourage access + name = ep3_governor_yearly.8160.a + remove_treasury_or_gold = minor_treasury_or_gold_value + change_influence = minor_influence_loss + increase_governance_effect = { VALUE = 5 } + reverse_add_opinion = { + target = scope:councillor + modifier = angry_opinion + opinion = -25 + } + add_courtier = scope:administrator + reverse_add_opinion = { + target = scope:administrator + modifier = grateful_opinion + opinion = 50 + } + if = { + limit = { exists = scope:culture } + culture = { + change_cultural_acceptance = { + target = scope:minority_county.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_promoted_bureaucrats + } + } + stress_impact = { + callous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + } + else = { + add_piety = minor_piety_gain + every_sub_realm_county = { + limit = { faith = scope:minority_county.faith } + custom = ep3_governor_yearly.8160.faith_county_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8160_promoted_modifier + years = 10 + } + } + stress_impact = { + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + lazy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + modifier = { + treasury_or_gold < medium_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Suppress + name = ep3_governor_yearly.8160.b + add_dread = medium_dread_gain + if = { + limit = { exists = scope:culture } + culture = { + change_cultural_acceptance = { + target = scope:minority_county.culture + value = minor_cultural_acceptance_loss + desc = cultural_acceptance_promoted_bureaucrats + } + } + every_sub_realm_county = { + limit = { culture = scope:minority_county.culture } + custom = ep3_governor_yearly.8160.culture_county_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8160_suppressed_modifier + years = 10 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + } + else = { + every_sub_realm_county = { + limit = { faith = scope:minority_county.faith } + custom = ep3_governor_yearly.8160.faith_county_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8160_suppressed_modifier + years = 10 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + cynical = minor_stress_impact_gain + just = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + } + reverse_add_opinion = { + target = scope:councillor + modifier = pleased_opinion + opinion = 25 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -1 + } + } + } + + option = { # Dismiss + name = ep3_governor_yearly.8160.d + ai_chance = { + base = 100 + } + } + after = { + scope:administrator = { + silent_disappearance_ai_effect = yes + } + } +} + +##################################### +# Local Defense # +# by Joe Parkin # +# 8170 # +##################################### + +scripted_trigger ep3_governor_yearly_8170_raider_trigger = { + save_temporary_scope_as = raider_temp + trigger_if = { + limit = { + root = { + any_character_to_title_neighboring_county = { holder.top_liege = scope:raider_temp.top_liege } + } + } + can_raid_trigger = yes + } + trigger_else = { can_raid_across_water_trigger = yes } + ep3_governor_involved_with_root_or_liege_trigger = no + NOR = { + root.top_liege ?= top_liege + any_ally = { + OR = { + this = root + target_is_liege_or_above = root + } + } + any_war_enemy = { + OR = { + this = root + target_is_liege_or_above = root + } + } + any_truce_target = { + OR = { + this = root + target_is_liege_or_above = root + } + } + } +} + +ep3_governor_yearly.8170 = { + type = character_event + title = { + desc = { + first_valid = { + triggered_desc = { + trigger = { + any_character_to_title_neighboring_county = { holder.top_liege = scope:raider.top_liege } + } + desc = ep3_governor_yearly.8170.t.land + } + desc = ep3_governor_yearly.8170.t.sea + } + } + } + desc = { + desc = ep3_governor_yearly.8170.desc + first_valid = { + triggered_desc = { + trigger = { + any_character_to_title_neighboring_county = { holder.top_liege = scope:raider.top_liege } + } + desc = ep3_governor_yearly.8170.land + } + desc = ep3_governor_yearly.8170.sea + } + desc = ep3_governor_yearly.8170.ending + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = root.cp:councillor_marshal + animation = debating + } + lower_center_portrait = scope:raider + + cooldown = { years = 15 } + + trigger = { + is_available_adult = yes + is_governor = yes + any_character_to_title_neighboring_and_across_water_county = { + holder = { + OR = { + ep3_governor_yearly_8170_raider_trigger = yes + any_liege_or_above = { ep3_governor_yearly_8170_raider_trigger = yes } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_character_to_title_neighboring_and_across_water_county = { + holder = { + OR = { + AND = { + ep3_governor_yearly_8170_raider_trigger = yes + reverse_has_opinion_modifier = { + target = root + modifier = raided_me_opinion + } + } + any_liege_or_above = { + ep3_governor_yearly_8170_raider_trigger = yes + reverse_has_opinion_modifier = { + target = root + modifier = raided_me_opinion + } + } + } + } + } + add = 1 + } + } + + immediate = { + save_scope_as = governor + # A military character + cp:councillor_marshal ?= { save_scope_as = marshal } + if = { + limit = { NOT = { exists = scope:marshal } } + ordered_knight = { + order_by = age + save_scope_as = marshal + } + } + if = { + limit = { NOT = { exists = scope:marshal } } + ordered_courtier = { + limit = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + order_by = age + save_scope_as = marshal + } + } + scope:marshal = { add_to_list = threatened_vassals } + # A raiding neighbour + every_character_to_title_neighboring_and_across_water_county = { + limit = { + holder = { + OR = { + ep3_governor_yearly_8170_raider_trigger = yes + any_liege_or_above = { ep3_governor_yearly_8170_raider_trigger = yes } + } + } + } + holder = { + if = { + limit = { + any_liege_or_above = { ep3_governor_yearly_8170_raider_trigger = yes } + } + ordered_liege_or_above = { + limit = { ep3_governor_yearly_8170_raider_trigger = yes } + order_by = highest_held_title_tier + add_to_list = potential_raiders + } + } + else = { add_to_list = potential_raiders } + } + } + random_in_list = { + list = potential_raiders + weight = { + base = 1 + modifier = { + reverse_has_opinion_modifier = { + target = root + modifier = raided_me_opinion + } + add = 10 + } + } + save_scope_as = raider + every_character_to_title_neighboring_and_across_water_county = { + limit = { + save_temporary_scope_as = neighbour_county_temp + root = { any_sub_realm_county = { this = scope:neighbour_county_temp } } + } + add_to_list = threatened_counties + if = { + limit = { holder != root } + holder = { + add_to_list = threatened_vassals + every_liege_or_above = { + limit = { + NOR = { + this = root + highest_held_title_tier < root.highest_held_title_tier + } + } + add_to_list = threatened_vassals + } + } + } + } + } + random_in_list = { + list = threatened_counties + weight = { + base = 1 + modifier = { + any_county_province = { has_province_modifier = recently_looted_modifier } + add = 10 + } + modifier = { + add = { + value = 5 + subtract = title_province.fort_level + } + } + modifier = { + add = { + value = title_province.available_loot + multiply = 0.1 + } + } + } + save_scope_as = raid_county + } + set_variable = { + name = threatened_counties_count + value = { + value = 0 + every_in_list = { + list = threatened_counties + add = 1 + } + } + months = 1 + } + } + + option = { # A + name = ep3_governor_yearly.8170.a + remove_treasury_or_gold = { + value = { + value = minor_treasury_or_gold_value + multiply = var:threatened_counties_count + max = 100 + } + } + increase_governance_effect = { VALUE = 5 } + every_in_list = { + list = threatened_counties + custom = ep3_governor_yearly.8170.modifier_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8170_warning_system_modifier + years = 10 + } + } + every_in_list = { + list = threatened_vassals + custom = ep3_governor_yearly.8170.opinion_tt + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 1 + ai_honor = 1 + } + modifier = { + treasury_or_gold < major_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Own ideas + name = ep3_governor_yearly.8170.b + remove_treasury_or_gold = medium_treasury_or_gold_value + duel = { + skill = martial + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8170.b.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8170.b.success + change_influence = minor_influence_gain + increase_governance_effect = { VALUE = 10 } + every_in_list = { + list = threatened_counties + custom = ep3_governor_yearly.8170.modifier_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8170_success_modifier + years = 10 + } + } + every_in_list = { + list = threatened_vassals + custom = ep3_governor_yearly.8170.opinion_tt + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8170.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8170.b.failure + every_in_list = { + list = threatened_counties + custom = ep3_governor_yearly.8170.modifier_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8170_failure_modifier + years = 10 + } + } + every_in_list = { + list = threatened_vassals + custom = ep3_governor_yearly.8170.opinion_tt + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = 1 + ai_energy = 1 + } + modifier = { + treasury_or_gold < major_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Diplomacy + name = ep3_governor_yearly.8170.c + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 5 + min = 3 + } + desc = ep3_governor_yearly.8170.c.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8170.c.success + left_icon = scope:marshal + right_icon = scope:raider + scope:raider = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + add_truce_one_way = { + character = root + years = 10 + name = ep3_governor_yearly_8170_truce + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -5 + min = 3 + } + desc = ep3_governor_yearly.8170.c.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8170.c.failure + left_icon = scope:marshal + right_icon = scope:raider + change_influence = minor_influence_loss + reverse_add_opinion = { + target = scope:raider + modifier = contempt_opinion + opinion = -25 + } + } + } + } + stress_impact = { + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 1 + ai_compassion = 1 + } + } + } + + option = { # Refuse + name = ep3_governor_yearly.8170.d + reverse_add_opinion = { + target = scope:marshal + modifier = annoyed_opinion + opinion = -15 + } + stress_impact = { + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + diligent = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = 1 + ai_honor = -1 + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_interactions_events.txt b/N3OW/events/dlc/ep3/ep3_interactions_events.txt new file mode 100644 index 00000000..24476a30 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_interactions_events.txt @@ -0,0 +1,4609 @@ +namespace = ep3_interactions_events + +# Favor +ep3_interactions_events.0001 = { + type = letter_event + opening = ep3_interactions_events.0001.opening + desc = { + desc = ep3_interactions_events.0001.desc + desc = ep3_interactions_events.0001.favor + } + sender = scope:recipient + + trigger = { + exists = scope:demanded_administration + scope:recipient.primary_title = scope:demanded_administration + scope:recipient = { target_is_liege_or_above = scope:actor } + } + + #Accept + option = { + name = ep3_interactions_events.0001.a + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_interactions_events.0001.accept_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + add_hook = { + target = scope:actor + type = favor_hook + } + change_to_administrative_interaction_effect = yes + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 75 + opinion_modifier = { + opinion_target = scope:recipient + multiplier = 0.5 + } + } + } + + #Refuse + option = { + name = ep3_interactions_events.0001.b + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_interactions_events.0001.refuse_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + # In Japan, this starts a war + if = { + limit = { + scope:actor = { government_has_flag = government_is_japan_administrative } + scope:recipient = { government_has_flag = government_is_japan_feudal } + } + tgp_japan_demand_administrative_refusal_effect = yes + } + # Elsewhere it does not + else = { custom_tooltip = demand_admin_interaction_vassal_refuses } + # Opinion + if = { + limit = { + scope:actor = { is_ai = yes } + } + reverse_add_opinion = { + target = scope:actor + modifier = angry_opinion + opinion = -25 + } + } + } + } + ai_chance = { + base = 10 + } + } + + #Use a Hook to force it through + option = { + name = religious_interaction.2012.c + trigger = { has_strong_usable_hook = scope:recipient } + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_interactions_events.0001.force_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + scope:actor = { use_hook = scope:recipient } + change_to_administrative_interaction_effect = yes + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + +# Gold +ep3_interactions_events.0002 = { + type = letter_event + opening = ep3_interactions_events.0001.opening + desc = { + desc = ep3_interactions_events.0001.desc + desc = ep3_interactions_events.0002.gold + } + sender = scope:recipient + + trigger = { + exists = scope:demanded_administration + scope:recipient.primary_title = scope:demanded_administration + scope:recipient = { target_is_liege_or_above = scope:actor } + } + + immediate = { + } + + #Accept + option = { + name = ep3_interactions_events.0002.a + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_interactions_events.0001.accept_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + change_to_administrative_interaction_effect = yes + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 0.5 + } + modifier = { + factor = 0.2 + gold <= 0 + } + opinion_modifier = { + opinion_target = scope:recipient + multiplier = 0.5 + } + } + } + + #Refuse + option = { + name = ep3_interactions_events.0001.b + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_interactions_events.0001.refuse_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + custom_tooltip = demand_admin_interaction_vassal_refuses + if = { + limit = { + scope:actor = { is_ai = yes } + } + reverse_add_opinion = { + target = scope:actor + modifier = angry_opinion + opinion = -25 + } + } + } + } + ai_chance = { + base = 10 + modifier = { + add = 100 + gold < medium_gold_value + } + } + } + + #Use a Hook to force it through + option = { + name = religious_interaction.2011.c + trigger = { has_strong_usable_hook = scope:recipient } + save_scope_value_as = { # Cancel extra gold + name = gold + value = no + } + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_interactions_events.0001.force_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + scope:actor = { use_hook = scope:recipient } + change_to_administrative_interaction_effect = yes + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + +# Recipient Player event +ep3_interactions_events.0005 = { + type = letter_event + opening = ep3_interactions_events.0005.opening + desc = { + desc = ep3_interactions_events.0005.desc + first_valid = { + triggered_desc = { + trigger = { scope:hereditary = yes } + desc = ep3_interactions_events.0005.hereditary + } + desc = ep3_interactions_events.0005.fallback + } + } + sender = scope:actor + + trigger = { + exists = scope:demanded_administration + scope:recipient.primary_title = scope:demanded_administration + scope:recipient = { target_is_liege_or_above = scope:actor } + } + + #Accept + option = { + name = ep3_interactions_events.0005.a + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = demand_admin_interaction_accept + left_icon = scope:recipient + change_to_administrative_interaction_effect = yes + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 0 + demand_admin_acceptance_modifier = yes + modifier = { # We increase the value to compensate for the potentially high AI values in the other options + factor = 2 + always = yes + } + } + } + + #Favor + option = { + name = ep3_interactions_events.0005.b + trigger = { + NOT = { + has_hook_of_type = { + target = scope:actor + type = favor_hook + } + } + scope:hook = no + } + show_as_unavailable = { scope:hook = yes } + custom_description_no_bullet = { + text = if_actor_accepts_desc + object = scope:actor + } + show_as_tooltip = { + add_hook = { + target = scope:actor + type = favor_hook + } + change_to_administrative_interaction_effect = yes + } + scope:actor = { + trigger_event = { + id = ep3_interactions_events.0001 + days = 5 + } + } + ai_chance = { + base = 100 + modifier = { + add = { + value = 50 + # This goes double for your Powerful Vassals. A better contract is likely to be much more important than a short-term payout. + if = { + limit = { is_powerful_vassal_of = scope:actor } + add = 100 + } + } + this.liege = scope:actor + } + modifier = { + has_trait = ambitious + add = 50 + } + } + } + + #Gold + option = { + name = ep3_interactions_events.0005.c + trigger = { scope:hook = no } + show_as_unavailable = { scope:hook = yes } + save_scope_value_as = { + name = gold + value = yes + } + custom_description_no_bullet = { + text = if_actor_accepts_desc + object = scope:actor + } + show_as_tooltip = { + change_to_administrative_interaction_effect = yes + } + scope:actor = { + trigger_event = { + id = ep3_interactions_events.0002 + days = 5 + } + } + ai_chance = { + base = 100 + modifier = { + add = 50 # More likely to ask for gold if they're poor + scope:recipient.short_term_gold < medium_gold_value + } + modifier = { + add = { # Much more likely to ask for gold if involved in one of their own wars (they want to win). + value = 50 + if = { + # Especially true if they're in debt! + limit = { gold < 0 } + add = 150 + } + } + is_at_war = yes + any_character_war = { is_war_leader = scope:recipient } + } + modifier = { + has_trait = greedy + add = 50 + } + modifier = { + ai_greed < high_negative_ai_value + add = -50 + } + } + } + + #Refuse + option = { + name = ep3_interactions_events.0005.d + trigger = { scope:hook = no } + show_as_unavailable = { scope:hook = yes } + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = demand_admin_interaction_refuse + left_icon = scope:recipient + custom_tooltip = demand_admin_interaction_vassal_refuses + } + if = { + limit = { is_ai = yes } + add_opinion = { + modifier = angry_opinion + target = scope:recipient + opinion = -15 + } + } + } + ai_chance = { + base = 20 + opinion_modifier = { + opinion_target = scope:actor + multiplier = -0.5 + } + modifier = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + add = -15 + } + modifier = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + add = -30 + } + modifier = { + has_trait = stubborn + add = 25 + } + modifier = { + has_trait = arrogant + add = 25 + } + modifier = { + has_trait = ambitious + add = -25 + } + } + } +} + +ep3_interactions_events.0010 = { + type = letter_event + opening = ep3_interactions_events.0010.opening + desc = ep3_interactions_events.0010.desc + sender = scope:intermediary + + immediate = { + custom_tooltip = ep3_interactions_events.0010.tt + } + + option = { name = ep3_interactions_events.0010.a } +} + +ep3_interactions_events.0011 = { + type = letter_event + opening = ep3_interactions_events.0011.opening + desc = ep3_interactions_events.0011.desc + sender = scope:intermediary + + immediate = { + custom_tooltip = ep3_interactions_events.0011.tt + } + + option = { name = ep3_interactions_events.0011.a } +} + +ep3_interactions_events.0012 = { + type = letter_event + opening = ep3_interactions_events.0012.opening + desc = ep3_interactions_events.0012.desc + sender = scope:intermediary + + immediate = { + + } + + option = { name = ep3_interactions_events.0012.a } +} + +ep3_interactions_events.0013 = { + type = letter_event + opening = ep3_interactions_events.0013.opening + desc = ep3_interactions_events.0013.desc + sender = scope:recipient + + immediate = { + + } + + option = { + name = char_interaction.0263.a + } +} + +ep3_interactions_events.0014 = { + type = letter_event + opening = ep3_interactions_events.0014.opening + desc = ep3_interactions_events.0014.desc + sender = scope:recipient + + immediate = { + } + + option = { + name = ep3_interactions_events.0014.a + } +} + +ep3_interactions_events.0020 = { + type = letter_event + opening = ep3_interactions_events.0020.opening + desc = ep3_interactions_events.0020.desc + sender = scope:recipient + + immediate = { + # Refund the influence cost + change_influence = { + value = admin_council_cost_value + multiply = 0.5 + } + } + + option = { + name = ep3_interactions_events.0020.a + } +} + +ep3_interactions_events.0021 = { + type = letter_event + opening = ep3_interactions_events.0021.opening + desc = ep3_interactions_events.0021.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0021.a + } +} + +scripted_trigger ep3_interactions_events_0030_callous_trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_trait = zealous + has_relation_rival = scope:recipient + has_relation_nemesis = scope:recipient + has_relation_victim = scope:recipient + has_relation_bully = scope:recipient + } +} + +#You castrate a child-aged family member +ep3_interactions_events.0030 = { # By Jason Cantalini + type = character_event + title = ep3_interactions_events.0030.t + desc = { + desc = ep3_interactions_events.0030.desc.intro + first_valid = { + triggered_desc = { + trigger = { + age < 12 + } + desc = ep3_interactions_events.0030.desc.child_address + } + desc = ep3_interactions_events.0030.desc.normal_address + } + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_greek } + OR = { + has_title = title:e_byzantium + top_liege = { + has_title = title:e_byzantium + } + } + } + desc = ep3_interactions_events.0030.desc.greek + } + desc = ep3_interactions_events.0030.desc.non_greek + } + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + has_character_flag = accepted_castration_child + } + } + desc = ep3_interactions_events.0030.desc.accepted_child + } + triggered_desc = { + trigger = { + scope:recipient = { + has_character_flag = accepted_castration_youth + } + } + desc = ep3_interactions_events.0030.desc.accepted_youth + } + triggered_desc = { + trigger = { + age < 12 + } + desc = ep3_interactions_events.0030.desc.child_resents_castration + } + desc = ep3_interactions_events.0030.desc.resents_castration + } + desc = ep3_interactions_events.0030.desc + } + theme = administrative + override_background = { + reference = physicians_study + } + left_portrait = { + character = scope:actor + triggered_animation = { + trigger = { + scope:recipient = { has_character_flag = resents_castration } + } + animation = go_to_your_room + } + triggered_animation = { + trigger = { + NOT = { + scope:recipient = { has_character_flag = resents_castration } + } + } + animation = personality_forgiving + } + } + right_portrait = { + character = scope:recipient + triggered_animation = { + trigger = { + scope:recipient = { has_character_flag = resents_castration } + } + animation = fear + } + triggered_animation = { + trigger = { + NOT = { + scope:recipient = { has_character_flag = resents_castration } + } + } + animation = crying + } + } + + immediate = { + hidden_effect = { + #For the text + save_court_physician_as_effect = { SCOPE_NAME = physician } + } + } + + option = { + name = { + trigger = { + ep3_interactions_events_0030_callous_trigger = yes + } + text = ep3_interactions_events.0030_callous + } + name = { + trigger = { + ep3_interactions_events_0030_callous_trigger = no + } + text = ep3_interactions_events.0030_kind + } + scope:actor = { change_influence = minor_influence_gain } + if = { + limit = { + scope:recipient = { + has_character_flag = accepted_castration_child + } + } + scope:recipient = { + ep3_child_castration_effect = yes + add_stress = medium_stress_gain + custom_tooltip = castration_better_before_maturity + } + } + else_if = { + limit = { + scope:recipient = { + has_character_flag = accepted_castration_youth + } + } + scope:recipient = { + ep3_youth_castration_effect = yes + add_stress = major_stress_gain + } + } + else = { + scope:recipient = { + ep3_child_castration_effect = yes + add_opinion = { + modifier = castration_opinion + target = scope:actor + opinion = -50 + } + add_stress = major_stress_gain + } + } + scope:recipient = { + create_character_memory = { + type = family_castration_memory + participants = { + castrator = scope:actor + } + } + } + ai_chance = { + base = 100 + } + } + after = { + if = { + limit = { + scope:recipient = { + has_character_flag = accepted_castration_child + } + } + scope:recipient = { + remove_character_flag = accepted_castration_child + } + } + if = { + limit = { + scope:recipient = { + has_character_flag = accepted_castration_youth + } + } + scope:recipient = { + remove_character_flag = accepted_castration_youth + } + } + if = { + limit = { + scope:recipient = { + has_character_flag = resents_castration + } + } + scope:recipient = { + remove_character_flag = resents_castration + } + } + if = { + limit = { + scope:recipient = { + has_character_modifier = brutal_castration_modifier + } + } + send_interface_toast = { + type = event_generic_bad_text + title = ep3_interactions_events.0030.bad_castration.t + desc = ep3_interactions_events.0030.bad_castration + left_icon = scope:physician + right_icon = scope:recipient + + show_as_tooltip = { + scope:recipient = { + add_character_modifier = brutal_castration_modifier + } + } + } + } + else = { + send_interface_toast = { + type = event_generic_good_text + title = ep3_interactions_events.0030.good_castration.t + desc = ep3_interactions_events.0030.good_castration + left_icon = scope:physician + right_icon = scope:recipient + } + } + } +} + +#The family member you wish castrated flees! +ep3_interactions_events.0031 = { # By Jason Cantalini + type = character_event + title = ep3_interactions_events.0031.t + desc = ep3_interactions_events.0031.desc + theme = healthcare + override_background = { + trigger = { + culture = { + OR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + has_building_gfx = indian_building_gfx + } + } + NOT = { government_has_flag = government_is_tribal } + } + reference = ep3_city_gate + } + override_background = { + trigger = { + OR = { + culture = { + NOR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + has_building_gfx = indian_building_gfx + } + } + government_has_flag = government_is_tribal + } + } + reference = market + } + left_portrait = { + character = scope:actor + triggered_animation = { + trigger = { + OR = { + ep3_interactions_events_0030_callous_trigger = yes + has_trait = vengeful + has_trait = just + has_trait = wrathful + } + } + animation = anger + } + triggered_animation = { + trigger = { + NOR = { + ep3_interactions_events_0030_callous_trigger = yes + has_trait = vengeful + has_trait = just + has_trait = wrathful + } + } + animation = survey + } + + } + lower_right_portrait = scope:recipient + + immediate = { + if = { + limit = { + has_hook = scope:recipient + } + remove_hook = { target = scope:recipient } + } + if = { + limit = { + OR = { + is_landed = yes + is_landless_ruler = yes + is_governor = yes + } + } + remove_courtier_or_guest = scope:recipient + } + scope:recipient = { + set_relation_rival = { + target = scope:actor + reason = rival_attempted_castration + } + add_stress = medium_stress_gain + } + scope:recipient = { + create_character_memory = { + type = family_castration_fled_memory + participants = { + castrator = scope:actor + } + } + } + } + + #Have him found and castrated NOW! + option = { + name = ep3_interactions_events.0031.a + + if = { + limit = { + influence >= medium_influence_value + } + change_influence = medium_influence_loss + } + else = { + add_prestige = medium_prestige_loss + } + + + duel = { + skill = intrigue + target = scope:recipient + 45 = { #The boy is found and dealt with + desc = ep3_interactions_events.0031.a_success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -44 + } + modifier = { + highest_held_title_tier >= tier_empire + add = 30 + } + modifier = { + highest_held_title_tier >= tier_duchy + add = 10 + } + modifier = { + exists = cp:councillor_spymaster + cp:councillor_spymaster = { + intrigue > very_high_skill_rating + } + add = 15 + } + modifier = { + exists = cp:councillor_spymaster + cp:councillor_spymaster = { + intrigue >= high_skill_rating + } + add = 10 + } + modifier = { + dread > 70 + add = 10 + } + + send_interface_toast = { + title = ep3_interactions_events.0031.a_success + left_icon = root + right_icon = scope:recipient + + if = { + limit = { + OR = { + is_landed = yes + is_landless_ruler = yes + } + } + add_courtier = scope:recipient + } + scope:actor = { change_influence = minor_influence_gain } + scope:recipient = { + ep3_youth_castration_effect = yes + add_opinion = { + target = scope:actor + modifier = angry_opinion + opinion = -50 + } + } + scope:recipient = { + create_character_memory = { + type = family_castration_memory + participants = { + castrator = scope:actor + } + } + } + } + } + 55 = { #The boy eludes your searchers + desc = ep3_interactions_events.0031.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -54 + } + send_interface_toast = { + title = ep3_interactions_events.0031.a_failure + left_icon = root + right_icon = scope:recipient + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_gain + content = minor_stress_impact_gain + fickle = minor_stress_impact_gain + generous = miniscule_stress_impact_gain + } + ai_chance = { + ai_value_modifier = { + ai_vengefulness = 1 + ai_zeal = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = content + has_trait = fickle + AND = { + influence < medium_influence_value + prestige < medium_prestige_value + } + } + } + } + } + #He won't sacrifice for us - he should indeed be gone + option = { + name = { + trigger = { + OR = { + ep3_interactions_events_0030_callous_trigger = yes + has_trait = vengeful + has_trait = just + has_trait = wrathful + } + } + text = ep3_interactions_events.0031_callous + } + name = { + trigger = { + NOR = { + ep3_interactions_events_0030_callous_trigger = yes + has_trait = vengeful + has_trait = just + has_trait = wrathful + } + } + text = ep3_interactions_events.0031_kind + } + stress_impact = { + just = miniscule_stress_impact_gain + ambitious = miniscule_stress_impact_gain + stubborn = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + sadistic = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + ai_value_modifier = { + ai_compassion = 1 + ai_energy = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = stubborn + has_trait = vengeful + has_trait = wrathful + has_trait = sadistic + } + } + } + } + after = { + hidden_effect = { + if = { + limit = { + scope:recipient = { + NOT = { is_courtier_of = root } + } + } + if = { + limit = { + any_relation = { + type = rival + OR = { + is_landed = yes + is_landless_ruler = yes + } + } + } + random_relation = { + type = rival + limit = { + OR = { + is_landed = yes + is_landless_ruler = yes + } + } + save_scope_as = rival + } + scope:recipient = { + visit_court_of = scope:rival + } + } + else_if = { + limit = { + exists = root.top_liege + } + scope:recipient = { set_location = root.top_liege.capital_province } + } + else_if = { + limit = { + any_neighboring_top_liege_realm_owner = { + NOT = { + government_has_flag = government_is_tribal + } + } + } + random_neighboring_top_liege_realm_owner = { + limit = { + NOT = { + government_has_flag = government_is_tribal + } + } + save_scope_as = destination_owner + } + scope:recipient = { + visit_court_of = scope:destination_owner + } + } + else_if = { + limit = { + any_neighboring_top_liege_realm_owner = { + exists = this + } + } + random_neighboring_top_liege_realm_owner = { + save_scope_as = destination_owner + } + scope:recipient = { + visit_court_of = scope:destination_owner + } + } + } + } + } +} + +#The emperor sends a reward for your governorship skills +ep3_interactions_events.0040 = { + type = letter_event + opening = ep3_interactions_events.0040.opening + desc = ep3_interactions_events.0040.desc + sender = scope:emperor + + immediate = { + random_list = { + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value < 90 + } + } + change_influence = major_influence_gain + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value >= 90 + } + } + change_influence = massive_influence_gain + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value < 90 + } + } + add_gold = medium_gold_value + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value >= 90 + } + } + add_gold = major_gold_value + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value < 95 + } + } + add_trait_xp = { + trait = governor + value = 5 + } + add_prestige = medium_prestige_gain + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value < 90 + } + } + change_influence = medium_influence_gain + add_prestige = minor_prestige_gain + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value >= 90 + } + } + change_influence = major_influence_gain + add_prestige = medium_prestige_gain + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value >= 90 + } + } + add_character_modifier = { + modifier = ep3_efforts_recognized_modifier + years = 10 + } + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value < 95 + } + } + add_character_modifier = { + modifier = ep3_publicly_recognized_modifier + years = 10 + } + } + } + } + + option = { + name = ep3_interactions_events.0040.a + scope:emperor = { + add_hook = { + target = root + type = loyalty_hook + years = 5 + } + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:emperor + modifier = feeling_appreciated_opinion + opinion = 30 + } + } + if = { + limit = { + scope:emperor = { is_ai = yes } + } + scope:emperor = { + add_opinion = { + target = root + modifier = appreciation_opinion + opinion = 30 + } + } + } + } +} + +scripted_effect ep3_rent_knight_effect = { + $KNIGHT_TO_RENT$ = { + liege = { + save_scope_as = og_liege + } + add_opinion = { + modifier = recruited_me_opinion + target = root + } + save_scope_as = rented_knight + } + custom_tooltip = ep3_rent_knight_effect.tt + hidden_effect = { + add_courtier = $KNIGHT_TO_RENT$ + $KNIGHT_TO_RENT$ = { + add_character_flag = blocked_from_leaving + set_knight_status = force + } + #return event + trigger_event = { + id = ep3_interactions_events.0102 + years = 5 + } + } +} + +ep3_interactions_events.0101 = { + type = character_event + title = ep3_interactions_events.0101.t + desc = { + desc = ep3_interactions_events.0101.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:cool_trait_1 } + desc = ep3_interactions_events.0101.desc_knight_1_trait + } + triggered_desc = { + trigger = { exists = scope:knight_to_rent_1 } + desc = ep3_interactions_events.0101.desc_knight_1 + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:cool_trait_2 } + desc = ep3_interactions_events.0101.desc_knight_2_trait + } + triggered_desc = { + trigger = { exists = scope:knight_to_rent_2 } + desc = ep3_interactions_events.0101.desc_knight_2 + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:cool_trait_3 } + desc = ep3_interactions_events.0101.desc_knight_3_trait + } + triggered_desc = { + trigger = { exists = scope:knight_to_rent_3 } + desc = ep3_interactions_events.0101.desc_knight_3 + } + } + } + theme = war + + left_portrait = { + character = scope:actor + } + right_portrait = { + character = scope:recipient + } + lower_left_portrait = { + trigger = { exists = scope:knight_to_rent_1 } + character = scope:knight_to_rent_1 + } + lower_center_portrait = { + trigger = { exists = scope:knight_to_rent_2 } + character = scope:knight_to_rent_2 + } + lower_right_portrait = { + trigger = { exists = scope:knight_to_rent_3 } + character = scope:knight_to_rent_3 + } + immediate = { + scope:recipient = { + every_knight = { + limit = { + is_landed = no + } + add_to_list = potential_knights + } + } + #remove the very top guy + ordered_in_list = { + list = potential_knights + order_by = prowess + remove_from_list = potential_knights + } + if = { + limit = { + list_size:potential_knights > 2 + } + ordered_in_list = { + list = potential_knights + order_by = prowess + save_scope_as = knight_to_rent_1 + remove_from_list = potential_knights + } + } + if = { + limit = { + list_size:potential_knights > 1 + } + ordered_in_list = { + list = potential_knights + order_by = prowess + save_scope_as = knight_to_rent_2 + remove_from_list = potential_knights + } + } + if = { + limit = { + list_size:potential_knights > 0 + } + ordered_in_list = { + list = potential_knights + order_by = prowess + save_scope_as = knight_to_rent_3 + remove_from_list = potential_knights + } + } + if = { + limit = { + scope:knight_to_rent_3 = { + any_character_trait = { + has_trait_category = commander + } + } + } + scope:knight_to_rent_3 = { + random_character_trait = { + limit = { + has_trait_category = commander + } + save_scope_as = cool_trait_3 + } + } + } + if = { + limit = { + scope:knight_to_rent_2 ?= { + any_character_trait = { + has_trait_category = commander + } + } + } + scope:knight_to_rent_2 = { + random_character_trait = { + limit = { + has_trait_category = commander + } + save_scope_as = cool_trait_2 + } + } + } + if = { + limit = { + scope:knight_to_rent_1 ?= { + any_character_trait = { + has_trait_category = commander + } + } + } + scope:knight_to_rent_1 = { + random_character_trait = { + limit = { + has_trait_category = commander + } + save_scope_as = cool_trait_1 + } + } + } + } + + option = { + name = ep3_interactions_events.0101.a + trigger = { exists = scope:knight_to_rent_1 } + ep3_rent_knight_effect = { + KNIGHT_TO_RENT = scope:knight_to_rent_1 + } + } + option = { + name = ep3_interactions_events.0101.b + trigger = { exists = scope:knight_to_rent_2 } + ep3_rent_knight_effect = { + KNIGHT_TO_RENT = scope:knight_to_rent_2 + } + } + option = { + name = ep3_interactions_events.0101.c + trigger = { exists = scope:knight_to_rent_3 } + ep3_rent_knight_effect = { + KNIGHT_TO_RENT = scope:knight_to_rent_3 + } + } + option = { + name = ep3_interactions_events.0101.d + } +} + +ep3_interactions_events.0102 = { + type = letter_event + opening = ep3_interactions_events.0102.opening + desc = ep3_interactions_events.0102.desc + sender = scope:rented_knight + + trigger = { + scope:rented_knight ?= { + is_alive = yes + } + } + immediate = { + scope:rented_knight = { + remove_character_flag = blocked_from_leaving + } + if = { + limit = { + scope:og_liege ?= { + is_alive = yes + } + } + scope:og_liege = { + show_as_tooltip = { + scope:rented_knight = { + return_to_court = yes + } + } + hidden_effect = { + add_courtier = scope:rented_knight + } + } + } + else = { + remove_courtier_or_guest = scope:rented_knight + } + } + + option = { + name = ep3_interactions_events.0102.a + add_hook = { + type = loyalty_hook + target = scope:rented_knight + } + } +} + +#if recipient (laamp) declines hire_laamp_mercenaries_interaction he gets this event to pick smth to negotiate +ep3_interactions_events.0111 = { + type = character_event + title = ep3_interactions_events.0111.t + desc = ep3_interactions_events.0111.desc + theme = war + left_portrait = { + character = scope:recipient + animation = thinking + } + right_portrait = { + character = scope:actor + animation = bribing + } + artifact = { + target = scope:actor_artifact + position = lower_center_portrait + trigger = { exists = scope:actor_artifact } + } + + immediate = { + scope:recipient = { save_scope_as = adventurer } + if = { + limit = { + scope:recipient.prestige_level > 1 + scope:recipient.prestige_level < 3 + } + scope:actor = { + random_held_title = { + title_tier = county + limit = { + NOR = { + scope:actor.primary_title ?= this + scope:actor.capital_county ?= this + scope:actor.capital_county.duchy ?= this.duchy + } + is_noble_family_title = no + is_landless_type_title = no + } + add_to_list = purchased_titles + } + } + } + else_if = { + limit = { + scope:recipient.prestige_level > 2 + scope:actor = { + any_held_title = { + title_tier = duchy + NOR = { + scope:actor.primary_title ?= this + scope:actor.capital_county.de_jure_liege ?= this + } + is_noble_family_title = no + is_landless_type_title = no + } + } + } + scope:actor = { + random_held_title = { + title_tier = duchy + limit = { + NOR = { + scope:actor.primary_title ?= this + scope:actor.capital_county.de_jure_liege ?= this + } + is_noble_family_title = no + is_landless_type_title = no + } + add_to_list = purchased_titles + if = { + limit = { tier = tier_duchy } + every_de_jure_county = { + limit = { ep3_purchase_land_valid_county_trigger = yes } + add_to_list = purchased_titles + } + } + } + } + } + else = { + scope:actor = { + random_held_title = { + title_tier >= county + limit = { + NOR = { + scope:actor.primary_title ?= this + scope:actor.capital_county ?= this + scope:actor.capital_county.duchy ?= duchy + any_in_de_jure_hierarchy = { scope:actor.capital_county ?= this } + } + is_noble_family_title = no + is_landless_type_title = no + } + add_to_list = purchased_titles + if = { + limit = { tier = tier_duchy } + every_de_jure_county = { + limit = { ep3_purchase_land_valid_county_trigger = yes } + add_to_list = purchased_titles + } + } + } + } + } + ordered_in_list = { + list = purchased_titles + limit = { + is_noble_family_title = no + is_landless_type_title = no + } + save_scope_as = new_primary_title + } + + scope:actor = { + every_character_war = { + add_to_list = actor_wars + } + random_character_artifact = { + limit = { + scope:recipient = { can_equip_artifact = prev } + } + save_scope_as = actor_artifact + } + } + every_in_list = { + list = actor_wars + limit = { + primary_defender = scope:actor + } + add_to_list = join_as_defender + remove_from_list = actor_wars + } + every_in_list = { + list = actor_wars + limit = { + primary_attacker = scope:actor + } + add_to_list = join_as_attacker + remove_from_list = actor_wars + } + } + + #Ask for land + option = { + name = ep3_interactions_events.0111.a + trigger = { + exists = scope:new_primary_title + prestige_level >= 2 + scope:new_primary_title = { + NOR = { + this = scope:actor.primary_title + this = scope:actor.capital_county + duchy = scope:actor.capital_county.duchy + } + } + } + custom_tooltip = ep3_interactions_events.0111.actor_decides + save_scope_value_as = { + name = negotiation_offer + value = flag:land + } + show_as_tooltip = { + # Determine hierarchy + ep3_become_landed_save_liege_effect = { + TITLE_GIVER = scope:actor + ALWAYS_INDEPENDENT = no + TITLE_LIST = purchased_titles + } + # Resolve title, liege, government changes + ep3_become_landed_transfer_effect = { + TITLE_RECEIVER = scope:recipient + TITLE_LIST = purchased_titles + TYPE = granted + REASON = flag:purchased + } + } + scope:actor = { + trigger_event = ep3_interactions_events.0112 + } + custom_tooltip = ep3_interactions_events.0111.join_wars + + ai_chance = { + base = 0 + modifier = { # Province value + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = scope:new_primary_title.development_level + scope:new_primary_title = { + every_county_province = { add = num_buildings } + } + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { ep3_purchase_land_valid_county_trigger = yes } + add = development_level + every_county_province = { add = num_buildings } + } + } + } + multiply = -1 + } + } + modifier = { # Land is foreign + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = -10 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + culture != scope:recipient.culture + } + add = -10 + } + } + } + max = -30 + } + trigger_if = { + limit = { scope:new_primary_title.tier = tier_county } + scope:new_primary_title.culture != scope:recipient.culture + } + trigger_else = { + scope:new_primary_title = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + culture != scope:recipient.culture + } + } + } + } + modifier = { # Different faith + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = -10 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = -10 + } + } + } + max = -30 + } + trigger_if = { + limit = { scope:new_primary_title.tier = tier_county } + scope:new_primary_title.faith != scope:recipient.faith + } + trigger_else = { + scope:new_primary_title = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + } + } + } + modifier = { # My culture's lands + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = 15 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = 15 + } + } + } + if = { + limit = { scope:acceptance != 0 } + divide = scope:acceptance + } + min = 50 + } + scope:actor.culture != scope:recipient.culture + trigger_if = { + limit = { scope:new_primary_title.tier = tier_county } + scope:new_primary_title.culture = scope:recipient.culture + } + trigger_else = { + scope:new_primary_title = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + culture = scope:recipient.culture + } + } + } + scope:recipient.culture = { + save_temporary_scope_value_as = { + name = acceptance + value = { + value = "cultural_acceptance(scope:actor.culture)" + divide = 25 + ceiling = yes + } + } + } + } + modifier = { # My faith's lands + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = 15 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = 15 + } + } + } + if = { + limit = { scope:hostility != 0 } + multiply = scope:hostility + } + min = 50 + } + scope:actor.faith != scope:recipient.faith + trigger_if = { + limit = { scope:new_primary_title.tier = tier_county } + scope:new_primary_title.faith = scope:recipient.faith + } + trigger_else = { + scope:new_primary_title = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + faith = scope:recipient.faith + } + } + } + scope:recipient.faith = { + save_temporary_scope_value_as = { + name = hostility + value = "faith_hostility_level(scope:actor.faith)" + } + } + } + modifier = { + factor = 0 + NOR = { + current_military_strength < 1000 # You can do better + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + NOR = { + AND = { + has_character_modifier = ep3_lust_for_land_modifier + ai_greed >= 25 + ai_boldness >= 25 + ai_rationality <= -25 + } + AND = { + has_trait = greedy + ai_rationality <= -50 + } + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + } + } + } + + #Ask for artifact + option = { + name = ep3_interactions_events.0111.b + trigger = { + exists = scope:actor_artifact + } + custom_tooltip = ep3_interactions_events.0111.actor_decides + show_as_tooltip = { + scope:actor_artifact = { + set_owner = scope:recipient + } + } + save_scope_value_as = { + name = negotiation_offer + value = flag:artifact + } + scope:actor = { + trigger_event = ep3_interactions_events.0112 + } + custom_tooltip = ep3_interactions_events.0111.join_wars + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + #Ask for alliance + option = { + name = ep3_interactions_events.0111.c + trigger = { + scope:actor = { + NOT = { is_allied_to = scope:recipient } + } + } + custom_tooltip = ep3_interactions_events.0111.actor_decides + show_as_tooltip = { + scope:actor = { + create_alliance = { + target = scope:recipient + allied_through_owner = scope:actor + allied_through_target = scope:recipient + } + } + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = event_negotiated_alliance_opinion + } + } + } + save_scope_value_as = { + name = negotiation_offer + value = flag:alliance + } + scope:actor = { + trigger_event = ep3_interactions_events.0112 + } + custom_tooltip = ep3_interactions_events.0111.join_wars + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + #Ask for adding to contact list + option = { + name = ep3_interactions_events.0111.d + trigger = { + scope:actor = { + NOT = { is_contact_of = scope:recipient } + } + } + custom_tooltip = ep3_interactions_events.0111.actor_decides + show_as_tooltip = { + scope:recipient = { + add_contact = scope:actor + } + } + save_scope_value_as = { + name = negotiation_offer + value = flag:contact_list + } + scope:actor = { + trigger_event = ep3_interactions_events.0112 + } + custom_tooltip = ep3_interactions_events.0111.join_wars + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + #Ask for provisions + option = { + name = ep3_interactions_events.0111.e + trigger = { + scope:recipient.domicile.provisions < scope:recipient.domicile.max_provisions + } + save_scope_value_as = { + name = negotiation_offer + value = flag:provisions + } + custom_tooltip = ep3_interactions_events.0111.actor_decides + show_as_tooltip = { + scope:recipient.domicile = { + change_provisions = { + value = { + value = 0 + add = scope:recipient.domicile.max_provisions + subtract = scope:recipient.domicile.provisions + } + } + } + } + scope:actor = { + trigger_event = ep3_interactions_events.0112 + } + custom_tooltip = ep3_interactions_events.0111.join_wars + ai_chance = { + base = 100 + modifier = { + scope:recipient.domicile.provisions = scope:recipient.domicile.max_provisions + factor = 0 + } + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Refuse + option = { + name = ep3_interactions_events.0111.f + scope:actor = { + send_interface_toast = { + left_icon = scope:actor + right_icon = scope:recipient + title = ep3_interactions_events.0111.refuse + scope:actor = { + add_opinion = { + target = scope:recipient + modifier = rejected_hiring_as_mercenaries + } + } + } + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +#actor has to respond to the laamp offer +ep3_interactions_events.0112 = { + type = letter_event + opening = ep3_interactions_events.0112.opening + desc = { + desc = ep3_interactions_events.0112.desc + first_valid = { + triggered_desc = { + trigger = { scope:negotiation_offer = flag:land } + desc = ep3_interactions_events.0112.desc_land + } + triggered_desc = { + trigger = { scope:negotiation_offer = flag:artifact } + desc = ep3_interactions_events.0112.desc_artifact + } + triggered_desc = { + trigger = { scope:negotiation_offer = flag:alliance } + desc = ep3_interactions_events.0112.desc_alliance + } + triggered_desc = { + trigger = { scope:negotiation_offer = flag:provisions } + desc = ep3_interactions_events.0112.desc_provisions + } + triggered_desc = { + trigger = { scope:negotiation_offer = flag:contact_list } + desc = ep3_interactions_events.0112.desc_contact_list + } + } + } + sender = scope:recipient + + #Accept + option = { + name = ep3_interactions_events.0112.a + scope:actor = { + pay_treasury_or_gold = { + target = scope:recipient + value = ep3_hire_laamp_mercs_cost_value + } + add_to_variable_list = { + name = hired_mercenaries + target = scope:recipient + } + } + switch = { + trigger = scope:negotiation_offer + flag:land = { + # Determine hierarchy + ep3_become_landed_save_liege_effect = { + TITLE_GIVER = scope:actor + ALWAYS_INDEPENDENT = no + TITLE_LIST = purchased_titles + } + # Resolve title, liege, government changes + ep3_become_landed_transfer_effect = { + TITLE_RECEIVER = scope:recipient + TITLE_LIST = purchased_titles + TYPE = granted + REASON = flag:purchased + } + # Extra purchase land specific + scope:actor = { + stress_impact = { + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_loss + } + } + # Effects on land giver + scope:actor = { add_legitimacy = -15 } + # Messages for nearby players + create_landed_ruler_message_effect = { + LANDED = scope:recipient + FLAVOR_CHAR = scope:actor + FLAVOR_TITLE = scope:new_primary_title + REASON = flag:purchased + } + } + flag:artifact = { + scope:actor_artifact = { + set_owner = scope:recipient + } + } + flag:alliance = { + scope:actor = { + create_alliance = { + target = scope:recipient + allied_through_owner = scope:actor + allied_through_target = scope:recipient + } + } + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = event_negotiated_alliance_opinion + } + } + } + flag:provisions = { + scope:recipient = { + domicile = { + change_provisions = { + value = { + value = 0 + add = scope:recipient.domicile.max_provisions + subtract = scope:recipient.domicile.provisions + } + } + } + } + scope:actor = { + remove_short_term_gold = minor_gold_value + } + } + flag:contact_list = { + scope:recipient = { + add_contact = scope:actor + } + } + } + every_in_list = { + list = join_as_attacker + add_attacker = scope:recipient + } + every_in_list = { + list = join_as_defender + add_defender = scope:recipient + } + scope:recipient = { + add_character_flag = joined_as_mercenary + } + + ai_chance = { + base = 4 + modifier = { # Land is foreign + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = 10 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + culture != scope:recipient.culture + } + add = 10 + } + } + } + max = 30 + } + scope:negotiation_offer = flag:land + } + modifier = { # Different faith + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = 10 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = 10 + } + } + } + max = 30 + } + scope:negotiation_offer = flag:land + } + modifier = { # My culture's lands + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = -15 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = -15 + } + } + } + if = { + limit = { scope:acceptance != 0 } + divide = scope:acceptance + } + min = -50 + } + scope:negotiation_offer = flag:land + scope:recipient.culture = { + save_temporary_scope_value_as = { + name = acceptance + value = { + value = "cultural_acceptance(scope:actor.culture)" + divide = 25 + ceiling = yes + } + } + } + } + modifier = { # My faith's lands + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = -15 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = -15 + } + } + } + if = { + limit = { scope:hostility != 0 } + multiply = scope:hostility + } + min = -50 + } + scope:negotiation_offer = flag:land + scope:recipient.faith = { + save_temporary_scope_value_as = { + name = hostility + value = "faith_hostility_level(scope:actor.faith)" + } + } + } + modifier = { + factor = 0 + scope:negotiation_offer = flag:provisions + scope:actor = { + short_term_gold < minor_gold_value + } + } + modifier = { + factor = 0 + scope:recipient = { + is_ai = yes + NOR = { + current_military_strength < 1000 # You can do better + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + NOR = { + AND = { + has_character_modifier = ep3_lust_for_land_modifier + ai_greed >= 25 + ai_boldness >= 25 + ai_rationality <= -25 + } + AND = { + has_trait = greedy + ai_rationality <= -50 + } + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + } + } + } + } + #Refuse + option = { + name = ep3_interactions_events.0112.b + scope:recipient = { + send_interface_message = { + type = event_diplomacy_bad + title = ep3_interactions_events.0112.refuse + left_icon = scope:actor + add_opinion = { + target = scope:actor + modifier = insulted_opinion + } + } + } + ai_chance = { + base = 1 + } + } + + #Use a Hook to force it through + option = { + name = ep3_interactions_events.0112.c + trigger = { + has_strong_usable_hook = scope:recipient + scope:recipient = { + is_ai = yes + } + } + use_hook = scope:recipient + + every_in_list = { + list = join_as_attacker + add_attacker = scope:recipient + } + every_in_list = { + list = join_as_defender + add_defender = scope:recipient + } + scope:recipient = { + add_character_flag = joined_as_mercenary + } + ai_chance = { + base = 1000 + modifier = { + factor = 0 + OR = { + scope:actor = { + is_ai = no + } + scope:recipient = { + is_ai = no + } + } + } + } + } +} + +#event to pay off all laamp mercenaries for a war leader +ep3_interactions_events.0121 = { + type = letter_event + opening = ep3_interactions_events.0121.opening + desc = ep3_interactions_events.0121.desc + sender = scope:laamp + + trigger = { + any_in_list = { + list = laamp_mercenaries + is_alive = yes + } + } + + immediate = { + ordered_in_list = { + list = laamp_mercenaries + limit = { + is_alive = yes + } + order_by = { + save_temporary_scope_as = char_temp + add = "scope:war.war_contribution(scope:char_temp)" + } + save_scope_as = laamp + } + save_scope_value_as = { + name = war_contribution_value + value = "scope:war.war_contribution(scope:laamp)" + } + } + + #Accept + option = { + name = ep3_interactions_events.0121.a + save_scope_value_as = { + name = next_payment + value = flag:accept + } + every_in_list = { + list = laamp_mercenaries + limit = { + is_alive = yes + } + save_temporary_scope_as = laamp_temp + scope:employer = { + pay_treasury_or_gold = { + target = prev + value = ep3_hire_laamp_mercs_payment_value + } + } + if = { + limit = { + is_ai = no + } + trigger_event = ep3_interactions_events.0122 + } + if = { + limit = { + NOT = { is_contact_of = scope:laamp } + } + scope:laamp = { + add_contact = root + } + } + } + + ai_chance = { + base = 100 + } + } + #Accept, but give them less gold + option = { + name = ep3_interactions_events.0121.b + save_scope_value_as = { + name = next_payment + value = flag:pay_less + } + every_in_list = { + list = laamp_mercenaries + limit = { + is_alive = yes + } + save_temporary_scope_as = laamp_temp + save_scope_value_as = { + name = war_contribution_value + value = "scope:war.war_contribution(scope:laamp_temp)" + } + scope:employer = { + pay_treasury_or_gold = { + target = prev + value = { + add = ep3_hire_laamp_mercs_payment_value + divide = 2 + } + } + } + add_opinion = { + modifier = laamp_skimmed_opinion + target = scope:employer + } + if = { + limit = { + can_add_hook = { + target = scope:employer + type = indebted_hook + } + } + add_hook = { + type = indebted_hook + target = scope:employer + } + } + if = { + limit = { + is_ai = no + } + trigger_event = ep3_interactions_events.0122 + } + if = { + limit = { + NOT = { is_contact_of = scope:laamp } + } + scope:laamp = { + add_contact = root + } + } + } + ai_chance = { + base = 0 + modifier = { + add = 20 + has_trait = greedy + } + modifier = { + add = 100 + short_term_gold < minor_gold_value + } + } + } + + #Refuse + option = { + name = ep3_interactions_events.0121.c + save_scope_value_as = { + name = next_payment + value = flag:refuse + } + every_in_list = { + list = laamp_mercenaries + limit = { + is_alive = yes + } + progress_towards_rival_effect = { + REASON = rival_unpayed_laamp + CHARACTER = scope:employer + OPINION = -100 + } + if = { + limit = { + can_add_hook = { + target = scope:employer + type = strong_favor_hook + } + } + add_hook = { + type = strong_favor_hook + target = scope:employer + } + } + if = { + limit = { + is_ai = no + } + trigger_event = ep3_interactions_events.0122 + } + } + ai_chance = { + base = 0 + #refuse only if you don't have gold + modifier = { + add = 100 + short_term_gold < minor_gold_value + } + #and none of the mercenaries are human players + modifier = { + factor = 0 + any_in_list = { + list = laamp_mercenaries + is_ai = no + } + } + } + } +} + +#event to inform laamp mercenaries if they got payed +ep3_interactions_events.0122 = { + type = letter_event + opening = ep3_interactions_events.0122.opening + desc = { + desc = ep3_interactions_events.0122.desc + first_valid = { + triggered_desc = { + trigger = { scope:next_payment = flag:accept } + desc = ep3_interactions_events.0122.desc_accept + } + triggered_desc = { + trigger = { scope:next_payment = flag:pay_less } + desc = ep3_interactions_events.0122.desc_pay_less + } + triggered_desc = { + trigger = { scope:next_payment = flag:refuse } + desc = ep3_interactions_events.0122.desc_not_pay + } + } + } + sender = scope:employer + + immediate = { + #set scope for the ep3_hire_laamp_mercs_payment_value scripted value to work + save_scope_as = laamp_temp + save_scope_value_as = { + name = war_contribution_value + value = "scope:war.war_contribution(scope:laamp_temp)" + } + switch = { + trigger = scope:next_payment + flag:accept = { + show_as_tooltip = { + scope:employer = { + pay_treasury_or_gold = { + target = prev + value = ep3_hire_laamp_mercs_payment_value + } + } + } + } + flag:pay_less = { + show_as_tooltip = { + scope:employer = { + pay_treasury_or_gold = { + target = prev + value = { + add = ep3_hire_laamp_mercs_payment_value + divide = 2 + } + } + } + add_opinion = { + modifier = laamp_skimmed_opinion + target = scope:employer + } + if = { + limit = { + can_add_hook = { + target = scope:employer + type = indebted_hook + } + } + add_hook = { + type = indebted_hook + target = scope:employer + } + } + } + + } + flag:refuse = { + show_as_tooltip = { + if = { + limit = { + can_add_hook = { + target = scope:employer + type = strong_favor_hook + } + } + add_hook = { + type = strong_favor_hook + target = scope:employer + } + } + } + } + } + if = { + limit = { + scope:employer = { + NOT = { is_contact_of = root } + } + } + add_contact = scope:employer + } + } + + option = { + name = { + trigger = { scope:next_payment = flag:accept } + text = ep3_interactions_events.0122.a + } + name = { + trigger = { scope:next_payment = flag:pay_less } + text = ep3_interactions_events.0122.b + } + name = { + trigger = { scope:next_payment = flag:refuse } + text = ep3_interactions_events.0122.c + } + } +} + +# Admin - Request Support Interaction +# Accepted notification event +ep3_interactions_events.0201 = { + type = letter_event + opening = ep3_interactions_events.0201.opening + desc = ep3_interactions_events.0201.desc + sender = scope:recipient + + immediate = { + show_as_tooltip = { + scope:target = { + change_appointment_investment = { + target = scope:secondary_recipient + investor = scope:recipient + value = scope:request_support_score + } + } + } + } + + option = { + name = ep3_interactions_events.0201.a + } +} + +# Refused notification event +ep3_interactions_events.0202 = { + type = letter_event + opening = ep3_interactions_events.0202.opening + desc = ep3_interactions_events.0202.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0202.a + } +} + +# Accepted Coax to War interaction +ep3_interactions_events.0210 = { + type = letter_event + opening = ep3_interactions_events.0210.opening + desc = ep3_interactions_events.0210.desc + sender = scope:recipient + + immediate = { + show_as_tooltip = { + scope:recipient = { + change_influence = { + value = massive_influence_gain + multiply = 2 + } + start_war = { + cb = influence_war_cb + target = scope:secondary_recipient + claimant = scope:recipient.top_liege + target_title = scope:target + } + custom_tooltip = frontier_influence_war_interaction_target_title_tt + } + } + } + + option = { + name = ep3_interactions_events.0210.a + } +} + +# Declined Coax to War interaction +ep3_interactions_events.0211 = { + type = letter_event + opening = { + desc = yearly.1020.opening + desc = ep3_interactions_events.0211.opening + } + desc = ep3_interactions_events.0211.desc + sender = scope:recipient + + immediate = { + show_as_tooltip = { + change_influence = { + value = massive_influence_gain + } + reverse_add_opinion = { + modifier = refused_summons_to_war_opinion + target = scope:actor + } + } + } + + option = { + name = ep3_interactions_events.0211.a + } +} + +# Adoption accepted +ep3_interactions_events.0400 = { + type = letter_event + opening = ep3_interactions_events.0400.opening + desc = ep3_interactions_events.0400.desc + sender = scope:recipient + + immediate = { + noble_family_adoption_effect = { + ADOPTEE = scope:recipient + ADOPTER = scope:actor + } + create_character_memory = { + type = noble_family_adopted + participants = { adoptee = scope:recipient } + } + scope:new_memory = { + set_variable = { + name = adopted_house + value = scope:actor.house + } + } + scope:recipient = { + create_character_memory = { + type = was_noble_family_adopted + participants = { house_head = scope:actor } + } + scope:new_memory = { + set_variable = { + name = adopted_house + value = scope:actor.house + } + } + } + } + + option = { + name = ep3_interactions_events.0400.a + } + + after = { + if = { + limit = { exists = var:adopted_house } # Error suppression + } + } +} + +# Raid Remit accepted +ep3_interactions_events.0421 = { + type = letter_event + opening = ep3_interactions_events.0421.opening + desc = ep3_interactions_events.0421.desc + sender = scope:recipient + + immediate = { + scope:actor = { + set_variable = { + name = raid_estate_permission + value = scope:secondary_recipient.house + } + if = { + limit = { scope:gold = yes } + pay_short_term_gold = { + target = scope:recipient + gold = scope:actor.minor_gold_value + } + } + } + } + + option = { + name = ep3_interactions_events.0421.a + scope:recipient = { custom_tooltip = request_raid_remit_interaction_effect_tt } + } + + after = { + if = { + limit = { exists = var:adopted_house } # Error suppression + } + } +} + +# Eviction events +ep3_interactions_events.0500 = { + type = letter_event + opening = ep3_interactions_events.0500.opening + desc = ep3_interactions_events.0500.desc + sender = scope:actor + + trigger = { is_ai = no } + + option = { + name = ep3_interactions_events.0500.a + trigger = { + custom_tooltip = { + text = ep3_interactions_events.0500.a.tt.need_soldiers + current_military_strength >= ep3_interactions_events_0500_troops_count_value + } + } + show_as_unavailable = { always = yes } + custom_description_no_bullet = { + text = evict_adventurer_consequences_tt + object = scope:recipient + subject = scope:actor + } + custom_tooltip = evict_adventurer_casus_belli_tt + show_as_tooltip = { + reverse_add_opinion = { + target = scope:actor + modifier = eviction_ignored_opinion + } + } + } + + option = { + name = ep3_interactions_events.0500.b + trigger = { + current_military_strength < ep3_interactions_events_0500_troops_count_value + } + custom_description_no_bullet = { + text = evict_adventurer_consequences_tt + object = scope:recipient + subject = scope:actor + } + custom_tooltip = evict_adventurer_forced_tt + custom_tooltip = evict_adventurer_forced_tt.part_2 + show_as_tooltip = { + reverse_add_opinion = { + target = scope:actor + modifier = eviction_ignored_opinion + } + } + } + + after = { trigger_event = ep3_interactions_events.0502 } +} + +ep3_interactions_events.0501 = { + hidden = yes + type = character_event + + trigger = { + var:adventurer_expeller ?= { + is_alive = yes + is_landed = yes + save_temporary_scope_as = expeller_temp + } + is_alive = yes + government_has_flag = government_is_landless_adventurer + domicile.domicile_location.county.holder ?= { + OR = { + scope:expeller_temp ?= this + any_liege_or_above = { scope:expeller_temp ?= this } + } + } + NOR = { + is_at_war_with = var:adventurer_expeller + is_spouse_of = var:adventurer_expeller + has_relation_friend = var:adventurer_expeller + has_relation_lover = var:adventurer_expeller + } + } + + immediate = { + save_scope_as = adventurer + var:adventurer_expeller = { + save_scope_as = expeller + send_interface_message = { + type = msg_landless_adventurer_expulsion_consequences + title = expel_adventurer_consequences_title + left_icon = scope:adventurer + scope:adventurer = { + send_interface_message = { + type = msg_landless_adventurer_expulsion_consequences_adventurer + title = expel_adventurer_consequences_title + left_icon = scope:expeller + custom_tooltip = evict_adventurer_casus_belli_tt + reverse_add_opinion = { + target = scope:expeller + modifier = eviction_ignored_opinion + } + } + } + } + if = { + limit = { + is_ai = yes + is_character_interaction_valid = { + recipient = scope:adventurer + interaction = imprison_interaction + } + scope:adventurer = { + NOT = { + current_travel_plan ?= { + is_travel_with_domicile = yes + final_destination_province.county.holder = { + OR = { + this = scope:expeller + any_liege_or_above = { this = scope:expeller } + } + } + } + } + } + } + run_interaction = { + interaction = imprison_interaction + actor = scope:expeller + recipient = scope:adventurer + execute_threshold = decline + } + } + } + remove_variable = adventurer_expeller + trigger_event = ep3_interactions_events.0502 + } +} + +ep3_interactions_events.0502 = { + hidden = yes + type = character_event + + trigger = { is_ai = yes } + + immediate = { + save_scope_as = adventurer + random_list = { + 10 = { # Stay + trigger = { current_military_strength > scope:expeller.military_strength_25_percent_value } + modifier = { + add = { + value = current_strength_with_allies_value + multiply = 0.1 + } + } + modifier = { + scope:expeller = { + any_held_title = { + any_claimant = { this = scope:adventurer } + } + } + factor = 2 + } + opinion_modifier = { + who = scope:expeller + opinion_target = root + multiplier = -0.2 + } + } + 10 = { # Leave + modifier = { + add = { + value = scope:expeller.current_strength_with_allies_value + multiply = 0.1 + } + } + scope:expeller = { + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + NOR = { + has_imprisonment_reason = scope:adventurer + has_execute_reason = scope:adventurer + has_banish_reason = scope:adventurer + } + } + save_scope_as = destination_realm_owner + } + } + start_travel_plan = { + destination = scope:destination_realm_owner.capital_province + return_trip = no + } + } + } + } +} + +scripted_trigger ep3_interactions_events_0600_nice_option_trigger = { + scope:supporter = { + is_ruler = yes + } + NOT = { + is_allied_to = scope:supporter + } + OR = { + has_relation_friend = scope:supporter + has_relation_lover = scope:supporter + has_relation_soulmate = scope:supporter + has_trait = loyal + has_trait = schemer + has_trait = diplomat + AND = { + has_trait = governor + has_trait_xp = { + trait = governor + value >= 75 + } + } + } +} + +scripted_trigger ep3_interactions_events_0600_hate_option_trigger = { + scope:supporter = { + is_ruler = yes + } + NOR = { + is_allied_to = scope:supporter + has_relation_friend = scope:supporter + has_relation_potential_friend = scope:supporter + has_relation_best_friend = scope:supporter + has_trait = loyal + } + OR = { + has_relation_potential_rival = scope:supporter + has_relation_rival = scope:supporter + has_relation_nemesis = scope:supporter + has_trait = disloyal + has_trait = arrogant + has_trait = arbitrary + has_trait = paranoid + has_trait = fickle + has_trait = wrathful + } +} + +scripted_effect ep3_interactions_events_0601_ally_success = { + custom_tooltip = negotiate_alliance_effect_tooltip + create_alliance = { + target = scope:supporter + allied_through_owner = scope:new_landed_admin + allied_through_target = scope:supporter + } + scope:supporter = { + add_hook = { + type = favor_hook + target = scope:new_landed_admin + } + } + add_hook = { + type = favor_hook + target = scope:supporter + } + reverse_add_opinion = { + target = scope:supporter + modifier = trust_opinion + opinion = 25 + } + random_list = { + 66 = { + increase_governance_effect = { VALUE = 10 } + } + 33 = { + trigger = { + NOT = { + has_trait = loyal + } + } + add_trait = loyal + } + } +} + +scripted_effect ep3_interactions_events_0601_ally_fail = { + reverse_add_opinion = { + target = scope:supporter + modifier = disappointed_opinion + opinion = -25 + } +} + +scripted_effect ep3_interactions_events_0601_insult = { + change_influence = medium_influence_gain + add_prestige = minor_prestige_gain + if = { + limit = { + has_trait = disloyal + } + add_piety = minor_piety_loss + } + else = { add_trait = disloyal } + if = { + limit = { + scope:supporter = { + can_set_relation_rival_trigger = { CHARACTER = scope:new_landed_admin } + } + } + set_relation_rival = { + target = scope:supporter + reason = rival_ignored_candidacy_support + } + } + else_if = { + limit = { + scope:supporter = { + can_set_relation_nemesis_trigger = { CHARACTER = scope:new_landed_admin } + } + } + set_relation_nemesis = { + target = scope:supporter + reason = rival_ignored_candidacy_support + } + } + else = { + reverse_add_opinion = { + modifier = hate_opinion + target = scope:supporter + opinion = -50 + } + + } +} + +scripted_effect ep3_interactions_events_0601_hook = { + random_list = { + 75 = { + increase_governance_effect = { VALUE = 10 } + } + 25 = { + trigger = { + NOT = { + has_trait = loyal + } + } + add_trait = loyal + } + } + reverse_add_opinion = { + target = scope:supporter + modifier = trust_opinion + opinion = 30 + } + scope:supporter = { + add_hook = { + type = loyalty_hook + target = scope:new_landed_admin + } + } +} + +scripted_effect ep3_interactions_events_0601_friendship = { + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:supporter} + } + progress_towards_friend_effect = { + REASON = friend_supported_candidacy + CHARACTER = scope:supporter + OPINION = 10 + } + } + else = { + reverse_add_opinion = { + modifier = friendliness_opinion + target = scope:supporter + opinion = 30 + } + } + change_influence = minor_influence_loss +} + +scripted_effect ep3_interactions_events_0601_gift = { + change_influence = minor_influence_gain + pay_short_term_gold = { + target = scope:supporter + gold = medium_gold_value + } +} + +scripted_effect ep3_interactions_events_0601_ignore = { + progress_towards_rival_effect = { + REASON = rival_ignored_candidacy_support + CHARACTER = scope:supporter + OPINION = 0 + } + reverse_add_opinion = { + target = scope:supporter + modifier = disrespect_opinion + opinion = -20 + } +} + +# You used promote candidate on someone and they got the title! Time to reward top contributor +ep3_interactions_events.0600 = { + type = character_event + title = ep3_interactions_events.0600.t + desc = ep3_interactions_events.0600.desc + theme = administrative + override_background = { + trigger = { + scope:supporter = { + primary_title = { + this = title:e_byzantium + } + } + } + reference = ep3_byzantium_throneroom + } + override_background = { + trigger = { + scope:supporter = { + primary_title = { + NOT = { this = title:e_byzantium } + } + } + } + reference = ep3_byzantine_feast + } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + character = scope:supporter + animation = happiness + } + + immediate = { + primary_title = { + ordered_succession_appointment_investors = { + candidate = root + value >= 20 + limit = { + NOT = { + house ?= root.house + } + is_alive = yes + is_imprisoned = no + NOR = { + has_relation_rival = root + is_at_war_with = root + } + } + save_scope_as = supporter + } + } + if = { + limit = { + NOT = { + exists = scope:new_landed_admin + } + } + save_scope_as = new_landed_admin + } + } + + #Let's be allies! + option = { + name = ep3_interactions_events.0600.a + trigger = { + ep3_interactions_events_0600_nice_option_trigger = yes + } + scope:supporter = { + save_scope_as = recipient + } + + if = { + limit = { + scope:supporter = { + is_ai = yes + } + } + duel = { + skills = { diplomacy intrigue } + target = scope:supporter + 75 = { #Being allies sounds cool + desc = ep3_interactions_events.0600.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -74 + } + modifier = { + scope:supporter = { + opinion = { + target = root + value >= 40 + } + } + add = 50 + } + modifier = { + scope:supporter = { + opinion = { + target = root + value >= 80 + } + } + add = 50 + } + modifier = { + scope:supporter = { + highest_held_title_tier <= tier_duchy + } + highest_held_title_tier >= tier_kingdom + add = 75 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_interactions_events.0600.a.success + left_icon = scope:supporter + + show_as_tooltip = { + ep3_interactions_events_0601_ally_success = yes + } + add_character_flag = { + flag = supporter_response_ally_success + days = 30 + } + } + } + 25 = { #Ah shit, he mad + desc = ep3_interactions_events.0600.a.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -24 + } + modifier = { + scope:supporter = { + is_liege_or_above_of = root + } + add = 50 + } + modifier = { + scope:supporter ={ + opinion = { + target = root + value < 0 + } + } + add = 50 + } + modifier = { + scope:supporter ={ + opinion = { + target = root + value < -40 + } + } + add = 50 + } + modifier = { + scope:supporter ={ + opinion = { + target = root + value < -80 + } + } + add = 50 + } + modifier = { + scope:supporter = { + highest_held_title_tier >= tier_kingdom + } + highest_held_title_tier <= tier_duchy + add = 75 + } + min = 5 + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_interactions_events.0600.a.fail + left_icon = scope:supporter + + show_as_tooltip = { + ep3_interactions_events_0601_ally_fail = yes + } + add_character_flag = { + flag = supporter_response_ally_fail + days = 30 + } + } + } + } + } + else = { + custom_tooltip = player_supporter_agree_tt + custom_tooltip = negotiate_alliance_effect_tooltip + show_as_tooltip = { + ep3_interactions_events_0601_ally_success = yes + } + add_character_flag = { + flag = supporter_response_ally_player + days = 30 + } + } + stress_impact = { + trusting = medium_stress_impact_loss + ambitious = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + fickle = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_sociability = 1 + } + modifier = { + add = 50 + has_trait = trusting + } + modifier = { + add = -100 + OR = { + AND = { + diplomacy <= mediocre_skill_rating + intrigue <= mediocre_skill_rating + } + diplomacy < low_skill_rating + intrigue < low_skill_rating + } + } + modifier = { + add = 100 + OR = { + AND = { + diplomacy >= decent_skill_rating + intrigue >= decent_skill_rating + } + diplomacy >= very_high_skill_rating + intrigue >= very_high_skill_rating + } + } + modifier = { + add = -100 + opinion = { + target = scope:supporter + value <= 0 + } + } + modifier = { + add = -100 + reverse_opinion = { + target = scope:supporter + value <= 0 + } + } + modifier = { + add = 100 + opinion = { + target = scope:supporter + value >= 60 + } + } + modifier = { + add = 100 + reverse_opinion = { + target = scope:supporter + value >= 60 + } + } + modifier = { + add = -100 + OR = { + AND = { + scope:supporter = { + highest_held_title_tier >= tier_kingdom + } + highest_held_title_tier <= tier_duchy + } + AND = { + scope:supporter = { + highest_held_title_tier <= tier_duchy + } + highest_held_title_tier >= tier_kingdom + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + has_trait = fickle + has_trait = arbitrary + AND = { + diplomacy <= low_skill_rating + intrigue <= low_skill_rating + } + opinion = { + target = scope:supporter + value <= -40 + } + reverse_opinion = { + target = scope:supporter + value <= -40 + } + } + } + } + } + + #I really hate that bastard + option = { + trigger = { + ep3_interactions_events_0600_hate_option_trigger = yes + } + name = ep3_interactions_events.0600.b + flavor = ep3_interactions_events.0600.b.flavor + + show_as_tooltip = { + ep3_interactions_events_0601_insult = yes + } + add_character_flag = { + flag = supporter_response_insult + days = 30 + } + stress_impact = { + arrogant = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + fickle = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_gain + trusting = medium_stress_impact_gain + generous = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + modifier = { + add = 50 + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = fickle + has_trait = arbitrary + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value <= -50 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value <= -90 + } + } + modifier = { + add = -100 + opinion = { + target = scope:supporter + value >= 30 + } + } + modifier = { + add = -100 + scope:supporter = { + highest_held_title_tier >= tier_kingdom + } + highest_held_title_tier <= tier_duchy + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = trusting + has_trait = generous + has_trait = compassionate + opinion = { + target = scope:supporter + value >= 60 + } + } + } + } + } + + #Give him a hook + option = { + name = ep3_interactions_events.0600.c + flavor = ep3_interactions_events.0600.c.flavor + trigger = { + ep3_interactions_events_0600_nice_option_trigger = no + scope:supporter = { + can_add_hook = { + target = root + type = loyalty_hook + } + } + } + show_as_tooltip = { + ep3_interactions_events_0601_hook = yes + } + add_character_flag = { + flag = supporter_response_hook + days = 30 + } + stress_impact = { + trusting = minor_stress_impact_loss + generous = minor_stress_impact_loss + just = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + fickle = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_greed = -1 + } + modifier = { + add = 50 + OR = { + has_trait = trusting + has_trait = generous + has_trait = just + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value < 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value < -25 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value >= 90 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value >= 50 + } + } + modifier = { + add = -100 + scope:supporter = { + highest_held_title_tier <= tier_duchy + } + highest_held_title_tier >= tier_kingdom + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + has_trait = fickle + has_trait = arbitrary + has_trait = greedy + has_trait = ambitious + opinion = { + target = scope:supporter + value < -50 + } + } + } + } + } + + #Be his friend (aww) + option = { + trigger = { + ep3_interactions_events_0600_hate_option_trigger = no + } + name = ep3_interactions_events.0600.d + + show_as_tooltip = { + ep3_interactions_events_0601_friendship = yes + } + add_character_flag = { + flag = supporter_response_friendship + days = 30 + } + stress_impact = { + compassionate = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + callous = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + add = 50 + OR = { + has_trait = trusting + has_trait = generous + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value < 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value < -25 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value >= 90 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value >= 50 + } + } + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = callous + has_trait = fickle + opinion = { + target = scope:supporter + value < -50 + } + influence <= minor_influence_value + } + } + } + } + + #Send some gold + option = { + name = ep3_interactions_events.0600.e + show_as_tooltip = { + ep3_interactions_events_0601_gift = yes + } + add_character_flag = { + flag = supporter_response_gift + days = 30 + } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 1 + } + modifier = { + add = 50 + OR = { + has_trait = trusting + has_trait = generous + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value < -25 + } + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_gold <= medium_gold_value + } + } + } + } + + #I don't owe this guy shit + option = { + name = ep3_interactions_events.0600.f + show_as_tooltip = { + ep3_interactions_events_0601_ignore = yes + } + add_character_flag = { + flag = supporter_response_ignore + days = 30 + } + + stress_impact = { + arrogant = minor_stress_impact_loss + fickle = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + trusting = minor_stress_impact_gain + generous = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_sociability = -0.5 + } + modifier = { + add = 50 + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = fickle + has_trait = arbitrary + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value <= -60 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value < 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value >= 30 + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value >= 60 + } + } + modifier = { + add = -100 + scope:supporter = { + highest_held_title_tier >= tier_kingdom + } + highest_held_title_tier <= tier_duchy + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = trusting + has_trait = generous + has_trait = humble + has_trait = gregarious + opinion = { + target = scope:supporter + value >= 60 + } + } + } + } + } + after = { + scope:supporter = { + trigger_event = ep3_interactions_events.0601 + } + } +} + +ep3_interactions_events.0601 = { + type = letter_event + opening = { + desc = ep3_interactions_events.0601.opening + } + desc = { + desc = ep3_interactions_events.0601.desc + first_valid = { + triggered_desc = { + trigger = { + scope:new_landed_admin = { + OR = { + has_character_flag = supporter_response_insult + has_character_flag = supporter_response_ignore + } + } + } + desc = ep3_interactions_events.0601.desc_scorn + } + desc = ep3_interactions_events.0601.desc_repay + } + + first_valid = { + triggered_desc = { + trigger = { + scope:new_landed_admin = { + OR = { + has_character_flag = supporter_response_ally_success + has_character_flag = supporter_response_ally_fail + has_character_flag = supporter_response_ally_player + } + } + } + desc = ep3_interactions_events.0601.desc_ally + } + triggered_desc = { + trigger = { + scope:new_landed_admin = { + has_character_flag = supporter_response_insult + } + } + desc = ep3_interactions_events.0601.desc_insult + } + triggered_desc = { + trigger = { + scope:new_landed_admin = { + has_character_flag = supporter_response_hook + } + } + desc = ep3_interactions_events.0601.desc_hook + } + triggered_desc = { + trigger = { + scope:new_landed_admin = { + has_character_flag = supporter_response_friendship + } + } + desc = ep3_interactions_events.0601.desc_friendship + } + triggered_desc = { + trigger = { + scope:new_landed_admin = { + has_character_flag = supporter_response_gift + } + } + desc = ep3_interactions_events.0601.desc_gift + } + desc = ep3_interactions_events.0601.desc_ignore + } + } + sender = scope:new_landed_admin + + immediate = { + #How did the new ruler reply? + scope:new_landed_admin = { + if = { + limit = { + has_character_flag = supporter_response_ally_success + } + ep3_interactions_events_0601_ally_success = yes + } + else_if = { + limit = { + has_character_flag = supporter_response_ally_fail + } + ep3_interactions_events_0601_ally_fail = yes + } + else_if = { + limit = { + has_character_flag = supporter_response_insult + } + ep3_interactions_events_0601_insult = yes + } + else_if = { + limit = { + has_character_flag = supporter_response_hook + } + ep3_interactions_events_0601_hook = yes + add_opinion = { + target = scope:supporter + modifier = trust_opinion + opinion = 10 + } + } + else_if = { + limit = { + has_character_flag = supporter_response_friendship + } + ep3_interactions_events_0601_friendship = yes + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:supporter} + } + add_opinion = { + modifier = friendliness_opinion + target = scope:supporter + opinion = 10 + } + } + else = { + add_opinion = { + modifier = friendliness_opinion + target = scope:supporter + opinion = 30 + } + } + } + + else_if = { + limit = { + has_character_flag = supporter_response_gift + } + ep3_interactions_events_0601_gift = yes + } + else_if = { + limit = { + has_character_flag = supporter_response_ignore + } + ep3_interactions_events_0601_ignore = yes + add_opinion = { + target = scope:supporter + modifier = disrespect_opinion + opinion = -10 + } + } + } + } + + #Yep + option = { + name = { + trigger = { + scope:new_landed_admin = { + NOR = { + has_character_flag = supporter_response_insult + has_character_flag = supporter_response_ignore + } + } + } + text = ep3_interactions_events.0601.a_repaid + } + name = { + trigger = { + scope:new_landed_admin = { + OR = { + has_character_flag = supporter_response_insult + has_character_flag = supporter_response_ignore + } + } + } + text = ep3_interactions_events.0601.a_scorned + } + if = { + limit = { + scope:new_landed_admin = { + has_character_flag = supporter_response_ally_player + } + } + scope:new_landed_admin = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_interactions_events.0600.a.success + left_icon = scope:supporter + + ep3_interactions_events_0601_ally_success = yes + } + } + reverse_add_opinion = { + modifier = trust_opinion + target = scope:new_landed_admin + opinion = 25 + } + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + } + } + + #No thanks + option = { + trigger = { + scope:new_landed_admin = { + has_character_flag = supporter_response_ally_player + } + } + name = ep3_interactions_events.0601.b + scope:new_landed_admin = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_interactions_events.0600.a.fail + left_icon = scope:supporter + + ep3_interactions_events_0601_ally_fail = yes + } + } + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:new_landed_admin + opinion = -25 + } + + stress_impact = { + trusting = minor_stress_impact_gain + generous = minor_stress_impact_gain + just = minor_stress_impact_gain + } + } +} + +# You are an adventurer who just got granted a landless admin estate! +ep3_interactions_events.0610 = { + type = character_event + title = ep3_interactions_events.0610.t + desc = { + desc = ep3_interactions_events.0610.desc + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + this = scope:emperor + } + } + desc = ep3_interactions_events.0610.desc_emperor + } + desc = ep3_interactions_events.0610.desc_governor + } + triggered_desc = { + trigger = { + root = { + has_character_flag = procure_estate_conversion + } + } + desc = ep3_interactions_events.0610.desc_conversion + } + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + this = scope:emperor + } + } + desc = ep3_interactions_events.0610.desc_emperor_outro + } + desc = ep3_interactions_events.0610.desc_non_governor_outro + } + } + #Triggered desc based on what you paid + #And if you converted + #Triggered desc based on whether recipient is emperor + theme = administrative + left_portrait = { + character = root + animation = survey + } + lower_right_portrait = scope:recipient + lower_center_portrait = { + character = scope:emperor + trigger = { + this != scope:recipient + } + } + override_background = { + reference = estate + } + + immediate = { + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_become_governor" + primary_title = { + ordered_succession_appointment_investors = { + candidate = root + limit = { + NOT = { + house ?= root.house + } + is_alive = yes + is_imprisoned = no + NOR = { + has_relation_rival = root + is_at_war_with = root + } + } + save_scope_as = supporter + } + } + if = { + limit = { + NOT = { + exists = scope:new_landed_admin + } + } + save_scope_as = new_landed_admin + } + if = { + limit = { + scope:recipient = { + top_liege != this + + } + } + scope:recipient.top_liege = { + save_scope_as = emperor + } + } + else = { + scope:recipient = { + save_scope_as = emperor + } + } + show_as_tooltip = { + get_title = primary_title + domicile = { + add_domicile_building = estate_main_01 + } + } + } + + #I'm a new kinda landless now + option = { + name = ep3_interactions_events.0610.a + } +} + +#You are turned down +ep3_interactions_events.0611 = { + type = letter_event + opening = { + desc = ep3_interactions_events.0611.opening + } + desc = ep3_interactions_events.0611.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0611.a + } +} + +ep3_interactions_events.0620 = { # Ask for Influence accepted letter + type = letter_event + opening = { + desc = ep3_interactions_events.0620.opening + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + faith.religion = { + this = religion:christianity_religion + } + } + desc = ep3_interactions_events.0620.desc_byz + } + desc = ep3_interactions_events.0620.desc + } + } + sender = scope:recipient + + immediate = { + show_as_tooltip = { ep3_hof_ask_for_influence_interaction_effect = yes } + } + + option = { + name = { + trigger = { + scope:actor = { + ai_zeal >= low_positive_ai_value + ai_greed < low_positive_ai_value + } + } + text = ep3_interactions_events.0620.a + } + name = { + trigger = { + scope:actor = { + ai_greed >= low_positive_ai_value + ai_zeal < low_positive_ai_value + } + } + text = ep3_interactions_events.0620.b + } + name = { + trigger = { + scope:actor = { + ai_greed < low_positive_ai_value + ai_zeal < low_positive_ai_value + } + } + text = ep3_interactions_events.0620.c + } + } +} + +ep3_interactions_events.0621 = { # Ask for Influence rejection letter event + type = letter_event + opening = { + desc = ep3_interactions_events.0621.opening + } + desc = ep3_interactions_events.0621.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0621.a + } +} + +# Governor is fired/retired - governor_removal_interaction +ep3_interactions_events.0630 = { + type = letter_event + opening = { + desc = ep3_interactions_events.0630.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:actor = { + exists = scope:recipient.house + house ?= { + this = scope:recipient.house + } + } + } + desc = ep3_interactions_events.0630.desc_family + } + triggered_desc = { + trigger = { + scope:actor = { + opinion = { + target = scope:recipient + value <= -50 + } + } + } + desc = ep3_interactions_events.0630.desc_spite + } + triggered_desc = { + trigger = { + scope:actor = { + opinion = { + target = scope:recipient + value >= 50 + } + } + } + desc = ep3_interactions_events.0630.desc_guilt + } + desc = ep3_interactions_events.0630.desc + } + } + sender = scope:actor + + immediate = { + } + + option = { + name = { + trigger = { + scope:actor = { + OR = { + ai_vengefulness >= low_positive_ai_value + opinion = { + target = scope:recipient + value <= -60 + } + } + } + } + text = ep3_interactions_events.0630.a + } + name = { + trigger = { + scope:actor = { + NOR = { + ai_vengefulness >= low_positive_ai_value + opinion = { + target = scope:recipient + value <= -60 + } + } + OR = { + ai_honor >= low_positive_ai_value + opinion = { + target = scope:recipient + value >= 60 + } + } + } + } + text = ep3_interactions_events.0630.b + } + name = { + trigger = { + scope:actor = { + NOR = { + ai_vengefulness >= low_positive_ai_value + opinion = { + target = scope:recipient + value <= -60 + } + ai_honor >= low_positive_ai_value + opinion = { + target = scope:recipient + value >= 60 + } + } + + } + } + text = ep3_interactions_events.0630.c + } + custom_tooltip = depose_governor_lose_titles_tt + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = demand_governor_resignation_accepted_toast + left_icon = scope:recipient + scope:recipient = { + governor_resignation_title_transfer_effect = yes + if = { + limit = { + scope:actor = { + has_realm_law_flag = celestial_retirement_law + } + tgp_is_above_retirement_age_trigger = { REALM_OWNER = scope:actor } + } + show_as_tooltip = { + scope:actor = { + if = { + limit = { has_treasury = yes } + pay_treasury_to_gold = { + target = scope:recipient + value = scope:force_retirement_treasury_cost + } + } + } + } + } + } + } + } + } +} + +# Faction War interactions +ep3_interactions_events.0800 = { # Join Faction War acceptance letter event + type = letter_event + opening = char_interaction.0001.opening + desc = ep3_interactions_events.0800.desc + sender = scope:recipient + + immediate = { + ep3_join_faction_war_effect = yes + } + + option = { + name = ep3_interactions_events.0800.a + } +} + +ep3_interactions_events.0801 = { # Join Faction War rejection letter event + type = letter_event + opening = char_interaction.0001.opening + desc = ep3_interactions_events.0801.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0801.a + } +} + +ep3_interactions_events.0810 = { # Switch Faction War Sides acceptance letter event + type = letter_event + opening = char_interaction.0001.opening + desc = ep3_interactions_events.0810.desc + sender = scope:recipient + + immediate = { + ep3_switch_faction_war_sides_effect = yes + } + + option = { + name = ep3_interactions_events.0810.a + } +} + +ep3_interactions_events.0811 = { # Switch Faction War Sides rejection letter event + type = letter_event + opening = char_interaction.0001.opening + desc = ep3_interactions_events.0811.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0811.a + } +} diff --git a/N3OW/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt b/N3OW/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt new file mode 100644 index 00000000..26ce7e17 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt @@ -0,0 +1,6578 @@ +namespace = ep3_story_cycle_admin_eunuch + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_event_trigger = { + scope:eunuch_temp ?= { + is_available = yes + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_save_scopes_effect = { + random_owned_story = { + type = story_cycle_admin_eunuch + save_scope_as = story + story_owner = { save_scope_as = emperor } + var:eunuch ?= { save_scope_as = eunuch } + var:admin_title ?= { save_scope_as = admin_title } + var:protege ?= { save_scope_as = protege } + var:student ?= { save_scope_as = student } + var:rival ?= { save_scope_as = rival } + var:seducer ?= { save_temporary_scope_as = seducer } + var:spouse ?= { save_temporary_scope_as = spouse } + var:puppet ?= { save_temporary_scope_as = puppet } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_realm_trigger = { + is_ai = no + highest_held_title_tier >= tier_empire + top_liege = this + government_allows = administrative + culture = { has_cultural_parameter = can_appoint_chief_eunuch } + NOR = { + has_diarchy_type = co_emperorship + any_owned_story = { type = story_cycle_admin_eunuch } + exists = primary_title.var:story_cycle_admin_eunuch_cooldown + } + NAND = { + has_active_diarchy = yes + is_ai = yes + diarch = { is_ai = no } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_eunuch_trigger = { + is_adult = yes + is_ruler = no + is_available = yes + is_healthy = yes + top_liege ?= root.top_liege + is_eunuch_trigger = yes + NOR = { + has_trait = content + has_trait = humble + has_trait = honest + has_relation_friend = root + has_relation_lover = root + } + trigger_if = { + limit = { exists = house } + house != root.top_liege.house + } + sum_of_all_skills_value >= 20 +} + +scripted_trigger ep3_story_cycle_admin_eunuch_noble_family_trigger = { + holder = { + top_liege = root.top_liege + house ?= { + this != root.top_liege.house + any_house_member = { + count >= 1 + ep3_story_cycle_admin_eunuch_valid_eunuch_trigger = yes + } + any_house_member = { + count >= 3 + top_liege = root.top_liege + is_eunuch_trigger = no + } + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_create_story_effect = { + create_story = { + type = story_cycle_admin_eunuch + save_scope_as = story + } + scope:story = { + set_variable = { name = eunuch value = scope:eunuch } + } + scope:eunuch = { + if = { + limit = { employer != root } + set_employer = root + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_save_origin_effect = { + random = { + chance = 50 + random_neighboring_top_liege_realm_owner = { save_scope_as = origin_liege } + } + if = { + limit = { NOT = { exists = scope:origin_liege } } + save_scope_as = origin_liege + } + scope:origin_liege ?= { + random_sub_realm_county = { + limit = { duchy != root.capital_county.duchy } + alternative_limit = { always = yes } + random = { + chance = 50 + random_neighboring_county = { + limit = { duchy != root.capital_county.duchy } + alternative_limit = { always = yes } + save_scope_as = origin + } + } + if = { + limit = { NOT = { exists = scope:origin } } + save_scope_as = origin + } + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_create_eunuch_effect = { + ep3_story_cycle_admin_eunuch_save_origin_effect = yes + hidden_effect = { + create_character = { + culture = scope:origin.culture + faith = root.faith + employer = root + gender = male + age = { + integer_range = { + min = 25 + max = 45 + } + } + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_low_skill + max_template_low_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + random_traits_list = { + count = 1 + education_diplomacy_3 = { weight = { base = 30 } } + education_stewardship_3 = { weight = { base = 30 } } + education_intrigue_3 = { weight = { base = 30 } } + education_diplomacy_4 = { weight = { base = 10 } } + education_stewardship_4 = { weight = { base = 10 } } + education_intrigue_4 = { weight = { base = 10 } } + } + random_traits_list = { + count = 1 + beardless_eunuch = { weight = { base = 90 } } + eunuch_1 = { weight = { base = 10 } } + } + random_traits_list = { + count = 3 + ambitious = {} + arrogant = {} + stubborn = {} + deceitful = {} + diligent = {} + callous = {} + greedy = {} + } + random_traits = yes + dynasty = none + save_scope_as = eunuch + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_create_family_children_effect = { + save_scope_value_as = { + name = count + value = { + value = { 2 3 } + round = yes + } + } + save_scope_value_as = { + name = min_age + value = $MIN_AGE$ + } + save_scope_value_as = { + name = max_age + value = { + value = $PARENT$.age + add = -20 + } + } + while = { + count = scope:count + create_character = { + culture = $PARENT$.culture + faith = $PARENT$.faith + employer = root + age = { + integer_range = { + min = scope:min_age + max = scope:max_age + } + } + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + dynasty_house = scope:parent.house + save_scope_as = newly_created_character + } + $PARENT$ = { + if = { + limit = { is_female = yes } + scope:newly_created_character = { set_mother = $PARENT$ } + } + else = { + scope:newly_created_character = { set_father = $PARENT$ } + } + } + scope:newly_created_character = { + if = { + limit = { has_trait = infertile } + remove_trait = infertile + } + if = { + limit = { is_male = yes } + random = { + chance = 20 + random_list = { + 90 = { add_trait = beardless_eunuch } + 10 = { add_trait = eunuch_1 } + } + } + } + add_to_list = eunuch_$TYPE$ + add_to_list = new_arrivals + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_create_family_effect = { + scope:eunuch ?= { + hidden_effect = { + if = { + limit = { + is_lowborn = yes + any_close_family_member = { count < 3 } + NOT = { has_character_flag = eunuch_family_generated } + } + father ?= { save_scope_as = eunuch_father } + mother ?= { save_scope_as = eunuch_mother } + every_sibling = { + add_to_list = eunuch_siblings + every_child = { add_to_list = eunuch_niblings } + } + add_character_flag = eunuch_family_generated + # Parents + if = { + limit = { + NOR = { + exists = scope:eunuch_father + exists = scope:eunuch_mother + } + } + save_scope_value_as = { + name = parent_min_age + value = { + value = scope:eunuch.age + add = 20 + } + } + save_scope_value_as = { + name = parent_max_age + value = { + value = scope:eunuch.age + add = 40 + max = 80 + } + } + create_character = { + culture = scope:eunuch.culture + faith = scope:eunuch.faith + employer = root + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + age = { + integer_range = { + min = scope:parent_min_age + max = scope:parent_max_age + } + } + dynasty = generate + save_scope_as = parent + } + scope:parent ?= { + add_to_list = new_arrivals + if = { + limit = { is_female = yes } + save_scope_as = eunuch_mother + scope:eunuch ?= { set_mother = scope:parent } + } + else = { + save_scope_as = eunuch_father + scope:eunuch ?= { set_father = scope:parent } + } + scope:eunuch ?= { set_house = scope:parent.house } + if = { + limit = { age > 65 } + death = { death_reason = death_natural_causes } + } + } + } + if = { + limit = { NOT = { exists = scope:parent } } + if = { + limit = { exists = scope:eunuch_mother } + scope:eunuch_mother ?= { save_scope_as = parent } + } + else = { + scope:eunuch_father ?= { save_scope_as = parent } + } + } + if = { + limit = { exists = scope:parent.house } + # Siblings + ep3_story_cycle_admin_eunuch_create_family_children_effect = { TYPE = sibling PARENT = scope:parent MIN_AGE = 16 } + # Niblings + every_in_list = { + list = new_arrivals + limit = { + is_in_list = eunuch_sibling + age > 20 + is_eunuch_trigger = no + NOT = { has_trait = infertile } + } + save_scope_as = eunuch_sibling + ep3_story_cycle_admin_eunuch_create_family_children_effect = { TYPE = nibling PARENT = scope:eunuch_sibling MIN_AGE = 1 } + } + } + } + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_upgrade_effect = { + custom_description_no_bullet = { + text = ep3_story_cycle_admin_eunuch_upgrade_modifier_tt + object = scope:eunuch + } + scope:story.story_owner = { + ep3_story_cycle_admin_eunuch_upgrade_modifier_effect = { TYPE = liege } + if = { + limit = { + has_active_diarchy = yes + diarch = scope:eunuch + } + change_diarchy_swing = minor_sop_swing_diarch_gain + } + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_upgrade_modifier_effect = { TYPE = eunuch } + } + ep3_story_cycle_admin_eunuch_score_effect = { VALUE = 1 } +} + +scripted_effect ep3_story_cycle_admin_eunuch_downgrade_effect = { + custom_description_no_bullet = { + text = ep3_story_cycle_admin_eunuch_downgrade_modifier_tt + object = scope:eunuch + } + scope:story.story_owner = { + ep3_story_cycle_admin_eunuch_downgrade_modifier_effect = { TYPE = liege } + if = { + limit = { + has_active_diarchy = yes + diarch = scope:eunuch + } + change_diarchy_swing = minor_sop_swing_liege_gain + } + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_downgrade_modifier_effect = { TYPE = eunuch } + } + ep3_story_cycle_admin_eunuch_score_effect = { VALUE = -1 } + scope:story = { + change_variable = { + name = eunuch_refusals + add = 1 + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_upset_courtier_effect = { + scope:eunuch = { + hidden_effect = { + progress_towards_rival_effect = { + REASON = rival_admin_eunuch + CHARACTER = $COURTIER$ + OPINION = default_rival_opinion + } + } + } + $COURTIER$ = { + custom_tooltip = admin_eunuch_rivalry_tt + } + scope:story = { + add_to_variable_list = { + name = upset_courtiers + target = $COURTIER$ + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_add_ally_effect = { + scope:story = { + add_to_variable_list = { + name = eunuch_allies + target = $ALLY$ + } + } + $ALLY$ = { + progress_towards_friend_effect = { + REASON = friend_admin_eunuch_vassal + CHARACTER = scope:eunuch + OPINION = default_friend_opinion + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_score_effect = { + scope:story ?= { + change_variable = { + name = eunuch_score + add = $VALUE$ + } + change_variable = { + name = eunuch_total + add = 1 + } + } +} + +################################################## +# Start +# by Joe Parkin +# 1000 +################################################## + +# Start maintenance +ep3_story_cycle_admin_eunuch.1000 = { + hidden = yes + type = character_event + cooldown = { years = 10 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_realm_trigger = yes + } + + weight_multiplier = { + base = 1 + modifier = { + is_adult = no + add = 1 + } + modifier = { + has_diarchy_type = regency + add = 1 + } + modifier = { + any_courtier = { ep3_story_cycle_admin_eunuch_valid_eunuch_trigger = yes } + add = 1 + } + modifier = { + any_noble_family = { ep3_story_cycle_admin_eunuch_noble_family_trigger = yes } + add = 1 + } + } + + immediate = { + primary_title = { + set_variable = { + name = story_cycle_admin_eunuch_cooldown + years = 25 + } + } + every_noble_family = { # Eunuch of a Noble Family + limit = { ep3_story_cycle_admin_eunuch_noble_family_trigger = yes } + holder.house = { + every_house_member = { + limit = { ep3_story_cycle_admin_eunuch_valid_eunuch_trigger = yes } + add_to_list = nf_eunuchs + } + } + } + every_courtier = { # Other Eunuchs + limit = { + NOT = { is_in_list = nf_eunuchs } + ep3_story_cycle_admin_eunuch_valid_eunuch_trigger = yes + } + add_to_list = eunuchs + } + ordered_in_list = { + list = nf_eunuchs + order_by = sum_of_all_skills_value + save_scope_as = eunuch + } + if = { + limit = { NOT = { exists = scope:eunuch } } + ordered_in_list = { + list = eunuchs + order_by = sum_of_all_skills_value + save_scope_as = eunuch + } + } + if = { + limit = { NOT = { exists = scope:eunuch } } + ep3_story_cycle_admin_eunuch_create_eunuch_effect = yes + } + else = { + random_sub_realm_county = { + limit = { + culture = scope:eunuch.culture + duchy != root.capital_county.duchy + } + alternative_limit = { duchy != root.capital_county.duchy } + alternative_limit = { culture = scope:eunuch.culture } + alternative_limit = { always = yes } + save_scope_as = origin + } + } + ep3_story_cycle_admin_eunuch_create_family_effect = yes + ep3_story_cycle_admin_eunuch_create_story_effect = yes + trigger_event = { + id = ep3_story_cycle_admin_eunuch.1001 + delayed = yes + } + } +} + +# Emperor start +ep3_story_cycle_admin_eunuch.1001 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.1001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_title = title:e_byzantium } + desc = ep3_story_cycle_admin_eunuch.1001.intro_byz + } + desc = ep3_story_cycle_admin_eunuch.1001.intro + } + desc = ep3_story_cycle_admin_eunuch.1001.desc + triggered_desc = { + trigger = { any_in_list = { list = new_arrivals } } + desc = ep3_story_cycle_admin_eunuch.1001.arrivals + } + } + theme = administrative + left_portrait = { + character = root + animation = war_over_tie + } + right_portrait = { + character = scope:eunuch + animation = writing + } + lower_center_portrait = scope:noble_family_head + + immediate = { + play_music_cue = "mx_cue_succession" + # Noble Family + scope:eunuch.house ?= { + if = { + limit = { + NOT = { + any_house_member = { + any_held_title = { is_noble_family_title = yes } + } + } + } + ordered_house_member = { + limit = { + exists = this + this != scope:eunuch + } + order_by = age + save_scope_as = family_head + } + } + } + scope:family_head ?= { + if = { + limit = { + this != house.house_head + } + hidden_effect = { + house = { set_house_head = scope:family_head } + } + } + create_noble_family_effect = { GOVERNMENT_GIVER = scope:family_head } + if = { + limit = { + NOT = { government_has_flag = government_is_administrative } + } + hidden_effect = { change_government = administrative_government } + } + } + every_in_list = { + list = new_arrivals + limit = { + is_ruler = no + is_alive = yes + NOR = { + this = scope:eunuch + employer = scope:family_head + } + } + hidden_effect = { set_employer = scope:family_head } + } + save_scope_as = liege + scope:eunuch ?= { + save_scope_as = candidate + change_influence = major_influence_gain + hidden_effect = { + if = { + limit = { employer != root } + set_employer = root + } + } + } + # Starting bonus to lure you in + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + } + + option = { + name = ep3_story_cycle_admin_eunuch.1001.a + flavor = admin_eunuch_flavor_tt + trigger = { can_employ_court_position_type = chief_eunuch_court_position } + scope:eunuch = { + set_variable = { name = target_court_position value = flag:chief_eunuch years = 1 } + } + court_position_old_holder_effect = { POS = chief_eunuch EMPLOYER = root } + court_position_grant_effect = { POS = chief_eunuch CANDIDATE = scope:eunuch EMPLOYER = root } + reverse_add_opinion = { + target = scope:eunuch + modifier = grateful_opinion + opinion = 15 + } + } + + + option = { + name = ep3_story_cycle_admin_eunuch.1001.b + flavor = admin_eunuch_flavor_tt + } +} + +################################################## +# Demand Regent +# by Joe Parkin +# 2010 +################################################## + +ep3_story_cycle_admin_eunuch.2010 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2010.t + desc = ep3_story_cycle_admin_eunuch.2010.desc + theme = administrative + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:eunuch + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_center_portrait = { + character = scope:diarch_successor + trigger = { + scope:diarch_successor != scope:eunuch + } + } + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp.var:eunuch_total >= 1 + has_active_diarchy = no + NOR = { + diarch ?= { + this = scope:eunuch_temp + is_designated_diarch = yes + } + designated_diarch ?= scope:eunuch_temp + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_adult = no + add = 1 + } + modifier = { + age > 50 + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + ordered_diarchy_succession_character = { + limit = { + is_diarchy_successor = yes + this != scope:eunuch + } + order_by = diarchy_regent_succession_score_value + save_scope_as = diarch_successor + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2010.a + scope:diarch_successor = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:emperor = { designate_diarch = scope:eunuch } + } + } + if = { + limit = { scope:diarch_successor != scope:eunuch } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:diarch_successor } + reverse_add_opinion = { + target = scope:diarch_successor + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2010.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:diarch_successor ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = medium_stress_impact_gain + lazy = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Demand Regency +# by Joe Parkin +# 2015 +################################################## + +ep3_story_cycle_admin_eunuch.2015 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2015.t + desc = { + desc = ep3_story_cycle_admin_eunuch.2015.desc + first_valid = { + triggered_desc = { + trigger = { is_at_war = yes } + desc = ep3_story_cycle_admin_eunuch.2015.war + } + triggered_desc = { + trigger = { has_trait = lifestyle_hunter } + desc = ep3_story_cycle_admin_eunuch.2015.hunter + } + desc = ep3_story_cycle_admin_eunuch.2015.fallback + } + desc = ep3_story_cycle_admin_eunuch.2015.outro + } + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:eunuch + animation = admiration + } + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp.var:eunuch_total >= 1 + OR = { + designated_diarch ?= scope:eunuch_temp + diarchy_successor ?= scope:eunuch_temp + } + has_active_diarchy = no + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + add = 1 + } + modifier = { + has_trait = lazy + add = 1 + } + modifier = { + has_trait = lifestyle_hunter + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + primary_title.current_heir = { save_scope_as = title_heir } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2015.a + if = { + limit = { exists = scope:title_heir } + scope:title_heir = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + } + scope:emperor = { try_start_diarchy = regency } + } + } + else = { try_start_diarchy = regency } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + if = { + limit = { exists = scope:title_heir } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:title_heir } + reverse_add_opinion = { + target = scope:title_heir + modifier = angry_opinion + opinion = -15 + } + } + stress_impact = { + base = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2015.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:title_heir ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + base = medium_stress_impact_gain + trusting = medium_stress_impact_gain + lazy = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Demand Governorship +# by Joe Parkin +# 2020 +################################################## + +# Family +scripted_trigger ep3_story_cycle_admin_eunuch_valid_family_member_trigger = { + is_adult = yes + top_liege ?= root.top_liege + is_ruler = no + is_landed = no + is_healthy = yes + save_temporary_scope_as = family_temp +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { + tier < root.primary_title.tier + tier >= tier_duchy + tier <= tier_kingdom + is_noble_family_title = no + is_landless_type_title = no + title_capital_county.duchy != root.capital_county.duchy + save_temporary_scope_as = title_temp + $GOVERNOR$ = { can_appoint_for_title = scope:title_temp } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { + is_governor = yes + NOR = { + is_close_family_of = root + is_close_family_of = $EUNUCH$ + is_close_family_of = $GOVERNOR$ + is_consort_of = root + is_consort_of = $EUNUCH$ + is_consort_of = $GOVERNOR$ + has_relation_lover = root + has_relation_lover = $EUNUCH$ + has_relation_lover = $GOVERNOR$ + has_relation_friend = root + has_relation_friend = $EUNUCH$ + has_relation_friend = $GOVERNOR$ + } + any_held_title = { + ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { GOVERNOR = $GOVERNOR$ } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { + tier >= tier_duchy + tier <= tier_kingdom + is_noble_family_title = no + is_landless_type_title = no + NOT = { exists = var:petition_house_rights } + title_capital_county.duchy != root.capital_county.duchy + save_temporary_scope_as = title_temp + $GOVERNOR$ = { can_appoint_for_title = scope:title_temp } +} + +ep3_story_cycle_admin_eunuch.2021 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2021.t + desc = ep3_story_cycle_admin_eunuch.2021.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:eunuch + animation = admiration + } + right_portrait = { + character = scope:governor + animation = obsequious_bow + } + lower_right_portrait = { + character = scope:title.holder + trigger = { + scope:title.holder != root + scope:governor ?= { + this != scope:title.holder + } + scope:title_heir ?= { + this != scope:title.holder + } + } + } + lower_center_portrait = scope:title_heir + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + is_at_war = no + # Valid eunuch family member + scope:eunuch_temp ?= { + any_close_family_member = { ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes } + } + # Valid grantable or candidacy governorship + OR = { + custom_tooltip = { + text = ep3_story_cycle_admin_eunuch.2021.t # Dummy, to suppress a "scope dependent values in localization" error + any_held_title = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:family_temp } + } + } + any_vassal = { + ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { GOVERNOR = scope:family_temp EUNUCH = scope:eunuch_temp } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes } + } + any_held_title = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:family_temp } + } + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + # Family member + scope:eunuch = { + random_close_family_member = { + limit = { ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes } + weight = { + base = 1 + modifier = { + is_sibling_of = scope:eunuch + add = 1 + } + modifier = { + is_nibling_of = scope:eunuch + add = 1 + } + modifier = { + has_character_flag = admin_eunuch_family_boon_flag + factor = 0 + } + } + save_scope_as = governor + } + } + # Grantable governorship + random_held_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:governor } + } + save_scope_as = title + } + # Candidacy governorship + if = { + limit = { NOT = { exists = scope:title } } + scope:governor = { + ordered_heir_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { GOVERNOR = scope:governor } + } + order_by = "place_in_line_of_succession(scope:governor)" + save_scope_as = title + } + } + } + if = { + limit = { NOT = { exists = scope:title } } + ordered_vassal = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { GOVERNOR = scope:governor EUNUCH = scope:eunuch } + } + order_by = { + value = age + if = { + limit = { health < fine_health } + add = 25 + } + if = { + limit = { health <= poor_health } + add = 25 + } + } + random_held_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { GOVERNOR = scope:governor } + } + save_scope_as = title + } + } + } + scope:title = { + ordered_title_heir = { + limit = { + NOR = { + this = root + this = scope:eunuch + this = scope:governor + } + } + save_scope_as = title_heir + } + } + } + + option = { + name = { + text = ep3_story_cycle_admin_eunuch.2021.a.grant + trigger = { scope:title.holder = root } + } + name = { + text = ep3_story_cycle_admin_eunuch.2021.a + trigger = { scope:title.holder != root } + } + scope:title_heir = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:title = { + if = { + limit = { holder = scope:emperor } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = scope:governor + change = scope:change + take_baronies = no + } + resolve_title_and_vassal_change = scope:change + } + else = { + change_appointment_investment = { + target = scope:governor + value = appointment_score_major_value + } + } + } + } + } + if = { + limit = { exists = scope:title_heir } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:title_heir } + reverse_add_opinion = { + target = scope:title_heir + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + scope:governor = { + add_character_flag = { flag = admin_eunuch_family_boon_flag years = 5 } + } + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2021.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:title_heir ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +# Vassal +scripted_trigger ep3_story_cycle_admin_eunuch_valid_vassal_governor_trigger = { + holder = { + NOR = { + has_character_flag = eunuch_vassal_offer_cooldown + has_relation_rival = $EUNUCH$ + $EUNUCH$ ?= this + } + reverse_opinion = { + target = $EUNUCH$ + value >= -50 + } + any_held_title = { + count = all + OR = { + is_landless_type_title = yes + is_noble_family_title = yes + } + } + house ?= { + NOT = { $EUNUCH$.house ?= this } + } + save_temporary_scope_as = governor_temp + } +} + +ep3_story_cycle_admin_eunuch.2022 = { + type = character_event + hidden = yes + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + is_at_war = no + any_noble_family = { + ep3_story_cycle_admin_eunuch_valid_vassal_governor_trigger = { EUNUCH = scope:eunuch_temp } + } + # Valid grantable or candidacy governorship + OR = { + any_held_title = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:governor_temp } + } + any_vassal = { + ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { GOVERNOR = scope:governor_temp EUNUCH = scope:eunuch_temp } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + save_scope_as = liege + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + random_noble_family = { + limit = { + ep3_story_cycle_admin_eunuch_valid_vassal_governor_trigger = { EUNUCH = scope:eunuch } + } + weight = { + base = 1 + modifier = { + holder = { is_ai = no } + factor = 4 + } + modifier = { + exists = holder.house + add = { + value = holder.house.house_power_score + divide = 2 + } + } + } + holder = { + save_scope_as = governor + add_character_flag = { + flag = eunuch_vassal_offer_cooldown + years = 2 + } + trigger_event = ep3_story_cycle_admin_eunuch.2023 + } + } + } +} + +ep3_story_cycle_admin_eunuch.2023 = { + type = letter_event + opening = char_interaction.0010.opening + desc = ep3_story_cycle_admin_eunuch.2023.desc + sender = { + character = scope:eunuch + animation = scheme + } + + trigger = { + scope:eunuch ?= { is_alive = yes } + scope:governor ?= { is_alive = yes } + } + + immediate = { + scope:eunuch = { save_scope_as = actor } + save_scope_as = recipient + } + + option = { # Accept + name = ep3_story_cycle_admin_eunuch.2023.a + pay_short_term_gold = { + gold = minor_gold_value + target = scope:eunuch + } + custom_tooltip = ep3_story_cycle_admin_eunuch.2023.a.tt + scope:eunuch = { change_influence = medium_influence_gain } + ep3_story_cycle_admin_eunuch_add_ally_effect = { ALLY = root } + scope:emperor = { + trigger_event = { + id = ep3_story_cycle_admin_eunuch.2024 + days = 5 + } + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + } + opinion_modifier = { + opinion_target = root.top_liege + multiplier = -0.25 + } + } + } + + option = { # Refuse + name = ep3_story_cycle_admin_eunuch.2023.b + reverse_add_opinion = { + modifier = annoyed_opinion + target = scope:eunuch + opinion = -15 + } + add_character_flag = { + flag = eunuch_vassal_offer_cooldown + years = 5 + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = -0.5 + ai_energy = -0.5 + } + opinion_modifier = { + opinion_target = root.top_liege + multiplier = 0.25 + } + } + } +} + +ep3_story_cycle_admin_eunuch.2024 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2024.t + desc = ep3_story_cycle_admin_eunuch.2024.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:emperor + animation = admiration + } + right_portrait = { + character = scope:eunuch + animation = happiness + } + lower_left_portrait = scope:title_heir + lower_right_portrait = scope:governor + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + # Valid grantable or candidacy governorship + OR = { + any_held_title = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:governor } + } + any_vassal = { + ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { GOVERNOR = scope:governor EUNUCH = scope:eunuch_temp } + } + } + scope:governor = { + is_alive = yes + is_landed = no + } + } + + immediate = { + # Grantable governorship + random_held_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:governor } + } + save_scope_as = title + } + # Candidacy governorship + if = { + limit = { NOT = { exists = scope:title } } + scope:governor = { + ordered_heir_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { GOVERNOR = scope:governor } + } + order_by = "place_in_line_of_succession(scope:governor)" + save_scope_as = title + } + } + } + if = { + limit = { NOT = { exists = scope:title } } + ordered_vassal = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { GOVERNOR = scope:governor EUNUCH = scope:eunuch } + } + order_by = { + value = age + if = { + limit = { health < fine_health } + add = 25 + } + if = { + limit = { health <= poor_health } + add = 25 + } + } + random_held_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { GOVERNOR = scope:governor } + } + save_scope_as = title + } + } + } + scope:title = { + ordered_title_heir = { + limit = { + NOR = { + this = root + this = scope:eunuch + this = scope:governor + } + } + save_scope_as = title_heir + } + } + } + + option = { + name = { + text = ep3_story_cycle_admin_eunuch.2021.a.grant + trigger = { scope:title.holder = root } + } + name = { + text = ep3_story_cycle_admin_eunuch.2021.a + trigger = { scope:title.holder != root } + } + scope:governor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:title_heir = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:title = { + if = { + limit = { holder = scope:emperor } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = scope:governor + change = scope:change + take_baronies = no + } + resolve_title_and_vassal_change = scope:change + } + else = { + change_appointment_investment = { + target = scope:governor + value = appointment_score_major_value + } + } + } + } + } + } + } + reverse_add_opinion = { + target = scope:governor + modifier = grateful_opinion + opinion = 15 + } + if = { + limit = { exists = scope:title_heir } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:title_heir } + reverse_add_opinion = { + target = scope:title_heir + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + scope:governor = { + add_character_flag = { flag = admin_eunuch_family_boon_flag years = 5 } + } + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2021.b + scope:governor = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.2023.b.toast + left_icon = scope:eunuch + right_icon = scope:emperor + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + } + } + reverse_add_opinion = { + target = scope:governor + modifier = disappointed_opinion + opinion = -15 + } + scope:title_heir ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Demand Patriarchate +# by Joe Parkin +# 2030-31 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_want_patriarch_trigger = { + faith.religious_head_title.holder = { + is_vassal_of = root + NOR = { + this = root + this = scope:eunuch_temp + is_close_family_of = scope:eunuch_temp + } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_patriarch_trigger = { + faith = root.faith + ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes + NOR = { + scope:protege_temp ?= this + scope:protege ?= this + } + trigger_if = { + limit = { root.faith = { has_doctrine = doctrine_clerical_gender_male_only } } + is_male = yes + } + trigger_else_if = { + limit = { root.faith = { has_doctrine = doctrine_clerical_gender_female_only } } + is_female = yes + } + trigger_else = { always = yes } + trigger_if = { + limit = { root.faith = { has_doctrine = doctrine_clerical_marriage_disallowed } } + is_married = no + is_betrothed = no + } +} + +ep3_story_cycle_admin_eunuch.2031 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2031.t + desc = { + desc = ep3_story_cycle_admin_eunuch.2031.intro + first_valid = { + triggered_desc = { + trigger = { location = title:c_byzantion.title_province } + desc = ep3_story_cycle_admin_eunuch.2031.intro_byz + } + desc = ep3_story_cycle_admin_eunuch.2031.intro_fallback + } + desc = ep3_story_cycle_admin_eunuch.2031.desc + } + theme = administrative + override_background = { reference = temple_scope } + left_portrait = { + character = scope:eunuch + animation = debating + } + right_portrait = { + character = scope:new_patriarch + animation = prayer + } + lower_center_portrait = scope:old_patriarch + + trigger = { + NOT = { has_character_flag = admin_eunuch_patriarch_flag } + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp.var:eunuch_total >= 3 + ep3_story_cycle_admin_eunuch_want_patriarch_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { ep3_story_cycle_admin_eunuch_valid_patriarch_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_valid_patriarch_trigger = yes + is_clergy = yes + } + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + save_scope_as = root_scope + add_character_flag = { + flag = admin_eunuch_patriarch_flag + years = 15 + } + faith.religious_head_title.holder = { + save_scope_as = old_patriarch + save_scope_as = background_temple_scope + } + scope:eunuch = { + random_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_valid_patriarch_trigger = yes + is_clergy = yes + } + alternative_limit = { ep3_story_cycle_admin_eunuch_valid_patriarch_trigger = yes } + save_scope_as = new_patriarch + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2031.a + add_piety = major_piety_loss + add_hook = { + type = influence_hook + target = scope:new_patriarch + } + create_title_and_vassal_change = { + type = granted + save_scope_as = title_change + add_claim_on_loss = no + } + hidden_effect = { + faith.religious_head_title = { + change_title_holder = { + holder = scope:new_patriarch + change = scope:title_change + } + } + } + every_player = { + limit = { faith = scope:emperor.faith } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:new_patriarch + show_as_tooltip = { + faith.religious_head_title = { + change_title_holder = { + holder = scope:new_patriarch + change = scope:title_change + } + } + } + } + } + resolve_title_and_vassal_change = scope:title_change + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + if = { + limit = { exists = scope:old_patriarch } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:old_patriarch } + scope:old_patriarch = { + add_opinion = { + target = scope:new_patriarch + modifier = angry_opinion + opinion = -50 + } + house ?= { + every_house_member = { + limit = { + NOR = { + this = scope:eunuch + this = scope:old_patriarch + this = scope:new_patriarch + } + } + reverse_add_opinion = { + target = scope:old_patriarch + modifier = angry_opinion + opinion = -25 + } + } + } + } + } + every_vassal = { + vassal_stance = zealot + limit = { + NOR = { + this = scope:eunuch + this = scope:old_patriarch + this = scope:new_patriarch + house ?= scope:old_patriarch.house + } + } + custom = every_zealot_vassal + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + stress_impact = { + zealous = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:old_patriarch + multiplier = -0.25 + } + ai_value_modifier = { + ai_rationality = -0.5 + ai_zeal = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2031.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:old_patriarch ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + cynical = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:old_patriarch + multiplier = 0.25 + } + ai_value_modifier = { + ai_rationality = 0.5 + ai_zeal = 0.5 + } + } + } +} + +################################################## +# Demand Council Seat +# by Joe Parkin +# 2040-41 +################################################## + +# Eunuch +scripted_effect ep3_story_cycle_admin_eunuch_save_council_position_effect = { + random_list = { # Pick best position, even if occupied + 2 = { + trigger = { + petition_liege_councillor_blocked_trigger = { + ROLE = chancellor + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + } + petition_liege_councillor_compare_modifier = { SKILL = diplomacy ROLE = chancellor JOB_TAKER = $JOB_TAKER$ } + modifier = { + exists = $JOB_TAKER$.cp:councillor_chancellor + $JOB_TAKER$.cp:councillor_chancellor = { is_close_family_of = $EUNUCH$ } + factor = 0 + } + petition_liege_0101_councillor_scope_first_effect = { ROLE = chancellor JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } + } + 2 = { + trigger = { + petition_liege_councillor_blocked_trigger = { + ROLE = marshal + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + } + petition_liege_councillor_compare_modifier = { SKILL = martial ROLE = marshal JOB_TAKER = $JOB_TAKER$ } + modifier = { + exists = $JOB_TAKER$.cp:councillor_marshal + $JOB_TAKER$.cp:councillor_marshal = { is_close_family_of = $EUNUCH$ } + factor = 0 + } + petition_liege_0101_councillor_scope_first_effect = { ROLE = marshal JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } + } + 2 = { + trigger = { + petition_liege_councillor_blocked_trigger = { + ROLE = steward + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + } + petition_liege_councillor_compare_modifier = { SKILL = stewardship ROLE = steward JOB_TAKER = $JOB_TAKER$ } + modifier = { + exists = $JOB_TAKER$.cp:councillor_steward + $JOB_TAKER$.cp:councillor_steward = { is_close_family_of = $EUNUCH$ } + factor = 0 + } + petition_liege_0101_councillor_scope_first_effect = { ROLE = steward JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } + } + 20 = { + trigger = { + petition_liege_councillor_blocked_trigger = { + ROLE = spymaster + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + } + petition_liege_councillor_compare_modifier = { SKILL = intrigue ROLE = spymaster JOB_TAKER = $JOB_TAKER$ } + modifier = { + exists = $JOB_TAKER$.cp:councillor_spymaster + $JOB_TAKER$.cp:councillor_spymaster = { is_close_family_of = $EUNUCH$ } + factor = 0 + } + petition_liege_0101_councillor_scope_first_effect = { ROLE = spymaster JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } + } + 2 = { + trigger = { + petition_liege_council_chaplain_appointable_trigger = { + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + petition_liege_councillor_blocked_trigger = { + ROLE = court_chaplain + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + } + petition_liege_councillor_compare_modifier = { SKILL = learning ROLE = court_chaplain JOB_TAKER = $JOB_TAKER$ } + modifier = { + exists = $JOB_TAKER$.cp:councillor_court_chaplain + $JOB_TAKER$.cp:councillor_court_chaplain = { is_close_family_of = $EUNUCH$ } + factor = 0 + } + petition_liege_0101_councillor_scope_first_effect = { ROLE = court_chaplain JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } + } + } +} + +ep3_story_cycle_admin_eunuch.2040 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2040.t + desc = ep3_story_cycle_admin_eunuch.2040.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + character = scope:eunuch + animation = admiration + } + lower_center_portrait = scope:second_party + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { is_councillor = no } + petition_liege_council_seat_liege_trigger = yes + NAND = { + diarch ?= scope:eunuch_temp + has_active_diarchy = yes + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + save_scope_as = petition_liege + scope:eunuch = { + save_scope_as = petition_vassal + ep3_story_cycle_admin_eunuch_save_council_position_effect = { + JOB_TAKER = scope:eunuch + LIEGE = root + EUNUCH = scope:eunuch + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2040.a + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.2040.a.toast + left_icon = scope:eunuch + right_icon = scope:second_party + if = { + limit = { exists = scope:second_party } + scope:second_party = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:emperor = { fire_councillor = scope:second_party } + } + } + } + switch = { + trigger = scope:eunuch.var:petition_liege_council_first + flag:chancellor = { + assign_councillor_type = { + type = councillor_chancellor + target = scope:petition_vassal + } + } + flag:marshal = { + assign_councillor_type = { + type = councillor_marshal + target = scope:petition_vassal + } + } + flag:steward = { + assign_councillor_type = { + type = councillor_steward + target = scope:petition_vassal + } + } + flag:spymaster = { + assign_councillor_type = { + type = councillor_spymaster + target = scope:petition_vassal + } + } + flag:court_chaplain = { + assign_councillor_type = { + type = councillor_court_chaplain + target = scope:petition_vassal + } + } + } + petition_liege_block_firing_councillor_effect = { + COURT_OWNER = root + JOB_TAKER = scope:eunuch + } + } + if = { + limit = { exists = scope:second_party } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:second_party } + reverse_add_opinion = { + target = scope:second_party + modifier = angry_opinion + opinion = -15 + } + } + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:second_party + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2040.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:second_party ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +# Family +scripted_trigger ep3_story_cycle_admin_eunuch_valid_family_councillor_trigger = { + ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes + highest_skill_value >= 8 + NOT = { this = $EUNUCH$ } + is_councillor = no + save_temporary_scope_as = councillor_temp +} + +ep3_story_cycle_admin_eunuch.2041 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2041.t + desc = ep3_story_cycle_admin_eunuch.2041.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:eunuch + animation = admiration + } + right_portrait = { + character = scope:councillor + animation = happiness + } + lower_center_portrait = scope:second_party + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + petition_liege_council_seat_liege_trigger = yes + scope:eunuch_temp.house ?= { + any_house_member = { + ep3_story_cycle_admin_eunuch_valid_family_councillor_trigger = { EUNUCH = scope:eunuch_temp } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { + liege = root + is_councillor = yes + } + } + factor = 0.25 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + save_scope_as = petition_liege + scope:eunuch.house = { + random_house_member = { + limit = { + ep3_story_cycle_admin_eunuch_valid_family_councillor_trigger = { EUNUCH = scope:eunuch } + } + weight = { + base = 1 + modifier = { + has_character_flag = admin_eunuch_family_boon_flag + factor = 0 + } + } + save_scope_as = councillor + save_scope_as = petition_vassal + if = { + limit = { + employer != root + } + root = { add_courtier = scope:councillor } + } + ep3_story_cycle_admin_eunuch_save_council_position_effect = { + JOB_TAKER = scope:councillor + LIEGE = root + EUNUCH = scope:eunuch + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2041.a + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.2040.a.toast + left_icon = scope:councillor + right_icon = scope:second_party + if = { + limit = { exists = scope:second_party } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:emperor = { fire_councillor = scope:second_party } + } + } + switch = { + trigger = scope:councillor.var:petition_liege_council_first + flag:chancellor = { + assign_councillor_type = { + type = councillor_chancellor + target = scope:councillor + } + } + flag:marshal = { + assign_councillor_type = { + type = councillor_marshal + target = scope:councillor + } + } + flag:steward = { + assign_councillor_type = { + type = councillor_steward + target = scope:councillor + } + } + flag:spymaster = { + assign_councillor_type = { + type = councillor_spymaster + target = scope:councillor + } + } + flag:court_chaplain = { + assign_councillor_type = { + type = councillor_court_chaplain + target = scope:councillor + } + } + } + petition_liege_block_firing_councillor_effect = { + COURT_OWNER = root + JOB_TAKER = scope:councillor + } + scope:second_party ?= { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + } + scope:councillor = { + add_character_flag = { flag = admin_eunuch_family_boon_flag years = 5 } + } + if = { + limit = { exists = scope:second_party } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:second_party } + reverse_add_opinion = { + target = scope:second_party + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:second_party + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2041.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:second_party ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +# Vassal +scripted_trigger ep3_story_cycle_admin_eunuch_valid_vassal_councillor_trigger = { + is_ruler = no + NOR = { + has_character_flag = eunuch_vassal_offer_cooldown + has_relation_rival = $EUNUCH$ + this = $EUNUCH$ + } + reverse_opinion = { + target = $EUNUCH$ + value >= -50 + } + any_held_title = { is_noble_family_title = yes } + is_councillor = no + highest_skill_value >= 8 + house ?= { + NOT = { $EUNUCH$.house ?= this } + } + save_temporary_scope_as = councillor_temp +} + +ep3_story_cycle_admin_eunuch.2042 = { + type = character_event + hidden = yes + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + petition_liege_council_seat_liege_trigger = yes + any_vassal = { + ep3_story_cycle_admin_eunuch_valid_vassal_councillor_trigger = { EUNUCH = scope:eunuch_temp } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + save_scope_as = liege + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + random_vassal = { + limit = { + ep3_story_cycle_admin_eunuch_valid_vassal_councillor_trigger = { EUNUCH = scope:eunuch } + } + weight = { + base = 1 + modifier = { + is_ai = no + factor = 4 + } + modifier = { + exists = house + add = { + value = house.house_power_score + divide = 2 + } + } + modifier = { add = highest_skill_value } + } + save_scope_as = councillor + add_character_flag = { + flag = eunuch_vassal_offer_cooldown + years = 2 + } + trigger_event = ep3_story_cycle_admin_eunuch.2043 + } + } +} + +ep3_story_cycle_admin_eunuch.2043 = { + type = letter_event + opening = char_interaction.0010.opening + desc = ep3_story_cycle_admin_eunuch.2043.desc + sender = { + character = scope:eunuch + animation = scheme + } + + trigger = { + scope:eunuch ?= { is_alive = yes } + scope:councillor ?= { is_alive = yes } + } + + immediate = { + scope:eunuch = { save_scope_as = actor } + save_scope_as = recipient + } + + option = { # Accept + name = ep3_story_cycle_admin_eunuch.2043.a + pay_short_term_gold = { + gold = minor_gold_value + target = scope:eunuch + } + custom_tooltip = ep3_story_cycle_admin_eunuch.2043.a.tt + scope:eunuch = { change_influence = medium_influence_gain } + ep3_story_cycle_admin_eunuch_add_ally_effect = { ALLY = root } + scope:emperor = { + trigger_event = { + id = ep3_story_cycle_admin_eunuch.2044 + days = 5 + } + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + } + opinion_modifier = { + opinion_target = root.top_liege + multiplier = -0.25 + } + } + } + + option = { # Refuse + name = ep3_story_cycle_admin_eunuch.2043.b + reverse_add_opinion = { + modifier = annoyed_opinion + target = scope:eunuch + opinion = -15 + } + add_character_flag = { + flag = eunuch_vassal_offer_cooldown + years = 5 + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = -0.5 + ai_energy = -0.5 + } + opinion_modifier = { + opinion_target = root.top_liege + multiplier = 0.25 + } + } + } +} + +ep3_story_cycle_admin_eunuch.2044 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2044.t + desc = ep3_story_cycle_admin_eunuch.2044.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:emperor + animation = admiration + } + right_portrait = { + character = scope:eunuch + animation = happiness + } + lower_left_portrait = scope:second_party + lower_right_portrait = scope:councillor + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + petition_liege_council_seat_liege_trigger = yes + scope:councillor = { + is_alive = yes + is_councillor = no + } + } + + immediate = { + save_scope_as = petition_liege + scope:councillor = { save_scope_as = petition_vassal } + ep3_story_cycle_admin_eunuch_save_council_position_effect = { + JOB_TAKER = scope:councillor + LIEGE = root + EUNUCH = scope:eunuch + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2041.a + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.2040.a.toast + left_icon = scope:councillor + right_icon = scope:second_party + scope:councillor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.2040.a.toast + left_icon = scope:eunuch + right_icon = scope:emperor + if = { + limit = { exists = scope:second_party } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:councillor + scope:emperor = { fire_councillor = scope:second_party } + } + } + scope:emperor = { + switch = { + trigger = scope:councillor.var:petition_liege_council_first + flag:chancellor = { + assign_councillor_type = { + type = councillor_chancellor + target = scope:councillor + } + } + flag:marshal = { + assign_councillor_type = { + type = councillor_marshal + target = scope:councillor + } + } + flag:steward = { + assign_councillor_type = { + type = councillor_steward + target = scope:councillor + } + } + flag:spymaster = { + assign_councillor_type = { + type = councillor_spymaster + target = scope:councillor + } + } + flag:court_chaplain = { + assign_councillor_type = { + type = councillor_court_chaplain + target = scope:councillor + } + } + } + petition_liege_block_firing_councillor_effect = { + COURT_OWNER = scope:emperor + JOB_TAKER = scope:councillor + } + } + } + } + scope:second_party ?= { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + } + reverse_add_opinion = { + target = scope:councillor + modifier = grateful_opinion + opinion = 15 + } + if = { + limit = { exists = scope:second_party } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:second_party } + reverse_add_opinion = { + target = scope:second_party + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:second_party + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2041.b + scope:councillor = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.2043.b.toast + left_icon = scope:eunuch + right_icon = scope:emperor + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + } + } + reverse_add_opinion = { + target = scope:councillor + modifier = disappointed_opinion + opinion = -15 + } + scope:second_party ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Boon +# by Joe Parkin +# 2050 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_fabricate_hook_trigger = { + OR = { + is_councillor = no + has_relation_rival = root + opinion = { + target = root + value < 25 + } + } + save_temporary_scope_as = hookee_temp + root = { + can_add_hook = { + target = scope:hookee_temp + type = fabrication_hook + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_select_boon_effect = { + random_list = { + 25 = { # Debase + trigger = { + NOT = { has_character_flag = eunuch_boon_debase_cooldown } + } + modifier = { + gold < minor_gold_value + factor = 2 + } + modifier = { + gold < 0 + factor = 2 + } + save_scope_value_as = { + name = eunuch_boon + value = flag:debase + } + } + 25 = { # Raise taxes + trigger = { + NOR = { + has_character_modifier = admin_eunuch_raise_taxes_modifier + has_character_flag = eunuch_boon_raise_taxes_cooldown + } + } + save_scope_value_as = { + name = eunuch_boon + value = flag:raise_taxes + } + } + 25 = { # Increase succession + trigger = { + player_heir ?= { is_ruler = no } + any_vassal = { + primary_title = { + any_title_heir = { house = root.house } + } + } + NOT = { has_character_flag = eunuch_boon_candidacy_cooldown } + } + random_vassal = { + limit = { + primary_title = { + any_title_heir = { this = root.player_heir } + current_heir != root.player_heir + } + } + alternative_limit = { + primary_title = { + any_title_heir = { house ?= root.house } + NOT = { current_heir.house ?= root.house } + } + } + alternative_limit = { + primary_title = { + any_title_heir = { this = root.player_heir } + } + } + alternative_limit = { + primary_title = { + any_title_heir = { house ?= root.house } + } + } + primary_title = { save_scope_as = boon_title } + save_scope_as = boon_victim + root.player_heir = { save_scope_as = boon_target } + } + save_scope_value_as = { + name = eunuch_boon + value = flag:candidacy + } + } + 25 = { # Fabricate hook + trigger = { + OR = { + any_powerful_vassal = { ep3_story_cycle_admin_eunuch_fabricate_hook_trigger = yes } + any_councillor = { ep3_story_cycle_admin_eunuch_fabricate_hook_trigger = yes } + } + NOT = { has_character_flag = eunuch_boon_fabricate_hook_cooldown } + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:eunuch_temp ?= { + OR = { + has_trait = schemer + has_trait = education_intrigue + has_council_position = councillor_spymaster + } + } + factor = 2 + } + random_powerful_vassal = { + limit = { ep3_story_cycle_admin_eunuch_fabricate_hook_trigger = yes } + save_scope_as = boon_victim + } + if = { + limit = { NOT = { exists = scope:boon_victim } } + random_councillor = { + limit = { ep3_story_cycle_admin_eunuch_fabricate_hook_trigger = yes } + save_scope_as = boon_victim + } + } + save_scope_value_as = { + name = eunuch_boon + value = flag:fabricate_hook + } + } + 25 = { # Imprison rebel + trigger = { + any_targeting_faction = { exists = faction_leader } + NOT = { has_character_flag = eunuch_boon_imprison_rebel_cooldown } + } + ordered_targeting_faction = { + limit = { exists = faction_leader } + order_by = faction_discontent + save_scope_as = boon_faction + faction_leader = { save_scope_as = boon_victim } + } + save_scope_value_as = { + name = eunuch_boon + value = flag:imprison_rebel + } + } + 5 = { # Gain influence - fallback + save_scope_value_as = { + name = eunuch_boon + value = flag:influence + } + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_award_boon_effect = { + switch = { + trigger = scope:eunuch_boon + flag:debase = { + add_character_flag = { + flag = eunuch_boon_debase_cooldown + years = 5 + } + add_short_term_gold = major_gold_value + add_prestige = major_prestige_loss + } + flag:raise_taxes = { + add_character_flag = { + flag = eunuch_boon_raise_taxes_cooldown + years = 5 + } + add_character_modifier = { + modifier = admin_eunuch_raise_taxes_modifier + years = 5 + } + } + flag:candidacy = { + add_character_flag = { + flag = eunuch_boon_candidacy_cooldown + years = 5 + } + scope:boon_target = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:boon_title + scope:boon_title = { + change_appointment_investment = { + target = scope:boon_target + value = appointment_score_major_value + } + } + } + } + } + flag:fabricate_hook = { + add_character_flag = { + flag = eunuch_boon_fabricate_hook_cooldown + years = 5 + } + scope:boon_victim = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:emperor = { + add_hook = { + type = fabrication_hook + target = scope:boon_victim + } + } + } + } + } + flag:imprison_rebel = { + add_character_flag = { + flag = eunuch_boon_imprison_rebel_cooldown + years = 5 + } + scope:boon_victim = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:boon_victim + IMPRISONER = scope:emperor + } + } + } + } + flag:influence = { change_influence = major_influence_gain } + } + if = { + limit = { exists = scope:boon_victim } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:boon_victim } + } +} + +ep3_story_cycle_admin_eunuch.2050 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2050.t + desc = { + desc = ep3_story_cycle_admin_eunuch.2050.desc + first_valid = { + triggered_desc = { + trigger = { scope:eunuch_boon = flag:debase } + desc = ep3_story_cycle_admin_eunuch.2050.debase + } + triggered_desc = { + trigger = { scope:eunuch_boon = flag:raise_taxes } + desc = ep3_story_cycle_admin_eunuch.2050.raise_taxes + } + triggered_desc = { + trigger = { scope:eunuch_boon = flag:candidacy } + desc = ep3_story_cycle_admin_eunuch.2050.candidacy + } + triggered_desc = { + trigger = { scope:eunuch_boon = flag:fabricate_hook } + desc = ep3_story_cycle_admin_eunuch.2050.fabricate_hook + } + triggered_desc = { + trigger = { scope:eunuch_boon = flag:imprison_rebel } + desc = ep3_story_cycle_admin_eunuch.2050.imprison_rebel + } + desc = ep3_story_cycle_admin_eunuch.2050.influence + } + desc = ep3_story_cycle_admin_eunuch.2050.outro + } + theme = administrative + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:eunuch + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_left_portrait = scope:boon_target + lower_right_portrait = scope:boon_victim + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = { + value = scope:story_temp.var:eunuch_score + min = 0 + } + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + ep3_story_cycle_admin_eunuch_select_boon_effect = yes + } + + option = { + name = ep3_story_cycle_admin_eunuch.2050.a + ep3_story_cycle_admin_eunuch_award_boon_effect = yes + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2050.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Secret +# by Joe Parkin +# 2051 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_secret_trigger = { + NOR = { + is_known_by = root + secret_owner = { is_close_family_of = $EUNUCH$ } + secret_owner = root + secret_target ?= { is_close_family_of = $EUNUCH$ } + secret_target ?= root + any_secret_participant = { is_close_family_of = $EUNUCH$ } + any_secret_participant = { this = root } + } + any_secret_participant = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } +} + +ep3_story_cycle_admin_eunuch.2051 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2051.t + desc = ep3_story_cycle_admin_eunuch.2051.desc + theme = administrative + left_portrait = { + character = scope:eunuch + animation = schadenfreude + } + right_portrait = { + character = scope:secret_owner + animation = worry + } + lower_center_portrait = scope:secret_target + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + OR = { + scope:eunuch_temp ?= { + any_known_secret = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch_temp } + } + } + any_vassal_or_below = { + any_secret = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch_temp } + } + } + any_courtier = { + any_secret = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch_temp } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = { + value = scope:story_temp.var:eunuch_score + min = 0 + } + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:eunuch_temp ?= { + OR = { + has_trait = schemer + has_trait = education_intrigue + has_council_position = councillor_spymaster + } + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { + random_known_secret = { + limit = { + secret_target ?= { is_of_major_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + secret_target ?= { is_of_minor_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + save_scope_as = secret + } + } + if = { + limit = { NOT = { exists = scope:secret } } + every_vassal_or_below = { + limit = { + any_secret = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + } + add_to_list = secret_havers + } + every_courtier = { + limit = { + any_secret = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + } + add_to_list = secret_havers + } + random_in_list = { + list = secret_havers + limit = { is_of_major_interest_to_root_trigger = yes } + alternative_limit = { is_of_minor_interest_to_root_trigger = yes } + alternative_limit = { always = yes } + weight = { + base = 1 + modifier = { add = highest_held_title_tier } + } + random_secret = { + limit = { + secret_target ?= { is_of_major_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + secret_target ?= { is_of_minor_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + save_scope_as = secret + } + } + } + scope:secret ?= { + secret_owner = { save_scope_as = secret_owner } + secret_target ?= { save_scope_as = secret_target } + hidden_effect = { + if = { + limit = { NOT = { is_known_by = scope:eunuch } } + reveal_to = scope:eunuch + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2051.a + custom_tooltip = { + text = ep3_story_cycle_admin_eunuch.2051.a.tt + send_interface_toast = { + type = event_toast_effect_neutral + left_icon = scope:secret_owner + right_icon = scope:secret_target + title = playdate_revealed_secret_log_title + scope:secret_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:secret = { reveal_to = scope:emperor } + } + } + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:secret_owner } + reverse_add_opinion = { + target = scope:secret_owner + modifier = angry_opinion + opinion = -15 + } + stress_impact = { + trusting = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2051.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + reverse_add_opinion = { + target = scope:secret_owner + modifier = grateful_opinion + opinion = 15 + } + stress_impact = { + deceitful = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:secret_owner + multiplier = 0.25 + } + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = -0.5 + } + } + } +} + +################################################## +# Scheme +# by Joe Parkin +# 2052 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_scheme_trigger = { + is_hostile = yes + is_scheme_exposed = no + NOR = { + scheme_is_character_agent = $EUNUCH$ + scheme_is_character_agent = root + scheme_owner = $EUNUCH$ + scheme_owner = root + scheme_defender = $EUNUCH$ + scheme_defender = root + } +} + +ep3_story_cycle_admin_eunuch.2052 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2052.t + desc = ep3_story_cycle_admin_eunuch.2052.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = scope:eunuch + animation = schadenfreude + } + right_portrait = { + character = scope:scheme_owner + animation = worry + } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + OR = { + any_vassal_or_below = { + any_scheme = { ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch_temp } } + } + any_courtier = { + any_scheme = { ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch_temp } } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = { + value = scope:story_temp.var:eunuch_score + min = 0 + } + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:eunuch_temp ?= { + OR = { + has_trait = schemer + has_trait = education_intrigue + has_council_position = councillor_spymaster + } + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + every_vassal_or_below = { + limit = { + any_scheme = { ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch } } + } + add_to_list = scheme_havers + } + every_courtier = { + limit = { + any_scheme = { ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch } } + } + add_to_list = scheme_havers + } + random_in_list = { + list = scheme_havers + limit = { is_of_major_interest_to_root_trigger = yes } + alternative_limit = { is_of_minor_interest_to_root_trigger = yes } + alternative_limit = { always = yes } + random_scheme = { + limit = { + scheme_defender = { is_of_major_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + scheme_defender = { is_of_minor_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch } + } + save_scope_as = scheme + scheme_owner = { save_scope_as = scheme_owner } + scheme_defender ?= { save_scope_as = scheme_target } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2052.a + custom_tooltip = { + text = ep3_story_cycle_admin_eunuch.2052.a.tt + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.2052.a.tt + left_icon = scope:scheme_owner + right_icon = scope:scheme_target + scope:scheme_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:scheme = { expose_scheme = yes } + } + } + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:scheme_owner } + stress_impact = { + trusting = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2052.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + reverse_add_opinion = { + target = scope:scheme_owner + modifier = grateful_opinion + opinion = 15 + } + stress_impact = { + deceitful = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:scheme_owner + multiplier = 0.25 + } + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = -0.5 + } + } + } +} + +################################################## +# Demand Court Position +# by Joe Parkin +# 2060-61 +################################################## + +ep3_story_cycle_admin_eunuch.2060 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2060.t + desc = ep3_story_cycle_admin_eunuch.2060.desc + theme = administrative + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + character = scope:eunuch + animation = admiration + } + lower_center_portrait = scope:second_party + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { has_any_court_position = no } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { + court_position_generator_effect = { + VAR = target + EMPLOYER = root + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2060.a + scope:eunuch = { + court_position_generator_assignment_effect = { + VAR = target + EMPLOYER = root + CANDIDATE = scope:eunuch + } + } + if = { + limit = { exists = scope:old_holder } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:old_holder } + reverse_add_opinion = { + target = scope:old_holder + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2060.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:old_holder ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_family_position_trigger = { + ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes + has_any_court_position = no + save_temporary_scope_as = position_temp +} + +ep3_story_cycle_admin_eunuch.2061 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2061.t + desc = ep3_story_cycle_admin_eunuch.2061.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:eunuch + animation = admiration + } + right_portrait = { + character = scope:positioner + animation = happiness + } + lower_center_portrait = scope:second_party + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { ep3_story_cycle_admin_eunuch_valid_family_position_trigger = yes } + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { + random_close_family_member = { + limit = { ep3_story_cycle_admin_eunuch_valid_family_position_trigger = yes } + weight = { + base = 1 + modifier = { + is_house_head = yes + factor = 0 + } + } + save_scope_as = positioner + hidden_effect = { + set_employer = root + } + court_position_generator_effect = { + VAR = target + EMPLOYER = root + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2061.a + scope:positioner = { + court_position_generator_assignment_effect = { + VAR = target + EMPLOYER = root + CANDIDATE = scope:positioner + } + } + if = { + limit = { exists = scope:old_holder } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:old_holder } + reverse_add_opinion = { + target = scope:old_holder + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2061.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:old_holder ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + scope:positioner = { + hidden_effect = { + if = { + limit = { + scope:eunuch.house.house_head = { + is_landed_or_landless_administrative = yes + } + } + set_employer = scope:eunuch.house.house_head + } + else = { + move_to_pool = yes + } + } + } + } +} + +################################################## +# Demand Family Marriage +# by Joe Parkin +# 2070 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_marry_trigger = { + is_available = yes + is_playable_character = no + is_adult = yes + is_married = no + is_ruler = no + is_betrothed = no + save_temporary_scope_as = marriage_temp +} + +scripted_trigger ep3_story_cycle_admin_eunuch_emperor_marry_trigger = { + age < $MARRY$.age_plus_10 + age >= $MARRY$.age_minus_10 + is_available = yes + is_playable_character = no + is_adult = yes + is_married = no + is_betrothed = no + scriptedtests_can_marry_character = $MARRY$ +} + +ep3_story_cycle_admin_eunuch.2070 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2070.t + desc = ep3_story_cycle_admin_eunuch.2070.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:eunuch + animation = debating + } + right_portrait = { + character = scope:eunuch_marry + animation = war_over_tie + } + lower_left_portrait = scope:emperor_marry + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_marry_trigger = yes + root = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_emperor_marry_trigger = { MARRY = scope:marriage_temp } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { + OR = { + primary_spouse ?= { is_close_family_of = root } + betrothed ?= { is_close_family_of = root } + } + } + } + factor = 0.25 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch ?= { + random_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_marry_trigger = yes + root = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_emperor_marry_trigger = { MARRY = scope:marriage_temp } + } + } + } + save_scope_as = eunuch_marry + root = { + random_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_emperor_marry_trigger = { MARRY = scope:eunuch_marry } + } + save_scope_as = emperor_marry + } + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2070.a + scope:eunuch_marry = { marry = scope:emperor_marry } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:emperor_marry } + reverse_add_opinion = { + target = scope:emperor_marry + modifier = angry_opinion + opinion = -15 + } + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2070.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:emperor_marry ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch_marry + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } +} + +################################################## +# Protégé +# by Joe Parkin +# 3000 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_family_protege_trigger = { + age >= 8 + is_ruler = no + is_available = yes + is_healthy = yes + top_liege ?= root.top_liege + age < $EUNUCH$.age + is_eunuch_trigger = no + OR = { + AND = { + is_male = yes + root.faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + root.faith = { has_doctrine = doctrine_gender_female_dominated } + } + root.faith = { has_doctrine = doctrine_gender_equal } + } +} + +ep3_story_cycle_admin_eunuch.3000 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.3000.t + desc = ep3_story_cycle_admin_eunuch.3000.desc + theme = administrative + override_background = { reference = garden } + left_portrait = { + character = scope:eunuch + animation = admiration + } + right_portrait = { + character = scope:protege + animation = personality_bold + } + cooldown = { years = 15 } + + trigger = { + primary_title = { + has_title_law_flag = appointment_type_succession + } + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + trigger_if = { + limit = { exists = scope:story_temp.var:eunuch_total } + scope:story_temp.var:eunuch_total >= 3 + } + NOR = { + exists = scope:protege_temp + exists = scope:puppet_temp + } + scope:eunuch_temp = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_family_protege_trigger = { EUNUCH = scope:eunuch_temp } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = scope:story_temp.var:eunuch_total + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { + random_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_family_protege_trigger = { EUNUCH = scope:eunuch } + } + weight = { + base = 1 + modifier = { add = sum_of_all_skills_value } + modifier = { + is_nibling_of = scope:eunuch + add = 20 + } + } + save_scope_as = protege + } + } + scope:protege ?= { + if = { + limit = { + employer != root + } + set_employer = root + } + } + scope:story = { + set_variable = { + name = protege + value = scope:protege + } + } + scope:protege = { + add_stewardship_skill = 1 + add_intrigue_skill = 1 + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.3000.a + primary_title = { + change_appointment_investment = { + target = scope:protege + value = appointment_score_major_value + } + } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_student_trigger = { + is_adult = yes + is_ruler = no + is_male = yes + is_available = yes + is_healthy = yes + top_liege ?= root.top_liege + age < scope:eunuch.age + is_eunuch_trigger = yes + NOR = { + has_relation_rival = scope:eunuch + scope:puppet ?= this + scope:protege ?= this + scope:rival ?= this + } +} + +ep3_story_cycle_admin_eunuch.3001 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.3001.t + desc = ep3_story_cycle_admin_eunuch.3001.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = scope:eunuch + animation = scheme + } + right_portrait = { + character = scope:student + animation = writing + } + cooldown = { years = 15 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + NOT = { exists = scope:student_temp } + trigger_if = { + limit = { exists = scope:story_temp.var:eunuch_total } + scope:story_temp.var:eunuch_total >= 5 + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = scope:story_temp.var:eunuch_total + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { + if = { + limit = { + any_close_family_member = { ep3_story_cycle_admin_eunuch_student_trigger = yes } + } + random_close_family_member = { + limit = { ep3_story_cycle_admin_eunuch_student_trigger = yes } + save_scope_as = student + } + } + else_if = { + limit = { + root = { + any_courtier = { ep3_story_cycle_admin_eunuch_student_trigger = yes } + } + } + random_courtier = { + limit = { ep3_story_cycle_admin_eunuch_student_trigger = yes } + save_scope_as = student + } + } + else = { + ep3_story_cycle_admin_eunuch_save_origin_effect = yes + create_character = { + culture = scope:origin.culture + faith = root.faith + location = root.location + gender = male + age = { + value = { + add = { + integer_range = { + min = 18 + max = 45 + } + } + max = { + value = { + value = scope:eunuch.age + add = -5 + } + } + } + } + random_traits_list = { + count = 1 + education_diplomacy_3 = { weight = { base = 30 } } + education_stewardship_3 = { weight = { base = 30 } } + education_intrigue_3 = { weight = { base = 30 } } + education_diplomacy_4 = { weight = { base = 10 } } + education_stewardship_4 = { weight = { base = 10 } } + education_intrigue_4 = { weight = { base = 10 } } + } + random_traits_list = { + count = 1 + beardless_eunuch = { weight = { base = 90 } } + eunuch_1 = { weight = { base = 10 } } + } + random_traits = yes + dynasty = none + save_scope_as = student + } + } + } + scope:student ?= { + if = { + limit = { employer != root } + set_employer = root + } + hidden_effect = { set_relation_mentor = scope:eunuch } + add_stewardship_skill = 1 + add_intrigue_skill = 1 + } + scope:story = { + set_variable = { name = student value = scope:student } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.3001.a + } +} + +################################################## +# Rival +# by Joe Parkin +# 3010 +################################################## + +ep3_story_cycle_admin_eunuch.3010 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.3010.t + desc = ep3_story_cycle_admin_eunuch.3010.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = scope:eunuch + animation = dismissal + } + right_portrait = { + character = scope:rival + animation = disapproval + } + cooldown = { years = 15 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + NOT = { exists = scope:rival_temp } + trigger_if = { + limit = { exists = scope:story_temp.var:eunuch_total } + scope:story_temp.var:eunuch_total >= 3 + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = scope:story_temp.var:eunuch_total + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + ep3_story_cycle_admin_eunuch_save_origin_effect = yes + random_courtier = { + limit = { + is_available = yes + is_adult = yes + is_eunuch_trigger = yes + NOR = { + scope:eunuch ?= this + scope:protege ?= this + scope:student ?= this + has_relation_friend = scope:eunuch + has_relation_lover = scope:eunuch + is_close_family_of = root + is_close_family_of = scope:eunuch + } + trigger_if = { + limit = { exists = house } + NOR = { + house = root.top_liege.house + house = scope:eunuch.house + } + } + } + save_scope_as = rival + } + if = { + limit = { NOT = { exists = scope:rival } } + create_character = { + culture = scope:origin.culture + faith = root.faith + location = root.location + gender = male + age = { + value = { + add = { + integer_range = { + min = 25 + max = 55 + } + } + } + } + random_traits_list = { + count = 1 + education_diplomacy_3 = { weight = { base = 30 } } + education_stewardship_3 = { weight = { base = 30 } } + education_intrigue_3 = { weight = { base = 30 } } + education_diplomacy_4 = { weight = { base = 10 } } + education_stewardship_4 = { weight = { base = 10 } } + education_intrigue_4 = { weight = { base = 10 } } + } + random_traits_list = { + count = 1 + beardless_eunuch = { weight = { base = 90 } } + eunuch_1 = { weight = { base = 10 } } + } + random_traits = yes + dynasty = none + save_scope_as = rival + } + } + scope:story = { + set_variable = { + name = rival + value = scope:rival + } + } + scope:rival ?= { + if = { + limit = { employer != root } + root = { add_courtier = scope:rival } + } + set_relation_rival = { + target = scope:eunuch + reason = rival_admin_eunuch + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.3010.a + show_as_tooltip = { + scope:rival ?= { + set_relation_rival = { + target = scope:eunuch + reason = rival_admin_eunuch + } + } + } + } +} + +################################################## +# Affair Accusation +# by Joe Parkin +# 4000 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_spouse_cuckolder_trigger = { + is_adult = yes + is_attracted_to_gender_of = $SPOUSE$ + NOR = { + is_close_family_of = $EUNUCH$ + is_close_family_of = root + is_close_family_of = $SPOUSE$ + } + trigger_if = { + limit = { is_married = yes } + might_cheat_on_every_partner_trigger = yes + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_spouse_accusation_trigger = { + is_adult = yes + reverse_opinion = { + target = $EUNUCH$ + value < 25 + } + opinion = { + target = $EUNUCH$ + value < 25 + } + NOR = { + has_relation_friend = $EUNUCH$ + has_relation_lover = $EUNUCH$ + any_relation = { + type = lover + is_close_family_of = $EUNUCH$ + } + } + save_temporary_scope_as = spouse_temp + OR = { + any_secret = { + type = secret_lover + secret_target != root + } + root = { + OR = { + any_courtier = { + ep3_story_cycle_admin_eunuch_spouse_cuckolder_trigger = { EUNUCH = $EUNUCH$ SPOUSE = scope:spouse_temp } + } + any_vassal_or_below = { + ep3_story_cycle_admin_eunuch_spouse_cuckolder_trigger = { EUNUCH = $EUNUCH$ SPOUSE = scope:spouse_temp } + } + } + } + } +} + +ep3_story_cycle_admin_eunuch.4000 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.4000.t + desc = ep3_story_cycle_admin_eunuch.4000.desc + theme = administrative + override_background = { reference = corridor_night } + left_portrait = { + character = scope:eunuch + animation = scheme + } + right_portrait = { + character = root + animation = eavesdrop + } + lower_left_portrait = scope:spouse + lower_center_portrait = scope:cuckolder + cooldown = { years = 10 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp.var:eunuch_total >= 3 + any_spouse = { + ep3_story_cycle_admin_eunuch_spouse_accusation_trigger = { EUNUCH = scope:eunuch_temp } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_spouse = { + any_secret = { + type = secret_lover + secret_target != root + } + } + add = 1 + } + modifier = { + any_spouse = { might_cheat_on_every_partner_trigger = yes } + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + any_spouse = { has_relation_rival = scope:eunuch_temp } + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + any_spouse = { + ep3_story_cycle_admin_eunuch_spouse_accusation_trigger = { EUNUCH = scope:eunuch_temp } + has_trait = lustful + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + play_music_cue = "mx_cue_secret" + random_spouse = { + limit = { + ep3_story_cycle_admin_eunuch_spouse_accusation_trigger = { EUNUCH = scope:eunuch } + } + weight = { + base = 1 + modifier = { + has_trait = lustful + add = 1 + } + modifier = { + any_secret = { type = secret_lover } + add = 1 + } + modifier = { + has_relation_rival = scope:eunuch + add = 1 + } + } + save_scope_as = spouse + if = { + limit = { + any_secret = { + type = secret_lover + secret_target != root + } + } + random_secret = { + type = secret_lover + limit = { + secret_target != root + } + save_scope_as = secret + hidden_effect = { reveal_to = scope:eunuch } + } + } + else = { + root = { + every_courtier = { + limit = { + ep3_story_cycle_admin_eunuch_spouse_cuckolder_trigger = { EUNUCH = scope:eunuch SPOUSE = scope:spouse } + } + add_to_list = potential_cuckolders + } + every_vassal_or_below = { + limit = { + ep3_story_cycle_admin_eunuch_spouse_cuckolder_trigger = { EUNUCH = scope:eunuch SPOUSE = scope:spouse } + } + add_to_list = potential_cuckolders + } + } + random_in_list = { + list = potential_cuckolders + weight = { + base = 1 + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + } + save_scope_as = cuckolder + } + } + } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:spouse } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:cuckolder } + } + + option = { # Discover + name = ep3_story_cycle_admin_eunuch.4000.a + trigger = { + NOT = { + any_known_secret = { + secret_owner = scope:spouse + secret_type = secret_lover + secret_target != root + } + } + } + duel = { + target = scope:eunuch + skill = intrigue + 10 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_admin_eunuch.4000.success + custom_tooltip = ep3_story_cycle_admin_eunuch.4000.success.tt + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.4000.success + left_icon = scope:eunuch + right_icon = scope:spouse + if = { + limit = { exists = scope:secret } + scope:secret ?= { reveal_to = root } + } + else = { custom_tooltip = ep3_story_cycle_admin_eunuch.4000.innocent } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + show_chance = no + desc = ep3_story_cycle_admin_eunuch.4000.failure + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.4000.failure + left_icon = scope:eunuch + right_icon = scope:spouse + custom_tooltip = ep3_story_cycle_admin_eunuch.4010.failure.tt + } + } + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:cuckolder + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.4000.b + trigger = { + any_known_secret = { + secret_owner = scope:spouse + secret_type = secret_lover + secret_target != root + } + } + reason = ep3_story_cycle_admin_eunuch.4000.b.reason + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:spouse + multiplier = 0.25 + } + } + } + + option = { # Imprison + name = ep3_story_cycle_admin_eunuch.4000.c + add_tyranny = medium_tyranny_gain + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:spouse + IMPRISONER = root + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:cuckolder + IMPRISONER = root + } + stress_impact = { + forgiving = minor_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:spouse + multiplier = -0.25 + } + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Seduction +# by Joe Parkin +# 4010 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_cheating_spouse_trigger = { + is_ai = yes + might_cheat_on_every_partner_trigger = yes + trigger_if = { + limit = { is_male = yes } + NOT = { + root.faith = { has_doctrine_parameter = adultery_male_accepted } + } + } + trigger_else = { + NOT = { + root.faith = { has_doctrine_parameter = adultery_female_accepted } + } + } + opinion = { + target = root + value < 25 + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_seducer_trigger = { + is_attracted_to_gender_of = $SPOUSE$ + is_eunuch_trigger = no + NOR = { + has_trait = celibate + is_close_family_of = $SPOUSE$ + has_relation_rival = $SPOUSE$ + } + save_temporary_scope_as = seducer_temp +} + +ep3_story_cycle_admin_eunuch.4010 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.4010.t + desc = ep3_story_cycle_admin_eunuch.4010.desc + theme = administrative + override_background = { reference = bedchamber } + cooldown = { years = 15 } + left_portrait = { + character = root + animation = stress + } + lower_left_portrait = scope:seducer + lower_center_portrait = scope:spouse + lower_right_portrait = scope:eunuch + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:story_temp.var:eunuch_total >= 3 + scope:eunuch_temp = { + opinion = { + target = root + value < 25 + } + } + any_spouse = { + ep3_story_cycle_admin_eunuch_cheating_spouse_trigger = yes + save_temporary_scope_as = spouse_temp + scope:eunuch_temp = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_seducer_trigger = { SPOUSE = scope:spouse_temp } + } + } + is_attracted_to_gender_of = scope:seducer_temp + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_ai = yes + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:eunuch_temp ?= { has_relation_rival = root } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + play_music_cue = "mx_cue_secret" + random_spouse = { + limit = { + ep3_story_cycle_admin_eunuch_cheating_spouse_trigger = yes + save_temporary_scope_as = spouse_temp + scope:eunuch = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_seducer_trigger = { SPOUSE = scope:spouse_temp } + } + } + is_attracted_to_gender_of = scope:seducer_temp + } + save_scope_as = spouse + scope:eunuch = { + ordered_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_seducer_trigger = { SPOUSE = scope:spouse } + scope:spouse = { is_attracted_to_gender_of = scope:seducer_temp } + } + order_by = attraction + save_scope_as = seducer + } + } + } + scope:story = { + set_variable = { name = spouse value = scope:spouse } + set_variable = { name = seducer value = scope:seducer } + } + hidden_effect = { + random = { + chance = 50 + scope:seducer ?= { + set_relation_lover = scope:spouse + had_sex_with_effect = { + CHARACTER = scope:spouse + PREGNANCY_CHANCE = seduce_pregnancy_chance + } + random_secret = { + type = secret_lover + limit = { + secret_target = scope:spouse + } + save_scope_as = secret + } + } + scope:eunuch = { + if = { + limit = { + OR = { + can_start_scheme = { type = murder target_character = root } + is_scheming_against = { type = murder target = root } + } + } + if = { + limit = { + can_start_scheme = { type = murder target_character = root } + } + start_scheme = { type = murder target_character = root } + } + random_scheme = { + type = murder + limit = { + scheme_target_character = root + } + save_scope_as = scheme + } + scope:scheme ?= { + if = { + limit = { NOT = { scheme_is_character_agent = scope:spouse } } + add_agent_slot = agent_lookout + random_scheme_agent_slot = { + limit = { + is_filled = no + save_temporary_scope_as = slot_temp + scope:spouse = { is_valid_as_agent_in_slot = scope:slot_temp } + } + save_scope_as = spouse_slot + } + scope:spouse = { + force_add_to_agent_slot = { + agent_slot = scope:spouse_slot + years = 1 + } + } + } + if = { + limit = { NOT = { scheme_is_character_agent = scope:spouse } } + add_agent_slot = agent_assassin + random_scheme_agent_slot = { + limit = { + is_filled = no + save_temporary_scope_as = slot_temp + scope:seducer = { is_valid_as_agent_in_slot = scope:slot_temp } + } + save_scope_as = seducer_slot + } + scope:seducer = { + force_add_to_agent_slot = { + agent_slot = scope:seducer_slot + years = 1 + } + } + } + } + } + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.4010.a + duel = { + skill = intrigue + target = scope:eunuch + 10 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_admin_eunuch.4000.success + custom_tooltip = ep3_story_cycle_admin_eunuch.4000.success.tt + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.4000.success + left_icon = scope:eunuch + right_icon = scope:spouse + scope:secret ?= { reveal_to = root } + scope:scheme ?= { + expose_scheme = yes + if = { + limit = { scheme_is_character_agent = scope:spouse } + expose_scheme_agent = scope:spouse + } + if = { + limit = { scheme_is_character_agent = scope:seducer } + expose_scheme_agent = scope:seducer + } + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + show_chance = no + desc = ep3_story_cycle_admin_eunuch.4000.failure + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.4000.failure + left_icon = scope:eunuch + right_icon = scope:spouse + custom_tooltip = ep3_story_cycle_admin_eunuch.4010.failure.tt + } + } + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } + + option = { # Imprison + name = ep3_story_cycle_admin_eunuch.4010.c + add_tyranny = major_tyranny_gain + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:spouse + IMPRISONER = root + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:seducer + IMPRISONER = root + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:eunuch + IMPRISONER = root + } + stress_impact = { + forgiving = minor_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:spouse + multiplier = -0.25 + } + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.4010.d + add_prestige = medium_prestige_loss + stress_impact = { + vengeful = minor_stress_impact_gain + trusting = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:spouse + multiplier = 0.25 + } + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_boldness = -0.5 + ai_honor = -0.25 + } + } + } +} + +################################################## +# Upset Courtiers +# by Joe Parkin +# 5000 +################################################## + +ep3_story_cycle_admin_eunuch.5000 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.5000.t + desc = ep3_story_cycle_admin_eunuch.5000.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:whinger + animation = debating + } + lower_center_portrait = scope:eunuch + cooldown = { years = 2 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:story_temp ?= { + var:eunuch_score >= 2 + any_in_list = { + variable = upset_courtiers + count >= 2 + } + any_in_list = { + variable = upset_courtiers + is_available = yes + top_liege ?= root.top_liege + NOT = { has_character_flag = admin_rival_whinger_cooldown } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:story_temp ?= { + any_in_list = { + variable = upset_courtiers + count >= 4 + } + } + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:story_temp ?= { + any_in_list = { + variable = upset_courtiers + count >= 6 + } + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:story = { + every_in_list = { + variable = upset_courtiers + limit = { + is_available = yes + top_liege ?= root.top_liege + NOT = { has_character_flag = admin_rival_whinger_cooldown } + } + add_to_list = upset_courtiers + } + } + ordered_in_list = { + list = upset_courtiers + limit = { + is_available = yes + top_liege ?= root.top_liege + NOT = { has_character_flag = admin_rival_whinger_cooldown } + } + order_by = highest_held_title_tier + save_scope_as = whinger + add_character_flag = { flag = admin_rival_whinger_cooldown years = 5 } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.5000.a + reverse_add_opinion = { + target = scope:whinger + modifier = angry_opinion + opinion = -15 + } + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.5000.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + reverse_add_opinion = { + target = scope:whinger + modifier = pleased_opinion + opinion = 15 + } + stress_impact = { + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:whinger + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } +} + +################################################## +# Upset Family +# by Joe Parkin +# 5010 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_rival_family_trigger = { + age >= 8 + top_liege = root.top_liege + NOR = { + has_trait = fickle + has_trait = humble + has_trait = content + has_trait = trusting + has_any_scripted_relation = $EUNUCH$ + this = $EUNUCH$ + has_character_flag = admin_rival_whinger_cooldown + } +} + +ep3_story_cycle_admin_eunuch.5010 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.5010.t + desc = ep3_story_cycle_admin_eunuch.5010.desc + theme = administrative + left_portrait = { + character = scope:rival + animation = dismissal + } + right_portrait = { + character = scope:eunuch + animation = debating + } + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp.var:eunuch_total >= 3 + OR = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_rival_family_trigger = { EUNUCH = scope:eunuch_temp } + } + any_spouse = { + ep3_story_cycle_admin_eunuch_rival_family_trigger = { EUNUCH = scope:eunuch_temp } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_active_diarchy = yes + add = 1 + } + modifier = { + exists = player_heir + primary_title.current_heir != player_heir + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + exists = primary_title.current_heir + scope:eunuch_temp ?= { is_close_family_of = root.primary_title.current_heir } + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp ?= { + any_in_list = { + variable = upset_courtiers + OR = { + is_close_family_of = root + is_spouse_of = root + } + } + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + every_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_rival_family_trigger = { EUNUCH = scope:eunuch } + } + add_to_list = potential_rivals + } + every_spouse = { + limit = { + ep3_story_cycle_admin_eunuch_rival_family_trigger = { EUNUCH = scope:eunuch } + } + add_to_list = potential_rivals + } + random_in_list = { + list = potential_rivals + weight = { + base = 1 + modifier = { + this = root.player_heir + add = 1 + } + } + save_scope_as = rival + set_relation_rival = { reason = rival_admin_eunuch_family target = scope:eunuch } + add_character_flag = { + flag = admin_rival_whinger_cooldown + years = 6 + } + scope:story = { + add_to_variable_list = { + name = upset_courtiers + target = scope:rival + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.5010.a + reverse_add_opinion = { + target = scope:rival + modifier = angry_opinion + opinion = -15 + } + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.5010.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + reverse_add_opinion = { + target = scope:rival + modifier = pleased_opinion + opinion = 15 + } + stress_impact = { + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:rival + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } +} + +################################################## +# Puppet Heir +# by Joe Parkin +# 5020 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_puppet_heir_trigger = { + this != root.primary_title.current_heir + age >= 8 + top_liege = root.top_liege + is_playable_character = no + OR = { + is_adult = no + has_trait = intellect_bad + has_trait = incapable + has_relation_friend = $EUNUCH$ + NAND = { + has_trait = ambitious + has_trait = diligent + has_trait = paranoid + } + } + sum_of_all_skills_value < root.primary_title.current_heir.sum_of_all_skills_value + save_temporary_scope_as = puppet_temp +} + +ep3_story_cycle_admin_eunuch.5020 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.5020.t + desc = ep3_story_cycle_admin_eunuch.5020.desc + theme = administrative + left_portrait = { + character = scope:puppet + animation = happiness + } + right_portrait = { + character = scope:eunuch + animation = admiration + } + override_background = { reference = garden } + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + trigger_if = { + limit = { exists = scope:story_temp.var:eunuch_total } + scope:story_temp.var:eunuch_total >= 3 + } + NOR = { + exists = scope:protege_temp + exists = scope:puppet_temp + } + any_close_family_member = { + ep3_story_cycle_admin_eunuch_puppet_heir_trigger = { EUNUCH = scope:eunuch_temp } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_active_diarchy = yes + add = 1 + } + modifier = { + player_heir ?= primary_title.current_heir + add = 1 + } + modifier = { + player_heir ?= { is_adult = no } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + primary_title.current_heir = { save_scope_as = current_heir } + random_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_puppet_heir_trigger = { EUNUCH = scope:eunuch } + } + save_scope_as = puppet + set_relation_friend = { reason = friend_admin_eunuch_puppet target = scope:eunuch } + } + scope:story = { set_variable = { name = puppet value = scope:puppet } } + } + + option = { + name = ep3_story_cycle_admin_eunuch.5020.a + scope:puppet = { + add_character_modifier = { + modifier = admin_eunuch_puppet_modifier + years = 10 + } + } + primary_title = { + change_appointment_investment = { + target = scope:puppet + value = appointment_score_major_value + } + } + } +} + +################################################## +# Coup +# by Joe Parkin +# 6000 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_coup_trigger = { + opinion = { + target = root + value < 50 + } + NOR = { + has_relation_friend = root + is_spouse_of = root + has_trait = eunuch_1 + has_trait = beardless_eunuch + has_trait = blind + } + save_temporary_scope_as = coupist_temp +} + +scripted_effect ep3_story_cycle_admin_eunuch_coup_effect = { + create_title_and_vassal_change = { + type = conquest + save_scope_as = title_change + add_claim_on_loss = yes + } + primary_title = { + change_title_holder = { + holder = scope:coupist + change = scope:title_change + } + } + hidden_effect = { + every_held_title = { + title_tier >= county + limit = { + is_noble_family_title = no + is_landless_type_title = no + this != scope:emperor.primary_title + } + change_title_holder = { + holder = scope:coupist + change = scope:title_change + } + } + } + resolve_title_and_vassal_change = scope:title_change +} + +ep3_story_cycle_admin_eunuch.6000 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.6000.t + desc = { + desc = ep3_story_cycle_admin_eunuch.6000.desc + first_valid = { + triggered_desc = { + trigger = { scope:coupist ?= { is_close_family_of = root } } + desc = ep3_story_cycle_admin_eunuch.6000.family + } + } + desc = ep3_story_cycle_admin_eunuch.6000.body + first_valid = { + triggered_desc = { + trigger = { scope:coupist.house ?= scope:emperor.house } + desc = ep3_story_cycle_admin_eunuch.6000.family + } + triggered_desc = { + trigger = { + has_diarchy_type = co_emperorship + has_active_diarchy = yes + scope:coupist ?= diarch + } + desc = ep3_story_cycle_admin_eunuch.6000.co_caesar + } + triggered_desc = { + trigger = { scope:coupist.house ?= scope:eunuch.house } + desc = ep3_story_cycle_admin_eunuch.6000.eunuch_family + } + triggered_desc = { + trigger = { + has_diarchy_type = regency + has_active_diarchy = yes + scope:coupist ?= diarch + } + desc = ep3_story_cycle_admin_eunuch.6000.regent + } + desc = ep3_story_cycle_admin_eunuch.6000.fallback + } + } + theme = administrative + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:eunuch + animation = war_over_win + } + lower_center_portrait = scope:coupist + lower_right_portrait = scope:bodyguard + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + is_at_war = no + trigger_if = { + limit = { exists = scope:story_temp.var:eunuch_total } + scope:story_temp.var:eunuch_total >= 5 + } + scope:eunuch_temp ?= { + opinion = { + target = root + value < 25 + } + OR = { + has_relation_rival = root + has_trait = ambitious + opinion = { + target = root + value <= -50 + } + scope:story_temp.var:eunuch_refusals >= 3 + } + NOR = { + has_relation_friend = root + is_spouse_of = root + } + } + OR = { + scope:puppet_temp ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + scope:seducer_temp ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + scope:protege_temp ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + } + OR = { + any_targeting_faction = { + faction_type = claimant_faction + special_character = scope:coupist_temp + } + any_vassal = { + is_landed = yes + can_create_faction = { + type = claimant_faction + target = scope:emperor_temp + } + NOR = { + is_allied_to = scope:emperor_temp + is_close_family_of = scope:emperor_temp + is_spouse_of = scope:emperor_temp + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = { + value = scope:story_temp.var:eunuch_score + min = 0 + } + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + OR = { + diarch ?= scope:puppet_temp + diarch ?= scope:seducer_temp + diarch ?= scope:protege_temp + } + has_active_diarchy = yes + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + OR = { + diarch ?= scope:puppet_temp + diarch ?= scope:seducer_temp + diarch ?= scope:protege_temp + } + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:eunuch_temp ?= { + OR = { + has_trait = schemer + has_trait = education_intrigue + has_council_position = councillor_spymaster + has_court_position = chief_eunuch_court_position + } + } + add = 1 + } + modifier = { + any_targeting_faction = { count > 1 } + add = 1 + } + modifier = { + age >= 50 + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + hidden_effect = { + random_list = { + 10 = { + trigger = { + scope:puppet ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + } + modifier = { add = scope:puppet.sum_of_all_skills_value } + scope:puppet = { save_scope_as = coupist } + } + 10 = { + trigger = { + scope:seducer ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + } + modifier = { add = scope:seducer.sum_of_all_skills_value } + scope:seducer = { save_scope_as = coupist } + } + 10 = { + trigger = { + scope:protege ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + } + modifier = { add = scope:protege.sum_of_all_skills_value } + scope:protege = { save_scope_as = coupist } + } + } + } + scope:coupist = { + if = { + limit = { + NOT = { has_claim_on = root.primary_title } + } + add_unpressed_claim = root.primary_title + } + } + random_court_position_holder = { + limit = { + has_court_position = bodyguard_court_position + is_available = yes + NOR = { + this = scope:coupist + this = scope:eunuch + } + } + save_scope_as = bodyguard + } + random_targeting_faction = { + faction_type = claimant_faction + limit = { + special_character = scope:coupist + } + save_scope_as = faction + } + if = { + limit = { + NOT = { exists = scope:faction } + } + scope:story = { + ordered_in_list = { + variable = eunuch_allies + limit = { + can_create_faction = { + type = claimant_faction + target = scope:emperor + } + } + order_by = current_military_strength + save_scope_as = faction_starter + } + } + if = { + limit = { NOT = { exists = scope:faction_starter } } + ordered_vassal = { + limit = { + is_landed = yes + can_create_faction = { + type = claimant_faction + target = scope:emperor + } + NOR = { + has_relation_rival = scope:emperor + is_allied_to = scope:emperor + is_close_family_of = scope:emperor + } + } + save_scope_as = faction_starter + } + } + scope:faction_starter ?= { + create_faction = { + type = claimant_faction + target = scope:emperor + } + hidden_effect = { + joined_faction ?= { + save_scope_as = faction + set_special_character = scope:coupist + set_special_title = root.primary_title + } + } + } + } + scope:eunuch ?= { + if = { + limit = { + NOT = { + scope:faction = { any_faction_member = { this = scope:eunuch } } + } + can_join_faction = scope:faction + } + join_faction = scope:faction + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.6000.a + duel = { + skills = { diplomacy intrigue } + value = decent_skill_rating + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + modifier = { + scope:bodyguard ?= { + opinion = { + target = scope:emperor + value > 50 + } + } + add = 5 + } + modifier = { + has_character_modifier = admin_eunuch_liege_1_modifier + add = 2 + } + modifier = { + has_character_modifier = admin_eunuch_liege_2_modifier + add = 4 + } + modifier = { + has_character_modifier = admin_eunuch_liege_3_modifier + add = 6 + } + min = 1 + desc = ep3_story_cycle_admin_eunuch.6000.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_story_cycle_admin_eunuch.6000.a.success + left_icon = scope:eunuch + right_icon = scope:coupist + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:eunuch + IMPRISONER = scope:emperor + } + reverse_add_opinion = { + target = scope:coupist + modifier = angry_opinion + opinion = -25 + } + } + scope:story = { + if = { + limit = { + any_in_list = { + variable = upset_courtiers + is_alive = yes + top_liege = root + NOT = { scope:coupist ?= this } + } + } + every_in_list = { + variable = upset_courtiers + limit = { + is_alive = yes + top_liege = root + NOT = { scope:coupist ?= this } + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + } + end_story = yes + } + } + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + modifier = { + scope:bodyguard ?= { + opinion = { + target = scope:emperor + value < -50 + } + } + add = 5 + } + modifier = { + has_character_modifier = admin_eunuch_liege_4_modifier + add = 2 + } + modifier = { + has_character_modifier = admin_eunuch_liege_5_modifier + add = 4 + } + modifier = { + has_character_modifier = admin_eunuch_liege_6_modifier + add = 6 + } + modifier = { + has_character_modifier = admin_eunuch_liege_7_modifier + add = 8 + } + modifier = { + has_character_modifier = admin_eunuch_liege_8_modifier + add = 10 + } + min = 1 + desc = ep3_story_cycle_admin_eunuch.6000.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.6000.a.failure + left_icon = scope:eunuch + right_icon = scope:coupist + ep3_story_cycle_admin_eunuch_coup_effect = yes + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:emperor + IMPRISONER = scope:coupist + } + } + } + } + stress_impact = { + calm = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + humble = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.6000.c + add_legitimacy = major_legitimacy_loss + every_targeting_faction = { add_faction_discontent = 25 } + stress_impact = { + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + ai_boldness = -0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.6000.d + ep3_story_cycle_admin_eunuch_coup_effect = yes + stress_impact = { + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +################################################## +# Accession +# by Joe Parkin +# 8000 +################################################## + +scripted_trigger ep3_admin_story_cycle_valid_switch_character_trigger = { + is_alive = yes + employer = root + is_playable_character = no + trigger_if = { + limit = { is_imprisoned = yes } + is_imprisoned_by = root + } +} + +ep3_story_cycle_admin_eunuch.8000 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.8000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_title = title:e_byzantium } + desc = ep3_story_cycle_admin_eunuch.8000.intro_byz + } + desc = ep3_story_cycle_admin_eunuch.8000.intro + } + first_valid = { + triggered_desc = { + trigger = { is_close_family_of = scope:previous_story_owner } + desc = ep3_story_cycle_admin_eunuch.8000.intro_family + } + triggered_desc = { + trigger = { + OR = { + scope:previous_story_owner.killer ?= root + primary_title = { + recent_history = { type = conquest days = 5 } + } + } + } + desc = ep3_story_cycle_admin_eunuch.8000.intro_enemy + } + desc = ep3_story_cycle_admin_eunuch.8000.intro_fallback + } + desc = ep3_story_cycle_admin_eunuch.8000.desc + } + theme = administrative + left_portrait = { + character = root + animation = war_over_tie + } + right_portrait = { + character = scope:eunuch + animation = admiration + } + lower_center_portrait = scope:previous_story_owner + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch ?= { + if = { + limit = { + is_alive = yes + is_playable_character = no + employer != root + } + set_employer = root + } + } + scope:student ?= { + if = { + limit = { + is_alive = yes + is_playable_character = no + employer != root + } + set_employer = root + } + } + scope:rival ?= { + if = { + limit = { + is_alive = yes + is_playable_character = no + employer != root + } + set_employer = root + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.8000.a + trigger = { + OR = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + scope:eunuch ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + } + flavor = admin_eunuch_flavor_tt + change_influence = medium_influence_loss + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = liege } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + move_to_pool = yes + } + scope:protege ?= { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + scope:student ?= { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + scope:rival ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + scope:story = { + if = { + limit = { + any_in_list = { + variable = upset_courtiers + is_alive = yes + top_liege = root + NOR = { + scope:protege ?= this + scope:student ?= this + scope:rival ?= this + } + } + } + every_in_list = { + variable = upset_courtiers + limit = { + is_alive = yes + top_liege = root + NOR = { + scope:protege ?= this + scope:student ?= this + scope:rival ?= this + } + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + } + end_story = yes + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.8000.b + trigger = { + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:student = { + if = { + limit = { employer != root } + set_employer = root + } + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = scope:eunuch + FIRST_TYPE = eunuch + SECOND = scope:student + SECOND_TYPE = eunuch + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = scope:eunuch + FIRST_TYPE = eunuch + SECOND = root + SECOND_TYPE = liege + } + scope:eunuch ?= { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + scope:protege ?= { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -25 + } + } + scope:story = { + set_variable = { name = eunuch value = scope:student } + remove_variable = student + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.8000.c + trigger = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:rival = { + if = { + limit = { employer != root } + set_employer = root + } + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = scope:eunuch + FIRST_TYPE = eunuch + SECOND = scope:rival + SECOND_TYPE = eunuch + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = scope:eunuch + FIRST_TYPE = eunuch + SECOND = root + SECOND_TYPE = liege + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + scope:protege ?= { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -25 + } + } + scope:story = { + set_variable = { name = eunuch value = scope:rival } + remove_variable = rival + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.8000.d + trigger = { + scope:eunuch ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:eunuch = { + if = { + limit = { employer != root } + set_employer = root + } + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = scope:eunuch + FIRST_TYPE = eunuch + SECOND = root + SECOND_TYPE = liege + } + scope:rival ?= { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -25 + } + } + scope:story = { + every_in_list = { + list = upset_courtiers + limit = { top_liege = root.top_liege } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + } + } +} + +################################################## +# Eunuch Dead +# by Joe Parkin +# 8010 +################################################## + +ep3_story_cycle_admin_eunuch.8010 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.8010.t + desc = ep3_story_cycle_admin_eunuch.8010.desc + theme = administrative + override_background = { reference = ce1_catacombs } + left_portrait = { + character = scope:eunuch + animation = dead + } + right_portrait = { + character = scope:protege + animation = grief + trigger = { is_alive = yes } + } + lower_right_portrait = { + character = scope:student + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + lower_center_portrait = { + character = scope:rival + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + trigger = { + any_owned_story = { + type = story_cycle_admin_eunuch + var:eunuch ?= { is_alive = no } + } + } + immediate = { + play_music_cue = mx_cue_death + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.b + trigger = { + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:student } + remove_variable = student + } + scope:student = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:student + SECOND_TYPE = eunuch + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.c + trigger = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:rival } + remove_variable = rival + } + scope:rival = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:rival + SECOND_TYPE = eunuch + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8010.d + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = liege } + scope:story = { end_story = yes } + } +} + +################################################## +# Eunuch Jailed +# by Joe Parkin +# 8020 +################################################## + +ep3_story_cycle_admin_eunuch.8020 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.8020.t + desc = ep3_story_cycle_admin_eunuch.8020.desc + theme = administrative + override_background = { reference = dungeon_scope } + left_portrait = { + character = scope:background_dungeon_scope + animation = war_over_tie + } + right_portrait = { + character = scope:eunuch + animation = prisonhouse + } + lower_right_portrait = { + character = scope:student + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + lower_center_portrait = { + character = scope:rival + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + trigger = { + any_owned_story = { + type = story_cycle_admin_eunuch + var:eunuch ?= { is_imprisoned = yes } + } + } + immediate = { + play_music_cue = "mx_cue_prison" + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch.imprisoner = { save_scope_as = background_dungeon_scope } + } + cooldown = { days = 1 } + option = { + name = ep3_story_cycle_admin_eunuch.8020.a + trigger = { scope:background_dungeon_scope = root } + scope:eunuch = { release_from_prison = yes } + stress_impact = { + vengeful = minor_stress_impact_gain + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8020.a + trigger = { scope:background_dungeon_scope != root } + scope:eunuch = { save_scope_as = prisoner } + save_scope_as = payer + scope:background_dungeon_scope = { save_scope_as = imprisoner } + pay_short_term_gold = { + gold = scope:prisoner.ransom_cost_value + target = scope:imprisoner + } + scope:prisoner = { release_from_prison = yes } + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.b + trigger = { + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:student } + remove_variable = student + } + scope:student = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:student + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + stress_impact = { + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:student + multiplier = 0.25 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.c + trigger = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:rival } + remove_variable = rival + } + scope:rival = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:rival + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + stress_impact = { + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:rival + multiplier = 0.25 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8020.d + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = liege } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + scope:story = { end_story = yes } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } +} + +################################################## +# Eunuch Moved +# by Joe Parkin +# 8030 +################################################## + +ep3_story_cycle_admin_eunuch.8030 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.8030.t + desc = ep3_story_cycle_admin_eunuch.8030.desc + theme = administrative + override_background = { reference = throne_room_scope } + left_portrait = { + character = scope:eunuch + animation = writing + } + right_portrait = { + character = scope:background_throne_room_scope + animation = idle + trigger = { + NOR = { + this = root + this = scope:eunuch + } + } + } + lower_right_portrait = { + character = scope:student + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + lower_center_portrait = { + character = scope:rival + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + trigger = { + any_owned_story = { + type = story_cycle_admin_eunuch + exists = var:eunuch.employer + var:eunuch.employer != story_owner + } + } + immediate = { + play_music_cue = "mx_cue_negative" + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch.liege = { save_scope_as = background_throne_room_scope } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.a + pay_short_term_gold = { + target = scope:eunuch + gold = minor_gold_value + } + add_courtier = scope:eunuch + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + gold < medium_gold_value + factor = 0 + } + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.5 + } + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.b + trigger = { + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:student } + remove_variable = student + } + scope:student = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:student + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:student + multiplier = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.c + trigger = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:rival } + remove_variable = rival + } + scope:rival = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:rival + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:rival + multiplier = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.d + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = liege } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + scope:story = { end_story = yes } + ai_chance = { + base = 25 + } + } +} + +################################################## +# Eunuch Ruler +# by Joe Parkin +# 8040 +################################################## + +ep3_story_cycle_admin_eunuch.8040 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.8040.t + desc = { + desc = ep3_story_cycle_admin_eunuch.8040.desc + first_valid = { + triggered_desc = { + trigger = { scope:eunuch = { has_government = landless_adventurer_government } } + desc = ep3_story_cycle_admin_eunuch.8040.laamp + } + triggered_desc = { + trigger = { scope:eunuch.primary_title ?= { is_noble_family_title = yes } } + desc = ep3_story_cycle_admin_eunuch.8040.noble_family + } + desc = ep3_story_cycle_admin_eunuch.8040.ruler + } + } + theme = administrative + override_background = { reference = throne_room_scope } + left_portrait = { + character = scope:eunuch + animation = war_over_win + } + lower_right_portrait = { + character = scope:student + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + lower_center_portrait = { + character = scope:rival + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + trigger = { + any_owned_story = { + type = story_cycle_admin_eunuch + var:eunuch ?= { is_playable_character = yes } + } + } + immediate = { + play_music_cue = "mx_cue_negative" + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { save_scope_as = background_throne_room_scope } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.b + trigger = { + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:student } + remove_variable = student + } + scope:student = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:student + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:student + multiplier = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.c + trigger = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:rival } + remove_variable = rival + } + scope:rival = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:rival + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:rival + multiplier = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8040.d + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = liege } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + scope:story = { end_story = yes } + ai_chance = { + base = 25 + } + } +} + +################################################## +# Maintenance +# by Joe Parkin +# 9000-9999 +################################################## + +ep3_story_cycle_admin_eunuch.9980 = { # Story cycle inheritance + scope = landed_title + hidden = yes + trigger = { exists = scope:story } + immediate = { + # Should be inherited, so transfer to heir + if = { + limit = { exists = holder } + holder = { save_scope_as = new_story_owner } + scope:story = { + make_story_owner = scope:new_story_owner + story_owner = { + trigger_event = { + id = ep3_story_cycle_admin_eunuch.8000 + days = 3 + } + } + } + } + # Or end + else = { scope:story = { end_story = yes } } + debug_log_scopes = yes + } +} diff --git a/N3OW/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt b/N3OW/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt new file mode 100644 index 00000000..8cc4a3b4 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt @@ -0,0 +1,4234 @@ +namespace = grand_ambitions + +####################################### +### +### ONGOING STORY CYCLE EVENTS +### +### 0001-0099 Story Entry Points +### 0100-0149 Claimant Faction Route +### 0150-0199 Depose Scheme Route +### 0200-0290 Conclusion +### 0300-0390 Follow-Ups +### 0500-0599 Maintenance +### +####################################### + +####################################### +### +### ENTRY POINTS TO THE STORY +### +### 0001 Powerful Family Coup +### 0002 Claimant Faction Wins +### 0003 Prev Emperor Becomes LAAMP +### 0004 LAAMP Creation (Hidden) +### +####################################### + +scripted_effect create_grand_ambitions_story = { + # VARIABLE OPTIONS + # method = coup / scheme + create_story = { + type = grand_ambitions_story_cycle + save_scope_as = new_story + } + random_owned_story = { + type = grand_ambitions_story_cycle + save_scope_as = grand_ambitions_story + set_variable = { + name = method + value = flag:$METHOD$ + } + set_variable = { + name = target_char + value = root.top_liege + } + set_variable = { + name = target_title + value = var:target_char.primary_title + } + } + + # Create or increment global variable to track how many of these are going on at once + if = { + limit = { exists = global_var:current_grand_ambitions_counter } + change_global_variable = { + name = current_grand_ambitions_counter + add = 1 + } + } + else = { + set_global_variable = { + name = current_grand_ambitions_counter + value = 1 + } + } +} + +# You're the head of a powerful family and you have a chance to stage a coup +grand_ambitions.0001 = { + type = character_event + title = grand_ambitions.0001.t + desc = grand_ambitions.0001.desc + theme = administrative + override_background = { + reference = estate + } + + left_portrait = { + character = root + animation = thinking + } + lower_right_portrait = root.top_liege + + cooldown = { years = 20 } + + trigger = { + # Keep the number of these down to a reasonable level + trigger_if = { + limit = { + is_ai = yes + exists = global_var:current_grand_ambitions_counter + } + global_var:current_grand_ambitions_counter <= 2 + } + # is the house head of a powerful family + house ?= { + house_head ?= root + OR = { + is_powerful_family = yes + is_dominant_family = yes + } + } + influence_level >= 3 + top_liege != this + highest_held_title_tier >= tier_duchy + government_allows = administrative + top_liege ?= { + primary_title.tier = tier_empire + government_allows = administrative + NOR = { + legitimacy_level >= 4 + influence_level >= 4 + } + } + NOT = { any_owned_story = { type = grand_ambitions_story_cycle } } + NOR = { + has_trait = humble + has_trait = content + has_trait = loyal + } + years_from_game_start >= 1 + #Should be able to actually afford one of the options + OR = { + AND = { + gold >= massive_gold_value + influence >= medium_influence_value + } + prestige >= major_prestige_value + } + } + + weight_multiplier = { + base = 0 + modifier = { + add = influence_level + } + } + + immediate = { + top_liege = { + save_scope_as = target_char + primary_title = { + save_scope_as = target_title + } + } + } + + option = { # Start a claimant faction + name = grand_ambitions.0001.a + flavor = grand_ambitions.0001.a.flavor + + create_grand_ambitions_story = { METHOD = coup } + if = { + limit = { NOT = { has_claim_on = top_liege.primary_title } } + add_unpressed_claim = top_liege.primary_title + } + # Add a secret "staging a coup" + give_coup_plotter_secret_effect = { TARGET = root.top_liege } + + add_prestige = major_prestige_loss + + stress_impact = { + brave = medium_stress_impact_loss + honest = minor_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + add = { + value = martial + multiply = 2 + } + } + modifier = { + prestige < major_prestige_value + factor = 0 + } + } + } + + option = { # Start a Depose scheme + name = grand_ambitions.0001.b + flavor = grand_ambitions.0001.b.flavor + + create_grand_ambitions_story = { METHOD = scheme } + # Start Depose Scheme w/ nice modifier + send_interface_toast = { + type = event_toast_effect_neutral + title = grand_ambitions.0001.b.toast + left_icon = root.top_liege + right_icon = root.top_liege.primary_title + + custom_tooltip = { + text = grand_ambitions_start_depose_scheme_tt + # start le scheme + ## Balanced configuration. + begin_scheme_with_agents_effect = { + SCHEME_TYPE = depose + TARGET_TYPE = target_character + TARGET_SCOPE = root.top_liege + # Success. + AGENT_1 = agent_diplomat + AGENT_2 = agent_tumbler + # Speed. + AGENT_3 = agent_infiltrator + AGENT_4 = agent_socialite + # Secrecy. + AGENT_5 = agent_decoy + } + # Add a bussin scheme modifier + random_scheme = { + type = depose + limit = { + scheme_target_character = root.top_liege + } + add_scheme_modifier = { + type = scheme_grand_ambitions_modifier + } + } + } + } + + remove_treasury_or_gold = massive_treasury_or_gold_value + change_influence = medium_influence_loss + + stress_impact = { + craven = minor_stress_impact_loss + ambitious = medium_stress_impact_loss + deceitful = medium_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + add = { + value = intrigue + multiply = 2 + } + } + modifier = { + OR = { + influence < medium_influence_value + short_term_Gold < massive_gold_value + } + factor = 0 + } + } + } + + option = { # I'm happy just how I am (lame) + name = grand_ambitions.0001.c + + stress_impact = { + ambitious = medium_stress_impact_gain + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + } + } +} + +# You took over an Admin Empire, decide what to do with the prev emperor +# Fired from on_war_won_attacker +grand_ambitions.0002 = { + type = character_event + title = grand_ambitions.0202.t + desc = grand_ambitions.0202.desc + theme = administrative + override_background = { + trigger = { scope:defender.capital_county = title:c_byzantion } + reference = ep3_constantinople_riot + } + + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:defender + animation = beg + override_imprisonment_visuals = yes + } + + immediate = { + # Saving these scopes for the follow-up (grand_ambitions.0003) for the old emp which references the lost title + save_scope_as = actor + save_scope_as = root_scope # for loc + primary_title = { save_scope_as = revoked } + scope:defender = { + save_scope_as = recipient + save_scope_as = old_emp + add_character_flag = { + flag = no_hat + days = 5 + } + } + + if = { + limit = { + any_owned_story = { + type = grand_ambitions_story_cycle + has_variable = method + var:method = flag:coup + } + } + } + random_owned_story = { + type = grand_ambitions_story_cycle + limit = { + has_variable = method + var:method = flag:coup + } + save_scope_as = story + } + } + + option = { # Do not banish or de-nose the loser + name = grand_ambitions.0202.a + flavor = grand_ambitions.0202.a.flavor + add_dread = minor_dread_loss + change_influence = minor_influence_gain + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + target = root + modifier = weak_opinion + opinion = -10 + } + } + every_vassal = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + if = { + limit = { + has_any_nickname = no + } + random = { + chance = 10 + give_nickname = nick_the_merciful + } + } + scope:defender = { + add_opinion = { + target = root + modifier = mercy_opinion + opinion = 30 + } + release_from_prison = yes + } + + ai_chance = { + base = 30 + modifier = { + OR = { + has_trait = patient + has_trait = forgiving + has_trait = humble + } + add = 50 + } + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.75 + } + } + } + + option = { # Just de-nose the loser + name = grand_ambitions.0202.b + flavor = grand_ambitions.0202.b.flavor + disfigure_recipient_effect = yes + blind_castrate_and_disfigure_effect = yes #Stress & dread + torture_blind_castrate_disfigure_opinion_effect = { VERB = disfigured } + scope:defender = { release_from_prison = yes } + + ai_chance = { + base = 30 + modifier = { + OR = { + has_trait = sadistic + has_trait = callous + } + add = 50 + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.25 + } + } + } + + option = { # De-nose and Banish the scoundrel! + name = grand_ambitions.0202.c + flavor = grand_ambitions.0202.c.flavor + + disfigure_recipient_effect = yes + blind_castrate_and_disfigure_effect = yes #Stress & dread + torture_blind_castrate_disfigure_opinion_effect = { VERB = disfigured } + + scope:defender = { + banish_effect = { BANISHER = root } + # Trigger Succession on the Noble Family Title of the prev emp + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = yes + } + random_held_title = { + limit = { + has_title_law = noble_family_succession_law + } + change_title_holder = { + holder = scope:defender.primary_heir + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + # Make the prev emp become a LAAMP + show_as_tooltip = { + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = root + } + } + if = { + limit = { is_ai = no } + trigger_event = grand_ambitions.0003 + } + else = { + trigger_event = grand_ambitions.0004 + } + release_from_prison = yes + } + + ai_chance = { + base = 50 + modifier = { + OR = { + has_trait = vengeful + has_trait = diligent + has_trait = wrathful + has_trait = paranoid + } + add = 60 + } + ai_value_modifier = { + ai_boldness = 1.5 + ai_zeal = 0.25 + } + } + } + + option = { + name = grand_ambitions.0202.d + custom_tooltip = grand_ambitions.0202.d.tt + + ai_chance = { + base = 10 + } + } + + after = { + if = { + limit = { + scope:story ?= { + has_variable = hof_support + var:hof_support = yes + } + } + trigger_event = { # Coronation by the patriarch + id = grand_ambitions.0201 + days = 2 + } + } + if = { + limit = { + scope:story ?= { has_variable = promised_foreign_ruler_claim } + } + trigger_event = { + id = grand_ambitions.0300 + days = 5 + } + } + if = { + limit = { + scope:story ?= { + NAND = { + has_variable = hof_support + has_variable = promised_foreign_ruler_claim + } + } + } + scope:story = { end_story = yes } + } + } +} + +# (Player) Prev Emperor Becomes LAAMP +grand_ambitions.0003 = { + type = character_event + title = ep3_laamps.0020.t + desc = ep3_laamps.0020.desc + theme = administrative + left_portrait = { + character = root + animation = marshal + } + lower_left_portrait = scope:alt_1 + lower_center_portrait = scope:alt_2 + lower_right_portrait = scope:alt_3 + override_background = { reference = ep3_city_gate } + cooldown = { days = 5 } + + immediate = { + # Create Adventurer + save_scope_as = adventurer + hidden_effect = { + # Plus for our memory variable. + scope:story.var:target_title = { save_scope_as = lost_primary_title } + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = scope:actor + } + } + find_playable_relatives_effect = yes + # Portrait scopes + if = { + limit = { + NOR = { + exists = scope:alt_3 + scope:alt_1 ?= scope:actor + scope:alt_2 ?= scope:actor + } + } + scope:actor = { save_scope_as = alt_3 } + } + } + + option = { + name = ep3_laamps.0020.a + create_landless_adventurer_title_tooltip_effect = yes + add_internal_flag = special + scope:actor = { + trigger_event = { + id = ep3_laamps.0022 + days = 5 + } + } + } + + option = { + name = ep3_laamps.0001.b + trigger = { exists = scope:alt_1 } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_1 } + } + option = { + name = ep3_laamps.0001.c + trigger = { exists = scope:alt_2 } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_2 } + } + option = { + name = ep3_laamps.0001.d + trigger = { + scope:alt_3 ?= { playable_relative_trigger = yes } + } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_3 } + } + option = { + name = ep3_laamps.0001.e + laamp_game_over_option_effect = yes + } +} + +# LAAMP Creation (Hidden) +grand_ambitions.0004 = { + hidden = yes + immediate = { + # Create Adventurer + save_scope_as = adventurer + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = scope:actor + } + add_internal_flag = special + } +} + + +####################################### +### +### CLAIMANT FACTION ROUTE +### +### 0100 A Bold Proposition +### 0110 Call to Arms +### 0120 Fortified Foundations +### 0130 Whispers in the Wind +### 0131 Follow-up letter event +### 0140 A Fellow Governor +### 0170 A Powerful Alliance +### 0180 A Proper Coronation +### +### Success Events +### 0200 The Fateful Night +### 0201 The Road to Power +### 0202 The Fate of the Fallen +### +### Failure Event +### 0250 End of the Road +### +### Follow-Up Event +### 0300 Reap What You Sow +### +### Invalidation Event +### 0500 Target Emperor Dies/No longer holds title +### +####################################### + +# Find an interlocutor for the following events +scripted_effect find_coup_interlocutor_effect = { + random_list = { + 1 = { + trigger = { exists = cp:councillor_chancellor } + cp:councillor_chancellor = { save_scope_as = interlocutor } + } + 1 = { + trigger = { exists = court_position:chief_eunuch_court_position } + court_position:chief_eunuch_court_position = { save_scope_as = interlocutor } + } + 1 = { + trigger = { exists = cp:councillor_steward } + cp:councillor_steward = { save_scope_as = interlocutor } + } + } + if = { + limit = { NOT = { exists = scope:interlocutor } } + ordered_courtier = { + order_by = intrigue + save_scope_as = interlocutor + } + } + if = { + limit = { NOT = { exists = scope:interlocutor } } + ordered_pool_character = { + province = root.location + order_by = intrigue + save_scope_as = interlocutor + } + } +} + +# Find a scheme interlocutor for the following events +scripted_effect find_scheme_interlocutor_effect = { + if = { + limit = { exists = cp:councillor_spymaster } + cp:councillor_spymaster = { save_scope_as = interlocutor } + } + else_if = { + limit = { exists = court_position:chief_eunuch_court_position } + court_position:chief_eunuch_court_position = { save_scope_as = interlocutor } + } + if = { + limit = { NOT = { exists = scope:interlocutor } } + ordered_courtier = { + order_by = intrigue + save_scope_as = interlocutor + } + } + if = { + limit = { NOT = { exists = scope:interlocutor } } + ordered_pool_character = { + province = root.location + order_by = intrigue + save_scope_as = interlocutor + } + } +} + +scripted_effect set_powerful_family_story_variables_effect = { + scope:story = { + set_variable = { + name = powerful_family + value = $POWERFUL_HOUSE_SCOPE$ + } + set_variable = { + name = powerful_family_method + value = flag:$METHOD_FLAG$ + } + } +} + +scripted_effect send_bethrothal_notifications_and_apply_opinions_effect = { + hidden_effect = { + $SPOUSE_1$ = { save_scope_as = secondary_actor } + $SPOUSE_2$ = { save_scope_as = secondary_recipient } + $HOST$ = { save_scope_as = actor } + $PROMISEE$ = { save_scope_as = recipient } + + scope:actor = { + if = { + limit = { this != scope:recipient } + trigger_event = marriage_interaction.0010 + } + else_if = { #In my own court + limit = { #Betrothal? + OR = { + scope:secondary_actor = { is_adult = no } + scope:secondary_recipient = { is_adult = no } + scope:secondary_actor = { has_been_promised_grand_wedding = yes } + scope:secondary_recipient = { has_been_promised_grand_wedding = yes } + } + } + send_interface_toast = { + type = event_toast_effect_good + title = arrange_marriage_interaction_accept_betrothal_toast + left_icon = scope:secondary_actor + right_icon = scope:secondary_recipient + custom_tooltip = arrange_marriage_interaction_accept_betrothal_toast_desc + } + } + else = { + send_interface_toast = { + type = event_toast_effect_good + title = arrange_marriage_interaction_accept_toast + left_icon = scope:secondary_actor + right_icon = scope:secondary_recipient + custom_tooltip = arrange_marriage_interaction_accept_toast_desc + } + } + } + + # Apply any relevant opinion penalties for relatives of spouse. + scope:secondary_actor = { + if = { # Polygamy + limit = { + any_consort = { + count >= 2 + } + } + every_consort = { + # If the spouse themselves does not believe in polygamy... + limit = { + NOR = { + culture = { has_cultural_tradition = tradition_polygamous } + faith = { has_doctrine = doctrine_polygamy } + faith = { has_doctrine = doctrine_concubines } + } + } + + #... then family members who also do not believe in polygamy aren't happy about having a relative forced into polygamous union with you. + every_close_family_member = { + if = { + limit = { + NOR = { + culture = { has_cultural_tradition = tradition_polygamous } + faith = { has_doctrine = doctrine_polygamy } + faith = { has_doctrine = doctrine_concubines } + } + } + add_opinion = { + target = scope:secondary_actor + modifier = relative_in_blasphemous_union_opinion + } + } + } + + # NOTE: Spouse's own opinions handled in the 'on_marriage' code on_action inside of marriage_concubinage.txt, and are not included here. + } + } + } + scope:secondary_recipient = { + if = { #Same-sex relations + limit = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:secondary_actor + } + every_close_family_member = { + if = { + limit = { + allowed_to_marry_same_sex_trigger = no + } + add_opinion = { + target = scope:secondary_actor + modifier = relative_in_blasphemous_union_opinion + } + } + } + } + } + # Courtly vassals like grand weddings + scope:secondary_actor = { + if = { + limit = { + any_vassal = { + vassal_stance = courtly + } + } + if = { + limit = { + has_been_promised_grand_wedding = yes + } + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:secondary_actor + modifier = prestigious_wedding_opinion + } + } + } + } + } + scope:secondary_recipient = { + if = { + limit = { + any_vassal = { + vassal_stance = courtly + } + } + if = { + limit = { + has_been_promised_grand_wedding = yes + } + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:secondary_recipient + modifier = prestigious_wedding_opinion + } + } + } + } + } + } +} + +scripted_effect swear_to_join_claimant_faction_effect = { + save_scope_as = recruit + custom_tooltip = { + text = grand_ambitions.0100.powerful_family_joins_faction + if = { + limit = { + scope:target_char = { + any_targeting_faction = { + faction_leader = root + faction_type = claimant_faction + any_faction_member = { + this != scope:recruit + } + } + } + } + scope:target_char = { + random_targeting_faction = { + faction_type = claimant_faction + limit = { + faction_leader = root + any_faction_member = { + this != scope:recruit + } + } + save_scope_as = joined_faction + } + } + show_as_tooltip = { join_faction = scope:joined_faction } + hidden_effect = { + join_faction_forced = { + faction = scope:joined_faction + forced_by = root + years = 25 + } + } + } + scope:story = { + add_to_variable_list = { + name = promised_to_join_faction + target = scope:powerful_family_head + } + } + } +} + +scripted_trigger foreign_ruler_has_any_interest_in_coup_trigger = { + save_temporary_scope_as = foreign_ruler_temp + is_at_war = no + # They must _at least_ not like the current emperor + opinion = { + target = scope:target_char + value <= 0 + } + NOR = { + has_relation_friend = scope:target_char + has_relation_best_friend = scope:target_char + has_relation_lover = scope:target_char + has_relation_soulmate = scope:target_char + } + OR = { + # They have a claim on something within the empire that you could help them with + any_claim = { + tier = tier_duchy + any_de_jure_top_liege = { + this = scope:target_char + } + } + # there is a bordering county + any_realm_border_county = { + any_neighboring_county = { + holder.top_liege = scope:target_char + } + } + # You have a coastal county to give away + scope:target_char = { + any_realm_county = { + has_coastal_province = yes + } + } + } +} + +# A Bold Proposition +# Gain a foreign ally; limited to foreign ai characters +grand_ambitions.0100 = { + type = character_event + title = grand_ambitions.0100.t + desc = { + desc = grand_ambitions.0100.intro + desc = grand_ambitions.0100.claim + desc = grand_ambitions.0100.conclusion + } + theme = administrative + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:interlocutor + animation = chancellor + } + lower_center_portrait = scope:foreign_ruler + + trigger = { + NOT = { has_character_flag = had_event_ga_0100 } + any_neighboring_and_across_water_top_liege_realm_owner = { + is_ai = yes + foreign_ruler_has_any_interest_in_coup_trigger = yes + save_temporary_scope_as = temp_foreign_caller + trigger_if = { + limit = { scope:story = { has_variable_list = foreign_callers } } + NOT = { + scope:story = { + any_in_list = { + variable = foreign_callers + this = scope:temp_foreign_caller + } + } + } + } + } + } + + immediate = { + find_coup_interlocutor_effect = yes + # Find the ruler we wanna nab + ordered_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + is_ai = yes + foreign_ruler_has_any_interest_in_coup_trigger = yes + save_temporary_scope_as = temp_foreign_caller + trigger_if = { + limit = { scope:story = { has_variable_list = foreign_callers } } + NOT = { + scope:story = { + any_in_list = { + variable = foreign_callers + this = scope:temp_foreign_caller + } + } + } + } + } + order_by = ep3_foreign_ruler_interest_in_coup_value + save_scope_as = foreign_ruler + } + # Determine the demand + scope:foreign_ruler = { + save_scope_as = comparator + if = { # Look for a claim first + limit = { + any_claim = { + tier = tier_duchy + any_de_jure_top_liege = { + this = scope:target_char + } + } + } + # Pick the closest claim to the foreign ruler's capital + ordered_claim = { + limit = { + tier = tier_duchy + any_de_jure_top_liege = { + this = scope:target_char + } + } + order_by = ep3_distance_to_comparator_claim + save_scope_as = foreign_claim + } + } + else_if = { # Then pick a neighboring duchy + limit = { + any_realm_border_county = { + any_neighboring_county = { + holder.top_liege = scope:target_char + } + } + } + random_realm_border_county = { + random_neighboring_county = { + limit = { holder.top_liege = scope:target_char } + duchy = { save_scope_as = foreign_claim } + } + } + } + else = { # If all else fails, just pick a coastal duchy + scope:target_char = { + random_realm_county = { + limit = { + has_coastal_province = yes + } + duchy = { save_scope_as = foreign_claim } + } + } + } + scope:story = { + set_variable = { + name = foreign_ruler_demand + value = scope:foreign_claim + } + } + } + + # Find a counter-offer target + scope:target_char = { + if = { + limit = { + any_realm_border_county = { + any_neighboring_county = { + holder.top_liege = scope:foreign_ruler + } + } + } + ordered_realm_border_county = { + limit = { + any_neighboring_county = { + holder.top_liege = scope:foreign_ruler + } + } + order_by = ep3_distance_to_comparator_capital_county + save_scope_as = compromise_county + } + } + else = { # Take the closest coastal province + ordered_realm_county = { + limit = { + has_coastal_province = yes + } + order_by = ep3_distance_to_comparator_capital_county + save_scope_as = compromise_county + } + } + } + + # Log that we talked to this foreign ruler so they don't ask again + scope:story = { + add_to_variable_list = { + name = foreign_callers + target = scope:foreign_ruler + } + } + } + + option = { # Agree to their offer + name = grand_ambitions.0100.a + custom_tooltip = grand_ambitions.0100.a.claim + if = { + limit = { + any_claim = { + this = scope:foreign_claim + } + } + remove_claim = scope:foreign_claim + } + custom_tooltip = grand_ambitions.0100.a.faction_tooltip + + scope:story = { + set_variable = { + name = promised_foreign_ruler_claim + value = scope:foreign_ruler + } + } + + add_character_flag = had_event_ga_0100 + + stress_impact = { + base = minor_stress_impact_gain + trusting = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = -0.25 + } + modifier = { + OR = { + has_trait = ambitious + has_trait = craven + } + add = 40 + } + } + } + + option = { # Propose a counter-offer + name = grand_ambitions.0100.b + duel = { + skill = diplomacy + target = scope:foreign_ruler + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = grand_ambitions.0100.b.success + send_interface_toast = { + type = event_generic_good_text + title = grand_ambitions.0100.b.success + left_icon = scope:foreign_ruler + custom_tooltip = grand_ambitions.0100.b.success.tt + if = { + limit = { + any_claim = { + this = scope:foreign_claim + } + } + remove_claim = scope:foreign_claim + } + custom_tooltip = grand_ambitions.0100.a.faction_tooltip + } + scope:story = { + set_variable = { + name = promised_foreign_ruler_claim + value = scope:foreign_ruler + } + } + add_character_flag = had_event_ga_0100 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = grand_ambitions.0100.b.failure + send_interface_toast = { + type = event_generic_bad_text + title = grand_ambitions.0100.b.failure + left_icon = scope:foreign_ruler + + add_prestige = medium_prestige_gain + } + } + } + + stress_impact = { + humble = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.75 + } + modifier = { + OR = { + has_trait = diligent + has_trait = ambitious + } + add = 50 + } + } + } + + option = { # Deny their offer + name = grand_ambitions.0100.c + + stress_impact = { + arrogant = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.5 + ai_greed = 1 + } + modifier = { + OR = { + has_trait = stubborn + has_trait = arrogant + has_trait = greedy + has_trait = content + } + add = 50 + } + } + } +} + +# A Call to Arms +# Event to increase your MAA +grand_ambitions.0110 = { + type = character_event + title = grand_ambitions.0110.t + desc = grand_ambitions.0110.desc + theme = administrative + + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:interlocutor + animation = personality_honorable + } + + cooldown = { years = 10 } + + immediate = { + find_coup_interlocutor_effect = yes + ep3_pick_random_maa_regiment_effect = { + OWNER = root + INCLUDE_BASIC_MAA = no + INCLUDE_SIEGE_MAA = no + } + } + + option = { # Spawn a free MAA + name = grand_ambitions.0110.a + ep3_create_random_maa_regiment_effect = { + OWNER = root + SIZE = 4 + } + + ai_chance = { + base = 50 + modifier = { + number_of_maa_regiments <= 3 + factor = 3 + } + } + } + + option = { # Get a modifier to reduce MAA cost + name = grand_ambitions.0110.b + add_character_modifier = { + modifier = ep3_grand_ambitions_cheaper_maa_modifier + years = 5 + } + + ai_chance = { + base = 40 + } + } + + option = { # No thanks + name = grand_ambitions.0110.c + change_influence = minor_influence_gain + + ai_chance = { + base = 20 + modifier = { + influence <= minor_influence_value + factor = 3 + } + } + } +} + +# Fortified Foundations +# Event to increase your estate buildings +grand_ambitions.0120 = { + type = character_event + title = grand_ambitions.0120.t + desc = grand_ambitions.0120.desc + theme = administrative + override_background = { reference = estate } + + left_portrait = { + character = root + animation = survey + } + right_portrait = { + character = scope:interlocutor + animation = debating + } + + cooldown = { years = 10 } + + trigger = { + has_domicile = yes + domicile = { + is_domicile_type = estate + num_domicile_buildings < 6 + } + OR = { + number_maa_regiments_of_base_type:skirmishers > 0 + number_maa_regiments_of_base_type:heavy_infantry > 0 + number_maa_regiments_of_base_type:pikemen > 0 + number_maa_regiments_of_base_type:light_cavalry > 0 + number_maa_regiments_of_base_type:heavy_cavalry > 0 + number_maa_regiments_of_base_type:archers > 0 + } + } + + immediate = { + find_coup_interlocutor_effect = yes + domicile = { save_scope_as = estate } + # Pick the best building for the MaA type they have the most of + random_list = { + 0 = { # Barracks for Skirmishers, Heavy Infantry, and Spearmen + trigger = { + NOT = { + domicile = { has_domicile_building = barracks_06 } + } + } + modifier = { + add = number_maa_regiments_of_base_type:skirmishers + add = number_maa_regiments_of_base_type:heavy_infantry + add = number_maa_regiments_of_base_type:pikemen + } + save_scope_value_as = { + name = estate_building + value = flag:barracks + } + random_maa_regiment = { + limit = { + OR = { + is_unit_type = skirmishers + is_unit_type = heavy_infantry + is_unit_type = pikemen + } + } + save_scope_as = maa_flavor + } + } + 0 = { # Pasteurs for Cavalry + trigger = { + NOT = { + domicile = { has_domicile_building = grazing_land_06 } + } + } + modifier = { + add = number_maa_regiments_of_base_type:light_cavalry + add = number_maa_regiments_of_base_type:heavy_cavalry + } + save_scope_value_as = { + name = estate_building + value = flag:grazing_land + } + random_maa_regiment = { + limit = { + OR = { + is_unit_type = light_cavalry + is_unit_type = heavy_cavalry + } + } + save_scope_as = maa_flavor + } + } + 0 = { # Watchtower for Archers + trigger = { + NOT = { + domicile = { has_domicile_building = watchtower_06 } + } + } + modifier = { + add = number_maa_regiments_of_base_type:archers + } + save_scope_value_as = { + name = estate_building + value = flag:watchtower + } + random_maa_regiment = { + limit = { is_unit_type = archers } + save_scope_as = maa_flavor + } + } + } + } + + option = { # Construct Barracks + name = grand_ambitions.0120.a + trigger = { + scope:estate_building ?= flag:barracks + number_maa_regiments_of_base_type:pikemen >=1 + } + # Build or upgrade barracks building + domicile = { + if = { + limit = { has_domicile_building_or_higher = barracks_01 } + switch = { + trigger = has_domicile_building + barracks_01 = { add_domicile_building = barracks_02 } + barracks_02 = { add_domicile_building = barracks_03 } + barracks_03 = { add_domicile_building = barracks_04 } + barracks_04 = { add_domicile_building = barracks_05 } + barracks_05 = { add_domicile_building = barracks_06 } + } + } + else = { + add_domicile_building = barracks_01 + } + } + } + + option = { # Construct Pasteur + name = grand_ambitions.0120.b + trigger = { scope:estate_building ?= flag:grazing_land } + # Build or upgrade pasteurs building + domicile = { + if = { + limit = { has_domicile_building_or_higher = grazing_land_01 } + switch = { + trigger = has_domicile_building + grazing_land_01 = { add_domicile_building = grazing_land_02 } + grazing_land_02 = { add_domicile_building = grazing_land_03 } + grazing_land_03 = { add_domicile_building = grazing_land_04 } + grazing_land_04 = { add_domicile_building = grazing_land_05 } + grazing_land_05 = { add_domicile_building = grazing_land_06 } + } + } + else = { + add_domicile_building = grazing_land_01 + } + } + } + + option = { # Construct Watchtower + name = grand_ambitions.0120.c + trigger = { scope:estate_building ?= flag:watchtower } + # Build or upgrade watchtower building + domicile = { + if = { + limit = { has_domicile_building_or_higher = watchtower_01 } + switch = { + trigger = has_domicile_building + watchtower_01 = { add_domicile_building = watchtower_02 } + watchtower_02 = { add_domicile_building = watchtower_03 } + watchtower_03 = { add_domicile_building = watchtower_04 } + watchtower_04 = { add_domicile_building = watchtower_05 } + watchtower_05 = { add_domicile_building = watchtower_06 } + } + } + else = { + add_domicile_building = watchtower_01 + } + } + } + + option = { # Fallback Estate Upgrade + name = grand_ambitions.0120.d + remove_short_term_gold = medium_gold_value + add_character_modifier = { + modifier = ep3_grand_ambitions_local_labor_modifier + years = 10 + } + } +} + +# Whispers in the Wind +# Event to decrease popular opinion of the emperor +grand_ambitions.0130 = { + type = character_event + title = grand_ambitions.0130.t + desc = { + desc = grand_ambitions.0130.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:story.var:target_char.legitimacy_level >= 6 } + desc = grand_ambitions.0130.desc.legitimacy.6 + } + triggered_desc = { + trigger = { scope:story.var:target_char.legitimacy_level >= 5 } + desc = grand_ambitions.0130.desc.legitimacy.5 + } + triggered_desc = { + trigger = { scope:story.var:target_char.legitimacy_level >= 4 } + desc = grand_ambitions.0130.desc.legitimacy.4 + } + triggered_desc = { + trigger = { scope:story.var:target_char.legitimacy_level >= 3 } + desc = grand_ambitions.0130.desc.legitimacy.3 + } + triggered_desc = { + trigger = { scope:story.var:target_char.legitimacy_level >= 2 } + desc = grand_ambitions.0130.desc.legitimacy.2 + } + desc = grand_ambitions.0130.desc.legitimacy.1 + } + desc = grand_ambitions.0130.desc.outro + } + theme = administrative + override_background = { reference = ep3_medi_study } + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:interlocutor + animation = scheme + } + lower_center_portrait = scope:story.var:target_char + + cooldown = { years = 10 } + + immediate = { + find_coup_interlocutor_effect = yes + if = { + limit = { + any_secret = { + type = secret_coup_plotter + secret_target = scope:story.var:target_char + } + } + random_secret = { + type = secret_coup_plotter + limit = { + secret_target = scope:story.var:target_char + } + save_scope_as = secret + } + } + } + + option = { # Spend Influence + name = grand_ambitions.0130.a + show_as_unavailable = { influence <= medium_influence_value } + change_influence = medium_influence_loss + scope:story.var:target_char = { + capital_county = { + add_county_modifier = { + modifier = ep3_grand_ambitions_rioting_county_modifier + years = 10 + } + } + } + random = { + chance = 15 + # Expose your secret + scope:secret ?= { reveal_to = scope:story.var:target_char } + # Show that this gives your liege an imprisonment reason + show_as_tooltip = { + reverse_add_opinion = { + target = scope:target_char + modifier = coup_plotter_opinion + } + } + } + add_character_flag = { + flag = successful_riot + days = 1 + } + + ai_chance = { + base = 30 + modifier = { + influence <= medium_influence_value + factor = 0 + } + } + } + + option = { # Spend Gold + name = grand_ambitions.0130.c + show_as_unavailable = { short_term_gold <= major_gold_value } + remove_short_term_gold = major_gold_value + scope:story.var:target_char = { + capital_county = { + add_county_modifier = { + modifier = ep3_grand_ambitions_rioting_county_modifier + years = 10 + } + } + } + random = { + chance = 30 + # Expose your secret + scope:secret ?= { reveal_to = scope:story.var:target_char } + # Show that this gives your liege an imprisonment reason + show_as_tooltip = { + reverse_add_opinion = { + target = scope:target_char + modifier = coup_plotter_opinion + } + } + } + add_character_flag = { + flag = successful_riot + days = 1 + } + + ai_chance = { + base = 30 + modifier = { + short_term_gold <= major_gold_value + factor = 0 + } + } + } + + option = { # Intrigue Challenge + name = grand_ambitions.0130.b + change_influence = minor_influence_loss + duel = { + skill = intrigue + value = high_skill_rating + 30 = { # Succeed + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -29 + } + desc = grand_ambitions.0130.b.success + send_interface_toast = { + type = event_toast_effect_good + title = grand_ambitions.0130.b.success + left_icon = scope:story.var:target_char + right_icon = scope:story.var:target_title + scope:story.var:target_char = { + capital_county = { + add_county_modifier = { + modifier = ep3_grand_ambitions_rioting_county_modifier + years = 10 + } + } + } + } + add_character_flag = { + flag = successful_riot + days = 1 + } + } + 50 = { # Fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = grand_ambitions.0130.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = grand_ambitions.0130.b.failure + left_icon = scope:story.var:target_char + right_icon = scope:story.var:target_title + } + } + 20 = { # Crit Fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -19 + } + desc = grand_ambitions.0130.b.crit_failure + send_interface_toast = { + type = event_toast_effect_bad + title = grand_ambitions.0130.b.crit_failure + left_icon = scope:story.var:target_char + right_icon = scope:story.var:target_title + # Expose your secret + scope:secret ?= { reveal_to = scope:story.var:target_char } + # Show that this gives your liege an imprisonment reason + show_as_tooltip = { + reverse_add_opinion = { + target = scope:target_char + modifier = coup_plotter_opinion + } + } + } + } + } + + ai_chance = { + base = 30 + modifier = { + add = { + value = intrigue + multiply = 2 + } + } + modifier = { + influence <= minor_influence_value + factor = 0 + } + } + } + + option = { # Opt-out + name = grand_ambitions.0130.d + + ai_chance = { + base = 10 + } + } + + after = { + save_scope_as = schemer + scope:story.var:target_char = { + if = { + limit = { + is_ai = no + root = { has_character_flag = successful_riot } + } + trigger_event = grand_ambitions.0131 + } + } + } +} + +# Whispers in the Wind Follow-Up +# Mirror Event for the emperor if they are a player +grand_ambitions.0131 = { + type = letter_event + opening = grand_ambitions.0131.opening + desc = { + desc = grand_ambitions.0131.desc + triggered_desc = { + trigger = { + any_known_secret = { + scope:secret ?= this + } + } + desc = grand_ambitions.0131.desc_secret + } + desc = grand_ambitions.0131.conclusion + } + sender = scope:interlocutor + + immediate = { + find_scheme_interlocutor_effect = yes + if = { # secret revealed in previous event, but shown here for consistency + limit = { + any_known_secret = { + scope:secret ?= this + } + } + show_as_tooltip = { + scope:secret ?= { reveal_to = root } + } + } + } + + option = { # Intrigue Option: Kill the rumors + name = grand_ambitions.0131.a + trigger = { + OR = { + intrigue >= high_skill_rating + has_trait = schemer + } + } + + capital_county = { + remove_county_modifier = ep3_grand_ambitions_rioting_county_modifier + } + + ai_chance = { + base = 100 + } + } + + option = { # Spend Influence to get people on your side + name = grand_ambitions.0131.b + trigger = { + NOR = { + intrigue >= high_skill_rating + has_trait = schemer + } + } + + change_influence = medium_influence_loss + capital_county = { + remove_county_modifier = ep3_grand_ambitions_rioting_county_modifier + add_county_modifier = { + modifier = ep3_grand_ambitions_hushed_rumors + years = 10 + } + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + influence < medium_influence_value + } + } + } + + option = { # Opt Out + name = grand_ambitions.0131.c + trigger = { + NOR = { + intrigue >= high_skill_rating + has_trait = schemer + } + } + + add_prestige = minor_prestige_loss + + stress_impact = { + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + prestige <= minor_prestige_value + } + } + } +} + +# A Fellow Governor +# Get a hook on a powerful fellow governor +grand_ambitions.0140 = { + type = character_event + title = grand_ambitions.0140.t + desc = { + desc = grand_ambitions.0140.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:story_faction } + desc = grand_ambitions.0140.faction + } + desc = grand_ambitions.0140.no_faction + } + } + theme = administrative + + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:target_gov + animation = spymaster + } + + cooldown = { years = 3 } + + trigger = { + scope:target_char = { # Is there another vassal we can get a hook on + any_powerful_vassal = { + save_temporary_scope_as = temp_vassal + NOR = { + has_vassal_stance = courtly + root = { has_hook = prev } + scope:story = { + trigger_if = { + limit = { has_variable_list = promised_to_join_faction} + is_target_in_variable_list = { + name = promised_to_join_faction + target = scope:temp_vassal + } + } + trigger_if = { + limit = { has_variable_list = governor_callers } + is_target_in_variable_list = { + name = governor_callers + target = scope:temp_vassal + } + } + } + scope:story_faction ?= { + any_faction_member = { + this = scope:temp_vassal + } + faction_is_at_war = no + } + } + root = { + can_add_hook = { + target = prev + type = strong_influence_hook + } + } + } + } + } + + immediate = { + find_coup_interlocutor_effect = yes + scope:target_char = { + ordered_powerful_vassal = { + limit = { + save_temporary_scope_as = temp_vassal + NOR = { + has_vassal_stance = courtly + root = { has_hook = prev } + scope:story = { + trigger_if = { + limit = { has_variable_list = promised_to_join_faction} + is_target_in_variable_list = { + name = promised_to_join_faction + target = scope:temp_vassal + } + } + trigger_if = { + limit = { has_variable_list = governor_callers } + is_target_in_variable_list = { + name = governor_callers + target = scope:temp_vassal + } + } + } + scope:story_faction ?= { + any_faction_member = { + this = scope:temp_vassal + } + faction_is_at_war = no + } + } + root = { + can_add_hook = { + target = prev + type = strong_influence_hook + } + } + } + order_by = "opinion(root)" + save_scope_as = target_gov + } + } + } + + option = { # Accept + name = grand_ambitions.0140.a + if = { + limit = { + exists = scope:story_faction + } + scope:target_gov = { + show_as_tooltip = { join_faction = scope:story_faction } + hidden_effect = { + join_faction_forced = { + faction = scope:story_faction + forced_by = root + years = 25 + } + } + } + } + else = { + add_hook = { + target = scope:target_gov + type = strong_influence_hook + } + } + scope:story = { + add_to_variable_list = { + name = promised_to_join_faction + target = scope:target_gov + } + } + + ai_chance = { + base = 90 + } + } + + option = { # Reject + name = grand_ambitions.0140.b + scope:story = { + add_to_variable_list = { + name = governor_callers + target = scope:target_gov + } + } + + ai_chance = { + base = 10 + } + } +} + + +####################################### +### +### SCHEME ROUTE +### +### 0150 An Additional Agent +### 0151 A Master of Whispers +### 0155 Calling in Favors +### 0160 Threads of Subterfuge +### 0170 A Powerful Alliance +### 0180 A Proper Coronation +### 0190 Keep Your Friends Close... +### 0191 A Fateful Offer +### +### Success Events +### 0200 The Fateful Night +### 0201 The Road to Power +### 0202 The Fate of the Fallen +### +### Failure Event +### 0250 End of the Road +### +### Invalidation Event +### 0500 Target Emperor Dies/No longer holds title +### +####################################### + +# Chances to gain scheme agents +grand_ambitions.0150 = { + type = character_event + title = grand_ambitions.0150.t + desc = grand_ambitions.0150.desc + theme = administrative + + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:interlocutor + animation = spymaster + } + + trigger = { + scope:story = { + NOT = { has_variable = had_event_ga_0150 } + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + } + + option = { # Add an infiltrator (speed agent) + name = grand_ambitions.0150.a + scope:depose_scheme_scope = { + add_agent_slot = agent_infiltrator + } + } + + option = { # Add a decoy (secrecy agent) + name = grand_ambitions.0150.b + scope:depose_scheme_scope = { + add_agent_slot = agent_decoy + } + } + + option = { # Add a socialite (success chance agent) + name = grand_ambitions.0150.c + scope:depose_scheme_scope = { + add_agent_slot = agent_socialite + } + } + + after = { + scope:story = { + set_variable = { + name = had_event_ga_0150 + value = yes + } + } + } +} + +scripted_trigger can_steal_eunuch_trigger = { + scope:target_char = { is_ai = yes } + can_employ_court_position_type = chief_eunuch_court_position + NOR = { + scope:eunuch = { has_trait = loyal } + employs_court_position = chief_eunuch_court_position + } + intrigue >= high_skill_rating +} + +# Special eunuch agent slot +grand_ambitions.0151 = { + type = character_event + title = grand_ambitions.0151.t + desc = grand_ambitions.0151.desc + theme = administrative + override_background = { reference = relaxing_room } + + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:interlocutor + animation = spymaster + } + lower_center_portrait = scope:eunuch + + trigger = { + any_scheme = { + type = depose + NOT = { + any_scheme_agent_slot = { + is_agent_slot_type = agent_eunuch + } + } + } + scope:target_char = { + any_court_position_holder = { + type = chief_eunuch_court_position + } + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + scope:target_char = { + random_court_position_holder = { + type = chief_eunuch_court_position + save_scope_as = eunuch + } + } + hidden_effect = { + scope:depose_scheme_scope = { + add_agent_slot = agent_eunuch + } + scope:depose_scheme_scope = { + random_scheme_agent_slot = { + limit = { + is_filled = no + is_agent_slot_type = agent_eunuch + } + save_scope_as = eunuch_slot + } + } + } + } + + option = { # Yes add the eunuch to the scheme + name = grand_ambitions.0151.a + change_influence = major_influence_loss + + show_as_tooltip = { + scope:depose_scheme_scope = { + add_agent_slot = agent_eunuch + } + } + scope:eunuch = { + force_add_to_agent_slot = { + agent_slot = scope:eunuch_slot + years = 3 + } + } + scope:story = { + set_variable = { + name = eunuch + value = yes + } + } + + ai_chance = { + base = 100 + modifier = { + influence <= major_influence_value + factor = 0 + } + } + } + + option = { # I'd rather have him for myself + name = grand_ambitions.0151.b + trigger = { + can_steal_eunuch_trigger = yes + } + change_influence = massive_influence_loss + remove_short_term_gold = major_gold_value + # Steal the eunuch + court_position_grant_effect = { + CANDIDATE = scope:eunuch + POS = chief_eunuch + EMPLOYER = root + } + show_as_tooltip = { + scope:depose_scheme_scope = { + add_agent_slot = agent_eunuch + } + } + scope:eunuch = { + force_add_to_agent_slot = { + agent_slot = scope:eunuch_slot + years = 3 + } + } + scope:story = { + set_variable = { + name = eunuch + value = yes + } + } + + ai_chance = { + base = 80 + modifier = { + influence <= massive_influence_value + factor = 0 + } + } + } + + option = { # No thanks + name = grand_ambitions.0151.c + hidden_effect = { + scope:depose_scheme_scope = { + remove_agent_slot = scope:eunuch_slot + } + } + + ai_chance = { + base = 10 + } + } +} + +# Spymaster offers you 3 choices for an unfilled scheme agent slot +grand_ambitions.0155 = { + type = character_event + title = grand_ambitions.0155.t + desc = grand_ambitions.0155.desc + theme = administrative + + left_portrait = { + character = root + animation = spymaster + } + right_portrait = { + character = scope:interlocutor + animation = scheme + } + lower_left_portrait = scope:agent_choice_2 + lower_center_portrait = scope:agent_choice_1 + lower_right_portrait = scope:agent_choice_3 + + trigger = { + # Scheme must have unfilled agent slots + any_scheme = { + type = depose + any_scheme_agent_slot = { + is_filled = no + save_temporary_scope_as = temp_agent_slot + } + # The eunuch agent slot gets a bespoke event + scope:temp_agent_slot = { + NOT = { is_agent_slot_type = agent_eunuch } + } + } + # target_char must have at least one valid courtier to fill the position + any_courtier_or_guest = { + NOT = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + } + is_valid_as_agent_in_slot = scope:temp_agent_slot + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + + # Pick an empty agent slot + scope:depose_scheme_scope = { + random_scheme_agent_slot = { + limit = { + is_filled = no + } + save_scope_as = agent_slot + } + } + + # Find 3 characters with which to fill the agent slot + scope:target_char = { + random_courtier_or_guest = { + limit = { + NOT = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + } + is_valid_as_agent_in_slot = scope:agent_slot + } + save_scope_as = agent_choice_1 + } + if = { + limit = { + any_courtier_or_guest = { + NOR = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + this = scope:agent_choice_1 + } + is_valid_as_agent_in_slot = scope:agent_slot + } + } + random_courtier_or_guest = { + limit = { + NOR = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + this = scope:agent_choice_1 + } + is_valid_as_agent_in_slot = scope:agent_slot + } + save_scope_as = agent_choice_2 + } + } + if = { + limit = { + any_courtier_or_guest = { + NOR = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + this = scope:agent_choice_1 + this ?= scope:agent_choice_2 + } + is_valid_as_agent_in_slot = scope:agent_slot + } + } + random_courtier_or_guest = { + limit = { + NOR = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + this = scope:agent_choice_1 + this ?= scope:agent_choice_2 + } + is_valid_as_agent_in_slot = scope:agent_slot + } + save_scope_as = agent_choice_3 + } + } + } + } + + option = { # Agent Choice 1 + name = grand_ambitions.0155.a + scope:agent_choice_1 = { + force_add_to_agent_slot = { + agent_slot = scope:agent_slot + years = 3 + } + } + } + + option = { # Agent Choice 2 + name = grand_ambitions.0155.b + trigger = { exists = scope:agent_choice_2 } + scope:agent_choice_2 = { + force_add_to_agent_slot = { + agent_slot = scope:agent_slot + years = 3 + } + } + } + + option = { # Agent Choice 3 + name = grand_ambitions.0155.c + trigger = { exists = scope:agent_choice_3 } + scope:agent_choice_3 = { + force_add_to_agent_slot = { + agent_slot = scope:agent_slot + years = 3 + } + } + } + + option = { # None of these + name = grand_ambitions.0155.d + } +} + +# Chance to gain scheme modifiers +grand_ambitions.0160 = { + type = character_event + title = grand_ambitions.0160.t + desc = grand_ambitions.0160.desc + theme = administrative + + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:interlocutor + animation = spymaster + } + lower_center_portrait = scope:target_char + + trigger = { + scope:story = { + NOT = { has_variable = had_event_ga_0160 } + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + } + + option = { # Bribe the palace functionaries + name = grand_ambitions.0160.a + change_influence = minor_influence_loss + random_scheme = { + type = depose + add_scheme_modifier = { + type = scheme_grand_ambitions_bribed_functionaries_modifier + } + } + } + + option = { # Bribe some merchants + name = grand_ambitions.0160.b + remove_short_term_gold = major_gold_value + random_scheme = { + type = depose + add_scheme_modifier = { + type = scheme_grand_ambitions_bribed_merchants_modifier + } + } + } + + option = { # Bribe the scribes + name = grand_ambitions.0160.c + remove_short_term_gold = medium_gold_value + random_scheme = { + type = depose + add_scheme_modifier = { + type = scheme_grand_ambitions_bribed_scribes_modifier + } + } + } + + after = { + scope:story = { + set_variable = { + name = had_event_ga_0160 + value = yes + } + } + } +} + +# Another Powerful Family could support you +grand_ambitions.0170 = { + type = character_event + title = grand_ambitions.0170.t + desc = grand_ambitions.0170.desc + theme = administrative + override_background = { reference = relaxing_room } + + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:interlocutor + animation = spymaster + } + lower_center_portrait = scope:powerful_family_head + lower_right_portrait = scope:marriage_proposal + + cooldown = { months = 12 } + + trigger = { + scope:story = { + NOT = { has_variable = powerful_family } + } + scope:target_char = { + any_vassal = { + primary_title.tier >= tier_duchy + this = house.house_head + this != root + house = { is_powerful_family = yes } + } + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + scope:target_char = { + random_vassal = { + limit = { + primary_title.tier >= tier_duchy + this = house.house_head + this != root + is_imprisoned = no + opinion = { # they can dislike you if it's a beneficial deal + target = root + value >= -30 + } + } + weight = { # Prefer picking a vassal that has a child ready for marriage and has high military strength + base = 1 + modifier = { + add = 100 + any_child = { + can_marry_character_trigger = { + CHARACTER = root + } + } + } + modifier = { + add = this.current_military_strength + } + } + save_scope_as = powerful_family_head + house = { save_scope_as = powerful_house } + } + } + + save_scope_as = comparator # used in age_different script value below + if = { + limit = { + scope:powerful_family_head = { + any_child = { + can_marry_character_trigger = { + CHARACTER = root + } + } + } + } + scope:powerful_family_head = { + ordered_child = { + order_by = age_difference + limit = { + can_marry_character_trigger = { + CHARACTER = root + } + } + save_scope_as = marriage_proposal + } + } + } + } + + option = { # Gold, Influence, and Prestige + name = grand_ambitions.0170.a + change_influence = major_influence_loss + pay_short_term_gold = { + target = scope:powerful_family_head + gold = major_gold_value + } + add_prestige = massive_prestige_loss + + if = { # Scheme Track + limit = { + scope:story.var:method ?= flag:scheme + exists = scope:depose_scheme_scope + } + scope:depose_scheme_scope = { + add_scheme_modifier = { + type = scheme_grand_ambitions_powerful_family_modifier + } + } + } + else = { # Coup Track + # House head promises to join your faction + scope:powerful_family_head = { + swear_to_join_claimant_faction_effect = yes + } + } + + set_powerful_family_story_variables_effect = { + POWERFUL_HOUSE_SCOPE = scope:powerful_house + METHOD_FLAG = currency + } + + ai_chance = { + base = 30 + modifier = { + OR = { + prestige <= massive_prestige_value + short_term_gold <= major_gold_value + influence <= major_influence_value + } + factor = 0 + } + } + } + + option = { # Hook + name = grand_ambitions.0170.b + scope:powerful_family_head = { + add_hook = { + target = root + type = favor_hook + } + } + + if = { # Scheme Track + limit = { + scope:story.var:method ?= flag:scheme + exists = scope:depose_scheme_scope + } + scope:depose_scheme_scope = { + add_scheme_modifier = { + type = scheme_grand_ambitions_powerful_family_modifier + } + } + } + else = { # Coup Track + # House head promises to join your faction + scope:powerful_family_head = { + swear_to_join_claimant_faction_effect = yes + } + } + + set_powerful_family_story_variables_effect = { + POWERFUL_HOUSE_SCOPE = scope:powerful_house + METHOD_FLAG = hook + } + + stress_impact = { + paranoid = minor_stress_impact_gain + trusting = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + } + } + + option = { # Betrothal + name = grand_ambitions.0170.c + trigger = { + trigger_if = { + limit = { + NOR = { + faith = { has_doctrine = doctrine_polygamy } + allowed_more_spouses = yes + } + } + is_married = no + } + is_betrothed = no + exists = scope:marriage_proposal + } + + if = { + limit = { + has_ep2_dlc_trigger = yes + } + create_grand_wedding_betrothal = { + SPOUSE_1 = root + SPOUSE_2 = scope:marriage_proposal + HOST = root + PROMISEE = scope:powerful_family_head + } + } + else = { + create_betrothal = scope:marriage_proposal + } + + send_bethrothal_notifications_and_apply_opinions_effect = { + SPOUSE_1 = root + SPOUSE_2 = scope:marriage_proposal + HOST = root + PROMISEE = scope:powerful_family_head + } + + if = { # Scheme Track + limit = { + scope:story.var:method ?= flag:scheme + exists = scope:depose_scheme_scope + } + scope:depose_scheme_scope = { + add_scheme_modifier = { + type = scheme_grand_ambitions_powerful_family_modifier + } + } + } + else = { # Coup Track + # House head promises to join your faction + scope:powerful_family_head = { + swear_to_join_claimant_faction_effect = yes + } + } + + set_powerful_family_story_variables_effect = { + POWERFUL_HOUSE_SCOPE = scope:powerful_house + METHOD_FLAG = marriage + } + + stress_impact = { + chaste = medium_stress_impact_gain + } + + ai_chance = { + base = 60 + } + } + + option = { # My ambitions will not be shackled by debts + name = grand_ambitions.0170.d + change_influence = minor_influence_gain + + ai_chance = { + base = 10 + } + } +} + +# Secure support from the patriarch to crown you (legitimacy) +grand_ambitions.0180 = { + type = character_event + title = grand_ambitions.0180.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:target_char.capital_county = title:e_byzantium } + desc = grand_ambitions.0180.intro_hagia_sofia + } + } + desc = grand_ambitions.0180.desc + } + theme = administrative + + override_background = { + reference = temple_scope + } + + left_portrait = { + character = root + animation = prayer + } + right_portrait = { + character = root.faith.religious_head + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + + trigger = { + any_owned_story = { + type = grand_ambitions_story_cycle + NOT = { has_variable = hof_support } + } + } + + immediate = { + root.faith.religious_head = { + save_scope_as = hof + save_scope_as = background_temple_scope + } + } + + option = { + name = grand_ambitions.0180.a + trigger = { piety_level >= max_piety_level } + flavor = grand_ambitions.0180.a.flavor + reason = piety_level + custom_tooltip = grand_ambitions.0180.b.success.tt + scope:story = { + set_variable = { + name = hof_support + value = yes + } + } + } + + option = { # You have a massive influence level + name = grand_ambitions.0180.d + trigger = { + influence_level >= 4 + } + flavor = grand_ambitions.0180.d.flavor + reason = influence_level + custom_tooltip = grand_ambitions.0180.b.success.tt + scope:story = { + set_variable = { + name = hof_support + value = yes + } + } + + ai_chance = { + base = 100 + } + } + + option = { # Convince the Patriarch to crown you + name = grand_ambitions.0180.b + + change_influence = major_influence_loss + duel = { + skills = { learning intrigue } + value = very_high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 5 + min = -49 + } + modifier = { + num_virtuous_traits >= 1 + add = 10 + } + desc = grand_ambitions.0180.b.success + send_interface_toast = { + type = event_generic_good + title = grand_ambitions.0180.b.success + left_icon = scope:hof + right_icon = scope:target_title + + custom_tooltip = grand_ambitions.0180.b.success.tt + } + if = { + limit = { + can_add_hook = { + target = scope:hof + type = manipulation_hook + } + } + add_hook = { + target = scope:hof + type = manipulation_hook + } + } + scope:story = { + set_variable = { + name = hof_support + value = yes + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -5 + min = -49 + } + modifier = { + num_sinful_traits >= 1 + add = 15 + } + desc = grand_ambitions.0180.b.failure + send_interface_toast = { + type = event_generic_bad + title = grand_ambitions.0180.b.failure + left_icon = scope:hof + right_icon = scope:target_title + + reverse_add_opinion = { + target = scope:hof + modifier = disgusted_opinion + opinion = -30 + } + + scope:story = { + set_variable = { + name = hof_support + value = no + } + } + } + } + } + + ai_chance = { + base = 50 + modifier = { + add = intrigue + } + modifier = { + add = learning + } + } + } + + option = { # Try to bribe the patriarch + name = grand_ambitions.0180.c + + scope:hof = { + random_list = { + 50 = { # Success + desc = grand_ambitions.0180.b.success + root = { + send_interface_toast = { + type = event_generic_good + title = grand_ambitions.0180.b.success + left_icon = scope:hof + right_icon = scope:target_title + + custom_tooltip = grand_ambitions.0180.b.success.tt + remove_treasury_or_gold = massive_treasury_or_gold_value + } + } + scope:story = { + set_variable = { + name = hof_support + value = yes + } + } + + # Traits + modifier = { + has_trait = greedy + add = 50 + } + modifier = { + has_trait = deceitful + add = 20 + } + modifier = { + has_trait = fickle + add = 15 + } + modifier = { + has_trait = arbitrary + add = 10 + } + modifier = { + has_trait = ambitious + add = 10 + } + + # Relationships + modifier = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:target_char } + add = 40 + } + opinion_modifier = { + opinion_target = root + multiplier = 1.0 + } + opinion_modifier = { + opinion_target = root + multiplier = -1.0 + } + } + 50 = { # Failure + desc = grand_ambitions.0180.b.failure + root = { + send_interface_toast = { + type = event_generic_good + title = grand_ambitions.0180.b.success + left_icon = scope:hof + right_icon = scope:target_title + + add_piety = medium_piety_loss + prev = { + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -30 + } + } + } + } + scope:story = { + set_variable = { + name = hof_support + value = no + } + } + + # Traits + modifier = { + has_trait = just + add = 50 + } + modifier = { + has_trait = honest + add = 20 + } + modifier = { + has_trait = content + add = 10 + } + + # Relationships + modifier = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:target_char } + add = 40 + } + + # Opinion + opinion_modifier = { + opinion_target = root + multiplier = -1.0 + } + opinion_modifier = { + opinion_target = root + multiplier = 1.0 + } + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + option = { # You happen to have a hook + name = grand_ambitions.0180.e + trigger = { + OR = { + has_strong_hook = scope:hof + has_weak_hook = scope:hof + } + } + custom_tooltip = grand_ambitions.0180.b.success.tt + if = { + limit = { + has_weak_hook = scope:hof + } + remove_hook = { + target = scope:hof + type = weak_hook + } + } + else = { + remove_hook = { + target = scope:hof + type = strong_hook + } + } + scope:story = { + set_variable = { + name = hof_support + value = yes + } + } + ai_chance = { + base = 100 + } + } + + option = { # Back out of the deal + name = grand_ambitions.0180.f + ai_chance = { + base = 10 + } + } +} + +# You found out a vassal has the Grand Ambitions story cycle, offer them co-emperorship? +grand_ambitions.0190 = { + type = character_event + title = grand_ambitions.0190.t + desc = grand_ambitions.0190.desc + theme = emperor + + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:interlocutor + animation = spymaster + } + lower_center_portrait = scope:secret_owner + + trigger = { + # Ensure root is not already the co-emperor + NAND = { + has_diarchy_type = co_emperorship + diarch = scope:secret_owner + } + # Ensure the secret owner is viable for co-emperorship + scope:secret_owner = { + age >= 16 + } + } + + immediate = { + save_scope_as = emperor + if = { # Grab spymaster first + limit = { + exists = cp:councillor_spymaster + cp:councillor_spymaster != scope:secret_owner + } + cp:councillor_spymaster = { save_scope_as = interlocutor } + } + else_if = { # then chief eunuch + limit = { + exists = court_position:chief_eunuch_court_position + court_position:chief_eunuch_court_position != scope:secret_owner + } + court_position:chief_eunuch_court_position = { save_scope_as = interlocutor } + } + else_if = { # then chancellor + limit = { + exists = cp:councillor_chancellor + cp:councillor_chancellor != scope:secret_owner + } + cp:councillor_chancellor = { save_scope_as = interlocutor } + } + else_if = { # fallback is random family member + limit = { + any_close_family_member = { + this != scope:secret_owner + age >= 16 + } + } + ordered_close_family_member = { + limit = { + this != scope:secret_owner + age >= 16 + } + order_by = intrigue + save_scope_as = interlocutor + } + } + else_if = { + limit = { + any_courtier = { + this != scope:secret_owner + age >= 16 + } + } + ordered_courtier = { + limit = { + this != scope:secret_owner + age >= 16 + } + order_by = intrigue + save_scope_as = interlocutor + } + } + else = { + ordered_pool_character = { + limit = { this != scope:secret_owner } + province = root.location + order_by = intrigue + save_scope_as = interlocutor + } + } + } + + option = { # Offer them Co-Emperorship + name = grand_ambitions.0190.a + custom_tooltip = grand_ambitions.0190.a.tt + random_list = { + 50 = { + show_chance = no + desc = co_emperor_accepts + show_as_tooltip = { + scope:emperor = { + custom_tooltip = { + text = grand_ambitions.0190.a.tt.1 + try_start_diarchy = co_emperorship + set_diarch = scope:secret_owner + } + } + scope:secret_owner = { + custom_tooltip = { + text = grand_ambitions.0190.a.tt.2 + random_secret = { + type = secret_coup_plotter + remove_secret = yes + } + random_owned_story = { + type = grand_ambitions_story_cycle + end_story = yes + } + } + change_influence = major_influence_gain + } + } + } + 50 = { + show_chance = no + desc = co_emperor_rejects + show_as_tooltip = { + change_influence = major_influence_loss + scope:secret_owner = { change_influence = major_influence_gain } + } + } + } + scope:secret_owner = { + trigger_event = { + id = grand_ambitions.0191 + days = 5 + } + } + + ai_chance = { + base = 50 + modifier = { + scope:secret_owner = { is_ai = no } + add = 50 + } + modifier = { + OR = { + has_trait = deceitful + has_trait = craven + has_trait = humble + has_trait = trusting + } + add = 100 + } + } + } + + option = { # Imprison them + name = grand_ambitions.0190.b + add_tyranny = massive_tyranny_gain + add_dread = major_dread_gain + imprison = { target = scope:secret_owner type = dungeon } + scope:secret_owner = { + add_opinion = { + target = root + modifier = imprisoned_me_dungeon + } + every_close_family_member = { + custom = every_family_member_of_secret_owner + add_opinion = { + target = root + modifier = imprisoned_family_member_dungeon + } + } + random = { + chance = 30 + house_feud_start_effect = { + # Feuding House Head + ACTOR = scope:secret_owner + # Target House Head + TARGET = scope:emperor + # Feud Reason + REASON = head_imprisoned + # House Member attacker if relevant + ATTACKER = scope:emperor + # House Member victim if relevant + VICTIM = scope:secret_owner + } + } + } + + ai_chance = { + base = 50 + modifier = { + scope:secret_owner = { is_ai = no } + add = -50 + } + modifier = { + OR = { + has_trait = wrathful + has_trait = arrogant + has_trait = ambitious + has_trait = paranoid + } + add = 100 + } + } + } + + option = { # Opt-Out + name = grand_ambitions.0190.c + + ai_chance = { + base = 0 + } + } +} + +# Current Emperor offers to make you their Co-Emperor +grand_ambitions.0191 = { + type = character_event + title = grand_ambitions.0191.t + desc = grand_ambitions.0191.desc + theme = emperor + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:interlocutor + animation = obsequious_bow + } + lower_center_portrait = scope:emperor + + trigger = { + age >= 16 + scope:emperor = { + # Ensure root is not already the co-emperor + NAND = { + has_diarchy_type = co_emperorship + diarch = root + } + } + # The Emperor knows your secret + any_secret = { + type = secret_coup_plotter + secret_target = scope:emperor + is_known_by = scope:emperor + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + } + + option = { # Accept + name = grand_ambitions.0191.a + scope:emperor = { + custom_tooltip = { + text = grand_ambitions.0190.a.tt.1 + try_start_diarchy = co_emperorship + set_diarch = prev + } + } + scope:secret_owner = { + random_secret = { + type = secret_coup_plotter + remove_secret = yes + } + random_owned_story = { + type = grand_ambitions_story_cycle + end_story = yes + } + change_influence = major_influence_gain + } + } + + option = { # Decline + name = grand_ambitions.0191.b + scope:emperor = { change_influence = major_influence_loss } + change_influence = major_influence_gain + } +} + + +####################################### +### +### CONCLUSION EVENTS +### +### 0200 Success +### 0201 Coronation by HoF +### 0202 Deposed Emperor +### +### 0250 Failure +### +####################################### + +### SUCCESS (0200-0240) +# Congrats, you're emperor now (riffs off event 0002) +grand_ambitions.0200 = { + type = character_event + title = grand_ambitions.0200.t + desc = { + desc = grand_ambitions.0200.opening + triggered_desc = { + trigger = { + scope:scheme = { + any_scheme_agent_slot = { + is_agent_slot_type = agent_eunuch + } + } + scope:story.var:eunuch ?= yes + } + desc = grand_ambitions.0200.eunuch + } + first_valid = { + triggered_desc = { + trigger = { + scope:story ?= { has_variable = powerful_family_method } + } + desc = grand_ambitions.0200.powerful_family + } + } + first_valid = { + triggered_desc = { + trigger = { scope:story.var:powerful_family_method ?= flag:currency } + desc = grand_ambitions.0200.powerful_family.currency + } + triggered_desc = { + trigger = { scope:story.var:powerful_family_method ?= flag:hook } + desc = grand_ambitions.0200.powerful_family.hook + } + triggered_desc = { + trigger = { scope:story.var:powerful_family_method ?= flag:marriage } + desc = grand_ambitions.0200.powerful_family.marriage + } + desc = grand_ambitions.0200.desc + } + desc = grand_ambitions.0200.conclusion + } + theme = administrative + override_background = { + trigger = { scope:target.capital_county = title:c_byzantion } + reference = ep3_constantinople_riot + } + + left_portrait = { + character = root + animation = celebrate_dagger + } + right_portrait = { + character = scope:target + animation = fear + } + + immediate = { + if = { + limit = { + any_owned_story = { + type = grand_ambitions_story_cycle + var:target_char ?= scope:target + } + } + random_owned_story = { + type = grand_ambitions_story_cycle + limit = { + var:target_char ?= scope:target + } + save_scope_as = story + } + } + else_if = { + limit = { + any_scheme = { + type = depose + } + } + random_scheme = { + type = depose + scheme_target_character = { + save_scope_as = recipient + save_scope_as = old_emp + } + } + } + } + + option = { + name = grand_ambitions.0200.a + imprison = { + target = scope:target + type = dungeon + } + # Root becomes next in line for the empire title + if = { + limit = { + scope:target = { + has_realm_law_flag = appointment_type_succession + } + } + scope:target.primary_title = { + current_heir = { save_scope_as = next_heir } + change_appointment_investment = { + target = root + value = { + value = "scope:next_heir.appointment_candidate_score(scope:target.primary_title)" + add = 100 + } + } + } + scope:target = { depose = yes } + } + else = { + scope:target = { + every_vassal = { add_to_list = target_vassals_list } + add_to_list = target_vassals_list + every_held_title = { + limit = { + is_noble_family_title = no + tier >= tier_county + } + add_to_list = target_held_titles + } + capital_county = { + save_temporary_scope_as = new_capital + } + } + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = yes + } + scope:target.primary_title = { + change_title_holder_include_vassals = { + holder = root + change = scope:change + } + } + # We hide some of the effects, since they are all implicit + hidden_effect = { + every_in_list = { + list = target_held_titles + change_title_holder_include_vassals = { + holder = root + change = scope:change + } + } + every_in_list = { + list = target_vassals_list + limit = { + NOT = { this = root } + } + change_liege = { + liege = root + change = scope:change + } + } + set_realm_capital = scope:new_capital + } + resolve_title_and_vassal_change = scope:change + } + change_influence_level = 1 + reverse_add_opinion = { + target = scope:target + modifier = deposed_me_opinion + } + + stress_impact = { + base = major_stress_impact_loss + } + } + + after = { + create_character_memory = { + type = deposed_liege_memory + participants = { liege = scope:target } + } + trigger_event = grand_ambitions.0202 + if = { + limit = { + scope:story ?= { + has_variable = hof_support + var:hof_support = yes + } + } + trigger_event = { # Coronation by the patriarch + id = grand_ambitions.0201 + days = 2 + } + } + if = { + limit = { + scope:story ?= { has_variable = promised_foreign_ruler_claim } + } + trigger_event = { + id = grand_ambitions.0300 + days = 5 + } + } + } +} + +# Coronation by the HoF +grand_ambitions.0201 = { + type = character_event + title = grand_ambitions.0201.t + desc = { + desc = grand_ambitions.0201.desc + triggered_desc = { + trigger = { + knows_language = language_greek + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = grand_ambitions.0201.conc_greek + } + } + theme = administrative + + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + character = root.faith.religious_head + animation = obsequious_bow + } + + immediate = { save_scope_as = root_scope } + + option = { + name = grand_ambitions.0201.a + add_legitimacy = 1000 + add_piety = medium_piety_gain + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + target = root + modifier = admiration_opinion + opinion = 20 + } + } + } + + after = { + scope:story ?= { + if = { + limit = { + NOT = { has_variable = promised_foreign_ruler_claim } + } + end_story = yes + } + } + } +} + +# What to do with the deposed emperor? +grand_ambitions.0202 = { + type = character_event + title = grand_ambitions.0202.t + desc = grand_ambitions.0202.desc + theme = administrative + override_background = { + trigger = { scope:county_location = title:c_byzantion } + reference = ep3_constantinople_riot + } + + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:old_emp + animation = beg + override_imprisonment_visuals = yes + } + + immediate = { + # Saving these scopes for the follow-up (grand_ambitions.0003) for the old emp which references the lost title + save_scope_as = actor + save_scope_as = new_emp + save_scope_as = root_scope # for loc + primary_title = { save_scope_as = revoked } + capital_county = { save_scope_as = county_location } + + random_owned_story = { + type = grand_ambitions_story_cycle + save_scope_as = story + } + + # save the proper scopes depending on how we got to this event + switch = { + trigger = scope:story.var:method + flag:coup = { + scope:defender = { + save_scope_as = recipient + save_scope_as = old_emp + } + } + flag:scheme = { + scope:target = { + save_scope_as = recipient + save_scope_as = old_emp + } + } + } + scope:target ?= { + save_scope_as = recipient + save_scope_as = old_emp + } + scope:old_emp = { + add_character_flag = { + flag = no_hat + days = 5 + } + } + } + + option = { # Do not banish or de-nose the loser + name = grand_ambitions.0202.a + flavor = grand_ambitions.0202.a.flavor + add_dread = minor_dread_loss + change_influence = minor_influence_gain + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + target = root + modifier = weak_opinion + opinion = -10 + } + } + every_vassal = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + if = { + limit = { + has_any_nickname = no + } + random = { + chance = 10 + give_nickname = nick_the_merciful + } + } + scope:target = { + add_opinion = { + target = root + modifier = mercy_opinion + opinion = 30 + } + release_from_prison = yes + } + + ai_chance = { + base = 30 + modifier = { + OR = { + has_trait = patient + has_trait = forgiving + has_trait = humble + } + add = 50 + } + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.75 + } + } + } + + option = { # Just de-nose the loser + name = grand_ambitions.0202.b + flavor = grand_ambitions.0202.b.flavor + disfigure_recipient_effect = yes + blind_castrate_and_disfigure_effect = yes #Stress & dread + torture_blind_castrate_disfigure_opinion_effect = { VERB = disfigured } + scope:target = { release_from_prison = yes } + + ai_chance = { + base = 30 + modifier = { + OR = { + has_trait = sadistic + has_trait = callous + } + add = 50 + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.25 + } + } + } + + option = { # De-nose and Banish the scoundrel! + name = grand_ambitions.0202.c + flavor = grand_ambitions.0202.c.flavor + + disfigure_recipient_effect = yes + blind_castrate_and_disfigure_effect = yes #Stress & dread + torture_blind_castrate_disfigure_opinion_effect = { VERB = disfigured } + + scope:target = { + banish_effect = { BANISHER = root } + # Trigger Succession on the Noble Family Title of the prev emp + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = yes + } + random_held_title = { + limit = { + has_title_law = noble_family_succession_law + } + change_title_holder = { + holder = scope:target.primary_heir + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + # Make the prev emp become a LAAMP + show_as_tooltip = { + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = root + } + } + if = { + limit = { is_ai = no } + trigger_event = grand_ambitions.0003 + } + else = { + trigger_event = grand_ambitions.0004 + } + release_from_prison = yes + } + + ai_chance = { + base = 50 + modifier = { + OR = { + has_trait = vengeful + has_trait = diligent + has_trait = wrathful + has_trait = paranoid + } + add = 60 + } + ai_value_modifier = { + ai_boldness = 1.5 + ai_zeal = 0.25 + } + } + } + + option = { + name = grand_ambitions.0202.d + custom_tooltip = grand_ambitions.0202.d.tt + } + + after = { + if = { + limit = { + scope:story ?= { + NOR = { + has_variable = hof_support + has_variable = promised_foreign_ruler_claim + } + } + } + scope:story = { end_story = yes } + } + } +} + +### FAILURE (0250-0290) +grand_ambitions.0250 = { + type = character_event + title = grand_ambitions.0250.t + desc = grand_ambitions.0250.desc + theme = administrative + override_background = { reference = ep3_city_gate } + + left_portrait = { + character = root + animation = disappointed + } + right_portrait = { + character = scope:interlocutor + animation = shame + } + lower_center_portrait = scope:target + + immediate = { + find_scheme_interlocutor_effect = yes + } + + option = { # Acknowledge your failure + name = grand_ambitions.0250.a + scope:scheme = { end_scheme = yes } + random_owned_story = { + type = grand_ambitions_story_cycle + end_story = yes + } + + stress_impact = { + base = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + diligent = minor_stress_impact_gain + impatient = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + lazy = minor_stress_impact_loss + craven = minor_stress_impact_loss + honest = minor_stress_impact_loss + } + } + + after = { scope:story = { end_story = yes } } +} + + +####################################### +### +### FOLLOW-UP EVENTS +### +### 0300 Reap What You Sow +### +####################################### + +# Reap What You Sow +# Event where the person you made a promise to comes to cash in +grand_ambitions.0300 = { + type = character_event + title = grand_ambitions.0300.t + desc = grand_ambitions.0300.desc + theme = emperor + + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + character = scope:foreign_ruler + animation = personality_honorable + } + + trigger = { + any_owned_story = { + type = grand_ambitions_story_cycle + var:promised_foreign_ruler_claim ?= { + is_ai = yes + NOT = { + any_held_title = { + this = scope:story.var:foreign_ruler_demand + } + } + } + } + } + + immediate = { + scope:story.var:promised_foreign_ruler_claim = { save_scope_as = foreign_ruler } + scope:story.var:foreign_ruler_demand ?= { save_scope_as = demand } + } + + option = { # Grant them the title + name = grand_ambitions.0300.a + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + scope:demand = { + change_title_holder_include_vassals = { + holder = scope:foreign_ruler + change = scope:change + } + holder = { + every_held_title = { + limit = { + is_landless_type_title = no + target_is_de_facto_liege_or_above = scope:demand + } + change_title_holder_include_vassals = { + holder = scope:foreign_ruler + change = scope:change + } + } + } + } + resolve_title_and_vassal_change = scope:change + + add_legitimacy = major_legitimacy_loss + } + + option = { # Find a diplomatic out + name = grand_ambitions.0300.b + trigger = { + NOT = { + is_allied_to = scope:foreign_ruler + is_at_war_with = scope:foreign_ruler + } + } + duel = { + skill = diplomacy + target = scope:foreign_ruler + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = grand_ambitions.0300.b.success + send_interface_toast = { + type = event_generic_good_text + title = grand_ambitions.0300.b.success + left_icon = scope:foreign_ruler + create_alliance = scope:foreign_ruler + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = grand_ambitions.0300.b.failure + send_interface_toast = { + type = event_generic_bad_text + title = grand_ambitions.0300.b.failure + left_icon = scope:foreign_ruler + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + scope:demand = { + change_title_holder_include_vassals = { + holder = scope:foreign_ruler + change = scope:change + } + holder = { + every_held_title = { + limit = { + is_landless_type_title = no + target_is_de_facto_liege_or_above = scope:demand + } + change_title_holder_include_vassals = { + holder = scope:foreign_ruler + change = scope:change + } + } + } + } + resolve_title_and_vassal_change = scope:change + } + } + } + } + + option = { # Deny their claim + name = grand_ambitions.0300.c + add_legitimacy = minor_legitimacy_gain + if = { + limit = { + NOT = { + any_character_war = { + OR = { + primary_attacker = scope:foreign_ruler + primary_defender = scope:foreign_ruler + } + } + } + } + random_list = { + 1 = { + show_chance = no + scope:foreign_ruler = { + start_war = { + casus_belli = claim_cb + target = root + claimant = scope:foreign_ruler + target_title = scope:demand + } + } + } + 1 = { show_chance = no } + } + } + } + + after = { + scope:story ?= { end_story = yes } + } +} + + +####################################### +### +### MAINTENANCE EVENTS +### +### 0500 Invalid Story Target (dead or no longer holds target title) +### +####################################### + +# While you're still scheming or claimant-ing, the target emperor dies or no longer holds the title +grand_ambitions.0500 = { + type = letter_event + opening = grand_ambitions.0500.opening + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:story.var:target_char ?= { + is_alive = no + } + } + desc = grand_ambitions.0500.dead + } + triggered_desc = { + trigger = { + scope:story.var:target_char ?= { + NOT = { any_held_title = { this = scope:story.var:target_title } } + } + } + desc = grand_ambitions.0500.wrong_title + } + } + } + sender = scope:interlocutor + + trigger = { + any_owned_story = { + type = grand_ambitions_story_cycle + save_temporary_scope_as = temp_story + exists = var:target_char + var:target_char = { + NOT = { any_held_title = { this = scope:temp_story.var:target_title } } + } + } + NOT = { + any_held_title = { + this = scope:story.var:target_title + } + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + random_owned_story = { + type = grand_ambitions_story_cycle + save_scope_as = story + } + } + + option = { + name = grand_ambitions.0500.a + trigger = { # Do you still meet the criteria for this story cycle? + house = { + house_head ?= root + is_powerful_family = yes + } + top_liege != this + highest_held_title_tier <= tier_kingdom + government_allows = administrative + top_liege = { + primary_title.tier = tier_empire + government_allows = administrative + } + } + if = { + limit = { scope:story.var:method ?= flag:scheme } + custom_tooltip = { + text = grand_ambitions_start_depose_scheme_tt + # start le scheme + ## Balanced configuration. + begin_scheme_with_agents_effect = { + SCHEME_TYPE = depose + TARGET_TYPE = target_character + TARGET_SCOPE = root.top_liege + # Success. + AGENT_1 = agent_diplomat + AGENT_2 = agent_tumbler + # Speed. + AGENT_3 = agent_infiltrator + AGENT_4 = agent_socialite + # Secrecy. + AGENT_5 = agent_decoy + } + # Add a bussin scheme modifier + random_scheme = { + type = depose + add_scheme_modifier = { + type = scheme_grand_ambitions_modifier + } + } + } + } + # Update the story variables + scope:story = { + set_variable = { + name = target_char + value = root.top_liege + } + set_variable = { + name = target_title + value = root.top_liege.primary_title + } + } + } + + option = { + name = grand_ambitions.0500.b + custom_tooltip = grand_ambitions.0500.b.tt + scope:story = { end_story = yes } + top_liege = { + if = { + limit = { + scope:story.var:method ?= flag:coup + any_targeting_faction = { + faction_leader = root + faction_type = claimant_faction + } + } + random_targeting_faction = { + faction_type = claimant_faction + limit = { + faction_leader = root + } + destroy_faction = yes + } + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt b/N3OW/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt new file mode 100644 index 00000000..4c88e764 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt @@ -0,0 +1,2639 @@ +namespace = ep3_story_cycle_violet_poet + +################################################## +# Maintenance events +# 0001-0999 +################################################## + +#andalusian_0003 +#Visit Orphanage + +#Lead-in event +ep3_story_cycle_violet_poet.0001 = { + type = character_event + title = ep3_story_cycle_violet_poet.0001.t + desc = ep3_story_cycle_violet_poet.0001.desc + theme = violet_poet + left_portrait = { + character = root + animation = thinking + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + cooldown = { years = 100 } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + title:c_toledo.holder = { + save_scope_as = toledo_owner + } + title:c_toledo = { + save_scope_as = toledo + } + location = { + save_scope_as = cordoba + } + create_story = story_cycle_violet_poet + create_artifact = { + name = artifact_double_moon_book + description = artifact_double_moon_book_description + type = journal + visuals = book + modifier = double_moon_modifier + save_scope_as = double_moon_book + } + hidden_effect = { + scope:double_moon_book = { + set_artifact_rarity = illustrious + } + #Error log suppression, the variable is set in the 01_laamp_titles.txt and checked in 00_succession_laws.txt + if = { + limit = { always = no } + primary_title = { + set_variable = { + name = can_keep_realm_law + value = flag:equal_law + } + } + } + } + } + + option = { #Stay in Cordoba + name = ep3_story_cycle_violet_poet.0001.a + + flavor = ep3_story_cycle_violet_poet.0001.a.tt + + stress_impact = { + content = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { #Leave for pastures new + name = ep3_story_cycle_violet_poet.0001.b + + flavor = ep3_story_cycle_violet_poet.0001.b.tt + + custom_tooltip = ep3_story_cycle_violet_poet.0001.b.travel + + start_travel_plan = { + destination = scope:toledo_owner.capital_province + travel_with_domicile = yes + players_use_planner = no + return_trip = no + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + } + + ai_chance = { + base = 0 #Prioritise her staying in Cordoba for AI + } + } + + after = { + hidden_effect = { + scope:double_moon_book = { + set_artifact_description = artifact_double_moon_book_description_append + } + } + if = { + limit = { + NOT = { + has_character_flag = violet_poet_designated_heir + } + } + trigger_event = { + id = ep3_story_cycle_violet_poet.0002 + years = { 4 5 } + } + } + } +} + +#Heir designation event two-parter +#Triggered within the first five years of violet_poet's life +ep3_story_cycle_violet_poet.0002 = { + type = character_event + title = ep3_story_cycle_violet_poet.0002.t + desc = ep3_story_cycle_violet_poet.0002.desc + theme = violet_poet + left_portrait = { + character = root + animation = worry + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + + trigger = { + has_ep3_dlc_trigger = yes + any_courtier = { + count > 1 + } + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + + option = { #Go for it + name = ep3_story_cycle_violet_poet.0002.a + + flavor = ep3_story_cycle_violet_poet.0002.a.tt + + trigger_event = { + id = ep3_story_cycle_violet_poet.0003 + days = { 1 2 } + } + + add_character_flag = violet_poet_designated_heir + + stress_impact = { + base = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { #Do not designate an heir + name = ep3_story_cycle_violet_poet.0002.b + + flavor = ep3_story_cycle_violet_poet.0002.b.flavor + custom_tooltip = ep3_story_cycle_violet_poet.0002.b.tt + + if = { + limit = { + NOT = { + has_character_flag = violet_poet_designated_heir + } + } + trigger_event = { + id = ep3_story_cycle_violet_poet.0002 + years = 5 + } + } + + stress_impact = { + base = miniscule_stress_impact_gain + } + + ai_chance = { + base = 0 #We want her to designate an heir + } + } +} + +#Heir designation event +ep3_story_cycle_violet_poet.0003 = { + type = character_event + title = ep3_story_cycle_violet_poet.0003.t + desc = { + desc = ep3_story_cycle_violet_poet.0003.opening + first_valid = { + triggered_desc = { + trigger = { + scope:heir1 = { + has_trait = lifestyle_poet + } + } + desc = ep3_story_cycle_violet_poet.0003.poet + } + desc = ep3_story_cycle_violet_poet.0003.diplomat + } + first_valid = { + triggered_desc = { + trigger = { + scope:heir2 = { + is_female = yes + } + } + desc = ep3_story_cycle_violet_poet.0003.woman + } + desc = ep3_story_cycle_violet_poet.0003.young + } + desc = ep3_story_cycle_violet_poet.0003.heir3 + first_valid = { + triggered_desc = { + trigger = { + scope:heir3 = { + has_trait = intellect_good + } + } + desc = ep3_story_cycle_violet_poet.0003.intelligent + } + triggered_desc = { + trigger = { + scope:heir3 = { + has_trait = beauty_good + } + } + desc = ep3_story_cycle_violet_poet.0003.beautiful + } + } + desc = ep3_story_cycle_violet_poet.0003.ending + } + + theme = violet_poet + left_portrait = { + character = root + animation = thinking + } + lower_left_portrait = { + character = scope:heir1 + } + lower_center_portrait = { + character = scope:heir2 + } + lower_right_portrait = { + character = scope:heir3 + } + + trigger = { + has_ep3_dlc_trigger = yes + this = character:andalusian_0003 + any_courtier = { + count > 1 + } + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + + #Heir 1 + #Prefers poets and high diplo, fallback is created + if = { + limit = { + any_courtier = { + OR = { + has_trait = lifestyle_poet + diplomacy > 20 + } + } + } + random_courtier = { + limit = { + OR = { + has_trait = lifestyle_poet + diplomacy > 20 + } + } + weight = { + base = 1 + modifier = { + factor = 4 + has_trait = lifestyle_poet + } + modifier = { + factor = 2 + diplomacy > 20 + } + } + save_scope_as = heir1 + } + } + else = { + hidden_effect = { + create_character = { + template = generic_peasant_character + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 50 + location = root.location + save_scope_as = heir1 + } + } + } + + #Heir 2 + #Prefers women and also young people, fallback is created + if = { + limit = { + any_courtier = { + OR = { + is_female = yes + age < 25 + } + } + } + random_courtier = { + limit = { + OR = { + is_female = yes + age < 25 + } + } + weight = { + base = 1 + modifier = { + factor = 4 + is_female = yes + } + modifier = { + factor = 2 + age < 25 + } + } + save_scope_as = heir2 + } + } + else = { + hidden_effect = { + create_character = { + template = generic_peasant_character + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 100 + location = root.location + save_scope_as = heir2 + } + } + } + + hidden_effect = { + create_character = { + template = ep3_wallada_heir_template + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 100 + location = root.location + save_scope_as = heir3 + } + } + } + + option = { #Choose heir 1 + name = ep3_story_cycle_violet_poet.0003.a + + set_designated_heir = scope:heir1 + if = { + limit = { + scope:heir1 = { + NOT = { is_courtier_of = root } + } + } + add_courtier = scope:heir1 + } + + adopt_effect = { + CHILD = scope:heir1 + ADOPTER = root + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + + ai_chance = { + base = 25 + } + } + + option = { #Choose heir 2 + name = ep3_story_cycle_violet_poet.0003.b + + set_designated_heir = scope:heir2 + if = { + limit = { + scope:heir2 = { + NOT = { is_courtier_of = root } + } + } + add_courtier = scope:heir2 + } + + adopt_effect = { + CHILD = scope:heir2 + ADOPTER = root + } + + stress_impact = { + base = miniscule_stress_impact_gain + } + + ai_chance = { + base = 25 + } + } + + option = { #Choose heir 3 + name = ep3_story_cycle_violet_poet.0003.c + + set_designated_heir = scope:heir3 + if = { + limit = { + scope:heir3 = { + NOT = { is_courtier_of = root } + } + } + add_courtier = scope:heir3 + } + + adopt_effect = { + CHILD = scope:heir3 + ADOPTER = root + } + + stress_impact = { + base = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 #Prefer the cool one + } + } +} + +#Passing over things +ep3_story_cycle_violet_poet.0004 = { + type = character_event + title = ep3_story_cycle_violet_poet.0004.t + desc = ep3_story_cycle_violet_poet.0004.desc + theme = violet_poet + left_portrait = { + character = root + animation = grief + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + + option = { #Pass over things + name = ep3_story_cycle_violet_poet.0004.a + + add_trait = violet_poet + + hidden_effect = { #To avoid redundancy + if = { + limit = { + has_trait = lifestyle_poet + } + remove_trait = lifestyle_poet + } + + ###Give them XP in the trait based off a few factors + #If they're, you know, living up to her standards + if = { + limit = { + any_memory = { + memory_type = had_sex + count > 4 + } + } + add_trait_xp = { + trait = violet_poet + value = { 4 8 } + } + } + #If they're bi + if = { + limit = { + has_sexuality = bisexual + } + add_trait_xp = { + trait = violet_poet + value = { 6 10 } + } + } + #If they're not tied down + if = { + limit = { + is_married = no + } + add_trait_xp = { + trait = violet_poet + value = { 2 4 } + } + } + } + + ai_chance = { + base = 100 + } + } +} + +## Maintenance events for Write Muwashshah Poem +# Sell Poem +ep3_story_cycle_violet_poet.0010 = { + hidden = yes + + immediate = { + send_interface_message = { + type = event_title_good + title = ep3_story_cycle_violet_poet.0010.title + left_icon = root + + if = { + limit = { + has_character_modifier = ep3_quality_control_modifier + } + add_gold = { medium_gold_laamps_value major_gold_laamps_value } + } + else = { + add_gold = { minor_gold_laamps_value medium_gold_laamps_value } + } + } + } +} + +# Keep Poem +ep3_story_cycle_violet_poet.0011 = { + hidden = yes + + immediate = { + if = { + limit = { + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + send_interface_message = { + type = msg_poem_kept + title = ep3_story_cycle_violet_poet.0011.title + desc = ep3_story_cycle_violet_poet.0011.message + left_icon = root + right_icon = scope:double_moon_book + + add_randomised_double_moon_modifier_effect = yes + } + } +} + +# Distribute Poem +ep3_story_cycle_violet_poet.0012 = { + hidden = yes + + immediate = { + send_interface_message = { + type = event_title_good + title = ep3_story_cycle_violet_poet.0012.title + left_icon = root + + if = { + limit = { + has_character_modifier = ep3_focused_on_studies_modifier + } + add_prestige = { minor_prestige_gain medium_prestige_gain } + } + else = { + add_prestige = { minor_prestige_gain major_prestige_gain } + } + } + } +} + +################################################## +# Violet poet Events +# by Nick Meredith & Eilidh MacRuaidhri +################################################## + +# Nature's Bounty +# Travel event +ep3_story_cycle_violet_poet.1000 = { + type = character_event + title = ep3_story_cycle_violet_poet.1000.t + desc = ep3_story_cycle_violet_poet.1000.desc + theme = travel + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = thinking + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + is_landless_ruler = yes + is_available_travelling = yes + has_trait = violet_poet + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + location = { save_scope_as = location } + province:1995 = { save_scope_as = cordoba } # b_cordoba + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + + option = { #Write a poem + name = ep3_story_cycle_violet_poet.1000.a + + add_learning_lifestyle_xp = minor_lifestyle_experience + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1000.a.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_independent_ruler_opinion_2_modifier + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + content = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { #Forage for wild plants + name = ep3_story_cycle_violet_poet.1000.b + + add_character_modifier = { + modifier = ep3_foraged_plants + years = 10 + } + + if = { + limit = { + NOT = { + has_trait = lifestyle_herbalist + } + } + random = { + chance = 30 + add_trait = lifestyle_herbalist + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + craven = miniscule_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +# A Fine Apprentice +ep3_story_cycle_violet_poet.1005 = { + type = character_event + title = ep3_story_cycle_violet_poet.1005.t + desc = ep3_story_cycle_violet_poet.1005.desc + theme = violet_poet + override_background = { reference = corridor_day } + left_portrait = { + character = root + animation = eavesdrop + } + right_portrait = { + character = scope:child + animation = throne_room_conversation_1 + } + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + location = { save_scope_as = location } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + hidden_effect = { + create_character = { + template = peasant_child_character + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 100 + learning = 14 + diplomacy = 16 + age = { 12 14 } + location = root.location + save_scope_as = child + } + } + } + + option = { #Take them in + name = ep3_story_cycle_violet_poet.1005.a + + flavor = ep3_story_cycle_violet_poet.1005.a.tt + + remove_short_term_gold = minor_gold_value + + add_courtier = scope:child + + stress_impact = { + greedy = minor_stress_impact_gain + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = 1 + } + } + } + + option = { #Write a poem about it + name = ep3_story_cycle_violet_poet.1005.b + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1005.b.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_child_opinion_2_modifier + } + } + + hidden_effect = { + scope:child = { + move_to_pool = yes + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 1 + } + } + } + + option = { #Pay for their tuition + name = ep3_story_cycle_violet_poet.1005.c + + flavor = ep3_story_cycle_violet_poet.1005.c.tt + + remove_short_term_gold = medium_gold_value + + add_character_modifier = { + modifier = ep3_tuition_paid + years = 10 + } + + hidden_effect = { + scope:child = { + move_to_pool = yes + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } +} + +# The Romance of Poetry +ep3_story_cycle_violet_poet.1010 = { + type = character_event + title = ep3_story_cycle_violet_poet.1010.t + desc = ep3_story_cycle_violet_poet.1010.desc + theme = violet_poet + override_background = { reference = corridor_day } + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:ruler_spouse + animation = admiration + } + lower_center_portrait = { + character = scope:ruler + } + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + location.barony.holder = { + any_spouse = { + is_attracted_to_gender_of = root + } + } + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + location = { save_scope_as = location } + location.barony.holder = { + random_spouse = { + limit = { + is_attracted_to_gender_of = root + } + save_scope_as = ruler_spouse + } + save_scope_as = ruler + } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + + option = { #Offer 'private poetry reading' + name = ep3_story_cycle_violet_poet.1010.a + + duel = { + skill = intrigue + value = decent_skill_rating + + 50 = { #She's down + desc = ep3_story_cycle_violet_poet.1010.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + + modifier = { + attraction >= low_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= medium_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= high_positive_attraction + factor = 1.2 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1010.a.success + left_icon = root + right_icon = scope:ruler_spouse + + had_sex_with_effect = { + CHARACTER = scope:ruler_spouse + PREGNANCY_CHANCE = pregnancy_chance + } + } + } + + 50 = { #She ain't down + desc = ep3_story_cycle_violet_poet.1010.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1010.a.failure + left_icon = root + right_icon = scope:ruler_spouse + + add_stress = medium_stress_gain + + reverse_add_opinion = { + target = scope:ruler + modifier = suspicious_opinion + opinion = -5 + } + } + } + } + + stress_impact = { + lustful = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + seducer = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { #Write about it + name = ep3_story_cycle_violet_poet.1010.b + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1010.b.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_2_modifier + } + } + + add_prestige = minor_prestige_gain + + stress_impact = { + base = miniscule_stress_impact_loss + shy = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_sociability = -1 + } + } + } + + option = { #Start romance scheme + name = ep3_story_cycle_violet_poet.1010.c + + trigger = { + can_start_scheme = { + type = courting + target_character = scope:ruler_spouse + } + } + + start_scheme = { + type = courting + target_character = scope:ruler_spouse + } + + custom_tooltip = ep3_story_cycle_violet_poet.1010.c.tt + + hidden_effect = { + random_scheme = { + type = courting + limit = { + scheme_target_character = scope:ruler_spouse + } + add_scheme_modifier = { + type = extra_success_chance_modifier + } + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 1 + } + } + } +} + +# A Follower, Enamored +ep3_story_cycle_violet_poet.1015 = { + type = character_event + title = ep3_story_cycle_violet_poet.1015.t + desc = ep3_story_cycle_violet_poet.1015.desc + theme = violet_poet + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:stranger + animation = admiration + } + + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + } + + immediate = { + location = { save_scope_as = location } + create_character = { + template = beautiful_peasant_character #Make 'em pretty, just for fun + age = { 30 70 } + gender_female_chance = root_attraction_based_female_chance + location = root.location + faith = root.faith + culture = root.culture + + after_creation = { + set_sexuality = bisexual #Screw it + } + + save_scope_as = stranger + } + } + + option = { #Dang, you sit with that ass? + name = ep3_story_cycle_violet_poet.1015.a + + trigger = { + has_trait = lustful + } + + duel = { + skill = intrigue + value = decent_skill_rating + + 50 = { #They're down + desc = ep3_story_cycle_violet_poet.1015.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + + modifier = { + attraction >= low_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= medium_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= high_positive_attraction + factor = 1.2 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1015.a.success + left_icon = root + right_icon = scope:stranger + + had_sex_with_effect = { + CHARACTER = scope:stranger + PREGNANCY_CHANCE = pregnancy_chance + } + } + } + + 50 = { #They ain't down + desc = ep3_story_cycle_violet_poet.1015.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1015.a.failure + left_icon = root + right_icon = scope:stranger + + hidden_effect = { + scope:stranger = { + move_to_pool = yes + } + } + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + lustful = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { #Offer them a place in your camp + name = ep3_story_cycle_violet_poet.1015.b + + reverse_add_opinion = { + target = scope:stranger + modifier = grateful_opinion + opinion = 35 + } + + add_courtier = scope:stranger + + if = { + limit = { + NOT = { + employs_court_position = travel_leader_court_position + } + } + court_position_grant_effect = { + CANDIDATE = scope:stranger + POS = travel_leader + EMPLOYER = root + } + } + + stress_impact = { + lustful = minor_stress_impact_gain + gregarious = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = 1 + } + } + } + + option = { #Take the compliment + name = ep3_story_cycle_violet_poet.1015.c + + add_character_modifier = { + modifier = ep3_from_far_and_wide + years = 10 + } + + scope:stranger = { + silent_disappearance_effect = yes + } + + stress_impact = { + base = minor_stress_impact_loss + humble = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_sociability = 1 + } + } + } +} + +# The Fog that Clouds All +ep3_story_cycle_violet_poet.1020 = { + type = character_event + title = ep3_story_cycle_violet_poet.1020.t + desc = ep3_story_cycle_violet_poet.1020.desc + theme = violet_poet + left_portrait = { + character = root + animation = stress + } + lower_right_portrait = { + trigger = { scope:poet = { is_alive = yes } } + character = scope:poet + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + location = { save_scope_as = location } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + if = { + limit = { + any_courtier = { + diplomacy > 20 + } + } + random_courtier = { + limit = { + diplomacy > 20 + } + save_scope_as = poet + } + } + } + + option = { #Ask another poet to help + name = ep3_story_cycle_violet_poet.1020.a + reason = skilled_follower + + trigger = { + custom_description = { + text = followers_over_diplomacy + any_courtier = { + diplomacy > 20 + } + } + } + show_as_unavailable = { + custom_description = { + text = followers_over_diplomacy + NOT = { + any_courtier = { + diplomacy > 20 + } + } + } + } + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1020.a.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_personal_scheme_phase_duration_add_2_modifier + } + } + + progress_towards_friend_effect = { + REASON = friend_helped_poetry + CHARACTER = scope:poet + OPINION = default_friend_opinion + } + + stress_impact = { + base = minor_stress_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { #Try and persevere + name = ep3_story_cycle_violet_poet.1020.b + + duel = { + skill = learning + value = decent_skill_rating + + 50 = { #It works + desc = ep3_story_cycle_violet_poet.1020.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1020.a.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_personal_scheme_phase_duration_add_2_modifier + } + } + } + + 50 = { #She ain't down + desc = ep3_story_cycle_violet_poet.1020.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1020.b.failure + left_icon = root + + add_character_modifier = { + modifier = ep3_pushed_too_hard + years = 5 + } + } + } + } + + stress_impact = { + lazy = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { #Take a break and enjoy life + name = ep3_story_cycle_violet_poet.1020.c + + random_list = { + 10 = { #It works + desc = ep3_story_cycle_violet_poet.1020.c.success + modifier = { + trigger = { + has_trait = lazy + } + add = 5 + } + modifier = { + trigger = { + has_trait = content + } + add = 3 + } + modifier = { + trigger = { + has_trait = calm + } + add = 2 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_story_cycle_violet_poet.1020.c.success + left_icon = root + + add_character_modifier = ep3_refreshed_and_relaxed + } + } + + 10 = { #Didn't work + desc = ep3_story_cycle_violet_poet.1020.c.failure + modifier = { + trigger = { + has_trait = diligent + } + add = 5 + } + modifier = { + trigger = { + has_trait = ambitious + } + add = 3 + } + modifier = { + trigger = { + has_trait = wrathful + } + add = 2 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_violet_poet.1020.c.failure + left_icon = root + + add_stress = medium_stress_gain + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +scripted_effect save_the_orphans_effect = { + add_to_list = list_of_orphans + if = { + limit = { exists = scope:orphan3 } + save_scope_as = orphan4 + } + else_if = { + limit = { exists = scope:orphan2 } + save_scope_as = orphan3 + } + else = { save_scope_as = orphan2 } +} + +#Adopt orphans +ep3_story_cycle_violet_poet.1025 = { + type = character_event + title = ep3_story_cycle_violet_poet.1025.t + desc = ep3_story_cycle_violet_poet.1025.desc + theme = violet_poet + override_background = { reference = courtyard } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:orphan + animation = clutching_toy + } + lower_center_portrait = { + character = scope:orphan2 + } + lower_left_portrait = { + character = scope:orphan3 + } + lower_right_portrait = { + character = scope:orphan4 + } + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + } + + immediate = { + location = { save_scope_as = location } + scope:location.county.holder = { save_scope_as = holder } + # Orphan 1 + create_character = { + template = fp1_capital_county_orphan_character + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 100 #For protege purposes + location = root.location + save_scope_as = orphan + } + hidden_effect = { + scope:orphan = { + add_learning_skill = 5 #Make her an interesting choice + add_to_list = list_of_orphans + } + } + # Orphans 2-4 + ordered_pool_character = { + province = root.location + limit = { + age < 11 + location = root.location + is_lowborn = yes + NOT = { is_in_list = list_of_orphans } + } + order_by = age + max = 3 + check_range_bounds = no + save_the_orphans_effect = yes + } + while = { + limit = { + any_in_list = { + list = list_of_orphans + count < 4 + } + } + create_character = { + template = fp1_capital_county_orphan_character + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 50 + location = root.location + save_scope_as = new_orphan + } + scope:new_orphan = { save_the_orphans_effect = yes } + } + } + + option = { #I'll take them all! + name = ep3_story_cycle_violet_poet.1025.a + + flavor = ep3_story_cycle_violet_poet.1025.a.tt + + remove_short_term_gold = major_gold_value + + add_courtier = scope:orphan + add_courtier = scope:orphan2 + add_courtier = scope:orphan3 + add_courtier = scope:orphan4 + + every_in_list = { + list = list_of_orphans + custom = 1025_every_orphan + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 35 + } + random = { + chance = 50 + add_trait = loyal + } + } + + add_character_modifier = { + modifier = ep3_friend_to_orphans + years = 30 + } + + stress_impact = { + generous = minor_stress_loss + compassionate = minor_stress_loss + greedy = medium_stress_gain + callous = medium_stress_gain + sadistic = medium_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_greed = -1 + } + } + } + + option = { #Take the actually talented one lol + name = ep3_story_cycle_violet_poet.1025.b + + flavor = ep3_story_cycle_violet_poet.1025.b.tt + + remove_short_term_gold = minor_gold_value + + add_character_flag = one_orphan_taken_flag + + add_courtier = scope:orphan + + reverse_add_opinion = { + target = scope:orphan + modifier = grateful_opinion + opinion = 45 + } + + random = { + chance = 50 + send_interface_toast = { + type = event_toast_effect_good + title = ep3_story_cycle_violet_poet.1025.b.success + left_icon = root + right_icon = scope:orphan + scope:orphan = { + add_diplomacy_skill = { 1 3 } + } + } + } + + stress_impact = { + generous = medium_stress_gain + compassionate = medium_stress_gain + greedy = minor_stress_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_greed = -0.5 + } + } + } + + option = { #Try to shame the local lord into paying + name = ep3_story_cycle_violet_poet.1025.c + + trigger = { + scope:holder = { + is_ai = yes + } + } + + flavor = ep3_story_cycle_violet_poet.1025.c.tt + + add_character_flag = no_orphans_taken_flag + + duel = { + skill = diplomacy + target = scope:holder + + 50 = { #He accepts + desc = ep3_story_cycle_violet_poet.1025.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + min = 10 + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1025.c.success + left_icon = root + right_icon = scope:holder + + scope:holder = { + remove_short_term_gold = minor_gold_value + } + + scope:location.county = { + add_county_modifier = { + modifier = ep3_healthy_orphanages_modifier + years = 20 + } + } + } + } + + 50 = { #He declines + desc = ep3_story_cycle_violet_poet.1025.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + min = 10 + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1025.c.failure + left_icon = root + right_icon = scope:holder + + add_stress = medium_stress_gain + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + + after = { + if = { + limit = { + OR = { + has_character_flag = one_orphan_taken_flag + has_character_flag = no_orphans_taken_flag + } + } + every_in_list = { + list = list_of_orphans + limit = { + trigger_if = { + limit = { + root = { has_character_flag = one_orphan_taken_flag } + } + NOT = { scope:orphan ?= this } + } + } + silent_disappearance_effect = yes + } + } + remove_character_flag = one_orphan_taken_flag + remove_character_flag = no_orphans_taken_flag + } +} + +#Tutor a local noblewoman +ep3_story_cycle_violet_poet.1030 = { + type = character_event + title = ep3_story_cycle_violet_poet.1030.t + desc = ep3_story_cycle_violet_poet.1030.desc + theme = violet_poet + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:noblewoman + animation = ecstasy + } + lower_center_portrait = { + trigger = { scope:courtier_poet = { is_alive = yes} } + character = scope:courtier_poet + } + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + location.county = { #Take the county you're in + any_neighboring_county = { #Now scope to a neighbouring county + holder = { #and their holder + OR = { + any_courtier_or_guest = { #and finally their noble courtiers/guests + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + any_close_family_member = { #in case there are none, take their family member + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + } + } + } + } + } + + immediate = { + location = { save_scope_as = location } + location.county.holder = { save_scope_as = holder } + location.county = { #Take the county you're in + random_neighboring_county = { #Now scope to a neighbouring county + limit = { + holder = { + OR = { + any_courtier_or_guest = { #and finally their noble courtiers/guests + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + any_close_family_member = { #in case there are none, take their family member + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + } + } + } + save_scope_as = neighbouring_county + holder = { #and their holder + if = { + limit = { + any_courtier_or_guest = { + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + } + random_courtier_or_guest = { #and finally their noble courtiers/guests + limit = { + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + save_scope_as = noblewoman + } + } + else = { + random_close_family_member = { #in case there are none, take their family member + limit = { + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + save_scope_as = noblewoman + } + } + } + } + } + if = { + limit = { + any_courtier = { + is_physically_able_ai_adult = yes + has_trait = lifestyle_poet + } + } + random_courtier = { + limit = { + is_physically_able_ai_adult = yes + has_trait = lifestyle_poet + } + save_scope_as = courtier_poet + } + } + } + + option = { #I'll do it! + name = ep3_story_cycle_violet_poet.1030.a + + scope:noblewoman = { + pay_short_term_gold = { + target = root + gold = major_gold_value + } + } + + add_character_modifier = { + modifier = ep3_tutoring_noblewoman_modifier + years = 5 + } + + reverse_add_opinion = { + target = scope:noblewoman + modifier = pleased_opinion + opinion = 25 + } + + stress_impact = { + compassionate = minor_stress_loss + greedy = minor_stress_loss + callous = medium_stress_gain + sadistic = medium_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_greed = 1 + } + } + } + + option = { #I cannot spare the time + name = ep3_story_cycle_violet_poet.1030.b + + add_character_modifier = { + modifier = ep3_focused_on_studies_modifier + years = 5 + } + + reverse_add_opinion = { + target = scope:noblewoman + modifier = disappointed_opinion + opinion = -10 + } + + stress_impact = { + compassionate = medium_stress_gain + greedy = medium_stress_gain + callous = minor_stress_loss + sadistic = minor_stress_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_greed = -1 + } + } + } + + option = { #Perhaps I can offer you a replacement? + name = ep3_story_cycle_violet_poet.1030.c + + trigger = { + exists = scope:courtier_poet + } + + flavor = ep3_story_cycle_violet_poet.1030.c.tt + + scope:noblewoman = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + pay_short_term_gold = { + target = scope:courtier_poet + gold = minor_gold_value + } + } + + reverse_add_opinion = { + target = scope:noblewoman + modifier = pleased_opinion + opinion = 10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +### Ibn Zaydun chain +# Whenever darkness falls +ep3_story_cycle_violet_poet.2000 = { + type = character_event + title = ep3_story_cycle_violet_poet.2000.t + desc = ep3_story_cycle_violet_poet.2000.desc + theme = violet_poet + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:zaydun + animation = love + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + + cooldown = { years = 100 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + character:andalusian_0003 = this + character:andalusian_0004 = { #Ibn Zaydun + is_alive = yes + is_available_ai_adult = yes + } + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + location = { save_scope_as = location } + character:andalusian_0004 = { + save_scope_as = zaydun + } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + scope:zaydun.location = { + save_scope_as = zaydun_original_location + } + } + + option = { #Perhaps I should write him a letter... + name = ep3_story_cycle_violet_poet.2000.a + + custom_tooltip = ep3_story_cycle_violet_poet.2000.a.tt + + trigger_event = { #Since Ibn Zaydun is AI, just fake the interaction + id = ep3_story_cycle_violet_poet.2001 + days = { 11 15 } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = medium_stress_impact_gain + lustful = miniscule_stress_impact_loss + chaste = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { #Write a poem in memory of a lost love + name = ep3_story_cycle_violet_poet.2000.b + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.2000.a.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_courting_scheme_phase_duration_add_3_modifier + } + } + + stress_impact = { + content = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + forgiving = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_sociability = -1 + } + } + } + + option = { #The time has passed + name = ep3_story_cycle_violet_poet.2000.c + + add_character_modifier = { + modifier = ep3_star_crossed_modifier + years = 5 + } + + scope:zaydun = { + add_character_modifier = { + modifier = ep3_star_crossed_modifier + years = 5 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +ep3_story_cycle_violet_poet.2001 = { + type = letter_event + opening = ep3_story_cycle_violet_poet.2001.t + desc = ep3_story_cycle_violet_poet.2001.desc + sender = scope:zaydun + + trigger = { + character:andalusian_0003 = this + character:andalusian_0004 = { #Ibn Zaydun + is_alive = yes + is_available_ai_adult = yes + } + } + + immediate = { + location = { save_scope_as = location } + character:andalusian_0004 = { + save_scope_as = zaydun + } + } + + option = { + name = ep3_story_cycle_violet_poet.2001.a + flavor = ep3_story_cycle_violet_poet.2001.a.flavor + custom_tooltip = ep3_story_cycle_violet_poet.2001.a.tt + + + hidden_effect = { + scope:zaydun = { + trigger_event = { + id = ep3_story_cycle_violet_poet.2002 + days = { 7 14 } + } + } + } + } + + option = { + name = ep3_story_cycle_violet_poet.2001.b + scope:zaydun = { + add_stress = major_stress_gain + } + } +} + +ep3_story_cycle_violet_poet.2002 = { + type = character_event + hidden = yes + + immediate = { + character:andalusian_0003 = { + add_courtier = scope:zaydun + trigger_event = ep3_story_cycle_violet_poet.2005 + } + } +} + +#He arrives +ep3_story_cycle_violet_poet.2005 = { + type = character_event + title = ep3_story_cycle_violet_poet.2005.t + desc = ep3_story_cycle_violet_poet.2005.desc + theme = love + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = love + } + right_portrait = { + character = scope:zaydun + animation = flirtation + } + + trigger = { + has_ep3_dlc_trigger = yes + character:andalusian_0003 = this + character:andalusian_0004 = { #Ibn Zaydun + is_alive = yes + is_available_ai_adult = yes + } + } + + immediate = { + location = { save_scope_as = location } + character:andalusian_0004 = { + save_scope_as = zaydun + } + } + + option = { #It's him! + name = ep3_story_cycle_violet_poet.2005.a + + flavor = ep3_story_cycle_violet_poet.2005.a.tt + + add_character_modifier = { + modifier = ep3_reunited_modifier + years = 3 + } + + scope:zaydun = { + add_character_modifier = { + modifier = ep3_reunited_modifier + years = 3 + } + } + + stress_impact = { + lustful = minor_stress_impact_loss + chaste = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { #How useful to me! + name = ep3_story_cycle_violet_poet.2005.b + + add_character_modifier = { + modifier = ep3_famous_connections_modifier + years = 5 + } + + reverse_add_opinion = { + target = scope:zaydun + modifier = annoyed_opinion + opinion = -25 + } + + stress_impact = { + ambitious = minor_stress_impact_loss + content = medium_stress_impact_gain + lustful = minor_stress_impact_gain + chaste = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + after = { + trigger_event = { + id = ep3_story_cycle_violet_poet.2010 + days = { 12 18 } + } + } +} + +#He offers to collaborate on some poetry with you +ep3_story_cycle_violet_poet.2010 = { + type = character_event + title = ep3_story_cycle_violet_poet.2010.t + desc = ep3_story_cycle_violet_poet.2010.desc + theme = violet_poet + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:zaydun + animation = flirtation + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + + trigger = { + has_ep3_dlc_trigger = yes + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + character:andalusian_0003 = this + character:andalusian_0004 = { #Ibn Zaydun + is_alive = yes + is_available_ai_adult = yes + } + } + + immediate = { + location = { save_scope_as = location } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + + option = { #Agree + name = ep3_story_cycle_violet_poet.2010.a + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1020.a.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_learning_per_prestige_level_modifier + } + } + + reverse_add_opinion = { + target = scope:zaydun + modifier = pleased_opinion + opinion = 10 + } + + stress_impact = { + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + } + } + } + + option = { #Disagree + name = ep3_story_cycle_violet_poet.2010.b + + add_character_modifier = { + modifier = ep3_quality_control_modifier + years = 10 + } + + reverse_add_opinion = { + target = scope:zaydun + modifier = disappointed_opinion + opinion = -10 + } + + stress_impact = { + callous = minor_stress_impact_loss + vengeful = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + } + } + } + + after = { + trigger_event = { + id = ep3_story_cycle_violet_poet.2015 + days = { 12 18 } + } + } +} + +#Ibn Zaydun is about to leave +ep3_story_cycle_violet_poet.2015 = { + type = character_event + title = ep3_story_cycle_violet_poet.2015.t + desc = ep3_story_cycle_violet_poet.2015.desc + theme = violet_poet + override_background = { reference = garden } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:zaydun + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_ep3_dlc_trigger = yes + character:andalusian_0003 = this + character:andalusian_0004 = { #Ibn Zaydun + is_alive = yes + is_available_ai_adult = yes + } + } + + immediate = { + location = { save_scope_as = location } + + hidden_effect = { + random_dummy_gender_effect = yes + create_artifact_ring_effect = { + OWNER = scope:zaydun + SMITH = scope:dummy_gender + } + scope:newly_created_artifact = { + set_artifact_description = ep3_story_cycle_violet_poet.2015.artifact + set_artifact_rarity = famed + add_artifact_modifier = artifact_learn_language_scheme_phase_duration_add_2_modifier + add_artifact_modifier = artifact_health_gain_1_modifier + add_artifact_modifier = artifact_stress_gain_3_modifier + set_owner = root + } + } + } + + option = { #Beg him to stay + name = ep3_story_cycle_violet_poet.2015.a + + duel = { + skill = intrigue + value = decent_skill_rating + + 75 = { #He accepts + desc = ep3_story_cycle_violet_poet.2015.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + + modifier = { + add = 5 + opinion = { + target = root + value >= 25 + } + } + modifier = { + add = 10 + opinion = { + target = root + value >= 45 + } + } + modifier = { + add = 15 + opinion = { + target = root + value >= 65 + } + } + + modifier = { + attraction >= low_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= medium_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= high_positive_attraction + factor = 1.2 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.2015.a.success + left_icon = root + right_icon = scope:zaydun + + add_character_modifier = { + modifier = ep3_power_couple_modifier + } + + set_relation_lover = { + target = scope:zaydun + reason = lover_old_flame + } + + scope:zaydun = { + remove_trait = depressed_1 + } + + add_courtier = scope:zaydun + } + } + + 25 = { #He declines + desc = ep3_story_cycle_violet_poet.2015.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.2015.a.failure + left_icon = root + right_icon = scope:zaydun + + scope:zaydun = { + start_travel_plan = { + destination = scope:zaydun_original_location + players_use_planner = no + return_trip = no + } + } + + add_stress = major_stress_gain + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_vengefulness = -1 + } + } + } + + option = { #Wish him a fond farewell + name = ep3_story_cycle_violet_poet.2015.b + + flavor = ep3_story_cycle_violet_poet.2015.b.tt + + scope:zaydun = { + start_travel_plan = { + destination = scope:zaydun_original_location + players_use_planner = no + return_trip = no + } + } + + reverse_add_opinion = { + target = scope:zaydun + modifier = disappointed_opinion + opinion = -10 + } + + stress_impact = { + callous = minor_stress_impact_loss + vengeful = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + } + } + } + + option = { #Wish him an unfond farewell + name = ep3_story_cycle_violet_poet.2015.c + + scope:zaydun = { + start_travel_plan = { + destination = scope:zaydun_original_location + players_use_planner = no + return_trip = no + } + add_trait = reclusive + add_stress = major_stress_gain + } + + random = { + chance = 20 + send_interface_toast = { + title = ep3_story_cycle_violet_poet.2015.c.tt + left_icon = root + right_icon = scope:zaydun + + add_trait = contrite + } + } + + reverse_add_opinion = { + target = scope:zaydun + modifier = emotionally_devastated_opinion + opinion = -70 + } + + stress_impact = { + callous = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_travel_events_3.txt b/N3OW/events/dlc/ep3/ep3_travel_events_3.txt new file mode 100644 index 00000000..6a6a570a --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_travel_events_3.txt @@ -0,0 +1,1429 @@ +namespace = ep3_travel_events + +################################################## +# EP3 Travel Events +# by Jason Cantalini +# +# 3000 Waters of the Jordan +# 3001 The Cilician Gates +# 3002-3 Where Armenians Govern +# 3010 Anatolian Silence + +scripted_trigger ep3_travel_events_3000_enraptured_trigger = { + #every kind of personality which wouldn't mind or self-delude about the river being a bit icky + OR = { + has_trait = zealous + has_trait = stubborn + has_trait = trusting + has_trait = humble + has_trait = peasant_leader + } +} + +# You enter a province which your faith is syncretic with +ep3_travel_events.3000 = { + type = character_event + title = ep3_travel_events.3000.t + desc = { + desc = ep3_travel_events.3000.desc + first_valid = { + triggered_desc = { + trigger = { + religion = religion:judaism_religion + } + desc = ep3_travel_events.3000.israel + } + triggered_desc = { + trigger = { + religion = religion:islam_religion + } + desc = ep3_travel_events.3000.muslim + } + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + culture = { has_cultural_pillar = language_greek } + } + desc = ep3_travel_events.3000.greek_christian + } + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = ep3_travel_events.3000.christian + } + } + first_valid = { + triggered_desc = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = yes + } + desc = ep3_travel_events.3000.outro_rapture + } + desc = ep3_travel_events.3000.outro + } + + } + theme = travel + override_background = { + reference = wilderness_wetlands + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = yes + } + animation = wedding_happy_cry + } + triggered_animation = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = no + } + animation = disgust + } + triggered_outfit = { + remove_default_outfit = no + outfit_tags = { nightgown } + } + } + cooldown = { years = 75 } + trigger = { + age >= 14 + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + OR = { + barony = title:b_maab + barony = title:b_jarash + barony = title:b_irbid + barony = title:b_zurra + barony = title:b_baniyas + barony = title:b_tiberias + barony = title:b_nablus + } + } + + NOT = { + has_trait = cynical + } + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:judaism_religion + religion = religion:islam_religion + } + } + immediate = { + hidden_effect_new_object = { + root = { + save_scope_as = owner + #Create fancy regalia + set_artifact_rarity_masterwork = yes + create_artifact = { + name = artifact_water_of_the_jordan + description = placeholder # Will be updated in the post-creation effects + creator = root + visuals = flask + type = miscellaneous + modifier = artifact_monthly_piety_gain_per_legitimacy_level_mult_3_modifier + modifier = artifact_legitimacy_gain_mult_3_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = newly_created_artifact_1 + history = { + type = created_before_history + } + } + scope:newly_created_artifact_1 = { + set_artifact_description = artifact_water_of_the_jordan_desc + } + } + } + } + # I'm here looking for holiness, cleanliness be damned! Taking some water with me + option = { + trigger = { + OR = { + has_trait = zealous + trigger_if = { + limit = { + involved_activity ?= { + has_activity_type = activity_pilgrimage + } + } + has_activity_intent = zealot_intent + } + } + } + name = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + text = ep3_travel_events.3000.a_christian + } + name = { + trigger = { + religion = religion:judaism_religion + } + text = ep3_travel_events.3000.a_jewish + } + name = { + trigger = { + religion = religion:islam_religion + } + text = ep3_travel_events.3000.a_muslim + } + show_as_tooltip = { + scope:newly_created_artifact_1 = { + set_owner = { + target = root + history = { type = created_before_history } + } + } + } + add_character_modifier = { + modifier = holy_water_mortal_stomach_modifier + years = 5 + } + + stress_impact = { + content = minor_stress_impact_gain + zealous = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = paranoid + } + } + } + } + # A cleansing rite! + option = { + name = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = yes + } + text = ep3_travel_events.3000.b_zealot + } + name = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = no + } + text = ep3_travel_events.3000.b + } + flavor = ep3_travel_events.3000.b.flavor + + add_piety = medium_piety_gain + add_stress = miniscule_stress_impact_loss + add_character_modifier = { + modifier = holy_water_mortal_stomach_modifier + years = 5 + } + stress_impact = { + honest = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + craven = miniscule_stress_impact_gain + arrogant = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = honest + has_trait = craven + has_trait = paranoid + } + } + } + } + # This doesn't taste good... I should take precautions + option = { + name = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = yes + } + text = ep3_travel_events.3000.c_zealot + } + name = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = no + } + text = ep3_travel_events.3000.c + } + flavor = ep3_travel_events.3000.c_flavor + stress_impact = { + zealous = medium_stress_impact_gain + brave = miniscule_stress_impact_gain + stubborn = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = stubborn + has_trait = brave + has_trait = zealous + } + } + modifier = { + health <= poor_health + add = 100 + } + modifier = { + health <= dying_health + add = 100 + } + } + } +} + +scripted_trigger ep3_travel_events_3001_is_foe_trigger = { + #every kind of personality which wouldn't mind or self-delude about the river being a bit icky + OR = { + faith = { + faith_hostility_level = { + target = scope:lords_liege.faith + value >= faith_hostile_level + } + } + is_at_war_with = scope:lord_of_passes + liege ?= { + is_at_war_with = scope:lord_of_passes + } + top_liege ?= { + is_at_war_with = scope:lord_of_passes + } + scope:lord_of_passes = { + liege ?= { + is_at_war_with = root + } + } + scope:lord_of_passes = { + top_liege ?= { + is_at_war_with = root + } + } + } +} + +# You enter the Cilician Gates +ep3_travel_events.3001 = { + type = character_event + title = ep3_travel_events.3001.t + desc = { + desc = ep3_travel_events.3001.intro + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_greek } + ep3_travel_events_3001_is_foe_trigger = no + } + desc = ep3_travel_events.3001.greek + } + triggered_desc = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = no + } + desc = ep3_travel_events.3001.friend + } + triggered_desc = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = yes + knows_language = language_arabic + religion = religion:islam_religion + } + desc = ep3_travel_events.3001.islamic_arabic + } + desc = ep3_travel_events.3001.foe + } + first_valid = { + triggered_desc = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = no + } + desc = ep3_travel_events.3001.praise_outro + } + triggered_desc = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = yes + } + desc = ep3_travel_events.3001.distrust_outro + } + } + } + theme = travel + + override_background = { + reference = ep2_travel_settlement_mountains + } + left_portrait = { + character = root + animation = jockey_walk + camera = camera_event_horse_left + } + trigger = { + age >= 12 + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + barony = title:b_tyana + is_occupied = no + } + location.county.holder != root #If I own it then it does not make sense to visit it. + NOT = { has_character_flag = had_ep3_travel_events.3001 } + } + immediate = { + #Make sure the same person doesn't get this twice + add_character_flag = had_ep3_travel_events.3001 + location = { + save_scope_as = current_location + } + location.county.holder = { + save_scope_as = lord_of_passes + } + if = { + limit = { + exists = scope:lord_of_passes.top_liege + } + scope:lord_of_passes.top_liege = { + save_scope_as = lords_liege + } + } + else = { + scope:lord_of_passes = { + save_scope_as = lords_liege + } + } + show_as_tooltip = { + add_martial_lifestyle_xp = travel_medium_xp + } + } + # These are our defenders and I am proud + option = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = no + } + name = { + trigger = { + culture = { has_cultural_pillar = language_greek } + } + text = ep3_travel_events.3001.a_greek + } + name = { + trigger = { + NOT = { culture = { has_cultural_pillar = language_greek } } + } + text = ep3_travel_events.3001.a_non_greek + } + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:lord_of_passes.faith + value < faith_hostile_level + } + } + NOT = { + is_at_war_with = scope:lord_of_passes + } + #Need to be in same realm + OR = { + liege ?= { + OR = { + AND = { + exists = scope:lord_of_passes.liege + this = scope:lord_of_passes.liege + } + this = scope:lord_of_passes + } + } + scope:lord_of_passes = { + is_vassal_of = root + } + } + culture = { has_cultural_pillar = language_greek } + } + add_opinion = { + target = scope:lord_of_passes + opinion = 10 + modifier = impressed_opinion + } + } + stress_impact = { + trusting = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + # These are our foes and it's ominous + option = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = yes + } + name = ep3_travel_events.3001.b + add_character_modifier = { + modifier = haunted_by_hostile_troops_modifier + years = 1 + } + + stress_impact = { + paranoid = miniscule_stress_impact_gain + craven = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +scripted_trigger ep3_travel_events_3002_byzantine_root_trigger = { + culture = { + has_cultural_pillar = heritage_byzantine + OR = { + any_parent_culture_or_above = { this = culture:greek } + this = culture:greek + } + } +} + +# You visit the capital of a ruler who belongs to a neighboring culture +ep3_travel_events.3002 = { + type = character_event + title = ep3_travel_events.3002.t + desc = { + desc = ep3_travel_events.3002.intro + #One desc for admin, one for non-admins + first_valid = { + triggered_desc = { + trigger = { + scope:local_lord = { + government_allows = administrative + } + } + desc = ep3_travel_events.3002.admin + } + desc = ep3_travel_events.3002.non_admin + } + #Different descs for historic flavor + first_valid = { + #Armenian + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + OR = { + any_parent_culture_or_above = { this = culture:armenian } + this = culture:armenian + } + } + } + desc = ep3_travel_events.3002.armenian + } + #Georgian + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + OR = { + any_parent_culture_or_above = { this = culture:georgian } + this = culture:georgian + } + } + } + desc = ep3_travel_events.3002.georgian + } + #Bulgarian + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + OR = { + any_parent_culture_or_above = { this = culture:bulgarian } + this = culture:bulgarian + } + } + } + desc = ep3_travel_events.3002.bulgarian + } + #Serbian + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + OR = { + any_parent_culture_or_above = { this = culture:serbian } + this = culture:serbian + } + } + } + desc = ep3_travel_events.3002.serbian + } + #Latin + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + has_cultural_pillar = heritage_latin + } + } + desc = ep3_travel_events.3002.latin + } + #Vlach + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + OR = { + any_parent_culture_or_above = { this = culture:vlach } + this = culture:vlach + } + } + } + desc = ep3_travel_events.3002.vlach + } + desc = ep3_travel_events.3002.generic + } + } + theme = travel + + override_background = { + reference = holy_site_generic + } + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_left + } + lower_right_portrait = { + character = scope:local_lord + } + trigger = { + #check root is an eligible travelling person + age >= 12 + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + government_allows = administrative + OR = { + NOT = { exists = top_liege } + top_liege.culture = { + this = root.culture + } + } + location.county.holder = { + highest_held_title_tier >= tier_duchy + culture = { + this != root.culture + } + faith = { + faith_hostility_level = { + target = root.faith + value <= faith_hostile_level + } + } + #shouldn't loath root + opinion = { + target = root + value >= -60 + } + NOR = { + #If I own it then it does not make sense to visit it. + this = root + AND = { + exists = root.liege + this = root.liege + } + AND = { + exists = root.top_liege + this = root.top_liege + } + } + #check that this is actually a neighbour + OR = { + #neighbour + any_neighboring_top_liege_realm_owner = { + this = root + } + #same realm + liege ?= root.liege + liege ?= root.top_liege + liege = root + #within de jure empire + OR = { + AND = { + exists = root.top_liege + root.top_liege.primary_title = { + any_de_jure_county = { + this = root.location.county + } + } + } + root.primary_title = { + any_de_jure_county = { + this = root.location.county + } + } + } + #Also the special named cultures for Byzantines + AND = { + root = { ep3_travel_events_3002_byzantine_root_trigger = yes } + culture = { + OR = { + has_cultural_pillar = heritage_latin + any_parent_culture_or_above = { this = culture:armenian } + this = culture:armenian + any_parent_culture_or_above = { this = culture:georgian } + this = culture:georgian + any_parent_culture_or_above = { this = culture:serbian } + this = culture:serbian + any_parent_culture_or_above = { this = culture:vlach } + this = culture:vlach + any_parent_culture_or_above = { this = culture:bulgarian } + this = culture:bulgarian + } + } + } + } + #The cultures should sorta like each other (more than just sharing a religion) + culture = { + OR = { + #exception for former romans + has_cultural_pillar = heritage_latin + cultural_acceptance = { + target = ROOT.culture + value >= 10 + } + } + } + save_temporary_scope_as = location_holder + } + location.county = { + this = scope:location_holder.capital_county + culture = { + this != root.culture + } + } + location = { + is_occupied = no + OR = { + is_county_capital = yes + any_neighboring_province = { + is_county_capital = yes + county = root.location.county + + } + } + } + } + + cooldown = { days = 30 } + + immediate = { + location.county.holder = { + save_scope_as = local_lord + } + location = { + save_scope_as = current_location + } + scope:local_lord.capital_county = { + save_scope_as = local_lord_capital + } + } + # This is an opportunity to represent the majesty of the empire + option = { + name = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + } + text = ep3_travel_events.3002.a_byzantine + } + name = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = no + } + text = ep3_travel_events.3002.a + } + flavor = ep3_travel_events.3002.a.flavor + + #I am an impressive imperial Greek!!!!! + duel = { + skill = diplomacy + target = scope:local_lord + 50 = { #The local lord is in awe + desc = ep3_travel_events.3002.a_success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + OR = { + AND = { + highest_held_title_tier >= tier_empire + scope:local_lord = { highest_held_title_tier < tier_empire } + } + AND = { + highest_held_title_tier >= tier_kingdom + scope:local_lord = { highest_held_title_tier < tier_kingdom } + } + } + add = 25 + } + modifier = { + OR = { + AND = { + highest_held_title_tier >= tier_empire + scope:local_lord = { highest_held_title_tier = tier_empire } + } + AND = { + highest_held_title_tier >= tier_kingdom + scope:local_lord = { highest_held_title_tier = tier_kingdom } + } + } + add = 10 + } + + send_interface_toast = { + title = ep3_travel_events.3002.a_success + left_icon = root + right_icon = scope:local_lord + + add_prestige = minor_prestige_gain + if = { + limit = { + highest_held_title_tier >= tier_empire + scope:local_lord = { + NOR = { + top_liege = root + liege = root + } + } + } + custom_tooltip = impressive_visit_vassalization_acceptance_bonus + scope:local_lord = { + add_character_flag = cowed_increased_vassalization_acceptance + trigger_event = { + id = ep3_travel_events.3003 + years = 5 + } + } + } + else_if = { + #de jure integration bonus on vassal's land if in progress + limit = { + is_liege_or_above_of = scope:local_lord + scope:local_lord_capital = { + de_jure_drifting_towards = root.primary_title + } + } + scope:local_lord_capital = { + change_de_jure_drift_progress = { + target = scope:councillor_liege.primary_title + value = 10 + } + } + } + else = { + change_influence = minor_influence_gain + } + } + } + 50 = { #The local lord is irked + desc = ep3_travel_events.3002.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + prestige_level <= 1 + add = 10 + } + send_interface_toast = { + title = ep3_travel_events.3002.a_failure + left_icon = root + right_icon = scope:local_lord + if = { + limit = { + scope:local_lord = { + liege ?= root + } + } + scope:local_lord = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + } + #The relationship is less useful, might as well toss more opinion + else = { + scope:local_lord = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + if = { + limit = { + this = root.culture.culture_head + } + culture = { + change_cultural_acceptance = { + target = scope:local_lord.culture + value = minor_cultural_acceptance_loss + desc = cultural_acceptance_loss_insulted_by_visiting_emperor + } + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + shy = miniscule_stress_impact_gain + craven = miniscule_stress_impact_gain + compassionate = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = shy + has_trait = craven + has_trait = compassionate + } + } + modifier = { + add = -50 + diplomacy < decent_skill_rating + } + modifier = { + add = -20 + prestige_level <= 1 + } + modifier = { + add = -20 + NOR = { + AND = { + highest_held_title_tier >= tier_empire + scope:local_lord = { highest_held_title_tier < tier_empire } + } + AND = { + highest_held_title_tier >= tier_kingdom + scope:local_lord = { highest_held_title_tier < tier_kingdom } + } + } + } + ai_value_modifier = { + ai_compassion = -1 + ai_boldness = 1 + } + } + } + + # I should visit their local places of worship + option = { + name = ep3_travel_events.3002.b + flavor = ep3_travel_events.3002.b.flavor + + add_piety = minor_piety_gain + if = { + limit = { + highest_held_title_tier >= tier_empire + scope:local_lord_capital.faith = { + this != root.faith + } + faith = { + NOT = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + faith = { + change_fervor = { + value = -5 + desc = fervor_loss_emperor_pluralistic_act + } + } + } + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = miniscule_stress_impact_gain + gregarious = minor_stress_impact_gain + impatient = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = gregarious + has_trait = impatient + } + } + ai_value_modifier = { + ai_energy = -1 + ai_zeal = 1 + } + } + } + # I should pay tribute to our neighbours + option = { + name = { + trigger = { + scope:local_lord = { + NOR = { + liege ?= root.liege + liege ?= root.top_liege + liege = root + } + } + } + text = ep3_travel_events.3002.c_foreign + } + name = { + trigger = { + scope:local_lord = { + is_liege_or_above_of = root + } + } + text = ep3_travel_events.3002.c + } + if = { + limit = { + scope:local_lord = { + liege ?= root + } + } + scope:local_lord = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + } + #The relationship is less useful, might as well toss more opinion + else = { + scope:local_lord = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + } + + if = { + limit = { + this = root.culture.culture_head + } + root.culture = { + change_cultural_acceptance = { + target = scope:local_lord.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_gain_honored_by_visiting_emperor + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_gain + callous = miniscule_stress_impact_gain + sadistic = miniscule_stress_impact_gain + stubborn = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = callous + has_trait = sadistic + has_trait = stubborn + } + } + ai_value_modifier = { + ai_energy = -1 + ai_zeal = 1 + } + } + } +} + +#follow up event that removes vassalization acceptance effect from the local lord +ep3_travel_events.3003 = { + hidden = yes + trigger = { + is_alive = yes + } + immediate = { + remove_character_flag = cowed_increased_vassalization_acceptance + } +} + +scripted_trigger ep3_travel_events_3010_anatolian_native_trigger = { + OR = { + has_cultural_pillar = heritage_byzantine + AND = { + has_cultural_pillar = heritage_caucasian + any_parent_culture_or_above = { this = culture:armenian } + this = culture:armenian + } + } + OR = { + any_parent_culture_or_above = { this = culture:greek } + this = culture:greek + any_parent_culture_or_above = { this = culture:armenian } + this = culture:armenian + } +} + + +#you arrive in a low control anatolian province and the locals hide, mistaking you for tax-collectors/raiders +ep3_travel_events.3010 = { + type = character_event + title = ep3_travel_events.3010.t + desc = { + desc = ep3_travel_events.3010 + #Alternate loc if you're in the fairy tower county + first_valid = { + triggered_desc = { + trigger = { + location = { + barony = title:b_kaisereia + } + } + desc = ep3_travel_events.3010.fairy_towers + } + desc = ep3_travel_events.3010.normal_holes + } + #Alternate desc for fellow Greeks/Armenians + first_valid = { + triggered_desc = { + trigger = { + culture = { ep3_travel_events_3010_anatolian_native_trigger = yes } + } + desc = ep3_travel_events.3010.native_knowledge + } + desc = ep3_travel_events.3010.foreigners + } + } + theme = travel + + override_background = { + reference = terrain_travel + } + left_portrait = { + character = root + animation = eyeroll + } + right_portrait = { + character = scope:hornblower + animation = hunting_horn + } + trigger = { + #check root is an eligible travelling person + age >= 6 + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + #check local people are greeks, armenians or products thereof + culture = { + ep3_travel_events_3010_anatolian_native_trigger = yes + } + county_control <= 90 + duchy = { + OR = { + this = title:d_anatolia + this = title:d_cappadocia + this = title:d_charsianon + this = title:d_sebasteia + this = title:d_mesopotamia + this = title:d_diyarbakr + this = title:d_vaspurakan + this = title:d_cilicia + this = title:d_cibyrrhaeot + this = title:d_edessa + } + } + holder = { + is_ai = yes + } + } + } + } + + cooldown = { days = 60 } + + immediate = { + location.county.holder = { + save_scope_as = local_lord + } + location = { + save_scope_as = current_location + } + if = { + limit = { + current_travel_plan ?= { + any_entourage_character = { + age >= 10 + } + } + } + current_travel_plan ?= { + random_entourage_character = { + limit = { + age >= 10 + } + save_scope_as = hornblower + } + } + } + create_character = { + template = anatolian_guide_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + dynasty = none + save_scope_as = anatolian_guide + } + } + #Well... let's see what's left for the taking these empty houses + option = { + name = ep3_travel_events.3010.a + flavor = ep3_travel_events.3010.a.flavor + + random_list = { + 10 = { + send_interface_toast = { + title = ep3_travel_events.3010.a_success + left_icon = root + add_gold = minor_gold_value + } + } + 10 = { + send_interface_toast = { + title = ep3_travel_events.3010.a_failure + left_icon = root + } + } + } + location.county = { + change_development_progress = minimal_development_progress_loss + change_county_control = miniscule_county_control_loss + } + stress_impact = { + honest = minor_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = just + has_trait = compassionate + has_trait = generous + } + } + ai_value_modifier = { + ai_compassion = -1 + ai_greed = 1 + ai_honor = -1 + } + } + } + #Convince them to come out and get a local guide + option = { + name = ep3_travel_events.3010.b + flavor = ep3_travel_events.3010.b.flavor + + + duel = { + skill = diplomacy + value = decent_skill_rating + 60 = { #The locals come out + desc = ep3_travel_events.3010.b_success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + location.county.holder = { + OR = { + this = root + any_liege_or_above = { + this = root + } + } + } + add = 25 + } + + send_interface_toast = { + title = ep3_travel_events.3010.b_success + left_icon = root + + add_diplomacy_lifestyle_xp = miniscule_lifestyle_xp + current_travel_plan = { + add_companion = scope:anatolian_guide + } + add_character_modifier = { + modifier = ep3_guide_from_the_borderlands_modifier + years = 1 + } + if = { + limit = { + NOT = { scope:anatolian_guide = { is_courtier_of = root } } + } + add_courtier = scope:anatolian_guide + } + } + } + 40 = { #The locals ignore you + desc = ep3_travel_events.3010.b_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_travel_events.3010.b_failure + left_icon = root + add_stress = miniscule_stress_impact_gain + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + diplomacy < decent_skill_rating + } + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = arrogant + has_trait = content + } + } + ai_value_modifier = { + ai_sociability = 1 + } + } + } + #Let's just appreciate the quiet, no commoners bustling around (and beauty of the fairy towers) + option = { + name = { + trigger = { + location = { + barony = title:b_kaisereia + } + } + text = ep3_travel_events.3010.c_fairy_towers + } + name = { + trigger = { + NOT = { + location = { + barony = title:b_kaisereia + } + } + } + text = ep3_travel_events.3010.c + } + flavor = ep3_travel_events.3010.c.flavor + + if = { + limit = { + location = { + barony = title:b_kaisereia + } + } + stress_impact = { + base = minor_stress_impact_loss + impatient = minor_stress_impact_gain + stubborn = miniscule_stress_impact_gain + vengeful = miniscule_stress_impact_gain + wrathful = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = miniscule_stress_impact_loss + impatient = minor_stress_impact_gain + stubborn = miniscule_stress_impact_gain + vengeful = miniscule_stress_impact_gain + wrathful = minor_stress_impact_gain + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = impatient + has_trait = stubborn + has_trait = wrathful + has_trait = vengeful + } + } + ai_value_modifier = { + ai_vengefulness = -1 + ai_energy = -1 + } + } + } + after = { + if = { + limit = { + is_ai = yes + } + scope:anatolian_guide = { silent_disappearance_effect = yes } + } + } +} diff --git a/N3OW/events/dlc/fp1/fp1_yearly_events.txt b/N3OW/events/dlc/fp1/fp1_yearly_events.txt new file mode 100644 index 00000000..b727bbcd --- /dev/null +++ b/N3OW/events/dlc/fp1/fp1_yearly_events.txt @@ -0,0 +1,16884 @@ +namespace = fp1_yearly + +################################################## +# #Standard Yearlies +# 0001 - 0010 An Escaping Thrall Robs You +# 0011 - 0020 Locals Call for Courtier to be Declared Nithing +# 0021 - 0030 Two of your Knights wish to Holmgang over a Dispute +# 0031 - 0040 A Mighty Warrior with a Big Personality Arrives +# 0041 - 0050 [Russia/Steppe] Islamic Explorer Visits Court +# 0051 - 0070 [Rural] A Dead Character is Rumoured to have become a Draugr +# 0071 - 0090 [Rural] A Troll has been sighted & is attacking villages/peasants +# 0091 - 0100 Commissioning a Longship for Yourself +# 0101 - 0110 A Guest/Courtier Challenges you to Riddles +# 0111 - 0120 Nithing Pole Raised Against Courtier +# +# #Flavour Yearlies +# 0501 - 0510 Out for a Sail - you spot a ship in distress. +# 0511 - 0520 The Stench of Success - a courtier won't let an old trophy go. +# 0521 - 0530 Blood on the Snow - your child wishes to snowball fight. +# 0531 - 0540 [Dynasty] on Ice - your child wants to learn how to ice skate. +# 0541 - 0550 The Beast of [Capital] - your child is playing pranks on courtiers. +# 0551 - 0560 Fishy Business - a courtier won't stop eating rotten fish. +# 0561 - 0570 My Arm Against Yours - a knight challenges you to arm-wrestling. +# 0571 - 0580 Petty Vandalism - your child has vandalised a runestone. +# 0581 - 0590 When I Grow Up - your child wishes to be a shieldperson. +# 0591 - 0600 Raised Voices at the Thing - two of your counties are fighting at a regional thing. +# 0601 - 0610 The Hardest Part of Ruling - you're incredibly bored in a protracted thing session. +# 0611 - 0620 Leading by Example - one of your children hurts another whilst imitating you. +# 0621 - 0630 A Shiny New Toy - your child wants a specific piece of loot from a raid. +# 0631 - 0640 A Cynical Bent - you notice a knight not sacrificing after a raid. +# 0641 - 0650 Worthy of the Ocean - your longships are in disrepair. +# 0651 - 0660 Leviathan - you spot a whale whilst sailing. +# 0661 - 0670 A Novel Challenge - a knight challenges you to skiing. +# 0671 - 0680 A Slippery Slope - your child wants to go sledding. +# 0681 - 0690 Why Can't I Come? - your child wants to come raiding. +# 0691 - 0700 Attempted Atonement - a knight has converted after raiding a reformed faith. +# +# #Special Yearlies +# 1001 - 1030 A Mysterious Stranger Stays at Court +# 1031 - 1060 RIP +# 1061 - 1071 Commissioning a Longship for a Funeral +# 1071 - 1080 Sparklingly Clean +# 1081 - 1090 Explorer from Phantom Islands +################################################## + + + + + + + + + + +################################################## +# STANDARD YEARLIES + +################################################## +# An Escaping Thrall Robs You +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +scripted_trigger suitably_terrible_knight_trigger = { + is_available_ai = yes + is_ruler = no + # Just make sure they have at least one knight with believably-bad prowess. Deliberately "<", rather than "<=". + prowess < high_skill_rating + # And uhh, for obvious reasons... + NOT = { has_trait = blind } +} + +# A thrall leaves your court in the night. +fp1_yearly.0001 = { + type = character_event + title = fp1_yearly.0001.t + desc = fp1_yearly.0001.desc + theme = stewardship + left_portrait = { + character = scope:scapegoat + animation = shame + } + override_background = { reference = throne_room } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0001 } + is_landed = yes + #Must be able to raid, or else your thrall economy is being phased out. + can_raid_trigger = yes + #Should be North Germanic, or the flavour won't make sense. + culture = { has_cultural_pillar = heritage_north_germanic } + #Needs a knight for scapegoating. + any_knight = { + count >= 1 + suitably_terrible_knight_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + #Weight up a little for rulers that thralls are desperate to escape from. + modifier = { + add = 0.5 + has_trait = sadistic + } + modifier = { + add = 0.25 + has_trait = callous + } + + #And weight down for anyone who's a bit nicer. Not to suggest that the thralls are treated particularly well, but they're not being casually murdered for fun like a sadist might. + modifier = { + add = -0.5 + has_trait = compassionate + } + modifier = { + add = -0.25 + has_trait = forgiving + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0001 + days = 1825 + } + # Pick a fall guy. + random_knight = { + limit = { suitably_terrible_knight_trigger = yes } + weight = { + # Every point of prowess a knight has lowers the chance for it to be them by 2%. + base = 0 + modifier = { + add = { + value = 50 + subtract = prowess + } + } + # And every point of compassion another 1%. + modifier = { add = ai_compassion } + } + save_scope_as = scapegoat + } + # Give the escaped thrall a gender for loc. + random_dummy_gender_effect = yes + # Remove the stolen jewels. + remove_short_term_gold = medium_gold_value + } + + # Send out descriptions of the thrall and the stolen goods. + option = { + name = fp1_yearly.0001.a + + duel = { + skill = stewardship + value = decent_skill_rating + # The thrall is spotted and captured several villages away. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0001.a.tt_success + send_interface_toast = { + title = fp1_yearly.0001.a.tt_success + left_icon = root + add_prestige = medium_prestige_gain + add_gold = medium_gold_value + } + } + # The thrall slips the net, with your stolen goods. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0001.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0001.a.tt_failure + left_icon = root + custom_tooltip = fp1_yearly.0001.gold_stays_lost.tt + } + } + } + + stress_impact = { + diligent = medium_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = 0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + #Start a manhunt. + option = { + name = fp1_yearly.0001.b + + duel = { + skill = martial + value = decent_skill_rating + #The thrall is caught before they can get far. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0001.b.tt_success + send_interface_toast = { + title = fp1_yearly.0001.b.tt_success + left_icon = root + add_prestige = medium_prestige_gain + add_gold = medium_gold_value + } + } + #The thrall slips the net, with your stolen goods. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0001.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0001.b.tt_failure + left_icon = root + custom_tooltip = fp1_yearly.0001.gold_stays_lost.tt + } + } + } + + stress_impact = { + diligent = medium_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = 0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + #Fine scope:scapegoat. + option = { + name = fp1_yearly.0001.c + + #And no money was lost after all. + add_prestige = medium_prestige_gain + + #Unless you're scope:scapegoat. + scope:scapegoat = { + pay_short_term_gold = { + target = root + gold = root.medium_gold_value + } + #Who is, understandably, a bit miffed. + progress_towards_rival_effect = { + REASON = rival_thrall_scapegoat + CHARACTER = root + OPINION = 0 + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + + stress_impact = { + wrathful = minor_stress_impact_loss + greedy = medium_stress_impact_loss + vengeful = major_stress_impact_loss + calm = minor_stress_impact_gain + generous = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = wrathful + } + modifier = { #Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { #Weight up for stress. + add = 30 + has_trait = vengeful + } + modifier = { #Weight down for stress. + add = -10 + has_trait = calm + } + modifier = { #Weight down for stress. + add = -20 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = forgiving + } + } + } + + #Not your fault, scope:scapegoat. These things happen. + option = { + name = fp1_yearly.0001.d + + #Some assets are gone for good. + custom_tooltip = fp1_yearly.0001.gold_stays_lost.tt + + #Welp, you _did_ show clemency. + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:scapegoat + } + } + add_hook = { + type = favor_hook + target = scope:scapegoat + } + } + scope:scapegoat = { + add_opinion = { + target = root + modifier = relieved_opinion + opinion = 20 + } + } + + stress_impact = { + calm = minor_stress_impact_loss + generous = medium_stress_impact_loss + forgiving = major_stress_impact_loss + wrathful = minor_stress_impact_gain + greedy = medium_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = calm + } + modifier = { #Weight up for stress. + add = 20 + has_trait = generous + } + modifier = { #Weight up for stress. + add = 30 + has_trait = forgiving + } + modifier = { #Weight down for stress. + add = -10 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -20 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -30 + has_trait = vengeful + } + } + } +} + +################################################## +# Locals Call for Courtier to be Declared Nithing +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +scripted_trigger offensive_courtier_candidate_trigger = { + #Filter out the basic miscs. + is_available_ai_adult = yes + #Have some commited some genuine malfeasance, or just be irritating to at least some people. + OR = { + #Having committed murder by poison is a solid way to become a nithing; this might be a secret, but we assume local rumours about a shady buyer of poisons abound... + has_character_flag = murdered_by_poison + #Legitimately being a witch, and a Germanic Pagan one at that, is a good reason, though all parties have to agree on that being a bad thing first. + AND = { + faith = { has_doctrine_parameter = witchcraft_illegal } + root.faith = { has_doctrine_parameter = witchcraft_illegal } + root.capital_county.faith = { has_doctrine_parameter = witchcraft_illegal } + OR = { + has_trait = witch + any_secret = { type = secret_witch } + } + } + #Irritating personality traits can be cause for suspicion. + has_trait = wrathful + has_trait = deceitful + has_trait = craven + has_trait = ambitious + has_trait = arbitrary + has_trait = paranoid + has_trait = sadistic + has_trait = stubborn + has_trait = vengeful + #And really anyone dealing with herbs, potions, poisons, or alchemy. + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + } + #If they're heir to a player, then they should only be the heir of the player making the decision. + OR = { + #Plus we need to filter out anyone who isn't an heir at all. + any_heir_title = { count = 0 } + any_heir_title = { + is_title_created = yes + holder = { + is_ai = no + this != root + } + } + } +} + +scripted_effect agree_to_courtier_becoming_nithing_effect = { + # First, we remove any legal relations. + ## Specifically marriage. + if = { + limit = { + any_spouse = { this = root } + root.faith = { + # _Technically_ they're 'dead' and this isn't a divorce, but if divorce was as easy as declaring your spouse legally dead, Henry VIII would've remained a good Catholic boi till the end of his days. + NOT = { has_doctrine = doctrine_divorce_disallowed } + } + } + divorce_effect = { + DIVORCER = root + DIVORCEE = scope:offensive_courtier + } + } + ## And concubinage. + if = { + limit = { + scope:offensive_courtier = { is_concubine_of = root } + } + root = { remove_concubine = scope:offensive_courtier } + } + # Then we evict them. + banish = yes # banish_effect not used for unlanded + # Which naturally causes some friction. + add_opinion = { + target = root + modifier = hate_opinion + opinion = -75 + } + ## Including some ramifications later, potentially. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:offensive_courtier } + } + set_relation_potential_rival = scope:offensive_courtier + } + } + # And, finally, let the whole world know. + add_character_modifier = { + modifier = nithing_fp1_modifier + years = 20 + } +} + +# Locals call for one of your courtiers to be exiled as a nithing. +fp1_yearly.0011 = { + type = character_event + title = fp1_yearly.0011.t + desc = { + desc = fp1_yearly.0011.desc + # And if they have a hard-to-live with virtue... + triggered_desc = { + trigger = { exists = scope:priest } + desc = fp1_yearly.0011.desc.priest + } + } + theme = realm + left_portrait = { + character = scope:offensive_courtier + animation = shock + } + right_portrait = { + character = scope:priest + animation = dismissal + } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0011 } + is_landed = yes + #Must have at least one suitable courtier. + any_courtier = { offensive_courtier_candidate_trigger = yes } + #Both yourself and your capital must be Germanic Pagans. + religion = religion:germanic_religion + capital_county.religion = religion:germanic_religion + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0011 + days = 3650 + } + # Save the capital for loc. + capital_barony = { save_scope_as = capital_barony } + # Pick a suitable courtier to be the nithing. + random_courtier = { + limit = { offensive_courtier_candidate_trigger = yes } + # Make sure we grab someone interesting. + weight = { + base = 1 + + # Claimants are good picks. + modifier = { + add = 10 + is_claimant = yes + } + # Highly-skilled characters are good picks. + modifier = { + add = 5 + diplomacy >= decent_skill_rating + } + modifier = { + add = 5 + martial >= decent_skill_rating + } + modifier = { + add = 5 + stewardship >= decent_skill_rating + } + modifier = { + add = 5 + intrigue >= decent_skill_rating + } + modifier = { + add = 5 + learning >= decent_skill_rating + } + modifier = { + add = 5 + prowess >= decent_skill_rating + } + # Characters with some relation to root are adequate picks. + modifier = { + add = 10 + has_important_relationship_trigger = { CHARACTER = root } + } + } + # Nab them for use elsewhere. + save_scope_as = offensive_courtier + } + # Does scope:offensive_courtier have any virtuous traits that are offensive to the commonfolk? If so, designate a priest to defend them. + if = { + limit = { + scope:offensive_courtier = { + OR = { + # wrathful + AND = { + has_trait = wrathful + faith = { trait_is_virtue = wrathful } + } + # deceitful + AND = { + has_trait = deceitful + faith = { trait_is_virtue = deceitful } + } + # craven + AND = { + has_trait = craven + faith = { trait_is_virtue = craven } + } + # ambitious + AND = { + has_trait = ambitious + faith = { trait_is_virtue = ambitious } + } + # arbitrary + AND = { + has_trait = arbitrary + faith = { trait_is_virtue = arbitrary } + } + # paranoid + AND = { + has_trait = paranoid + faith = { trait_is_virtue = paranoid } + } + # sadistic + AND = { + has_trait = sadistic + faith = { trait_is_virtue = sadistic } + } + # stubborn + AND = { + has_trait = stubborn + faith = { trait_is_virtue = stubborn } + } + # vengeful + AND = { + has_trait = vengeful + faith = { trait_is_virtue = vengeful } + } + } + } + any_learning_councillor = { exists = this } + } + random_learning_councillor = { save_scope_as = priest } + } + } + + # Family: disinherit & banish. + option = { + name = fp1_yearly.0011.a + trigger = { house = scope:offensive_courtier.house } + + # The nithing is exiled utterly. + scope:offensive_courtier = { + disinherit_effect = { DISINHERITOR = root } + agree_to_courtier_becoming_nithing_effect = yes + } + + # Your capital is pretty happy about the nithing being given the boot. + capital_county = { + add_county_modifier = { + modifier = nithing_exiled_fp1_modifier + years = 10 + } + } + + stress_impact = { + vengeful = major_stress_impact_loss + forgiving = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -40 + has_trait = forgiving + } + } + } + + # Non-family: banish them. + option = { + name = fp1_yearly.0011.b + trigger = { + house != scope:offensive_courtier.house + } + + # The nithing is exiled utterly. + scope:offensive_courtier = { agree_to_courtier_becoming_nithing_effect = yes } + + # Your capital is pretty happy about the nithing being given the boot. + capital_county = { + add_county_modifier = { + modifier = nithing_exiled_fp1_modifier + years = 10 + } + } + + stress_impact = { + vengeful = major_stress_impact_loss + forgiving = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -40 + has_trait = forgiving + } + } + } + + # Harbour them against the angry mob. + option = { + name = fp1_yearly.0011.c + + # Get a favour, or at least some opinion. + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:offensive_courtier + } + } + add_hook = { + type = favor_hook + target = scope:offensive_courtier + } + } + else = { + reverse_add_opinion = { + modifier = fp1_saved_me_from_the_mob_opinion + target = scope:offensive_courtier + } + } + + # Your capital county isn't super happy about this, though. + capital_county = { + add_county_modifier = { + modifier = nithing_harboured_fp1_modifier + years = 10 + } + } + + stress_impact = { + forgiving = major_stress_impact_loss + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight down for stress. + add = 30 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = vengeful + } + } + } + + # Refuse to rule. + option = { + name = fp1_yearly.0011.d + + # Not your circus, not your trained dancing bears. + add_stress = massive_stress_loss + + # Both capital_county & scope:offensive_courtier are unhappy with your inaction. + reverse_add_opinion = { + modifier = fp1_abandoned_me_to_the_mob_opinion + target = scope:offensive_courtier + } + capital_county = { + add_county_modifier = { + modifier = nithing_in_limbo_fp1_modifier + years = 10 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_energy = -0.5 + } + } + } +} + +################################################## +# Two of your Knights wish to Holmgang over a Dispute +# by Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +scripted_trigger suitable_knight_for_dispute_trigger = { + is_available_ai_adult = yes + #Nab them for checking various things later in the event. + save_temporary_scope_as = current_knight + #Filter out rulers, as the loc mismatches such tonally. + is_ruler = no + #They have to be at least not non-argumentative. + NOR = { + has_trait = forgiving + has_trait = craven + } + #For the sake of ease, they shouldn't have a positive special relationship with any other knight. + NOT = { + root = { + any_knight = { + has_friendly_relationship_trigger = { CHARACTER = scope:current_knight } + } + } + } + #Is the character hookable for the event results? + root = { + can_add_hook = { + type = favor_hook + target = scope:current_knight + } + } +} + +scripted_trigger deviant_knight_trigger = { + OR = { + has_trait = deviant + any_secret = { type = secret_deviant } + } +} + +scripted_effect holmgang_results_effect = { + if = { + limit = { government_has_flag = government_is_tribal } + $LOSER$ = { + death = { + killer = $WINNER$ + death_reason = death_duel + } + } + } + else = { + $LOSER$ = { + increase_wounds_effect = { REASON = duel } + } + } +} + +# Two knights fight to the death over nothing. +fp1_yearly.0021 = { + type = character_event + title = fp1_yearly.0021.t + desc = { + desc = fp1_yearly.0021.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:dispute_nature = flag:doggo } + desc = fp1_yearly.0021.desc.doggo + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:spit_of_land } + desc = fp1_yearly.0021.desc.spit_of_land + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:unrepeatable_insult } + desc = fp1_yearly.0021.desc.unrepeatable_insult + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:escalating_prank_war } + desc = fp1_yearly.0021.desc.escalating_prank_war + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:religious_differences } + desc = fp1_yearly.0021.desc.religious_differences + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:stolen_pig } + desc = fp1_yearly.0021.desc.stolen_pig + } + # Female Variant. + triggered_desc = { + trigger = { + scope:dispute_nature = flag:defiled_longboat + scope:defiling_knight = { is_female = yes } + } + desc = fp1_yearly.0021.desc.defiled_longboat.woman + } + # Male Variant. + triggered_desc = { + trigger = { + scope:dispute_nature = flag:defiled_longboat + scope:defiling_knight = { is_male = yes } + } + desc = fp1_yearly.0021.desc.defiled_longboat + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:board_game } + desc = fp1_yearly.0021.desc.board_game + } + } + desc = fp1_yearly.0021.desc.outro + } + theme = unfriendly + left_portrait = { + character = scope:first_knight + animation = anger + } + right_portrait = { + character = scope:second_knight + animation = disgust + } + override_background = { reference = wilderness } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0021 } + is_landed = yes + #Must be North Germanic. + culture = { has_cultural_pillar = heritage_north_germanic } + #Holmgangs must still be in fashion. + NOT = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + #Must have at least two knights available who can get into a dispute. + any_knight = { + count >= 2 + suitable_knight_for_dispute_trigger = yes + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0021 + days = 1825 + } + #Sort Actors. + ##Grab capital barony for loc. + capital_barony = { save_scope_as = capital_barony } + ##Grab the first knight. + random_knight = { + limit = { suitable_knight_for_dispute_trigger = yes } + save_scope_as = first_knight + } + ##Grab the second knight. + random_knight = { + limit = { + suitable_knight_for_dispute_trigger = yes + this != scope:first_knight + } + save_scope_as = second_knight + } + ##Just make them hate each other a little. + scope:first_knight = { + add_opinion = { + target = scope:second_knight + modifier = respect_opinion + opinion = -40 + } + reverse_add_opinion = { + target = scope:second_knight + modifier = respect_opinion + opinion = -40 + } + progress_towards_rival_effect = { + REASON = rival_knights_slapfight + CHARACTER = scope:second_knight + OPINION = 0 + } + } + #Pick which dispute type they'll have. + ##Eight options of 12.5% chance each. + random_list = { + #Dispute over a pet killed in an accident. + 125 = { + #No trigger, fallback. + save_scope_value_as = { + name = dispute_nature + value = flag:doggo + } + select_local_animal_effect = { TYPE = any } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + # And, if scope:second_knight actually has a doggo, kill it. + scope:second_knight = { + if = { + limit = { + any_owned_story = { + type = story_cycle_pet_dog + exists = story_owner.var:story_cycle_dog_name + } + } + random_owned_story = { + type = story_cycle_pet_dog + limit = { + exists = story_owner.var:story_cycle_dog_name + } + story_owner = { + add_character_flag = { + flag = dog_is_dying + } + trigger_event = pet_animal.1199 + } + } + } + } + } + #Dispute over a spit of land that grows the best cabbages. + 125 = { + #Both knights must care at least a little about money, and at least one a little too much. + trigger = { + NOR = { + scope:first_knight = { + OR = { + has_trait = generous + has_trait = profligate + has_trait = improvident + } + } + scope:second_knight = { + OR = { + has_trait = generous + has_trait = profligate + has_trait = improvident + } + } + } + OR = { + scope:first_knight = { has_trait = greedy } + scope:second_knight = { has_trait = greedy } + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:spit_of_land + } + } + #Dispute over an unrepeatable insult involving a goat & a good drinking horn. + 125 = { + #Both knights must be the type to let the insult escalate, and at least one to take it too far. + trigger = { + NOR = { + scope:first_knight = { has_trait = calm } + scope:second_knight = { has_trait = calm } + } + OR = { + scope:first_knight = { has_trait = wrathful } + scope:first_knight = { has_trait = wrathful} + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:unrepeatable_insult + } + } + #Dispute resulting from an escalating prank war. + 125 = { + #Both knights must be people who might get involved in such a thing, and one should be the type to take it too far. + trigger = { + NOR = { + scope:first_knight = { + OR = { + has_trait = shy + has_trait = reclusive + } + } + scope:second_knight = { + OR = { + has_trait = shy + has_trait = reclusive + } + } + } + OR = { + scope:first_knight = { has_trait = vengeful } + scope:second_knight = { has_trait = vengeful } + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:escalating_prank_war + } + } + #Dispute over religious differences. + 125 = { + #Both knights must find each other's faiths disagreeable. + trigger = { + scope:first_knight.faith = { + faith_hostility_level = { + target = scope:second_knight.faith + value >= faith_hostile_level + } + } + scope:second_knight.faith = { + faith_hostility_level = { + target = scope:first_knight.faith + value >= faith_hostile_level + } + } + #Quietly exclude sceptics also. + NOR = { + scope:first_knight = { has_trait = cynical } + scope:second_knight = { has_trait = cynical } + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:religious_differences + } + } + #Dispute over a stolen pig. + 125 = { + trigger = { + #Exempt faiths that don't eat pork: technically the pig could be as a pet or for non-edible purposes, but it scans best if we just don't bring this up. + NOR = { + scope:first_knight = { + OR = { + religion = religion:judaism_religion + religion = religion:islam_religion + } + } + scope:second_knight = { + OR = { + religion = religion:judaism_religion + religion = religion:islam_religion + } + } + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:stolen_pig + } + } + #Dispute resulting from someone making a sea-going vessel a bit saltier. + 125 = { + #Requires at least one knight to be a deviant. + trigger = { + OR = { + scope:first_knight = { deviant_knight_trigger = yes } + scope:second_knight = { deviant_knight_trigger = yes } + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:defiled_longboat + } + #Specify who defiled who's longboat. + if = { + limit = { + scope:first_knight = { deviant_knight_trigger = yes } + } + scope:first_knight = { save_scope_as = defiling_knight } + scope:second_knight = { save_scope_as = unfortunate_knight } + } + else = { + scope:second_knight = { save_scope_as = defiling_knight } + scope:first_knight = { save_scope_as = unfortunate_knight } + } + } + #Dispute resulting from the mysterious Viking board game. + 125 = { + #No trigger, fallback. + save_scope_value_as = { + name = dispute_nature + value = flag:board_game + } + } + } + } + + #Strictly forbid them. + option = { + name = fp1_yearly.0021.b + + #Then, we see if your rule is feared or jeered. + duel = { + skill = intrigue + value = 12 + #You successfully terrify them into not fighting. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0021.b.tt_success + send_interface_toast = { + title = fp1_yearly.0021.b.tt_success + left_icon = scope:first_knight + add_dread = medium_dread_gain + add_prestige = minor_prestige_gain + } + } + #They begrudgingly agree not to fight, but shit-talk you for it. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0021.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0021.b.tt_failure + left_icon = scope:first_knight + add_dread = medium_dread_loss + add_prestige = minor_prestige_loss + } + } + } + + #Regardless of outcome, they dislike you for this. + reverse_add_opinion = { + target = scope:first_knight + modifier = respect_opinion + opinion = -30 + } + reverse_add_opinion = { + target = scope:second_knight + modifier = respect_opinion + opinion = -30 + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_vengefulness = -0.25 + ai_rationality = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -10 + has_trait = just + } + } + } + + #Bet on scope:first_knight. + option = { + name = fp1_yearly.0021.c + + #Sort the duel. + scope:first_knight = { + duel = { + skill = prowess + target = scope:second_knight + #scope:first_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0021.c.tt_success + root = { + send_interface_toast = { + title = fp1_yearly.0021.c.tt_success + left_icon = scope:first_knight + add_gold = minor_gold_value + holmgang_results_effect = { + WINNER = scope:first_knight + LOSER = scope:second_knight + } + } + } + } + #scope:second_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0021.c.tt_failure + root = { + send_interface_toast = { + title = fp1_yearly.0021.c.tt_failure + left_icon = scope:second_knight + remove_short_term_gold = minor_gold_value + holmgang_results_effect = { + WINNER = scope:second_knight + LOSER = scope:first_knight + } + } + } + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = greedy + } + } + } + + #Bet on scope:second_knight. + option = { + name = fp1_yearly.0021.d + + #Sort the duel. + scope:first_knight = { + duel = { + skill = prowess + target = scope:second_knight + #scope:first_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0021.d.tt_failure + root = { + send_interface_toast = { + title = fp1_yearly.0021.d.tt_failure + left_icon = scope:first_knight + remove_short_term_gold = minor_gold_value + holmgang_results_effect = { + WINNER = scope:first_knight + LOSER = scope:second_knight + } + } + } + } + #scope:second_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0021.d.tt_success + root = { + send_interface_toast = { + title = fp1_yearly.0021.d.tt_success + left_icon = scope:second_knight + add_gold = minor_gold_value + holmgang_results_effect = { + WINNER = scope:second_knight + LOSER = scope:first_knight + } + } + } + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = greedy + } + } + } + + #Grant them permission. + option = { + name = fp1_yearly.0021.a + + #Sort the duel. + scope:first_knight = { + duel = { + skill = prowess + target = scope:second_knight + #scope:first_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0021.a.tt_success + root = { + send_interface_toast = { + title = fp1_yearly.0021.a.tt_success + left_icon = scope:first_knight + add_hook = { + type = favor_hook + target = scope:first_knight + } + holmgang_results_effect = { + WINNER = scope:first_knight + LOSER = scope:second_knight + } + } + } + } + #scope:second_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0021.a.tt_failure + root = { + send_interface_toast = { + title = fp1_yearly.0021.a.tt_failure + left_icon = scope:second_knight + add_hook = { + type = favor_hook + target = scope:second_knight + } + holmgang_results_effect = { + WINNER = scope:second_knight + LOSER = scope:first_knight + } + } + } + } + } + } + + stress_impact = { + just = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = just + } + } + } +} + +################################################## +# A Mighty Warrior with a Big Personality Arrives +# by Ewan Cowhig Croft +# 0031 - 0040 +################################################## + +scripted_trigger fp1_0031_any_valid_king_trigger = { + #Make sure it's a kingdom that's known about. + in_diplomatic_range = root + #And that the warrior isn't lying about someone the friend cares for. + NOR = { + any_close_or_extended_family_member = { this = root } + any_spouse = { this = root } + } + #We're quite happy to suggest that the warrior is lying, but make sure that it's not an excessively dodgy lie. + OR = { + any_child = { count = 0 } + any_child = { + count = all + is_physically_able_adult = yes + } + } +} + +# A deceitful warrior is telling tall-tales at court. +fp1_yearly.0031 = { + type = character_event + title = fp1_yearly.0031.t + desc = { + desc = fp1_yearly.0031.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:lie_nature = flag:sunk_longboat } + desc = fp1_yearly.0031.desc.sunk_longboat + } + triggered_desc = { + trigger = { scope:lie_nature = flag:wrestled_whale } + desc = fp1_yearly.0031.desc.wrestled_whale + } + triggered_desc = { + trigger = { + scope:lie_nature = flag:charged_city + exists = scope:fruit_knife + } + desc = fp1_yearly.0031.desc.charged_city_fruit_knife + } + triggered_desc = { + trigger = { + scope:lie_nature = flag:charged_city + NOT = { exists = scope:fruit_knife } + } + desc = fp1_yearly.0031.desc.charged_city + } + triggered_desc = { + trigger = { scope:lie_nature = flag:kept_iceland_afloat } + desc = fp1_yearly.0031.desc.kept_iceland_afloat + } + triggered_desc = { + trigger = { scope:lie_nature = flag:wooed_heir } + desc = fp1_yearly.0031.desc.wooed_heir + } + triggered_desc = { + trigger = { scope:lie_nature = flag:hunted_troll } + desc = fp1_yearly.0031.desc.hunted_troll + } + } + desc = fp1_yearly.0031.desc.outro + } + theme = intrigue + left_portrait = { + character = root + animation = toast + triggered_animation = { + trigger = { + has_trait = impatient + } + animation = boredom + } + } + right_portrait = { + character = scope:lying_warrior + animation = storyteller + } + override_background = { reference = feast } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0031 } + is_landed = yes + #Must be some form of North Germanic culture. + culture = { has_cultural_pillar = heritage_north_germanic } + #And that culture must not be too advanced. + culture = { + NOT = { has_cultural_era_or_later = culture_era_high_medieval } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0031 + days = 1825 + } + #Save the capital for loc. + capital_barony = { save_scope_as = capital_barony } + #Create our lying warrior. + create_character = { + location = root.capital_province + template = fp1_deceitful_warrior_character + save_scope_as = lying_warrior + } + #Create our actual lie. + ##Six options for roughly 16.6% chance apiece. + random_list = { + #Swam home after their longboat sank from too much plunder. + 166 = { + #Fallback: always available. + save_scope_value_as = { + name = lie_nature + value = flag:sunk_longboat + } + } + #Wrestled a wounded whale ashore single-handed. + 166 = { + #Fallback: always available. + save_scope_value_as = { + name = lie_nature + value = flag:wrestled_whale + } + } + #Lead the charge on the walls of a great city. + 166 = { + #Fallback: always available. + save_scope_value_as = { + name = lie_nature + value = flag:charged_city + } + #And an Easter egg for Nick. + random = { + chance = 1 + save_scope_value_as = { + name = fruit_knife + value = yes + } + scope:lying_warrior = { give_nickname = nick_the_blessed } + } + } + #Averted giant holmgang that would have sunk Iceland. + 166 = { + trigger = { + #Must not have any counties in Iceland, as the news'd travel otherwise. + NOT = { + any_realm_de_jure_duchy = { this = title:d_iceland } + } + } + save_scope_value_as = { + name = lie_nature + value = flag:kept_iceland_afloat + } + } + #Wooed the child of a foreign king. + 166 = { + trigger = { + any_kingdom = { + is_title_created = yes + holder = { fp1_0031_any_valid_king_trigger = yes } + } + } + save_scope_value_as = { + name = lie_nature + value = flag:wooed_heir + } + #Designate a suitable kingdom. + random_kingdom = { + limit = { + is_title_created = yes + holder = { fp1_0031_any_valid_king_trigger = yes } + } + holder = { save_scope_as = disparaged_king } + } + #Set dummy appropriate gender. + ## If the faith is generally intolerant, then we invent a heterosexual target. + if = { + limit = { + faith = { + OR = { + has_doctrine_parameter = homosexuality_illegal + has_doctrine_parameter = homosexuality_shunned + } + } + } + # Then females get a male invention. + if = { + limit = { + scope:lying_warrior = { is_female = yes } + } + dummy_male = { save_scope_as = invented_heir } + } + # And males get a female invention. + if = { + limit = { + scope:lying_warrior = { is_male = yes } + } + dummy_female = { save_scope_as = invented_heir } + } + } + ## Otherwise, we randomise. + else = { + random_list = { + 100 = { + dummy_female = { save_scope_as = invented_heir } + } + 100 = { + dummy_male = { save_scope_as = invented_heir } + } + } + } + ## Ensure that scope:lying_warrior's preferences line up with their invented target. + ### Note: asexuals not specifically accounted for, since we can't reliably say which way(s) their preferences go, as we don't store that information. + scope:lying_warrior = { + if = { + limit = { + # Orthodox couplings. + OR = { + AND = { + is_female = yes + scope:invented_heir = { is_female = yes } + } + AND = { + is_male = yes + scope:invented_heir = { is_male = yes } + } + } + # But a heterodox preference. + has_sexuality = heterosexual + } + # Randomise scope:lying_warrior's sexuality to match their stories. + random_list = { + 100 = { set_sexuality = bisexual } + 100 = { set_sexuality = homosexual } + } + } + } + } + #Hunted troll. + 166 = { + #Fallback: always available. + save_scope_value_as = { + name = lie_nature + value = flag:hunted_troll + } + #Gotta make it believable. + scope:lying_warrior = { + hidden_effect = { + increase_wounds_effect = { REASON = fight } + } + } + } + } + } + + #Invite them to stay permanently. + option = { + name = fp1_yearly.0031.a + + add_courtier = scope:lying_warrior + + stress_impact = { + trusting = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_sociability = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + } + } + + #Question their veracity. + option = { + name = fp1_yearly.0031.b + + #Standard intrigue duel; we make it a little easier, since you do have the choice of just gaining a courtier. + duel = { + skill = intrigue + target = scope:lying_warrior + #You expose their lies. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0031.b.tt_success + send_interface_toast = { + title = fp1_yearly.0031.b.tt_success + left_icon = scope:lying_warrior + add_prestige = minor_prestige_gain + scope:lying_warrior = { + #Dispose of scope:lying_warrior. + hidden_effect = { + death = { death_reason = death_vanished } + } + } + } + } + #They run circles around your questions. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0031.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0031.b.tt_failure + left_icon = scope:lying_warrior + add_prestige = minor_prestige_loss + scope:lying_warrior = { + #Dispose of scope:lying_warrior. + hidden_effect = { + death = { death_reason = death_vanished } + } + } + } + } + } + + stress_impact = { + paranoid = medium_stress_impact_loss + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_sociability = -0.5 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -20 + has_trait = trusting + } + } + } + + #Tell them to tell people of your generous halls. + option = { + name = fp1_yearly.0031.c + + #Get a nice little bonus/negate a negative for being talked up. + if = { + limit = { has_character_modifier = stingy_host_fp1_modifier } + remove_character_modifier = stingy_host_fp1_modifier + } + else = { + add_character_modifier = { + modifier = generous_host_fp1_modifier + years = 10 + } + } + + #Dispose of scope:lying_warrior. + hidden_effect = { + scope:lying_warrior = { + death = { death_reason = death_vanished } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + shy = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_sociability = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { #Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -10 + has_trait = shy + } + modifier = { #Weight down for stress. + add = -10 + has_trait = humble + } + } + } +} + +################################################## +# [Russia/Steppe] Islamic Explorer Visits Court +# by Ewan Cowhig Croft +# 0041 - 0050 +################################################## + +scripted_trigger suitable_islamic_realm_trigger = { + #First off, we need people who will consider root a savage. + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + #Next, filter down to the correct religion. + religion = religion:islam_religion + #Making sure to only grab rulers from the Middle East. + capital_province = { + OR = { + geographical_region = world_asia_minor + geographical_region = world_middle_east_jerusalem + geographical_region = world_middle_east_arabia + geographical_region = world_middle_east_persia + geographical_region = world_india_rajastan + } + } + #And then misc checks to make sure that the tone is correct. + top_liege = { + NOR = { + #Such as the liege not having much contact with Germanic Paganism. + religion = religion:germanic_religion + any_vassal_or_below = { religion = religion:germanic_religion } + #The realm not being positioned next door to root. + character_is_realm_neighbor = root.top_liege + #And the realm generally not being inside the same (admittedly large) area. + any_realm_county = { + title_province = { geographical_region = dlc_fp1_region_russian_steppe } + } + } + } +} + +# An Islamic explorer stops by for a visit. +fp1_yearly.0041 = { + type = character_event + title = fp1_yearly.0041.t + desc = fp1_yearly.0041.desc + theme = stewardship + left_portrait = { + character = scope:explorer + animation = disapproval + } + right_portrait = { + character = scope:sponsoring_liege + animation = personality_rational + } + override_background = { reference = throne_room } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0041 } + is_landed = yes + #Must be a Norse pagan tribal. + government_has_flag = government_is_tribal + religion = religion:germanic_religion + #With a capital in the steppe/Russia. + capital_province = { geographical_region = dlc_fp1_region_russian_steppe } + #Just for good measure, you should probably be a small-ish realm. + realm_size <= medium_realm_size + #No same-realm Muslims. + top_liege = { + NOR = { + religion = religion:islam_religion + any_vassal_or_below = { religion = religion:islam_religion } + } + } + #A suitable Islamic realm for the explorer to have come from must exists. + any_kingdom = { + holder ?= { suitable_islamic_realm_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0041 + days = 3650 + } + #Grab home barony for loc. + capital_barony = { save_scope_as = capital_barony } + #Assign a home realm for the explorer. + random_kingdom = { + limit = { + holder ?= { suitable_islamic_realm_trigger = yes} + } + holder = { save_scope_as = sponsoring_liege } + } + #Create the Islamic explorer. + create_character = { + location = root.capital_province + template = fp1_islamic_explorer_character + save_scope_as = explorer + } + hidden_effect = { + scope:explorer = { + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_mystic + LEVEL_1 = yes + LEVEL_3 = yes + } + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_physician + LEVEL_1 = yes + LEVEL_3 = yes + } + } + } + } + + #Host a small blot. + option = { + name = fp1_yearly.0041.a + + #Diplomacy duel to see how well you present yourself. + duel = { + skill = diplomacy + value = decent_skill_rating + #Your blot impresses the explorer. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0041.a.tt_success + send_interface_toast = { + title = fp1_yearly.0041.a.tt_success + left_icon = scope:explorer + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = exotic_foreign_lord_fp1_modifier + years = 10 + } + } + } + #Your pagan ways disgust the explorer. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0041.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0041.a.tt_failure + left_icon = scope:explorer + add_prestige = minor_prestige_loss + add_character_modifier = { + modifier = horrifying_foreign_lord_fp1_modifier + years = 5 + } + } + } + } + + stress_impact = { + zealous = medium_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_sociability = 0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -20 + has_trait = cynical + } + } + } + + #Invite them to stay and convert you. + option = { + name = fp1_yearly.0041.b + #Prohibit the AI from converting to far-away religions unless they're genuinely very interested in scope:explorer's faith. + trigger = { + OR = { + is_ai = no + AND = { + NOR = { + has_trait = zealous #Zealous characters never convert on a whim. + has_trait = cynical #Cynical characters aren't really interested in what anyone is selling. + has_trait = arrogant #Arrogant characters believe their faith is already the best, even if they don't care much about it. + has_trait = paranoid #Paranoid characters don't trust scope:explorer's tales. + } + OR = { + has_trait = humble #Humble characters like to give everyone a fair chance to explain their POV. + has_trait = trusting #Trusting characters can be talked into many things, given time & charisma. + } + } + } + } + + #Get scope:explorer as a courtier. + add_courtier = scope:explorer + #Sort conversion. + set_character_faith_with_conversion = scope:explorer.faith + #Get scope:sponsoring_liege as a friend, if possible. + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:sponsoring_liege } + } + set_relation_friend = { reason = friend_converted_explorer target = scope:sponsoring_liege } + reverse_add_opinion = { + target = scope:sponsoring_liege + modifier = pious_opinion + opinion = 50 + } + } + + stress_impact = { + humble = medium_stress_impact_loss + trusting = major_stress_impact_loss + paranoid = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + zealous = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_zeal = -0.75 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = humble + } + modifier = { #Weight up for stress. + add = 30 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -20 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -50 + has_trait = zealous + } + } + } + + #Give them the boot. + option = { + name = fp1_yearly.0041.c + + #Consolation prize for giving them the boot. + ## Stress loss handled in stress_impact. + + stress_impact = { + base = minor_stress_loss + zealous = minor_stress_impact_loss + shy = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.25 + ai_sociability = -0.5 + } + modifier = { #Weight down for stress. + add = -10 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = shy + } + } + } + + #Clean-up characters, if appropriate. + after = { + # We use a separate event delayed by a day so that scope:explorer isn't dead in the toasts. + trigger_event = { + id = fp1_yearly.0042 + days = 1 + } + } +} + +# Clean up unused explorer. +fp1_yearly.0042 = { + hidden = yes + + immediate = { + #Get rid of scope:explorer, unless they've decided to stay. + scope:explorer = { + if = { + limit = { + NOT = { is_courtier_of = root } + } + hidden_effect = { + death = { death_reason = death_vanished } + } + } + } + } +} + +################################################## +# [Rural] A Dead Character is Rumoured to have become a Draugr +# by Ewan Cowhig Croft +# 0051 - 0070 +################################################## + +# You are informed of the reputed-draugr. +fp1_yearly.0051 = { + type = character_event + title = fp1_yearly.0051.t + desc = fp1_yearly.0051.desc + theme = unfriendly + left_portrait = { + character = scope:draugr + animation = personality_vengeful + } + override_background = { reference = throne_room } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0051 } + is_landed = yes + #Must have a draugr candidate ready; this is set on the on_death on_action. + has_variable = potential_draugr + #Must be a tribal... + government_has_flag = government_is_tribal + #With a rural, North Germanic capital. + capital_county = { + #Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0051 + days = 7300 + } + #Grab our capital for loc. + capital_county = { save_scope_as = capital_county } + #Then grab our draugr. + var:potential_draugr = { save_scope_as = draugr } + } + + #Investigate in person. + option = { + name = fp1_yearly.0051.a + + #You go off to investigate in person. + custom_tooltip = fp1_yearly.0051.a.tt + ##5 possible outcomes, weighing down the chance of nothing happening slightly due to low value, gives us x4 options of 22.5% & one of 10%. + hidden_effect = { + random_list = { + #A pack of wolves! + 225 = { + trigger_event = { + id = fp1_yearly.0061 + months = 1 + } + } + #A fearsome bear! + 225 = { + trigger_event = { + id = fp1_yearly.0062 + months = 1 + } + } + #A nithing living in the mound! + 225 = { + trigger_event = { + id = fp1_yearly.0063 + months = 1 + } + } + #An orphan living in the mound! + 225 = { + trigger_event = { + id = fp1_yearly.0064 + months = 1 + } + } + #Absolutely bugger-all! + 100 = { + trigger_event = { + id = fp1_yearly.0065 + months = 1 + } + } + } + } + + stress_impact = { + diligent = medium_stress_impact_loss + brave = medium_stress_impact_loss + lazy = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = 20 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -20 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -20 + has_trait = craven + } + } + } + + #Try various folk solutions. + option = { + name = fp1_yearly.0051.c + + #Let's see how your hearth wisdom is, chummer. + duel = { + skill = learning + value = decent_skill_rating + #Your potions and spells reassure the locals. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0051.c.tt_success + send_interface_toast = { + title = fp1_yearly.0051.c.tt_success + left_icon = scope:draugr + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + add_stress = medium_stress_loss + } + } + #Your rituals are insufficient. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0051.c.tt_failure + send_interface_toast = { + title = fp1_yearly.0051.c.tt_failure + left_icon = scope:draugr + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_failed_fp1_modifier + years = 10 + } + } + add_stress = medium_stress_gain + } + } + } + + stress_impact = { + lazy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + #Have them exhumed and the corpse destroyed. + option = { + name = fp1_yearly.0051.b + + #Peasants are happy. + send_interface_toast = { + title = fp1_yearly.0051.b.body_destroyed + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + } + + #But either the family of the deceased are not... + if = { + limit = { + scope:draugr = { + OR = { + #Nab their entire house. + AND = { + house ?= { + any_house_member = { + count >= 1 + is_alive = yes + } + } + } + #Any close family outside of that house (bastards, house-founder siblings, etc). + any_close_or_extended_family_member = { + count >= 1 + is_alive = yes + } + #And any spouses still kicking around. + any_former_spouse = { + count >= 1 + is_alive = yes + } + } + } + } + #Nab scope:draugr's nearest'n'dearest. + scope:draugr = { + if = { + limit = { exists = house } + house = { + every_house_member = { + limit = { is_alive = yes } + add_to_list = close_to_draugr_list + } + } + } + every_close_or_extended_family_member = { + limit = { is_alive = yes } + add_to_list = close_to_draugr_list + } + every_former_spouse = { + limit = { is_alive = yes } + add_to_list = close_to_draugr_list + } + } + #And make them unhappy at the thing wot u dun. + every_in_list = { + list = close_to_draugr_list + custom = fp1_yearly.0051.b.list + add_opinion = { + target = root + modifier = fp1_desecrated_corpse_of_loved_one + } + } + } + #... Or you have to spend a little prestige for defiling the dead. + else = { add_prestige = medium_prestige_loss } + + stress_impact = { + vengeful = minor_stress_impact_loss + callous = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + forgiving = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_compassion = -0.25 + ai_honor = -0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { #Weight up for stress. + add = 20 + has_trait = callous + } + modifier = { #Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -10 + has_trait = forgiving + } + modifier = { #Weight down for stress. + add = -20 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -20 + has_trait = just + } + } + } +} + +# The draugr is earmarked. +fp1_yearly.0052 = { + hidden = yes + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Must be within the player's court. + is_knight = yes + court_owner = { is_ai = no } + #Must be an intimidating fighter. + prowess >= extremely_high_skill_rating + #Aaaaand must have a personality that makes people think they'd come back to harass the living. + calc_true_if = { + amount >= 2 + has_trait = wrathful + has_trait = arrogant + has_trait = deceitful + has_trait = craven + has_trait = ambitious + has_trait = arbitrary + has_trait = cynical + has_trait = vengeful + has_trait = sadistic + } + } + + immediate = { + save_scope_as = potential_draugr + court_owner = { + set_variable = { + name = potential_draugr + value = scope:potential_draugr + years = 5 + } + } + } +} + +# The draugr was a pack of wolves! +fp1_yearly.0061 = { + type = character_event + title = fp1_yearly.0061.t + desc = fp1_yearly.0061.desc + theme = martial + left_portrait = { + character = root + animation = shock + } + override_background = { reference = wilderness } + + trigger = { + is_available_even_at_war_adult = yes + } + + #Fight the wolves. + option = { + name = fp1_yearly.0061.a + + #You rally your soldiers to fight off the pack! + duel = { + skill = martial + value = high_skill_rating + #You slaughter the pack! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0061.a.tt_success + send_interface_toast = { + title = fp1_yearly.0061.a.tt_success + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + add_prestige = medium_prestige_gain + } + } + #You barely escape with your life! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0061.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0061.a.tt_failure + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_monstrous_wolfpack_fp1_modifier + years = 10 + } + } + increase_wounds_effect = { REASON = wolves } + } + } + } + + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.25 + } + modifier = { #Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + #Retreat! + option = { + name = fp1_yearly.0061.b + + #The wolves will be eating people for some time to come. + capital_county = { + add_county_modifier = { + modifier = draugr_monstrous_wolfpack_fp1_modifier + years = 10 + } + } + #And e'eryone knows why. + add_prestige = medium_prestige_loss + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_boldness = -0.5 + } + modifier = { #Weight up for stress. + add = 30 + has_trait = craven + } + modifier = { #Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# The draugr was a bear! +fp1_yearly.0062 = { + type = character_event + title = fp1_yearly.0062.t + desc = fp1_yearly.0062.desc + theme = martial + left_portrait = { + character = root + animation = shock + } + override_background = { reference = wilderness } + + trigger = { + is_available_even_at_war_adult = yes + } + + #Fight the bear. + option = { + name = fp1_yearly.0062.a + + #You meet the bear's challenge! + duel = { + skill = prowess + value = high_skill_rating + #You kill the bear! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0062.a.tt_success + send_interface_toast = { + title = fp1_yearly.0062.a.tt_success + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + add_prestige = medium_prestige_gain + } + } + #You only just escape with your life! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0062.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0062.a.tt_failure + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_monstrous_bear_fp1_modifier + years = 10 + } + } + increase_wounds_effect = { REASON = bear } + } + } + } + + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.25 + } + modifier = { #Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + #Retreat! + option = { + name = fp1_yearly.0062.b + + #The bear will be eating people for some time to come. + capital_county = { + add_county_modifier = { + modifier = draugr_monstrous_bear_fp1_modifier + years = 10 + } + } + #And e'eryone knows why. + add_prestige = medium_prestige_loss + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_boldness = -0.5 + } + modifier = { #Weight up for stress. + add = 30 + has_trait = craven + } + modifier = { #Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# The draugr was a nithing! +fp1_yearly.0063 = { + type = character_event + title = fp1_yearly.0063.t + desc = fp1_yearly.0063.desc + theme = intrigue + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:draugr_nithing + animation = shock + } + override_background = { reference = wilderness } + + trigger = { + is_available_even_at_war_adult = yes + } + + immediate = { + #Create us a nithing! + create_character = { + location = root.capital_province + template = fp1_capital_county_nithing_character + save_scope_as = draugr_nithing + } + hidden_effect = { + scope:draugr_nithing = { nithing_character_creation_scripted_effect = yes } + } + } + + #Try to catch the nithing before they slip away. + option = { + name = fp1_yearly.0063.a + + #You attempt to catch the criminal. + duel = { + skill = intrigue + value = high_skill_rating + #Your trap works! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0063.a.tt_success + send_interface_toast = { + title = fp1_yearly.0063.a.tt_success + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + add_prestige = medium_prestige_gain + #To the dungeon with you, m'nithing. + imprison = { + target = scope:draugr_nithing + type = dungeon + } + } + } + #The nithing slips the net! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0063.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0063.a.tt_failure + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_nithing_fp1_modifier + years = 10 + } + } + custom_tooltip = fp1_yearly.0063.a.tt_failure.draugr_nithing_escapes + hidden_effect = { + scope:draugr_nithing = { + death = { death_reason = death_vanished } + } + } + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + vengeful = medium_stress_impact_loss + just = medium_stress_impact_loss + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = paranoid + } + modifier = { #Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { #Weight up for stress. + add = 20 + has_trait = just + } + modifier = { #Weight down for stress. + add = -20 + has_trait = forgiving + } + } + } + + #Leave them to it. + option = { + name = fp1_yearly.0063.b + + #The nithing will continue to do your capital a mischief for quite a while. + capital_county = { + add_county_modifier = { + modifier = draugr_nithing_fp1_modifier + years = 10 + } + } + #But at least it's less ignoble than running from wild animals. + add_prestige = minor_prestige_loss + + stress_impact = { + just = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + arbitrary = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_honor = -0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = just + } + modifier = { #Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { #Weight down for stress. + add = -10 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -20 + has_trait = forgiving + } + } + } +} + +# The draugr was an orphan! +fp1_yearly.0064 = { + type = character_event + title = fp1_yearly.0064.t + desc = fp1_yearly.0064.desc + theme = friendly + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:draugr_orphan + animation = fear + } + override_background = { reference = wilderness } + + trigger = { + is_available_even_at_war_adult = yes + } + + immediate = { + #Create us an orphan! + create_character = { + location = root.capital_province + template = fp1_capital_county_orphan_character + save_scope_as = draugr_orphan + } + #And every possible result sorts the issue for you. + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + } + + #Move them on. + option = { + name = fp1_yearly.0064.a + + #The orphan disappears. + custom_tooltip = fp1_yearly.0064.a.tt + hidden_effect = { + scope:draugr_orphan = { + death = { death_reason = death_vanished } + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + callous = major_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_compassion = -0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { #Weight up for stress. + add = 30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + #Fling them into prison. + option = { + name = fp1_yearly.0064.b + + #You uhh, you get a prisoner. + imprison = { + target = scope:draugr_orphan + type = dungeon + } + reverse_add_opinion = { + target = scope:draugr_orphan + modifier = imprisoned_me + } + #... Just for good measure, let's make sure they won't forget this. + hidden_effect = { set_relation_potential_rival = scope:draugr_orphan } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = major_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_compassion = -0.75 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { #Weight up for stress. + add = 30 + has_trait = sadistic + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + } + } + + #Take them to court. + option = { + name = fp1_yearly.0064.c + + #One shiny new child for you. + add_courtier = scope:draugr_orphan + #And they're pretty happy about being whisked out of the grave they were living in. + reverse_add_opinion = { + target = scope:draugr_orphan + modifier = loyal_servant + } + add_hook = { + target = scope:draugr_orphan + type = loyalty_hook + } + + stress_impact = { + trusting = minor_stress_impact_loss + compassionate = major_stress_impact_loss + paranoid = minor_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_compassion = -0.75 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { #Weight up for stress. + add = 30 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -20 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -20 + has_trait = sadistic + } + } + } + + #Adopt them. + option = { + name = fp1_yearly.0064.d + #And, if you've no kids of your own right now... + trigger = { + any_child = { + count = 0 + is_alive = yes + } + } + + #One shiny new child for you. + if = { + limit = { is_female = yes } + scope:draugr_orphan = { set_mother = root } + } + else = { + scope:draugr_orphan = { set_father = root } + } + hidden_effect = { + #We take care of the sundries in a hidden effect so as not to put too much into the tooltip. + scope:draugr_orphan = { set_house = root.house } + add_courtier = scope:draugr_orphan + } + #And they're pretty happy about being the child of a lord all of a sudden. + reverse_add_opinion = { + target = scope:draugr_orphan + modifier = love_opinion + opinion = 100 + } + add_hook = { + target = scope:draugr_orphan + type = loyalty_hook + } + + stress_impact = { + trusting = medium_stress_impact_loss + compassionate = massive_stress_impact_loss + paranoid = medium_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_compassion = -0.75 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = trusting + } + modifier = { #Weight up for stress. + add = 50 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = 20 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = sadistic + } + } + } +} + +# The draugr was... didn't exist! +fp1_yearly.0065 = { + type = character_event + title = fp1_yearly.0065.t + desc = fp1_yearly.0065.desc + theme = physical_health + left_portrait = { + character = root + animation = boredom + } + override_background = { reference = wilderness } + + trigger = { + is_available_even_at_war_adult = yes + } + + #Must have been the wind? + option = { + name = fp1_yearly.0065.a + + #Welp, at least the fresh air does you good! + add_character_modifier = { + modifier = draugr_healthy_hiking_fp1_modifier + years = 10 + } + + + #The locals grumble a little regardless. + send_interface_toast = { + title = fp1_yearly.0065.a.locals_grumble + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_nothing_found_fp1_modifier + years = 10 + } + } + } + + stress_impact = { + #Usually bad form to give stress in one-event options, but it's a little funny to see your character's reaction to there being literally nothing to see. + trusting = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + } + ai_chance = { + #Only option. + base = 100 + } + } +} + +################################################## +# The Deep Places of the World +# by Ewan Cowhig Croft +# 0071 - 0090 +################################################## + +scripted_trigger fp1_0071_loveli_lakes_trigger = { + has_trait = shieldmaiden + is_courtier_of = root + is_available_ai_adult = yes + is_healthy = yes +} + +scripted_trigger fp1_0071_valid_marshal_for_delegation_trigger = { + exists = this + is_available_ai_adult = yes +} + +scripted_effect fp1_0071_apply_hungry_troll_modifier_effect = { + capital_county = { + add_county_modifier = { + modifier = fp1_yearly_0071_troll_attacks_modifier + years = 30 + } + } +} + +# [Rural] A Troll has been sighted & is attacking villages/peasants +fp1_yearly.0071 = { + type = character_event + title = fp1_yearly.0071.t + desc = { + desc = fp1_yearly.0071.desc.intro + # Troll type. + first_valid = { + # A towering bear. + triggered_desc = { + trigger = { scope:troll_type = flag:bear } + desc = fp1_yearly.0071.desc.troll_type.bear + } + # An ancient wolf. + triggered_desc = { + trigger = { scope:troll_type = flag:wolf } + desc = fp1_yearly.0071.desc.troll_type.wolf + } + # A colossal wolverine. + triggered_desc = { + trigger = { scope:troll_type = flag:wolverine } + desc = fp1_yearly.0071.desc.troll_type.wolverine + } + # A stealthy lynx. + triggered_desc = { + trigger = { scope:troll_type = flag:lynx } + desc = fp1_yearly.0071.desc.troll_type.lynx + } + # An enraged moose. + triggered_desc = { + trigger = { scope:troll_type = flag:moose } + desc = fp1_yearly.0071.desc.troll_type.moose + } + } + # Outro type. + first_valid = { + triggered_desc = { + trigger = { exists = scope:loveli_lakes } + desc = fp1_yearly.0071.desc.outro.loveli_lakes + } + desc = fp1_yearly.0071.desc.outro.fallback + } + } + theme = hunting + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:marshal + animation = dismissal + } + lower_left_portrait = scope:loveli_lakes + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0071 } + is_landed = yes + # Must be a tribal in Scandinavia. + government_has_flag = government_is_tribal + fp1_is_in_scandinavia = yes + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + # And ensure it doesn't already have a troll problem. + NOT = { has_county_modifier = fp1_yearly_0071_troll_attacks_modifier } + } + } + + weight_multiplier = { + base = 1 + + # Weight down a little if you're a hunter, since it means you're probably trimming the local wildlife down quite dramatically. + modifier = { + add = -0.5 + has_trait = lifestyle_hunter + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0071 + days = 1825 + } + # Roll to determine what type of beast we get. + ## Five options of 20% each. + random_list = { + # A towering bear. + 200 = { + save_scope_value_as = { + name = troll_type + value = flag:bear + } + } + # An ancient wolf. + 200 = { + save_scope_value_as = { + name = troll_type + value = flag:wolf + } + } + # A colossal wolverine. + 200 = { + save_scope_value_as = { + name = troll_type + value = flag:wolverine + } + } + # A stealthy lynx. + 200 = { + save_scope_value_as = { + name = troll_type + value = flag:lynx + } + } + # An enraged moose. + 200 = { + save_scope_value_as = { + name = troll_type + value = flag:moose + } + } + } + ## Did a møøse bite root's sister? + if = { + limit = { + scope:troll_type = flag:moose + # We could go for a more complex implementation, but as we want to keep the meme rare (and therefore less stale), we hard-lock it down to just shieldmaidens. + any_sibling = { fp1_0071_loveli_lakes_trigger = yes } + } + random_sibling = { + limit = { fp1_0071_loveli_lakes_trigger = yes } + save_scope_as = loveli_lakes + } + } + # Grab the martial, if possible, for delegation. + if = { + limit = { + any_martial_councillor = { fp1_0071_valid_marshal_for_delegation_trigger = yes } + } + random_martial_councillor = { + limit = { fp1_0071_valid_marshal_for_delegation_trigger = yes } + save_scope_as = marshal + } + } + } + + # I'll kill the beast myself! + option = { + name = fp1_yearly.0071.a + + # Inform root that they'll get a follow-up event. + custom_tooltip = fp1_yearly.0071.a.tt + # Calc which event to send out. + ## A towering bear. + if = { + limit = { scope:troll_type = flag:bear } + trigger_event = { + id = fp1_yearly.0081 + days = 14 + } + } + ## An ancient wolf. + else_if = { + limit = { scope:troll_type = flag:wolf } + trigger_event = { + id = fp1_yearly.0082 + days = 14 + } + } + ## A colossal wolverine. + else_if = { + limit = { scope:troll_type = flag:wolverine } + trigger_event = { + id = fp1_yearly.0083 + days = 14 + } + } + ## A stealthy lynx. + else_if = { + limit = { scope:troll_type = flag:lynx } + trigger_event = { + id = fp1_yearly.0084 + days = 14 + } + } + ## An enraged moose. + else = { + trigger_event = { + id = fp1_yearly.0085 + days = 14 + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -10 + has_trait = craven + } + } + } + + # Scope:marshal, take care of this. + option = { + name = fp1_yearly.0071.b + trigger = { exists = scope:marshal } + + # Martial duel for the marshal. + scope:marshal = { + duel = { + skill = martial + value = very_high_skill_rating + # Your marshal and their troops hunt down the beast. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0071.b.tt_success + root = { + send_interface_toast = { + title = fp1_yearly.0071.b.tt_success + left_icon = scope:marshal + # Huzzah! Everyone's a hero! + scope:marshal = { add_prestige = major_prestige_gain } + add_prestige = medium_prestige_gain + } + } + } + # The beast eludes scope:marshal and continues to stalk the province. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0071.b.tt_failure + root = { + send_interface_toast = { + title = fp1_yearly.0071.b.tt_failure + left_icon = scope:marshal + # Welp, that's a lot of failure involved for everyone. + scope:marshal = { add_prestige = major_prestige_loss } + add_prestige = medium_prestige_loss + # Capital_county isn't happy. + fp1_0071_apply_hungry_troll_modifier_effect = yes + } + } + } + } + } + + stress_impact = { + craven = minor_stress_impact_loss + lazy = medium_stress_impact_loss + brave = minor_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = craven + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + } + } + + # It's probably just a bear. Deal with it yourselves, cravens. + option = { + name = fp1_yearly.0071.c + + # Gain some prestige for your toughness. + add_prestige = minor_prestige_gain + # But your capital county is upset. + fp1_0071_apply_hungry_troll_modifier_effect = yes + + stress_impact = { + cynical = minor_stress_impact_loss + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = cynical + } + modifier = { # Weight up for stress. + add = 20 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -20 + has_trait = brave + } + } + } +} + +scripted_effect fp1_0081_invalidation_toast_effect = { + send_interface_toast = { + title = fp1_yearly.0081.hunt_invalidated + left_icon = root + custom_tooltip = fp1_yearly.0081.hunt_invalidated.tt + } +} + +scripted_effect fp1_0081_troll_duel_victory_effect = { + # Add unique character modifier. + add_character_modifier = { + modifier = $MODIFIER$ + years = 20 + } + # And prestige. + add_prestige = major_prestige_gain + # Low chance for characters to become styled "Troll-Slayer". + if = { + limit = { + has_any_nickname = no + AND = { + has_bad_nickname = yes + is_ai = yes + } + } + random = { + chance = 25 + give_nickname = nick_troll_slayer + } + } + # Or automatically if they're players with bad nicknames. + else_if = { + limit = { + has_bad_nickname = yes + is_ai = no + } + give_nickname = nick_troll_slayer + } +} + +scripted_effect fp1_0081_troll_duel_effect = { + duel = { + skill = prowess + value = high_skill_rating + # You murderise the animal. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = $SUCCESS_TITLE$ + send_interface_toast = { + title = $SUCCESS_TITLE$ + left_icon = root + # Apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = $MODIFIER$ } + } + } + # The animal wounds you and your retinue carries you off. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = $FAILURE_TITLE$ + send_interface_toast = { + title = $FAILURE_TITLE$ + left_icon = root + # Capital_county is unhappy. + fp1_0071_apply_hungry_troll_modifier_effect = yes + # The beast kills you. + death = { death_reason = $REASON$ } + } + } + } +} + +scripted_effect fp1_0081_troll_duel_alternate_effect = { + duel = { + skill = $SKILL$ + value = high_skill_rating + # You murderise the animal. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = $SUCCESS_TITLE$ + send_interface_toast = { + title = $SUCCESS_TITLE$ + left_icon = root + # Apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = $MODIFIER$ } + } + } + # The animal wounds you and your retinue carries you off. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = $FAILURE_TITLE$ + send_interface_toast = { + title = $FAILURE_TITLE$ + left_icon = root + # The beast merely maims you. + custom_tooltip = $FAILURE_TITLE$.tt + hidden_effect = { maimed_in_battle_effect = yes } + # Capital_county is unhappy. + fp1_0071_apply_hungry_troll_modifier_effect = yes + } + } + } +} + +scripted_effect fp1_0081_flee_option_effect = { + # Lose prestige. + add_prestige = medium_prestige_loss + # Your capital county doesn't do too well, either. + fp1_0071_apply_hungry_troll_modifier_effect = yes +} + +# Troll: towering bear. +fp1_yearly.0081 = { + type = character_event + title = fp1_yearly.0081.t + desc = fp1_yearly.0081.desc + theme = hunting + left_portrait = { + character = root + animation = shock + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + # Must be a tribal... + government_has_flag = government_is_tribal + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + on_trigger_fail = { fp1_0081_invalidation_toast_effect = yes } + + immediate = { play_music_cue = "mx_cue_combat_stinger" } + + # Charge in, blade swinging. + option = { + name = fp1_yearly.0081.a + trigger = { + NOT = { has_trait = berserker } + } + + # Risky prowess duel. + fp1_0081_troll_duel_effect = { + SUCCESS_TITLE = fp1_yearly.0081.a.tt_success + FAILURE_TITLE = fp1_yearly.0081.a.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_bear_modifier + REASON = death_bear + } + + #We need to check that they didn't die - if we apply stress to a dead character the error-log complains + if = { + limit = { + is_alive = yes + } + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # (Berserker) Auto-win due to Hulkery. + option = { + name = fp1_yearly.0081.b + trigger = { has_trait = berserker } + trait = berserker + + # Explain what's happening. + custom_tooltip = fp1_yearly.0081.b.tt + # And apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = fp1_yearly_0071_troll_victory_bear_modifier } + + stress_impact = { + berserker = massive_stress_impact_loss + wrathful = major_stress_impact_loss + calm = major_stress_impact_gain + } + ai_chance = { + # The AI should basically always take this option, since it's both an automatic win and something representing a sudden & total loss of control. + base = 10000 + } + } + + # Diplomacy: at it, Wolves of [Capital]! + option = { + name = fp1_yearly.0081.c + + # Risky diplomacy duel. + fp1_0081_troll_duel_alternate_effect = { + SKILL = diplomacy + SUCCESS_TITLE = fp1_yearly.0081.c.tt_success + FAILURE_TITLE = fp1_yearly.0081.c.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_bear_modifier + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # FLEE! + option = { + name = fp1_yearly.0081.d + + # Apply flee effects. + fp1_0081_flee_option_effect = yes + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress; weight up even further for cravens not wanting to immediately die. + add = 1000 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# Troll: ancient wolf. +fp1_yearly.0082 = { + type = character_event + title = fp1_yearly.0082.t + desc = fp1_yearly.0082.desc + theme = hunting + left_portrait = { + character = root + animation = shock + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + # Must be a tribal... + government_has_flag = government_is_tribal + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + on_trigger_fail = { fp1_0081_invalidation_toast_effect = yes } + + immediate = { play_music_cue = "mx_cue_combat_stinger" } + + # Charge in, blade swinging. + option = { + name = fp1_yearly.0082.a + trigger = { + NOT = { has_trait = berserker } + } + + # Risky prowess duel. + fp1_0081_troll_duel_effect = { + SUCCESS_TITLE = fp1_yearly.0082.a.tt_success + FAILURE_TITLE = fp1_yearly.0082.a.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_wolf_modifier + REASON = death_wolf + } + + #We need to check that they didn't die - if we apply stress to a dead character the error-log complains + if = { + limit = { + is_alive = yes + } + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # (Berserker) Auto-win due to Hulkery. + option = { + name = fp1_yearly.0082.b + trigger = { has_trait = berserker } + trait = berserker + + # Explain what's happening. + custom_tooltip = fp1_yearly.0082.b.tt + # And apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = fp1_yearly_0071_troll_victory_wolf_modifier } + + stress_impact = { + berserker = massive_stress_impact_loss + wrathful = major_stress_impact_loss + calm = major_stress_impact_gain + } + ai_chance = { + # The AI should basically always take this option, since it's both an automatic win and something representing a sudden & total loss of control. + base = 10000 + } + } + + # Martial: rally! Form a circle! + option = { + name = fp1_yearly.0082.c + + # Risky martial duel. + fp1_0081_troll_duel_alternate_effect = { + SKILL = martial + SUCCESS_TITLE = fp1_yearly.0082.c.tt_success + FAILURE_TITLE = fp1_yearly.0082.c.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_wolf_modifier + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # FLEE! + option = { + name = fp1_yearly.0082.d + + # Apply flee effects. + fp1_0081_flee_option_effect = yes + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress; weight up even further for cravens not wanting to immediately die. + add = 1000 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# Troll: colossal wolverine. +fp1_yearly.0083 = { + type = character_event + title = fp1_yearly.0083.t + desc = fp1_yearly.0083.desc + theme = hunting + left_portrait = { + character = root + animation = shock + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + # Must be a tribal... + government_has_flag = government_is_tribal + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + on_trigger_fail = { fp1_0081_invalidation_toast_effect = yes } + + immediate = { play_music_cue = "mx_cue_combat_stinger" } + + # Charge in, blade swinging. + option = { + name = fp1_yearly.0083.a + trigger = { + NOT = { has_trait = berserker } + } + + # Risky prowess duel. + fp1_0081_troll_duel_effect = { + SUCCESS_TITLE = fp1_yearly.0083.a.tt_success + FAILURE_TITLE = fp1_yearly.0083.a.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_wolverine_modifier + REASON = death_wolverine + } + + #We need to check that they didn't die - if we apply stress to a dead character the error-log complains + if = { + limit = { + is_alive = yes + } + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # (Berserker) Auto-win due to Hulkery. + option = { + name = fp1_yearly.0083.b + trigger = { has_trait = berserker } + trait = berserker + + # Explain what's happening. + custom_tooltip = fp1_yearly.0083.b.tt + # And apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = fp1_yearly_0071_troll_victory_wolverine_modifier } + + stress_impact = { + berserker = massive_stress_impact_loss + wrathful = major_stress_impact_loss + calm = major_stress_impact_gain + } + ai_chance = { + # The AI should basically always take this option, since it's both an automatic win and something representing a sudden & total loss of control. + base = 10000 + } + } + + # Stewardship: there's a lodge near here, fall back for reinforcements! + option = { + name = fp1_yearly.0083.c + + # Risky stewardship duel. + fp1_0081_troll_duel_alternate_effect = { + SKILL = stewardship + SUCCESS_TITLE = fp1_yearly.0083.c.tt_success + FAILURE_TITLE = fp1_yearly.0083.c.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_wolverine_modifier + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # FLEE! + option = { + name = fp1_yearly.0083.d + + # Apply flee effects. + fp1_0081_flee_option_effect = yes + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress; weight up even further for cravens not wanting to immediately die. + add = 1000 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# Troll: stealthy lynx. +fp1_yearly.0084 = { + type = character_event + title = fp1_yearly.0084.t + desc = fp1_yearly.0084.desc + theme = hunting + left_portrait = { + character = root + animation = shock + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + # Must be a tribal... + government_has_flag = government_is_tribal + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + on_trigger_fail = { fp1_0081_invalidation_toast_effect = yes } + + immediate = { play_music_cue = "mx_cue_combat_stinger" } + + # Charge in, blade swinging. + option = { + name = fp1_yearly.0084.a + trigger = { + NOT = { has_trait = berserker } + } + + # Risky prowess duel. + fp1_0081_troll_duel_effect = { + SUCCESS_TITLE = fp1_yearly.0084.a.tt_success + FAILURE_TITLE = fp1_yearly.0084.a.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_lynx_modifier + REASON = death_lynx + } + + #We need to check that they didn't die - if we apply stress to a dead character the error-log complains + if = { + limit = { + is_alive = yes + } + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # (Berserker) Auto-win due to Hulkery. + option = { + name = fp1_yearly.0084.b + trigger = { has_trait = berserker } + trait = berserker + + # Explain what's happening. + custom_tooltip = fp1_yearly.0084.b.tt + # And apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = fp1_yearly_0071_troll_victory_lynx_modifier } + + stress_impact = { + berserker = massive_stress_impact_loss + wrathful = major_stress_impact_loss + calm = major_stress_impact_gain + } + ai_chance = { + # The AI should basically always take this option, since it's both an automatic win and something representing a sudden & total loss of control. + base = 10000 + } + } + + # Intrigue: quiet; you two flank it, we'll flush it towards you... + option = { + name = fp1_yearly.0084.c + + # Risky diplomacy duel. + fp1_0081_troll_duel_alternate_effect = { + SKILL = intrigue + SUCCESS_TITLE = fp1_yearly.0084.c.tt_success + FAILURE_TITLE = fp1_yearly.0084.c.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_lynx_modifier + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # FLEE! + option = { + name = fp1_yearly.0084.d + + # Apply flee effects. + fp1_0081_flee_option_effect = yes + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress; weight up even further for cravens not wanting to immediately die. + add = 1000 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# Troll: enraged moose. +fp1_yearly.0085 = { + type = character_event + title = fp1_yearly.0085.t + desc = { + # Account for sibling violence. + first_valid = { + triggered_desc = { + trigger = { exists = scope:loveli_lakes } + desc = fp1_yearly.0085.desc.loveli_lakes + } + desc = fp1_yearly.0085.desc.fallback + } + } + theme = hunting + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:loveli_lakes + animation = anger + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + # Must be a tribal... + government_has_flag = government_is_tribal + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + on_trigger_fail = { fp1_0081_invalidation_toast_effect = yes } + + immediate = { play_music_cue = "mx_cue_combat_stinger" } + + # Charge in, blade swinging. + option = { + name = fp1_yearly.0085.a + trigger = { + NOT = { has_trait = berserker } + } + + # Risky prowess duel. + fp1_0081_troll_duel_effect = { + SUCCESS_TITLE = fp1_yearly.0085.a.tt_success + FAILURE_TITLE = fp1_yearly.0085.a.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_moose_modifier + REASON = death_moose + } + + #We need to check that they didn't die - if we apply stress to a dead character the error-log complains + if = { + limit = { + is_alive = yes + } + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # (Berserker) Auto-win due to Hulkery. + option = { + name = fp1_yearly.0085.b + trigger = { has_trait = berserker } + trait = berserker + + # Explain what's happening. + custom_tooltip = fp1_yearly.0085.b.tt + # And apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = fp1_yearly_0071_troll_victory_moose_modifier } + + stress_impact = { + berserker = massive_stress_impact_loss + wrathful = major_stress_impact_loss + calm = major_stress_impact_gain + } + ai_chance = { + # The AI should basically always take this option, since it's both an automatic win and something representing a sudden & total loss of control. + base = 10000 + } + } + + # Learning: remember its weak spot, spears and bows only! + option = { + name = fp1_yearly.0085.c + + # Risky learning duel. + fp1_0081_troll_duel_alternate_effect = { + SKILL = learning + SUCCESS_TITLE = fp1_yearly.0085.c.tt_success + FAILURE_TITLE = fp1_yearly.0085.c.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_moose_modifier + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # FLEE! + option = { + name = fp1_yearly.0085.d + + # Apply flee effects. + fp1_0081_flee_option_effect = yes + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress; weight up even further for cravens not wanting to immediately die. + add = 1000 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +################################################## +# A Ship fit for a [ROOT.Char.GetTitleAsName] +# by Ewan Cowhig Croft +# 0090 - 0100 +################################################## + +# Commissioning a Longship for Yourself +fp1_yearly.0091 = { + type = character_event + title = fp1_yearly.0091.t + desc = fp1_yearly.0091.desc + theme = martial + left_portrait = { + character = root + animation = personality_rational + } + override_background = { reference = fp1_beached_longships } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0091 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_coastal_norse_tribal = yes + } + + weight_multiplier = { + base = 1 + + # Weight up for having sea-faring traits. + modifier = { + add = 0.5 + has_trait = viking + } + modifier = { + add = 0.5 + has_trait = adventurer + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0091 + days = 10950 + } + } + + # A leviathan, to carry my spoils! + option = { + name = fp1_yearly.0091.a + trigger = { + can_make_expensive_purchase_trigger = { PRICE = fp1_0091_standard_ship_gold_cost } + } + + # Get a modifier enhancing loot capacity. + add_character_modifier = { + modifier = fp1_flagship_leviathan_modifier + years = 10 + } + # And charge the gold cost. + remove_short_term_gold = major_gold_value + + stress_impact = { + profligate = massive_stress_impact_loss + ambitious = major_stress_impact_loss + content = major_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight up for stress. + add = 50 + has_trait = profligate + } + modifier = { # Weight up for stress. + add = 30 + has_trait = ambitious + } + modifier = { # Weight down for stress. + add = -30 + has_trait = content + } + modifier = { # Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + # A monster, to intimidate my vassals! + option = { + name = fp1_yearly.0091.b + trigger = { + can_make_expensive_purchase_trigger = { PRICE = fp1_0091_standard_ship_gold_cost } + } + + # Get a modifier giving more tax from cowed vassals. + add_character_modifier = { + modifier = fp1_flagship_monster_modifier + years = 10 + } + # And charge the gold cost. + remove_short_term_gold = major_gold_value + + stress_impact = { + profligate = massive_stress_impact_loss + callous = major_stress_impact_loss + sadistic = major_stress_impact_loss + compassionate = major_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight up for stress. + add = 50 + has_trait = profligate + } + modifier = { # Weight up for stress. + add = 30 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 30 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + # A dragon, to roar my name! + option = { + name = fp1_yearly.0091.c + trigger = { + can_make_expensive_purchase_trigger = { PRICE = fp1_0091_standard_ship_gold_cost } + } + + # Get a modifier granting diplomacy per prestige level + add_character_modifier = { + modifier = fp1_flagship_dragon_modifier + years = 10 + } + # And charge the gold cost. + remove_short_term_gold = major_gold_value + + stress_impact = { + profligate = massive_stress_impact_loss + arrogant = major_stress_impact_loss + humble = major_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight up for stress. + add = 50 + has_trait = profligate + } + modifier = { # Weight up for stress. + add = 30 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -30 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + # These are all ludicrously costly... + option = { + name = fp1_yearly.0091.d + + # Consiliatory stress loss for hanging on to your cash. + ## Stress loss handled in stress impact. + + stress_impact = { + base = minor_stress_loss + greedy = medium_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = -0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = arrogant + } + } + } +} + +################################################## +# A Guest/Courtier Challenges you to Riddles +# by Ewan Cowhig Croft +# 0101 - 0110 +################################################## + +scripted_trigger fp1_valid_riddler_at_court_trigger = { + # We want characters of minor or major interest, ideally. + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + # And we want to make sure they're available and can speak. + is_available_ai_adult = yes +} + +# Someone in your court challenges you to an idle game of riddles. +fp1_yearly.0101 = { + type = character_event + title = fp1_yearly.0101.t + desc = fp1_yearly.0101.desc + theme = diplomacy + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:riddler + animation = schadenfreude + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0101 } + is_landed = yes + # Valid for North Germanics only. + culture = { has_cultural_pillar = heritage_north_germanic } + # Has a valid courtier/guest who can quiz you. + any_courtier_or_guest = { fp1_valid_riddler_at_court_trigger = yes } + # Doesn't have an established extreme hatred of riddles. + NOT = { has_character_flag = fp1_yearly_0101_really_hates_riddles } + } + + weight_multiplier = { + base = 1 + + # Weight up for traits that make you a known woman/man of letters. + modifier = { + add = 0.5 + has_trait = journaller + } + modifier = { + add = 0.5 + has_trait = scholar + } + modifier = { + add = 0.5 + has_trait = theologian + } + modifier = { + add = 0.5 + has_trait = administrator + } + modifier = { + add = 0.5 + has_trait = architect + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0101 + days = 1825 + } + # Designate a suitable riddler. + ## First, we grab all possibles & sort them into a list. + every_courtier_or_guest = { + limit = { fp1_valid_riddler_at_court_trigger = yes } + add_to_list = potential_valid_riddlers_list + } + ## Then, we order that list appropriately. + ordered_in_list = { + list = potential_valid_riddlers_list + order_by = { value = fp1_best_available_riddler_value } + save_scope_as = riddler + } + } + + # Entertaining, I'll play! [diplo] + option = { + name = fp1_yearly.0101.a + + # Duel the courtier for it. + duel = { + skill = diplomacy + target = scope:riddler + # You win the game! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0101.a.tt_success + send_interface_toast = { + title = fp1_yearly.0101.a.tt_success + left_icon = scope:riddler + # Gain opinion with your court for participating. + every_courtier_or_guest = { + limit = { is_available_adult = yes } + custom = fp1_yearly.0101.a.every_courtier_and_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 20 + } + } + # And a little prestige as a side-prize. + add_prestige = miniscule_prestige_gain + } + } + # You lose the game! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0101.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0101.a.tt_failure + left_icon = scope:riddler + # Gain opinion with your court for participating. + every_courtier_or_guest = { + limit = { is_available_adult = yes } + custom = fp1_yearly.0101.a.every_courtier_and_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 20 + } + } + # And lose a little prestige. + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_loss + shy = minor_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.75 + ai_boldness = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight up for stress. + add = 20 + has_trait = gregarious + } + modifier = { # Weight down for stress. + add = -10 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = impatient + } + } + } + + # Entertaining, I'll play! [learning] + option = { + name = fp1_yearly.0101.b + + duel = { + skill = learning + target = scope:riddler + # You win the game! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0101.a.tt_success + send_interface_toast = { + title = fp1_yearly.0101.a.tt_success + left_icon = scope:riddler + # Gain opinion with your court for participating. + every_courtier_or_guest = { + limit = { is_available_adult = yes } + custom = fp1_yearly.0101.a.every_courtier_and_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 20 + } + } + # And a little prestige as a side-prize. + add_prestige = miniscule_prestige_gain + } + } + # You lose the game! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0101.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0101.a.tt_failure + left_icon = scope:riddler + # Gain opinion with your court for participating. + every_courtier_or_guest = { + limit = { is_available_adult = yes } + custom = fp1_yearly.0101.a.every_courtier_and_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 20 + } + } + # And lose a little prestige. + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_loss + shy = minor_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.75 + ai_boldness = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight up for stress. + add = 20 + has_trait = gregarious + } + modifier = { # Weight down for stress. + add = -10 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = impatient + } + } + } + + # Here's one: who has no brain and belongs in the dungeon? + option = { + name = fp1_yearly.0101.c + + # Toss them in the dungeon. + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:riddler + } + hidden_effect = { + # Make sure that it's _definitely_ the dungeon. + scope:riddler = { change_prison_type = dungeon } + # And that no one will ever try to get you involved in a game ever again. + add_character_flag = fp1_yearly_0101_really_hates_riddles + } + # Gain some dread to balance out that tyranny. + add_dread = medium_dread_gain + # People may remember your over-reaction... + if = { + limit = { has_any_nickname = no } + custom_tooltip = fp1_yearly.0101.c.tt + hidden_effect = { + random_list = { + 60 = { + # The court dares not mock you. + } + 40 = { + # You hear a whispered nickname behind your back... + random_list = { + 20 = { + send_interface_toast = { + title = fp1_yearly.0101.c.tt_nickname + left_icon = root + give_nickname = nick_the_stonefaced + } + } + 20 = { + send_interface_toast = { + title = fp1_yearly.0101.c.tt_nickname + left_icon = root + give_nickname = nick_the_dry + } + } + 20 = { + send_interface_toast = { + title = fp1_yearly.0101.c.tt_nickname + left_icon = root + give_nickname = nick_the_joyless + } + } + 20 = { + send_interface_toast = { + title = fp1_yearly.0101.c.tt_nickname + left_icon = root + give_nickname = nick_lacks_laughs + } + } + 20 = { + send_interface_toast = { + title = fp1_yearly.0101.c.tt_nickname + left_icon = root + give_nickname = nick_the_dull + } + } + } + } + } + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + impatient = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight up for stress. + add = 20 + has_trait = impatient + } + modifier = { # Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = gregarious + } + modifier = { # Weight down for stress. + add = -20 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -20 + has_trait = patient + } + } + } + + # Thanks, but I'm a [title], and have things to do. + option = { + name = fp1_yearly.0101.d + + # Lose a little prestige, but less than if you were beaten. + add_prestige = miniscule_prestige_loss + # Scope:riddler is disappointed in you. + scope:riddler = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + stress_impact = { + shy = minor_stress_impact_loss + impatient = medium_stress_impact_loss + arrogant = minor_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = shy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = impatient + } + modifier = { # Weight down for stress. + add = -10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -20 + has_trait = gregarious + } + } + } +} + +################################################## +# Accursed +# by Ewan Cowhig Croft +# 0111 - 0120 +################################################## + +scripted_trigger fp1_0111_superstitious_courtier_trigger = { + # Basic checks. + is_available_ai_adult = yes + OR = { + fp1_is_norse = yes + religion = religion:germanic_religion + } + # Rule out a few key traits. + NOR = { + # Cynical characters don't believe. + has_trait = cynical + # Brave characters don't succumb to threats. + has_trait = brave + # Trusting characters believe the gods or their friends will help them. + has_trait = trusting + } + # Witches aren't fussed: they're confident in their counterspells. + NOR = { + has_trait = witch + any_secret = { type = secret_witch } + } + # Anyone who's already been cursed is about as screwed as they can be. + NOT = { has_character_modifier = fp1_cursed_by_nithing_pole_modifier } + # And we ideally want to be able to add a strong hook, at least. + save_temporary_scope_as = current_courtier + root = { + can_add_hook = { + target = scope:current_courtier + type = loyalty_hook + } + } +} + +scripted_trigger fp1_0111_suspicious_courtier_trigger = { + # Basic checks. + is_available_ai_adult = yes + this != scope:accursed + OR = { + fp1_is_norse = yes + religion = religion:germanic_religion + } + # Would-be sorcerers need to either know what they're doing, or else have absolutely no clue. + OR = { + intrigue >= fp1_0111_sorcerer_intrigue_high + learning >= fp1_0111_sorcerer_learning_high + intrigue <= fp1_0111_sorcerer_intrigue_low + learning <= fp1_0111_sorcerer_learning_low + } + # ... and to have at least two of various pairs of matched traits. + calc_true_if = { + amount >= 2 + OR = { + has_trait = lazy + has_trait = arbitrary + } + OR = { + has_trait = wrathful + has_trait = impatient + } + OR = { + has_trait = calm + has_trait = patient + } + OR = { + has_trait = sadistic + has_trait = arrogant + } + OR = { + has_trait = callous + has_trait = ambitious + } + OR = { + has_trait = deceitful + has_trait = craven + } + OR = { + has_trait = brave + has_trait = trusting + } + OR = { + has_trait = paranoid + has_trait = vengeful + } + } + # Filter out known witches: *way* too obvious. + NOT = { has_trait = witch } +} + +scripted_trigger fp1_0111_discountable_courtier_trigger = { + # Basic checks. + is_available_ai_adult = yes + this != scope:accursed + OR = { + fp1_is_norse = yes + religion = religion:germanic_religion + } + # Discountables must not meet minimum requirements to be suspicious. + fp1_0111_suspicious_courtier_trigger = no + # On top of that, as long as they have at least one disqualifying statistic, they're gucci. + OR = { + has_trait = gallant + has_trait = honest + has_trait = just + has_trait = compassionate + has_trait = forgiving + # Zealous characters require witchcraft to be at least somewhat shameful. + AND = { + has_trait = zealous + faith = { + NOT = { has_doctrine_parameter = witchcraft_accepted } + } + } + } + # Ensure that no witches are thrown into the discountables pile, as that's just cruel. + NOR = { + has_trait = witch + any_secret = { type = secret_witch } + } +} + +scripted_effect fp1_0111_randomise_sorcerer_identity_effect = { + random_list = { + 100 = { + trigger = { + NOT = { exists = scope:suspect_a } + } + save_scope_as = suspect_a + } + 100 = { + trigger = { + NOT = { exists = scope:suspect_b } + } + save_scope_as = suspect_b + } + 100 = { + trigger = { + NOT = { exists = scope:suspect_c } + } + save_scope_as = suspect_c + } + } +} + +scripted_effect fp1_0111_accursed_receives_curse_effect = { + # Firstly, they gain a *colossal* amount of stress. + add_stress = monumental_stress_gain + # Then they take a negative modifier. + add_character_modifier = { + modifier = fp1_cursed_by_nithing_pole_modifier + years = 20 + } + # And become paranoid if possible. + if = { + limit = { + number_of_personality_traits < personality_trait_limit + NOR = { + has_trait = trusting + has_trait = paranoid + } + } + add_trait = paranoid + } +} + +scripted_effect fp1_0111_correct_accusation_effect = { + # Give $CHARACTER$ a witch secret & expose it. + $CHARACTER$ = { + # Hide the witch effect, so that you can't just *see* who the witch is by who'll be exposed. + hidden_effect = { + random_secret = { + type = secret_witch + expose_secret = root + } + } + # Simply show a nice, easy tooltip. + show_as_tooltip = { add_trait = witch } + } + # Rightfully imprison them. + rightfully_imprison_character_effect = { + TARGET = $CHARACTER$ + IMPRISONER = root + } + # Gain a nicely chonky chunk of prestige. + add_prestige = medium_prestige_gain + # Receive a strong hook on, and oodles of opinion with, scope:accursed. + add_hook = { + type = loyalty_hook + target = scope:accursed + } + reverse_add_opinion = { + target = scope:accursed + modifier = relieved_opinion + opinion = 75 + } +} + +scripted_effect fp1_0111_false_accusation_effect = { + # $CHARACTER$ is, understandably, upset. + reverse_add_opinion = { + target = $CHARACTER$ + modifier = falsely_accused + } + # And you lose some prestige for your failure. + add_prestige = medium_prestige_loss + # Scope:accursed has a melt-down. + scope:accursed = { fp1_0111_accursed_receives_curse_effect = yes } +} + +scripted_effect fp1_0111_select_accusation_effect = { + # Inform root about the potential consequences of their guess. + show_as_tooltip = { + random_list = { + # Guessed correctly. + 100 = { + show_chance = no + desc = fp1_yearly.0111.tt.correct_guess + fp1_0111_correct_accusation_effect = { CHARACTER = $CHARACTER$ } + } + # Guessed incorrectly. + 100 = { + show_chance = no + desc = fp1_yearly.0111.tt.wrong_guess + fp1_0111_false_accusation_effect = { CHARACTER = $CHARACTER$ } + } + } + } + # And handle the actual results. + ## Guessed correctly! + if = { + limit = { $CHARACTER$ = scope:culprit } + send_interface_toast = { + title = fp1_yearly.0111.tt.correct_accusation + left_icon = $CHARACTER$ + right_icon = scope:accursed + # Calculate actual effects: we have to keep these hidden so as not to spoil the mystery. + hidden_effect = { + fp1_0111_correct_accusation_effect = { CHARACTER = $CHARACTER$ } + } + # And throw in a tooltip to make the toast seem less empty. + custom_tooltip = fp1_yearly.0111.tt.correct_accusation.tt + } + } + ## Otherwise, you dun goofed. + else = { + send_interface_toast = { + title = fp1_yearly.0111.tt.false_accusation + left_icon = $CHARACTER$ + right_icon = scope:accursed + # Calculate actual effects: we have to keep these hidden so as not to spoil the mystery. + hidden_effect = { + fp1_0111_false_accusation_effect = { CHARACTER = $CHARACTER$ } + } + # And throw in a tooltip to make the toast seem less empty. + custom_tooltip = fp1_yearly.0111.tt.false_accusation.tt + } + } +} + +# Nithing Pole Raised Against Courtier +fp1_yearly.0111 = { + type = character_event + title = fp1_yearly.0111.t + desc = { + desc = fp1_yearly.0111.desc.intro + # Skill clue. + first_valid = { + triggered_desc = { + trigger = { + scope:clue_skill = flag:intrigue + intrigue >= fp1_0111_sorcerer_intrigue_high + } + desc = fp1_yearly.0111.desc.skill.intrigue_high + } + triggered_desc = { + trigger = { + scope:clue_skill = flag:learning + learning >= fp1_0111_sorcerer_learning_high + } + desc = fp1_yearly.0111.desc.skill.learning_high + } + triggered_desc = { + trigger = { + scope:clue_skill = flag:intrigue + intrigue <= fp1_0111_sorcerer_intrigue_low + } + desc = fp1_yearly.0111.desc.skill.intrigue_low + } + triggered_desc = { + trigger = { + scope:clue_skill = flag:learning + learning <= fp1_0111_sorcerer_learning_low + } + desc = fp1_yearly.0111.desc.skill.learning_low + } + desc = fp1_yearly.0111.desc.skill.fallback + } + # Grammatical stop. + desc = fp1_yearly.0111.desc.first_connector + # Trait clue #1. + first_valid = { + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:lazy_or_arbitrary } + desc = fp1_yearly.0111.desc.trait_1.lazy_or_arbitrary + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:wrathful_or_impatient } + desc = fp1_yearly.0111.desc.trait_1.wrathful_or_impatient + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:calm_or_patient } + desc = fp1_yearly.0111.desc.trait_1.calm_or_patient + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:sadistic_or_arrogant } + desc = fp1_yearly.0111.desc.trait_1.sadistic_or_arrogant + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:callous_or_ambitious } + desc = fp1_yearly.0111.desc.trait_1.callous_or_ambitious + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:deceitful_or_craven } + desc = fp1_yearly.0111.desc.trait_1.deceitful_or_craven + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:brave_or_trusting } + desc = fp1_yearly.0111.desc.trait_1.brave_or_trusting + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:paranoid_or_vengeful } + desc = fp1_yearly.0111.desc.trait_1.paranoid_or_vengeful + } + desc = fp1_yearly.0111.desc.trait_1.fallback + } + # Grammatical stop. + desc = fp1_yearly.0111.desc.second_connector + # Trait clue #2. + first_valid = { + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:lazy_or_arbitrary } + desc = fp1_yearly.0111.desc.trait_2.lazy_or_arbitrary + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:wrathful_or_impatient } + desc = fp1_yearly.0111.desc.trait_2.wrathful_or_impatient + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:calm_or_patient } + desc = fp1_yearly.0111.desc.trait_2.calm_or_patient + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:sadistic_or_arrogant } + desc = fp1_yearly.0111.desc.trait_2.sadistic_or_arrogant + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:callous_or_ambitious } + desc = fp1_yearly.0111.desc.trait_2.callous_or_ambitious + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:deceitful_or_craven } + desc = fp1_yearly.0111.desc.trait_2.deceitful_or_craven + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:brave_or_trusting } + desc = fp1_yearly.0111.desc.trait_2.brave_or_trusting + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:paranoid_or_vengeful } + desc = fp1_yearly.0111.desc.trait_2.paranoid_or_vengeful + } + desc = fp1_yearly.0111.desc.trait_2.fallback + } + desc = fp1_yearly.0111.desc.outro + } + theme = intrigue + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:accursed + animation = fear + } + lower_left_portrait = scope:suspect_a + lower_center_portrait = scope:suspect_b + lower_right_portrait = scope:suspect_c + override_background = { reference = corridor_night } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0111 } + is_landed = yes + # Filter to flavour-appropriate characters. + faith = { + NOT = { has_doctrine_parameter = witchcraft_accepted } + } + OR = { + fp1_is_norse_tribal = yes + # Allow this after feudalisation, but not for kings and emperors with more important things going on. + AND = { + fp1_is_norse = yes + highest_held_title_tier <= tier_duchy + } + } + # Make sure we have a suitably superstitious character for scope:courtier. + any_courtier = { + fp1_0111_superstitious_courtier_trigger = yes + save_temporary_scope_as = accursed + } + # And that they've got enemies available. + any_courtier_or_guest = { + # Count one more than we need so that we've still got a valid scope:accursed even if they accidentally take up a suspect slot. + count >= 4 + fp1_0111_suspicious_courtier_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Witches see more of this type of thing in their court. + modifier = { + add = 1 + has_trait = witch + } + # And zealots are more likely to be appealed to by terrified courtiers. + modifier = { + add = 0.5 + has_trait = zealous + } + } + + immediate = { + play_music_cue = "mx_cue_murder" + add_character_flag = { + flag = had_event_fp1_yearly_0111 + days = 7300 + } + # Designate a suitable superstitious courtier. + random_courtier = { + limit = { fp1_0111_superstitious_courtier_trigger = yes } + weight = { + base = 0 + # Weigh up the paranoid. + modifier = { + add = 100 + has_trait = paranoid + } + # Weigh up zealots. + modifier = { + add = 50 + has_trait = zealous + } + # And the vengeful, just a little, for assuming everyone thinks like them. + modifier = { + add = 25 + has_trait = vengeful + } + } + save_scope_as = accursed + } + # Next, grab all valid suspicious courtiers + every_courtier_or_guest = { + limit = { + fp1_0111_suspicious_courtier_trigger = yes + } + add_to_list = suspicious_courtiers_list + } + # And all valid discountables. + every_courtier_or_guest = { + limit = { fp1_0111_discountable_courtier_trigger = yes } + add_to_list = discountable_courtiers_list + } + # Process candidates. + ## First, scope:culprit. + random_in_list = { + list = suspicious_courtiers_list + weight = { + base = 1 + # Weight up anyone with the witch secret for the main suspect. + modifier = { + add = 1000 + any_secret = { type = secret_witch } + } + } + save_scope_as = culprit + } + ## Then, scope:red_herring. + random_in_list = { + list = suspicious_courtiers_list + limit = { + NOR = { + this = scope:culprit + # Forbid secret witches: that's *too* much of a red herring. + any_secret = { type = secret_witch } + } + } + save_scope_as = red_herring + } + ## Try for a scope:discountable. + if = { + limit = { + any_in_list = { + list = discountable_courtiers_list + count >= 1 + } + } + random_in_list = { + list = discountable_courtiers_list + save_scope_as = discountable + } + } + ## If no scope:discountable is available, pick a scope:scarlet_herring. + else = { + random_in_list = { + list = suspicious_courtiers_list + limit = { + NOR = { + this = scope:culprit + this = scope:red_herring + # Forbid secret witches: that's *too* much of a red herring. + any_secret = { type = secret_witch } + } + } + save_scope_as = scarlet_herring + } + } + # Then hand out suspect tags at random, so that it's not just always scope:suspect_a. + ## First, sort scope:culprit. + scope:culprit = { fp1_0111_randomise_sorcerer_identity_effect = yes } + ## Next, scope:red_herring. + scope:red_herring = { fp1_0111_randomise_sorcerer_identity_effect = yes } + ## If we have a scope:discountable, finish with them. + if = { + limit = { exists = scope:discountable } + scope:discountable = { fp1_0111_randomise_sorcerer_identity_effect = yes } + } + ## Otherwise, it's scope:scarlet_herring's turn. + else = { + scope:scarlet_herring = { fp1_0111_randomise_sorcerer_identity_effect = yes } + } + # Process clues. + scope:culprit = { + # First, we pick one of scope:culprit's skills to examine. + ## The base is just a straight 50:50 shot between intrigue & learning, but we weight it a list by education. + random_list = { + # Intrigue. + 1000 = { + save_scope_value_as = { + name = clue_skill + value = flag:intrigue + } + # Weight up for education. + modifier = { + add = 250 + has_trait_rank = { + trait = education_intrigue + rank = 1 + } + } + modifier = { + add = 500 + has_trait_rank = { + trait = education_intrigue + rank = 2 + } + } + modifier = { + add = 750 + has_trait_rank = { + trait = education_intrigue + rank = 3 + } + } + modifier = { + add = 1000 + has_trait_rank = { + trait = education_intrigue + rank >= 4 + } + } + } + # Learning. + 1000 = { + save_scope_value_as = { + name = clue_skill + value = flag:learning + } + # Weight up for education. + modifier = { + add = 250 + has_trait_rank = { + trait = education_learning + rank = 1 + } + } + modifier = { + add = 500 + has_trait_rank = { + trait = education_learning + rank = 2 + } + } + modifier = { + add = 750 + has_trait_rank = { + trait = education_learning + rank = 3 + } + } + modifier = { + add = 1000 + has_trait_rank = { + trait = education_learning + rank >= 4 + } + } + } + } + # Then, we want to look through their traits and pick a first pair to comment on. + ## Eight options of 12.5% each. + random_list = { + # Lazy or arbitrary + 125 = { + trigger = { + OR = { + has_trait = lazy + has_trait = arbitrary + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:lazy_or_arbitrary + } + } + # Wrathful or impatient. + 125 = { + trigger = { + OR = { + has_trait = wrathful + has_trait = impatient + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:wrathful_or_impatient + } + } + # Calm or patient. + 125 = { + trigger = { + OR = { + has_trait = calm + has_trait = patient + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:calm_or_patient + } + } + # Sadistic or arrogant. + 125 = { + trigger = { + OR = { + has_trait = sadistic + has_trait = arrogant + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:sadistic_or_arrogant + } + } + # Callous or ambitious. + 125 = { + trigger = { + OR = { + has_trait = callous + has_trait = ambitious + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:callous_or_ambitious + } + } + # Deceitful or craven. + 125 = { + trigger = { + OR = { + has_trait = deceitful + has_trait = craven + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:deceitful_or_craven + } + } + # Brave or trusting. + 125 = { + trigger = { + OR = { + has_trait = brave + has_trait = trusting + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:brave_or_trusting + } + } + # Paranoid or vengeful. + 125 = { + trigger = { + OR = { + has_trait = paranoid + has_trait = vengeful + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:paranoid_or_vengeful + } + } + } + # Finally, pick a secondary trait pairing. + ## Technically eight options of 12.5% each, but one of these is discounted for the first pairing, so it's actually seven pairings of 14.3% each. + random_list = { + # Lazy or arbitrary + 125 = { + trigger = { + OR = { + has_trait = lazy + has_trait = arbitrary + } + NOT = { scope:clue_trait_1 = flag:lazy_or_arbitrary } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:lazy_or_arbitrary + } + } + # Wrathful or impatient. + 125 = { + trigger = { + OR = { + has_trait = wrathful + has_trait = impatient + } + NOT = { scope:clue_trait_1 = flag:wrathful_or_impatient } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:wrathful_or_impatient + } + } + # Calm or patient. + 125 = { + trigger = { + OR = { + has_trait = calm + has_trait = patient + } + NOT = { scope:clue_trait_1 = flag:calm_or_patient } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:calm_or_patient + } + } + # Sadistic or arrogant. + 125 = { + trigger = { + OR = { + has_trait = sadistic + has_trait = arrogant + } + NOT = { scope:clue_trait_1 = flag:sadistic_or_arrogant } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:sadistic_or_arrogant + } + } + # Callous or ambitious. + 125 = { + trigger = { + OR = { + has_trait = callous + has_trait = ambitious + } + NOT = { scope:clue_trait_1 = flag:callous_or_ambitious } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:callous_or_ambitious + } + } + # Deceitful or craven. + 125 = { + trigger = { + OR = { + has_trait = deceitful + has_trait = craven + } + NOT = { scope:clue_trait_1 = flag:deceitful_or_craven } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:deceitful_or_craven + } + } + # Brave or trusting. + 125 = { + trigger = { + OR = { + has_trait = brave + has_trait = trusting + } + NOT = { scope:clue_trait_1 = flag:brave_or_trusting } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:brave_or_trusting + } + } + # Paranoid or vengeful. + 125 = { + trigger = { + OR = { + has_trait = paranoid + has_trait = vengeful + } + NOT = { scope:clue_trait_1 = flag:paranoid_or_vengeful } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:paranoid_or_vengeful + } + } + } + } + # Aaaaaaand make scope:culprit an actual witch. + hidden_effect = { + scope:culprit = { give_witch_secret_or_trait_effect = yes } + } + } + + # Scope:suspect_a, clearly. + option = { + name = fp1_yearly.0111.a + + # Display tooltip & apply effects. + fp1_0111_select_accusation_effect = { CHARACTER = scope:suspect_a } + + stress_impact = { + paranoid = major_stress_impact_loss + zealous = major_stress_impact_loss + trusting = major_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = paranoid + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # Scope:suspect_b, I think... + option = { + name = fp1_yearly.0111.b + + # Display tooltip & apply effects. + fp1_0111_select_accusation_effect = { CHARACTER = scope:suspect_b } + + stress_impact = { + paranoid = major_stress_impact_loss + zealous = major_stress_impact_loss + trusting = major_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = paranoid + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # Sounds like scope:suspect_c! + option = { + name = fp1_yearly.0111.c + + # Display tooltip & apply effects. + fp1_0111_select_accusation_effect = { CHARACTER = scope:suspect_c } + + stress_impact = { + paranoid = major_stress_impact_loss + zealous = major_stress_impact_loss + trusting = major_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = paranoid + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # Scope:accursed, it's all in your mind, alright? + option = { + name = fp1_yearly.0111.d + trigger = { + NOT = { has_trait = witch } + } + + # Diplomacy challenge to convince scope:accursed that the nithing pole means nothing. + duel = { + skill = diplomacy + target = scope:accursed + # You talk them down. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0111.d.tt_success + send_interface_toast = { + title = fp1_yearly.0111.d.tt_success + left_icon = scope:accursed + # Gain a favour if possible. + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:accursed + } + } + add_hook = { + type = favor_hook + target = scope:accursed + years = 20 + } + } + # And always a lot of opinion. + reverse_add_opinion = { + target = scope:accursed + modifier = trust_opinion + opinion = 50 + } + # Plus a decent chunk of prestige. + add_prestige = medium_prestige_gain + } + } + # They freak the hell out. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0111.d.tt_failure + send_interface_toast = { + title = fp1_yearly.0111.d.tt_failure + left_icon = scope:accursed + # Scope:accursed has a melt-down. + scope:accursed = { fp1_0111_accursed_receives_curse_effect = yes } + } + } + } + + stress_impact = { + trusting = major_stress_impact_loss + cynical = major_stress_impact_loss + paranoid = major_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_zeal = -0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = trusting + } + modifier = { # Weight up for stress. + add = 30 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -30 + has_trait = paranoid + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + # (Witch) Worry not, I have a counter-spell. + option = { + name = fp1_yearly.0111.e + trigger = { has_trait = witch } + trait = witch + + # Gain a favour if possible. + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:accursed + } + } + add_hook = { + type = favor_hook + target = scope:accursed + years = 20 + } + } + # And always a lot of opinion. + reverse_add_opinion = { + target = scope:accursed + modifier = trust_opinion + opinion = 50 + } + # Plus a decent chunk of prestige. + add_prestige = medium_prestige_gain + + stress_impact = { + trusting = major_stress_impact_loss + cynical = major_stress_impact_loss + paranoid = major_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_zeal = -0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = trusting + } + modifier = { # Weight up for stress. + add = 30 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -30 + has_trait = paranoid + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } +} + + + + + + + + + + + + +################################################## +# FLAVOUR YEARLIES + +################################################## +# FLAVOUR YEARLIES EFFECTS + +scripted_effect fp1_pick_outdoorsy_child_for_winter_effect = { + random_child = { + # Try to pick an outdoorsy child first. + limit = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + OR = { + childhood_loud_child_trigger = yes + childhood_nice_child_trigger = yes + } + } + # Otherwise, any is good. + alternative_limit = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + } + save_scope_as = child + } +} + +################################################## +# Out for a Sail +# by Ewan Cowhig Croft +# 0501 - 0510 +################################################## + +# You encounter a distressed raiding vessel whilst out sailing. +fp1_yearly.0501 = { + type = character_event + title = fp1_yearly.0501.t + desc = fp1_yearly.0501.desc + theme = realm + left_portrait = { + character = root + animation = shock + } + override_background = { reference = fp1_ocean_norse } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0501 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_coastal_norse_tribal = yes + } + + weight_multiplier = { + base = 1 + + # Weight up for having sea-faring traits. + modifier = { + add = 0.5 + has_trait = viking + } + modifier = { + add = 0.5 + has_trait = adventurer + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0501 + days = 1825 + } + # Generate a gender for the fisher people. + random_dummy_gender_soldier_effect = { SCOPE_NAME = fisherpeople } + } + + # Stop and try to help them! + option = { + name = fp1_yearly.0501.a + + # Martial duel to organise your sailors. + duel = { + skill = martial + value = 10 + # You succeed in saving the crew and some of their haul! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0501.a.tt_success + send_interface_toast = { + title = fp1_yearly.0501.a.tt_success + left_icon = root + add_prestige = medium_prestige_gain + } + } + # You fail, and many are lost to the storm. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0501.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0501.a.tt_failure + left_icon = root + add_prestige = miniscule_prestige_loss + } + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + compassionate = medium_stress_impact_loss + lazy = minor_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.75 + ai_energy = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight up for stress. + add = 20 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = sadistic + } + } + } + + # Salvage the cargo, kill the survivors. + option = { + name = fp1_yearly.0501.b + + # Prowess duel to storm the boat. + duel = { + skill = prowess + value = 10 + # You storm the boat easily. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0501.b.tt_success + send_interface_toast = { + title = fp1_yearly.0501.b.tt_success + left_icon = root + add_gold = minor_gold_value + } + } + # Survivors slip to shore. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0501.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0501.b.tt_failure + left_icon = root + add_gold = minor_gold_value + add_tyranny = minor_tyranny_gain + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.25 + ai_compassion = -0.5 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = greedy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 20 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -20 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + } + } + + # Sail on by. + option = { + name = fp1_yearly.0501.c + + # Minor dread gain from your crew. + add_dread = miniscule_dread_gain + + stress_impact = { + lazy = minor_stress_impact_loss + callous = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + diligent = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -10 + has_trait = just + } + } + } +} + +################################################## +# The Stench of Success +# by Ewan Cowhig Croft +# 0511 - 0520 +################################################## + +scripted_trigger fp1_keeps_stinking_hunting_trophy = { + # Standard checks. + is_available_ai_adult = yes + # Do they have the right personality? + calc_true_if = { + amount >= 2 + has_trait = greedy + has_trait = lazy + has_trait = wrathful + has_trait = arrogant + has_trait = brave + has_trait = gregarious + has_trait = ambitious + has_trait = callous + has_trait = sadistic + has_trait = stubborn + has_trait = vengeful + } + NOR = { + has_trait = diligent + has_trait = humble + has_trait = shy + has_trait = fickle + } + # Filter out anyone who'd be a better hunter than this. + NOR = { + has_trait = lifestyle_hunter + has_court_position = master_of_hunt_court_position + } + # Finally, remove people who are currently hurt, so that berserkers can smash 'em up. + NOT = { has_trait = wounded } +} + +# One of your courtiers is extremely proud of a hunting trophy and won't let it go. +fp1_yearly.0511 = { + type = character_event + title = fp1_yearly.0511.t + desc = fp1_yearly.0511.desc + theme = hunting + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:stinker + animation = personality_honorable + } + override_background = { reference = study } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0511 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse_tribal = yes + fp1_is_in_scandinavia_or_colonies = yes + # Must have a suitable random courtier. + any_courtier = { fp1_keeps_stinking_hunting_trophy = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for special traits. + modifier = { + add = 0.5 + has_trait = lifestyle_hunter + } + modifier = { + add = 0.5 + has_trait = berserker + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0511 + days = 1825 + } + # Designate a suitable courtier. + random_courtier = { + # Try to grab someone relevant. + limit = { + fp1_keeps_stinking_hunting_trophy = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + # Otherwise, any valid character will do. + alternative_limit = { fp1_keeps_stinking_hunting_trophy = yes } + save_scope_as = stinker + } + # Pick a local animal for the head to be from. + select_local_animal_effect = { TYPE = any } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + # Give them the trophy. + scope:stinker = { + add_character_modifier = { + modifier = fp1_0511_carries_stinking_trophy_modifier + years = 5 + } + } + } + + # It's very nice, scope:stinker. So very, very nice. + option = { + name = fp1_yearly.0511.a + + # Scope:stinker is very happy with you. + reverse_add_opinion = { + target = scope:stinker + modifier = pleased_opinion + opinion = 75 + } + # Everyone else is not. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + limit = { + this != scope:stinker + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + patient = minor_stress_impact_loss + shy = medium_stress_impact_loss + impatient = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_sociability = -0.25 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = deceitful + } + modifier = { # Weight up for stress. + add = 10 + has_trait = patient + } + modifier = { # Weight up for stress. + add = 20 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = impatient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = honest + } + } + } + + # [HighGod], [HealthGod], and [FortuneGod] too, get *rid* of it! + option = { + name = fp1_yearly.0511.b + + # Scope:stinker is incredibly upset. + reverse_add_opinion = { + target = scope:stinker + modifier = cruelty_opinion + opinion = -50 + } + scope:stinker = { remove_character_modifier = fp1_0511_carries_stinking_trophy_modifier } + # Everyone else is not. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + limit = { + this != scope:stinker + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + + stress_impact = { + wrathful = minor_stress_impact_loss + impatient = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_sociability = 0.25 + ai_compassion = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = wrathful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = impatient + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -20 + has_trait = patient + } + } + } + + # (Berserker) root SMASH! + option = { + name = fp1_yearly.0511.c + trigger = { has_trait = berserker } + trait = berserker + + # Scope:stinker is incredibly upset. + reverse_add_opinion = { + target = scope:stinker + modifier = cruelty_opinion + opinion = -75 + } + scope:stinker = { remove_character_modifier = fp1_0511_carries_stinking_trophy_modifier } + # Scope:stinker will remember this. + progress_towards_rival_effect = { + REASON = rival_berserker_smash + CHARACTER = scope:stinker + OPINION = 0 + } + # But man, wasn't that *therapeutic*? + ## Stress loss handled in stress_impact. + + stress_impact = { + berserker = massive_stress_loss + impatient = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = impatient + } + modifier = { # Weight up for stress. + add = 10 + has_trait = wrathful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = patient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = calm + } + } + } + + # (Hunter) How about we get you a *new* trophy this eve? + option = { + name = fp1_yearly.0511.d + # Elite hunters who don't fly off the handle. + trigger = { + has_trait = lifestyle_hunter + NOT = { has_trait = berserker } + } + trait = lifestyle_hunter + + # Scope:stinker benefits. + scope:stinker = { + # They're happy with you. + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 50 + } + # And won't make the same mistake. + add_trait = lifestyle_hunter + # Plus they ditch the old trophy. + remove_character_modifier = fp1_0511_carries_stinking_trophy_modifier + } + # Best friends? + progress_towards_friend_effect = { + CHARACTER = scope:stinker + OPINION = 0 + REASON = friend_fp1_stink_new_trophy + } + # Everyone else is just glad the stink is gone. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + limit = { + this != scope:stinker + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + + + stress_impact = { + compassionate = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + patient = medium_stress_impact_loss + impatient = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + ai_honor = 0.25 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = compassionate + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 20 + has_trait = patient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = impatient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + # Yes, scope:stinker, it's rank, now please leave. + option = { + name = fp1_yearly.0511.e + + # Scope:stinker is quite upset. + reverse_add_opinion = { + target = scope:stinker + modifier = cruelty_opinion + opinion = -25 + } + # But people respect you telling it like it is. + add_prestige = minor_prestige_gain + + stress_impact = { + honest = medium_stress_impact_loss + deceitful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -20 + has_trait = deceitful + } + } + } + + after = { + remove_variable = animal_type + } +} + +################################################## +# Blood on the Snow +# by Ewan Cowhig Croft +# 0521 - 0530 +################################################## + +# Your child challenges your mastery of snowball warfare. +fp1_yearly.0521 = { + type = character_event + title = fp1_yearly.0521.t + desc = fp1_yearly.0521.desc + theme = war + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:child + animation = personality_bold + } + override_background = { reference = market } + widget = { + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0521 } + is_playable_character = yes + # Must have at least one suitable child. + any_child = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + } + # Gotta have snow in the capital. + character_capital_has_winter_trigger = yes + } + + weight_multiplier = { + base = 1 + + # Weight up for outdoorsy kids. + modifier = { + add = 1 + any_child = { childhood_loud_child_trigger = yes } + } + modifier = { + add = 1 + any_child = { childhood_nice_child_trigger = yes } + } + + # Weight according to winter scale. + character_capital_has_snow_suitable_for_activities = { CHARACTER = root } + } + + immediate = { + play_music_cue = "mx_cue_war_declared" + add_character_flag = { + flag = had_event_fp1_yearly_0521 + days = 1825 + } + # Designate a suitable child. + fp1_pick_outdoorsy_child_for_winter_effect = yes + } + + # Good shot! Come here y'little rascal! + option = { + name = fp1_yearly.0521.a + + # You get into a friendly snowball fight. + custom_tooltip = fp1_yearly.0521.a.tt + # Gain some opinion with them. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 20 + } + + stress_impact = { + gregarious = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_energy = 0.25 + ai_vengefulness = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + } + } + + # Throw a match against them. + option = { + name = fp1_yearly.0521.b + + # You take a dive. + custom_tooltip = fp1_yearly.0521.b.tt + # Gain more opinion. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 40 + } + # But lose a little prestige. + add_prestige = minor_prestige_loss + + stress_impact = { + forgiving = minor_stress_impact_loss + humble = minor_stress_impact_loss + vengeful = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_sociability = 0.25 + ai_honor = -0.1 + ai_vengefulness = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight up for stress. + add = 10 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = arrogant + } + } + } + + # Beat them into the ground with superior martial know-how. + option = { + name = fp1_yearly.0521.c + # If you've got berserker, you flip out when taking things too seriously instead. + trigger = { + NOR = { + has_trait = berserker + has_trait = strategist + } + } + + # Confirm to the player. + custom_tooltip = fp1_yearly.0521.c.tt + # Sure would be embarrassing if you lost this snowball fight your voluntarily taking too seriously, amirite? + duel = { + skill = martial + target = scope:child + # You successfully beat the child. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0521.c.tt_success + send_interface_toast = { + title = fp1_yearly.0521.c.tt_success + left_icon = scope:child + # Minor prestige for uhh... your ruthlessness? + add_prestige = minor_prestige_gain + # Scope:child is a bit upset. + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -30 + } + } + } + # Scope:child trounces you. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0521.c.tt_failure + send_interface_toast = { + title = fp1_yearly.0521.c.tt_failure + left_icon = scope:child + # Clearly you're taking this *way* too seriously. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = -40 + } + } + } + } + + stress_impact = { + vengeful = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + forgiving = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_sociability = 0.25 + ai_honor = 0.1 + ai_compassion = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -20 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = humble + } + } + } + + # (Strategist) Insta-beat 'em. + option = { + name = fp1_yearly.0521.d + trigger = { + has_trait = strategist + NOT = { has_trait = berserker } + } + trait = strategist + + # Confirm to the player. + custom_tooltip = fp1_yearly.0521.d.tt + # Minor prestige for uhh... your ruthlessness? + add_prestige = minor_prestige_gain + # Scope:child is a bit awed. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = 20 + } + + stress_impact = { + vengeful = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + forgiving = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_sociability = 0.25 + ai_honor = 0.1 + ai_compassion = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -20 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = humble + } + } + } + + # (Berserker) RRRAAAAARRRGGGHHH! + option = { + name = fp1_yearly.0521.e + trigger = { has_trait = berserker } + trait = berserker + + # The snowball triggers your berserk rage. + custom_tooltip = fp1_yearly.0521.e.tt + # Berserkergang relieves stress. + ## Stress loss handled in stress impact. + # Scope:child is *terrified*. + reverse_add_opinion = { + target = scope:child + modifier = scared_opinion + opinion = -100 + } + + stress_impact = { + berserker = massive_stress_loss + impatient = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_compassion = -1 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = impatient + } + modifier = { # Weight up for stress. + add = 10 + has_trait = wrathful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = patient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = calm + } + } + } + + # Don't bother parent whilst they're working. Run along. + option = { + name = fp1_yearly.0521.f + + # Welp, that's that dealt with. + add_stress = minor_stress_loss + # Scope:child is mildly hurt. + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -10 + } + + # Too gentle a response to give stress, to be honest. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_energy = -0.5 + ai_sociability = -0.75 + } + } + } +} + +################################################## +# [Dynasty] on Ice +# by Ewan Cowhig Croft +# 0531 - 0540 +################################################## + +scripted_trigger fp1_child_not_had_decisive_skating_lessons_trigger = { + NOR = { + has_character_flag = child_had_event_fp1_yearly_0531 + has_character_modifier = fp1_avoiding_the_snow_modifier + } +} + +# Teaching your Child to Ice Skate +fp1_yearly.0531 = { + type = character_event + title = fp1_yearly.0531.t + desc = fp1_yearly.0531.desc + theme = education + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:child + animation = shame + } + override_background = { reference = courtyard } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0531 } + is_playable_character = yes + # Must be a suitable culture. + culture_uses_frequent_winter_transportation_trigger = yes + # Must have at least one suitable child. + any_child = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # Can't have successfully learnt/been encouraged away from already. + fp1_child_not_had_decisive_skating_lessons_trigger = yes + } + # Gotta have snow in the capital. + character_capital_has_winter_trigger = yes + } + + weight_multiplier = { + base = 1 + + # Weight up for outdoorsy kids. + modifier = { + add = 1 + any_child = { childhood_loud_child_trigger = yes } + } + modifier = { + add = 1 + any_child = { childhood_nice_child_trigger = yes } + } + + # Weight according to winter scale. + character_capital_has_snow_suitable_for_activities = { CHARACTER = root } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0531 + days = 1825 + } + # Pick a suitable child; this is a slightly modified fp1_pick_outdoorsy_child_for_winter, as we need to filter out a few things. + random_child = { + # Try to pick an outdoorsy child first. + limit = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + OR = { + has_trait = rowdy + childhood_loud_child_trigger = yes + childhood_nice_child_trigger = yes + } + # Can't have successfully learnt/been encouraged away from already. + fp1_child_not_had_decisive_skating_lessons_trigger = yes + } + # Otherwise, any is good. + alternative_limit = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # Can't have successfully learnt/been encouraged away from already. + fp1_child_not_had_decisive_skating_lessons_trigger = yes + } + save_scope_as = child + } + } + + # It's easy! Alright, you can watch me... + option = { + name = fp1_yearly.0531.a + + duel = { + skill = diplomacy + value = 10 + # You successfully explain what's up to scope:child. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0531.a.tt_success + send_interface_toast = { + title = fp1_yearly.0531.a.tt_success + left_icon = scope:child + scope:child = { + # Gain some opinion with them. + add_opinion = { + target = root + modifier = love_opinion + opinion = 20 + } + # And this boosts their confidence & balance. + add_prowess_skill = medium_skill_bonus + add_diplomacy_skill = medium_skill_bonus + # Flag them as having learnt and not needing to learn again. + add_character_flag = { + flag = child_had_event_fp1_yearly_0531 + years = 20 + } + } + } + } + # You just frustrate them further. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0531.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0531.a.tt_failure + left_icon = scope:child + # They grow frustrated. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = -20 + } + scope:child = { add_stress = major_stress_gain } + } + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_energy = 0.5 + ai_compassion = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + } + } + + # Don't we have maids for you to pester? + option = { + name = fp1_yearly.0531.b + + # You focus on your work. + add_character_modifier = { + modifier = fp1_focusing_on_rule_modifier + years = 10 + } + # They grow frustrated. + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -40 + } + # And will remember this in later life. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:child } + } + set_relation_potential_rival = scope:child + } + } + + stress_impact = { + callous = minor_stress_impact_loss + lazy = major_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.25 + ai_energy = -0.5 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 30 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # Play indoors, you'll catch the cold. + option = { + name = fp1_yearly.0531.c + + # Your advice is taken. + scope:child = { + add_character_modifier = { + modifier = fp1_avoiding_the_snow_modifier + years = 10 + } + } + # They're a tad bummed though. + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -20 + } + + stress_impact = { + cynical = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -10 + has_trait = paranoid + } + } + } +} + +################################################## +# The Beast of [Capital] +# by Ewan Cowhig Croft +# 0541 - 0550 +################################################## + +scripted_trigger fp1_0541_valid_child_prankster_trigger = { + # Is available for events. + is_available_ai_child = yes + # Child is in the correct age bracket. + child_not_infant_trigger = yes + child_not_teen_trigger = yes + # Must not be a quiet child. + childhood_quiet_child_trigger = no +} + +scripted_trigger fp1_0541_valid_courtier_victim_trigger = { + # Is available for events. + is_available_ai_adult = yes + # Isn't especially brave or good at dealing with kids. + NOR = { + has_trait = calm + has_trait = patient + has_trait = humble + has_trait = brave + has_trait = shy + has_trait = gregarious + has_trait = trusting + has_trait = compassionate + has_trait = forgiving + } + # And, in case you act disproportionately, they aren't a good relationship. + has_friendly_relationship_with_root_trigger = no +} + +# Young child with animal furs is pretending to be a large animal. +fp1_yearly.0541 = { + type = character_event + title = fp1_yearly.0541.t + desc = fp1_yearly.0541.desc + theme = family + left_portrait = { + character = scope:courtier + animation = rage + } + right_portrait = { + character = scope:child + animation = schadenfreude + } + override_background = { reference = corridor_day } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0541 } + is_landed = yes + # Intended for Norse-ish tribals. + fp1_is_norse_tribal = yes + fp1_is_in_scandinavia_or_colonies = yes + # Has a valid child. + any_child = { fp1_0541_valid_child_prankster_trigger = yes } + # Has a valid courtier. + any_courtier = { fp1_0541_valid_courtier_victim_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up for active/mean kids. + modifier = { + add = 1 + any_child = { childhood_loud_child_trigger = yes } + } + modifier = { + add = 1 + any_child = { childhood_mean_child_trigger = yes } + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0541 + days = 1825 + } + # Pick an appropriate child. + random_child = { + # Prefer rowdy or mean-spirited children. + limit = { + fp1_0541_valid_child_prankster_trigger = yes + OR = { + childhood_loud_child_trigger = yes + childhood_mean_child_trigger = yes + } + } + # Though otherwise any valid child is acceptable. + alternative_limit = { fp1_0541_valid_child_prankster_trigger = yes } + save_scope_as = child + } + # And an appropriate courtier. + random_courtier = { + limit = { + fp1_0541_valid_courtier_victim_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + alternative_limit = { fp1_0541_valid_courtier_victim_trigger = yes } + save_scope_as = courtier + } + select_local_animal_effect = { TYPE = dangerous } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + + # This is honestly just bloody hilarious. + option = { + name = fp1_yearly.0541.a + + # Scope:child is pretty damned happy. + reverse_add_opinion = { + target = scope:child + modifier = amused_opinion + opinion = 40 + } + # Scope:courtier loses opinion, though. + reverse_add_opinion = { + target = scope:courtier + modifier = respect_opinion + opinion = -50 + } + # Other courtiers are sceptical. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + limit = { + NOR = { + this = scope:child + this = scope:courtier + } + } + add_opinion = { + target = root + modifier = amused_opinion + opinion = -10 + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_vengefulness = 0.25 + ai_sociability = 0.25 + ai_compassion = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = just + } + } + } + + # Punish scope:child. + option = { + name = fp1_yearly.0541.b + + # Scope:courtier is happy, and you gain a favour hook if possible. + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:courtier + } + } + add_hook = { + type = favor_hook + target = scope:courtier + years = 5 + } + } + reverse_add_opinion = { + target = scope:courtier + modifier = pleased_opinion + opinion = 20 + } + # Scope:child is upset. + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -30 + } + + stress_impact = { + just = minor_stress_impact_loss + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_honor = 0.25 + ai_vengefulness = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = just + } + modifier = { # Weight down for stress. + add = -10 + has_trait = forgiving + } + } + } + + # Evict scope:courtier. + option = { + name = fp1_yearly.0541.c + + # Scope:child is very happy. + reverse_add_opinion = { + target = scope:child + modifier = amused_opinion + opinion = 30 + } + # Scope:courtier is gobsmacked, might become a rival, and leaves. + reverse_add_opinion = { + target = scope:courtier + modifier = respect_opinion + opinion = -30 + } + scope:child = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_harassed_exiled + CHARACTER = scope:courtier + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + scope:courtier = { select_and_move_to_pool_effect = yes } + + stress_impact = { + arbitrary = major_stress_impact_loss + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.5 + ai_rationality = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = just + } + } + } + + # I really, profoundly do not care. + option = { + name = fp1_yearly.0541.d + + # Gain a little prestige for telling them to sod off. + add_prestige = minor_prestige_gain + # Both scope:child & scope:courtier are a tad upset. + reverse_add_opinion = { + target = scope:courtier + modifier = disappointed_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -10 + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + lazy = medium_stress_impact_loss + just = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = just + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + } + } +} + +################################################## +# Fishy Business +# by Ewan Cowhig Croft +# 0551 - 0560 +################################################## + +scripted_trigger fp1_0551_appropriately_smelly_courtier_trigger = { + # Standard checks. + is_available_ai_adult = yes + # Must have some quality that's inspired this odd attitude. + OR = { + # Enjoys eating oddities. + has_trait = lifestyle_hunter + has_trait = gluttonous + has_trait = vengeful + # Weird health foods. + has_trait = whole_of_body + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + # Refuses to admit wrong-doing. + has_trait = arrogant + has_trait = stubborn + has_trait = sadistic + } + # And nothing that would rule it out. + NOR = { + has_trait = temperate + has_trait = fickle + has_trait = compassionate + } +} + +# One of your courtiers has taken a liking to foul food stuffs. +fp1_yearly.0551 = { + type = character_event + title = fp1_yearly.0551.t + desc = fp1_yearly.0551.desc + theme = unfriendly + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:antisocialite + animation = personality_greedy + } + override_background = { reference = feast } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0551 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse_tribal = yes + fp1_is_in_scandinavia = yes + # Has a suitable courtier. + any_courtier = { fp1_0551_appropriately_smelly_courtier_trigger = yes } + } + + weight_multiplier = { base = 1 } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0551 + days = 1825 + } + # Grab an appropriate courtier. + random_courtier = { + limit = { + fp1_0551_appropriately_smelly_courtier_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + alternative_limit = { fp1_0551_appropriately_smelly_courtier_trigger = yes } + save_scope_as = antisocialite + } + } + + # Let's have a chat. + option = { + name = fp1_yearly.0551.a + + # See if you can politely convince scope:antisocialite to be a bit more respectful. + duel = { + skill = diplomacy + target = scope:antisocialite + # You put your point across eloquently. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -45 + } + desc = fp1_yearly.0551.a.tt_success + send_interface_toast = { + title = fp1_yearly.0551.a.tt_success + left_icon = scope:antisocialite + reverse_add_opinion = { + target = scope:antisocialite + modifier = respect_opinion + opinion = 20 + } + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + limit = { + this != scope:antisocialite + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + # And a bit of prestige to sweeten the pot. + add_prestige = minor_prestige_gain + } + } + # Scope:socialite is incredibly insulted. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -45 + } + desc = fp1_yearly.0551.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0551.a.tt_failure + left_icon = scope:antisocialite + reverse_add_opinion = { + target = scope:antisocialite + modifier = insult_opinion + opinion = -40 + } + progress_towards_rival_effect = { + REASON = rival_smells_of_fish + CHARACTER = scope:antisocialite + OPINION = 0 + } + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + honest = minor_stress_impact_loss + shy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.25 + ai_rationality = 0.25 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -10 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + } + } + + # Perhaps I could simply move my quarters further away? + option = { + name = fp1_yearly.0551.b + trigger = { + NOT = { has_trait = gluttonous } + } + + # Make it clear that scope:antisocialite will continue their smelly rampage. + custom_tooltip = fp1_yearly.0551.b.tt + # Gain a weak hook on the courtier. + if = { + limit = { + can_add_hook = { + target = scope:antisocialite + type = favor_hook + years = 5 + } + } + add_hook = { + target = scope:antisocialite + type = favor_hook + years = 5 + } + } + # And some opinion. + reverse_add_opinion = { + target = scope:antisocialite + modifier = grateful_opinion + opinion = 30 + } + # Lose a bit of respect with everyone else. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + # Speedily filter out the root cause. + limit = { + this != scope:antisocialite + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -20 + } + } + + stress_impact = { + arbitrary = medium_stress_impact_loss + shy = major_stress_impact_loss + honest = minor_stress_impact_gain + gregarious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_rationality = -0.5 + ai_sociability = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 30 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -30 + has_trait = gregarious + } + } + } + + # (Gluttonous) Do... do you have any more of that? + option = { + name = fp1_yearly.0551.b_alt + trigger = { has_trait = gluttonous } + trait = gluttonous + + # Make it clear that scope:antisocialite will continue their smelly rampage. + custom_tooltip = fp1_yearly.0551.b_alt.tt + # Gain a strong hook on the courtier. + if = { + limit = { + can_add_hook = { + target = scope:antisocialite + type = loyalty_hook + } + } + add_hook = { + target = scope:antisocialite + type = loyalty_hook + } + } + # Become friends, if possible. + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:antisocialite } + } + set_relation_friend = { reason = friend_delectable_herring target = scope:antisocialite } + } + # And some opinion. + reverse_add_opinion = { + target = scope:antisocialite + modifier = respect_opinion + opinion = 50 + } + # Lose a *fair* of respect with everyone else. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + # Speedily filter out the root cause. + limit = { + this != scope:antisocialite + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -40 + } + } + + stress_impact = { + arbitrary = medium_stress_impact_loss + shy = major_stress_impact_loss + honest = minor_stress_impact_gain + gregarious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_rationality = -0.5 + ai_sociability = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 30 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -30 + has_trait = gregarious + } + } + } + + # You know what? Dungeon. *Now*. + option = { + name = fp1_yearly.0551.c + + # No one objects to the imprisonment. + rightfully_imprison_character_effect = { + TARGET = scope:antisocialite + IMPRISONER = root + } + hidden_effect = { + scope:antisocialite = { change_prison_type = dungeon } + } + # Immediate gratitude from your courtiers et al. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + # Speedily filter out the root cause. + limit = { + this != scope:antisocialite + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = -0.5 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -20 + has_trait = just + } + modifier = { # Weight down for stress. + add = -20 + has_trait = compassionate + } + } + } + + # What a shame, it seems my attention is required *far* away. + option = { + name = fp1_yearly.0551.d + + # What a relief. + ## Stress loss handled in stress_impact. + # Lose a bit of respect with everyone else. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + # Speedily filter out the root cause. + limit = { + this != scope:antisocialite + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -10 + } + } + # Gain a mild modifier. + add_character_modifier = { + modifier = fp1_yearly_0551_absent_lord_modifier + years = 5 + } + + stress_impact = { + base = major_stress_loss + shy = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_sociability = -0.25 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = gregarious + } + } + } +} + +################################################## +# My Arm Against Yours +# by Ewan Cowhig Croft +# 0561 - 0570 +################################################## + +scripted_trigger fp1_0561_is_friendly_knight_trigger = { + # Standard checks. + is_available_ai_adult = yes + is_landed = no + # Has some sociable qualities. + OR = { + ai_sociability >= low_positive_ai_value + ai_boldness >= low_positive_ai_value + ai_energy >= low_positive_ai_value + ai_honor >= low_positive_ai_value + has_trait = wrathful + has_trait = arrogant + has_trait = brave + has_trait = gregarious + has_trait = ambitious + has_trait = lifestyle_reveler + } + # No special relationship with root. + has_any_good_relationship_with_root_trigger = no + has_any_bad_relationship_with_root_trigger = no + # Doesn't absolutely hate root. + opinion = { + target = root + value >= low_negative_opinion + } +} + +# One of your knights challenges you to a friendly arm wrestle. +fp1_yearly.0561 = { + type = character_event + title = fp1_yearly.0561.t + desc = fp1_yearly.0561.desc + theme = friendly + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:knight + animation = admiration + } + override_background = { reference = tavern } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0561 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse_tribal = yes + # Has an appropriate available knight. + any_knight = { fp1_0561_is_friendly_knight_trigger = yes } + # Must be a suitable challengee. + prowess >= mediocre_skill_rating + is_healthy = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + + weight_multiplier = { + base = 1 + + # Weight down/up a little according to prowess. + modifier = { + add = -0.25 + prowess <= low_skill_rating + } + modifier = { + add = -0.25 + prowess <= mediocre_skill_rating + } + modifier = { + add = 0.25 + prowess >= high_skill_rating + } + modifier = { + add = 0.25 + prowess >= very_high_skill_rating + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0561 + days = 1825 + } + # Grab an appropriate knight to wrassle. + random_knight = { + limit = { + fp1_0561_is_friendly_knight_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + alternative_limit = { fp1_0561_is_friendly_knight_trigger = yes } + # We want to weight up higher prowess knights, but not that dramatically. + weight = { + base = 0 + modifier = { + add = { + value = prowess + multiply = 0.5 + } + } + } + save_scope_as = knight + } + } + + # Accept the challenge. + option = { + name = fp1_yearly.0561.a + trigger = { + NOR = { + has_trait = strong + has_trait = physique_good + } + } + + # Basic prowess challenge. + duel = { + skill = prowess + target = scope:knight + # You win: some minor prestige, more opinion. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0561.a.tt_success + send_interface_toast = { + title = fp1_yearly.0561.a.tt_success + left_icon = scope:knight + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:knight + modifier = impressed_opinion + opinion = 30 + } + } + } + # You lose: well, not a huge deal, and still good fun. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0561.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0561.a.tt_failure + left_icon = scope:knight + add_prestige = miniscule_prestige_loss + reverse_add_opinion = { + target = scope:knight + modifier = amused_opinion + opinion = 10 + } + } + } + } + # Either way you step friendship. + progress_towards_friend_effect = { + CHARACTER = scope:knight + OPINION = 0 + REASON = friend_arm_wrestled + } + + stress_impact = { + gregarious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_honor = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = shy + } + } + } + + # (Strong/Physique_Good) *cracks knuckles* + option = { + name = fp1_yearly.0561.b + trigger = { + OR = { + has_trait = strong + has_trait = physique_good + } + } + trait = strong + trait = physique_good_1 + trait = physique_good_2 + trait = physique_good_3 + + # Effortless victory grants prestige & opinion. + custom_tooltip = fp1_yearly.0561.b.tt + add_prestige = medium_prestige_gain + reverse_add_opinion = { + target = scope:knight + modifier = impressed_opinion + opinion = 30 + } + + stress_impact = { + gregarious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_honor = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = shy + } + } + } + + # Attempt to cheat. + option = { + name = fp1_yearly.0561.c + + # Modest intrigue challenge. + duel = { + skill = intrigue + target = scope:knight + # You win, making it look *dramatic*! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0561.c.tt_success + send_interface_toast = { + title = fp1_yearly.0561.c.tt_success + left_icon = scope:knight + # Gain prestige for your win! + add_prestige = medium_prestige_gain + # But your foe might know something... + reverse_add_opinion = { + target = scope:knight + modifier = suspicion_opinion + opinion = -5 + } + } + } + # Your cheating is discovered... + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0561.c.tt_failure + send_interface_toast = { + title = fp1_yearly.0561.c.tt_failure + left_icon = scope:knight + # This is embarrassing. + add_prestige = minor_prestige_loss + # Welp, scope:knight is pissed. + reverse_add_opinion = { + target = scope:knight + modifier = weak_opinion + opinion = -40 + } + progress_towards_rival_effect = { + REASON = rival_cheated_at_armwrestle + CHARACTER = scope:knight + OPINION = 0 + } + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_loss + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = deceitful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = honest + } + } + } + + # Ignore scope:knight and continue eating. + option = { + name = fp1_yearly.0561.d + + # Gain minor prestige for just not bothering. + add_prestige = miniscule_prestige_gain + # Hurt the knight's feelings a little. + reverse_add_opinion = { + target = scope:knight + modifier = hurt_opinion + opinion = -10 + } + + stress_impact = { + arrogant = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + shy = medium_stress_impact_loss + lazy = medium_stress_impact_loss + humble = minor_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = -0.75 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gluttonous + } + modifier = { # Weight up for stress. + add = 20 + has_trait = shy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -20 + has_trait = gregarious + } + } + } +} + +################################################## +# Petty Vandalism +# by Ewan Cowhig Croft +# 0571 - 0580 +################################################## + +scripted_trigger fp1_0571_suitable_vandal_child_available_trigger = { + # Is available for events. + is_available_ai_child = yes + # Child is old enough to have travelled that far. + age >= 10 + # Must not be a quiet child. + childhood_quiet_child_trigger = no +} + +scripted_trigger fp1_0571_suitable_annoyed_courtier_trigger = { + # Is available for events. + is_available_ai_adult = yes + # Likely to be annoyed at the vandalism. + NOR = { + has_trait = calm + has_trait = patient + has_trait = shy + has_trait = craven + has_trait = arbitrary + has_trait = fickle + has_trait = lazy + has_trait = trusting + } +} + +scripted_trigger fp1_0571_suitable_vandal_site_trigger = { + tier = tier_county + fp1_county_has_stele_trigger = yes + squared_distance = { + target = root.capital_county + value <= squared_distance_small + } +} + +# A runestone in your lands has been damaged by one of your children. +fp1_yearly.0571 = { + type = character_event + title = fp1_yearly.0571.t + desc = fp1_yearly.0571.desc + theme = family + left_portrait = { + character = scope:courtier + animation = disapproval + } + right_portrait = { + character = scope:child + animation = shame + } + override_background = { reference = fp1_runestone } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0571 } + is_landed_or_landless_administrative = yes + # Filter to flavour-appropriate characters. + fp1_is_norse = yes + # Must have an appropriate runestone in your territory. + any_held_title = { fp1_0571_suitable_vandal_site_trigger = yes } + # A valid child. + any_child = { fp1_0571_suitable_vandal_child_available_trigger = yes } + # And a courtier who might not appreciate things. + any_courtier = { fp1_0571_suitable_annoyed_courtier_trigger = yes } + + } + + weight_multiplier = { + base = 1 + + # If you're setting a good example, kids are less likely to imitate. + modifier = { + add = 0.5 + has_trait = just + } + # And the reverse. + modifier = { + add = -0.5 + has_trait = arbitrary + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0571 + days = 1825 + } + # Select a runestone location. + random_held_title = { + limit = { fp1_0571_suitable_vandal_site_trigger = yes } + save_scope_as = vandal_site + } + # Grab a suitable child. + random_child = { + # Prefer rowdy or mean-spirited children. + limit = { + fp1_0541_valid_child_prankster_trigger = yes + OR = { + childhood_loud_child_trigger = yes + childhood_mean_child_trigger = yes + } + } + # Though otherwise any valid child is acceptable. + alternative_limit = { fp1_0571_suitable_vandal_child_available_trigger = yes } + save_scope_as = child + } + # And the courtier. + random_courtier = { + # Try to get someone who dislikes the child first. + limit = { + fp1_0571_suitable_annoyed_courtier_trigger = yes + opinion = { + target = scope:child + value <= neutral_opinion + } + } + # Otherwise, whoever is fine. + alternative_limit = { fp1_0571_suitable_annoyed_courtier_trigger = yes } + save_scope_as = courtier + } + # Quietly make the two potential rivals for later. + hidden_effect = { + if = { + limit = { + scope:child = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:courtier } + } + } + scope:child = { set_relation_potential_rival = scope:courtier } + } + } + } + + # Look, you can't be defacing expensive monuments, 'kay? + option = { + name = fp1_yearly.0571.a + + # Diplomacy challenge to persuade the child. + duel = { + skill = diplomacy + target = scope:child + # Child sees how they've gone wrong. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0571.tt_success + send_interface_toast = { + title = fp1_yearly.0571.tt_success + left_icon = scope:child + # If the child's personality can accept it, make them honourable. + scope:child = { + if = { + limit = { + number_of_personality_traits < personality_trait_standard + NOR = { + has_trait = arbitrary + has_trait = just + } + } + add_trait = just + } + } + # Otherwise, just give opinion. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = 30 + } + } + } + # Child doesn't understand what the issue even is. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0571.tt_failure + send_interface_toast = { + title = fp1_yearly.0571.tt_failure + left_icon = scope:child + # If the child's personality can accept it, make them arbitrary. + scope:child = { + if = { + limit = { + number_of_personality_traits < personality_trait_standard + NOT = { has_trait = just } + } + add_trait = arbitrary + } + } + # Otherwise, just give opinion. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = -20 + } + } + } + } + # Courtier is satisfied that something has been done. + reverse_add_opinion = { + target = scope:courtier + modifier = impressed_opinion + opinion = 30 + } + # The runestone is destroyed. + scope:vandal_site = { fp1_remove_stele_effect = yes } + + stress_impact = { + trusting = medium_stress_impact_loss + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_greed = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -20 + has_trait = vengeful + } + } + } + + # I'll be fining the cost of the runestone from your things. + option = { + name = fp1_yearly.0571.b + + # Gain opinion with the courtier. + reverse_add_opinion = { + target = scope:courtier + modifier = pleased_opinion + opinion = 30 + } + # The runestone is repaired. + custom_tooltip = fp1_yearly.0571.b.tt + # Lose opinion with the child, and fine them gold. + scope:child = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -40 + } + remove_short_term_gold = root.raise_stele_gold_cost + } + + stress_impact = { + vengeful = minor_stress_impact_loss + greedy = medium_stress_impact_loss + forgiving = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_vengefulness = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + } + } + + # Look, you can't be defacing expensive monuments, 'kay? + option = { + name = fp1_yearly.0571.b.2 + + # Gain lots of opinion with your child. + reverse_add_opinion = { + target = scope:child + modifier = pleased_opinion + opinion = 70 + } + # Lose some with your courtier. + reverse_add_opinion = { + target = scope:courtier + modifier = respect_opinion + opinion = -40 + } + # The runestone is repaired. + custom_tooltip = fp1_yearly.0571.b.tt + remove_short_term_gold = root.raise_stele_gold_cost + # If your child is still growing, this may leave a mark. + scope:child = { + ## Making them more arbitrary. + if = { + limit = { + # If they have room. + number_of_personality_traits < personality_trait_standard + # And don't already feel strongly either way. + NOR = { + has_trait = just + has_trait = arbitrary + } + } + add_trait = arbitrary + } + ## And less attached to money. + if = { + limit = { + NOR = { + has_trait = profligate + has_trait = greedy + } + } + add_trait = profligate + } + } + + stress_impact = { + forgiving = minor_stress_impact_loss + generous = minor_stress_impact_loss + lazy = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + vengeful = minor_stress_impact_gain + greedy = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = just + } + } + } + + # *Sigh* This isn't worth the bother. + option = { + name = fp1_yearly.0571.c + + # Gain lots of opinion with your child. + reverse_add_opinion = { + target = scope:child + modifier = pleased_opinion + opinion = 50 + } + # Lose some with your courtier. + reverse_add_opinion = { + target = scope:courtier + modifier = respect_opinion + opinion = -30 + } + # Lose the runestone. + scope:vandal_site = { fp1_remove_stele_effect = yes } + + stress_impact = { + forgiving = minor_stress_impact_loss + lazy = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + vengeful = minor_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = just + } + } + } +} + +################################################## +# When I Grow Up +# by Ewan Cowhig Croft +# 0581 - 0590 +################################################## + +scripted_trigger fp1_0581_wrong_gender_child_wishes_to_fight_trigger = { + NOT = { has_character_flag = fp1_dreams_of_shieldpersondom } + trigger_if = { # Has the Royal Court and thus can modify pillars + limit = { has_dlc_feature = diverge_culture } + # For ease, they must share your faith or your culture. + OR = { + culture = root.culture + faith = root.faith + } + } + trigger_else = { + # For ease, they must share your faith. + faith = root.faith + } + # Have an appropriate matching personality. + OR = { + childhood_loud_child_trigger = yes + childhood_mean_child_trigger = yes + } + # Be the wrong gender to fight. + NOT = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + # Aaaand be available to play. + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } +} + +scripted_trigger fp1_0581_valid_courtier_to_bully_trigger = { + # No positive relationship with root. + has_any_good_relationship_with_root_trigger = no + # And they have a negative opinion of you; player only action, so we only care about making sure the player might dislike this character. + opinion = { + target = root + value <= medium_negative_opinion + } +} + +# Your wrong-gender child wants to fight and raid in a few years. +fp1_yearly.0581 = { + type = character_event + title = fp1_yearly.0581.t + desc = { + desc = fp1_yearly.0581.desc.intro + # Currently causes too much risk of scrolling copy. + triggered_desc = { + trigger = { always = no } + desc = fp1_yearly.0581.desc.victim + } + desc = fp1_yearly.0581.desc.outro + } + theme = martial + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:child + animation = admiration + } + lower_right_portrait = scope:victim + override_background = { reference = corridor_day } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0581 } + # Filter to shieldmaiden-having culture. + culture = { has_cultural_parameter = has_access_to_shieldmaidens } + trigger_if = { # Has the Royal Court and thus can modify pillars + limit = { has_dlc_feature = diverge_culture } + culture = { NOT = { has_cultural_parameter = martial_custom_equal_combatant } } + } + trigger_else = { + # Can't be following an equal faith. + faith = { NOT = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco } } + } + # Any child of yours might want to be a shieldperson when they grow up. + any_child = { fp1_0581_wrong_gender_child_wishes_to_fight_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Shieldmaidens are something of an inspiration, and thus + modifier = { + add = 1 + has_trait = shieldmaiden + } + + # If you're of low prowess, then there's less to aspire to. + modifier = { + add = -0.5 + prowess <= medium_skill_rating + } + # But if you're of high prowess, then there's plenty. + modifier = { + add = 0.5 + prowess >= very_high_skill_rating + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0581 + days = 1825 + } + # Nab an appropriate child. + random_child = { + limit = { fp1_0581_wrong_gender_child_wishes_to_fight_trigger = yes } + # Weight up the most promising fighter amongst your valid children. + weight = { + base = 0 + modifier = { + add = { + value = prowess + multiply = 100 + } + } + } + save_scope_as = child + } + # See if there's someone at court you can set the child to bully. + if = { + limit = { + # Keep this player-specific for ease of presentation. + is_ai = no + any_courtier_or_guest = { fp1_0581_valid_courtier_to_bully_trigger = yes } + } + random_courtier_or_guest = { + # Try to pick rivals et al first. + limit = { + has_any_bad_relationship_with_root_trigger = yes + fp1_0581_valid_courtier_to_bully_trigger = yes + } + # Otherwise just any random dick will do. + alternative_limit = { fp1_0581_valid_courtier_to_bully_trigger = yes } + save_scope_as = victim + } + } + } + + # My child, you shall make the world itself *tremble*. + option = { + name = fp1_yearly.0581.a + trigger = { has_trait = shieldmaiden } + trait = shieldmaiden + + # Scope:child is significantly more likely to try to become a shieldmaiden. + custom_tooltip = fp1_yearly.0581.a.tt + scope:child = { add_character_flag = fp1_dreams_of_shieldpersondom } + # Scope:child gains prowess. + scope:child = { add_prowess_skill = massive_skill_bonus } + # Scope:child gains opinion. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 60 + } + + stress_impact = { + shieldmaiden = major_stress_impact_loss + brave = major_stress_impact_loss + ambitious = major_stress_impact_loss + compassionate = major_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.75 + ai_zeal = 0.5 + ai_energy = 0.25 + } + modifier = { # Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -30 + has_trait = humble + } + # Raiders & adventurers want their prodigy to follow in their footsteps. + modifier = { + add = 20 + has_trait = viking + } + modifier = { + add = 20 + has_trait = adventurer + } + modifier = { + add = 20 + has_trait = brave + } + modifier = { + add = 20 + has_trait = shieldmaiden + } + modifier = { + add = 20 + has_trait = ambitious + } + } + } + + # A noble goal! Have at thee, rogue! + option = { + name = fp1_yearly.0581.b + trigger = { + NOT = { has_trait = shieldmaiden } + } + + # Scope:child is significantly more likely to try to become a shieldmaiden. + custom_tooltip = fp1_yearly.0581.b.tt + scope:child = { add_character_flag = fp1_dreams_of_shieldpersondom } + # Scope:child gains prowess. + scope:child = { add_prowess_skill = medium_skill_bonus } + # Scope:child gains opinion. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 30 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = compassionate + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + # Raiders & adventurers want their prodigy to follow in their footsteps. + modifier = { + add = 20 + has_trait = viking + } + modifier = { + add = 20 + has_trait = adventurer + } + modifier = { + add = 20 + has_trait = brave + } + modifier = { + add = 20 + has_trait = shieldmaiden + } + modifier = { + add = 20 + has_trait = ambitious + } + } + } + + # Perhaps. You should practice by ambushing scope:victim. + option = { + name = fp1_yearly.0581.c + trigger = { exists = scope:victim } + + # Scope:child gains prowess. + scope:child = { add_prowess_skill = medium_skill_bonus } + # Scope:victim gains wounded. + scope:victim = { + increase_wounds_no_death_effect = { REASON = duel } + } + # Scope:victim loses opinion of you. + reverse_add_opinion = { + target = scope:victim + modifier = angry_opinion + opinion = -20 + } + # Scope:child adds scope:victim as a potential rival. + hidden_effect = { + scope:child = { + progress_towards_rival_effect = { + REASON = rival_hit_with_stick + CHARACTER = scope:victim + OPINION = -30 + } + } + } + + stress_impact = { + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.25 + ai_compassion = -0.25 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # Stop troubling me with foolish dreams. + option = { + name = fp1_yearly.0581.d + + # Gain a minor beneficial modifier for having your child avoid you. + add_character_modifier = { + modifier = fp1_ignoring_annoyances_modifier + years = 10 + } + # Scope:child loses opinion of you. + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -30 + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + impatient = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + patient = minor_stress_impact_gain + shieldmaiden = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight up for stress. + add = 10 + has_trait = impatient + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -10 + has_trait = patient + } + modifier = { # Weight down for stress. + add = -50 + has_trait = shieldmaiden + } + } + } + + # Hah! We shall see, little one. + option = { + name = fp1_yearly.0581.e + + reverse_add_opinion = { + target = scope:child + modifier = pleased_opinion + opinion = 15 + } + + # Fairly mild option, so doesn't incur stress. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.5 + } + } + } +} + +################################################## +# Raised Voices at the Thing +# by Ewan Cowhig Croft +# 0591 - 0600 +################################################## + +scripted_trigger fp1_0591_secondary_county_trigger = { + holder = root + culture = { has_innovation = innovation_all_things } +} + +scripted_trigger fp1_0591_fighting_counties_at_thing_trigger = { + tier = tier_county + culture = { has_innovation = innovation_all_things } + any_neighboring_county = { fp1_0591_secondary_county_trigger = yes } +} + +# One of your counties is engaged in an argument with another. +fp1_yearly.0591 = { + type = character_event + title = fp1_yearly.0591.t + desc = { + desc = fp1_yearly.0591.desc + random_valid = { + desc = fp1_yearly.0591.desc.border_dispute # + desc = fp1_yearly.0591.desc.stolen_flocks # + desc = fp1_yearly.0591.desc.kidnapped_child # + desc = fp1_yearly.0591.desc.drunken_arson # + desc = fp1_yearly.0591.desc.lost_dog # + desc = fp1_yearly.0591.desc.disrupted_wedding + desc = fp1_yearly.0591.desc.suspicious_will # + desc = fp1_yearly.0591.desc.sheltered_criminal # + desc = fp1_yearly.0591.desc.bad_luck # + desc = fp1_yearly.0591.desc.fly_tipping # + } + } + theme = realm + left_portrait = { + character = root + animation = disgust + } + override_background = { reference = fp1_runestone_circle } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0591 } + is_landed_or_landless_administrative = yes + # Filter to flavour-appropriate characters. + culture = { has_innovation = innovation_all_things } + # Ensure you have at least two counties that can fight with each other. + any_held_title = { fp1_0591_fighting_counties_at_thing_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for mainland Scandinavia. + modifier = { + add = 0.5 + fp1_is_in_scandinavia = yes + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0591 + days = 1825 + } + # Grab the counties. + random_held_title = { + limit = { fp1_0591_fighting_counties_at_thing_trigger = yes } + save_scope_as = county_a + random_neighboring_county = { + limit = { fp1_0591_secondary_county_trigger = yes } + save_scope_as = county_b + } + } + # Set a dummy gender for loc. + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + } + + # Side with scope:county_a. + option = { + name = fp1_yearly.0591.a + + # Levy bonus county modifier. + scope:county_a = { + add_county_modifier = { + modifier = fp1_yearly_0591_levy_modifier + years = 10 + } + } + # And spurn the other county. + scope:county_b = { + add_county_modifier = { + modifier = fp1_yearly_0591_spurned_modifier + years = 10 + } + } + + stress_impact = { + lazy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # Side with scope:county_b. + option = { + name = fp1_yearly.0591.b + + # Building cost county modifier. + scope:county_b = { + add_county_modifier = { + modifier = fp1_yearly_0591_building_modifier + years = 10 + } + } + # And spurn the other county. + scope:county_a = { + add_county_modifier = { + modifier = fp1_yearly_0591_spurned_modifier + years = 10 + } + } + + stress_impact = { + lazy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # Deliberately wind them both up. + option = { + name = fp1_yearly.0591.c + + # Popular opinion bonus modifiers in both (as they're too busy fighting each other). + scope:county_a = { + add_county_modifier = { + modifier = fp1_yearly_0591_otherwise_occupied_modifier + years = 10 + } + } + scope:county_b = { + add_county_modifier = { + modifier = fp1_yearly_0591_otherwise_occupied_modifier + years = 10 + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + arbitrary = medium_stress_impact_loss + honest = minor_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_vengefulness = 0.25 + ai_honor = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = deceitful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -20 + has_trait = just + } + } + } + + # Let them fight it out. + option = { + name = fp1_yearly.0591.d + + # Stress loss: not your problem, honestly. + ## Covered in stress impact. + + stress_impact = { + base = major_stress_loss + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.25 + ai_energy = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + } + } +} + +################################################## +# The Hardest Part of Ruling +# by Ewan Cowhig Croft +# 0601 - 0610 +################################################## + +scripted_trigger fp1_0601_valid_county_for_things_trigger = { + tier = tier_county + culture = { has_innovation = innovation_all_things } +} + +# An incredibly boring local assembly tries your patience. +fp1_yearly.0601 = { + type = character_event + title = fp1_yearly.0601.t + desc = fp1_yearly.0601.desc + theme = realm + left_portrait = { + character = root + animation = boredom + } + override_background = { reference = fp1_runestone_circle } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0601 } + is_landed = yes + # Filter to flavour-appropriate characters. + culture = { has_innovation = innovation_all_things } + any_held_title = { fp1_0601_valid_county_for_things_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for mainland Scandinavia. + modifier = { + add = 0.5 + fp1_is_in_scandinavia = yes + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0601 + days = 1825 + } + # Designate a suitable random county. + random_held_title = { + limit = { fp1_0601_valid_county_for_things_trigger = yes } + save_scope_as = county + } + # Set a dummy gender for loc. + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + } + + # Fight to stay awake. + option = { + name = fp1_yearly.0601.a + + # Diplomacy duel to see how well you disguise it. + duel = { + skill = diplomacy + value = decent_skill_rating + # You power through and remain composed. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0601.a.tt_success + send_interface_toast = { + title = fp1_yearly.0601.a.tt_success + left_icon = root + add_prestige = medium_prestige_gain + } + } + # You slump right out of your seat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0601.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0601.a.tt_failure + left_icon = root + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + just = minor_stress_impact_loss + diligent = medium_stress_impact_loss + arbitrary = minor_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = just + } + modifier = { # Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + # (Diplomacy) Daydream of more interesting diplomatic problems. + option = { + name = fp1_yearly.0601.b + trigger = { has_trait = education_diplomacy } + trait = education_diplomacy_1 + trait = education_diplomacy_2 + trait = education_diplomacy_3 + trait = education_diplomacy_4 + trait = education_diplomacy_5 + + # Gain a minor modifier boosting diplomacy. + add_character_modifier = { + modifier = fp1_daydreaming_about_diplomacy_modifier + years = 5 + } + + stress_impact = { + lazy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # (Martial) Daydream up new strategies. + option = { + name = fp1_yearly.0601.c + trigger = { has_trait = education_martial } + trait = education_martial_1 + trait = education_martial_2 + trait = education_martial_3 + trait = education_martial_4 + trait = education_martial_5 + + # Gain a minor modifier boosting martial. + add_character_modifier = { + modifier = fp1_daydreaming_about_martial_modifier + years = 5 + } + + stress_impact = { + lazy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # (Stewardship) Daydream up new taxes to charge them. + option = { + name = fp1_yearly.0601.d + trigger = { has_trait = education_stewardship } + trait = education_stewardship_1 + trait = education_stewardship_2 + trait = education_stewardship_3 + trait = education_stewardship_4 + trait = education_stewardship_5 + + # Gain a minor modifier boosting stewardship. + add_character_modifier = { + modifier = fp1_daydreaming_about_stewardship_modifier + years = 5 + } + + stress_impact = { + lazy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # (Intrigue) Daydream up new ways to keep them under control. + option = { + name = fp1_yearly.0601.e + trigger = { has_trait = education_intrigue } + trait = education_intrigue_1 + trait = education_intrigue_2 + trait = education_intrigue_3 + trait = education_intrigue_4 + trait = education_intrigue_5 + + # Gain a minor modifier boosting intrigue. + add_character_modifier = { + modifier = fp1_daydreaming_about_intrigue_modifier + years = 5 + } + + stress_impact = { + lazy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # (Learning) Daydream of your favourite book. + option = { + name = fp1_yearly.0601.f + trigger = { has_trait = education_learning } + trait = education_learning_1 + trait = education_learning_2 + trait = education_learning_3 + trait = education_learning_4 + trait = education_learning_5 + + # Gain a minor modifier boosting learning. + add_character_modifier = { + modifier = fp1_daydreaming_about_learning_modifier + years = 5 + } + + stress_impact = { + lazy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # Give in and doze off. + option = { + name = fp1_yearly.0601.g + + # Lose stress since... I mean, who cares? + ## Stress loss handled in stress_impact. + # Buuuuut also lose prestige. + add_prestige = minor_prestige_loss + # Low-random chance for players to occasionally become known as "the Snorer" here. + hidden_effect = { + if = { + limit = { + is_ai = no + has_any_nickname = no + } + random = { + chance = 1 + send_interface_toast = { + title = fp1_yearly.0601.g.nickname + left_icon = root + give_nickname = nick_the_snorer + } + } + } + } + + stress_impact = { + base = major_stress_loss + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_sociability = -0.5 + ai_energy = -1 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + } + } +} + +################################################## +# Leading by Example +# by Ewan Cowhig Croft +# 0611 - 0620 +################################################## + +scripted_trigger fp1_0611_aggressive_child_candidate_trigger = { + # Age gate so that they're never the same as scope:child_b. + age >= 10 + # Must be around. + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # And have the right personality for this. + OR = { + childhood_mean_child_trigger = yes + childhood_loud_child_trigger = yes + } +} + +scripted_trigger fp1_0611_victim_child_candidate_trigger = { + # Age gate so that they're never the same as scope:child_a. + age < 10 + # Must be around. + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # We're not fussed about personality here, anything is good. +} + +# One of your children wounds another whilst imitating you. +fp1_yearly.0611 = { + type = character_event + title = fp1_yearly.0611.t + desc = fp1_yearly.0611.desc + theme = education + left_portrait = { + character = scope:child_a + animation = shame + } + right_portrait = { + character = scope:child_b + animation = anger + } + override_background = { reference = bedchamber } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0611 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse_tribal = yes + # You must qualify for imitation in some way. + OR = { + has_trait = viking + has_trait = berserker + has_trait = adventurer + has_character_flag = has_recently_performed_raid + } + # Gotta have one child who qualifies as the aggressor. + any_child = { fp1_0611_aggressive_child_candidate_trigger = yes } + # And one child who qualifies as the bully. + any_child = { fp1_0611_victim_child_candidate_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for each qualifying trait. + modifier = { + add = 0.25 + has_trait = viking + } + modifier = { + add = 0.25 + has_trait = berserker + } + modifier = { + add = 0.25 + has_trait = adventurer + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0611 + days = 1825 + } + # Grab the first child. + random_child = { + limit = { fp1_0611_aggressive_child_candidate_trigger = yes } + save_scope_as = child_a + } + # And the second. + random_child = { + limit = { fp1_0611_victim_child_candidate_trigger = yes } + save_scope_as = child_b + } + # Wound scope:child_b. + scope:child_b = { + increase_wounds_no_death_effect = { REASON = duel } + } + } + + # Explain to scope:child_a that they need to wait till they're older. + option = { + name = fp1_yearly.0611.a + + # Diplomacy duel to see if you manage the feelings involved. + duel = { + skill = diplomacy + value = high_skill_rating + # You successfully explain that fighting is not playing. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0611.a.tt_success + send_interface_toast = { + title = fp1_yearly.0611.a.tt_success + left_icon = scope:child_a + right_icon = scope:child_b + scope:child_b = { + progress_towards_friend_effect = { + CHARACTER = scope:child_a + OPINION = 50 + REASON = friend_child_apologize + } + } + } + } + # You only engender feelings of bitterness between the two. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0611.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0611.a.tt_failure + left_icon = scope:child_a + right_icon = scope:child_b + scope:child_b = { + progress_towards_rival_effect = { + REASON = rival_hit_with_sharp_stick + CHARACTER = scope:child_a + OPINION = -50 + } + } + } + } + } + + stress_impact = { + honest = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.25 + ai_vengefulness = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = honest + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = vengeful + } + } + } + + # Laud scope:child_a for their goals. + option = { + name = fp1_yearly.0611.b + + # Scope:child_a is very happy & gains some prowess. + scope:child_a = { add_prowess_skill = medium_skill_bonus } + reverse_add_opinion = { + target = scope:child_a + modifier = love_opinion + opinion = 40 + } + # Scope:child_b is very unhappy and grows close to a rivalry with scope:child_a. + scope:child_b = { + progress_towards_rival_effect = { + REASON = rival_hit_with_sharp_stick + CHARACTER = scope:child_a + OPINION = -20 + } + } + reverse_add_opinion = { + target = scope:child_b + modifier = trust_opinion + opinion = -20 + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # Teach scope:child_b how to deal with bullies. + option = { + name = fp1_yearly.0611.c + + # Scope:child_b is very happy & gains some prowess. + scope:child_b = { add_prowess_skill = medium_skill_bonus } + reverse_add_opinion = { + target = scope:child_b + modifier = love_opinion + opinion = 40 + } + # Scope:child_a is unhappy. + reverse_add_opinion = { + target = scope:child_a + modifier = trust_opinion + opinion = -20 + } + + stress_impact = { + fickle = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.5 + ai_vengefulness = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = fickle + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # Tell them to take it to their nurse. + option = { + name = fp1_yearly.0611.d + + # Lose stress. + ## Stress loss handled in stress_impact. + # But also opinion with both children. + reverse_add_opinion = { + target = scope:child_a + modifier = trust_opinion + opinion = -20 + } + reverse_add_opinion = { + target = scope:child_b + modifier = hurt_opinion + opinion = -20 + } + # And we set up a hidden rivalry anyway. + hidden_effect = { + scope:child_b = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:child_a } + } + set_relation_potential_rival = scope:child_a + } + } + } + + stress_impact = { + base = medium_stress_loss + lazy = minor_stress_impact_loss + callous = minor_stress_impact_loss + diligent = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_energy = -0.5 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } +} + +################################################## +# A Shiny New Toy +# by Ewan Cowhig Croft +# 0621 - 0630 +################################################## + +scripted_trigger fp1_0621_valid_child_wants_loot_trigger = { + # Must be around. + child_suitable_to_play_with_character_one_sided = { CHARACTER = scope:raider } + # Quiet children aren't going to come down to the beach. + childhood_quiet_child_trigger = no +} + +# Your child asks you which piece of raid loot is theirs. +fp1_yearly.0621 = { + type = character_event + title = fp1_yearly.0621.t + desc = fp1_yearly.0621.desc + theme = war + left_portrait = { + character = scope:raider + animation = personality_rational + } + right_portrait = { + character = scope:child + animation = admiration + } + override_background = { reference = fp1_beached_longships } + + # Triggers handled in the setup event. + + # Weight multipliers handled in the setup event. + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0621 + days = 1825 + } + # Grab a suitable child. + random_child = { + limit = { fp1_0621_valid_child_wants_loot_trigger = yes } + # Weight up greedier children. + weight = { + base = 0 + modifier = { add = ai_greed } + } + save_scope_as = child + } + # Save a dummy gender for raid victims; reflects your child's biases rather than your actual experiences. + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + } + + # Of course you can take the big trophy. + option = { + name = fp1_yearly.0621.a + + # Scope:child gains lots of opinion of you. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 50 + } + # But you lose some gold. + remove_short_term_gold = minor_gold_value + + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = generous + } + } + } + + # Nothing now: maybe when you're older, you can earn your own. + option = { + name = fp1_yearly.0621.b + + # Scope:child gains some opinion of you. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = 10 + } + + # A fairly mild response, so no stress to be garnered. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = 0.5 + } + } + } + + # Away with you! This is for the adults. + option = { + name = fp1_yearly.0621.c + + # Gain some prestige. + add_prestige = minor_prestige_gain + # Scope:child is upset. + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -20 + } + + stress_impact = { + impatient = minor_stress_impact_loss + greedy = medium_stress_impact_loss + patient = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_compassion = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = impatient + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = patient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + } + } +} + +# Setup event to sort triggers, scopes, etc. +fp1_yearly.0622 = { + hidden = yes + scope = army + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Root must have been leading the army personally. + army_commander = scope:raider + # And some actual loot must have been recovered. + raid_loot >= 10 + # In which case we take a look at scope:raider & see how they stack up. + scope:raider = { + # Standard checks. + is_available_adult_or_is_commanding = yes + NOT = { has_character_flag = had_event_fp1_yearly_0621 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_coastal_norse_tribal = yes + # And must have a valid child laying about. + any_child = { fp1_0621_valid_child_wants_loot_trigger = yes} + } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for dedicated raiders. + modifier = { + add = 1 + scope:raider = { has_trait = viking } + } + # Or if you've brought home a truly excessive amount of loot. + modifier = { + add = 1 + raid_loot >= 200 + } + } + + immediate = { + save_scope_as = raiding_army + scope:raider = { trigger_event = fp1_yearly.0621 } + } +} + +################################################## +# A Cynical Bent +# by Ewan Cowhig Croft +# 0631 - 0640 +################################################## + +scripted_trigger fp1_0631_suitable_cynical_knight_trigger = { + # Must be in the correct army. + knight_army ?= $ARMY$ + # Has to share scope:raider's faith. + faith = scope:raider.faith + # Can't be zealous. + NOT = { has_trait = zealous } + # And must have at least decent learning. + learning >= decent_skill_rating +} + +# You notice a courtier refuses to sacrifice after a raid. +fp1_yearly.0631 = { + type = character_event + title = fp1_yearly.0631.t + desc = fp1_yearly.0631.desc + theme = faith + left_portrait = { + character = scope:cynic + animation = personality_cynical + } + override_background = { reference = fp1_beached_longships } + + # Triggers handled in the setup event. + + # Weight multipliers handled in the setup event. + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0631 + days = 1825 + } + # Grab an appropriate knight. + random_knight = { + limit = { + fp1_0631_suitable_cynical_knight_trigger = { ARMY = scope:raiding_army } + } + # Weight up cynical knights. + weight = { + base = 0 + modifier = { + add = { + value = ai_zeal + multiply = -1 + } + } + } + save_scope_as = cynic + } + } + + # Lecture them for their impiety. + option = { + name = fp1_yearly.0631.a + + # Learning duel over piety. + duel = { + skill = learning + target = scope:cynic + # You succeed in shaming scope:knight. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0631.a.tt_success + send_interface_toast = { + title = fp1_yearly.0631.a.tt_success + left_icon = scope:cynic + add_piety = medium_piety_gain + reverse_add_opinion = { + target = scope:cynic + modifier = annoyed_opinion + opinion = -20 + } + } + } + # Scope:knight makes you look like a fool. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0631.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0631.a.tt_failure + left_icon = scope:cynic + add_piety = minor_piety_loss + reverse_add_opinion = { + target = scope:cynic + modifier = respect_opinion + opinion = -30 + } + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + generous = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + zealous = major_stress_impact_loss + greedy = major_stress_impact_loss + shy = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + # Event cannot be triggered if you have cynical. + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight up for stress. + add = 30 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = forgiving + } + } + } + + # Quietly keep your own tribute too. + option = { + name = fp1_yearly.0631.b + + # Gain a little gold. + add_gold = tiny_gold_value + # Lose a little piety. + add_piety = miniscule_piety_loss + + stress_impact = { + greedy = medium_stress_impact_loss + generous = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_zeal = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + # Shrug and move on. + option = { + name = fp1_yearly.0631.c + + # Gain opinion with scope:knight. + reverse_add_opinion = { + target = scope:cynic + modifier = grateful_opinion + opinion = 20 + } + + stress_impact = { + forgiving = medium_stress_impact_loss + vengeful = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.25 + ai_greed = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } +} + +# Setup event to sort triggers, scopes, etc. +fp1_yearly.0632 = { + hidden = yes + scope = army + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Root must have been leading the army personally. + army_commander = scope:raider + # And some actual loot must have been recovered. + raid_loot >= 10 + # In which case we take a look at scope:raider & see how they stack up. + scope:raider = { + # Standard checks. + is_available_adult_or_is_commanding = yes + NOT = { has_character_flag = had_event_fp1_yearly_0631 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_coastal_norse_tribal = yes + # And there's an appropriate knightly target. + any_knight = { + fp1_0631_suitable_cynical_knight_trigger = { ARMY = root } + } + # And remove any dedicated cynics. + NOT = { has_trait = cynical } + } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for the zealous, who are more likely to notice. + modifier = { + add = 1 + scope:raider = { has_trait = zealous } + } + } + + immediate = { + save_scope_as = raiding_army + scope:raider = { trigger_event = fp1_yearly.0631 } + } +} + +################################################## +# Worthy of the Ocean +# by Ewan Cowhig Croft +# 0641 - 0650 +################################################## + +scripted_trigger fp1_0641_raider_with_longships_trigger = { + can_raid_trigger = yes + culture = { has_innovation = innovation_longboats } + any_sub_realm_county = { is_coastal_county = yes } +} + +scripted_trigger fp1_0641_neighbouring_ruler_with_stealable_ships_trigger = { + # Doesn't have a friendly relationship with root. + has_friendly_relationship_with_root_trigger = no + # Has stealable longboats. + fp1_0641_raider_with_longships_trigger = yes +} + +# Your longships seem to be in poor nick. +fp1_yearly.0641 = { + type = character_event + title = fp1_yearly.0641.t + desc = fp1_yearly.0641.desc + theme = intrigue + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:neighbour + animation = dismissal + } + override_background = { reference = fp1_beached_longships } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0641 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_0641_raider_with_longships_trigger = yes + } + + weight_multiplier = { + base = 1 + + # Weight down a little if you're a raider or diligent, used to keeping your longships in tip-top condition. + modifier = { + add = -0.5 + has_trait = viking + } + modifier = { + add = -0.5 + has_trait = diligent + } + # And up a little for adventurers and the lazy, who wear their ships hard & can't be arsed respectively. + modifier = { + add = 0.5 + has_trait = adventurer + } + modifier = { + add = 0.5 + has_trait = lazy + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0641 + days = 1825 + } + # Try to grab a suitable neighbour. + if = { + limit = { + any_neighboring_and_across_water_realm_same_rank_owner = { fp1_0641_neighbouring_ruler_with_stealable_ships_trigger = yes } + } + random_neighboring_and_across_water_realm_same_rank_owner = { + # Prefer rivals first. + limit = { + any_neighboring_and_across_water_realm_same_rank_owner = { + any_relation = { + type = rival + this = root + } + fp1_0641_neighbouring_ruler_with_stealable_ships_trigger = yes + } + } + # Otherwise, just whoever. + alternative_limit = { + any_neighboring_and_across_water_realm_same_rank_owner = { fp1_0641_neighbouring_ruler_with_stealable_ships_trigger = yes } + } + save_scope_as = neighbour + } + } + } + + # Pay to fix them. + option = { + name = fp1_yearly.0641.a + trigger = { + can_make_expensive_purchase_trigger = { PRICE = minor_gold_value } + } + + # The boat are repaired without issue. + custom_tooltip = fp1_yearly.0641.a.tt + # Lose a little gold. + remove_treasury_or_gold = minor_treasury_or_gold_value + + stress_impact = { + generous = minor_stress_impact_loss + honest = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -10 + has_trait = greedy + } + } + } + + # Steal some from a neighbouring ruler. + option = { + name = fp1_yearly.0641.b + trigger = { exists = scope:neighbour } + + # Intrigue duel to nab the boats in the night. + duel = { + skill = intrigue + target = scope:neighbour + # You heist the longships gleefully. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0641.b.tt_success + send_interface_toast = { + title = fp1_yearly.0641.b.tt_success + left_icon = scope:neighbour + add_character_modifier = { + modifier = fp1_excellent_longships_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:neighbour + modifier = angry_opinion + opinion = -50 + } + } + } + # You're caught and have to leg it. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0641.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0641.b.tt_failure + left_icon = scope:neighbour + add_character_modifier = { + modifier = fp1_rotting_longships_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:neighbour + modifier = annoyed_opinion + opinion = -20 + } + } + } + } + # Try to earmark scope:neighbour as a potential rival. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:neighbour } + } + set_relation_potential_rival = scope:neighbour + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + greedy = medium_stress_impact_loss + deceitful = medium_stress_impact_loss + just = minor_stress_impact_gain + generous = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.25 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = deceitful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = just + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = honest + } + } + } + + # Commission new vessels from a fancy shipwright. + option = { + name = fp1_yearly.0641.c + trigger = { + can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } + } + + # Gain a modifier boosting naval speed & reducing embark cost. + add_character_modifier = { + modifier = fp1_excellent_longships_modifier + years = 10 + } + # Lose a bit more gold. + remove_treasury_or_gold = medium_treasury_or_gold_value + + stress_impact = { + diligent = minor_stress_impact_loss + generous = medium_stress_impact_loss + lazy = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_greed = -1 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight up for stress. + add = 20 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + } + } + + # Bah, let them rot. What's the harm? + option = { + name = fp1_yearly.0641.d + + # Gain a modifier reducing naval speed & increasing embark cost. + add_character_modifier = { + modifier = fp1_rotting_longships_modifier + years = 10 + } + # Someone else's problem, right? + ## Stress loss handled in stress impact. + + stress_impact = { + base = major_stress_loss + lazy = medium_stress_impact_loss + greedy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_greed = -0.5 + ai_energy = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + } + } +} + +################################################## +# Leviathan +# by Ewan Cowhig Croft +# 0651 - 0660 +################################################## + +# You're out sailing when you spot a whale. +fp1_yearly.0651 = { + type = character_event + title = fp1_yearly.0651.t + desc = fp1_yearly.0651.desc + theme = hunt_activity + left_portrait = { + character = root + animation = shock + } + override_background = { reference = fp1_ocean_norse } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0651 } + is_playable_character = yes + is_landed = yes + # Must have a coastal capital. + capital_county = { is_coastal_county = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up for the Norse a bit. + modifier = { + add = 1 + fp1_is_norse = yes + } + # Raiders spend more time at sea. Probably. Vikings do at least. + modifier = { + add = 1 + has_trait = viking + } + # Adventurers spend more time at sea. Also probably. + modifier = { + add = 1 + has_trait = adventurer + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0651 + years = 50 + } + } + + # Static gold is used rather than dynamic throughout this event. This is to account for whale value not adjusting with your scale (even if it probably should with region): a gold mine for a poor tribal is a month's tax for a highly developed king. + + # Get the harpoons! + option = { + name = fp1_yearly.0651.a + + # Prowess challenge to slaughter the whale. + duel = { + skill = prowess + value = decent_skill_rating + # You haul the whale to shore and butcher it. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0651.a.tt_success + send_interface_toast = { + title = fp1_yearly.0651.a.tt_success + left_icon = root + # Per the comment below the immediate block, the static gold is deliberate. + add_gold = 100 + } + } + # The beast escapes you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0651.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0651.a.tt_failure + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + vengeful = miniscule_stress_impact_loss # From Hell's Heart I stab at thee, etc. + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_compassion = -0.25 + } + modifier = { # Weight up for stress. + add = 5 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # Just bring me the carcass. + option = { + name = fp1_yearly.0651.b + + # Gain some minor gold. + ## Per the comment below the immediate block, the static gold is deliberate. + add_gold = 50 + + stress_impact = { + greedy = minor_stress_impact_loss + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.25 + ai_energy = -0.25 + ai_compassion = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # (Hunter) A *grand* quarry! + option = { + name = fp1_yearly.0651.c + trigger = { has_trait = lifestyle_hunter } + trait = lifestyle_hunter + # You face a *true* leviathan. + custom_tooltip = fp1_yearly.0651.c.tt + # More difficult prowess challenge for greater rewards. + duel = { + skill = prowess + value = very_high_skill_rating + # You haul the whale to shore and butcher it. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0651.c.tt_success + send_interface_toast = { + title = fp1_yearly.0651.c.tt_success + left_icon = root + # Per the comment below the immediate block, the static gold is deliberate. + add_gold = 300 + } + } + # The beast escapes you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0651.c.tt_failure + send_interface_toast = { + title = fp1_yearly.0651.c.tt_failure + left_icon = root + increase_wounds_effect = { REASON = hunting_accident } + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + vengeful = miniscule_stress_impact_loss # From Hell's Heart I stab at thee, etc. + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.75 + ai_energy = 0.75 + ai_compassion = -0.25 + } + modifier = { # Weight up for stress. + add = 5 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # A creature of fearsome majesty, leave it. + option = { + name = fp1_yearly.0651.d + + # The whale goes free. + custom_tooltip = fp1_yearly.0651.d.tt + # You gain a little prestige for your kindness. + add_prestige = minor_prestige_gain + + stress_impact = { + generous = minor_stress_impact_loss + compassionate = medium_stress_impact_loss + craven = major_stress_impact_loss + greedy = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 20 + has_trait = compassionate + } + modifier = { # Weight up for stress. + add = 30 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +################################################## +# A Novel Challenge +# by Ewan Cowhig Croft +# 0661 - 0670 +################################################## + +scripted_trigger fp1_0661_knight_appropriate_for_skiing_trigger = { + # Has to be around. + is_available_ai_adult = yes + # And in the capital. + location = root.location + # And have no disqualifying traits. + NOR = { + # Personality blockers. + has_trait = shy + has_trait = lazy + has_trait = humble + has_trait = craven + # Not that it's impossible, just unlikely for the period & tech level. + has_trait = one_legged + } + # Finally, no negative relationship with root. + has_any_bad_relationship_with_root_trigger = no +} + +# One of your knights challenges you to skiing. +fp1_yearly.0661 = { + type = character_event + title = fp1_yearly.0661.t + desc = fp1_yearly.0661.desc + theme = friendly + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:knight + animation = personality_bold + } + override_background = { reference = feast } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0661 } + is_playable_character = yes + # Must be a suitable culture. + culture_uses_frequent_winter_transportation_trigger = yes + # Gotta have snow in the capital. + character_capital_has_winter_trigger = yes + # And have an available knight. + any_knight = { fp1_0661_knight_appropriate_for_skiing_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight according to winter scale. + character_capital_has_snow_suitable_for_activities = { CHARACTER = root } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0661 + days = 1825 + } + # Grab an appropriate knight. + random_knight = { + limit = { fp1_0661_knight_appropriate_for_skiing_trigger = yes } + save_scope_as = knight + } + } + + # How unusual! I accept! + option = { + name = fp1_yearly.0661.a + trigger = { + NOT = { has_trait = winter_soldier } + } + + # Prowess duel vs. scope:knight. + duel = { + skill = prowess + target = scope:knight + # It's close, but you win! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0661.a.tt_success + send_interface_toast = { + title = fp1_yearly.0661.a.tt_success + left_icon = scope:knight + add_prestige = minor_prestige_gain + progress_towards_friend_effect = { + CHARACTER = scope:knight + OPINION = 30 + REASON = friend_ski_race + } + } + } + # Scope:knight skids to victory. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0661.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0661.a.tt_failure + left_icon = scope:knight + add_prestige = minor_prestige_loss + progress_towards_friend_effect = { + CHARACTER = scope:knight + OPINION = 10 + REASON = friend_ski_race + } + } + } + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + ai_honor = 0.5 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -20 + has_trait = craven + } + } + } + + # Winter Soldier: Out in the snow? I accept. + option = { + name = fp1_yearly.0661.a.2 + trigger = { has_trait = winter_soldier } + trait = winter_soldier + + custom_tooltip = fp1_yearly.0661.a.2.tt + add_prestige = minor_prestige_gain + progress_towards_friend_effect = { + CHARACTER = scope:knight + OPINION = 50 + REASON = friend_ski_race + } + + stress_impact = { + diligent = minor_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + ai_honor = 0.5 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + # Hobble the competition, then race. + option = { + name = fp1_yearly.0661.b + + # Intrigue duel vs. scope:knight. + duel = { + skill = intrigue + target = scope:knight + # My, what an *effortless* win you have there. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0661.b.tt_success + send_interface_toast = { + title = fp1_yearly.0661.b.tt_success + left_icon = scope:knight + add_prestige = medium_prestige_gain + reverse_add_opinion = { + target = scope:knight + modifier = suspicion_opinion + opinion = -5 + } + } + } + # Scope:knight discovers you in the act. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0661.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0661.b.tt_failure + left_icon = scope:knight + add_prestige = medium_prestige_loss + progress_towards_rival_effect = { + REASON = rival_attempted_to_cheat_race + CHARACTER = scope:knight + OPINION = -40 + } + } + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + deceitful = medium_stress_impact_loss + just = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + ai_sociability = 0.25 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 20 + has_trait = deceitful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = just + } + modifier = { # Weight down for stress. + add = -20 + has_trait = honest + } + } + } + + # *Competitive* skiing? With no hunting? Get lost. + option = { + name = fp1_yearly.0661.c + + # Some minor opt-out prestige. + add_prestige = miniscule_prestige_gain + # You upset scope:knight a bit, though. + reverse_add_opinion = { + target = scope:knight + modifier = disappointed_opinion + opinion = -10 + } + + stress_impact = { + lazy = minor_stress_impact_loss + craven = minor_stress_impact_loss + lifestyle_hunter = medium_stress_impact_loss + brave = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = craven + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lifestyle_hunter + } + modifier = { # Weight down for stress. + add = -10 + has_trait = brave + } + } + } +} + +################################################## +# A Slippery Slope +# by Ewan Cowhig Croft +# 0671 - 0680 +################################################## + +scripted_trigger fp1_0671_available_older_sibling_trigger = { + this != scope:child + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # Should be older than scope:child. + age > scope:child.age + # Mustn't have a terribly negative relationship with scope:child. + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:child } + } + opinion = { + target = scope:child + value >= medium_negative_opinion + } +} + +# Your child wants you to go sledding with them. +fp1_yearly.0671 = { + type = character_event + title = fp1_yearly.0671.t + desc = fp1_yearly.0671.desc + theme = family + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:child + animation = admiration + } + lower_right_portrait = scope:sibling + override_background = { reference = bedchamber } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0671 } + is_landed = yes + # Gotta have snow in the capital. + character_capital_has_winter_trigger = yes + # And an available child. + any_child = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + } + } + + weight_multiplier = { + base = 1 + + # Weight according to winter scale. + character_capital_has_snow_suitable_for_activities = { CHARACTER = root } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0671 + days = 1825 + } + # Grab a suitable child. + random_child = { + limit = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + } + save_scope_as = child + } + # If there's a suitable sibling, nab them for later. + if = { + limit = { + any_child = { fp1_0671_available_older_sibling_trigger = yes } + } + random_child = { + limit = { fp1_0671_available_older_sibling_trigger = yes } + save_scope_as = sibling + } + } + add_character_flag = { + flag = use_sickness_clothes + days = 1 + } + } + + # (Strong/Physique_Good) Hah, let me just haul this table out for us! + option = { + name = fp1_yearly.0671.a + trigger = { + OR = { + has_trait = strong + has_trait = physique_good + } + } + trait = strong + trait = physique_good_1 + trait = physique_good_2 + trait = physique_good_3 + + # Gain huge opinion boost with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 50 + } + # Grow closer to becoming friends with scope:child, if possible. + progress_towards_friend_effect = { + CHARACTER = scope:child + OPINION = 0 + REASON = friend_sledding + } + + stress_impact = { + gregarious = minor_stress_impact_loss + diligent = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + } + } + + # Come on, let's get a tray from the kitchen. + option = { + name = fp1_yearly.0671.b + trigger = { + NOR = { + has_trait = strong + has_trait = physique_good + } + } + + # Gain large opinion boost with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 25 + } + + stress_impact = { + gregarious = minor_stress_impact_loss + diligent = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + } + } + + # Go ask your [sibling]. + option = { + name = fp1_yearly.0671.c + trigger = { exists = scope:sibling } + + # Scope:child & scope:sibling both gain opinion of each other. + scope:child = { + progress_towards_friend_effect = { + CHARACTER = scope:sibling + OPINION = 30 + REASON = friend_sledding + } + } + + # Quite a mild response, so no stress involved. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = -0.25 + ai_sociability = -0.25 + } + } + } + + # Away with you, I'm busy. + option = { + name = fp1_yearly.0671.d + + # Lose stress. + ## Stress loss handled in stress_impact. + # But also opinion with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -20 + } + + stress_impact = { + base = major_stress_loss + lazy = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.25 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # Get out of your pajamas. + after = { remove_character_flag = use_sickness_clothes } +} + +################################################## +# Why Can't I Come? +# by Ewan Cowhig Croft +# 0681 - 0690 +################################################## + +scripted_trigger fp1_0681_haughty_knights_trigger = { + # Has enough prowess that they're proud of it. + prowess >= medium_skill_rating + # And lacks any humbling traits. + NOR = { + has_trait = humble + has_trait = compassionate + has_trait = forgiving + } +} + +scripted_trigger fp1_0681_child_that_might_like_raiding_trigger = { + # Must be around. + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # We want basically anyone who might think it's exciting. + NOT = { has_trait = pensive } +} + +# One of your children wants to know why they can't come raiding. +fp1_yearly.0681 = { + type = character_event + title = fp1_yearly.0681.t + desc = fp1_yearly.0681.desc + theme = war + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:child + animation = admiration + } + override_background = { reference = study } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0681 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_coastal_norse_tribal = yes + # Raiding must be recent or ever-present. + OR = { + has_trait = viking + has_character_flag = has_recently_performed_raid + } + # At least some of your knights should be snobbish. + any_knight = { fp1_0681_haughty_knights_trigger = yes } + # And you must have a suitable child. + any_child = { fp1_0681_child_that_might_like_raiding_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up a bit for adventurers & vikings. + modifier = { + add = 0.5 + has_trait = adventurer + } + modifier = { + add = 0.5 + has_trait = viking + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0681 + days = 1825 + } + # Grab a suitable child. + random_child = { + limit = { fp1_0681_child_that_might_like_raiding_trigger = yes } + save_scope_as = child + } + } + + # I'm leaving you to guard [capital], ok? + option = { + name = fp1_yearly.0681.a + + # Gain opinion with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = trust_opinion + opinion = 20 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.75 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -10 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = sadistic + } + } + } + + # _Hah_! You'll never be a true warrior, child. + option = { + name = fp1_yearly.0681.b + + # Gain opinion with all of your haughty knights. + every_knight = { + limit = { fp1_0681_haughty_knights_trigger = yes } + custom = fp1_yearly.0681.b.haughty_knights + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + # Lose opinion with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -30 + } + # Add hidden potential rivalry if possible. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:child } + } + set_relation_potential_rival = scope:child + } + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # We'll talk about it when you're older. + option = { + name = fp1_yearly.0681.c + + # Gain some minor opinion with your knights. + every_knight = { + custom = custom.every_knight + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + # But lose opinion with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -10 + } + + # Mild response, incurs no stress. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + ai_sociability = -0.25 + } + } + } +} + +################################################## +# Attempted Atonement +# by Ewan Cowhig Croft +# 0691 - 0700 +################################################## + +scripted_trigger fp1_0692_valid_convertable_knight_trigger = { + # Must be in the army's location. + location = root.location + # & share scope:raider's faith, which isn't reformed. + faith = { + this = scope:raider.faith + has_doctrine_parameter = unreformed + } + # Shouldn't have anything that might block them from converting. + NOR = { + has_trait = arrogant + has_trait = content + has_trait = cynical + has_trait = zealous + has_trait = paranoid + # Sadists are too busy for introspection. + has_trait = sadistic + } + # And should be landless. + is_courtier_of = scope:raider + # Children can be rebellious, but we should probably filter them out too. + NOT = { + any_parent = { this = scope:raider } + } +} + +scripted_trigger fp1_0691_knight_still_valid_convertable_trigger = { + # Has all the appropriate variables; they come as a matched pair, but just in case. + has_variable = raid_convert_county + has_variable = raid_convert_faith + # Standard checks. + is_available_ai_adult = yes + is_courtier_of = root + # Make sure that they're still of root's faith, and that root hasn't converted to their new faith. + faith = root.faith + NOT = { this.var:raid_convert_faith = root.faith } + # Shouldn't have become committed to a religious stance, but just check they've not managed to sneak-acquire traits in the meanwhilst. + NOR = { + has_trait = zealous + has_trait = cynical + } +} + +# One of your knights finds new faith after a raid. +fp1_yearly.0691 = { + type = character_event + title = fp1_yearly.0691.t + desc = fp1_yearly.0691.desc + theme = war + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:knight + animation = personality_zealous + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0691 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse_tribal = yes + # There must be at least one knight who's had a crisis of conscience. + any_knight = { fp1_0691_knight_still_valid_convertable_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Knights feel more comfortable converting away if you're not particularly religious. + modifier = { + add = 0.5 + has_trait = cynical + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0691 + days = 3650 + } + # Grab a suitable knight. + random_knight = { + limit = { fp1_0691_knight_still_valid_convertable_trigger = yes } + weight = { + base = 0 + # Weight up fickle & trusting characters. + ## Fickle characters are more likely to heel-face-turn on their pillaging faith. + modifier = { + add = 100 + has_trait = fickle + } + ## Trusting characters are more gullible, and they *did* take thralls. + modifier = { + add = 100 + has_trait = trusting + } + } + save_scope_as = knight + } + # Convert them & boost their zeal. + scope:knight = { + set_character_faith = this.var:raid_convert_faith + add_trait = zealous + } + # Grab the source county for loc. + scope:knight.var:raid_convert_county = { save_scope_as = county } + } + + # Surely I can talk you out of this foreign faith? + option = { + name = fp1_yearly.0691.a + + # Learning duel to get them to recant & stay. + duel = { + skill = learning + target = scope:knight + # You bring them back to the light. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0691.a.tt_success + send_interface_toast = { + title = fp1_yearly.0691.a.tt_success + left_icon = scope:knight + # They reconvert. + scope:knight = { set_character_faith = root.faith } + # And you either get a hook on them... + if = { + limit = { + can_add_hook = { + target = scope:knight + type = favor_hook + } + } + add_hook = { + target = scope:knight + type = favor_hook + } + } + # Or a goodly chunk of opinion. + else = { + reverse_add_opinion = { + target = scope:knight + modifier = grateful_opinion + opinion = 30 + } + } + } + } + # They refuse and leave. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0691.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0691.a.tt_failure + left_icon = scope:knight + # They leave. + scope:knight = { select_and_move_to_pool_effect = yes } + # And they're none too happy with you. + reverse_add_opinion = { + target = scope:knight + modifier = insult_opinion + opinion = -25 + } + } + } + } + + stress_impact = { + humble = minor_stress_impact_loss + zealous = major_stress_impact_loss + arrogant = minor_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.75 + ai_boldness = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = humble + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # GetFaith.GetReligion.GetName? You've gone mad. Guards! + option = { + name = fp1_yearly.0691.b + + # Quietly move scope:knight to the pool so you're no longer their liege. + hidden_effect = { + scope:knight = { move_to_pool = yes } + } + # Throw scope:knight in the dungeon immediately. + rightfully_imprison_character_effect = { + TARGET = scope:knight + IMPRISONER = root + } + hidden_effect = { + scope:knight = { change_prison_type = dungeon } + } + # Scope:knight is understandably angry. + reverse_add_opinion = { + target = scope:knight + modifier = hate_opinion + opinion = -50 + } + # Quietly mark them for future rivalry. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:knight } + } + set_relation_potential_rival = scope:knight + } + } + # But, hey, piety & same-faith courtier & guest opinion. + every_courtier_or_guest = { + limit = { + faith = root.faith + NOT = { has_trait = cynical } + } + custom = fp1_yearly.0691.b.same_faith_courtiers_and_guests + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + + stress_impact = { + vengeful = major_stress_impact_loss + zealous = major_stress_impact_loss + forgiving = major_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.5 + ai_energy = -0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # You may go if you wish. + option = { + name = fp1_yearly.0691.c + + # Gain a little prestige. + add_prestige = minor_prestige_gain + # And the knight's gratitude. + reverse_add_opinion = { + target = scope:knight + modifier = grateful_opinion + opinion = 35 + } + # But lose the knight. + scope:knight = { select_and_move_to_pool_effect = yes } + + stress_impact = { + forgiving = major_stress_impact_loss + cynical = major_stress_impact_loss + vengeful = major_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = forgiving + } + modifier = { # Weight up for stress. + add = 30 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -30 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } +} + +# Set-up event for raiding. +fp1_yearly.0692 = { + hidden = yes + scope = army + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # We only want to convert to reformed faiths. + scope:county.faith = { + NOT = { has_doctrine_parameter = unreformed } + } + # Check various prerequisites with scope:raider. + scope:raider = { + # Scope:raider shouldn't have had this event recently either. + #NOT = { has_character_flag = had_event_fp1_yearly_0691 } + # We don't want all raiding to result in tons of variables floating about. + fp1_is_norse_tribal = yes + # There must be at least one eligible knight in the raid army. + any_knight = { fp1_0692_valid_convertable_knight_trigger = yes } + } + } + + immediate = { + # Designate a suitable knight. + scope:raider = { + random_knight = { + # Preferring those who might be more open to new ideas. + limit = { + fp1_0692_valid_convertable_knight_trigger = yes + OR = { + has_trait = humble + has_trait = honest + has_trait = ambitious + has_trait = gregarious + has_trait = arbitrary + has_trait = trusting + has_trait = fickle + } + } + # But otherwise just anyone valid. + alternative_limit = { fp1_0692_valid_convertable_knight_trigger = yes } + # Remember the county it happened in. + set_variable = { + name = raid_convert_county + value = scope:county + years = 5 + } + # And the faith they'd like to convert to. + set_variable = { + name = raid_convert_faith + value = scope:county.faith + years = 5 + } + } + } + } +} + + + + + + + + + + +################################################## +# SPECIAL YEARLIES + +################################################## +# A Mysterious Stranger Stays at Court +# by Ewan Cowhig Croft +# 1001 - 1030 +################################################## + +scripted_trigger valid_germanic_faith_trigger = { + #Small enough that it probably doesn't need a trigger, but might need to be more complex in future. + religion = religion:germanic_religion +} + +scripted_trigger valid_non_germanic_reformed_faith_trigger = { + NOR = { + faith = { has_doctrine_parameter = unreformed } + religion = religion:germanic_religion + } +} + +scripted_effect fp1_mysterious_stranger_follow_up_event_picker_effect = { + if = { + limit = { scope:ms_type = flag:godi } + trigger_event = fp1_yearly.1011 + } + else_if = { + limit = { scope:ms_type = flag:missionary } + trigger_event = fp1_yearly.1012 + } + else_if = { + limit = { scope:ms_type = flag:nithing } + trigger_event = fp1_yearly.1013 + } + else_if = { + limit = { scope:ms_type = flag:warrior } + trigger_event = fp1_yearly.1014 + } + #Trigger vagrant as the last possible thing. + else = { trigger_event = fp1_yearly.1015 } +} + +scripted_effect mysterious_stranger_disappears_effect = { + custom_tooltip = fp1_yearly.1001.mysterious_stranger_disappears.tt + hidden_effect = { + scope:stranger = { + death = { death_reason = death_vanished } + } + } +} + +# You notice a stranger has been hanging around the court. +fp1_yearly.1001 = { + type = character_event + title = fp1_yearly.1001.t + desc = { + desc = fp1_yearly.1001.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:sneaks } + desc = fp1_yearly.1001.desc.behaviour_1.sneaks + } + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:leaves_early } + desc = fp1_yearly.1001.desc.behaviour_1.leaves_early + } + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:earnest } + desc = fp1_yearly.1001.desc.behaviour_1.earnest + } + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:confident } + desc = fp1_yearly.1001.desc.behaviour_1.confident + } + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:talkative } + desc = fp1_yearly.1001.desc.behaviour_1.talkative + } + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:eats_their_fill } + desc = fp1_yearly.1001.desc.behaviour_1.eats_their_fill + } + } + first_valid = { + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:sneaks } + desc = fp1_yearly.1001.desc.behaviour_2.sneaks + } + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:leaves_early } + desc = fp1_yearly.1001.desc.behaviour_2.leaves_early + } + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:earnest } + desc = fp1_yearly.1001.desc.behaviour_2.earnest + } + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:confident } + desc = fp1_yearly.1001.desc.behaviour_2.confident + } + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:talkative } + desc = fp1_yearly.1001.desc.behaviour_2.talkative + } + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:eats_their_fill } + desc = fp1_yearly.1001.desc.behaviour_2.eats_their_fill + } + } + desc = fp1_yearly.1001.desc.outro + } + theme = intrigue + left_portrait = { + character = scope:stranger + animation = personality_honorable + } + override_background = { reference = feast } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + NOT = { has_character_flag = had_event_fp1_yearly_1001 } + #Scandinavian culture group, and within Scandinavia (plus a few other places). + culture = { has_cultural_pillar = heritage_north_germanic } + capital_province ?= { geographical_region = dlc_fp1_region_mysterious_stranger_locations } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_1001 + days = 7300 + } + #Spawn a suitable mysterious stranger. + ##Each of these has a list of traits that overlap with 1-2 other spawnable categories, as well as some unique tells. + ##The idea is that they're structured enough to be able to guess (sorta) first time, but random enough that you won't always guess correctly. At the same time, learning the tells over time, and what makes a character definitely/definitely not a specific type of stranger, rewards repeated play. + random_list = { + #Spawn a godi. + 100 = { + #Requires some contact with Germanic Paganism. + trigger = { + OR = { + valid_germanic_faith_trigger = yes + any_sub_realm_county = { valid_germanic_faith_trigger = yes } + any_neighboring_top_liege_realm_owner = { valid_germanic_faith_trigger = yes } + } + } + #Create the character & set up details for later. + create_character = { + location = root.capital_province + template = fp1_ms_godi_character + save_scope_as = stranger + } + save_scope_value_as = { + name = ms_type + value = flag:godi + } + #Figure out what faith the godi would actually have. + ##Only a random chance for now: this is to give same-religion separate-faith godis a chance to spawn if you're Germanic Pagan yourself. + random = { + chance = 50 + if = { + limit = { valid_germanic_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + } + if = { + limit = { + NOT = { exists = scope:ms_faith } + any_sub_realm_county = { valid_germanic_faith_trigger = yes } + } + random_sub_realm_county = { + limit = { valid_germanic_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + } + else_if = { + limit = { + any_neighboring_top_liege_realm_owner = { valid_germanic_faith_trigger = yes } + } + random_neighboring_top_liege_realm_owner = { + limit = { valid_germanic_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + } + else = { + #If you hit this stage, go back to your own Germanic Pagan faith. + faith = { save_scope_as = ms_faith } + } + } + #Spawn a missionary from a reformed faith. + 100 = { + #Requires some contact with a reformed faith that isn't Germanic Pagan. + trigger = { + OR = { + valid_non_germanic_reformed_faith_trigger = yes + any_sub_realm_county = { valid_non_germanic_reformed_faith_trigger = yes } + any_neighboring_top_liege_realm_owner = { valid_non_germanic_reformed_faith_trigger = yes } + } + } + #Create the character & set up details for later. + create_character = { + location = root.capital_province + template = fp1_ms_reformed_missionary_character + save_scope_as = stranger + } + save_scope_value_as = { + name = ms_type + value = flag:missionary + } + #Figure out what faith the missionary would actually have. + if = { + limit = { valid_non_germanic_reformed_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + else_if = { + limit = { + any_sub_realm_county = { valid_non_germanic_reformed_faith_trigger = yes } + } + random_sub_realm_county = { + limit = { valid_non_germanic_reformed_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + } + else = { + random_neighboring_top_liege_realm_owner = { + limit = { valid_non_germanic_reformed_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + } + } + #Spawn a nithing. + 100 = { + #No requirements. + #Create the character & set up details for later. + create_character = { + location = root.capital_province + template = fp1_ms_nithing_character + save_scope_as = stranger + } + save_scope_value_as = { + name = ms_type + value = flag:nithing + } + } + #Spawn a warrior. + 100 = { + #No requirements. + #Create the character & set up details for later. + create_character = { + location = root.capital_province + template = fp1_ms_warrior_character + save_scope_as = stranger + } + save_scope_value_as = { + name = ms_type + value = flag:warrior + } + } + #Spawn an ordinary vagrant. + ##These guys are the wild cards: they have no restrictions on anything, save that they suck at everything. Their job is to be confusing and make you uncertain. + 100 = { + #No requirements. + #Create the character & set up details for later. + create_character = { + location = root.capital_province + template = fp1_ms_vagrant_character + save_scope_as = stranger + } + save_scope_value_as = { + name = ms_type + value = flag:vagrant + } + } + } + #Set behaviours. + ##Each stranger type exhibits two of three possible behaviour patterns in the event description. All behaviour patterns overlap with at least one other stranger type, with the vagrant having access to all of them. + random_list = { + #Godi + 100 = { + trigger = { scope:ms_type = flag:godi } + random_list = { + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:sneaks + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:leaves_early + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:earnest + } + } + } + random_list = { + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:sneaks } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:sneaks + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:leaves_early } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:leaves_early + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:earnest } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:earnest + } + } + } + } + #Missionary + 100 = { + trigger = { scope:ms_type = flag:missionary } + random_list = { + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:confident + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:leaves_early + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:talkative + } + } + } + random_list = { + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:confident } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:confident + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:leaves_early } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:leaves_early + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:talkative } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:talkative + } + } + } + } + #Nithing + 100 = { + trigger = { scope:ms_type = flag:nithing } + random_list = { + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:sneaks + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:eats_their_fill + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:earnest + } + } + } + random_list = { + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:sneaks } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:sneaks + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:eats_their_fill } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:eats_their_fill + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:earnest } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:earnest + } + } + } + } + #Warrior + 100 = { + trigger = { scope:ms_type = flag:warrior } + random_list = { + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:confident + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:eats_their_fill + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:talkative + } + } + } + random_list = { + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:confident } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:confident + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:eats_their_fill } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:eats_their_fill + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:talkative } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:talkative + } + } + } + } + #Vagrant + 100 = { + trigger = { scope:ms_type = flag:vagrant } + random_list = { + 20 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:sneaks + } + } + 20 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:leaves_early + } + } + 20 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:earnest + } + } + 20 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:confident + } + } + 20 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:talkative + } + } + } + random_list = { + 20 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:sneaks } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:sneaks + } + } + 20 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:leaves_early } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:leaves_early + } + } + 20 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:earnest } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:earnest + } + } + 20 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:confident } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:confident + } + } + 20 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:talkative } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:talkative + } + } + } + } + } + #And sometimes just remove an eye for funsies. + random = { + chance = 5 + scope:stranger = { add_trait = one_eyed } + } + } + + #Ignore them: they're probably harmless. + ##This leads to a standardised effect: something mildly beneficial/annoying, if the player is unsure or doesn't want to gamble much. + option = { + name = fp1_yearly.1001.a + + #Let the player know that something will happen. + custom_tooltip = fp1_yearly.1001.probably_harmless.tt + + #Configure for standard effects. + save_scope_value_as = { + name = ms_effect + value = flag:standard + } + + #Figure out which follow-up event to send. + fp1_mysterious_stranger_follow_up_event_picker_effect = yes + + stress_impact = { + trusting = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { #Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + } + } + + #Make them a guest of honour! + ##This leads to a critical effect: we dial up the consequences, in case the player is certain they know who the stranger is/wants to risk it for a biscuit. + option = { + name = fp1_yearly.1001.b + + #Warn the player that they're signing up for a dramatic event. + custom_tooltip = fp1_yearly.1001.guest_of_honour.tt + + #Configure for critical effects. + save_scope_value_as = { + name = ms_effect + value = flag:critical + } + + #Figure out which follow-up event to send. + fp1_mysterious_stranger_follow_up_event_picker_effect = yes + + stress_impact = { + trusting = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = trusting + } + modifier = { #Weight up for stress. + add = 20 + has_trait = gregarious + } + modifier = { #Weight down for stress. + add = -20 + has_trait = paranoid + } + } + } + + #Give 'em the boot. + ##Opt-out with mild consequence. + option = { + name = fp1_yearly.1001.c + + #The mysterious stranger vanishes. + mysterious_stranger_disappears_effect = yes + + #Everyone thinks you're a bit mean-spirited, but that's it. + if = { + limit = { has_character_modifier = generous_host_fp1_modifier } + remove_character_modifier = generous_host_fp1_modifier + } + else = { + add_character_modifier = { + modifier = stingy_host_fp1_modifier + years = 5 + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + shy = medium_stress_impact_loss + trusting = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = paranoid + } + modifier = { #Weight up for stress. + add = 20 + has_trait = shy + } + modifier = { #Weight down for stress. + add = -10 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -10 + has_trait = gregarious + } + } + } +} + +scripted_trigger mysterious_stranger_godi_same_faith_trigger = { + #Small enough that it probably doesn't need a trigger, but might need to be more complex in future. + faith = scope:ms_faith +} + +scripted_trigger mysterious_stranger_godi_same_religion_trigger = { + NOT = { mysterious_stranger_godi_same_faith_trigger = yes } + religion = scope:ms_faith.religion +} + +scripted_effect mysterious_stranger_add_possible_converts_to_specific_list_effect = { + random_in_list = { + list = possible_converts_pool_list + limit = { + NOT = { is_in_list = possible_converts_specific_list } + } + weight = { + base = 0 + #Give a base percentage chance, scale down 2% per point of learning. + modifier = { + add = { + value = 50 + subtract = learning + } + } + #Weight up assorted traits that make you more likely to believe the godi. + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 5 + has_trait = fickle + } + modifier = { + add = 10 + has_trait = trusting + } + } + add_to_list = possible_converts_specific_list + } +} + +scripted_effect mysterious_stranger_different_religion_convert_courtiers_effect = { + #Firstly, nab all the courtiers who might be susceptible to conversion, excepting any who'd mess you up too much. + every_courtier = { + limit = { + is_available_ai_adult = yes + #We only want to look at people of root's faith. + faith = root.faith + NOR = { + #Exclude the self-righteous. + has_trait = zealous + has_trait = faith_warrior + has_trait = heresiarch + has_trait = crusader_king + #Aaaand exclude the actually-righteous. + piety_level >= medium_piety_level + #We also don't want council conversions, since that could make for some awkward chaplains. + is_councillor_of = root + #Filter out likely heirs, so that we don't mess up succession too much. + is_primary_heir_of = root + is_player_heir_of = root + } + } + add_to_list = possible_converts_pool_list + } + #Nab specific courtiers for conversion. + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + #Nab even more if it's a a critical effect. + if = { + limit = { scope:ms_effect = flag:critical } + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + } +} + +# Results: Godi. +fp1_yearly.1011 = { + type = character_event + title = fp1_yearly.1011.t + desc = { + first_valid = { + #Critical - separate religion. + triggered_desc = { + trigger = { + scope:ms_effect = flag:critical + NOR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + desc = fp1_yearly.1011.desc.separate_religion.critical + } + #Standard - separate religion. + triggered_desc = { + trigger = { + scope:ms_effect = flag:standard + NOR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + desc = fp1_yearly.1011.desc.separate_religion.standard + } + #Critical - same religion, separate faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:critical + mysterious_stranger_godi_same_religion_trigger = yes + } + desc = fp1_yearly.1011.desc.same_religion.critical + } + #Standard - same religion, separate faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:standard + mysterious_stranger_godi_same_religion_trigger = yes + } + desc = fp1_yearly.1011.desc.same_religion.standard + } + #Critical - same faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:critical + mysterious_stranger_godi_same_faith_trigger = yes + } + desc = fp1_yearly.1011.desc.same_faith.critical + } + #Standard - same faith (fallback). + desc = fp1_yearly.1011.desc.same_faith.standard + } + } + theme = intrigue + left_portrait = { + character = scope:stranger + #The Godi respects fellow Germanic Pagans. + triggered_animation = { + trigger = { + root = { + OR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + } + animation = personality_zealous + } + #Less so those outside their religion. + triggered_animation = { + trigger = { + root = { + NAND = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + } + animation = anger + } + } + override_background = { reference = bedchamber } + + immediate = { + scope:stranger = { + #Boost education by a step. + ##Ordered backwards so that they don't sequentially overwrite each other. + if = { + limit = { has_trait = education_learning_3 } + hidden_effect = { remove_trait = education_learning_3 } + add_trait = education_learning_4 + } + if = { + limit = { has_trait = education_learning_2 } + hidden_effect = { remove_trait = education_learning_2 } + add_trait = education_learning_3 + } + if = { + limit = { has_trait = education_learning_1 } + hidden_effect = { remove_trait = education_learning_1 } + add_trait = education_learning_2 + } + if = { + limit = { has_trait = education_intrigue_3 } + hidden_effect = { remove_trait = education_intrigue_3 } + add_trait = education_intrigue_4 + } + if = { + limit = { has_trait = education_intrigue_2 } + hidden_effect = { remove_trait = education_intrigue_2 } + add_trait = education_intrigue_3 + } + if = { + limit = { has_trait = education_intrigue_1 } + hidden_effect = { remove_trait = education_intrigue_1 } + add_trait = education_intrigue_2 + } + #Boost stats. + add_diplomacy_skill = { 5 10 } + add_martial_skill = { 5 10 } + add_stewardship_skill = { 3 8 } + add_intrigue_skill = { 10 15 } + add_learning_skill = { 10 15 } + add_prowess_skill = { 5 10 } + #Change faith. + hidden_effect = { set_character_faith = scope:ms_faith } + #Finally: give them an eye-patch, assuming they're going to impersonate Odin. And aren't already missing an eye. + if = { + limit = { + religion = root.religion + NOT = { has_trait = one_eyed } + } + add_character_flag = wears_fake_eye_patch + } + #Reveal the godi's true stats. + hidden_effect = { force_character_skill_recalculation = yes } + } + #Organise a list of courtiers who might be affected for conversion. + mysterious_stranger_different_religion_convert_courtiers_effect = yes + #Godi is not even of your religion, giving negative effects. + if = { + limit = { + NOR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + #If the godi is not of your religion, they convert a bunch of your courtiers. + every_in_list = { + list = possible_converts_specific_list + custom = fp1_yearly.1011.possible_converts_specific_list + set_character_faith = scope:ms_faith + } + #You also lose some piety, or realm priest opinion if appropriate. Amount depends on whether you endorsed the godi or not. + if = { + limit = { scope:ms_effect = flag:critical } + if = { + limit = { + faith = { has_doctrine = doctrine_theocracy_lay_clergy } + #Double-check that they actually have a realm priest at the moment. + any_learning_councillor = { exists = this } + } + add_piety = medium_piety_loss + every_learning_councillor = { + add_opinion = { + target = root + modifier = fp1_honoured_heathen_opinion + } + } + } + else = { add_piety = major_piety_loss } + } + else = { add_piety = medium_piety_loss } + } + #Godi is of your religion, but not of your faith. + else_if = { + limit = { mysterious_stranger_godi_same_religion_trigger = yes } + #Better piety gain if you endorsed them. + if = { + limit = { scope:ms_effect = flag:critical } + add_piety = medium_piety_gain + } + else = { add_piety = minor_piety_gain } + } + #Otherwise, the godi is of your faith. + else = { + #As elsewhere, better piety gain if you endorsed them. + if = { + limit = { scope:ms_effect = flag:critical } + add_piety = major_piety_gain + } + else = { add_piety = medium_piety_gain } + } + } + + #Surely that cannot *truly* have been the Allfather? [spoilers: it wasn't] + option = { + name = fp1_yearly.1011.a + trigger = { + OR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + + #The godi vanishes. + mysterious_stranger_disappears_effect = yes + + ai_chance = { + #Only option. + base = 100 + } + } + + #Bastard! + option = { + name = fp1_yearly.1011.b + trigger = { + NOR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + + #The godi vanishes. + mysterious_stranger_disappears_effect = yes + + ai_chance = { + #Only option. + base = 100 + } + } +} + +# Results: Reformed Missionary. +fp1_yearly.1012 = { + type = character_event + title = fp1_yearly.1012.t + desc = { + first_valid = { + #Critical - different faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:critical + faith != scope:ms_faith + } + desc = fp1_yearly.1012.desc.different_faith.critical + } + #Standard - different faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:standard + faith != scope:ms_faith + } + desc = fp1_yearly.1012.desc.different_faith.standard + } + #Critical - same faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:critical + faith = scope:ms_faith + } + desc = fp1_yearly.1012.desc.same_faith.critical + } + #Standard - same faith (fallback). + desc = fp1_yearly.1012.desc.same_faith.standard + } + } + theme = intrigue + left_portrait = { + character = scope:stranger + #The missionary is pleased if they share your faith. + triggered_animation = { + trigger = { + root = { faith = scope:ms_faith } + } + animation = happiness + } + #Otherwise, they'll pray for you. + triggered_animation = { + trigger = { + NOT = { + root = { faith = scope:ms_faith } + } + } + animation = personality_zealous + } + } + override_background = { reference = bedchamber } + + immediate = { + scope:stranger = { + #Boost education by a step. + ##Ordered backwards so that they don't sequentially overwrite each other. + if = { + limit = { has_trait = education_learning_3 } + hidden_effect = { remove_trait = education_learning_3 } + add_trait = education_learning_4 + } + if = { + limit = { has_trait = education_learning_2 } + hidden_effect = { remove_trait = education_learning_2 } + add_trait = education_learning_3 + } + if = { + limit = { has_trait = education_learning_1 } + hidden_effect = { remove_trait = education_learning_1 } + add_trait = education_learning_2 + } + #Boost stats. + add_diplomacy_skill = { 5 10 } + add_martial_skill = { 5 10 } + add_stewardship_skill = { 3 8 } + add_intrigue_skill = { 5 10 } + add_learning_skill = { 10 15 } + add_prowess_skill = { 5 10 } + add_trait = theologian + #Change faith. + hidden_effect = { set_character_faith = scope:ms_faith } + #If scope:stranger's faith allows monks, make them a monk. + if = { + limit = { + faith = { has_doctrine_parameter = take_vows_active } + } + add_trait = devoted + #Huahua! Don't you see, they were wearing a toupee the whole time! + } + #Reveal the missionary's true stats. + hidden_effect = { force_character_skill_recalculation = yes } + } + #Organise a list of courtiers who might be affected for conversion. + mysterious_stranger_different_religion_convert_courtiers_effect = yes + #The missionary does not share your faith. + if = { + limit = { + faith != scope:ms_faith + } + #They convert a bunch of your courtiers. + every_in_list = { + list = possible_converts_specific_list + custom = fp1_yearly.1012.possible_converts_specific_list + set_character_faith = scope:ms_faith + } + #You also lose some piety, or realm priest opinion if appropriate. Amount depends on whether you endorsed the missionary or not. + if = { + limit = { scope:ms_effect = flag:critical } + if = { + limit = { + faith = { has_doctrine = doctrine_theocracy_lay_clergy } + #Double-check that they actually have a realm priest at the moment. + any_learning_councillor = { exists = this } + } + add_piety = medium_piety_loss + every_learning_councillor = { + add_opinion = { + target = root + modifier = fp1_honoured_heathen_opinion + } + } + } + else = { add_piety = major_piety_loss } + } + else = { add_piety = medium_piety_loss } + } + #Otherwise, the missionary has the same faith as you. + else = { + #If endorsed, they offers you a hook on & opinion with your realm priest (assuming such is valid). + if = { + limit = { + scope:ms_effect = flag:critical + faith = { has_doctrine = doctrine_theocracy_lay_clergy } + #Double-check that you actually have a realm priest, and that a weak hook can be added. + any_learning_councillor = { + exists = this + save_temporary_scope_as = learning_councillor + root = { + can_add_hook = { + type = favor_hook + target = scope:learning_councillor + } + } + } + } + random_learning_councillor = { + limit = { + can_add_hook = { + type = favor_hook + target = root + } + } + save_temporary_scope_as = learning_councillor + root = { + add_hook = { + type = favor_hook + target = scope:learning_councillor + } + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + add_piety = medium_piety_gain + } + #Otherwise, they just offers you more piety when endorsed. + else_if = { + limit = { scope:ms_effect = flag:critical } + add_piety = major_piety_gain + } + #Otherwise, you just get a bit of piety. + else = { add_piety = medium_piety_gain } + } + } + + #Different faith: they offer to convert you, you accept. + option = { + name = fp1_yearly.1012.a + trigger = { + faith != scope:ms_faith + #Block the AI from making stupid conversions. + OR = { + is_ai = no + AND = { + scope:ms_faith.fervor >= 30 + OR = { + AND = { + faith.fervor <= 25 + has_trait = cynical + } + AND = { + faith.fervor <= 15 + NOT = { has_trait = zealous } + } + faith.fervor <= 5 + } + } + } + } + + #Perform the conversion. + set_character_faith_with_conversion = scope:ms_faith + + #Recoup lost piety, and get paid a little extra. + custom_tooltip = fp1_yearly.1012.a.recoup_lost_piety.tt + hidden_effect = { + if = { + limit = { scope:ms_effect = flag:critical } + add_piety_no_experience = major_piety_gain + #^Technically, you gain a little extra here if you have a theocratic faith, but adding another scripted trigger in just these two spots would make the event very hard to read. + } + else = { add_piety_no_experience = medium_piety_gain } + } + if = { + limit = { scope:ms_effect = flag:critical } + add_piety = medium_piety_gain + } + else = { add_piety = minor_piety_gain } + + stress_impact = { + cynical = minor_stress_impact_loss + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + #Different faith: they offer to convert you, you turn them down, they leave. + option = { + name = fp1_yearly.1012.b + trigger = { + faith != scope:ms_faith + } + + #The missionary vanishes. + mysterious_stranger_disappears_effect = yes + + stress_impact = { + forgiving = minor_stress_impact_loss + cynical = minor_stress_impact_loss + vengeful = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_vengefulness = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { #Weight up for stress. + add = 10 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { #Weight down for stress. + add = -10 + has_trait = zealous + } + } + } + + #Different faith: they offer to convert you, you have them tossed in the dungeon. + option = { + name = fp1_yearly.1012.c + trigger = { + faith != scope:ms_faith + } + + imprison = { + target = scope:stranger + type = dungeon + } + + stress_impact = { + vengeful = minor_stress_impact_loss + zealous = medium_stress_impact_loss + forgiving = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.25 + ai_vengefulness = 0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { #Weight up for stress. + add = 20 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = forgiving + } + modifier = { #Weight down for stress. + add = -20 + has_trait = cynical + } + } + } + + #Same faith: offers to stay, you accept. + option = { + name = fp1_yearly.1012.d + trigger = { faith = scope:ms_faith } + + #Add the (rather chuffed) courtier to your court. + add_courtier = scope:stranger + reverse_add_opinion = { + target = scope:stranger + modifier = pleased_opinion + opinion = 30 + } + + stress_impact = { + trusting = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_zeal = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { #Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + } + } + + #Same faith: offers to stay, you decline. + option = { + name = fp1_yearly.1012.e + trigger = { faith = scope:ms_faith} + + #The missionary vanishes. + mysterious_stranger_disappears_effect = yes + + stress_impact = { + paranoid = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_rationality = -0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -10 + has_trait = gregarious + } + } + } +} + +# Results: Nithing. +fp1_yearly.1013 = { + type = character_event + title = fp1_yearly.1013.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:ms_effect = flag:critical } + desc = fp1_yearly.1013.desc.critical + } + desc = fp1_yearly.1013.desc.standard + } + first_valid = { + triggered_desc = { + trigger = { + scope:stranger = { has_trait = sodomite } + } + desc = fp1_yearly.1013.desc.outro.sodomite + } + desc = fp1_yearly.1013.desc.outro + } + } + theme = intrigue + left_portrait = { + character = scope:stranger + triggered_animation = { + trigger = { + scope:stranger = { has_trait = sodomite } + } + animation = stress + } + triggered_animation = { + trigger = { + NOT = { + scope:stranger = { has_trait = sodomite } + } + } + animation = schadenfreude + } + } + override_background = { reference = study } + + immediate = { + scope:stranger = { + #Boost education by two steps. + if = { + limit = { has_trait = education_martial_1 } + hidden_effect = { remove_trait = education_martial_1 } + add_trait = education_martial_3 + } + if = { + limit = { has_trait = education_intrigue_1 } + hidden_effect = { remove_trait = education_intrigue_1 } + add_trait = education_intrigue_3 + } + #Boost stats. + add_diplomacy_skill = { 3 5 } + add_martial_skill = { 8 12 } + add_stewardship_skill = { 3 5 } + add_intrigue_skill = { 8 12 } + add_learning_skill = { 3 5 } + add_prowess_skill = { 5 10 } + #Add nithing things. + nithing_character_creation_scripted_effect = yes + #Give them a suitable crime. + random_list = { + 65 = { add_trait = murderer } + 25 = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + add_trait = witch + } + 10 = { + trigger = { + is_male = yes + faith = { has_doctrine = doctrine_homosexuality_crime } + } + add_trait = sodomite + } + } + #Reveal the nithing's true stats. + hidden_effect = { force_character_skill_recalculation = yes } + } + #The nithing robs you, with a harsher effect if you endorsed them! + if = { + limit = { scope:ms_effect = flag:critical } + save_scope_value_as = { + name = nithing_stolen_loot + value = massive_gold_value + } + } + else = { + save_scope_value_as = { + name = nithing_stolen_loot + value = major_gold_value + } + } + remove_short_term_gold = scope:nithing_stolen_loot + } + + #Curses! + option = { + name = { + trigger = { + NOT = { + scope:stranger = { has_trait = sodomite } + } + } + text = fp1_yearly.1013.a + } + name = { + trigger = { + scope:stranger = { has_trait = sodomite } + } + text = fp1_yearly.1013.a.sodomite + } + + #The nithing vanishes. + mysterious_stranger_disappears_effect = yes + + #No stress: the player has just eaten a nasty result. + ai_chance = { + #Only option. + base = 100 + } + } + + #I will not rest till that nithing is found! (rage outlet for angry players) + option = { + name = fp1_yearly.1013.b + trigger = { is_ai = no } + + #Make the nithing a wanted individual. + scope:stranger = { + #The nithing runs for it. + hidden_effect = { + move_to_pool = yes + # And give them their ill-gotten earnings. + ## We do this here so that their dying doesn't just give you or anyone else the cash back otherwise. + add_gold = scope:nithing_stolen_loot + } + #But they've made a powerful enemy! + set_relation_rival = { + target = root + reason = rival_nithing + } + } + + + stress_impact = { + #Minor penalty for RP reasons: we've already given the player a hefty negative, no need to pile on. + forgiving = minor_stress_impact_loss + vengeful = major_stress_impact_loss + } + ai_chance = { + #Irrelevant option. + base = 100 + } + } +} + +# Results: Warrior. +fp1_yearly.1014 = { + type = character_event + title = fp1_yearly.1014.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:ms_effect = flag:critical } + desc = fp1_yearly.1014.desc.critical + } + desc = fp1_yearly.1014.desc.standard + } + desc = fp1_yearly.1014.desc.outro + } + theme = intrigue + left_portrait = { + character = scope:stranger + animation = personality_bold + } + override_background = { reference = corridor_night } + + immediate = { + #If they were endorsed, the warrior gets better stats than they would otherwise. + if = { + limit = { scope:ms_effect = flag:critical } + scope:stranger = { + #Boost education by two steps. + if = { + limit = { has_trait = education_martial_1 } + hidden_effect = { remove_trait = education_martial_1 } + add_trait = education_martial_3 + } + if = { + limit = { has_trait = education_intrigue_1 } + hidden_effect = { remove_trait = education_intrigue_1 } + add_trait = education_intrigue_3 + } + #Boost stats. + add_diplomacy_skill = { 3 5 } + add_martial_skill = { 10 12 } + add_stewardship_skill = { 3 5 } + add_intrigue_skill = { 3 5 } + add_learning_skill = { 3 5 } + add_prowess_skill = { 14 18 } + #Give him a reputation. + add_prestige_level = 2 + #Slight chance to add an additional trait or two. + random_list = { + 25 = { + trigger = { exists = title:e_byzantium.holder } + add_trait = varangian + } + 25 = { add_trait = berserker } + 25 = { add_trait = physique_good_2 } + 25 = { + add_trait = lifestyle_blademaster + add_trait_xp = { + trait = lifestyle_blademaster + value = { + integer_range = { + min = medium_lifestyle_random_xp_low + max = medium_lifestyle_random_xp_high + } + } + } + } + } + #Reveal the warrior's true stats. + hidden_effect = { force_character_skill_recalculation = yes } + } + } + else = { + scope:stranger = { + #Boost education by one step. + if = { + limit = { has_trait = education_martial_1 } + hidden_effect = { remove_trait = education_martial_1 } + add_trait = education_martial_2 + } + if = { + limit = { has_trait = education_intrigue_1 } + hidden_effect = { remove_trait = education_intrigue_1 } + add_trait = education_intrigue_2 + } + #Boost stats. + add_diplomacy_skill = { 3 5 } + add_martial_skill = { 5 10 } + add_stewardship_skill = { 3 5 } + add_intrigue_skill = { 3 5 } + add_learning_skill = { 3 5 } + add_prowess_skill = { 8 12 } + #Slight chance to add an additional trait or two. + random_list = { + 50 = {} + 12 = { + trigger = { exists = title:e_byzantium.holder } + add_trait = varangian + } + 12 = { add_trait = berserker } + 12 = { add_trait = physique_good_1 } + 14 = { + add_trait = lifestyle_blademaster + add_trait_xp = { + trait = lifestyle_blademaster + value = { + integer_range = { + min = small_lifestyle_random_xp_low + max = small_lifestyle_random_xp_high + } + } + } + } + } + #Reveal the warrior's true stats. + hidden_effect = { force_character_skill_recalculation = yes } + } + } + } + + #I'll certainly hire you! + option = { + name = fp1_yearly.1014.a + + #Gain the warrior, who is also pretty happy to be here. + add_courtier = scope:stranger + reverse_add_opinion = { + target = scope:stranger + modifier = loyal_servant + } + + #And pay the price. + if = { + limit = { scope:ms_effect = flag:critical } + remove_short_term_gold = medium_gold_value + } + else = { remove_short_term_gold = minor_gold_value } + + stress_impact = { + gregarious = minor_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + #Always a no if the AI can't afford the warrior. + base = -1000 + ai_value_modifier = { + ai_sociability = 0.5 + ai_greed = -0.5 + } + #Enable option for the AI if they've the gold to spare. + modifier = { + add = 1000 + scope:ms_effect = flag:critical + short_term_gold >= medium_gold_value + } + modifier = { + add = 1000 + scope:ms_effect = flag:standard + short_term_gold >= minor_gold_value + } + modifier = { #Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { #Weight down for stress. + add = -20 + has_trait = greedy + } + } + } + + #Pass. Move along, Conan. + option = { + name = fp1_yearly.1014.b + + #The warrior vanishes. + mysterious_stranger_disappears_effect = yes + + #Have some mild consolation prestige + add_prestige = minor_prestige_gain + + stress_impact = { + greedy = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_sociability = -0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -10 + has_trait = gregarious + } + } + } +} + +# Results: Vagrant. +fp1_yearly.1015 = { + type = character_event + title = fp1_yearly.1015.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:ms_effect = flag:critical } + desc = fp1_yearly.1015.desc.critical + } + desc = fp1_yearly.1015.desc.standard + } + desc = fp1_yearly.1015.desc.outro + } + theme = intrigue + #The vagrant's reaction varies a bit depending on your treatment of them. + left_portrait = { + character = scope:stranger + triggered_animation = { + trigger = { scope:ms_effect = flag:critical } + animation = ecstasy + } + triggered_animation = { + trigger = { scope:ms_effect = flag:standard } + animation = happiness + } + } + override_background = { reference = corridor_night } + + immediate = { + #Vagrants get no stat reveal, as they genuinely suck. + #Lose a bit of prestige for letting them hang around so long, losing more if you endorsed them. + if = { + limit = { scope:ms_effect = flag:critical } + add_prestige = medium_prestige_loss + } + else = { add_prestige = minor_prestige_loss } + } + + #Eh, I guess you can stay here. + option = { + name = fp1_yearly.1015.a + + #You gain the vagrant as a courtier + add_courtier = scope:stranger + #And a hook on them: weak if you didn't endorse them, strong if you did. + if = { + limit = { scope:ms_effect = flag:critical } + add_hook = { + type = loyalty_hook + target = scope:stranger + } + } + else = { + add_hook = { + type = favor_hook + target = scope:stranger + years = 50 #You did literally scoop them up off the streets. They won't soon forget that. + } + } + #Either way, they think more of you for it. + reverse_add_opinion = { + target = scope:stranger + modifier = loyal_servant + } + + stress_impact = { + gregarious = minor_stress_impact_loss + humble = medium_stress_impact_loss + shy = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { #Weight up for stress. + add = 20 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -10 + has_trait = shy + } + modifier = { #Weight down for stress. + add = -20 + has_trait = arrogant + } + } + } + + #What?! Get out! + option = { + name = fp1_yearly.1015.b + + #The vagrant vanishes. + mysterious_stranger_disappears_effect = yes + + stress_impact = { + shy = minor_stress_impact_loss + arrogant = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = shy + } + modifier = { #Weight up for stress. + add = 20 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -10 + has_trait = gregarious + } + modifier = { #Weight down for stress. + add = -20 + has_trait = humble + } + } + } +} + +# Big RIP to fp1_yearly.1031 through fp1_yearly.1061: it would have been the greatest and bestest event chain ever, but alas, it has been cut, and now no one shall know of its grandeur. It was too beautiful for this world. + +################################################## +# Commissioning a Longship for a Funeral +# by Ewan Cowhig Croft +# 1061 - 1070 +################################################## + +scripted_trigger fp1_funeral_longship_generic_mourner_trigger = { + is_landed = yes + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_1062 } + faith = root.faith + NOR = { + any_relation = { + type = rival + this = root + } + AND = { + is_ai = yes + opinion = { + target = root + value >= low_negative_opinion + } + } + } +} + +scripted_trigger fp1_funeral_longship_likes_parties = { + has_trait = lifestyle_reveler + has_trait_xp = { + trait = lifestyle_reveler + value >= 100 + } + # Faith must not consider this a bad thing. + faith = { + NOT = { trait_is_virtue = shy } + } +} + +scripted_trigger fp1_funeral_longship_likes_duels = { + has_trait = lifestyle_blademaster + has_trait_xp = { + trait = lifestyle_blademaster + value >= 100 + } + # Faith must not consider this a bad thing. + faith = { + NOT = { has_doctrine_parameter = holy_wars_forbidden } + } +} + +scripted_trigger fp1_funeral_longship_likes_hunting = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } + # Faith must not consider this a bad thing. + faith = { + NOT = { has_doctrine_parameter = holy_wars_forbidden } + } +} + +scripted_trigger fp1_funeral_longship_likes_magic = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 100 + } + # Faith must consider this an actively good thing (since Norse paganism's complicated relationship with witchcraft _tended_ towards the negative). + faith = { has_doctrine_parameter = witchcraft_accepted } +} + + +# The family member is earmarked. +fp1_yearly.1061 = { + hidden = yes + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Germanic faith. + religion = religion:germanic_religion + # Shouldn't ever happen, but just in case, exempt sky burials so that the character is never buried twice. + NOT = { + faith = { has_doctrine_parameter = sky_burials_active } + } + # And we shouldn't really be erecting glorious mounds to long lives that were actually cut short too early. + age >= 30 + # Must be significant in some way. + OR = { + highest_held_title_tier >= tier_duchy + piety_level >= high_prestige_level + prestige_level >= high_piety_level + # Monarch of Parties. + fp1_funeral_longship_likes_parties = yes + # Monarch of Duels. + fp1_funeral_longship_likes_duels = yes + # Monarch of Hunting. + fp1_funeral_longship_likes_hunting = yes + # Monarch of Magic. + fp1_funeral_longship_likes_magic = yes + } + # With a landed player heir of at least duchy tier, or close family, a soulmate, or best friend who's the same. + OR = { + player_heir ?= { fp1_funeral_longship_generic_mourner_trigger = yes } + any_close_family_member = { fp1_funeral_longship_generic_mourner_trigger = yes } + any_relation = { + type = soulmate + fp1_funeral_longship_generic_mourner_trigger = yes + } + any_relation = { + type = best_friend + fp1_funeral_longship_generic_mourner_trigger = yes + } + } + } + + immediate = { + save_scope_as = ship_funeral_candidate + # Determine why they were a big deal. + ## First check their title tier. + if = { + limit = { highest_held_title_tier = tier_duchy } + save_scope_value_as = { + name = reason_title + value = flag:duchy + } + } + else_if = { + limit = { highest_held_title_tier = tier_kingdom } + save_scope_value_as = { + name = reason_title + value = flag:kingdom + } + } + else_if = { + limit = { highest_held_title_tier = tier_empire } + save_scope_value_as = { + name = reason_title + value = flag:empire + } + } + ## Then look at their prestige/piety levels. + if = { + limit = { prestige_level = high_prestige_level } + save_scope_value_as = { + name = reason_prestige + value = flag:high + } + } + else_if = { + limit = { prestige_level = very_high_prestige_level } + save_scope_value_as = { + name = reason_prestige + value = flag:very_high + } + } + else_if = { + limit = { prestige_level >= max_prestige_level } + save_scope_value_as = { + name = reason_prestige + value = flag:max + } + } + if = { + limit = { prestige_level = high_prestige_level } + save_scope_value_as = { + name = reason_piety + value = flag:high + } + } + else_if = { + limit = { prestige_level = very_high_prestige_level } + save_scope_value_as = { + name = reason_piety + value = flag:very_high + } + } + else_if = { + limit = { prestige_level >= max_prestige_level } + save_scope_value_as = { + name = reason_piety + value = flag:max + } + } + ## And finally their aptness at certain lifestyles. + ### Partying. + if = { + limit = { fp1_funeral_longship_likes_parties = yes } + save_scope_value_as = { + name = reason_lifestyle_partying + value = yes + } + } + ### Hunting. + if = { + limit = { fp1_funeral_longship_likes_duels = yes } + save_scope_value_as = { + name = reason_lifestyle_duelling + value = yes + } + } + ### Duels. + if = { + limit = { fp1_funeral_longship_likes_hunting = yes } + save_scope_value_as = { + name = reason_lifestyle_hunting + value = yes + } + } + ### Magic. + if = { + limit = { fp1_funeral_longship_likes_magic = yes } + save_scope_value_as = { + name = reason_lifestyle_magickerationing + value = yes + } + } + # Next, determine who gets to hold the funeral. + ## First, we compile a list. + if = { + limit = { + player_heir ?= { fp1_funeral_longship_generic_mourner_trigger = yes } + } + player_heir = { add_to_list = potential_mourners_list } + } + every_close_family_member = { + limit = { fp1_funeral_longship_generic_mourner_trigger = yes } + add_to_list = potential_mourners_list + } + every_relation = { + type = soulmate + limit = { fp1_funeral_longship_generic_mourner_trigger = yes } + add_to_list = potential_mourners_list + } + every_relation = { + type = best_friend + limit = { fp1_funeral_longship_generic_mourner_trigger = yes } + add_to_list = potential_mourners_list + } + ## Then, we grab the person in the list with the most direct connection, preferring player heirs, levelled relationships, then close family, in that order. Players get a generic boost up this list. + ordered_in_list = { + list = potential_mourners_list + order_by = { value = fp1_funeral_longship_preferred_mourner_value } + save_scope_as = mourner + } + # Finally, fire an event for scope:mourner to inform them that a ship burial is available. + if = { + limit = { exists = scope:mourner } + scope:mourner = { + # Set the used character flag here rather than later, so that scope:mourner doesn't queue up multiple ship funerals due to a wave of sudden bereavements. + add_character_flag = { + flag = had_event_fp1_yearly_1062 + days = 7300 + } + trigger_event = { + id = fp1_yearly.1062 + months = 2 + } + } + } + } +} + +# Inform scope:mourner of a valid ship burial. +fp1_yearly.1062 = { + type = character_event + title = fp1_yearly.1062.t + desc = fp1_yearly.1062.desc + theme = death + left_portrait = { + character = scope:mourner + animation = sadness + } + right_portrait = { + character = scope:ship_funeral_candidate + animation = personality_zealous + } + override_background = { reference = temple } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + # Must still be the same faith as scope:ship_funeral_candidate, for ease of loc and such. + faith = scope:ship_funeral_candidate.faith + } + + # A small stone ship. + option = { + name = fp1_yearly.1062.a + trigger = { + can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } + } + + # Remove the appropriate amount of coin. + set_variable = { + name = ship_burial_reimbursement + value = medium_gold_value + } + remove_short_term_gold = medium_gold_value + # Set up the ship burial type scope. + save_scope_value_as = { + name = burial_type + value = flag:stone_small + } + # Inform & trigger next event. + custom_tooltip = fp1_yearly.1062.a.tt + trigger_event = { + id = fp1_yearly.1063 + months = 2 + } + + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.25 + ai_greed = -0.25 + ai_boldness = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = greedy + } + } + } + + # A grand stone ship. + option = { + name = fp1_yearly.1062.b + trigger = { + can_make_expensive_purchase_trigger = { PRICE = major_gold_value } + } + + # Remove the appropriate amount of coin. + set_variable = { + name = ship_burial_reimbursement + value = major_gold_value + } + remove_short_term_gold = major_gold_value + # Set up the ship burial type scope. + save_scope_value_as = { + name = burial_type + value = flag:stone_grand + } + # Inform & trigger next event. + custom_tooltip = fp1_yearly.1062.a.tt + trigger_event = { + id = fp1_yearly.1063 + months = 2 + } + + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_boldness = 0.25 + ai_zeal = 0.25 + ai_greed = -0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + } + } + + # An purpose-built ornate grave ship. + option = { + name = fp1_yearly.1062.c + trigger = { + can_make_expensive_purchase_trigger = { PRICE = massive_gold_value } + } + + # Remove the appropriate amount of coin. + set_variable = { + name = ship_burial_reimbursement + value = massive_gold_value + } + remove_treasury_or_gold = massive_treasury_or_gold_value + # Set up the ship burial type scope. + save_scope_value_as = { + name = burial_type + value = flag:wooden_ornate + } + # Inform & trigger next event. + custom_tooltip = fp1_yearly.1062.a.tt + trigger_event = { + id = fp1_yearly.1063 + months = 2 + } + + stress_impact = { + generous = major_stress_impact_loss + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_zeal = 0.5 + ai_greed = -0.75 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + # This is all *outrageously* expensive. + option = { + name = fp1_yearly.1062.d + + # Lose prestige if you're related to scope:ship_funeral_candidate. + if = { + limit = { + OR = { + scope:ship_funeral_candidate.dynasty = scope:mourner.dynasty + scope:ship_funeral_candidate = { is_close_family_of = scope:mourner } + } + } + add_prestige = medium_prestige_loss + stress_impact = { + greedy = medium_stress_impact_loss + generous = medium_stress_impact_gain + } + } + # Else, take a stress hit. + else = { + stress_impact = { + base = medium_stress_gain + greedy = medium_stress_impact_loss + generous = medium_stress_impact_gain + } + } + + # Stress_impact handled in above if statements. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = -0.25 + ai_zeal = -0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + } + } +} + +scripted_effect fp1_funeral_longship_clear_variables_effect = { + remove_variable = candidate_achievement_count + remove_variable = ship_burial_reimbursement +} + +fp1_yearly.1063 = { + type = character_event + title = fp1_yearly.1063.t + desc = { + desc = fp1_yearly.1063.desc.intro + # Notable features of scop:ship_burial_candidate block. + ## Single achievement. + triggered_desc = { + trigger = { var:candidate_achievement_count = 1 } + desc = { + desc = fp1_yearly.1063.desc.achievements.single.intro + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_partying } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_duelling } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_hunting } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_magickerationing } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.single.outro + } + } + ## Two achievements. + triggered_desc = { + trigger = { var:candidate_achievement_count = 2 } + desc = { + desc = fp1_yearly.1063.desc.achievements.double.intro + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_partying } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_duelling } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_hunting } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_magickerationing } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.double.connector + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_partying + NOT = { scope:primary_reason = flag:reason_partying } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_duelling + NOT = { scope:primary_reason = flag:reason_duelling } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_hunting + NOT = { scope:primary_reason = flag:reason_hunting } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_magickerationing + NOT = { scope:primary_reason = flag:reason_magickerationing } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.double.outro + } + } + ## Three or more achievements. + triggered_desc = { + trigger = { var:candidate_achievement_count >= 3 } + desc = { + desc = fp1_yearly.1063.desc.achievements.triple.intro + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_partying } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_duelling } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_hunting } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_magickerationing } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_partying + NOT = { scope:primary_reason = flag:reason_partying } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_duelling + NOT = { scope:primary_reason = flag:reason_duelling } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_hunting + NOT = { scope:primary_reason = flag:reason_hunting } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_magickerationing + NOT = { scope:primary_reason = flag:reason_magickerationing } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.triple.connector + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + NOR = { + scope:primary_reason = flag:reason_title + scope:secondary_reason = flag:reason_title + } + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + NOR = { + scope:primary_reason = flag:reason_title + scope:secondary_reason = flag:reason_title + } + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + NOR = { + scope:primary_reason = flag:reason_title + scope:secondary_reason = flag:reason_title + } + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + NOR = { + scope:primary_reason = flag:reason_prestige + scope:secondary_reason = flag:reason_prestige + } + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + NOR = { + scope:primary_reason = flag:reason_prestige + scope:secondary_reason = flag:reason_prestige + } + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + NOR = { + scope:primary_reason = flag:reason_prestige + scope:secondary_reason = flag:reason_prestige + } + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + NOR = { + scope:primary_reason = flag:reason_piety + scope:secondary_reason = flag:reason_piety + } + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + NOR = { + scope:primary_reason = flag:reason_piety + scope:secondary_reason = flag:reason_piety + } + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + NOR = { + scope:primary_reason = flag:reason_piety + scope:secondary_reason = flag:reason_piety + } + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_partying + NOR = { + scope:primary_reason = flag:reason_partying + scope:secondary_reason = flag:reason_partying + } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_duelling + NOR = { + scope:primary_reason = flag:reason_duelling + scope:secondary_reason = flag:reason_duelling + } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_hunting + NOR = { + scope:primary_reason = flag:reason_hunting + scope:secondary_reason = flag:reason_hunting + } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_magickerationing + NOR = { + scope:primary_reason = flag:reason_magickerationing + scope:secondary_reason = flag:reason_magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.triple.outro + } + } + # Burial type block. + ## Small stone ship. + triggered_desc = { + trigger = { scope:burial_type = flag:stone_small } + desc = fp1_yearly.1063.desc.ship_stone_small + } + ## Grand stone ship. + triggered_desc = { + trigger = { scope:burial_type = flag:stone_grand } + desc = fp1_yearly.1063.desc.ship_stone_grand + } + ## Ornate wooden ship. + triggered_desc = { + trigger = { scope:burial_type = flag:wooden_ornate } + desc = fp1_yearly.1063.desc.ship_wood_ornate + } + desc = fp1_yearly.1063.desc.outro + } + theme = death + left_portrait = { + character = scope:mourner + animation = grief + } + right_portrait = { + character = scope:ship_funeral_candidate + animation = sadness + } + override_background = { reference = temple } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + # Must still be the same faith as scope:ship_funeral_candidate, for ease of loc and such. + faith = scope:ship_funeral_candidate.faith + } + + on_trigger_fail = { + # Return invested monies. + send_interface_toast = { + title = fp1_yearly.1063.trigger_failure.tt + left_icon = scope:ship_funeral_candidate + add_gold = var:ship_burial_reimbursement + } + # Clear up variables. + fp1_funeral_longship_clear_variables_effect = yes + } + + immediate = { + # Work out how many achievements scope:ship_funeral_candidate actually had. + set_variable = { + name = candidate_achievement_count + value = 0 + } + ## First, tier. + if = { + limit = { exists = scope:reason_title } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + ## Then, prestige. + if = { + limit = { exists = scope:reason_prestige } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + ## Next, piety. + if = { + limit = { exists = scope:reason_piety } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + ## Finally, lifestyles. + if = { + limit = { exists = scope:reason_lifestyle_partying } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + if = { + limit = { exists = scope:reason_lifestyle_duelling } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + if = { + limit = { exists = scope:reason_lifestyle_hunting } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + if = { + limit = { exists = scope:reason_lifestyle_magickerationing } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + # Flag reasons so that they don't repeat; due to variable issues, we just calc this every time. + # Primary reason. + ## comment_folder = { + # Cycle through tier. + if = { + limit = { exists = scope:reason_title } + save_scope_value_as = { + name = primary_reason + value = flag:reason_title + } + } + # Then prestige. + else_if = { + limit = { exists = scope:reason_prestige } + save_scope_value_as = { + name = primary_reason + value = flag:reason_prestige + } + } + # Piety. + else_if = { + limit = { exists = scope:reason_piety } + save_scope_value_as = { + name = primary_reason + value = flag:reason_piety + } + } + # And lifestyles. + else_if = { + limit = { exists = scope:reason_lifestyle_partying } + save_scope_value_as = { + name = primary_reason + value = flag:reason_partying + } + } + else_if = { + limit = { exists = scope:reason_lifestyle_duelling } + save_scope_value_as = { + name = primary_reason + value = flag:reason_duelling + } + } + else_if = { + limit = { exists = scope:reason_lifestyle_hunting } + save_scope_value_as = { + name = primary_reason + value = flag:reason_hunting + } + } + else_if = { + limit = { exists = scope:reason_lifestyle_magickerationing } + save_scope_value_as = { + name = primary_reason + value = flag:reason_magickerationing + } + } + ##} + # Secondary reason. + ## Comment folder for easy organisation = { + # Cycle through tier. + if = { + limit = { + exists = scope:reason_title + NOT = { scope:primary_reason = flag:reason_title } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_title + } + } + # Then prestige. + else_if = { + limit = { + exists = scope:reason_prestige + NOT = { scope:primary_reason = flag:reason_prestige } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_prestige + } + } + # Piety. + else_if = { + limit = { + exists = scope:reason_piety + NOT = { scope:primary_reason = flag:reason_piety } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_piety + } + } + # And lifestyles. + else_if = { + limit = { + exists = scope:reason_lifestyle_partying + NOT = { scope:primary_reason = flag:reason_partying } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_partying + } + } + else_if = { + limit = { + exists = scope:reason_lifestyle_duelling + NOT = { scope:primary_reason = flag:reason_duelling } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_duelling + } + } + else_if = { + limit = { + exists = scope:reason_lifestyle_hunting + NOT = { scope:primary_reason = flag:reason_hunting } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_hunting + } + } + else_if = { + limit = { + exists = scope:reason_lifestyle_magickerationing + NOT = { scope:primary_reason = flag:reason_magickerationing } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_magickerationing + } + } + ##} + # If scope:ship_funeral_candidate is a hunter, set up a suitable place for them to have been hunting (for loc). + scope:ship_funeral_candidate = { + if = { + limit = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } + } + if = { + limit = { highest_held_title_tier >= tier_county } + primary_title = { save_scope_as = hunting_lands } + } + else = { + scope:mourner.primary_title = { save_scope_as = hunting_lands } + } + } + } + } + + # Boats to boats, tumuli to tumuli. + option = { + name = fp1_yearly.1063.a + + # Small stone ships give a modest chunk. + if = { + limit = { scope:burial_type = flag:stone_small } + add_prestige = minor_prestige_gain + } + # Grand stone ships give a decent chunk. + if = { + limit = { scope:burial_type = flag:stone_grand } + add_prestige = medium_prestige_gain + } + # Ornate wooden ships give a large chunk. + if = { + limit = { scope:burial_type = flag:wooden_ornate } + add_prestige = major_prestige_gain + } + # Stress relief is the same regardless of what level you opted for. + add_stress = major_stress_loss + + # No extra stress impact for single-option events, usually. + ai_chance = { + # Only option. + base = 100 + } + } + + after = { + # Clear up remaining values on the character. + fp1_funeral_longship_clear_variables_effect = yes + } +} + +################################################## +# Sparklingly Clean +# by Ewan Cowhig Croft +# 1071 - 1080 +################################################## + +# You decide to put a little extra effort into your appearance. +fp1_yearly.1071 = { + type = character_event + title = fp1_yearly.1071.t + desc = fp1_yearly.1071.desc + theme = physical_health + left_portrait = { + character = root + animation = happiness + } + override_background = { reference = bedchamber } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + is_healthy = yes + NOT = { has_character_flag = had_event_fp1_yearly_1071 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse = yes + } + + weight_multiplier = { + base = 1 + + # Weight up a bit for the healthy types. + modifier = { + add = 0.5 + has_trait = diligent + } + modifier = { + add = 0.5 + has_trait = whole_of_body + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_1071 + days = 3650 + } + } + + # Hygiene is the key to a long life! + option = { + name = fp1_yearly.1071.a + + # Add a modifier boosting health. + add_character_modifier = { + modifier = fp1_bathing_health_modifier + years = 10 + } + + stress_impact = { + diligent = medium_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.75 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + # I suppose I could take a little extra care... + option = { + name = fp1_yearly.1071.b + + # Add a modifier boosting attraction. + add_character_modifier = { + modifier = fp1_bathing_attraction_modifier + years = 10 + } + + stress_impact = { + diligent = medium_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.75 + ai_energy = 0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + # Just the usual is fine. + option = { + name = fp1_yearly.1071.c + + # Lose a bit of stress for taking it easy. + ## Stress loss handled in stress_impact. + + stress_impact = { + base = medium_stress_loss + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.1 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + } + } +} + +################################################## +# Explorer from Phantom Islands +# by Ewan Cowhig Croft +# 1081 - 1090 +################################################## + +# An explorer of the Atlantic wishes to share their tales with you. +fp1_yearly.1081 = { + type = character_event + title = fp1_yearly.1081.t + desc = { + desc = fp1_yearly.1081.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:phantom_island = flag:greenland } + desc = fp1_yearly.1081.desc.greenland + } + triggered_desc = { + trigger = { scope:phantom_island = flag:vinland } + desc = fp1_yearly.1081.desc.vinland + } + triggered_desc = { + trigger = { scope:phantom_island = flag:antilia } + desc = fp1_yearly.1081.desc.antilia + } + triggered_desc = { + trigger = { + scope:phantom_island = flag:fortunate_isles + religion = religion:hellenism_religion + } + desc = fp1_yearly.1081.desc.fortunate_isles.hellenist + } + triggered_desc = { + trigger = { scope:phantom_island = flag:fortunate_isles } + desc = fp1_yearly.1081.desc.fortunate_isles.other + } + triggered_desc = { + trigger = { scope:phantom_island = flag:st_brendans_island } + desc = fp1_yearly.1081.desc.st_brendans_island + } + triggered_desc = { + trigger = { + scope:phantom_island = flag:isle_of_the_blessed + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = fp1_yearly.1081.desc.isle_of_the_blessed.christian + } + triggered_desc = { + trigger = { scope:phantom_island = flag:isle_of_the_blessed } + desc = fp1_yearly.1081.desc.isle_of_the_blessed.other + } + triggered_desc = { + trigger = { scope:phantom_island = flag:ard_majhulah } + desc = fp1_yearly.1081.desc.ard_majhulah + } + triggered_desc = { + trigger = { scope:phantom_island = flag:the_sticky_sea } + desc = fp1_yearly.1081.desc.the_sticky_sea + } + triggered_desc = { + trigger = { scope:phantom_island = flag:purple_islands } + desc = fp1_yearly.1081.desc.purple_islands + } + triggered_desc = { + trigger = { scope:phantom_island = flag:hy_brasil } + desc = fp1_yearly.1081.desc.hy_brasil + } + triggered_desc = { + trigger = { scope:phantom_island = flag:thule } + desc = fp1_yearly.1081.desc.thule + } + triggered_desc = { + trigger = { + scope:phantom_island = flag:great_ireland + religion = { is_in_family = rf_abrahamic } + } + desc = fp1_yearly.1081.desc.great_ireland.abrahamic + } + triggered_desc = { + trigger = { scope:phantom_island = flag:great_ireland } + desc = fp1_yearly.1081.desc.great_ireland.other + } + triggered_desc = { + trigger = { scope:phantom_island = flag:sunset_empire } + desc = fp1_yearly.1081.desc.sunset_empire + } + } + desc = fp1_yearly.1081.desc.outro + } + theme = friendly + left_portrait = { + character = root + animation = toast + triggered_animation = { + trigger = { + scope:phantom_island = flag:sunset_empire + has_trait = craven + } + animation = fear + } + } + right_portrait = { + character = scope:norse_explorer + animation = storyteller + } + override_background = { reference = study } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #No need for these character modifiers to appear in the wild and feel less unique. + is_ai = no + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_1081 } + #Must be North Germanic. + culture = { has_cultural_pillar = heritage_north_germanic } + #Has to keep their capital in general Scandinavian core sphere of influence. + capital_province = { + OR = { + geographical_region = world_europe_west + geographical_region = world_europe_north + geographical_region = world_europe_east + } + } + #The Norse must still be in their hyper-exploratory phase. + NOT = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + } + + weight_multiplier = { + base = 1 + + #Learned characters attract people with curious stories. + modifier = { + add = 1 + has_trait = scholar + } + modifier = { + add = 1 + learning >= very_high_skill_rating + } + } + + immediate = { + #Once per lifetime. + add_character_flag = { flag = had_event_fp1_yearly_1081 } + #Select which phantom island we're looking at! + ##12 items with an 8.3% chance each to be selected, with the remaining 0.4% going to the thirteenth item: Sunset Invasion. + random_list = { + #Greenland + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:greenland + } + } + #Vinland + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:vinland + } + } + #Antilia + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:antilia + } + #If Portugal exists, then obviously they were time-travelling Portuguese. + if = { + limit = { + is_target_in_global_variable_list = { + name = unavailable_unique_decisions + target = flag:form_portugal_decision + } + } + culture:portuguese = { save_scope_as = antilia_culture } + } + #If Galician exists, they must have been from Galicia! + else_if = { + limit = { has_global_variable = visigothic_culture_split } + culture:galician = { save_scope_as = antilia_culture } + } + #Otherwise, bog-standard Visigoths. + else = { + culture:visigothic = { save_scope_as = antilia_culture } + } + } + #Fortunate Isles + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:fortunate_isles + } + } + #St. Brendan's Island + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:st_brendans_island + } + } + #Isle of the Blessed + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:isle_of_the_blessed + } + } + #Ard Majhūlah + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:ard_majhulah + } + } + #The Sticky Sea + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:the_sticky_sea + } + } + #Purple Islands + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:purple_islands + } + } + #Hy Brasil + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:hy_brasil + } + } + #Thule + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:thule + } + } + #Great Ireland + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:great_ireland + } + } + #Sunset Empire + 4 = { + save_scope_value_as = { + name = phantom_island + value = flag:sunset_empire + } + } + } + #Create an explorer, selecting an appropriate template according to whether or not their story is truthful. + if = { + limit = { + OR = { + scope:phantom_island = flag:greenland + scope:phantom_island = flag:purple_islands + scope:phantom_island = flag:sunset_empire #Mostly here just to freak people out for funsies. + } + #Technically, Vinland & the Sargasso Sea are real locations as well, but our loc clearly indicates that the explorer has never been there, and is repeating second-hand tales at best. + } + create_character = { + location = root.capital_province + template = fp1_truthful_explorer_character + save_scope_as = norse_explorer + } + } + else = { + create_character = { + location = root.capital_province + template = fp1_deceitful_explorer_character + save_scope_as = norse_explorer + } + } + } + + #Memorise the interesting trivia. + option = { + name = fp1_yearly.1081.a + + #Nice little diplo modifier. + add_character_modifier = { + modifier = phantom_island_trivia_fp1_modifier + years = 20 + } + + stress_impact = { + humble = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_boldness = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -10 + has_trait = arrogant + } + } + } + + #Poke holes in the story. + option = { + name = fp1_yearly.1081.b + + #Nice little intrigue modifier. + add_character_modifier = { + modifier = phantom_island_critique_fp1_modifier + years = 20 + } + + stress_impact = { + paranoid = minor_stress_impact_loss + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -10 + has_trait = trusting + } + } + } + + #Wish them well and on their way. + option = { + name = { + trigger = { + NOT = { scope:phantom_island = flag:sunset_empire } + } + text = fp1_yearly.1081.c + } + name = { + trigger = { scope:phantom_island = flag:sunset_empire } + text = fp1_yearly.1081.c.sunset_empire + } + + # Assuming you don't have Aztecs, then get a solid bit of stress relief. + if = { + limit = { + NOT = { scope:phantom_island = flag:sunset_empire } + } + stress_impact = { + base = major_stress_loss + trusting = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + } + # Otherwise... + else = { + stress_impact = { + base = major_stress_gain + trusting = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + } + + # Stress impact handled in above if blocks. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_energy = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + } + } + + after = { + #Dispose of our explorer. + scope:norse_explorer = { + hidden_effect = { + death = { death_reason = death_vanished } + } + } + } +} diff --git a/N3OW/events/dlc/fp2/fp2_struggle_events.txt b/N3OW/events/dlc/fp2/fp2_struggle_events.txt new file mode 100644 index 00000000..fd8140b6 --- /dev/null +++ b/N3OW/events/dlc/fp2/fp2_struggle_events.txt @@ -0,0 +1,11749 @@ +namespace = fp2_struggle + +### SYSTEM EVENTS ################################################################# +## # Parameter Events +## 0001 - 0010 VIP spontaneous relationship management. +## 0011 - 0040 Struggle VIPs spontaneously develop negative relationships with each other. +## 0041 - 0070 Struggle VIPs spontaneously develop postive relationships with each other. +## # Other Events +## 0501 - 0510 Struggle Intro Events +## 0900 - 0999 Struggle ending decision events +### EVENT LIST #################################################################### +## XXXX - XXXX YYY by ZZZ +## 1000 - 1000 Stoking the Fire by Ola Jentzsch +## 1001 - 1001 War Widows by Ola Jentzsch +## 1002 - 1002 Andalusian Advancements by Ola Jentzsch +## 1010 - 1012 Soul of Iron by Ola Jentzsch +## 1020 - 1020 Death of a Councilman by Ola Jentzsch +## 1050 - 1050 The Vision by Ola Jentzsch +## 2000 - 2000 Disorderly Market by Hugo Cortell +## 2001 - 2002 Desperate Villagers Seek New Lord by Hugo Cortell +## 2003 - 2003 Lost Migratory Birds by Hugo Cortell +## 2004 - 2005 Ship building event by Hugo Cortell +## 2006 - 2006 The Borders of Faith by Hugo Cortell +## 2007 - 2007 Castle Worthy of Iberia by Hugo Cortell +## 2008 - 2008 Misdeeds of The Chaplain by Hugo Cortell +## 2009 - 2012 Catching Thieves of Myth by Hugo Cortell +## 2013 - 2014 The Secret to Freedom by Hugo Cortell +## 2015 - 2016 Letter on The Back by Hugo Cortell +## 2021 - 2022 RETURN OF THE THIEF KING by Hugo Cortell +## 3001 - 3010 The Price of War by Veronica Pazos +## 3011 - 3020 Order of the Hatchet by Veronica Pazos +## 3021 - 3030 The Wrath of Heaven by Veronica Pazos +################################################################################### + +# Setting AI Intent +fp2_struggle.0003 = { + hidden = yes + scope = none + scope = struggle + + trigger = { # Should not need this, but, redundancy check! + exists = struggle:iberian_struggle + struggle:iberian_struggle = { any_involved_ruler = { } } # For when the conflict is ongoing but nobody is left to fight it + } + + immediate = { + # prepare needed variables; they will be destroyed at the end of the immediate + set_variable = { + name = agents_for_escalation + value = 0 + } + set_variable = { + name = agents_for_deescalation + value = 0 + } + + # Go through the characters to distribute them between the potential transitions + struggle:iberian_struggle = { + every_involved_ruler = { + limit = { is_alive = yes } + ####################### + # Play cue track + ###################### + if = { + limit = { is_ai = no } + play_music_cue = "mx_Struggle_Opening" + } + + ####################### + # Check existing flags + ###################### + if = { + limit = { has_character_flag = agenda_towards_escalation } + root = { + change_variable = { + name = agents_for_escalation + add = 1 + } + } + } + else_if = { + limit = { has_character_flag = agenda_towards_deescalation } + root = { + change_variable = { + name = agents_for_deescalation + add = 1 + } + } + } + else = { # Set a flag + ############################# + # Current Phase: Opportunity + ############################# + if = { + limit = { root = { is_struggle_phase = struggle_iberia_phase_opportunity } } + random_list = { + # Working towards Hostility + # It should be for characters looking for direct conflicts and domination, with the will and ability to expand their realms + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = hostility + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Conciliation + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = conciliation + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Hostility + ############################# + if = { + limit = { root = { is_struggle_phase = struggle_iberia_phase_hostility } } + random_list = { + # Working towards Hostility: it means that the character wants to stay in + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = hostility + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Compromise + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Compromise + ############################# + if = { + limit = { root = { is_struggle_phase = struggle_iberia_phase_compromise } } + random_list = { + + # Working towards Opportunity + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = opportunity + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Compromise: they want to stay in the same phase + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Conciliation + ############################# + if = { + limit = { root = { is_struggle_phase = struggle_iberia_phase_conciliation } } + random_list = { + # Working towards Compromise + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Conciliation: they want to stay in the same phase + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = conciliation + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + } + } + } + + # Clean variables + remove_variable = agents_for_escalation + remove_variable = agents_for_deescalation + } +} + +# Set AI Intent on join +fp2_struggle.004 = { + hidden = yes + scope = none + + immediate = { + set_variable = { + name = agents_for_escalation + value = 0 + } + set_variable = { + name = agents_for_deescalation + value = 0 + } + + ############################ + # Update the variables + ############################ + every_character_struggle = { + every_involved_ruler = { + limit = { is_alive = yes } + if = { + limit = { has_character_flag = agenda_towards_escalation } + root = { + change_variable = { + name = agents_for_escalation + add = 1 + } + } + } + else_if = { + limit = { has_character_flag = agenda_towards_deescalation } + root = { + change_variable = { + name = agents_for_deescalation + add = 1 + } + } + } + } + } + + if = { + limit = { + NOR = { + has_character_flag = agenda_towards_escalation + has_character_flag = agenda_towards_deescalation + } + } + + ############################# + # Current Phase: Opportunity + ############################# + if = { + limit = { any_character_struggle = { is_struggle_phase = struggle_iberia_phase_opportunity } } + random_list = { + # Working towards Hostility + # It should be for characters looking for direct conflicts and domination, with the will and ability to expand their realms + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = hostility + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Conciliation + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = conciliation + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Hostility + ############################# + if = { + limit = { any_character_struggle = { is_struggle_phase = struggle_iberia_phase_hostility } } + random_list = { + # Working towards Hostility: it means that the character wants to stay in + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = hostility + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Compromise + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Compromise + ############################# + if = { + limit = { any_character_struggle = { is_struggle_phase = struggle_iberia_phase_compromise } } + random_list = { + + # Working towards Opportunity + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = opportunity + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Compromise: they want to stay in the same phase + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Conciliation + ############################# + if = { + limit = { any_character_struggle = { is_struggle_phase = struggle_iberia_phase_conciliation } } + random_list = { + # Working towards Compromise + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Conciliation: they want to stay in the same phase + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = conciliation + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + } + + # Clean variables + remove_variable = agents_for_escalation + remove_variable = agents_for_deescalation + } +} + +################################### +# Iberian Struggle Intro Events +# 0501 - 599 +################################### +fp2_struggle.0501 = { # Fullscreen Intro Event + type = character_event + window = fullscreen_event + title = fp2_struggle.0501.t + desc = { + desc = fp2_struggle.0501.desc + first_valid = { + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } + } + desc = fp2_struggle.0501.desc.involved + } + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = interloper + is_struggle_type = iberian_struggle + } + } + desc = fp2_struggle.0501.desc.interloper + } + } + } + theme = realm + trigger = { # we need to prevent this from firing for all players when a new player joins in MP + is_ai = no + NOT = { has_character_flag = fp2_struggle_intro_event_flag } + fp2_character_any_involvement_iberian_struggle_trigger = yes + } + override_background = { reference = fp2_fullscreen_intro } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + + cooldown = { years = 100 } + + widgets = { + widget = { + gui = "event_window_widget_struggle_info" + container = "dynamic_content_widget" + controller = struggle_info + setup_scope = { struggle:iberian_struggle = { save_scope_as = struggle } } + } + } + immediate = { + play_music_cue = "mx_Struggle_Opening" + add_character_flag = fp2_struggle_intro_event_flag + save_scope_value_as = { + name = start + value = yes + } + } + option = { + name = fp2_struggle.0501.a + clicksound = "event:/DLC/FP2/SFX/UI/fp2_struggle_start_select" + } +} + +################################### +# Struggle Endings +# by Joe Parkin +# 0900-0912 +################################### +fp2_struggle.0900 = { # Hostility + type = character_event + window = fullscreen_event + title = fp2_struggle.0900.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:basque + any_parent_culture = { this = culture:basque } + has_cultural_pillar = language_basque + } + } + } + desc = fp2_struggle.0900.opening.basque + } + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:andalusian + any_parent_culture = { this = culture:andalusian } + has_cultural_pillar = language_arabic + } + } + } + desc = fp2_struggle.0900.opening.andalusian + } + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = heritage_iberian } + } + desc = fp2_struggle.0900.opening.iberian + } + desc = fp2_struggle.0900.opening + } + desc = fp2_struggle.0900.desc + } + theme = court + override_background = { reference = fp2_fullscreen_hostility } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + immediate = { + # Add all involved rulers to a list, for ping event + play_music_cue = "mx_Struggle_ending_hostility" + fp2_stuggle_ending_involved_list_effect = yes + give_nickname = nick_the_conquistador + dynasty = { add_dynasty_prestige = 10000 } + } + + # Faith victory + option = { + name = fp2_struggle.0900.a + if = { + limit = { exists = house } + house = { + add_house_modifier = { + modifier = fp2_struggle_hostility_house_faith_modifier + } + } + } + # Piety reward for faith victory + add_piety = 1000 + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_holy_cb_tt + custom_tooltip = fp2_struggle_hostility_conversion_holy_tt + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + # Culture victory + option = { + name = fp2_struggle.0900.b + # Renown reward for culture victory + if = { + limit = { exists = house } + dynasty = { add_dynasty_prestige = 1000 } + house = { + add_house_modifier = { + modifier = fp2_struggle_hostility_house_culture_modifier + } + } + } + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_culture_cb_tt + custom_tooltip = fp2_struggle_hostility_conversion_culture_tt + # All Involved cultures lose acceptance of each other + custom_tooltip = { + text = fp2_struggle_hostility_culture_tt + fp2_struggle_hostility_cultural_acceptance_effect = yes + } + stress_impact = { + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + # Combined victory + option = { + name = fp2_struggle.0900.c + # Reduced renown and piety rewards for combined + if = { + limit = { exists = house } + house = { + add_house_modifier = { + modifier = fp2_struggle_hostility_house_combined_modifier + years = 200 + } + } + } + add_prestige = 3000 + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_holy_cb_tt + custom_tooltip = culture_parameter_cb_lower_piety_level_requirement + custom_tooltip = fp2_struggle_hostility_culture_cb_tt + custom_tooltip = fp2_struggle_hostility_conversion_holy_tt + custom_tooltip = fp2_struggle_hostility_conversion_culture_tt + # All Involved cultures lose acceptance of each other + custom_tooltip = { + text = fp2_struggle_hostility_culture_large_tt + fp2_struggle_hostility_cultural_acceptance_large_effect = yes + } + stress_impact = { + humble = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + ai_boldness = 1 + } + } + } + + after = { + # Notify & End Struggle + save_scope_as = fp2_loc_struggle_ender # Loc used to use root, this fixes it + every_player = { + limit = { fp2_does_this_player_care_about_the_fate_of_iberia = yes } # Needs to be checked before the struggle ends due to race condition issues + add_to_list = player_to_notify # Making a list so stuff is tiggered after the struggle ends, to make extra sure I don't break anything. + } + + struggle:iberian_struggle = { end_struggle = struggle_iberia_ending_hostility_decision } + every_in_list = { # Then we *actually* notify palyers, making sure the struggle has already ended + list = player_to_notify + trigger_event = fp2_struggle.0910 + } + } +} + +fp2_struggle.0910 = { + type = character_event + window = fullscreen_event + title = fp2_struggle.0900.t + desc = { + first_valid = { + triggered_desc = { + trigger = { is_in_list = struggle_involvees } + desc = fp2_struggle.0910.opening.involved + } + desc = fp2_struggle.0910.opening + } + desc = fp2_struggle.0910.desc + first_valid = { + triggered_desc = { + trigger = { + scope:struggle_ender.house = { has_house_modifier = fp2_struggle_hostility_house_faith_modifier } + } + desc = fp2_struggle.0910.closing.faith + } + triggered_desc = { + trigger = { + scope:struggle_ender.house = { has_house_modifier = fp2_struggle_hostility_house_culture_modifier } + } + desc = fp2_struggle.0910.closing.culture + } + desc = fp2_struggle.0910.closing.combined + } + } + theme = court + override_background = { reference = fp2_fullscreen_hostility } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + immediate = { + play_music_cue = "mx_Struggle_ending_hostility" + ##### Major Effects ##### + show_as_tooltip = { + scope:struggle_ender = { + #dynasty = { add_dynasty_prestige = 10000 } + fp2_struggle_hostility_ender_effect = yes + } + } + # Hispania is available! + custom_tooltip = fp2_struggle_can_create_empire_of_hispania_tt + # Choose Holy War boost, Culture War boost, or both + scope:struggle_ender.house = { + switch = { + trigger = has_house_modifier + fp2_struggle_hostility_house_faith_modifier = { + show_as_tooltip = { add_house_modifier = fp2_struggle_hostility_house_faith_modifier } + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_holy_cb_tt + } + fp2_struggle_hostility_house_culture_modifier = { + show_as_tooltip = { add_house_modifier = fp2_struggle_hostility_house_culture_modifier } + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_culture_cb_tt + custom_tooltip = fp2_struggle_hostility_culture_tt + } + fp2_struggle_hostility_house_combined_modifier = { + show_as_tooltip = { add_house_modifier = fp2_struggle_hostility_house_combined_modifier } + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_holy_cb_tt + custom_tooltip = fp2_struggle_hostility_culture_cb_tt + custom_tooltip = fp2_struggle_hostility_culture_large_tt + } + } + } + } + + # Ok + option = { + name = { + text = fp2_struggle.0910.a + trigger = { is_in_list = struggle_involvees } + } + name = { + text = fp2_struggle.0910.b + trigger = { + NOT = { is_in_list = struggle_involvees } + } + } + } +} + +fp2_struggle.0901 = { # Compromise + type = character_event + window = fullscreen_event + title = fp2_struggle.0901.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:basque + any_parent_culture = { this = culture:basque } + has_cultural_pillar = language_basque + } + } + } + desc = fp2_struggle.0900.opening.basque + } + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:andalusian + any_parent_culture = { this = culture:andalusian } + has_cultural_pillar = language_arabic + } + } + } + desc = fp2_struggle.0900.opening.andalusian + } + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = heritage_iberian } + } + desc = fp2_struggle.0900.opening.iberian + } + desc = fp2_struggle.0900.opening + } + desc = fp2_struggle.0901.desc + } + theme = court + override_background = { reference = fp2_fullscreen_compromise } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + immediate = { + play_music_cue = "mx_Struggle_ending_compromise" + # Independent/Split De Jure Duchies will become De Jure Kingdoms + if = { + limit = { + title:e_spain = { + any_in_de_jure_hierarchy = { fp2_struggle_ending_compromise_independent_duchy_trigger = yes } + } + } + custom_tooltip = { + text = fp2_struggle_compromise_create_new_kingdoms_tt + fp2_struggle_compromise_duchies_to_kingdoms_effect = yes + } + } + # Move duchies to right kingdoms + fp2_struggle_compromise_transfer_duchies_effect = yes + # Turn kingdoms to empires + fp2_struggle_compromise_kingdoms_to_empires_effect = yes + # distribute small kingdoms + fp2_struggle_compromise_distribute_kingdoms_to_neighbouring_empires_effect = yes + # assign the new title to existing characters + fp2_struggle_compromise_distribute_the_actual_titles = yes + + # Set up truces + fp2_struggle_compromise_truce_effect = yes + + ##### Major Effects ##### + fp2_struggle_compromise_ender_effect = yes + + # Tooltips! + fp2_struggle_compromise_tooltip_effect = yes + + ##### Minor Effects ##### + # Self-sufficiency modifiers for each independent realm + fp2_struggle_compromise_modifier_rewards_effect = yes + set_global_variable = { + name = fp2_struggle_compromise_ending + value = yes + } + # Add all involved rulers to a list, for ping event + fp2_stuggle_ending_involved_list_effect = yes + } + + # Ok + option = { + name = fp2_struggle.0901.a + if = { + limit = { + any_in_list = { + list = kingdom_empire + this = root.primary_title + } + } + custom_tooltip = fp2_struggle.0901.tt + } + } + + after = { + stress_impact = { + arrogant = medium_stress_impact_gain + } + + # Notify & End Struggle + save_scope_as = fp2_loc_struggle_ender # Loc used to use root, this fixes it + every_player = { + limit = { fp2_does_this_player_care_about_the_fate_of_iberia = yes } # Needs to be checked before the struggle ends due to race condition issues + add_to_list = player_to_notify # Making a list so stuff is tiggered after the struggle ends, to make extra sure I don't break anything. + } + + struggle:iberian_struggle = { end_struggle = struggle_iberia_ending_compromise_decision } + every_in_list = { # Then we *actually* notify palyers, making sure the struggle has already ended + list = player_to_notify + trigger_event = fp2_struggle.0911 + } + } +} + +fp2_struggle.0911 = { + type = character_event + window = fullscreen_event + title = fp2_struggle.0901.t + desc = { + first_valid = { + triggered_desc = { + trigger = { is_in_list = struggle_involvees } + desc = fp2_struggle.0910.opening.involved + } + desc = fp2_struggle.0910.opening + } + desc = fp2_struggle.0911.desc + } + theme = court + override_background = { reference = fp2_fullscreen_compromise } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + immediate = { + play_music_cue = "mx_Struggle_ending_compromise" + ##### Major Effects ##### + show_as_tooltip = { + scope:struggle_ender = { fp2_struggle_compromise_ender_effect = yes } + } + # Independent/Split De Jure Duchies will become De Jure Kingdoms + custom_tooltip = fp2_struggle_compromise_create_new_kingdoms_tt + # RIP Hispania + fp2_struggle_compromise_tooltip_effect = yes + + ##### Minor Effects ##### + if = { + limit = { + any_in_list = { + list = kingdom_empire + OR = { + this = root.primary_title + this = root.primary_title.de_jure_liege + this = root.primary_title.de_jure_liege.de_jure_liege + } + } + } + custom_tooltip = fp2_struggle.0901.tt + } + if = { + limit = { is_in_list = struggle_involvees } + show_as_tooltip = { + fp2_struggle_compromise_modifier_rewards_personal_house_effect = yes + fp2_struggle_compromise_modifier_rewards_personal_county_effect = yes + } + } + } + + # Ok + option = { + name = { + text = fp2_struggle.0911.a + trigger = { is_in_list = struggle_involvees } + } + name = { + text = fp2_struggle.0910.b + trigger = { + NOT = { is_in_list = struggle_involvees } + } + } + } +} + +fp2_struggle.0902 = { # Conciliation + type = character_event + window = fullscreen_event + title = fp2_struggle.0902.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:basque + any_parent_culture = { this = culture:basque } + has_cultural_pillar = language_basque + } + } + } + desc = fp2_struggle.0900.opening.basque + } + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:andalusian + any_parent_culture = { this = culture:andalusian } + has_cultural_pillar = language_arabic + } + } + } + desc = fp2_struggle.0900.opening.andalusian + } + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = heritage_iberian } + } + desc = fp2_struggle.0900.opening.iberian + } + desc = fp2_struggle.0900.opening + } + desc = fp2_struggle.0902.desc + } + theme = court + override_background = { reference = fp2_fullscreen_conciliation } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + immediate = { + play_music_cue = "mx_Struggle_ending_conciliation" + set_global_variable = { + name = fp2_struggle_conciliation_ending + value = yes + } + # Add all involved rulers to a list, for ping event + fp2_stuggle_ending_involved_list_effect = yes + + # Add all involved cultures with counties to a list, for marriage and holy war checks + fp2_struggle_ending_culture_list_effect = yes + + # Change cultural acceptance + fp2_struggle_conciliation_cultural_acceptance_effect = yes + + ##### Major Effects ##### + fp2_struggle_conciliation_ender_effect = yes + fp2_struggle_conciliation_tooltip_effect = yes + fp2_struggle_conciliation_modifier_rewards_effect = yes + } + + # + option = { + name = fp2_struggle.0902.a + } + + after = { + stress_impact = { + arrogant = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + + # Notify & End Struggle + save_scope_as = fp2_loc_struggle_ender # Loc used to use root, this fixes it + every_player = { + limit = { fp2_does_this_player_care_about_the_fate_of_iberia = yes } # Needs to be checked before the struggle ends due to race condition issues + add_to_list = player_to_notify # Making a list so stuff is tiggered after the struggle ends, to make extra sure I don't break anything. + } + + struggle:iberian_struggle = { end_struggle = struggle_iberia_ending_conciliation_decision } + every_in_list = { # Then we *actually* notify palyers, making sure the struggle has already ended + list = player_to_notify + trigger_event = fp2_struggle.0912 + } + } +} + +fp2_struggle.0912 = { + type = character_event + window = fullscreen_event + title = fp2_struggle.0902.t + desc = { + first_valid = { + triggered_desc = { + trigger = { is_in_list = struggle_involvees } + desc = fp2_struggle.0910.opening.involved + } + desc = fp2_struggle.0910.opening + } + desc = fp2_struggle.0912.desc + } + theme = court + override_background = { reference = fp2_fullscreen_conciliation } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + immediate = { + play_music_cue = "mx_Struggle_ending_conciliation" + ##### Major Effects ##### + show_as_tooltip = { + scope:struggle_ender = { fp2_struggle_conciliation_ender_effect = yes } + } + fp2_struggle_conciliation_tooltip_effect = yes + + ##### Minor Effects ##### + # All involved rulers gain diff culture opinion and learn language scheme power + if = { + limit = { is_in_list = struggle_involvees } + show_as_tooltip = { fp2_struggle_conciliation_modifier_rewards_personal_effect = yes } + } + } + + # Ok + option = { + name = { + text = fp2_struggle.0912.a + trigger = { is_in_list = struggle_involvees } + } + name = { + text = fp2_struggle.0910.b + trigger = { + NOT = { is_in_list = struggle_involvees } + } + } + } +} + +################################### +# Stoking the Fire +# By Ola Jentzsch +################################### +scripted_trigger fp2_struggle_1000_tension_county_trigger = { + is_landless_type_title = no + any_county_province = { geographical_region = world_europe_west_iberia } + faith = { save_temporary_scope_as = compare_faith } + root = { + faith = { + faith_hostility_level = { target = scope:compare_faith value > faith_astray_level } + } + } +} +scripted_trigger fp2_struggle_1000_tension_councillor_trigger = { + faith = { this = root.faith } + is_available_healthy_ai_adult = yes + OR = { + has_trait = zealous + has_trait = wrathful + has_trait = deceitful + has_trait = sadistic + has_trait = holy_warrior + has_trait = callous + } + NOR = { + has_trait = compassionate + has_trait = just + } +} + +fp2_struggle.1000 = { + type = character_event + title = fp2_struggle.1000.t + desc = fp2_struggle.1000.desc + theme = dread + + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:tension_councillor + animation = scheme + } + + + trigger = { + has_fp2_dlc_trigger = yes + fp2_character_involved_in_struggle_trigger = yes + custom_description = { + text = empty_spooky_trigger #This is entirely pointless, but code likes it, so ghost away! + any_held_county = { fp2_struggle_1000_tension_county_trigger = yes } + OR = { + any_councillor = { fp2_struggle_1000_tension_councillor_trigger = yes } + any_vassal = { fp2_struggle_1000_tension_councillor_trigger = yes } + exists = cp:councillor_marshal + } + } + OR = { + capital_province = { geographical_region = world_europe_west_iberia } + culture = { has_cultural_pillar = heritage_iberian } + } + } + + cooldown = { #this shouldn't fire too often + years = 50 + } + + immediate = { #We need a province and a suitable councillor; this fixes that. + random_held_county = { + limit = { fp2_struggle_1000_tension_county_trigger = yes } + save_scope_as = tension_county + } + if = { + limit = { + any_councillor = { + fp2_struggle_1000_tension_councillor_trigger = yes + } + } + random_councillor = { + limit = { + fp2_struggle_1000_tension_councillor_trigger = yes + } + save_scope_as = tension_councillor + } + } + else_if = { + limit = { + any_vassal = { + fp2_struggle_1000_tension_councillor_trigger = yes + } + } + random_vassal = { + limit = { + fp2_struggle_1000_tension_councillor_trigger = yes + } + save_scope_as = tension_councillor + } + } + else = { + random_councillor = { + limit = { + has_council_position = councillor_marshal + } + save_scope_as = tension_councillor + } + } + + if = { #this code checks if there is an eligible person for the 4th option + limit = { + any_vassal = { + is_available_healthy_ai_adult = yes + faith = scope:tension_county.faith + } + } + random_vassal = { + limit = { + is_available_healthy_ai_adult = yes + faith = scope:tension_county.faith + } + save_scope_as = minority_courtier + } + } + else_if = { + limit = { + any_courtier = { + is_available_healthy_ai_adult = yes + faith = scope:tension_county.faith + } + } + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + faith = scope:tension_county.faith + } + save_scope_as = minority_courtier + } + } + } + + option = { #Let us spread some hatred...discreetly. + name = fp2_struggle.1000.a + + ai_chance = { #Cruel and fanatical characters pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 0.5 + ai_compassion = -1 + ai_honor = -1 + } + } + + stress_impact = { + # Righteous characters find this a very unappealing option. + compassionate = medium_stress_impact_gain + gallant = medium_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + paragon = medium_stress_impact_gain + # As do lazy ones. + lazy = minor_stress_impact_gain + } + + scope:tension_councillor = { + add_opinion = { + target = root + opinion = 10 + modifier = took_my_advice_opinion + } + } + + + add_character_modifier = { + modifier = fanatical_recruits_modifier + years = 10 + } + + duel = { #You try to create a hate campaign - and get away with it. + skill = intrigue + value = average_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = stoke_tension_toast.success + left_icon = root + + add_dread = minor_dread_gain + + scope:tension_county = { + add_county_modifier = { + modifier = riots_and_murders_province_modifier + years = 5 + } + } + } + } + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = stoke_tension_toast.failure + left_icon = root + add_character_modifier = { + modifier = hate_monger_modifier + years = 10 + } + + scope:tension_county = { + add_county_modifier = { + modifier = riots_and_murders_province_modifier + years = 5 + } + } + } + } + } + } + + option = { #I trust you to handle it + name = fp2_struggle.1000.b + + trigger = { + intrigue <= medium_skill_rating + } + + show_unlock_reason = no + + ai_chance = { #Cruel and fanatical characters pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 0.5 + ai_rationality = 0.2 + ai_compassion = -0.5 + ai_honor = -1 + } + } + + stress_impact = { + # Righteous characters find this a very unappealing option. + compassionate = medium_stress_impact_gain + gallant = medium_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + paragon = medium_stress_impact_gain + # As do lazy ones. + lazy = miniscule_stress_impact_gain + } + + if = { + limit = { + intrigue <= medium_skill_rating + } + custom_tooltip = bad_intrigue.tt + } + + scope:tension_councillor = { + if = { + limit = { + intrigue >= average_skill_level + } + add_opinion = { + target = root + opinion = 10 + modifier = trusted_me_opinion + } + } + else = { + add_opinion = { + target = root + opinion = -10 + modifier = unfair_expectations_opinion + } + } + } + + add_character_modifier = { + modifier = fanatical_recruits_modifier + years = 10 + } + + + + scope:tension_councillor = { + duel = { + skill = intrigue + value = average_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = delegated_stoke_tension_toast.success + left_icon = scope:tension_councillor + + scope:tension_county = { + add_county_modifier = { + modifier = riots_and_murders_province_modifier + years = 5 + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = stoke_tension_toast.failure + left_icon = scope:tension_councillor + + root = { + add_character_modifier = { + modifier = hate_monger_modifier + years = 10 + } + } + scope:tension_councillor = { + add_character_modifier = { + modifier = hate_monger_modifier + years = 10 + } + } + scope:tension_county = { + add_county_modifier = { + modifier = riots_and_murders_province_modifier + years = 5 + } + } + } + } + } + } + } + } + + option = { #"No, I shall try to ease the tensions." + name = fp2_struggle.1000.c + + ai_chance = { #just and compassionate characters pick this option + base = 10 + ai_value_modifier = { + ai_honor = 0.8 + ai_compassion = 0.7 + ai_rationality = 0.2 + ai_zeal = -0.8 + ai_vengefulness = -0.7 + } + } + + stress_impact = { + # Aggressive characters find this an unappealing option. + wrathful = minor_stress_impact_gain + zealous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + scope:tension_councillor = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + + duel = { + skill = diplomacy + value = high_skill_rating + + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = ease_tension_toast.success + left_icon = root + + add_character_modifier = { + modifier = tolerance_gospel_modifier + years = 10 + } + + scope:tension_county = { + add_county_modifier = { + modifier = tensions_eased_province_modifier + years = 5 + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = ease_tension_toast.failure + left_icon = root + scope:tension_county = { + add_county_modifier = { + modifier = riots_and_murders_province_modifier + years = 5 + } + } + } + } + } + } + + option = { #"If I cannot stop this madness... + name = fp2_struggle.1000.d + + trigger = { + exists = scope:minority_courtier + + scope:tension_county = { + this != root.capital_county + } + } + + ai_chance = { #just and compassionate characters pick this option + base = 10 + ai_value_modifier = { + ai_honor = 0.3 + ai_compassion = 0.3 + ai_rationality = 0.8 + ai_zeal = -0.8 + ai_vengefulness = -0.7 + ai_greed = -1 + } + } + + stress_impact = { + # Aggressive characters find this unappealing + wrathful = minor_stress_impact_gain + zealous = major_stress_impact_gain + sadistic = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + + #As do power-mongers, you're giving away a whole province! + ambitious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + + } + + scope:minority_courtier = { + add_opinion = { + target = root + opinion = 20 + modifier = received_title_county + } + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + + scope:tension_county = { + change_title_holder = { + holder = scope:minority_courtier + change = scope:change + } + } + + resolve_title_and_vassal_change = scope:change + + add_stress = medium_stress_loss + + scope:tension_councillor = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + + scope:tension_county = { + add_county_modifier = { + modifier = tensions_eased_province_modifier + years = 10 + } + } + } +} + +################################### +# War Widows +# By Ola Jentzsch +################################### +# Idea by Isabella welch +################################### + +scripted_trigger fp2_struggle.1001_weird_option_traits = { # These, presumably, makes you even more sympathethic to widows and orphans, or likely to take an ill-thought out decision. + OR = { + has_character_modifier = associates_with_strange_peasants_modifier + has_trait = bastard + has_trait = legitimized_bastard + has_trait = intellect_bad_3 + has_trait = intellect_bad_2 + has_trait = improvident + has_trait = lifestyle_reveler + has_trait = pregnant + has_trait = lunatic + has_trait = eccentric + } +} + +scripted_trigger fp2_struggle.1001_expectant_vassal_or_courtier_traits = { # This is about the personality the pregnant courtier should have to get this idea to begin with + has_trait = pregnant + is_available_ai = yes + NOR = { + has_trait = callous + has_trait = content + has_trait = arrogant + has_trait = dull + } +} + +fp2_struggle.1001 = { + type = character_event + title = fp2_struggle.1001.t + desc = fp2_struggle.1001.desc + theme = faith + cooldown = { years = 50 } + + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:expectant_courtier + animation = happiness + } + + trigger = { + has_fp2_dlc_trigger = yes + OR = { + any_vassal = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + } + any_courtier = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + } + } + gold >= medium_gold_value_check + + any_truce_target = { } + } + + immediate = { + random_vassal = { + limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + is_spouse_of = root + } + + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + any_player_heir = { is_spouse_of = prev } + } + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + is_councillor = yes + } + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + is_powerful_vassal = yes + } + + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + } + + save_scope_as = expectant_courtier + } + + if = { + limit = { + NOT = { + exists = scope:expectant_courtier + } + } + random_courtier = { + limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + is_spouse_of = root + } + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + any_player_heir = { is_spouse_of = prev } + } + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + is_councillor = yes + } + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + } + save_scope_as = expectant_courtier + } + } + } + + + + option = { #A good idea! I shall create such a fund. + name = fp2_struggle.1001.a + + stress_impact = { + # Arrogant or cruel characters find this an unappealing option. + arbitrary = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + + # As do, of course, greedy ones. + greedy = medium_stress_impact_gain + + # As do callous and content ones, to an extent. + callous = minor_stress_impact_gain + content = minor_stress_impact_gain + + # But generous and compassionate characters like it. + compassionate = minor_stress_impact_loss + generous = medium_stress_impact_loss + } + + ai_chance = { #Just and compassionate characters pick this option + base = 10 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 1 + ai_vengefulness = -0.2 + ai_greed = -0.5 + } + } + + remove_treasury_or_gold = major_treasury_or_gold_value + + scope:expectant_courtier = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + + add_character_modifier = { + modifier = nursing_salaries_for_single_mothers_modifier + years = 20 + } + } + + option = { #Widows I will support, but not whores! + name = fp2_struggle.1001.b + flavor = fp2_struggle.1001.b.tt + trigger = { + fp2_struggle.1001_weird_option_traits = no + trait_is_shunned_or_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = dummy_female + } + } + + stress_impact = { + # Truly righteous characters wouldn't say this. + compassionate = minor_stress_impact_gain + gallant = minor_stress_impact_gain + generous = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + + # And greedy ones still don't wanna pay up + greedy = minor_stress_impact_gain + } + + ai_chance = { #Zealous AI characters pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = -0.8 + } + } + + remove_treasury_or_gold = medium_treasury_or_gold_value + add_piety = minor_piety_gain + add_character_modifier = { + modifier = widows_and_widowers_amazing_funds_modifier + years = 20 + } + + scope:expectant_courtier = { + if = { + limit = { + has_trait = zealous + } + add_opinion = { + target = root + opinion = 10 + modifier = pleased_opinion + } + } + else = { + add_opinion = { + target = root + opinion = -10 + modifier = slightly_disappointed_opinion + } + } + } + } + + + option = { #But they can come stay at my court! We have food in abundance! + name = fp2_struggle.1001.c + flavor = fp2_struggle.1001.c.tt + trigger = { + fp2_struggle.1001_weird_option_traits = yes + } + + stress_impact = { + # Cheap or shy character's don't like this + greedy = medium_stress_impact_gain + shy = medium_stress_impact_gain + + #Nor do those wo really care about the appearance and glory of their courts + + ambitious = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + temperate = medium_stress_impact_gain + august = medium_stress_impact_gain + born_in_the_purple = minor_stress_impact_gain + + # But hypersocial hippies love it + + humble = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + } + + ai_chance = { #Deranged or hypersocial but irrational AI characters pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.8 + ai_rationality = -0.8 + } + } + + scope:expectant_courtier = { + if = { + limit = { + OR = { + has_character_modifier = associates_with_strange_peasants_modifier + has_trait = bastard + has_trait = legitimized_bastard + has_trait = intellect_bad_3 + has_trait = intellect_bad_2 + has_trait = improvident + has_trait = gregarious + } has_trait = lunatic + } + add_opinion = { + target = root + opinion = 10 + modifier = pleased_opinion + } + } + else = { + add_opinion = { + target = root + opinion = -10 + modifier = perplexed_opinion + } + } + } + if = { + limit = { + root = { + faith = { + OR = { + trait_is_virtue = gregarious + trait_is_virtue = humble + trait_is_virtue = generous + } + } + } + } + add_piety = medium_piety_gain + } + else = { + add_piety = minor_piety_gain + } + add_character_modifier = { + modifier = destitute_single_mothers_modifier + years = 15 + } + } + + option = { #Surely, my benevolent vassals can help funding this. + name = fp2_struggle.1001.d + + trigger = { + any_vassal = { + count = all + is_ai = yes + } + } + + stress_impact = { + # Careful or dilpomatically minded characters won't do this. + content = medium_stress_impact_gain + diplomat = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { #Economic AI characters pick this option, while the careful don't. + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = 0.5 + ai_rationality = -0.5 + } + } + + remove_treasury_or_gold = minor_treasury_or_gold_value + + custom_tooltip = fp2_struggle.1001.specialdescpositive + custom_tooltip = fp2_struggle.1001.specialdescnegative + hidden_effect = { + every_vassal = { + IF = { + limit = { + NOT = { + has_trait = pregnant + } + } + IF = { + limit = { + OR = { + has_trait = compassionate + has_trait = generous + has_trait = just + } + } + add_opinion = { + target = root + opinion = 10 + modifier = funded_righteous_cause_opinion + } + } + ELSE = { + add_opinion = { + target = root + opinion = -10 + modifier = extorted_me_opinion + } + } + } + } + } + + scope:expectant_courtier = { + IF = { + limit = { + is_vassal_of = root #if she is, she gets angry because now SHE is expected to pay for this... + } + add_opinion = { + target = root + opinion = -20 + modifier = extorted_me_opinion + } + } + ELSE = { + add_opinion = { + target = root + opinion = 10 + modifier = pleased_opinion + } + } + } + + add_character_modifier = { + modifier = nursing_salaries_for_single_mothers_modifier + years = 20 + } + } + + option = { #I am your king, not a wet nurse! + name = fp2_struggle.1001.e + + stress_impact = { + # Benevolent characters wouldn't ignore this. + compassionate = medium_stress_impact_gain + gallant = medium_stress_impact_gain + generous = medium_stress_impact_gain + + # nor would those who are truly competent or just. + administrator = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + diligent = minor_stress_impact_gain + just = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + + ai_chance = { #Callous or cheap AI characters pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + ai_greed = 0.5 + ai_honor = -0.7 + ai_compassion = -0.7 + } + } + + scope:expectant_courtier = { + add_opinion = { + target = root + opinion = -20 + modifier = hurt_opinion + } + } + + random = { + chance = 50 + send_interface_toast = { + left_icon = root + title = not_my_problem_toast + add_character_modifier = { + modifier = starving_single_mothers_and_children_modifier + years = 15 + } + } + } + } +} + +################################### +# Andalusian Advancements +# By Ola Jentzsch +################################### +# Inspired by an idea by Isabella welch +######################################### +scripted_trigger neighboring_ruler_proper_culture_trigger = { + OR = { + culture = culture:andalusian + culture = culture:bedouin + culture = culture:baranis + culture = culture:butr + culture = culture:levantine + culture = culture:sephardi + } +} + +fp2_struggle.1002 = { + type = character_event + title = fp2_struggle.1002.t + desc = { #Different flavor depending on time period + first_valid = { + triggered_desc = { + trigger = { current_date <= 1030.1.1 } + desc = fp2_struggle.1002.desc_early_golden_age + } + triggered_desc = { + trigger = { + current_year >= 1250 + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + } + desc = fp2_struggle.1002.desc_post_golden_age_christian #this triggers the latinized names of the polymaths + } + triggered_desc = { + trigger = { current_year >= 1250 } + desc = fp2_struggle.1002.desc_post_golden_age_unchristian #or their arabic ones + } + triggered_desc = { + trigger = { current_year >= 1030 } + desc = fp2_struggle.1002.desc_late_golden_age + } + } + first_valid = { + triggered_desc = { #tests if the event would fire one of the historical physicians + trigger = { + AND = { + current_year > 976 + current_year < 1010 + } + exists = global_var:albucasis_created + exists = scope:albucasis_physician + scope:great_physician = scope:albucasis_physician #this is a measure taken so that the loc gets tied to the appropriate character + } + desc = fp2_struggle.1002.desc_albucasis #this is the dialogue text if Albucasis spawns + } + triggered_desc = { #tests if the event would fire one of the historical physicians + trigger = { + AND = { + current_year > 1125 + current_year < 1165 + } + exists = global_var:avenzoar_created + exists = scope:avenzoar_physician + scope:great_physician = scope:avenzoar_physician + } + desc = fp2_struggle.1002.desc_avenzoar #this is the dialogue if Avenzoar spawns + } + triggered_desc = { #tests if the event would fire one of the historical physicians + trigger = { + AND = { + current_year > 1140 + current_year < 1180 + } + exists = global_var:tufail_created + exists = scope:tufail_physician + scope:great_physician = scope:tufail_physician + } + desc = fp2_struggle.1002.desc_tufail #this is the dialogue if Ibn Tufail spawns + } + triggered_desc = { #this defaults to a random Andalusian physician + trigger = { current_year >= 1050 } ## + desc = fp2_struggle.1002.desc_no_historical_physician_late + } + desc = fp2_struggle.1002.desc_no_historical_physician_early + } + first_valid = { #if root has a court physician, it changes the narrative a bit. + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + } + desc = fp2_struggle.1002.desc_has_physician_and_is_christian #in this case, the slur "heathen" is used + } + triggered_desc = { + trigger = { court_physician_available_trigger = yes } + desc = fp2_struggle.1002.desc_has_physician_but_not_christian #in this case, the slur "eccentric" is used + } + triggered_desc = { + trigger = { OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } } + desc = fp2_struggle.1002.desc_has_no_physician_but_is_christian #in this case, the slur "heathen" is used + } + desc = fp2_struggle.1002.desc_has_no_physician #default option should all else fail + } + } + + theme = medicine + override_background = { reference = throne_room } + + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:great_physician + animation = personality_rational #polymaths should always have this pose :D + } + + lower_left_portrait = scope:neighboring_ruler #this is the ruler that's angry with the polymath + + lower_right_portrait = scope:scoped_physician #this is your court physician if you have one + + cooldown = { years = 100 } + + trigger = { + has_fp2_dlc_trigger = yes + #any_character_to_title_neighboring_county = { #this searches for a neighboring province that has the xenophilic tradition, which is this event's dynamic way of checking for Andalusian culture or cultures derived from it. + any_neighboring_and_across_water_top_liege_realm_owner = { + culture = { + OR = { + has_cultural_tradition = tradition_xenophilic + has_cultural_tradition = tradition_medicinal_plants + has_cultural_tradition = tradition_fp2_malleable_subjects + } + } + } + + root.capital_province = { #so that it only triggers for people close to Andalusia + OR = { + geographical_region = world_europe_west_iberia + geographical_region = world_europe_west_francia + geographical_region = world_europe_south_italy + } + } + + NOT = { #So that it doesn't fire for the Andalusians themselves, because that'd make the narrative weird + culture = culture:andalusian + } + + NOT = { #So that it doesn't fire for the Umayyads when they control Iberia + AND = { + culture = culture:levantine + root.capital_province = { geographical_region = world_europe_west_iberia } + } + } + + any_neighboring_and_across_water_top_liege_realm_owner = { + is_ai = yes + } + } + + weight_multiplier = { + base = 0.4 + modifier = { + OR = { + AND = { + current_year > 976 + current_year < 1010 + } + AND = { + current_year > 1125 + current_year < 1180 + } + } + add = 1.6 + } + modifier = { + neighboring_ruler_proper_culture_trigger = yes + add = 0.5 + } + } + + + immediate = { + + random_neighboring_and_across_water_top_liege_realm_owner = { #this searches for a neighboring ruler with the proper cultural tradition, which is this event's dynamic way of checking for Andalusian culture or cultures derived from it. + limit = { + culture = { + OR = { + has_cultural_tradition = tradition_xenophilic + has_cultural_tradition = tradition_medicinal_plants + has_cultural_tradition = tradition_fp2_malleable_subjects + } + } + } + culture = { save_scope_as = xenophilic_culture } #this is mostly used for error-checking because the debug log is unclear. + } + + if = { #This looks to see if one of three historical physicians will be used in the event + limit = { #their rough period of activity + AND = { + current_year > 976 + current_year < 1010 + } + NOT = { exists = global_var:albucasis_created } #makes sure that he wasn't already spawned by the event elsewhere + is_ai = no + scope:xenophilic_culture = culture:andalusian + } + create_character = { + age = { 40 70 } #their rough age during the period of their flourishing + location = root.capital_province + name = "Abu al-Qasim Al-Zahrawi" #Albucasis + gender = male + template = scholar_character + trait = intellect_good_3 #He was one of the Middle Ages' greatest geniuses + trait = lifestyle_herbalist + trait = lifestyle_physician + trait = education_learning_4 + random_traits_list = { #his personality, extrapolated from my research + count = 3 + ambitious = {} + compassionate = {} + calm = {} + diligent = {} + humble = {} + patient = {} + } + random_traits_list = { #this is to hint to the player why he was exiled from the previous court + count = 1 + fornicator = {} + deviant = {} + sodomite = {} + } + culture = culture:andalusian + dynasty = none + faith = faith:muwalladi + save_scope_as = albucasis_physician #this is needed to get the loc right + } + set_global_variable = albucasis_created + scope:albucasis_physician = { + save_scope_as = great_physician #this is to create one easy, generic scope for use in the rest of the event + } + } + + else_if = { + limit = { #their rough period of activity + AND = { + current_year > 1125 + current_year < 1165 + } + NOT = { exists = global_var:avenzoar_created } #makes sure that he wasn't already spawned by the event elsewhere + is_ai = no + scope:xenophilic_culture = culture:andalusian + } + create_character = { + age = { 31 71 } #their rough age during the period of their flourishing + location = root.capital_province + name = "Abū Marwān ibn Zuhr" #Avenzoar + gender = male + template = scholar_character + trait = intellect_good_2 + trait = scholar + trait = lifestyle_physician + trait = education_learning_4 + random_traits_list = { #his personality, extrapolated from my research + count = 3 + diligent = {} + cynical = {} + humble = {} + vengeful = {} #He was bitter over having been exiled from Morocco + } + random_traits_list = { #this is to hint to the player why he was exiled from the previous court + count = 1 + fornicator = {} + deviant = {} + sodomite = {} + murderer = {} + } + culture = culture:andalusian + dynasty = none + faith = faith:muwalladi + save_scope_as = avenzoar_physician + } + + set_global_variable = avenzoar_created + scope:avenzoar_physician = { + save_scope_as = great_physician + } + } + + else_if = { + limit = { #their rough period of activity + AND = { + current_year > 1140 + current_year < 1180 + } + NOT = { exists = global_var:tufail_created } #makes sure that he wasn't already spawned by the event elsewhere + is_ai = no + scope:xenophilic_culture = culture:andalusian + } + create_character = { + age = { 35 75 } #their rough age during the period of their flourishing + location = root.capital_province + name = "Abū Bakr ibn Tufail" #Ibn Tufail + gender = male + template = scholar_character + trait = intellect_good_2 + trait = theologian + trait = lifestyle_physician + trait = education_learning_3 + trait = journaller #He was an avid writer + random_traits_list = { #his personality, extrapolated from my research + count = 3 + diligent = {} + calm = {} + humble = {} + trusting = {} + } + random_traits_list = { #this is to hint to the player why he was exiled from the previous court + count = 1 + fornicator = {} + deviant = {} + sodomite = {} + witch = {} + } + culture = culture:andalusian + dynasty = none + faith = faith:muwalladi + save_scope_as = tufail_physician + } + set_global_variable = tufail_created + scope:tufail_physician = { + save_scope_as = great_physician + } + } + + + else = { #or it defaults to a random one + create_character = { + age = { 32 50 } + location = root.capital_province + template = scholar_character + trait = intellect_good_1 + trait = education_learning_3 + trait = lifestyle_physician + random_traits_list = { + count = 3 + ambitious = {} + calm = {} + diligent = {} + cynical = {} + humble = {} + patient = {} + } + random_traits_list = { ##his is to hint to the player why he was exiled from the previous court + count = 1 + fornicator = {} + deviant = {} + sodomite = {} + incestuous = {} + witch = {} + } + culture = scope:xenophilic_culture + faith = faith:muwalladi + save_scope_as = great_physician + } + } + + hidden_effect = { + scope:great_physician = { + add_trait_xp = { + trait = lifestyle_physician + value = 100 + } + } + } + + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + AND = { + neighboring_ruler_proper_culture_trigger = yes #the event prefers the neighboring ruler to be of these cultures, since it makes the most sense histrically for the scholar to have been at that court. + is_ai = yes + } + } + alternative_limit = { is_ai = yes} + save_scope_as = neighboring_ruler + } + + if = { #if you have a court physician already, he has a stake in this! + limit = { + court_physician_available_trigger = yes + } + save_court_physician_as_effect = { SCOPE_NAME = scoped_physician } + } + } + + option = { #I could use a new physician... + name = fp2_struggle.1002.a + + ai_chance = { #rational AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.7 + ai_zeal = -0.7 + } + } + + stress_impact = { + # Conservative characters don't want to do this. + content = minor_stress_impact_gain + + # Nor do self-absorbed ones + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + + remove_treasury_or_gold = major_treasury_or_gold_value #this guy is expensive! + + add_courtier = scope:great_physician #he's added to root's court + + court_position_grant_effect = { + EMPLOYER = root + CANDIDATE = scope:great_physician + POS = court_physician + } + + scope:great_physician = { #naturally, the polymath likes to get a new job + add_opinion = { + target = root + opinion = 10 + modifier = hired_me_opinion + } + } + + scope:neighboring_ruler = { #but the neighboring ruler gets angry that you harbor him + progress_towards_rival_effect = { + REASON = rival_harbored_polymath + CHARACTER = root + OPINION = 0 + } + } + + add_character_modifier = { #while you get inspired! + modifier = inspired_medicine_modifier + years = 20 + } + } + + option = { #I do not need you, I can read myself. + name = fp2_struggle.1002.b + flavor = fp2_struggle.1002.b.tt + + trigger = { #This only fires after Avicenna's life, as his books are referenced. + current_year >= 1030 + learning >= medium_skill_rating #and you have to be at least somewhat learned to have this option appear, otherwise it'd be superflous + NOT = { + exists = scope:scoped_physician + } + } + + ai_chance = { #energetic, overconfident AI chooses this + base = 10 + ai_value_modifier = { + ai_energy = 0.7 + ai_boldness = 0.6 + ai_rationality = 0.4 + ai_zeal = -0.6 + ai_greed = -0.6 + } + } + + stress_impact = { + # Conservative, dull or cheap characters won't do this + content = minor_stress_impact_gain + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + dull = medium_stress_impact_gain + } + + custom_tooltip = fp2_struggle.1002.physicianleaves + + remove_short_term_gold = minor_gold_value #books are expensive! + + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = medium_lifestyle_experience + } + + if = { #your physician gets disappointed for your lack of trust in them + limit = { exists = scope:scoped_physician } + scope:scoped_physician = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + } + + duel = { #you try to read Arabic books + skill = learning + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { #you succeed! + title = reading_avicenna_toast.success + left_icon = root + root = { + add_character_modifier = { + modifier = inspired_medicine_modifier + years = 20 + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { #you misunderstod something! + title = reading_avicenna_toast.failure + left_icon = root + root = { + add_character_modifier = { + modifier = misread_medicine_incompetence_modifier + years = 20 + } + } + } + } + } + } + + + option = { #What do I need you for? I can read Greek myself + name = fp2_struggle.1002.c + flavor = fp2_struggle.1002.c.tt + + trigger = { #This triggers for the early period, before the Canon of Medicine was published. + current_date <= 1030.1.1 + learning >= medium_skill_rating + NOT = { + exists = scope:scoped_physician + } + } + + ai_chance = { #energetic AI are the most likely to attempt this in this early time period + base = 10 + ai_value_modifier = { + ai_energy = 0.8 + ai_rationality = 0.2 + ai_zeal = -0.2 + } + } + + stress_impact = { + # Conservative, dull or cheap characters won't do this + content = minor_stress_impact_gain + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + dull = medium_stress_impact_gain + } + + custom_tooltip = fp2_struggle.1002.physicianleaves + + remove_short_term_gold = minor_gold_value #books are really expensive in this early period + + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = medium_lifestyle_experience + } + + if = { + limit = { exists = scope:scoped_physician } #your physician still gets disappointed in you + scope:scoped_physician = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + } + + duel = { #this duel is difficult - it's mostly an option for extremely learned or overconfident rulers. + skill = learning + value = high_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = reading_hippocrates_toast.success #You can read greek! + left_icon = root + root = { + add_character_modifier = { + modifier = medical_insights_modifier + years = 20 + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = reading_hippocrates_toast.failure #apparently, your Greek skills aren't all you cranked them up to be. + left_icon = root + root = { + add_character_modifier = { + modifier = cannot_read_greek_modifier + years = 20 + } + } + } + } + } + } + + option = { #I will send you back from whence you came...in chains. + name = fp2_struggle.1002.d + + ai_chance = { #but vengeful ones sure love it! + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.8 + ai_honor = -0.2 + } + } + + stress_impact = { + #Caring, carefree or just characters won't do this + generous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + just = minor_stress_impact_gain + trusting = minor_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + + #But arbitrary bastards love it + arbitrary = minor_stress_impact_loss + } + + scope:great_physician = { #the polymath, naturally, gets sad that you send him back to his disgruntled former employer. + add_opinion = { + target = root + opinion = -40 + modifier = left_me_to_wolves_opinion + } + } + + if = { #but your current physician is very happy! + limit = { exists = scope:scoped_physician } + scope:scoped_physician = { + add_opinion = { + target = root + opinion = 20 + modifier = let_me_keep_my_job_opinion + } + } + } + + scope:neighboring_ruler = { #as is the neighboring ruler, especially if he is your friend + if = { + limit = { + has_relation_friend = root + } + add_opinion = { + target = root + modifier = strengthened_friendship_opinion + } + } + else = { + progress_towards_friend_effect = { + REASON = friend_returned_refugee + CHARACTER = root + OPINION = 0 + } + } + } + + add_dread = minor_dread_gain #you gain some dread for doing this, naturally + + custom_tooltip = fp2_struggle.1001.physician_imprisoned + hidden_effect = { + if = { + limit = { + scope:neighboring_ruler = { + is_ruler = yes + } + } + scope:great_physician = { #while the polymath gets to languish in a dungeon + hard_imprison_character_effect = { + TARGET = this + IMPRISONER = scope:neighboring_ruler + } + } + } + else = { + scope:great_physician = { + silent_disappearance_effect = yes + } + } + } + } + + option = { #Wash my hands? Are you insane?" + name = fp2_struggle.1002.e + + trigger = { #This only triggers for Christianity and similar faiths + faith = { + has_doctrine_parameter = theocracy_temple_lease + NOR = { + has_doctrine_parameter = legalism_modified_law_costs + has_doctrine_parameter = literalist_debate_enabled + } + } + NOT = { has_lifestyle = learning_lifestyle } #So that this doesn't fire if you have the "Wash your hands" perk + } + + ai_chance = { #and fanatics don't care about hygiene...apparently + base = 10 + ai_value_modifier = { + ai_zeal = 0.8 + ai_rationality = -0.8 + } + } + + stress_impact = { + # Innovative or nervous chracters wouldn't pick this option. + ambitious = minor_stress_impact_gain + craven = minor_stress_impact_gain + + #But stubborn or content ones would + content = minor_stress_impact_loss + lazy = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + } + + custom_tooltip = fp2_struggle.1002.physicianleaves + + if = { #your physician, again, loves that they get to keep their job + limit = { exists = scope:scoped_physician } + scope:scoped_physician = { + add_opinion = { + target = root + opinion = 20 + modifier = let_me_keep_my_job_opinion + } + } + } + + add_piety = medium_piety_gain #and your faith rewards you for turning away the heathen + + add_character_modifier = { #but you're rolling in filth + modifier = rolling_in_filth_modifier + years = 5 + } + } + + + + option = { #Begone, innovation should only come from God. + name = fp2_struggle.1002.f + + trigger = { + current_year >= 1065 #because this option refers to developments in islam that happened within the Seljuk empire + faith = { #it checks for doctrines, rather than islam itself, to make the event more dynamic + OR = { + has_doctrine_parameter = legalism_modified_law_costs + has_doctrine_parameter = literalist_debate_enabled + has_doctrine_parameter = religious_legal_pronouncements_law_cost_reduction + } + } + } + + ai_chance = { #zealous AIs pick this, but it's not entirely unrational - just hostile to new ideas. + base = 10 + ai_value_modifier = { + ai_zeal = 0.8 + ai_rationality = -0.2 + } + } + + stress_impact = { + #True rationalists abhor this option + ambitious = medium_stress_impact_gain + diligent = medium_stress_impact_gain + + #But stubborn and fanatical ones like it + content = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + zealous = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + } + + custom_tooltip = fp2_struggle.1002.physicianleaves + + if = { #your physician, again, loves that they get to keep their job + limit = { exists = scope:scoped_physician } + scope:scoped_physician = { + add_opinion = { + target = root + opinion = 20 + modifier = let_me_keep_my_job_opinion + } + } + } + + scope:neighboring_ruler = { #the neighboring ruler likes that you rebuked the polymath, at least + add_opinion = { + target = root + opinion = 10 + modifier = rejected_my_enemy_opinion + } + } + + add_character_modifier = { #but you draw closer to the Nizamiyah movement, rejecting innovation. + modifier = anti_innovation_muslim_modifier + years = 15 + } + } +} + +################################### +# Soul of Iron +# By Ola Jentzsch +################################### +fp2_struggle.1010 = { # Soul of Iron, by Ola Jentzsch + type = character_event + title = fp2_struggle.1010.t + desc = fp2_struggle.1010.desc + theme = realm + + left_portrait = { + character = root + animation = happiness #root smells an opportunity! + } + right_portrait = { + character = scope:great_swordsmith + animation = scheme #he's a scheming bastard, kinda + } + + + trigger = { #The province must also be involved in the Iberian struggle + is_ai = no + has_fp2_dlc_trigger = yes + any_held_county = { + any_county_province = { + has_building_or_higher = blacksmiths_01 #This event needs ROOT to have a blacksmith building + } + } + fp2_character_involved_in_struggle_trigger = yes + } + + cooldown = { years = 100 } + + immediate = { + + random_held_county = { #this is to find the county that has the blacksmith + limit = { + any_county_province = { + has_building_or_higher = blacksmiths_01 + } + } + save_scope_as = blacksmith_county #this scopes it - note that it might be the same county as toledo_county; that is intentional. + } + + title:b_toledo = { save_scope_as = toledo_holding } #this is used in the localization + + title:c_toledo = { save_scope_as = toledo_county } #this is used in option c, as well as the localization + + create_character = { #this is the mighty blacksmith that the event needs + age = { 45 55 } #he's experienced and aging, but not old + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance #could be female, if given the right context. + trait = intellect_good_3 #he's a genius craftsman + trait = strong #and a blacksmith... + trait = arrogant #he's supremely gifted, but also extremely arrogant, Fëanor basically + random_traits_list = { #the rest of his questionable personality + count = 2 + ambitious = {} + diligent = {} + callous = {} + greedy = {} + patient = {} + stubborn = {} + vengeful = {} + } + random_traits_list = { #something fun to give him character! + count = 1 + one_eyed = {} + scarred = {} + } + culture = scope:toledo_county.culture + faith = faith:catholic + dynasty = none + save_scope_as = great_swordsmith #this saves him as a scope so we can get nice effects to bounce off him! + } + + hidden_effect = { + scope:great_swordsmith = { + add_character_modifier = { + modifier = master_smith_npc_modifier #this is a neat modifier he gets as a master smith. it's pretty powerful, giving a boost to Stewardship and gold income, but since he's an NPC, it doesn't matter much. It's mostly to create flavor if the player actually examines his stats. + } + } + } + } + + + option = { #Let us make a compromise + name = fp2_struggle.1010.a + flavor = toledo_compromise_flavor + + trigger = { #root needs to control Toledo, and it needs to have a blacksmith building. + any_held_county = { + any_county_province = { + barony = title:b_toledo + has_building_or_higher = blacksmiths_01 + } + } + scope:toledo_county = { #so that this option doesn't fire twice + NOT = { has_county_modifier = toledo_steel_county_modifier } + } + } + + ai_chance = { #Smart, patient AIs pick this option, others are more likely to go for a bolder approach. + base = 10 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 0.5 + ai_boldness = -0.5 + ai_zeal = -0.5 + } + } + + stress_impact = { #arrogant or visionless rulers dislike this option + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + content = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + remove_short_term_gold = major_gold_value #someone still has to be bribed here + + scope:toledo_county = { + add_county_modifier = { + modifier = toledo_steel_county_modifier + } + } + + scope:toledo_county = { + add_county_modifier = { + modifier = governance_1041_quarreling_guilds_modifier + years = 20 + } + } + } + + option = { #Whatever knowledge you possess, I shall draw it out. + name = fp2_struggle.1010.b + flavor = fp2_struggle.1010.swordsmith_imprisoned + + trigger = { + OR = { + has_trait = schemer + has_trait = torturer + has_trait = paranoid + dread >= high_dread + } + NAND = { + any_held_county = { + any_county_province = { + barony = title:b_toledo + has_building_or_higher = blacksmiths_01 + } + } + scope:toledo_county = { #so that this option doesn't fire twice + NOT = { has_county_modifier = toledo_steel_county_modifier } + } + } + } + + + scope:great_swordsmith = { #while the great swordsmiths gets to languish in a dungeon + hard_imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + } + + + ai_chance = { #Compassionate or just AI wouldn't do this, but hateful paranoid psychopats, sure! Perhaps the smith even deserved it... + base = 10 + ai_value_modifier = { + ai_vengefulness = 1 + ai_honor = -1 + } + } + + stress_impact = { #this is not what a Buddha would do + compassionate = major_stress_impact_gain + generous = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + add_dread = minor_dread_gain #you gain some dread for doing this, naturally + + scope:great_swordsmith = { + add_character_modifier = { + modifier = recently_tortured + years = 5 + } + } + + + add_character_modifier = { + modifier = tortured_smith_spilling_secrets_modifier + years = 25 + } + + custom_tooltip = fp2_struggle.1010.compassionate_courtiers + hidden_effect = { #Compassionate or righteous courtiers will secretly dislike this + every_courtier = { + IF = { + limit = { + OR = { + has_trait = compassionate + has_trait = just + } + } + add_opinion = { + target = root + opinion = -10 + modifier = cruelty_opinion + } + } + } + } + } + + option = { #You shall have it, if you make swords for my armies + name = fp2_struggle.1010.c + flavor = fp2_struggle.1010.smithgoesaway + + ai_chance = { #ambitious AIs pick this option + base = 10 + ai_value_modifier = { + ai_energy = 0.7 + ai_vengefulness = 0.7 + } + } + + stress_impact = { + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + greedy = minor_stress_impact_gain + just = minor_stress_impact_gain + } + + remove_treasury_or_gold = major_treasury_or_gold_value #this guy is expensive! + + add_character_modifier = { #as promised, your armies gets equipped with Toledo steel! + modifier = toledo_steel_armaments_modifier + years = 50 + } + + scope:blacksmith_county = { #the great smith usurps the blacksmiths' guild, with your blessing + add_county_modifier = { + modifier = county_corruption_uncooperative_guilds_modifier + years = 10 + } + } + + custom_tooltip = fp2_struggle.1010.paranoid_rivals #your neighbors gets really paranoid when they learn about this + hidden_effect = { + struggle:iberian_struggle = { + every_involved_ruler = { + limit = { + NOT = { is_allied_to = root } + character_is_realm_neighbor = root + } + add_opinion = { + target = root + opinion = -20 + modifier = threatened_by_buildup_opinion + } + } + } + } + } + + option = { #Make me Iberia's finest blade, and all the smithies shall be yours + name = fp2_struggle.1010.d + + flavor = fp2_struggle.1010.smithmakesweapon #the master swordsmiths stays in your court for the time being, to make the great sword he promised you. + + add_courtier = scope:great_swordsmith + + hidden_effect = { + scope:great_swordsmith = { + set_knight_status = forbid #this is to prevent him being auto-turned into a knight during his stay, as he tends to get quite high prowess. The player can still make him a knight manually if they insist on it. + } + } + + ai_chance = { #Self-absorbed AIs pick this option + base = 10 + ai_value_modifier = { + ai_greed = 0.7 + ai_boldness = 0.7 + } + } + + stress_impact = { #this is an extravagant option, not for the humble or temperate - but just people don't like it either, since it still lets the blacksmith usurp the guilds. + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + + remove_short_term_gold = major_gold_value #this guy knows what he's worth! + + scope:blacksmith_county = { #the guild gets usurped by the arrogant master smith! + add_county_modifier = { + modifier = county_corruption_uncooperative_guilds_modifier + years = 10 + } + } + + hidden_effect = { #this looks weird in the tooltip otherwise! + random_list = { #I recommend increasing the odds for the special cool sword when testing this event! + 25 = { #You have a 25% chance of getting a really cool sword here! + trigger = { is_ai = no } #this option is just for players, to create less inflation on awesume swords. + trigger_event = { + id = fp2_struggle.1011 + days = { 30 60 } + } + } + 75 = { #but you can still get a nice toledo blade! + trigger_event = { + id = fp2_struggle.1012 + days = { 30 60 } + } + } + } + } + } + + option = { #I will not anger the guilds for your vanity. + name = fp2_struggle.1010.e + + flavor = fp2_struggle.1010.swordsmith_leaves + + ai_chance = { #Lazy or worried AI pick this option + base = 10 + ai_value_modifier = { + ai_energy = -0.7 + ai_greed = 0.3 + ai_boldness = -0.5 + } + } + + stress_impact = { #this is not the option for opportunists, but a good option for some humble stress loss + ambitious = major_stress_impact_gain + diligent = medium_stress_impact_gain + content = minor_stress_impact_loss + humble = minor_stress_impact_loss + temperate = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + } + + scope:blacksmith_county = { #You curry favor with the blacksmith's guild + add_county_modifier = { + modifier = guild_rights_protected_modifier + years = 20 + } + } + + scope:great_swordsmith = { + add_opinion = { + target = root + modifier = insulted_opinion + } + } + } +} + +fp2_struggle.1011 = { # The Masterwork, by Ola Jentzsch + type = character_event + title = fp2_struggle.1011.t + desc = fp2_struggle.1011.desc + theme = realm + + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:great_swordsmith + animation = marshal + } + + artifact = { # To display the artifact in the event-window + target = scope:amazing_toledo_sword + position = lower_right_portrait + } + + trigger = { + has_fp2_dlc_trigger = yes + scope:great_swordsmith = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + + save_scope_as = owner + set_artifact_rarity_illustrious = yes + + create_artifact = { + name = awesome_toledo_sword_name + creator = scope:great_swordsmith + description = awesome_toledo_sword_desc + visuals = sword + type = sword + modifier = artifact_amazing_toledo_sword_modifier + wealth = scope:wealth # This comes from the scripted effect above + quality = scope:quality # This comes from the scripted effect above + save_scope_as = amazing_toledo_sword # Allows the sword to be accessed via scope after its creation + } + } + + option = { #Martiello, the hammer + name = fp2_struggle.1011.a + + trigger = { + root = { + culture = { has_cultural_pillar = language_iberian } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = martiello_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Tiniebra, the darkness + name = fp2_struggle.1011.b + + trigger = { + root = { + culture = { has_cultural_pillar = language_iberian } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = tiniebra_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Vermejo, the red + name = fp2_struggle.1011.c + + trigger = { + root = { + culture = { has_cultural_pillar = language_iberian } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = vermejo_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Jargonça, like the blue gemstone. + name = fp2_struggle.1011.d + + trigger = { + root = { + culture = { has_cultural_pillar = language_iberian } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = jargonca_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Suhayl, the glorious. + name = fp2_struggle.1011.e + + trigger = { + root = { + culture = { has_cultural_pillar = language_arabic } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = suhayl_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #al-Battar, the cutter + name = fp2_struggle.1011.f + + trigger = { + root = { + culture = { has_cultural_pillar = language_arabic } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = albattar_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Qazeeb, of the strong handle + name = fp2_struggle.1011.g + + trigger = { + root = { + culture = { has_cultural_pillar = language_arabic } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = qazeeb_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Zumurrud, like the blinding emerald + name = fp2_struggle.1011.h + + trigger = { + root = { + culture = { has_cultural_pillar = language_arabic } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = zumurrud_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Ortzi, like the thunder + name = fp2_struggle.1011.i + + trigger = { + root = { + culture = { has_cultural_pillar = language_basque } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = ortzi_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Gaueko, the night spirit + name = fp2_struggle.1011.j + + trigger = { + root = { + culture = { has_cultural_pillar = language_basque } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = gaueko_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Gorri, the red one + name = fp2_struggle.1011.k + + trigger = { + root = { + culture = { has_cultural_pillar = language_basque } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = gorri_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Aiztoto, the little knife + name = fp2_struggle.1011.l + + trigger = { + root = { + culture = { has_cultural_pillar = language_basque } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = aiztoto_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Escremire, the fencer + name = fp2_struggle.1011.m + + trigger = { + root = { + culture = { has_cultural_pillar = language_occitano_romance } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = escremire_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Folha, the leaf + name = fp2_struggle.1011.n + + trigger = { + root = { + culture = { has_cultural_pillar = language_occitano_romance } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = folha_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Proeza, valour + name = fp2_struggle.1011.o + + trigger = { + root = { + culture = { has_cultural_pillar = language_occitano_romance } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = proeza_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Trebalhar, the tormenter + name = fp2_struggle.1011.p + + trigger = { + root = { + culture = { has_cultural_pillar = language_occitano_romance } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = trebalhar_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Sufax, like the great hero in days of old + name = fp2_struggle.1011.q + + trigger = { + root = { + culture = { has_cultural_pillar = language_berber } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = sufax_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Toumellalt, the white one. + name = fp2_struggle.1011.r + + trigger = { + root = { + culture = { has_cultural_pillar = language_berber } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = toumellalt_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Ayugu, the yoke. + name = fp2_struggle.1011.s + + trigger = { + root = { + culture = { has_cultural_pillar = language_berber } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = ayugu_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Well, "Ironsoul" of course + name = fp2_struggle.1011.u + + trigger = { + root = { + culture = { + NOT = { + has_cultural_pillar = language_iberian + has_cultural_pillar = language_arabic + has_cultural_pillar = language_basque + has_cultural_pillar = language_occitano_romance + has_cultural_pillar = language_berber + } + } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = ironsoul_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #I quite like "Mistletoe"... + name = fp2_struggle.1011.v + + trigger = { + root = { + culture = { + NOT = { + has_cultural_pillar = language_iberian + has_cultural_pillar = language_arabic + has_cultural_pillar = language_basque + has_cultural_pillar = language_occitano_romance + has_cultural_pillar = language_berber + } + } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = mistletoe_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Moor-cleaver, what else? + name = fp2_struggle.1011.w + + trigger = { + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + root = { + culture = { + NOT = { + has_cultural_pillar = language_iberian + has_cultural_pillar = language_arabic + has_cultural_pillar = language_basque + has_cultural_pillar = language_occitano_romance + has_cultural_pillar = language_berber + } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + } + + scope:amazing_toledo_sword = { set_artifact_name = moormurder_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Usurper's blade seem fitting, giving what we did to the guilds... + name = fp2_struggle.1011.x + + trigger = { + root = { + culture = { + NOT = { + has_cultural_pillar = language_iberian + has_cultural_pillar = language_arabic + has_cultural_pillar = language_basque + has_cultural_pillar = language_occitano_romance + has_cultural_pillar = language_berber + } + } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = usurperblade_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } +} + +fp2_struggle.1012 = { # Soul of Iron (3), by Ola Jentzsch + type = character_event + title = fp2_struggle.1012.t + desc = fp2_struggle.1012.desc + theme = realm + + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:great_swordsmith + animation = marshal + } + + artifact = { # To display the artifact in the event-window + target = scope:toledo_sword + position = lower_right_portrait + } + + trigger = { + has_fp2_dlc_trigger = yes + scope:great_swordsmith = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + + save_scope_as = owner + set_artifact_rarity_masterwork = yes + + create_artifact = { + name = toledo_sword_name + creator = scope:great_swordsmith + description = toledo_sword_desc + visuals = sword + type = sword + modifier = artifact_masterwork_toledo_sword_modifier + wealth = scope:wealth # This comes from the scripted effect above + quality = scope:quality # This comes from the scripted effect above + save_scope_as = toledo_sword # Allows the sword to be accessed via scope after its creation + } + } + + option = { #It is...exquisite. You may go in peace. + name = fp2_struggle.1012.a + flavor = fp2_struggle.1012.swordsmith_leaves + + ai_chance = { #Only greedy AI wouldn't pick this option. + base = 10 + ai_value_modifier = { + ai_greed = -1 + } + } + + remove_courtier_or_guest = scope:great_swordsmith + } + + option = { #It is as promised. May I not convince you to stay and serve me? + name = fp2_struggle.1012.b + + ai_chance = { #Only greedy would pick this option. + base = 10 + ai_value_modifier = { + ai_greed = 1 + } + } + + custom_tooltip = fp2_struggle.1012_swordsmith_stays + + remove_treasury_or_gold = major_treasury_or_gold_value #this guy is expensive! + } +} + +################################### +# Death of a Councilman +# By Ola Jentzsch +################################### +scripted_trigger fp2_struggle.1020_minority_councillor_faith_trigger = { + save_temporary_scope_as = fp2_struggle_1020_temp_councillor + is_ai = yes + NOT = { is_spouse_of = root } + root.capital_county.faith = { + faith_hostility_level = { + target = scope:fp2_struggle_1020_temp_councillor.faith + value >= faith_hostile_level + } + } +} + +fp2_struggle.1020 = { + type = character_event + title = fp2_struggle.1020.t + desc = { + desc = fp2_struggle.1020_desc_opening + first_valid = { + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_beaten_by_mob + } + } + desc = fp2_struggle.1020_desc_beaten_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_burned_by_mob + } + } + desc = fp2_struggle.1020_desc_burned_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_hanged_and_disemboweled_by_mob + } + } + desc = fp2_struggle.1020_desc_hanged_and_disemboweled_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_crucified_by_mob + } + } + desc = fp2_struggle.1020_desc_crucified_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_defenestrated_by_mob + } + } + desc = fp2_struggle.1020_desc_defenestrated_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_molten_silver_by_mob + } + } + desc = fp2_struggle.1020_desc_molten_silver_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_torn_to_pieces_by_mob + } + } + desc = fp2_struggle.1020_desc_torn_to_pieces_by_mob + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:councillor_executor = { + exists = var:relative_created + } + } + desc = fp2_struggle.1020_desc_councillor_had_family + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + fp2_struggle.1020_minority_councillor_faith_trigger = yes + } + } + desc = fp2_struggle.1020_desc_councillor_had_no_family_faith + } + } + } + + theme = dread + cooldown = { years = 15 } + override_background = { reference = council_chamber } + + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:councillor_executor + animation = anger + } + + lower_left_portrait = scope:minority_councillor + + + trigger = { + has_fp2_dlc_trigger = yes + + any_councillor = { fp2_struggle.1020_minority_councillor_faith_trigger = yes } + + capital_county = { county_control < low_county_control_limit } #root's capital having low control isn't strictly necessary, but adds to the emergent feeling here + } + + immediate = { + + random_councillor = { #this is the dead councillor + limit = { fp2_struggle.1020_minority_councillor_faith_trigger = yes } + save_scope_as = minority_councillor + } + + capital_county = { save_scope_as = unrest_capital } #so we can use the capital for loc + + scope:minority_councillor = { #and this is how they met their untimely end + random_list = { + 10 = { + death = { + death_reason = death_beaten_by_mob + } + } + 10 = { + death = { + death_reason = death_burned_by_mob + } + } + 20 = { + death = { + death_reason = death_hanged_and_disemboweled_by_mob + } + } + 20 = { + death = { + death_reason = death_crucified_by_mob + } + } + 10 = { + death = { + death_reason = death_defenestrated_by_mob + } + } + 20 = { + death = { + death_reason = death_molten_silver_by_mob + } + } + 10 = { + death = { + death_reason = death_torn_to_pieces_by_mob + } + } + } + } + + if = { #now let's see if there's any relative of the late councillor that could be considered relevant! + limit = { + any_powerful_vassal = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + is_powerful_vassal = yes + } + } + random_powerful_vassal = { + limit = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + is_powerful_vassal = yes + } + save_scope_as = councillor_executor + set_variable = relative_created #this variable is for use in triggers later + } + } + + else_if = { + limit = { + any_powerful_vassal = { + is_ai = yes + is_close_family_of = scope:minority_councillor + } + } + random_powerful_vassal = { + limit = { + is_ai = yes + is_close_family_of = scope:minority_councillor + } + save_scope_as = councillor_executor + set_variable = relative_created + } + } + + else_if = { + limit = { + any_powerful_vassal = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + } + random_powerful_vassal = { + limit = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + save_scope_as = councillor_executor + set_variable = relative_created + } + } + + else_if = { + limit = { + any_neighboring_and_across_water_top_liege_realm_owner = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + OR = { + fp2_character_involved_in_struggle_trigger = yes + fp2_character_interloper_in_struggle_trigger = yes + } + } + } + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + OR = { + fp2_character_involved_in_struggle_trigger = yes + fp2_character_interloper_in_struggle_trigger = yes + } + } + save_scope_as = councillor_executor + set_variable = relative_created + } + } + + else_if = { + limit = { + any_ruler = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + } + random_ruler = { + limit = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + save_scope_as = councillor_executor + set_variable = relative_created + } + } + + else_if = { + limit = { + any_courtier = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + } + random_courtier = { + limit = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + save_scope_as = councillor_executor + set_variable = relative_created + } + } + + else = { #if no relevant relative was found, we instead create a community leader to fire option b with! + create_character = { + age = { 20 80 } + location = root.capital_province + template = merchant_template + culture = scope:minority_councillor.culture + faith = scope:minority_councillor.faith + save_scope_as = councillor_executor + } + hidden_effect = { + scope:councillor_executor = { #just because, I want more rotund people + add_character_modifier = { + modifier = obese_modifier + } + } + } + } + + scope:minority_councillor = { + every_close_or_extended_family_member = { + custom = all_family_members + if = { + limit = { is_ai = yes } + add_opinion = { + target = root + opinion = -20 + modifier = blames_for_death_of_relative_opinion + } + } + } + } + } + + + option = { #Make amends to councillor's dynasty + name = fp2_struggle.1020.a + + trigger = { + scope:councillor_executor = { + exists = var:relative_created + } + } + + ai_chance = { #rational and somewhat honorable AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + ai_honor = 0.3 + #but bold and vengeful ones do not + ai_boldness = -0.5 + ai_vengefulness = -0.5 + } + } + + stress_impact = { + #arrogant characters don't care for this + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + + #socially awkward ones aren't fond of it either + paranoid = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + add_character_modifier = { + modifier = compelling_apology_modifier + years = 10 + } + + scope:minority_councillor = { + every_close_or_extended_family_member = { + custom = all_family_members + if = { + limit = { is_ai = yes } + add_opinion = { + target = root + opinion = 10 + modifier = made_amends_opinion + } + } + } + } + } + + option = { #Pay restitution to councillor's people + name = fp2_struggle.1020.b + + trigger = { + scope:councillor_executor = { + NOT = { exists = var:relative_created } + } + } + + ai_chance = { #compassionate AIs takes this option + base = 10 + ai_value_modifier = { + ai_compassion = 0.7 + ai_honor = 0.3 + #but zealous and vengeful ones do not + ai_zeal = -0.5 + ai_vengefulness = -0.5 + } + } + + stress_impact = { + #arrogant characters don't wanna do this + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + + #nor those who hate the people + paranoid = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + remove_treasury_or_gold = medium_treasury_or_gold_value #restitution isn't free! + + add_character_modifier = { + modifier = restitution_to_minorities_modifier + years = 15 + } + } + + option = { #Hunt down the perpetrators + name = fp2_struggle.1020.c + + ai_chance = { #energetic and vengeful AI picks this option. + base = 10 + ai_value_modifier = { + ai_energy = 0.5 + ai_vengefulness = 0.7 + #but compassionate ones might not + ai_compassion = -0.7 + } + } + + stress_impact = { #this is cruel and a lot of effort... + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + + add_character_modifier = { + modifier = memorable_public_execution_modifier + years = 10 + } + + + add_prestige = minor_prestige_gain + + if = { + limit = { exists = var:relative_created } + scope:councillor_executor = { + add_opinion = { + target = root + opinion = 20 + modifier = avenged_relative_opinion + + } + } + } + } + + option = { #Restore order in the capital + name = fp2_struggle.1020.d + + ai_chance = { #rational and compassionate AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.9 + ai_compassion = 0.3 + #but bold and zealous ones do not + ai_boldness = -0.5 + ai_zeal = -0.5 + } + } + + stress_impact = { + #cruel or lazy characters don't bother with this + callous = minor_stress_impact_gain + lazy = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + + #and vengeful ones would rather pursue revenge. + vengeful = minor_stress_impact_gain + } + + if = { + limit = { exists = var:relative_created } + scope:councillor_executor = { + add_opinion = { + target = root + opinion = -10 + modifier = ignored_demands_opinion + } + } + } + + add_prestige = minor_prestige_gain + + root.capital_county = { change_county_control = medium_county_control_gain } + } +} + +################################### +# The Vision +# By Ola Jentzsch +################################### +fp2_struggle.1050 = { + type = character_event + title = fp2_struggle.1050.t + desc = { + first_valid = { + desc = fp2_struggle.1050.desc_opening + } + first_valid = { + triggered_desc = { + trigger = { + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + scope:visionary_spouse= { + has_OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + } + desc = fp2_struggle.1050.desc_christian + } + triggered_desc = { + trigger = { + has_religion = religion:islam_religion + scope:visionary_spouse= { + has_religion = religion:islam_religion + } + } + desc = fp2_struggle.1050.desc_islamic + } + triggered_desc = { + trigger = { + has_religion = religion:germanic_religion + scope:visionary_spouse= { + has_religion = religion:germanic_religion + } + } + desc = fp2_struggle.1050.desc_rampaging_barbarian_heathen + } + desc = fp2_struggle.1050.desc_non_barbarian_heathen + } + first_valid = { + triggered_desc = { + trigger = { + root = { + OR = { + culture = culture:andalusian + culture = culture:bedouin + } + } + scope:visionary_spouse = { + OR = { + culture = culture:andalusian + culture = culture:bedouin + } + } + } + desc = fp2_struggle.1050.desc_islamic_heritage + } + triggered_desc = { + trigger = { + has_faith = faith:catholic + scope:visionary_spouse= { + has_faith = faith:catholic + } + } + desc = fp2_struggle.1050.desc_christian_bling_reference_drop + } + desc = fp2_struggle.1050.desc_middle_neutral_version + } + first_valid = { + triggered_desc = { + trigger = { + scope:visionary_spouse = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + } + } + } + desc = fp2_struggle.1050.desc_love_and_warmth_ending + } + desc = fp2_struggle.1050.desc_no_love_and_warmth_ending + } + } + + theme = death + override_background = { reference = battlefield } ## + + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:visionary_spouse + animation = paranoia + } + + + trigger = { + has_fp2_dlc_trigger = yes + + is_landed_or_landless_administrative = yes + + any_spouse = { is_courtier = yes } + + fp2_character_involved_in_struggle_trigger = yes + + struggle:iberian_struggle = { is_struggle_phase = struggle_iberia_phase_hostility } + } + + cooldown = { #this event shouldn't fire too often, since the context with the spouse's dream is pretty specific. + years = 100 + } + + + immediate = { + + random_spouse = { + weight = { + base = 1 + modifier = { + factor = 5 + this = primary_spouse + } + } + save_scope_as = visionary_spouse + } + + scope:visionary_spouse = { + add_character_modifier = { + modifier = foreboding_visions_modifier + years = 10 + } + } + + hidden_effect = { + scope:visionary_spouse = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = no } + } + } + } + + option = { + name = fp2_struggle.1050.a + + trigger = { + faith = { + OR = { + has_doctrine_parameter = witchcraft_illegal + has_doctrine_parameter = witchcraft_shunned + } + } + } + + ai_chance = { #bold, vengeful and zealous AI goes for this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 0.7 + ai_zeal = 0.7 + ai_compassion = -1 #whereas compassionate, rational and honorable ones really, really doesn't + ai_rationality = -1 + ai_honor = -0.5 + } + } + + stress_impact = { + compassionate = major_stress_impact_gain #compassionate people don't accuse their spouse of being a witch + craven = minor_stress_impact_gain #cravens don't dare throw her in jail + trusting = medium_stress_impact_gain #and trusting people don't accuse her either + eccentric = minor_stress_impact_loss + } + + custom_tooltip = fp2_struggle.1050.spouse_imprisoned #you throw your spouse into the dungeon for being a suspected witch + hidden_effect = { + scope:visionary_spouse = { + hard_imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + } + } + } + + option = { + name = fp2_struggle.1050.b + + ai_chance = { #lazy zealous AI pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 0.8 + ai_energy = -0.7 + ai_vengefulness = -0.7 + } + } + + stress_impact = { + cynical = minor_stress_impact_gain #cynics don't really put their faith in God + } + + duel = { #this duel is root trying to make their spouse feel better. + skill = diplomacy + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + modifier = { + add = 15 + has_trait = compassionate + } + modifier = { + add = 20 + has_trait = zealous + } + send_interface_toast = { + title = comforting_spouse_visionary_toast.success + left_icon = root + right_icon = scope:visionary_spouse + + scope:visionary_spouse = { + add_opinion = { + target = root + modifier = comforted_opinion + } + } + custom_tooltip = fp2_struggle.1050.condition_might_improve + hidden_effect = { + scope:visionary_spouse = { + recover_from_disease_effect = { DISEASE = ill } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + modifier = { + add = 20 + has_trait = callous + } + modifier = { + add = 10 + has_trait = sadistic + } + send_interface_toast = { + title = comforting_spouse_visionary.failure + left_icon = root + right_icon = scope:visionary_spouse + + scope:visionary_spouse = { + add_opinion = { + target = root + modifier = failed_comfort_opinion + } + } + + custom_tooltip = fp2_struggle.1050.condition_might_get_worse + hidden_effect = { + scope:visionary_spouse = { + add_character_modifier = { + modifier = mysterious_prophetess_illness_modifier + years = 5 + } + } + } + } + } + } + } + + option = { #Come, tell me more of your visions + name = fp2_struggle.1050.c + + ai_chance = { #compassionate AIs pick this option + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_energy = 0.5 + ai_vengefulness = -0.5 + } + } + + stress_impact = { #unpleasant types don't pick this option... + arrogant = minor_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + eccentric = minor_stress_impact_loss + } + + scope:visionary_spouse = { + if = { + limit = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + } + } + add_opinion = { + target = root + modifier = listened_opinion + } + } + else = { + progress_towards_lover_effect = { + CHARACTER = root + REASON = lover_comforted_nightmare + OPINION = 0 + } + } + } + + custom_tooltip = fp2_struggle.1050.condition_might_improve + hidden_effect = { + scope:visionary_spouse = { + recover_from_disease_effect = { DISEASE = ill } + } + } + + add_character_modifier = { + modifier = frightened_by_portent_modifier + years = 10 + } + } + + option = { #Leave me be, I am planning my next conquest + name = fp2_struggle.1050.d + + ai_chance = { #Ambitious AIs pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.7 + ai_greed = 0.5 + ai_compassion = -0.7 + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + + scope:visionary_spouse = { + add_opinion = { + target = root + modifier = failed_comfort_opinion + } + } + + custom_tooltip = fp2_struggle.1050.condition_might_get_very_worse + hidden_effect = { + random = { + chance = 90 + scope:visionary_spouse = { + add_character_modifier = { + modifier = mysterious_prophetess_illness_modifier + years = 5 + } + add_trait = depressed_1 + } + } + } + } +} + +################################### +# Disorderly Market +# By Hugo Cortell +################################### VSCODE: Use control + / to comment/uncomment entire blocks of code. And control + shift + [ (or ]) to fold/unfold a block! +scripted_trigger fp2_struggle_2000_check_holds_city_scripted_trigger = { + title_province = { has_holding_type = city_holding } + exists = holder + holder != root +} + +fp2_struggle.2000 = { + type = character_event + title = fp2_struggle.2000.t + desc = fp2_struggle.2000.desc + theme = stewardship + cooldown = { years = 5 } + override_background = { reference = market } + left_portrait = root + right_portrait = { + character = scope:fp2_2000_market_inspector + animation = anger + } + + trigger = { + has_fp2_dlc_trigger = yes + has_religion = religion:islam_religion + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + has_doctrine = tenet_religious_legal_pronouncements + has_doctrine = tenet_legalism + } + } + + exists = cp:councillor_steward + cp:councillor_steward = { is_available_ai_adult = yes } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_ai_adult = yes } + + any_sub_realm_barony = { + fp2_struggle_2000_check_holds_city_scripted_trigger = yes + } + + any_pool_character = { + province = root.capital_province + has_no_particular_noble_roots_trigger = yes + is_available_healthy_ai_adult = yes + } + } + + immediate = { + random_sub_realm_barony = { + limit = { fp2_struggle_2000_check_holds_city_scripted_trigger = yes } + county = { save_scope_as = se_2000_county } + } + + cp:councillor_steward = { save_scope_as = 2000_scoped_steward } + cp:councillor_court_chaplain = { save_scope_as = 2000_scoped_chaplain } + + create_character = { + age = { 20 50 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + trait = just + trait = craven + trait = patient + trait = temperate + culture = root.culture + faith = root.faith + + dynasty = none + after_creation = { + add_gold = { minor_gold_value medium_gold_value } + add_prestige = { minor_prestige_gain medium_prestige_gain } + add_piety = { medium_piety_gain major_piety_gain } + } + + save_scope_as = fp2_2000_market_inspector + } + if = { # RoCo + limit = { + has_dlc_feature = royal_court + employs_court_position = chief_qadi_court_position + any_court_position_holder = { + type = chief_qadi_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = chief_qadi_court_position + limit = { + is_available_ai_adult = yes + } + save_scope_as = fp2_2000_chief_qadi + } + } + } + + option = { # Mandatory lunatic option (now rakish) + name = fp2_struggle.2000.f + trigger = { has_trait = rakish } + stress_impact = { + chaste = major_stress_impact_gain + zealous = major_stress_impact_gain + } + + flavor = fp2_struggle.2000.f.desc + send_interface_toast = { + type = event_stewardship_good_with_text + title = fp2_struggle.2000.f.notif + desc = fp2_struggle.2000.f.notif.desc + + stress_impact = { chaste = medium_stress_impact_gain } + + scope:2000_scoped_chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -25 + } + } + + add_piety = major_piety_loss + + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_free_market_boom_modifier + years = 5 + } + } + add_character_modifier = { + modifier = fp2_lenient_towards_foreign_merchants_modifier + years = 5 + } + } + + ai_chance = { + base = 15 + } + } + + option = { # Guards! Purge! + name = fp2_struggle.2000.e + + trigger = { + OR = { + has_trait = reaver + has_trait = order_member + has_trait = aggressive_attacker + } + } + stress_impact = { + just = major_stress_impact_gain + forgiving = major_stress_impact_gain + calm = minor_stress_impact_gain + trusting = medium_stress_impact_gain + } + + if = { + limit = { has_trait = sadistic } # Small detail + send_interface_toast = { + type = event_toast_effect_good + title = fp2_ruthless_market_oversight_modifier + left_icon = root + + add_dread = medium_dread_gain + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_ruthless_market_oversight_modifier + years = 5 + } + } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_ruthless_market_oversight_modifier + left_icon = root + + add_dread = medium_dread_gain + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_ruthless_market_oversight_modifier + years = 5 + } + } + } + } + + ai_chance = { + base = 5 + modifier = { + add = 15 + OR = { + has_trait = sadistic + has_trait = zealous + has_trait = wrathful + } + } + modifier = { + add = -40 + has_trait = compassionate + } + } + } + + option = { # Intervene with threat of calling judge + name = fp2_struggle.2000.a + flavor = fp2_struggle.2000.a.desc + + duel = { + skill = diplomacy + value = medium_skill_rating + + 30 = { + desc = fp2_struggle.2000.a.a + + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + modifier = { + add = 5 + has_trait = fickle + } + modifier = { + add = 20 + has_trait = craven + } + modifier = { + add = 3 + has_trait = lazy + } + modifier = { + add = 3 + has_trait = arbitrary + } + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2000.a.a.notif + + if = { # RoCo + limit = { + exists = scope:fp2_2000_chief_qadi + } + reverse_add_opinion = { + target = scope:fp2_2000_chief_qadi + modifier = respect_opinion + opinion = 15 + } + } + + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_inefficient_market_oversight_modifier + years = 5 + } + } + } + } + 70 = { + desc = fp2_struggle.2000.a.b + + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + + modifier = { + add = 5 + has_trait = humble + } + modifier = { + add = 5 + has_trait = ambitious + } + modifier = { + add = 10 + has_trait = gregarious + } + modifier = { + add = 15 + has_trait = just + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2000.a.b.notif + left_icon = scope:2000_scoped_steward + + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_smooth_market_oversight_modifier + years = 5 + } + } + } + } + } + + ai_chance = { + base = 60 + modifier = { + add = 25 + has_trait = just + } + modifier = { + add = -25 + has_trait = arbitrary + } + modifier = { + add = -15 + has_trait = lazy + } + modifier = { + add = -5 + has_trait = arrogant + } + } + } + + option = { # Let the free market decide, free from tradition + name = fp2_struggle.2000.d + flavor = fp2_struggle.2000.d.desc + + stress_impact = { + zealous = major_stress_impact_gain + humble = medium_stress_impact_gain + content = medium_stress_impact_gain + just = minor_stress_impact_gain + temperate = medium_stress_impact_gain + } + + reverse_add_opinion = { + target = scope:2000_scoped_chaplain + modifier = impious_opinion + opinion = -30 + } + reverse_add_opinion = { + target = scope:2000_scoped_steward + modifier = respect_opinion + opinion = 15 + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_free_market_boom_modifier + left_icon = scope:2000_scoped_steward + + add_piety = medium_piety_loss + + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_free_market_boom_modifier + years = 6 + } + } + } + + ai_chance = { + base = 0 + modifier = { + add = 15 + has_trait = greedy + } + modifier = { + add = -40 + has_trait = zealous + } + } + } + + option = { # Reprimand the inspector + name = fp2_struggle.2000.b + flavor = fp2_struggle.2000.b.desc + + stress_impact = { compassionate = medium_stress_impact_gain } + add_dread = miniscule_dread_gain + + send_interface_toast = { + type = event_stewardship_good_with_text + title = fp2_struggle.2000.b.notif + desc = fp2_struggle.2000.b.notif.desc + + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_smooth_market_oversight_modifier + years = 5 + } + } + + scope:2000_scoped_chaplain = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -15 + } + } + } + + ai_chance = { + base = 34 + modifier = { + add = 15 + OR = { + has_trait = sadistic + has_trait = callous + } + } + modifier = { + add = 5 + has_trait = impatient + } + modifier = { + add = 3 + has_trait = diligent + } + modifier = { + add = -25 + has_trait = compassionate + } + modifier = { + add = -15 + OR = { + has_trait = trusting + has_trait = calm + has_trait = forgiving + } + } + modifier = { + add = -5 + has_trait = humble + } + } + } + + after = { scope:fp2_2000_market_inspector = { silent_disappearance_effect = yes } } +} + +################################### +# Desperate Villagers Seek New Lord +# By Hugo Cortell +################################### +scripted_trigger fp2_struggle_2001_desperate_county_scripted_trigger = { + NOT = { root = { has_claim_on = prev } } + trigger_if = { # Checking that we are not offering up the capital of a duke or higher + limit = { + holder = { + highest_held_title_tier >= tier_duchy + } + } + this != holder.capital_county + } + + holder = { # Balance, malus must not affect players + is_ai = yes + top_liege = { is_ai = yes } + } + + OR = { + county_opinion < 0 + county_control < 81 # Note: if considered too restrictive for normal play, update to != 100 + } + + squared_distance = { + target = root.capital_province + value < squared_distance_medium + } +} + +fp2_struggle.2001 = { + type = character_event + title = fp2_struggle.2001.t + desc = { + desc = fp2_struggle.2001.desc + triggered_desc = { + trigger = { + is_allied_to = scope:fp2_2001_desperate_county.holder + } + desc = fp2_struggle.2001.desc.extra.a + } + triggered_desc = { + trigger = { + has_truce = scope:fp2_2001_desperate_county.holder + } + desc = fp2_struggle.2001.desc.extra.b + } + } + + theme = vassal + cooldown = { years = 20 } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fp2_2001_desperate_elder + animation = beg + } + lower_right_portrait = scope:fp2_2001_desperate_county.holder.top_liege + + trigger = { + has_fp2_dlc_trigger = yes + struggle:iberian_struggle = { + is_struggle_phase = struggle_iberia_phase_hostility + + } + + any_neighboring_and_across_water_top_liege_realm_owner = { + fp2_character_involved_in_struggle_trigger = yes + any_sub_realm_county = { + fp2_struggle_2001_desperate_county_scripted_trigger = yes + } + } + } + + immediate = { + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = 2001_scoped_chaplain } + } + + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + fp2_character_involved_in_struggle_trigger = yes + any_sub_realm_county = { fp2_struggle_2001_desperate_county_scripted_trigger = yes } + } + random_sub_realm_county = { + limit = { fp2_struggle_2001_desperate_county_scripted_trigger = yes } + save_scope_as = fp2_2001_desperate_county + } + } + + create_character = { + age = { 38 71 } + location = scope:fp2_2001_desperate_county.title_province + gender_female_chance = root_faith_dominant_gender_female_chance + trait = peasant_leader + random_traits = yes + culture = scope:fp2_2001_desperate_county.culture + random_faith = { + root.faith = { trigger = { always = yes } } + scope:fp2_2001_desperate_county.faith = { trigger = { always = yes } } + } + dynasty = none + after_creation = { add_gold = medium_gold_value } + + save_scope_as = fp2_2001_desperate_elder + } + + # AI war-savviness calc variables + scope:fp2_2001_desperate_county.holder.top_liege = { save_temporary_scope_as = target_military } + set_variable = { + name = ai_strength_multiplier # This is how much stronger root has to be (could even be used for custom loc! but the script is complex enough as it is) + value = 1.25 + } + if = { # Calculate if AI can win war, decision of war requires traits AND for it to be favourable. This calcs if it is favourable + limit = { + is_ai = yes # Are you AI? + scope:fp2_2001_desperate_county.holder.top_liege = { + NOT = { + is_at_war_with = root + is_ai = no # Enemy must be AI (prevents AI from attacking player characters, otherwise it would feel as if the attack was random) + } + } + + # Actual strength is calc below, thanks to joe + root_military_strength_higher_than_military_target_value > target_military_strength_root_value + } + save_scope_as = fp2_se_2001_ai_war_winnable # Acts as boolean for wether or not the AI has a chance at winning + } + remove_variable = ai_strength_multiplier + + # Option exclusivity stuffs, easier to keep track of logic + if = { # Faith + limit = { + OR = { + has_trait = holy_warrior + has_trait = devoted + has_trait = heresiarch + has_trait = order_member + has_trait = crusader_king + has_trait = faith_warrior + } + NOT = { + faith = scope:fp2_2001_desperate_elder.faith + has_trait = excommunicated + } + } + save_scope_as = fp2_2001_exclusive_option_faith + } + else_if = { # Greedy + limit = { + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = logistician + } + } + save_scope_as = fp2_2001_exclusive_option_greed + } + } + + option = { # Pay tribute to me + name = fp2_struggle.2001.d + custom_tooltip = fp2_struggle.2001.a.desc + + trigger = { + exists = scope:fp2_2001_exclusive_option_greed + NOT = { exists = scope:fp2_2001_exclusive_option_faith } + + OR = { # Tricks autoformatter into showing trait icons (wasteful) + has_trait = greedy + has_trait = avaricious + has_trait = logistician + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + save_scope_value_as = { + name = fp2_se_2001_eventchoiceramifications + value = flag:demand_tribute + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2001.a.notif + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + add_unpressed_claim = scope:fp2_2001_desperate_county + } + + send_interface_toast = { + type = event_stewardship_good_with_text + title = fp2_struggle.2001.d.notif + desc = fp2_struggle.2001.d.notif.desc + left_icon = scope:fp2_2001_desperate_elder + + scope:fp2_2001_desperate_elder = { + pay_treasury_or_gold = { + target = root + value = medium_treasury_or_gold_value + } + } + } + + if = { + limit = { exists = cp:councillor_steward } + cp:councillor_steward = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + } + + hidden_effect = { + trigger_event = { + id = fp2_struggle.2002 + years = 5 + } + } + add_character_modifier = { + modifier = fp2_2001_promise_reminder + years = 5 + } + + ai_chance = { + base = 0 + modifier = { + add = 10 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = brave + } + modifier = { + add = 5 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = compassionate + } + modifier = { + add = 40 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = greedy + } + } + } + + option = { # Are you willing to give up your god for it? + trigger = { + exists = scope:fp2_2001_exclusive_option_faith + + OR = { + has_trait = holy_warrior # Tricking the autoformatter into showing relevant trait + has_trait = devoted + has_trait = heresiarch + has_trait = order_member + has_trait = crusader_king + has_trait = faith_warrior + } + } + name = fp2_struggle.2001.b + + custom_tooltip = fp2_struggle.2001.a.desc + if = { + limit = { exists = scope:2001_scoped_chaplain } + custom_tooltip = fp2_struggle.2001.a.a.desc + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2001.a.notif + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + add_unpressed_claim = scope:fp2_2001_desperate_county + } + + send_interface_toast = { + type = event_stewardship_good_with_text + title = fp2_struggle.2001.b.notif + desc = fp2_struggle.2001.b.notif.desc + left_icon = scope:fp2_2001_desperate_elder + + if = { + limit = { exists = scope:2001_scoped_chaplain } + scope:2001_scoped_chaplain = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 40 + } + } + save_scope_value_as = { + name = fp2_se_2001_eventchoiceramifications + value = flag:demand_conversion_chap # yes + } + } + else = { + save_scope_value_as = { + name = fp2_se_2001_eventchoiceramifications + value = flag:demand_conversion_no_chap # no + } + } + } + + every_powerful_vassal = { + limit = { faith = root.faith } + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + + scope:fp2_2001_desperate_county = { set_county_faith = root.faith } + + hidden_effect = { + scope:fp2_2001_desperate_elder = { set_character_faith_with_conversion = root.faith } + trigger_event = { + id = fp2_struggle.2002 + years = 5 + } + } + add_character_modifier = { + modifier = fp2_2001_promise_reminder + years = 5 + } + + ai_chance = { + base = 0 + modifier = { + add = 15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = brave + } + modifier = { + add = 5 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = just + } + modifier = { + add = 50 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = zealous + } + modifier = { + add = -5 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = lazy + } + } + } + + option = { # You have my word + name = fp2_struggle.2001.a + custom_tooltip = fp2_struggle.2001.b.desc # Three extra years for not attaching any strings + + stress_impact = { + craven = minor_stress_impact_gain + shy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + arrogant = major_stress_impact_gain + } + if = { + limit = { + exists = scope:fp2_2001_exclusive_option_greed + NOT = { exists = scope:fp2_2001_exclusive_option_faith } + } + stress_impact = { + greedy = medium_stress_impact_gain + avaricious = minor_stress_impact_gain + } + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2001.a.notif + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + add_unpressed_claim = scope:fp2_2001_desperate_county + } + + every_powerful_vassal = { + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + + hidden_effect = { + trigger_event = { + id = fp2_struggle.2002 + years = 10 + } + } + add_character_modifier = { + modifier = fp2_2001_promise_reminder + years = 10 + } + + ai_chance = { + base = 0 + modifier = { + add = 25 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = brave + } + modifier = { + add = 15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = just + } + modifier = { + add = 15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = compassionate + } + modifier = { + add = -35 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = arrogant + } + modifier = { + add = -15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = lazy + } + } + } + + option = { # Prove it to me, point your spears at your liege (rise up) + name = fp2_struggle.2001.c + custom_tooltip = fp2_struggle.2001.a.desc + + trigger = { + scope:fp2_2001_desperate_county = { + can_title_create_faction = { + type = peasant_faction + target = scope:fp2_2001_desperate_county.holder + } + } + + NOT = { + exists = scope:fp2_2001_exclusive_option_greed + exists = scope:fp2_2001_exclusive_option_faith + } + } + + stress_impact = { + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + } + + save_scope_value_as = { + name = fp2_se_2001_eventchoiceramifications + value = flag:peasant_revolt + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2001.a.notif + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + add_unpressed_claim = scope:fp2_2001_desperate_county + } + + every_powerful_vassal = { + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + + scope:fp2_2001_desperate_county = { # Create faction + title_create_faction = { + type = peasant_faction + target = scope:fp2_2001_desperate_county.holder + } + holder = { + every_targeting_faction = { # go through all existing factions + if = { + limit = { + any_faction_county_member = { this = scope:fp2_2001_desperate_county } # check if least one member belongs to the county + } + save_scope_as = fp2_se_2001_peasant_faction + } + } + } + } + + hidden_effect = { + trigger_event = { + id = fp2_struggle.2002 + years = 5 + } + } + add_character_modifier = { + modifier = fp2_2001_promise_reminder + years = 5 + } + + ai_chance = { + base = 0 + modifier = { + add = 15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = brave + } + modifier = { + add = 25 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = ambitious + } + modifier = { + add = 10 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = just + } + modifier = { + add = -15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = arrogant + } + modifier = { + add = -5 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = lazy + } + } + } + + option = { # Betray and inform ruler of treachery + name = fp2_struggle.2001.f + + stress_impact = { + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + + scope:fp2_2001_desperate_elder = { + death = { + death_reason = death_execution + killer = root + } + } + + if = { + limit = { is_allied_to = scope:fp2_2001_desperate_county.holder } # You stood by your allies + every_powerful_vassal = { + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + + if = { + limit = { NOT = { has_trait = arrogant } } + scope:fp2_2001_desperate_county.holder = { + progress_towards_friend_effect = { + REASON = friend_informed_ally_of_betrayal + CHARACTER = root + OPINION = 0 + } + + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 25 + } + } + } + } + else = { + every_powerful_vassal = { # Your vassals question your integrity + custom = fp2_every_major_vassal_notifier + limit = { + NOR = { + has_trait = arbitrary + has_trait = sadistic + has_trait = arrogant + } + } + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -10 + } + } + + scope:fp2_2001_desperate_county.holder = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 40 + } + progress_towards_friend_effect = { + REASON = friend_informed_ally_of_betrayal + CHARACTER = root + OPINION = 0 + } + } + } + + ai_chance = { + base = 0 + modifier = { + add = 5 + has_trait = deceitful + is_allied_to = scope:fp2_2001_desperate_county.holder + } + + modifier = { + add = -25 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = brave + } + modifier = { + add = -15 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = just + } + modifier = { + add = -25 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = compassionate + } + modifier = { + add = 35 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = arrogant + } + modifier = { + add = 10 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = sadistic + } + modifier = { + add = 15 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = deceitful + } + } + } + + option = { # Dismiss + name = fp2_struggle.2001.e + custom_tooltip = fp2_struggle.2001.e.desc + stress_impact = { compassionate = minor_stress_impact_gain } + + scope:fp2_2001_desperate_county.holder.top_liege.capital_province.county = { + if = { + limit = { root = { is_allied_to = scope:fp2_2001_desperate_county.holder } } + hidden_effect = { # Hides effect if allied + add_county_modifier = { + modifier = fp2_forsaken_turned_levies_modifier + years = 6 + } + } + } + else = { + add_county_modifier = { + modifier = fp2_forsaken_turned_levies_modifier + years = 5 + } + } + } + + save_scope_as = did_not_call_next_event + + ai_chance = { + base = 100 + modifier = { + add = 25 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = craven + } + modifier = { + add = -45 + exists = scope:fp2_se_2001_ai_war_winnable + } + } + } + + after = { + if = { + limit = { exists = scope:fp2_se_2001_peasant_faction } + scope:fp2_2001_desperate_elder = { save_scope_as = peasant_leader } + scope:fp2_2001_desperate_county = { save_scope_as = peasant_county } + scope:fp2_se_2001_peasant_faction = { + + setup_peasant_leader_effect = yes + + faction_start_war = {} + faction_spawn_member_county_armies_effect = { + FACTION = scope:fp2_se_2001_peasant_faction + ARMY_OWNER = scope:fp2_2001_desperate_elder + PEASANT_ARMY_NAME = peasant_faction_event_troops + } + } + } + + if = { + limit = { + exists = scope:did_not_call_next_event + scope:fp2_2001_desperate_elder = { is_alive = yes } + } + scope:fp2_2001_desperate_elder = { + silent_disappearance_effect = yes + } + } + } +} + +# QUEST FUNCTION, check if player managed to complete objective +fp2_struggle.2002 = { + hidden = yes + + immediate = { # VICTORY STATE BELOW + if = { + limit = { scope:fp2_2001_desperate_county.holder.top_liege = root.top_liege } # check if lands belong to your state/kingdom/side + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2002.t.a + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + + if = { + limit = { exists = scope:fp2_se_2001_eventchoiceramifications } + if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:demand_conversion_chap } # You keet your promise to god + add_piety = major_piety_gain + } + else_if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:demand_conversion_no_chap } # Without a chap, this is more impressive but less pious + add_piety = medium_piety_gain + add_prestige = medium_prestige_gain + } + else_if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:peasant_revolt } # You lead peasants into battle and won + add_prestige = minor_prestige_gain + } + else = { + debug_log = "Scope fp2_se_2001_eventchoiceramifications exists but has not been assigned a valid value!" + debug_log_scopes = yes + } + } + + scope:fp2_2001_desperate_county = { + add_county_modifier = { + modifier = county_listened_to_locals_modifier + years = 12 + } + change_county_control = major_county_control_gain + } + } + } + else = { # FAILURE STATE BELOW + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2002.t.b + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + add_prestige = minor_prestige_loss + + if = { + limit = { exists = scope:fp2_se_2001_eventchoiceramifications } + if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:demand_conversion_chap } # You failed to keep your promise to god + add_piety = medium_piety_loss + scope:2001_scoped_chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -40 + } + } + } + else_if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:demand_conversion_no_chap } # Without a chap, this is more impressive but less pious + add_piety = minor_piety_loss + add_prestige = minor_prestige_loss + } + else_if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:demand_tribute } # Being a weasel makes you look petty + add_prestige = medium_prestige_loss + } + else_if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:peasant_revolt } # You took their lives in exchange for freedom, yet returned nothing + add_piety = minor_piety_loss + add_prestige = major_prestige_loss + show_as_tooltip = { + scope:fp2_2001_desperate_county = { # This will happen anyways, but showing it creates more impact + holder = { + top_liege.capital_province.county = { + add_county_modifier = { + modifier = fp2_forsaken_turned_levies_modifier + years = 8 + } + } + } + } + } + } + else = { + debug_log = "Scope fp2_se_2001_eventchoiceramifications exists but has not been assigned a valid value!" + debug_log_scopes = yes + } + } + + every_powerful_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + + hidden_effect = { + scope:fp2_2001_desperate_county = { + change_county_control = medium_county_control_gain + holder = { + top_liege.capital_province.county = { + add_county_modifier = { + modifier = fp2_forsaken_turned_levies_modifier + years = 8 + } + } + } + } + } + } + } + + scope:fp2_2001_desperate_elder = { + silent_disappearance_effect = yes + } + } +} + +################################### +# Lost Migratory Birds +# By Hugo Cortell +################################### +scripted_trigger fp2_struggle_2003_check_has_city_scripted_trigger = { + title_province = { has_holding_type = city_holding } + exists = holder +} + +fp2_struggle.2003 = { + type = character_event + title = fp2_struggle.2003.t + desc = fp2_struggle.2003.desc + theme = stewardship + override_background = { reference = army_camp } + cooldown = { years = 50 } + left_portrait = root + right_portrait = { + character = scope:fp2_2003_merc_actor + animation = loss_1 # Note: two_handed_1_aggressive could also be used + } + + trigger = { + has_fp2_dlc_trigger = yes + struggle:iberian_struggle ?= { + OR = { + is_struggle_phase = struggle_iberia_phase_opportunity + is_struggle_phase = struggle_iberia_phase_hostility + } + } + + any_sub_realm_barony = { fp2_struggle_2003_check_has_city_scripted_trigger = yes } + } + + immediate = { + random_sub_realm_barony = { + limit = { fp2_struggle_2003_check_has_city_scripted_trigger = yes } + county = { save_scope_as = fp2_2003_county_town } + } + + create_character = { + age = { 20 50 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + trait = wrathful + trait = greedy + trait = impatient + trait = callous + trait = wounded_2 + culture = root.culture + faith = root.faith + + dynasty = none + after_creation = { + add_gold = { 0 minor_gold_value } + add_prestige = { minor_prestige_loss minor_prestige_gain } + add_piety = { medium_piety_loss minor_piety_gain } + add_character_flag = single_combat_duel_armor + } + + save_scope_as = fp2_2003_merc_actor + } + } + + option = { # Give them farming work + name = fp2_struggle.2003.d + flavor = fp2_struggle.2003.d.desc + + trigger = { + OR= { + has_trait = lunatic_genetic + has_trait = logistician + has_trait = comfort_eater + has_trait = improvident + stewardship > extremely_high_skill_rating + } + gold > medium_gold_value # Locals need to be paid in advance + } + stress_impact = { greedy = major_stress_impact_gain } + + send_interface_toast = { + title = fp2_struggle.2003.e.notif.c + desc = fp2_struggle.2003.e.notif.c.desc + + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = fp2_mercs_turned_farmers_modifier + years = 20 + } + holder = { + add_character_modifier = { + modifier = fp2_mercenary_acquaintances_modifier + years = 8 # Bonus effect + } + } + } + } + + ai_chance = { + base = 30 + modifier = { + add = 1000 + has_trait = possessed_genetic + } + } + } + + option = { # Offer them a stable job + name = fp2_struggle.2003.b + flavor = fp2_struggle.2003.b.desc + + trigger = { # Locks the lunatic option (remove this trigger if you want more than 4 options) + OR = { + NOR= { + has_trait = lunatic_genetic + has_trait = logistician + has_trait = comfort_eater + has_trait = improvident + stewardship > extremely_high_skill_rating + } + gold < medium_gold_value # Peasants might need to be paid real gold, but mercs do not mind working on debt money + } + } + + stress_impact = { greedy = minor_stress_impact_gain } + + remove_treasury_or_gold = medium_treasury_or_gold_value + send_interface_toast = { + type = event_toast_effect_good + title = fp2_veteran_mercenaries_as_instructors_modifier + left_icon = root + + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = fp2_veteran_mercenaries_as_instructors_modifier + years = 12 + } + hidden_effect = { + holder = { + add_character_modifier = { + modifier = fp2_mercenary_acquaintances_modifier + years = 12 + } + } + } + } + } + + show_as_tooltip = { + scope:fp2_2003_county_town = { + holder = { + add_character_modifier = { + modifier = fp2_mercenary_acquaintances_modifier + years = 12 + } + } + } + } + + ai_chance = { + base = 25 + modifier = { + add = 5 + has_trait = ambitious + } + modifier = { + add = 5 + has_trait = generous + } + modifier = { + add = -50 + has_trait = greedy + } + } + } + + option = { # Implore them to leave + name = fp2_struggle.2003.a + stress_impact = { shy = minor_stress_impact_gain } + + trigger = { + NOT = { has_trait = lunatic_genetic } # Cuts down the options to four in case of lunacy event, lunatics do not negotiate. + } + + duel = { + skill = diplomacy + value = high_skill_rating + + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + } + modifier = { + add = 5 + has_trait = fickle + } + modifier = { + add = 20 + has_trait = craven + } + modifier = { + add = 15 + has_trait = lazy + } + modifier = { + add = 10 + has_trait = wrathful + } + modifier = { + add = 10 + has_trait = shy + } + modifier = { + add = 2 + has_trait = trusting + } + modifier = { + add = 3 + has_trait = stubborn + } + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2003.a.a.notif + left_icon = root + + add_prestige = medium_prestige_loss + + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = recently_looted_modifier + years = 5 + } + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + + modifier = { + add = 5 + has_trait = calm + } + modifier = { + add = 5 + has_trait = vengeful + } + modifier = { + add = 5 + has_trait = honest + } + modifier = { + add = 10 + has_trait = gregarious + } + modifier = { + add = 15 + has_trait = just + } + modifier = { + add = 15 + has_trait = brave + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2003.a.b.notif + left_icon = root + + add_prestige = medium_prestige_gain + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = county_listened_to_locals_modifier + years = 5 + } + } + } + } + } + + ai_chance = { + base = 60 + modifier = { + add = 5 + has_trait = just + } + modifier = { + add = 25 + has_trait = gregarious + } + modifier = { + add = -5 + has_trait = arrogant + } + } + } + + option = { # Preemptive strike + name = fp2_struggle.2003.c + flavor = fp2_struggle.2003.c.desc + + stress_impact = { trusting = minor_stress_impact_gain } # Craven do not suffer a penalty, because they only plan the fight, not partake in it + + duel = { + skill = martial + value = high_skill_rating + + 10 = { + desc = fp2_struggle.2003.c.a + + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + + modifier = { # Relevant skills are those that could be used in urban warfare + add = 5 + has_trait = fickle + } + modifier = { + add = 1 + has_trait = just + } + modifier = { + add = 1 + has_trait = arrogant + } + modifier = { + add = 3 + has_trait = wrathful + } + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 3 + has_trait = lazy + } + + modifier = { + add = 5 + has_trait = open_terrain_expert + } + modifier = { + add = 2 + has_trait = reckless + } + modifier = { # "what does an INN even look like anyway?" + add = 3 + has_trait = reclusive + } + + show_as_tooltip = { + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = fp2_local_garrison_slaughtered_modifier + years = 5 + } + add_county_modifier = { + modifier = recently_looted_modifier + years = 5 + } + } + } + + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_local_garrison_slaughtered_modifier + left_icon = root + + scope:fp2_2003_county_town = { # Failure outcome + add_county_modifier = { + modifier = fp2_local_garrison_slaughtered_modifier + years = 5 + } + hidden_effect = { + add_county_modifier = { + modifier = recently_looted_modifier + years = 5 + } + } + } + } + } + } + 10 = { + desc = fp2_struggle.2003.c.b + + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + + modifier = { + add = 5 + has_trait = calm + } + modifier = { + add = 5 + has_trait = diligent + } + modifier = { + add = 3 + has_trait = callous + } + + modifier = { + add = 7 + OR = { + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + modifier = { + add = -15 + OR = { + has_trait = intellect_bad_1 + has_trait = intellect_bad_2 + } + } + modifier = { + add = -25 + OR = { + has_trait = intellect_bad_3 + has_trait = dull + } + } + modifier = { + add = 10 + has_trait = shrewd + } + + + modifier = { + add = 20 + has_trait = strategist + } + modifier = { # If you know how buildings are structured, you can raid them better + add = 5 + has_trait = architect + } + modifier = { + add = 5 + has_trait = flexible_leader + } + modifier = { + add = 15 + has_trait = organizer + } + modifier = { + add = 3 + has_trait = cautious_leader + } + + add_gold = minor_gold_value + add_prestige = medium_prestige_gain + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2003.c.b.notif + left_icon = root + + scope:fp2_2003_county_town = { # Success + add_county_modifier = { + modifier = fp2_elite_tactics_for_civil_guards_modifier + years = 5 + } + } + } + } + } + + ai_chance = { + base = 15 + modifier = { + add = 5 + has_trait = brave + } + modifier = { + add = 15 + has_trait = wrathful + } + modifier = { + add = 5 + has_trait = deceitful + } + modifier = { + add = -25 + has_trait = trusting + } + modifier = { + add = -10 + has_trait = craven + } + } + } + + option = { # Let the local handle it + name = fp2_struggle.2003.e + flavor = fp2_struggle.2003.e.desc + + stress_impact = { + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + random_list = { + 50 = { # Looted + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2003.e.notif.a + + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = recently_looted_modifier + years = 5 + } + } + } + } + 25 = { # Massacre + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2003.e.notif.b + desc = fp2_struggle.2003.e.notif.b.desc + + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = fp2_mercs_slaughtered_populance_modifier + years = 5 + } + } + } + } + 25 = { # Farming outcome + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2003.e.notif.c + desc = fp2_struggle.2003.e.notif.c.desc + + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = fp2_mercs_turned_farmers_modifier + years = 15 + } + } + } + } + } + } + + after = { + scope:fp2_2003_merc_actor = { silent_disappearance_effect = yes } + } +} + +################################### +# Ship building event +# By Hugo Cortell +################################### +fp2_struggle.2004 = { + type = character_event + title = fp2_struggle.2004.t + desc = fp2_struggle.2004.desc + + theme = crown + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = cp:councillor_steward + animation = personality_content + } + lower_right_portrait = { character = cp:councillor_marshal } + cooldown = { years = 150 } + + trigger = { + has_fp2_dlc_trigger = yes + current_year > 1025 + top_liege = root + + realm_size >= minor_realm_size + + exists = cp:councillor_marshal + cp:councillor_marshal = { is_available_ai_adult = yes } + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + NOT = { has_character_flag = fp2_2004_critical_success_achieved } + } + + any_sub_realm_county = { + is_coastal_county = yes + NOT = { has_county_modifier = fp2_successful_shipyards_modifier } + } + } + + weight_multiplier = { + modifier = { + add = 5 + current_year > 1066 + } + modifier = { + add = 25 + current_year > 1450 # Caravel time + } + modifier = { + add = 25 + current_year > 1550 + } + } + immediate = { + cp:councillor_marshal = { save_scope_as = 2004_scoped_marshal } + cp:councillor_steward = { + save_scope_as = 2004_scoped_steward + if = { + limit = { has_character_flag = fp2_2004_critical_success_achieved } + remove_character_flag = fp2_2004_critical_success_achieved # For debug + } + } + + random_sub_realm_county = { + limit = { is_coastal_county = yes } + save_scope_as = fp2_2004_dockyards + } + } + option = { # WE WILL BUILD BOATS OF PURE SILVER (MR addition) + name = fp2_struggle.2004.c + flavor = fp2_struggle.2004.c.desc + + remove_treasury_or_gold = major_treasury_or_gold_value + scope:2004_scoped_steward = { + add_opinion = { + target = root + modifier = dismissive_opinion + opinion = -15 + } + } + scope:2004_scoped_marshal = { + add_opinion = { + target = root + modifier = dismissive_opinion + opinion = -20 + } + } + + scope:2004_scoped_steward = { + duel = { + skill = learning + value = high_skill_rating + + 25 = { # Failure Outcome + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -24 + } + modifier = { # Someone is sneaking in iron powder to cheap out! + add = 5 + has_trait = avaricious + } + + custom_tooltip = fp2_struggle.2005.desc.alt.a + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 20 + } + } + } + 5 = { # Success Outcome + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -4 + } + modifier = { + add = 5 + has_trait = calm + } + modifier = { + add = 15 + has_trait = diligent + } + modifier = { + add = 2 + has_trait = ambitious + } + modifier = { + add = 3 + has_trait = patient + } + modifier = { + add = 25 + has_trait = shrewd + } + modifier = { + add = 10 + has_trait = overseer + } + modifier = { + add = 8 + has_trait = strategist + } + modifier = { + add = 15 + has_trait = architect + } + modifier = { + add = 10 + has_trait = scholar + } + modifier = { + add = 15 + has_trait = military_engineer + } + modifier = { + add = 3 + has_trait = logistician + } + modifier = { + add = 6 + has_trait = journaller + } + modifier = { # Building a ship of silver means you must know your construction material + add = 5 + has_trait = education_stewardship_1 # You sorta know how silver operates + } + modifier = { + add = 8 + has_trait = education_stewardship_2 # You understand the properties of silver + } + modifier = { + add = 10 + has_trait = education_stewardship_3 # You can bite silver and tell if it is real or not (others can only do it with gold) + } + modifier = { + add = 15 + has_trait = education_stewardship_4 # Your tounge is capable of taking appart the anatomical structure of the silver thanks to your PhD in home economics + } + modifier = { + add = 20 + has_trait = education_stewardship_5 # Like the above, except cooler, and my script comment has better spelling + } + + root = { save_scope_as = fp2_2004_silver_boat_floats } + show_as_tooltip = { + root = { add_prestige = major_prestige_gain } + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 45 + } + } + } + } + } + } + save_scope_as = fp2_2004_alt_option + if = { + limit = { is_developer_testing_trigger = yes } + custom_tooltip = debug_generic_option_shortened_trigger_can_disable + trigger_event = { + id = fp2_struggle.2005 + days = 2 + } + } + else = { + trigger_event = { + id = fp2_struggle.2005 + years = { 4 10 } + } + } + } + + option = { # I will sponsor your endeavour - Side with Steward + name = fp2_struggle.2004.a + + remove_treasury_or_gold = major_treasury_or_gold_value + + scope:2004_scoped_steward = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 35 + } + } + scope:2004_scoped_marshal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + + scope:2004_scoped_steward = { + duel = { + desc = outcome_in_a_few_years + skill = learning + value = high_skill_rating + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + desc = fp2_struggle.2004.a.a.desc + + modifier = { + add = 10 + has_trait = lazy + } + modifier = { + add = 10 + has_trait = fickle + } + modifier = { + add = 5 + has_trait = stubborn + } + modifier = { + add = 2 + has_trait = gregarious + } + modifier = { + add = 30 + has_trait = dull + } + modifier = { + add = 5 + has_trait = drunkard + } + modifier = { + add = 7 + has_trait = irritable + } + modifier = { + add = 3 + has_trait = rakish + } + modifier = { + add = 10 + has_trait = profligate + } + + show_as_tooltip = { + root = { + add_character_modifier = { + modifier = fp2_advanced_maritime_technology_modifier + years = 50 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + desc = fp2_struggle.2004.a.b.desc + + modifier = { + add = 5 + has_trait = calm + } + modifier = { + add = 15 + has_trait = diligent + } + modifier = { + add = 2 + has_trait = ambitious + } + modifier = { + add = 3 + has_trait = patient + } + modifier = { + add = 25 + has_trait = shrewd + } + modifier = { + add = 10 + has_trait = overseer + } + modifier = { + add = 8 + has_trait = strategist + } + modifier = { + add = 15 + has_trait = architect + } + modifier = { + add = 10 + has_trait = scholar + } + modifier = { + add = 15 + has_trait = military_engineer + } + modifier = { + add = 3 + has_trait = logistician + } + modifier = { + add = 6 + has_trait = journaller + } + + add_character_flag = fp2_2004_critical_success_achieved + show_as_tooltip = { + root = { + add_character_modifier = { + modifier = fp2_advanced_maritime_technology_modifier + years = 60 + } + } + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 60 + } + } + } + } + } + } + hidden_effect = { + if = { + limit = { is_developer_testing_trigger = yes } + custom_tooltip = debug_generic_option_shortened_trigger_can_disable + trigger_event = { + id = fp2_struggle.2005 + days = 2 + } + } + else = { + trigger_event = { + id = fp2_struggle.2005 + years = { 5 9 } + } + } + } + + ai_chance = { + base = 0 + modifier = { + add = 50 + treasury_or_gold > medium_treasury_or_gold_value + } + ai_value_modifier = { + ai_boldness = 0.2 + ai_greed = -0.3 + ai_rationality = 0.2 + } + } + } + + option = { # No, it is a waste of money - Side with marshal + name = fp2_struggle.2004.b + flavor = fp2_struggle.2004.b.desc + + scope:2004_scoped_marshal = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + + scope:2004_scoped_steward = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + add_opinion = { + target = scope:2004_scoped_marshal + modifier = angry_opinion + opinion = -25 + } + } + + ai_chance = { base = 50 } + } +} + +fp2_struggle.2005 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:fp2_2004_alt_option + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:fp2_2004_silver_boat_floats + } + desc = fp2_struggle.2005.desc.alt.b + } + desc = fp2_struggle.2005.desc.alt.a + } + } + } + triggered_desc = { + trigger = { + scope:2004_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + } + desc = fp2_struggle.2005.t.alt + } + desc = fp2_struggle.2005.t + } + } + + immediate = { + if = { + limit = { root = root } # Check if scoped port town is still under your control + save_scope_as = port_under_control + } + + # MIA checks + if = { # Assign current steward + limit = { exists = cp:councillor_steward } + cp:councillor_steward = { save_scope_as = 2005_scoped_steward } + } + else_if = { # Otherwise assign chaplain + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = 2005_scoped_steward } + } + else = { # Fallback, get whoever is most qualified in court + random_courtier_or_guest = { + limit = { learning > high_skill_rating } + random = { + chance = 15 + add_character_flag = fp2_2004_critical_success_achieved + } + save_scope_as = 2005_scoped_steward + } + if = { + limit = { + NOT = { exists = scope:2005_scoped_steward } + } + random_courtier_or_guest = { save_scope_as = 2005_scoped_steward } + } + } + + if = { + limit = { + scope:2004_scoped_steward != scope:2005_scoped_steward + OR = { + scope:2005_scoped_steward = cp:councillor_steward + scope:2005_scoped_steward = cp:councillor_court_chaplain + } + } + if = { + limit = { learning > high_skill_rating } + random = { + chance = 25 + add_character_flag = fp2_2004_critical_success_achieved + } + save_scope_as = 2005_scoped_steward + } + } + } + + desc = { + triggered_desc = { # Alt option + trigger = { exists = scope:fp2_2004_alt_option } + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:fp2_2004_silver_boat_floats + } + desc = fp2_struggle.2005.desc.alt.b.desc + } + desc = fp2_struggle.2005.desc.alt.a.desc + } + triggered_desc = { # Lost dockyards + trigger = { scope:fp2_2004_dockyards.holder.top_liege != root.top_liege } + desc = fp2_struggle.2005.desc.cirt.a.notif + } + } + } + triggered_desc = { + trigger = { NOT = { exists = scope:fp2_2004_alt_option } } + desc = { + triggered_desc = { # Crtitical success explanation + trigger = { + scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + } + desc = fp2_struggle.2005.desc.cirt.notif + } + triggered_desc = { # Lost dockyards + trigger = { + scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + scope:fp2_2004_dockyards.holder.top_liege != root.top_liege + } + desc = fp2_struggle.2005.desc.cirt.a.notif + } + + # Original (Steward) designer is MIA + triggered_desc = { + trigger = { + scope:2004_scoped_steward != scope:2005_scoped_steward + } + desc = fp2_struggle.2005.desc.newdesigner.notif + } + + triggered_desc = { # Intro (non-crit) + trigger = { + NOT = { scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } } + } + desc = fp2_struggle.2005.desc.intro + } + + # Describe bottom of the ship + random_valid = { + desc = fp2_struggle.2005.desc.bottom.a + desc = fp2_struggle.2005.desc.bottom.b + desc = fp2_struggle.2005.desc.bottom.c + desc = fp2_struggle.2005.desc.bottom.d + } + + # Describe main feature(s) + random_valid = { + desc = fp2_struggle.2005.desc.unique.a + desc = fp2_struggle.2005.desc.unique.b + desc = fp2_struggle.2005.desc.unique.c + desc = fp2_struggle.2005.desc.unique.d + desc = fp2_struggle.2005.desc.unique.e + } + + # Describe sails (updated to propulsion) + random_valid = { + desc = fp2_struggle.2005.desc.sails.a + desc = fp2_struggle.2005.desc.sails.b + desc = fp2_struggle.2005.desc.sails.c + desc = fp2_struggle.2005.desc.sails.d + } + + first_valid = { + triggered_desc = { + trigger = { scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } } + desc = fp2_struggle.2005.desc.outro.crit + } + desc = fp2_struggle.2005.desc.outro + } + } + } + } + + theme = martial + override_background = { reference = docks } + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:fp2_2004_alt_option + NOT = { exists = scope:fp2_2004_silver_boat_floats } + } + animation = anger + } + triggered_animation = { + trigger = { exists = scope:fp2_2004_alt_option } + animation = ecstasy + } + animation = war_over_win + } + right_portrait = { + character = scope:2005_scoped_steward + animation = throne_room_writer + } + + option = { # ALT Accept + trigger = { + exists = scope:fp2_2004_alt_option + exists = scope:fp2_2004_silver_boat_floats + } + name = fp2_struggle.2005.a + + add_prestige = major_prestige_gain + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 45 + } + } + } + + option = { # ALT Accept (Failure Version) + trigger = { + exists = scope:fp2_2004_alt_option + NOT = { exists = scope:fp2_2004_silver_boat_floats } + } + name = artifact.4050.a # Reusage of loc key + + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 20 + } + } + } + + option = { # Accept + trigger = { + NOT = { + exists = scope:fp2_2004_alt_option + scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + } + } + name = fp2_struggle.2005.a + + add_character_modifier = { + modifier = fp2_advanced_maritime_technology_modifier + years = 50 + } + } + + option = { # Crit Accept + trigger = { + NOT = { exists = scope:fp2_2004_alt_option } + scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + } + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2004_dockyards.holder.top_liege = top_liege } + desc = fp2_struggle.2005.a + } + desc = fp2_struggle.2005.a.a + } + } + } + + add_character_modifier = { + modifier = fp2_advanced_maritime_technology_modifier + years = 60 + } + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 60 + } + } + } + + after = { + if = { + limit = { + OR = { + scope:2004_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + } + } + scope:2004_scoped_steward = { remove_character_flag = fp2_2004_critical_success_achieved } + scope:2005_scoped_steward = { remove_character_flag = fp2_2004_critical_success_achieved } + } + } +} + +################################### +# The Borders of Faith +# By Hugo Cortell +################################### +scripted_trigger fp2_event2006_check_if_right_vassal_target = { + holder != root + holder = { + is_available_ai_adult = yes + faith = root.faith + NOT = { has_trait = cynical } + OR = { + any_secret = { type = secret_non_believer } + AND = { # Fallback, get non-devout follower + piety < 51 + NOT = { has_trait = zealous } + } + } + } +} + +fp2_struggle.2006 = { + type = character_event + title = fp2_struggle.2006.t + desc = fp2_struggle.2006.desc + cooldown = { years = 20 } + + theme = faith + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:fp2_2006_vassal_in_crisis + animation = stress + } + lower_left_portrait = { + trigger = { exists = scope:2006_scoped_chaplain } + character = scope:2006_scoped_chaplain + } + + trigger = { + has_fp2_dlc_trigger = yes + root.top_liege = root + any_sub_realm_county = { + fp2_event2006_check_if_right_vassal_target = yes + + holder = { + any_neighboring_top_liege_realm_owner = { + faith != root.faith + } + } + } + } + + immediate = { + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = 2006_scoped_chaplain } + } + random_sub_realm_county = { + limit = { fp2_event2006_check_if_right_vassal_target = yes } + holder = { + save_scope_as = fp2_2006_vassal_in_crisis + random_neighboring_top_liege_realm_owner = { + limit = { faith != root.faith } + faith = { save_scope_as = fp2_2006_foreign_faith } + } + } + } + } + + option = { # Im a witch! And you can be one too! + trigger = { + has_trait = witch + OR = { + NOT = { # Not witch + scope:fp2_2006_vassal_in_crisis = { + any_secret = { type = secret_witch } + } + } + scope:fp2_2006_vassal_in_crisis = { # Witch but does not walk the path of witchery with you + any_secret = { + type = secret_witch + NOT = { is_known_by = root } + } + } + } + } + name = fp2_struggle.2006.e + + if = { + limit = { + any_secret = { + type = secret_witch + } + } + random_secret = { + type = secret_witch + reveal_to = scope:fp2_2006_vassal_in_crisis + } + } + send_interface_toast = { + type = event_witchcraft_good + title = fp2_struggle.2006.e.notif.t + left_icon = scope:fp2_2006_vassal_in_crisis + + scope:fp2_2006_vassal_in_crisis = { + if = { + limit = { + any_secret = { type = secret_witch } + has_trait = witch + } + custom_tooltip = fp2_struggle.2006.e.alreadywitch + } + else = { + hidden_effect = { give_witch_secret_or_trait_effect = yes } + show_as_tooltip = { add_trait = witch } + } + show_as_tooltip = { + random_secret = { + type = secret_witch + reveal_to = root + } + } + if = { + limit = { can_set_relation_friend_trigger = { CHARACTER = root } } + set_relation_friend = { reason = friend_guided_right_path target = root } + } + add_opinion = { + target = root + modifier = fp2_tolerated_me_opinion + } + if = { + limit = { + trait_is_criminal_in_faith_trigger = { + TRAIT = witch + GENDER_CHARACTER = scope:fp2_2006_vassal_in_crisis + FAITH = scope:fp2_2006_vassal_in_crisis.faith + } + NOT = { + trait_is_criminal_in_faith_trigger = { + TRAIT = witch + GENDER_CHARACTER = scope:fp2_2006_vassal_in_crisis + FAITH = scope:fp2_2006_foreign_faith + } + } + } + hidden_effect = { set_character_faith_with_conversion = scope:fp2_2006_foreign_faith } + custom_tooltip = fp2_struggle.2006.e.tacticalwitchfaithchange + } + + hidden_effect = { + if = { + limit = { + any_secret = { + type = secret_witch + } + } + random_secret = { + type = secret_witch + reveal_to = root + } + } + root = { + random_secret = { + type = secret_witch + reveal_to = scope:fp2_2006_vassal_in_crisis + } + } + } + } + } + + ai_chance = { + base = 80 + ai_value_modifier = { + ai_honor = -0.3 + ai_rationality = 0.5 + ai_zeal = -0.9 + } + } + } + + option = { # (Threaten to) Denounce heretic + trigger = { + OR = { + has_trait = schemer + has_trait = devoted + intrigue > medium_skill_rating + } + } + name = fp2_struggle.2006.d + stress_impact = { + compassionate = medium_stress_impact_gain + gallant = medium_stress_impact_gain + } + + add_dread = miniscule_dread_gain + hidden_effect = { + scope:fp2_2006_vassal_in_crisis = { + if = { + limit = { any_secret = { NOT = { secret_type = secret_non_believer } } } + add_secret = { type = secret_non_believer } + } + } + } + + add_hook = { + target = scope:fp2_2006_vassal_in_crisis + type = threat_hook + } + random_secret = { + type = secret_non_believer + reveal_to = root + } + + scope:fp2_2006_vassal_in_crisis = { + add_opinion = { + target = root + modifier = betrayed_me_opinion + opinion = -40 + } + } + + ai_chance = { + base = 30 + ai_value_modifier = { + ai_compassion = -0.5 + ai_honor = -0.8 + ai_rationality = 0.1 + ai_zeal = 0.3 + ai_vengefulness = 0.3 + ai_greed = 0.2 + } + } + } + + option = { # I will fix him myself + name = fp2_struggle.2006.b + stress_impact = { + cynical = minor_stress_impact_gain + } + + duel = { + skill = learning + value = medium_skill_rating + + 15 = { + desc = fp2_struggle.2006.b.a.desc + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + } + modifier = { + add = 10 + has_trait = fickle + } + modifier = { + add = 10 + has_trait = heresiarch + } + modifier = { + add = 2 + has_trait = impotent + } + modifier = { + add = 5 + has_trait = irritable + } + modifier = { + add = 5 + has_trait = dull + } + modifier = { + add = 10 + has_trait = depressed_genetic + } + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 10 + has_trait = lazy + } + modifier = { + add = 2 + has_trait = stubborn + } + modifier = { + add = 5 + has_trait = craven + } + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2006.generic.notif.a.t + left_icon = scope:fp2_2006_vassal_in_crisis + + scope:fp2_2006_vassal_in_crisis = { + hidden_effect = { set_character_faith_with_conversion = scope:fp2_2006_foreign_faith } + show_as_tooltip = { set_character_faith = scope:fp2_2006_foreign_faith } + + progress_towards_rival_effect = { + REASON = rival_fraternising_enemy + CHARACTER = root + OPINION = 0 + } + add_opinion = { + target = root + modifier = fp2_questioned_my_faith_opinion + } + } + } + } + 15 = { + desc = fp2_struggle.2006.b.b.desc + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + modifier = { + add = 10 + has_trait = calm + } + modifier = { + add = 10 + has_trait = humble + } + modifier = { + add = 3 + has_trait = forgiving + } + modifier = { + add = 5 + has_trait = honest + } + modifier = { + add = 10 + has_trait = humble + } + modifier = { + add = 3 + has_trait = patient + } + modifier = { + add = 20 + has_trait = zealous + } + modifier = { + add = 4 + has_trait = compassionate + } + modifier = { + add = 20 + has_trait = theologian # Could be it's own option, but I can't think of what argument could be used... + } + modifier = { + add = 10 + has_trait = devoted + } + modifier = { + add = 2 + has_trait = lifestyle_poet + } + modifier = { + add = 10 + has_trait = saint + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2006.generic.notif.b.t + left_icon = scope:fp2_2006_vassal_in_crisis + + add_piety = medium_piety_gain + progress_towards_friend_effect = { + REASON = friend_guided_right_path + CHARACTER = scope:fp2_2006_vassal_in_crisis + OPINION = 0 + } + if = { + limit = { + this != root + } + add_opinion = { + target = root + modifier = fp2_reassured_faith_opinion + } + } + } + } + } + + ai_chance = { + base = 45 + ai_value_modifier = { + ai_compassion = 0.2 + ai_sociability = 0.3 + ai_zeal = 0.2 + } + } + } + + option = { # One-on-One time + name = fp2_struggle.2006.c + flavor = fp2_struggle.2006.c.desc + + trigger = { + NAND = { + has_trait = witch + OR = { + has_trait = schemer + has_trait = devoted + intrigue > medium_skill_rating + } + } + } + stress_impact = { zealous = minor_stress_impact_gain } + + scope:fp2_2006_vassal_in_crisis = { + progress_towards_friend_effect = { + REASON = friend_religious_tolerance + CHARACTER = root + OPINION = 0 + } + add_opinion = { + target = root + modifier = fp2_tolerated_me_opinion + } + random = { + chance = 50 + hidden_effect = { set_character_faith_with_conversion = scope:fp2_2006_foreign_faith } + show_as_tooltip = { set_character_faith = scope:fp2_2006_foreign_faith } + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.1 + ai_rationality = 0.6 + ai_zeal = -0.7 + } + } + } + + option = { # Someone call a priest! + name = fp2_struggle.2006.a + flavor = fp2_struggle.2006.a.desc + show_as_unavailable = { NOT = { exists = scope:2006_scoped_chaplain } } # Replaces trigger, teases player to possibility. + stress_impact = { + honest = medium_stress_impact_gain + humble = minor_stress_impact_gain + trusting = medium_stress_impact_gain + } + + scope:fp2_2006_vassal_in_crisis = { + add_opinion = { + target = root + modifier = betrayed_me_opinion + opinion = -20 + } + } + scope:2006_scoped_chaplain = { + duel = { + skill = learning + value = medium_skill_rating + + 10 = { + desc = fp2_struggle.2006.a.a + compare_modifier = { + value = scope:duel_value + multiplier = -1.25 + } + modifier = { + add = 15 + scope:fp2_2006_vassal_in_crisis = { has_trait = paranoid } + } + modifier = { + add = 10 + has_trait = fickle + } + modifier = { + add = 10 + has_trait = heresiarch + } + modifier = { + add = 2 + has_trait = impotent + } + modifier = { + add = 5 + has_trait = irritable + } + modifier = { + add = 5 + has_trait = dull + } + modifier = { + add = 10 + has_trait = depressed_genetic + } + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 10 + has_trait = lazy + } + modifier = { + add = 2 + has_trait = stubborn + } + modifier = { + add = 5 + has_trait = craven + } + modifier = { + factor = 2 + scope:fp2_2006_vassal_in_crisis = { has_trait = paranoid } + } + + root = { + hidden_effect = { + scope:fp2_2006_vassal_in_crisis = { + if = { + limit = { any_secret = { type = secret_non_believer } } + progress_towards_rival_effect = { # "HE MUST BE ON TO ME!" + REASON = rival_faith_tested + CHARACTER = scope:2006_scoped_chaplain + OPINION = 0 + } + add_opinion = { + target = scope:2006_scoped_chaplain + modifier = fp2_questioned_my_faith_opinion + } + } + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2006.generic.notif.a.t + left_icon = scope:fp2_2006_vassal_in_crisis + + scope:fp2_2006_vassal_in_crisis = { + show_as_tooltip = { set_character_faith = scope:fp2_2006_foreign_faith } + hidden_effect = { set_character_faith_with_conversion = scope:fp2_2006_foreign_faith } + + add_opinion = { + target = scope:2006_scoped_chaplain + modifier = fp2_questioned_my_faith_opinion + opinion = -35 + } + } + } + } + } + 5 = { + trigger = { + scope:fp2_2006_vassal_in_crisis = { + NOT = { has_trait = paranoid } + } + } + desc = fp2_struggle.2006.a.b + compare_modifier = { + value = scope:duel_value + multiplier = -1.25 + } + modifier = { + add = 10 + has_trait = fickle + } + modifier = { + add = 10 + has_trait = heresiarch + } + modifier = { + add = 2 + has_trait = impotent + } + modifier = { + add = 5 + has_trait = irritable + } + modifier = { + add = 5 + has_trait = dull + } + modifier = { + add = 10 + has_trait = depressed_genetic + } + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 10 + has_trait = lazy + } + modifier = { + add = 2 + has_trait = stubborn + } + modifier = { + add = 5 + has_trait = craven + } + + root = { + hidden_effect = { + scope:fp2_2006_vassal_in_crisis = { + if = { + limit = { any_secret = { type = secret_non_believer } } + progress_towards_rival_effect = { # "HE MUST BE ON TO ME!" + REASON = rival_faith_tested + CHARACTER = scope:2006_scoped_chaplain + OPINION = 0 + } + add_opinion = { + target = scope:2006_scoped_chaplain + modifier = fp2_questioned_my_faith_opinion + } + } + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2006.generic.notif.a.t + left_icon = scope:fp2_2006_vassal_in_crisis + + scope:fp2_2006_vassal_in_crisis = { + remove_trait = trusting + if = { + limit = { is_ai = yes } + add_stress = monumental_stress_gain # Unbalanced for players, fun when seeing it happen to unrelated AI + } + else = { add_stress = medium_stress_gain } # (there is no notification) + add_opinion = { + target = scope:2006_scoped_chaplain + modifier = fp2_questioned_my_faith_opinion + opinion = -25 + } + } + } + } + } + 20 = { + desc = fp2_struggle.2006.a.c + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + modifier = { + add = 10 + has_trait = calm + } + modifier = { + add = 10 + has_trait = humble + } + modifier = { + add = 3 + has_trait = forgiving + } + modifier = { + add = 5 + has_trait = honest + } + modifier = { + add = 10 + has_trait = humble + } + modifier = { + add = 3 + has_trait = patient + } + modifier = { + add = 20 + has_trait = zealous + } + modifier = { + add = 4 + has_trait = compassionate + } + modifier = { + add = 15 + has_trait = theologian + } + modifier = { + add = 10 + has_trait = devoted + } + modifier = { + add = 2 + has_trait = lifestyle_poet + } + modifier = { + add = 10 + has_trait = saint + } + + hidden_effect = { + scope:fp2_2006_vassal_in_crisis = { add_piety = minor_piety_gain } + scope:2006_scoped_chaplain = { add_piety = medium_piety_gain } + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2006.generic.notif.b.t + left_icon = scope:fp2_2006_vassal_in_crisis + + scope:fp2_2006_vassal_in_crisis = { + progress_towards_friend_effect = { + REASON = friend_guided_right_path + CHARACTER = scope:2006_scoped_chaplain + OPINION = 0 + } + add_opinion = { + target = scope:2006_scoped_chaplain + modifier = fp2_reassured_faith_opinion + } + } + } + } + } + } + } + + ai_chance = { + base = 45 + ai_value_modifier = { + ai_compassion = -0.1 + ai_energy = -0.1 + ai_honor = -0.1 + ai_rationality = 0.2 + ai_sociability = -0.2 + ai_zeal = 0.3 + } + } + } +} + +################################### +# A Castle Worthy of Iberia +# By Hugo Cortell +################################### +scripted_trigger fp2_struggle_2007_can_build_castle_trigger = { # Ensures that the selected building spot adheres to the game's rules on holding placement. + any_county_province = { has_holding = no } + trigger_if = { + limit = { any_county_province = { has_holding_type = castle_holding } } + any_county_province = { has_holding_type = church_holding } + any_county_province = { has_holding_type = city_holding } + } + exists = holder + holder != scope:fp2_2007_scoped_steward +} + +fp2_struggle.2007 = { + type = character_event + title = fp2_struggle.2007.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2007_castle_holder = ROOT } + desc = fp2_struggle.2007.desc.a + } + desc = fp2_struggle.2007.desc.b + } + } + + theme = realm + cooldown = { years = 20 } + override_background = { reference = garden } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fp2_2007_scoped_steward + animation = chancellor + } + lower_left_portrait = scope:2007_vassal_sponsor + lower_right_portrait = scope:fp2_2007_castle_holder + + trigger = { + has_fp2_dlc_trigger = yes + is_ai = no # Overpowered for AI, player only. + struggle:iberian_struggle = { + is_struggle_phase = struggle_iberia_phase_hostility + + } + + root.top_liege = root + exists = cp:councillor_steward + cp:councillor_steward = { is_available_ai_adult = yes } + + any_vassal = { # Last minute pre RC fixes + NOT = { + religion = root.religion + this = cp:councillor_steward + } + } + any_realm_county = { fp2_struggle_2007_can_build_castle_trigger = yes } + + save_temporary_scope_value_as = { + name = fp2_2007_wealth_barrier + value = { + value = main_building_tier_1_cost + multiply = 0.8 + round = yes + } + } + OR = { + gold > scope:fp2_2007_wealth_barrier + OR = { + has_trait = architect + AND = { + has_royal_court = yes + employs_court_position = royal_architect_court_position + any_court_position_holder = { + type = royal_architect_court_position + is_available_ai_adult = yes + } + } + } + } + } + + immediate = { + cp:councillor_steward = { save_scope_as = fp2_2007_scoped_steward } + if = { + limit = { + any_court_position_holder = { + type = royal_architect_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = royal_architect_court_position + save_scope_as = fp2_2007_roco_architect + } + } + random_vassal = { + limit = { + NOT = { + religion = root.religion + this = scope:fp2_2007_scoped_steward + } + } + save_scope_as = 2007_vassal_sponsor + } + + random_realm_county = { + limit = { fp2_struggle_2007_can_build_castle_trigger = yes } + random_county_province = { + limit = { has_holding = no } + save_scope_as = fp2_2007_free_real_estate + } + holder = { save_scope_as = fp2_2007_castle_holder } + } + + # Get Different Faith (updated to whole religion) + struggle:iberian_struggle = { + random_involved_ruler = { + limit = { + religion != root.religion + faith = { save_temporary_scope_as = temp_involved_faith } + struggle:iberian_struggle = { is_faith_involved_in_struggle = scope:temp_involved_faith } + } + religion = { save_scope_as = fp2_2007_foreign_faith } + } + if = { # Fallback + limit = { NOT = { exists = scope:fp2_2007_foreign_faith } } + get_random_faith_effect = { FORBIDROOTFAITH = yes } + scope:random_faith.religion = { save_scope_as = fp2_2007_foreign_faith } + } + } + + # Get castileans or proto-castileans + if = { + limit = { culture = { has_cultural_parameter = architect_trait_prestige } } + culture = { save_scope_as = fp2_2007_allegedprotocastilean } + } + + save_scope_value_as = { + name = fp2_2007_same_faith_construction_cost + value = { + value = main_building_tier_1_cost + multiply = 0.75 + round = yes + } + } + save_scope_value_as = { + name = fp2_2007_different_faith_construction_cost + value = { + value = main_building_tier_1_cost + multiply = 0.65 + round = yes + } + } + save_scope_value_as = { + name = fp2_2007_diy_construction_cost + value = { + value = main_building_tier_1_cost + multiply = 0.6 + round = yes + } + } + + # Set dynamic loc keys for powerful vassals + religion = { save_scope_as = dyloc_powerful_vassal_faith } + culture = { save_scope_as = dyloc_powerful_vassal_culture } + } + + option = { # Same Faith (or) Castilean architect + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:fp2_2007_allegedprotocastilean } + desc = fp2_struggle.2007.a.castile + } + desc = fp2_struggle.2007.a + } + } + } + flavor = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:fp2_2007_allegedprotocastilean } + desc = fp2_struggle.2007.a.castile.favor + } + desc = fp2_struggle.2007.a.major_vassal_flavor + } + } + show_as_unavailable = { gold < scope:fp2_2007_same_faith_construction_cost } + + if = { # Proto-Castilean + limit = { exists = scope:fp2_2007_allegedprotocastilean } + every_powerful_vassal = { + limit = { culture = root.culture } + custom = fp2_every_major_same_culture_vassal_notifier + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + } + show_as_tooltip = { + remove_treasury_or_gold = scope:fp2_2007_same_faith_construction_cost + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = 95 + } + } + } + add_hook_if_possible_effect = { # General effect + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } # Hooks get their own notifications, therefore I will not show them on the main effect + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2007.t + left_icon = root + right_icon = scope:fp2_2007_castle_holder + + remove_treasury_or_gold = scope:fp2_2007_same_faith_construction_cost + custom_tooltip = fp2_struggle.2007.a.notif + hidden_effect = { + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = 95 + } + } + } + add_hook_if_possible_effect = { # General effect + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + } + } + } + + option = { # Foreign (different faith) architect + name = fp2_struggle.2007.b + flavor = fp2_struggle.2007.b.flavor + show_as_unavailable = { gold < scope:fp2_2007_different_faith_construction_cost } + hidden_effect = { scope:2007_vassal_sponsor = { remove_treasury_or_gold = medium_treasury_or_gold_value } } + + every_powerful_vassal = { + custom = fp2_every_major_same_faith_vassal_notifier + limit = { religion = root.religion } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + every_powerful_vassal = { + custom = fp2_every_major_different_faith_vassal_notifier + limit = { religion != root.religion } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + scope:fp2_2007_free_real_estate.county = { + if = { + limit = { religion = scope:fp2_2007_foreign_faith } + add_county_modifier = { + modifier = modifier_religious_understanding_modifier + years = 12 + } + } + else_if = { + limit = { religion != root.religion } + add_county_modifier = { + modifier = invested_in_province_modifier + years = 5 + } + } + } + + show_as_tooltip = { + remove_treasury_or_gold = scope:fp2_2007_different_faith_construction_cost + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = 95 + } + } + } + add_hook_if_possible_effect = { + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2007.t + left_icon = scope:2007_vassal_sponsor + right_icon = scope:fp2_2007_castle_holder + + remove_treasury_or_gold = scope:fp2_2007_different_faith_construction_cost + custom_tooltip = fp2_struggle.2007.a.notif + hidden_effect = { + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = 95 + } + } + } + add_hook_if_possible_effect = { # General effect + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + } + } + } + + option = { # I will build it myself + name = fp2_struggle.2007.c + flavor = fp2_struggle.2007.c.flavor + + trigger = { has_trait = architect } + + duel = { + skill = learning + value = very_high_skill_rating + + 60 = { + desc = fp2_struggle.2007.c.notif.a.desc + compare_modifier = { + value = scope:duel_value + multiplier = 1 # Should be -1 but it has already been balanced + } + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2007.c.notif.a.t + left_icon = root + right_icon = scope:fp2_2007_castle_holder + + add_prestige = major_prestige_loss + reverse_add_opinion = { + target = scope:fp2_2007_scoped_steward + modifier = disappointed_opinion + opinion = -10 + } + } + } + 40 = { + desc = fp2_struggle.2007.c.notif.b.desc + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + modifier = { + add = fp2_2007_calculate_architect_competence + always = yes + } + + show_as_tooltip = { + remove_treasury_or_gold = scope:fp2_2007_diy_construction_cost + if = { + limit = { exists = scope:fp2_2007_allegedprotocastilean } + add_prestige = minor_prestige_gain + } + + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = medium_gold_value + } + } + } + add_hook_if_possible_effect = { # General effect + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2007.t + left_icon = root + right_icon = scope:fp2_2007_castle_holder + + remove_treasury_or_gold = scope:fp2_2007_diy_construction_cost + if = { + limit = { exists = scope:fp2_2007_allegedprotocastilean } + add_prestige = minor_prestige_gain + } + custom_tooltip = fp2_struggle.2007.a.notif + } + hidden_effect = { + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = medium_gold_value + } + } + } + add_hook_if_possible_effect = { + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + } + } + } + } + + option = { # RoCo + name = fp2_struggle.2007.c.roco + + trigger = { + NOT = { has_trait = architect } + exists = scope:fp2_2007_roco_architect + } + scope:fp2_2007_roco_architect = { + duel = { + skill = learning + value = very_high_skill_rating + + 55 = { + desc = fp2_struggle.2007.c.notif.a.desc + + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2007.c.notif.a.t + left_icon = scope:fp2_2007_roco_architect + right_icon = scope:fp2_2007_castle_holder + + add_prestige = medium_prestige_loss + } + } + hidden_effect = { add_prestige = medium_prestige_loss } + } + 45 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + modifier = { + add = fp2_2007_calculate_architect_competence + always = yes + } + + root = { + show_as_tooltip = { + remove_treasury_or_gold = scope:fp2_2007_diy_construction_cost + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = minor_gold_value + } + } + } + add_hook_if_possible_effect = { + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2007.t + left_icon = scope:fp2_2007_roco_architect + right_icon = scope:fp2_2007_castle_holder + + remove_treasury_or_gold = scope:fp2_2007_diy_construction_cost + custom_tooltip = fp2_struggle.2007.a.notif + } + hidden_effect = { + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = minor_gold_value + } + } + } + add_hook_if_possible_effect = { + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + } + } + } + } + } + } + + option = { # Leave it be + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2007_castle_holder = root } + desc = fp2_struggle.2007.d.alt + } + desc = fp2_struggle.2007.d + } + } + } + + if = { + limit = { scope:fp2_2007_castle_holder != root } + reverse_add_opinion = { + target = scope:fp2_2007_scoped_steward + modifier = disappointed_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:fp2_2007_castle_holder + modifier = disappointed_opinion + opinion = -20 + } + } + if = { + limit = { exists = cp:councillor_marshal } + reverse_add_opinion = { + target = cp:councillor_marshal + modifier = disappointed_opinion + opinion = -10 + } + } + } +} + +################################### +# Misdeeds of The Chaplain +# By Hugo Cortell +################################### +scripted_trigger fp2_struggle_2008_check_actor_eligibility_scripted_trigger = { + is_available_ai_adult = yes + intrigue > low_skill_rating + + NOT = { + has_trait = just + has_trait = compassionate + has_trait = generous + has_trait = content + has_trait = honest + has_relation_soulmate = root + } + + trigger_if = { # Instead of an event weight, we just increase the reqs for friends to dicrease overhead + limit = { + has_relation_friend = root + has_relation_lover = root + } + OR = { + has_trait = greedy + has_trait = deceitful + has_trait = callous + } + } +} + +fp2_struggle.2008 = { + type = character_event + title = fp2_struggle.2008.t + desc = fp2_struggle.2008.desc + + theme = secret + cooldown = { years = 30 } + override_background = { reference = study } + left_portrait = { + character = scope:fps_2008_misdeed_actor + animation = fear + } + right_portrait = { + character = root + animation = disapproval + } + + trigger = { + has_fp2_dlc_trigger = yes + root.top_liege = root + + trigger_if = { + limit = { exists = struggle:iberian_struggle } + struggle:iberian_struggle = { + is_struggle_phase = struggle_iberia_phase_hostility + + } + } + + OR = { # This play changes depending on the actor + AND = { # Chaplain + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { fp2_struggle_2008_check_actor_eligibility_scripted_trigger = yes } + } + AND = { # Steward + exists = cp:councillor_steward + cp:councillor_steward = { fp2_struggle_2008_check_actor_eligibility_scripted_trigger = yes } + } + AND = { # Spymaster + exists = cp:councillor_spymaster + cp:councillor_spymaster = { fp2_struggle_2008_check_actor_eligibility_scripted_trigger = yes } + } + } + } + + immediate = { + random_councillor = { + limit = { + OR = { + this = root.cp:councillor_court_chaplain + this = root.cp:councillor_steward + this = root.cp:councillor_spymaster + } + fp2_struggle_2008_check_actor_eligibility_scripted_trigger = yes + } + weight = { # Weight based on personality. In combination with the scripted trigger this means: Must be greedy, dishonourable, not incompetent. + base = 1 + modifier = { + ai_greed > 0 + factor = 1 + } + modifier = { + ai_honor < 0 + factor = 1 + } + } + save_scope_as = fps_2008_misdeed_actor + } + + scope:fps_2008_misdeed_actor = { + if = { + limit = { has_council_position = councillor_steward } + add_gold = medium_gold_value # Small detail + } + else = { add_gold = minor_gold_value } + + if = { + limit = { + faith = { + exists = religious_head + NOT = { + religious_head = root + religious_head = scope:fps_2008_misdeed_actor + } + } + } + faith.religious_head = { + save_scope_as = fp2_2008_relevant_head_of_faith + } + } + } + root.capital_county = { save_scope_as = fp2_2008_capital } + } + + option = { # Special (thanks QA!) option, denounce publicly (might get killed by mob) + name = fp2_struggle.2008.d + flavor = fp2_struggle.2008.d.flavor + trigger = { + OR = { + has_trait = sadistic + has_trait = schemer + has_trait = peasant_leader + has_trait = augustus + has_trait = contrite + has_trait = august + has_trait = diplomat + } + } + stress_impact = { + just = medium_stress_impact_gain + trusting = minor_stress_impact_gain + temperate = minor_stress_impact_gain + patient = minor_stress_impact_gain + shy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + + every_powerful_vassal = { + limit = { faith = root.faith } + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + } + + random_list = { + 85 = { + hidden_effect = { + scope:fps_2008_misdeed_actor = { save_temporary_scope_as = assassin } # Used for loc + send_interface_toast = { + type = event_toast_effect_good + title = char_interaction.0050.a + left_icon = scope:fps_2008_misdeed_actor + + capital_county = { + add_county_modifier = { + modifier = governance_1054_satisfied_peasants_modifier + years = 15 + } + } + scope:assassin = { custom_tooltip = hold_court.8221.imprison_alone } # This uses that loc + hidden_effect = { + rightfully_imprison_character_effect = { # The autoformatter was a bit (very, very) fiddly with this + TARGET = scope:fps_2008_misdeed_actor + IMPRISONER = root + } + } + } + } + scope:fps_2008_misdeed_actor = { + add_opinion = { + target = root + modifier = publicly_ridiculed + opinion = -30 + } + } + show_as_tooltip = { + rightfully_imprison_character_effect = { + TARGET = scope:fps_2008_misdeed_actor + IMPRISONER = root + } + capital_county = { + add_county_modifier = { + modifier = governance_1054_satisfied_peasants_modifier + years = 15 + } + } + } + } + 15 = { + scope:fps_2008_misdeed_actor = { + add_opinion = { + target = root + modifier = publicly_ridiculed + opinion = -80 + } + } + if = { + limit = { has_trait = sadistic } # Once again, rewarding physcos with little details + send_interface_toast = { + type = event_toast_effect_good + title = char_interaction.0050.a + left_icon = scope:fps_2008_misdeed_actor + + scope:fps_2008_misdeed_actor = { death = { death_reason = death_beaten_by_mob } } + capital_county = { + add_county_modifier = { + modifier = governance_1054_satisfied_peasants_modifier + years = 30 + } + } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_bad + title = char_interaction.0050.a + left_icon = scope:fps_2008_misdeed_actor + + scope:fps_2008_misdeed_actor = { death = { death_reason = death_beaten_by_mob } } + capital_county = { + add_county_modifier = { + modifier = governance_1054_satisfied_peasants_modifier + years = 30 + } + } + } + } + } + } + } + + option = { # Imprison chaplain outright + name = fp2_struggle.2008.a + stress_impact = { trusting = minor_stress_impact_gain } + + rightfully_imprison_character_effect = { + TARGET = scope:fps_2008_misdeed_actor + IMPRISONER = root + } + if = { + limit = { + scope:fps_2008_misdeed_actor = cp:councillor_court_chaplain + exists = scope:fp2_2008_relevant_head_of_faith + } + scope:fps_2008_misdeed_actor.faith = { + religious_head = { + add_opinion = { + target = root + modifier = rude_opinion + opinion = -10 + } + } + } + } + + scope:fp2_2008_capital = { + add_county_modifier = { + modifier = fp2_improved_administrative_checks_modifier + years = 15 + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.85 + ai_zeal = 0.3 + } + } + } + + + # Threaten, gain hook and modifier for work harder + option = { # Combined general output (threaten into teaching you how to forge like they do) + name = fp2_struggle.2008.b.a + flavor = fp2_struggle.2008.b.flavor + stress_impact = { + just = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + + send_interface_toast = { + type = event_toast_effect_good + title = yearly_0001_improved_intrigue + left_icon = ROOT + right_icon = scope:fps_2008_misdeed_actor + + add_intrigue_lifestyle_xp = major_lifestyle_experience # Originally it gave you the accomplished forger perk. Was removed because it let you bypass the learning tree. + } + reverse_add_opinion = { + target = scope:fps_2008_misdeed_actor + modifier = extorted_me_opinion + opinion = -25 + years = 10 + } + + scope:fps_2008_misdeed_actor = { + progress_towards_rival_effect = { + REASON = rival_defrauded_realm + CHARACTER = root + OPINION = 0 + } + } + + if = { # Has its own notification + limit = { + can_add_hook = { + target = scope:fps_2008_misdeed_actor + type = threat_hook + } + } + add_hook = { + target = scope:fps_2008_misdeed_actor + type = threat_hook + years = 7 + } + } + + ai_chance = { base = 0 } # AI should never use these OP options + } + + + option = { # Go hand in hand stealing state money + name = fp2_struggle.2008.c + flavor = fp2_struggle.2008.c.flavor + + stress_impact = { + just = medium_stress_impact_gain + zealous = minor_stress_impact_gain + } + + scope:fp2_2008_capital = { + add_county_modifier = { + modifier = county_corruption_inefficient_tax_collection_modifier + years = 15 + } + } + + scope:fps_2008_misdeed_actor = { + if = { + limit = { + can_add_hook = { + target = root + type = minor_crime_accomplice_hook + } + } + + if = { + limit = { root = { scope:fps_2008_misdeed_actor = cp:councillor_steward } } # CPs cannot have CPs, therefore must be rescoped into root to access + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + add_hook = { + target = root + type = minor_crime_accomplice_hook + years = 15 + } + } + } + if = { + limit = { + can_add_hook = { + target = scope:fps_2008_misdeed_actor + type = minor_crime_accomplice_hook + } + } + add_hook = { + target = scope:fps_2008_misdeed_actor + type = minor_crime_accomplice_hook + years = 15 + } + } + add_gold = medium_gold_value + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.95 + ai_energy = 0.25 + } + } + } +} + +################################### +# Thiefs of Garduna / Catching Thieves of Myth +# By Hugo Cortell +################################### +fp2_struggle.2009 = { + type = character_event + title = fp2_struggle.2009.t + desc = fp2_struggle.2009.desc + + theme = intrigue_skulduggery_focus + cooldown = { years = 150 } # Not actually necessary but adding anyway + override_background = { reference = corridor_night } + left_portrait = { + character = scope:fp2_2009_marshal + animation = marshal + outfit_tags = { emotion_angry_decal } # WAD, the decal does render and functions as intended + } + lower_left_portrait = { + character = root + } + right_portrait = { + character = scope:fp2_2009_garduna_young_thief + animation = fear + hide_info = yes + outfit_tags = { + mena_stealth_hood + religious_zoroastrian_high_clothes + } + } + + trigger = { + is_ai = no + has_fp2_dlc_trigger = yes + top_liege = this + exists = cp:councillor_marshal + fp2_character_any_involvement_iberian_struggle_trigger = yes + + exists = struggle:iberian_struggle + exists = primary_title + struggle:iberian_struggle = { + any_involved_ruler = { # Redundancy check in response to errors on automated tests, should (theoretically) not be necessary + this != root # Alternative point of failure could be "this" being null, but that would cause errors outside my event. + exists = primary_title + top_liege = this + primary_title = { is_mercenary_company = no } + is_landed = yes + count > 1 # Redundancy check in response to more errors on nigtly. Now on the bottom of the block. Reduced by one to total 3. + } + + OR = { + is_struggle_phase = struggle_iberia_phase_opportunity + is_struggle_phase = struggle_iberia_phase_conciliation + } + } + + realm_size > 3 # Needed to get all the realms where corruption can happen + } + + weight_multiplier = { + base = 0.5 + modifier = { + add = 0.5 + is_ai = no + } + } + + immediate = { + struggle:iberian_struggle = { # Struggle existance is already verified by event trigger + random_involved_ruler = { + limit = { + this != root # Otherwise you might be the other involved ruler + exists = primary_title + top_liege = this + primary_title = { is_mercenary_company = no } + is_landed = yes + } + save_scope_as = fp2_2009_involved_ruler + } + } + cp:councillor_marshal = { save_scope_as = fp2_2009_marshal } + create_character = { + age = { 16 27 } + location = root.location + gender_female_chance = 30 + trait = education_intrigue_2 + trait = shy + trait = honest + trait = paranoid + random_traits = yes + diplomacy = { 2 7 } + martial = { 3 6 } + stewardship = { 4 7 } + intrigue = { 8 22 } + culture = culture:basque + faith = faith:catholic + dynasty = none + after_creation = { add_gold = minor_gold_value } + + save_scope_as = fp2_2009_garduna_young_thief + } + + if = { + limit = { + exists = global_var:fp2_struggle_2009_thief_king_char + global_var:fp2_struggle_2009_thief_king_char = { is_available_ai_adult = yes } + } + global_var:fp2_struggle_2009_thief_king_char = { save_scope_as = fp2_2009_garduna_guild_master } + } + else = { + create_character = { # Guild Master + age = { 24 52 } + location = scope:fp2_2009_involved_ruler.location + gender_female_chance = { + if = { + limit = { scope:fp2_2009_involved_ruler.location.county.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:fp2_2009_involved_ruler.location.county.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + trait = education_intrigue_4 + trait = deceitful + trait = shrewd + random_traits = yes + diplomacy = { 6 16 } + martial = { 8 15 } + stewardship = { 10 17 } + intrigue = { 8 16 } + culture = culture:basque + faith = faith:catholic + dynasty = none + after_creation = { + add_gold = major_gold_value + add_prestige = major_prestige_gain + add_piety = minor_piety_gain + random = { + chance = 10 + add_trait = one_eyed + } + random = { + chance = 10 + add_trait = one_legged + } + random = { + chance = 5 + add_trait = schemer + } + random = { + chance = 33 + add_trait = wild_oat + } + if = { + limit = { is_female = yes } + give_nickname = nick_the_Queen_of_Thieves + } + else = { give_nickname = nick_the_King_of_Thieves } + } + + save_scope_as = fp2_2009_garduna_guild_master + } + } + set_global_variable = { + name = fp2_struggle_2009_thief_king_char + value = scope:fp2_2009_garduna_guild_master + } + + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = fp2_2009_roco_executioner + } + } + + # Get locations + root.capital_county = { save_scope_as = fp2_2009_capital_county } + scope:fp2_2009_involved_ruler.capital_county = { save_scope_as = fp2_2009_involved_capital_county } + random_sub_realm_county = { + limit = { this != scope:fp2_2009_capital_county } + save_scope_as = fp2_2009_random_flavor_county_ichi + } + random_sub_realm_county = { + limit = { + NOT = { + this = scope:fp2_2009_capital_county + this = scope:fp2_2009_random_flavor_county_ichi + } + } + save_scope_as = fp2_2009_random_flavor_county_ni + } + + # Logic for "Hire the guild" option, prevents the AI from acting un-wise + if = { # Player has access by default + limit = { is_ai = no } + save_scope_as = fp2_2009_hire_guild_unlocked + } + else_if = { # Forbid AI on AI agression + limit = { + NOT = { + is_ai = yes + scope:fp2_2009_involved_ruler = { is_ai = yes } + } + } + save_scope_as = fp2_2009_hire_guild_unlocked + } + else_if = { # Ensure AI on Player agression is justified + limit = { + is_ai = yes + scope:fp2_2009_involved_ruler = { + is_ai = no + save_temporary_opinion_value_as = { + name = opinion_of_root_temp_value + target = root + } + } + + # AI behaviour must be on brand with personality and/or circumstance to ensure narrative cohesion + scope:opinion_of_root_temp_value < -10 + OR = { + has_trait = deceitful + has_trait = wrathful + has_trait = ambitious + has_trait = vengeful + has_trait = arrogant + has_trait = callous + is_at_war_with = scope:fp2_2009_involved_ruler + has_relation_nemesis = scope:fp2_2009_involved_ruler + } + } + save_scope_as = fp2_2009_hire_guild_unlocked + } + } + + option = { # BECOME THE KING OF PIRA- err THIEVES!!1! + name = fp2_struggle.2009.a + flavor = fp2_struggle.2009.a.flavor + trigger = { + NOT = { age < 14 } + OR = { + has_trait = gallant + has_trait = adventurer + has_trait = berserker + has_trait = peasant_leader + has_trait = viking + has_trait = reaver + prowess > very_high_skill_rating + has_trait = lunatic_genetic + } + } + scope:fp2_2009_marshal = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + } + trigger_event = { + id = fp2_struggle.2010 + days = { 6 31 } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + craven = minor_stress_impact_gain + content = medium_stress_impact_gain + eccentric = medium_stress_impact_loss + } + + ai_chance = { + base = 8 # Prevents too many kings of thieves from showing up + modifier = { + add = 25 + has_trait = just + } + ai_value_modifier = { + ai_boldness = 0.7 + ai_compassion = -0.1 + ai_greed = 0.3 + ai_energy = 0.5 + ai_honor = -0.1 + ai_rationality = -0.2 + ai_sociability = 0.3 + ai_vengefulness = 0.5 + } + } + } + + option = { # Demand info + name = fp2_struggle.2009.b + + hidden_effect = { + scope:fp2_2009_garduna_young_thief = { add_trait = depressed_1 } + save_scope_as = fp2_2009_thief_permanence_scope + } + + every_sub_realm_county = { + limit = { + county_control < 100 + } + custom = all_realm_county + change_county_control = 5 + } + add_courtier = scope:fp2_2009_garduna_young_thief + scope:fp2_2009_garduna_young_thief = { + custom_tooltip = fp2_struggle.2009.b.blues + add_opinion = { + target = root + modifier = was_spared + opinion = 20 + } + } + + stress_impact = { + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 45 + ai_value_modifier = { + ai_boldness = -0.1 + ai_compassion = 0.65 + ai_honor = 0.2 + ai_rationality = 0.9 + } + } + + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:cleared_out + } + trigger_event = { + id = fp2_struggle.2021 + days = { 450 3000 } + } + } + } + + option = { # Ask for a cut + name = fp2_struggle.2009.c + trigger = { + is_ai = no # Option disabled for AI rulers + NOR = { + has_trait = gallant + has_trait = adventurer + has_trait = berserker + has_trait = peasant_leader + has_trait = viking + has_trait = reaver + prowess > very_high_skill_rating + has_trait = lunatic_genetic + } + } + + add_gold = medium_gold_value + scope:fp2_2009_capital_county = { add_thieves_guild_modifier_effect = yes } + scope:fp2_2009_random_flavor_county_ichi = { change_county_control = -15 } + scope:fp2_2009_random_flavor_county_ni = { change_county_control = -15 } + + scope:fp2_2009_marshal = { + if = { + limit = { has_trait = just } + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -35 + } + } + else = { + if = { + limit = { has_trait = greedy } + add_opinion = { + target = root + modifier = respect_opinion # Greedy people respect "the grind" + opinion = 10 + } + } + else = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + } + } + + stress_impact = { + generous = medium_stress_impact_gain + content = minor_stress_impact_gain + just = major_stress_impact_gain + } + + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:paid_off + } + trigger_event = { + id = fp2_struggle.2021 + days = { 450 3000 } + } + } + } + + option = { # Hire the guild to mess with a foreign ruler (work for me) + name = fp2_struggle.2009.d + trigger = { exists = scope:fp2_2009_hire_guild_unlocked } # Prevents AI from acting un-intelligently + + scope:fp2_2009_involved_capital_county = { add_thieves_guild_modifier_effect = yes } + pay_short_term_gold = { + target = scope:fp2_2009_garduna_young_thief + gold = minor_gold_value + + } + + # Notifies the player on the recieving end of an event outcome that involves them. + scope:fp2_2009_involved_ruler = { # Hopefuly this will encoureage interaction in MP games. + trigger_event = { + id = fp2_struggle.2012 + days = { 1 2 } + } + } + + stress_impact = { + brave = minor_stress_impact_gain + honest = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + add = 45 + is_at_war_with = scope:fp2_2009_involved_ruler + } + modifier = { + add = 100 # hatred can cloud the mind + has_relation_nemesis = scope:fp2_2009_involved_ruler + } + ai_value_modifier = { + ai_boldness = 0.7 + ai_compassion = -0.2 + ai_greed = -0.1 + ai_honor = -0.4 + ai_rationality = 0.7 + ai_vengefulness = 0.95 + } + } + + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:worked_together + } + trigger_event = { + id = fp2_struggle.2021 + days = { 450 3000 } + } + } + } + + option = { # Gift the thieve's the head to the foreign ruler + name = fp2_struggle.2009.e + + scope:fp2_2009_garduna_young_thief = { + if = { + limit = { exists = scope:fp2_2009_roco_executioner } # ROCO flaire + death = { + death_reason = death_execution + killer = scope:fp2_2009_roco_executioner + } + } + else = { + death = { + death_reason = death_execution + killer = scope:fp2_2009_marshal + } + } + save_scope_as = fp2_2009_thief_permanence_scope + } + custom_tooltip = fp2_struggle.2009.e.a + hidden_effect = { + random_list = { + 55 = {} # nothing happens + 45 = { + random_list = { + 33 = { scope:fp2_2009_random_flavor_county_ichi = { change_county_control = -15 } } + 33 = { scope:fp2_2009_random_flavor_county_ni = { change_county_control = -15 } } + 33 = { scope:fp2_2009_capital_county = { change_county_control = -15 } } + } + } + } + } + + scope:fp2_2009_involved_ruler = { + if = { + limit = { + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = sadistic + } + } + add_opinion = { + target = root + modifier = gift_opinion + opinion = 40 + } + progress_towards_friend_effect = { # very nice + REASON = friend_gave_severed_head + CHARACTER = root + OPINION = 0 + } + } + else = { + add_opinion = { + target = root + modifier = gift_opinion # nice + opinion = 30 + } + } + } + + # Notifies the player on the recieving end that they have recieved a delightful gift + root = { save_scope_as = fp2_2009_has_gifted_head } + scope:fp2_2009_involved_ruler = { + trigger_event = { + id = fp2_struggle.2012 + days = { 1 2 } + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 35 + ai_value_modifier = { + ai_boldness = 0.2 + ai_compassion = -0.45 + ai_honor = 0.8 + ai_rationality = 0.1 + ai_sociability = 0.5 + } + } + + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:lobbed_head + } + trigger_event = { + id = fp2_struggle.2021 + days = { 450 3000 } + } + } + } + + option = { # Debug option to quickly trigger 2021 + name = debug_generic_option + trigger = { is_developer_testing_trigger = yes } + + custom_tooltip = debug_generic_option_shortened_trigger_can_disable + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:cleared_out # modify this with the flag you need + } + trigger_event = { id = fp2_struggle.2021 } + } + } + + after = { + if = { + limit = { NOT = { exists = scope:fp2_2009_thief_permanence_scope } } + scope:fp2_2009_garduna_young_thief = { silent_disappearance_effect = yes } + } + } +} + +fp2_struggle.2010 = { # 2009 duel follow-up + type = character_event + title = fp2_struggle.2010.t + desc = fp2_struggle.2010.desc + trigger = { scope:fp2_2009_garduna_guild_master = { is_available_ai_adult = yes } } + + theme = battle + override_background = { reference = corridor_night } + left_portrait = { + character = root + animation = throne_room_one_handed_passive_1 + } + right_portrait = { + character = scope:fp2_2009_garduna_guild_master + animation = war_over_win + outfit_tags = { + western_stealth_hood + sub_saharan_high_nobility + mena_war_legwear + } + } + + option = { # Duel + name = fp2_struggle.2010.b + + root = { save_scope_as = fp2_2010_root_in_duel } # Used in invalidation check for player's death + scope:fp2_2009_garduna_guild_master = { + set_variable = { + name = signature_weapon + value = flag:dagger + } + } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:fp2_2009_garduna_guild_master + FATALITY = always + FIXED = no + LOCALE = temple + OUTPUT_EVENT = fp2_struggle.2011 + INVALIDATION_EVENT = fp2_struggle.2011 # If the thief dies, you still win. If you die, 2011 runs a check and fails to trigger. + } + + ai_chance = { # Stress for craven was already taken when setting off in this quest + base = 50 + ai_value_modifier = { ai_boldness = 0.5 } + } + } + + option = { # Pay protection money + name = fp2_struggle.2010.c + + pay_treasury_or_gold = { # Cowardice tax (costs more than hireing them) + target = scope:fp2_2009_garduna_guild_master + value = major_treasury_or_gold_value + } + + stress_impact = { + brave = major_stress_impact_gain + just = major_stress_impact_gain + arrogant = major_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { # Nobody wants to be indebted to a thief + add = -25 + gold < major_gold_value + } + ai_value_modifier = { ai_greed = -0.5 } + } + + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:paid_off + } + trigger_event = { + id = fp2_struggle.2021 + days = { 450 3000 } + } + } + } +} + +fp2_struggle.2011 = { # You become the KING OF THIEVES + hidden = yes + immediate = { + if = { + limit = { + exists = scope:fp2_2011_reuse_gate + root = scope:fp2_2010_root_in_duel + } + send_interface_toast = { + type = event_toast_effect_good + desc = fp2_struggle.2011.desc + title = fp2_struggle.2011.a + right_icon = ROOT + + if = { # Standard practice from EP1 onwards dictates that we ought not to overwrite positive nicknames (?) + limit = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + give_nickname = nick_the_Thief_Slayer + } + add_prestige = major_prestige_gain + add_gold = minor_gold_value + } + } + else = { + save_scope_as = fp2_2011_reuse_gate + trigger_event = { + id = fp2_struggle.2011 + days = 1 + } + } + } +} + +fp2_struggle.2012 = { # Displays letter notifying involved player/character that an action taken by 2009's root is affecting them + type = letter_event + sender = scope:fp2_2012_sender # Animation is WAD + opening = { + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:fp2_2009_has_gifted_head } + desc = fp2_struggle.2012.t.alt + } + desc = fp2_struggle.2012.t + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:fp2_2009_has_gifted_head } + desc = fp2_struggle.2012.desc.alt + } + desc = fp2_struggle.2012.desc + } + } + + immediate = { + # Logic for deciding who is the author of the letter + if = { + limit = { exists = scope:fp2_2009_has_gifted_head } # If the event is the alt version where you gift the head + scope:fp2_2009_has_gifted_head = { save_scope_as = fp2_2012_sender } + } + else_if = { + limit = { exists = cp:councillor_spymaster } # Else cycle through possible chancellors + cp:councillor_spymaster = { save_scope_as = fp2_2012_sender } + } + else_if = { + limit = { exists = cp:councillor_marshal } + cp:councillor_marshal = { save_scope_as = fp2_2012_sender } + } + else_if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = fp2_2012_sender } + } + else = { root = { save_scope_as = fp2_2012_sender } } # If all fails, you wrote the report yourself, about yourself, for yourself. + } + + option = { + name = fp2_struggle.2012.a + trigger = { NOT = { exists = scope:fp2_2009_has_gifted_head } } + + show_as_tooltip = { scope:fp2_2009_involved_capital_county = { add_thieves_guild_modifier_effect = yes } } # Has already happened, only to display info + } + + option = { + name = fp2_struggle.2012.a.alt + trigger = { exists = scope:fp2_2009_has_gifted_head } + + scope:fp2_2009_involved_capital_county = { change_county_control = 10 } + } +} + +################################### +# The Secret to Freedom +# By Hugo Cortell +################################### +fp2_struggle.2013 = { + type = character_event + title = fp2_struggle.2013.t + desc = fp2_struggle.2013.desc + theme = secret + cooldown = { years = 2 } + override_background = { + trigger = { scope:fp2_2013_prisoner_with_a_secret = { is_in_prison_type = house_arrest } } + reference = sitting_room + } + override_background = { + trigger = { always = yes } + reference = dungeon + } + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:fp2_2013_prisoner_with_a_secret + triggered_animation = { + trigger = { scope:fp2_2013_prisoner_with_a_secret = { is_in_prison_type = house_arrest } } + animation = beg + } + animation = prisondungeon + override_imprisonment_visuals = yes + } + + trigger = { + has_fp2_dlc_trigger = yes + any_prisoner = { + save_temporary_scope_as = temp_prisoner_with_secret # Prevents prisoner from revealing their own secret, which would be cool, but would require new loc + any_known_secret = { + secret_owner = { + this != scope:temp_prisoner_with_secret + top_liege = this + fp2_character_any_involvement_iberian_struggle_trigger = yes + } + NOT = { is_known_by = root } + } + } + } + + immediate = { + random_prisoner = { + limit = { + save_temporary_scope_as = temp_prisoner_with_secret + any_known_secret = { + secret_owner = { + this != scope:temp_prisoner_with_secret + top_liege = this + fp2_character_any_involvement_iberian_struggle_trigger = yes + } + NOT = { is_known_by = root } + } + } + save_scope_as = fp2_2013_prisoner_with_a_secret + every_known_secret = { + limit = { + secret_owner = { + this != scope:fp2_2013_prisoner_with_a_secret + top_liege = this + } + NOT = { is_known_by = root } + } + secret_owner = { save_scope_as = fp2_2013_secret_owner } + save_scope_as = fp2_2013_secret_to_tell + } + + stress_impact = { + brave = medium_stress_impact_gain + gallant = medium_stress_impact_gain + confider = major_stress_impact_gain + } + } + } + + option = { # Agree + name = fp2_struggle.2013.a + + show_as_tooltip = { + custom_tooltip = fp2_struggle.2013.a.a + scope:fp2_2013_prisoner_with_a_secret = { release_from_prison = yes } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = witch.2010.message + left_icon = ROOT + right_icon = scope:fp2_2013_secret_owner + + scope:fp2_2013_secret_to_tell = { reveal_to = root } + scope:fp2_2013_prisoner_with_a_secret = { release_from_prison = yes } + } + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_boldness = -0.1 + ai_compassion = 0.2 + ai_honor = 0.1 + ai_rationality = 0.4 + ai_sociability = 0.1 + ai_vengefulness = 0.1 + } + } + } + + option = { # Torture + name = fp2_struggle.2013.b + + add_dread = minor_dread_gain + duel = { + skill = intrigue + value = medium_skill_rating + + 40 = { # Success + modifier = { + add = intrigue # Your intrigue level should make up for most of the 10 missing points to make this a 50 50 + always = yes + } + modifier = { + add = 15 # Enjoy your job and it wont feel like work! + has_trait = sadistic + } + modifier = { + add = 35 + has_trait = torturer + } + modifier = { + add = 5 # Iberia is home to many plants you should not rub against your skin, great for tickle-torture :D + has_trait = lifestyle_herbalist + } + modifier = { + add = 5 + scope:fp2_2013_prisoner_with_a_secret = { has_trait = lazy } + } + modifier = { + add = 15 # Quickly changes their mind about wanting to resist torture + scope:fp2_2013_prisoner_with_a_secret = { has_trait = fickle } + } + + custom_tooltip = fp2_struggle.2013.a.a + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = witch.2010.message + left_icon = ROOT + right_icon = scope:fp2_2013_secret_owner + + scope:fp2_2013_secret_to_tell = { reveal_to = root } + } + } + } + 60 = { # You fail + desc = fp2_struggle.2013.b.b + modifier = { + add = scope:fp2_2013_prisoner_with_a_secret.prowess # This is a battle of your skill in torture (intrigue) against the will of your oponent (prowess, usually lower) + always = yes + } + modifier = { + add = 5 + scope:fp2_2013_prisoner_with_a_secret = { has_trait = brave } + } + modifier = { + add = 5 # Being stubborn is as much a blessing as it is a curse, in this case, it is the former + scope:fp2_2013_prisoner_with_a_secret = { has_trait = stubborn } + } + modifier = { + add = 5 + scope:fp2_2013_prisoner_with_a_secret = { has_trait = diligent } + } + modifier = { + add = 5 # They know nothing good can come from revealing information, what will the bargain with otherwise? + scope:fp2_2013_prisoner_with_a_secret = { has_trait = paranoid } + } + modifier = { + add = 2 # Maybe god is still on your side? Maybe it is a test? + scope:fp2_2013_prisoner_with_a_secret = { has_trait = zealous } + } + modifier = { + add = 2 + scope:fp2_2013_prisoner_with_a_secret = { has_trait = callous } + } + modifier = { + add = 15 # I imagine this is sort of a lalatina moment + scope:fp2_2013_prisoner_with_a_secret = { has_trait = flagellant } + } + modifier = { + add = 10 # They are used to not revealing info under preassure, though torture is a bit more than they are used to... + scope:fp2_2013_prisoner_with_a_secret = { has_trait = confider } + } + + send_interface_toast = { + type = event_toast_effect_bad + title = ease_tension_toast.failure + left_icon = ROOT + right_icon = scope:fp2_2013_prisoner_with_a_secret + } + } + } + reverse_add_opinion = { + target = scope:fp2_2013_prisoner_with_a_secret + modifier = tortured_me + opinion = -60 # 15 point reduction because there was a weak justification + years = 30 + } + scope:fp2_2013_prisoner_with_a_secret = { + add_character_modifier = { + modifier = recently_tortured + years = 5 + } + } + + stress_impact = { + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 15 + modifier = { + add = 25 + has_trait = torturer + } + modifier = { + add = 15 + has_trait = sadistic + } + ai_value_modifier = { + ai_boldness = 0.8 + ai_compassion = -0.5 + ai_greed = 0.6 + ai_honor = -0.9 + ai_vengefulness = 0.2 + } + } + } + + option = { # Send as gift + name = fp2_struggle.2013.c + flavor = fp2_struggle.2013.c.desc + trigger = { scope:fp2_2013_secret_owner = { is_ai = yes } } + + custom_tooltip = fp2_struggle.2013.c.a + scope:fp2_2013_prisoner_with_a_secret = { release_from_prison = yes } + trigger_event = { + id = fp2_struggle.2014 + days = { 1 4 } + } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_boldness = -0.1 + ai_compassion = 0.2 + ai_greed = -0.5 + ai_energy = -0.1 + ai_honor = 0.3 + ai_sociability = 0.3 + ai_vengefulness = -0.2 + ai_zeal = -0.1 + } + } + } + + option = { # Dismiss + name = fp2_struggle.2013.d + + random = { + chance = 5 + modifier = { + add = 10 + has_trait = depressed + } + modifier = { + add = 5 + health < fine_health + } + show_as_tooltip = { custom_tooltip = fp2_struggle.2013.a.a } + hidden_effect = { + if = { + limit = { is_ai = no } + send_interface_toast = { + type = event_toast_effect_good + title = witch.2010.message + left_icon = ROOT + right_icon = scope:fp2_2013_secret_owner + + scope:fp2_2013_secret_to_tell = { reveal_to = root } + } + } + } + } + + ai_chance = { + base = 65 + ai_value_modifier = { + ai_boldness = -0.2 + ai_greed = -0.15 + ai_energy = -0.1 + ai_honor = 0.6 + ai_sociability = 0.1 + ai_vengefulness = -0.1 + } + } + } +} + +fp2_struggle.2014 = { + type = letter_event + sender = scope:fp2_2013_secret_owner + opening = fp2_struggle.2014.t + desc = { + desc = fp2_struggle.2014.desc.start + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2014_ai_secret_outcome = flag:prison } + desc = fp2_struggle.2014.desc.heavy.outcome.prison + } + triggered_desc = { + trigger = { scope:fp2_2014_ai_secret_outcome = flag:death } + desc = fp2_struggle.2014.desc.heavy.outcome.death + } + desc = fp2_struggle.2014.desc.light + } + } + + trigger = { + scope:fp2_2013_secret_owner = { is_available_ai_adult = yes } + scope:fp2_2013_prisoner_with_a_secret = { is_available_ai_adult = yes } + } + + on_trigger_fail = { + if = { + limit = { # Fallback - foreign ruler has died! + NOT = { + scope:fp2_2013_secret_owner = { + is_alive = yes + is_available_ai_adult = yes + } + } + } + send_interface_toast = { + type = event_death_neutral + desc = death_management.1007.t + left_icon = scope:fp2_2013_secret_owner + } + } + if = { + limit = { # Fallback - prisoner has died! + NOT = { scope:fp2_2013_prisoner_with_a_secret = { is_alive = yes } } + } + send_interface_toast = { + scope:fp2_2013_prisoner_with_a_secret = { save_temporary_scope_as = dead_character } + type = event_death_neutral + desc = death_management.1006.desc + left_icon = scope:fp2_2013_prisoner_with_a_secret + } + } + } + + immediate = { # LOGIC FOR AI RESPONSE + save_scope_value_as = { # Calculate how "strong" a secret is + name = fp2_2014_secret_strength + value = { + value = 0 + if = { + limit = { scope:fp2_2013_secret_to_tell = { is_criminal_for = scope:fp2_2013_secret_owner } } + add = 10 + } + if = { + limit = { scope:fp2_2013_secret_to_tell = { is_shunned_for = scope:fp2_2013_secret_owner } } + add = 5 + } + if = { + limit = { scope:fp2_2013_secret_to_tell = { secret_is_always_interesting_trigger = yes } } + add = 5 + } + } + } + if = { # IS THIS SECRET A THREAT TO ME? + limit = { scope:fp2_2014_secret_strength >= 10 } + scope:fp2_2013_secret_owner = { + hidden_effect = { + add_opinion = { + target = scope:fp2_2013_prisoner_with_a_secret + modifier = betrayed_me_opinion + opinion = -50 + } + } + add_opinion = { + target = root + modifier = did_not_tell_my_secret + opinion = 45 + } + progress_towards_friend_effect = { + REASON = friend_kept_my_secret + CHARACTER = root + OPINION = 0 + } + if = { + limit = { + has_dlc_feature = court_artifacts + any_character_artifact = { + NOT = { has_variable = historical_unique_artifact } + artifact_high_rarity_trigger = yes + } + } + random_character_artifact = { + limit = { + NOT = { has_variable = historical_unique_artifact } + artifact_high_rarity_trigger = yes + } + set_owner = root # If it breaks, use set_artifact_owner + } + } + + save_opinion_value_as = { + name = fp2_2014_opinion_of_swine + target = scope:fp2_2013_prisoner_with_a_secret + } + } + if = { # YES, AND I MUST HIDE IT (prison outcome) + limit = { + scope:fp2_2013_secret_owner = { + NAND = { + has_trait = paranoid + ai_compassion < 30 + } + } + } + save_scope_value_as = { + name = fp2_2014_ai_secret_outcome + value = flag:prison + } + scope:fp2_2013_secret_owner = { + rightfully_imprison_character_effect = { + TARGET = scope:fp2_2013_prisoner_with_a_secret + IMPRISONER = scope:fp2_2013_secret_owner + } + } + } + else = { # YES, AND I WILL TAKE NO CHANCES (execution outcome) + save_scope_value_as = { + name = fp2_2014_ai_secret_outcome + value = flag:death + } + + scope:fp2_2013_prisoner_with_a_secret = { + death = { + death_reason = death_torture + killer = scope:fp2_2013_secret_owner + } + } + } + } + else = { # NO, ACTUALLY THIS IS NOT A BIG DEAL (release outcome) + scope:fp2_2013_secret_owner = { + hidden_effect = { + add_opinion = { + target = scope:fp2_2013_prisoner_with_a_secret + modifier = betrayed_me_opinion + opinion = -25 + } + } + add_opinion = { + target = root + modifier = did_not_tell_my_secret + opinion = 25 + } + if = { + limit = { + has_dlc_feature = court_artifacts + any_character_artifact = { + NOT = { has_variable = historical_unique_artifact } + artifact_low_rarity_trigger = yes + } + } + random_character_artifact = { + limit = { + NOT = { has_variable = historical_unique_artifact } + artifact_low_rarity_trigger = yes + } + set_owner = root + } + } + else = { + progress_towards_friend_effect = { + REASON = friend_protected_secrets + CHARACTER = root + OPINION = 0 + } + } + } + save_scope_value_as = { + name = fp2_2014_ai_secret_outcome + value = flag:release + } + } + } + + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { NOT = { scope:fp2_2014_ai_secret_outcome = flag:release } } + desc = south_asia.0039.a + } + desc = fp2_struggle.2014.b + } + } + } + } +} + +################################### +# Letter on The Back +# By Hugo Cortell +################################### +# (a post-it saying kick me) +################################### +scripted_trigger fp2_struggle_2015_vassal_check_trigger = { + is_available_ai_adult = yes + exists = location # Under no circumstance should it be necessary to need to check this + NOT = { has_trait = compassionate } +} + +fp2_struggle.2015 = { + type = character_event + title = fp2_struggle.2015.t + desc = fp2_struggle.2015.desc + cooldown = { years = 25 } + + theme = murder_scheme + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = chancellor + } + right_portrait = { + character = scope:fp2_struggle_2015_peasant_to_murder + animation = personality_forgiving + } + lower_right_portrait = scope:fp2_struggle_2015_murder_requester_vassal + + trigger = { + is_ai = no # Murder schemes are heavy for performance + has_fp2_dlc_trigger = yes + root.top_liege = root + + any_powerful_vassal = { + fp2_struggle_2015_vassal_check_trigger = yes + opinion = { # Redundant second time around + target = root + value < 30 + } + } + } + + immediate = { + random_vassal = { # From joe + limit = { + is_powerful_vassal = yes + fp2_struggle_2015_vassal_check_trigger = yes + opinion = { + target = root + value < 30 + } + } + save_opinion_value_as = { + name = liege_opinion + target = root + } + + save_scope_as = fp2_struggle_2015_murder_requester_vassal # Makes sure that one exists, even if [ThreadIndex != UINT32_MAX] causes the loop to skip a beat + } + while = { + limit = { + any_powerful_vassal = { + fp2_struggle_2015_vassal_check_trigger = yes + opinion = { + target = root + value < scope:liege_opinion + } + } + } + random_vassal = { + limit = { + is_powerful_vassal = yes + fp2_struggle_2015_vassal_check_trigger = yes + opinion = { + target = root + value < scope:liege_opinion + } + } + save_opinion_value_as = { + name = liege_opinion + target = root + } + save_scope_as = fp2_struggle_2015_murder_requester_vassal + } + } + + create_character = { + location = scope:fp2_struggle_2015_murder_requester_vassal.location + template = generic_peasant_character + diplomacy = { 8 13 } # High stat + trait = trusting + random_traits = yes + faith = scope:fp2_struggle_2015_murder_requester_vassal.location.county.faith + culture = scope:fp2_struggle_2015_murder_requester_vassal.location.county.culture + save_scope_as = fp2_struggle_2015_peasant_to_murder + } + + hidden_effect = { + scope:fp2_struggle_2015_peasant_to_murder = { + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = annoyed_opinion + opinion = -100 + } + } + + add_courtier = scope:fp2_struggle_2015_peasant_to_murder + } + } + + option = { # Comply and kill the unsuspecting courtier + name = fp2_struggle.2015.a + + trigger = { is_ai = no } + duel = { + skill = intrigue + value = average_skill_rating + + 10 = { + desc = fp2_struggle.2015.a.a + compare_modifier = { + value = scope:duel_value + multiplier = -1.25 + } + + send_interface_toast = { + type = event_intrigue_bad + title = murder_outcome.2302.t + left_icon = scope:fp2_struggle_2015_peasant_to_murder + + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = disappointed_opinion + opinion = -15 + } + + remove_courtier_or_guest = scope:fp2_struggle_2015_peasant_to_murder + custom_tooltip = fp2_struggle.2015.a.murder_scheme + hidden_effect = { + scope:fp2_struggle_2015_murder_requester_vassal = { + start_scheme = { + type = murder + target_character = scope:fp2_struggle_2015_peasant_to_murder + } + } + } + } + reverse_add_opinion = { + target = scope:fp2_struggle_2015_peasant_to_murder + modifier = suspicion_opinion + opinion = -20 + } + + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.25 + } + + modifier = { + add = { + value = intrigue + multiply = 2 + round = yes + } + always = yes + } + modifier = { + add = 35 + has_trait = lifestyle_herbalist + } + modifier = { + add = 5 + has_trait = drunkard # You know how to disguise drinks + } + modifier = { + add = 15 + has_perk = swift_execution_perk + } + modifier = { + add = 10 # They add up + has_perk = a_job_done_right_perk + } + + send_interface_toast = { + type = event_intrigue_good + title = fp2_struggle.2015.a.b + left_icon = scope:fp2_struggle_2015_murder_requester_vassal + + scope:fp2_struggle_2015_peasant_to_murder = { + death = { + killer = ROOT + death_reason = death_poison + } + } + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = helped_me_in_time_of_need + opinion = 40 + } + } + add_secret = { + type = secret_murder + target = scope:fp2_struggle_2015_peasant_to_murder + } + random_secret = { + type = secret_murder + limit = { + secret_target = scope:fp2_struggle_2015_peasant_to_murder + } + save_scope_as = fp2_2015_murder_secret + } + + if = { # AHA! YOU FOOL! I TRICKED YOU INTO COMMITING A CRIME! + limit = { + scope:fp2_struggle_2015_murder_requester_vassal = { + OR = { + has_relation_rival = ROOT + has_secret_relation_rival = ROOT # ??? + has_relation_nemesis = ROOT + + AND = { + has_dread_level_towards = { + target = ROOT + level <= 1 + } + OR = { + AND = { + has_trait = deceitful + opinion = { + target = root + value < -25 + } + } + AND = { + ai_boldness > 9 + ai_compassion < 1 + ai_honor < -29 + ai_vengefulness > -1 + } + } + } + } + } + } + + trigger_event = { # Usually I would use a notification but... + id = fp2_struggle.2016 # The narrative impact of a full letter is greater, it makes sure the betrayal stings. This vassal wrote just to rub salt in your eyes. + days = { 3 4 } + } + } + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + gallant = minor_stress_impact_gain + } + } + + option = { # Ignore the letter + name = fp2_struggle.2015.b + + trigger = { is_ai = no } + send_interface_toast = { + type = event_toast_effect_good + title = murder_outcome.4302.t + left_icon = scope:fp2_struggle_2015_murder_requester_vassal + right_icon = scope:fp2_struggle_2015_peasant_to_murder + + show_as_tooltip = { add_courtier = scope:fp2_struggle_2015_peasant_to_murder } + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = broke_promise + } + } + + custom_tooltip = fp2_struggle.2015.a.murder_scheme + hidden_effect = { + scope:fp2_struggle_2015_murder_requester_vassal = { + start_scheme = { + type = murder + target_character = scope:fp2_struggle_2015_peasant_to_murder + } + } + } + } + + option = { # Warn the courtier about this (vassal may find out) + name = fp2_struggle.2015.c + + random_list = { + 75 = { + desc = fp2_struggle.2015.c.b + + send_interface_toast = { + type = event_intrigue_good + title = fp2_struggle.2015.c.b + left_icon = scope:fp2_struggle_2015_peasant_to_murder + right_icon = scope:fp2_struggle_2015_murder_requester_vassal + + scope:fp2_struggle_2015_peasant_to_murder = { silent_disappearance_effect = yes } + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = helped_me_in_time_of_need + opinion = 25 # -15 points for suspicion (where is the body?) + } + } + } + 25 = { + desc = fp2_struggle.2015.c.a + send_interface_toast = { + type = event_intrigue_bad + title = fp2_struggle.2015.c.a + left_icon = scope:fp2_struggle_2015_peasant_to_murder + right_icon = scope:fp2_struggle_2015_murder_requester_vassal + + scope:fp2_struggle_2015_peasant_to_murder = { death = { death_reason = death_mysterious } } + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = broke_promise + } + + stress_impact = { + forgiving = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + gallant = minor_stress_impact_gain + } + } + } + } + } +} + +fp2_struggle.2016 = { + type = letter_event + sender = scope:fp2_struggle_2015_murder_requester_vassal + opening = fp2_struggle.2016.t + desc = fp2_struggle.2016.desc + + option = { # Tricked, backstabbed and quite possibly, out-smarted by your cunning vassal/rival + name = fp2_struggle.2016.a + + hidden_effect = { scope:fp2_2015_murder_secret = { reveal_to = scope:fp2_struggle_2015_murder_requester_vassal } } + scope:fp2_struggle_2015_murder_requester_vassal = { + blackmail_target_with_secret_effect = { + SECRET = scope:fp2_2015_murder_secret + TARGET = ROOT + } + } + progress_towards_rival_effect = { + CHARACTER = scope:fp2_struggle_2015_murder_requester_vassal + REASON = rival_tricked_murder + OPINION = default_rival_opinion + } + add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = betrayed_me_opinion + opinion = -60 + } + } +} + +################################### +# RETURN OF THE THIEF KING +# By Hugo Cortell +################################### +# Directors liked the original very much +########################################## +fp2_struggle.2021 = { # Main event + type = character_event + title = fp2_struggle.2021.t + desc = { + desc = fp2_struggle.2021.desc + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2009_event_outcome = flag:cleared_out } + desc = fp2_struggle.2021.desc.alt.cutout + } + triggered_desc = { + trigger = { scope:fp2_2009_event_outcome = flag:paid_off } + desc = fp2_struggle.2021.desc.alt.paidoff + } + triggered_desc = { + trigger = { scope:fp2_2009_event_outcome = flag:worked_together } + desc = fp2_struggle.2021.desc.alt.work + } + triggered_desc = { + trigger = { scope:fp2_2009_event_outcome = flag:lobbed_head } + desc = fp2_struggle.2021.desc.alt.behead + } + } + desc = { desc = fp2_struggle.2021.desc.outro } + } + theme = secret + override_background = { + trigger = { scope:fp2_2009_event_outcome = flag:cleared_out } + reference = alley_day + } + override_background = { + trigger = { scope:fp2_2009_event_outcome = flag:paid_off } + reference = tavern + } + override_background = { + trigger = { scope:fp2_2009_event_outcome = flag:worked_together } + reference = throne_room + } + override_background = { + trigger = { scope:fp2_2009_event_outcome = flag:lobbed_head } + reference = alley_night + } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fp2_2009_garduna_guild_master + animation = scheme + outfit_tags = { + western_stealth_hood + sub_saharan_high_nobility + mena_war_legwear + } + } + + trigger = { + fp2_character_involved_in_struggle_trigger = yes # To check that the struggle is still going on + exists = primary_title + scope:fp2_2009_garduna_guild_master = { + is_available_ai_adult = yes + OR = { # Is this char still looking for adventure or have they settled down? + is_pool_character = yes + is_pool_guest = yes + } + } + } + + immediate = { + title:c_napoli.title_province = { # Originally, the thieves were going to set up a guild there, but thats not very nice. + county = { + save_scope_as = fp2_2021_old_napoly + holder.top_liege = { + save_scope_as = fp2_2021_angry_italian # So instead you just get an opinion debuff for narrative impact. + } # If this were not such a strange event, I would actually make it affect the character mechanically. But there is little excuse here. + } + } + + # Spy Network Logic, once upon a time used to be elegant. + if = { + limit = { exists = struggle:iberian_struggle } + struggle:iberian_struggle = { + if = { + limit = { # Theoretically, effects which do not meet its conditions (the limit) are skipped over. However, the nightly has proven that wrong. + any_involved_ruler = { # As such we take a _much_ more conservative approach of triple checking everything. + exists = primary_title + has_any_secrets = yes + this != root + } + } + random_involved_ruler = { + limit = { + exists = primary_title + has_any_secrets = yes + this != root + } + random_secret = { save_scope_as = fp2_2021_secreto_numero_ichi } + } + + if = { + limit = { + any_involved_ruler = { + exists = primary_title + has_any_secrets = yes + NOT = { + this = root + any_secret = { this = scope:fp2_2021_secreto_numero_ichi } + } + } + } + random_involved_ruler = { + limit = { + exists = primary_title + has_any_secrets = yes + NOT = { + this = root + any_secret = { this = scope:fp2_2021_secreto_numero_ichi } + } + } + random_secret = { save_scope_as = fp2_2021_secreto_numero_ni } + } + } + } + } + } + + if = { + limit = { exists = cp:councillor_spymaster } + cp:councillor_spymaster = { save_scope_as = fp2_2021_spymaster } + } + + hidden_effect = { # Hides exceptions from players, fix is not necessary + scope:fp2_2009_garduna_guild_master = { + save_scope_as = dueltarget # For Loc + move_to_pool_at = root.location # Fixes endless loop where the thief gets stretched across half the map + } + } + } + + option = { # Send off to italy + name = fp2_struggle.2021.a + + scope:fp2_2009_garduna_guild_master = { + pay_short_term_gold = { + target = ROOT + gold = minor_gold_value + } + } + custom_tooltip = fp2_struggle.2021.a.a + scope:fp2_2021_angry_italian = { + add_opinion = { + target = root + modifier = raided_me_opinion + opinion = -40 + } + } + + hidden_effect = { # Possible random outcomes + random_list = { + 10 = { # "Retires", buys a house in italy and lives as an old man happily ever after (just like your dog went to a farm when it got old) + scope:fp2_2009_garduna_guild_master = { silent_disappearance_effect = yes } + + modifier = { + add = 30 + scope:fp2_2009_event_outcome = flag:lobbed_head + } + modifier = { + add = 20 + scope:fp2_2009_event_outcome = flag:worked_together + } + } + 30 = { # He just sorta roams around italy + scope:fp2_2009_garduna_guild_master = { move_to_pool_at = scope:fp2_2021_angry_italian.location } + + modifier = { + add = 10 + scope:fp2_2009_event_outcome = flag:cleared_out + } + } + 10 = { # Joins napolitan court + scope:fp2_2009_garduna_guild_master = { remove_nickname = yes } # Becomes a functional member of society + scope:fp2_2021_angry_italian = { + add_courtier = scope:fp2_2009_garduna_guild_master + + add_opinion = { + target = scope:fp2_2009_garduna_guild_master + modifier = impressed_opinion + opinion = 20 + } + reverse_add_opinion = { + target = scope:fp2_2009_garduna_guild_master + modifier = opinion_welcomed_with_tea + } + } + + modifier = { + add = 20 + scope:fp2_2009_event_outcome = flag:paid_off + } + } + } + } + } + + option = { # Recruit into court (cures courtier's depression if they were a member of the thief-king's gang) + name = fp2_struggle.2021.b + + pay_short_term_gold = { + target = scope:fp2_2009_garduna_guild_master + gold = medium_gold_value + } + every_powerful_vassal = { + limit = { NOT = { has_trait = forgiving } } + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = suspicion_opinion + opinion = -15 + } + } + add_courtier = scope:fp2_2009_garduna_guild_master + if = { + limit = { exists = scope:fp2_2009_garduna_young_thief } + remove_trait = depressed_1 # My old boss survived! (though the rest are dead but shhh) + } + + hidden_effect = { + scope:fp2_2009_garduna_guild_master = { + add_opinion = { + target = root + modifier = hired_me_opinion + opinion = 15 + } + + if = { # There can only be one top dog, one master of the shadows. + limit = { scope:fp2_2021_spymaster != scope:fp2_2009_garduna_young_thief } + random = { + chance = 25 + set_relation_rival = { + target = scope:fp2_2021_spymaster + reason = rival_garduna_young_thief + } + } + } + } + } + } + + option = { # Establish a spy network + name = fp2_struggle.2021.c + flavor = fp2_struggle.2021.c.flavor + + trigger = { + OR = { + exists = scope:fp2_2021_secreto_numero_ichi + exists = scope:fp2_2021_secreto_numero_ni + } + } + + pay_short_term_gold = { + target = scope:fp2_2009_garduna_guild_master + gold = major_gold_value + } + + custom_tooltip = fp2_struggle.2021.c.a # Perhaps it can mention the spymaster? + hidden_effect = { # Note: You might end up learning secrets you already know, this is WAD + if = { + limit = { + exists = scope:fp2_2021_secreto_numero_ichi + exists = scope:fp2_2021_secreto_numero_ni + } + + send_interface_toast = { + type = event_intrigue_good + title = fp2_struggle.2021.c.spynet.a + + scope:fp2_2021_secreto_numero_ichi = { reveal_to = root } + scope:fp2_2021_secreto_numero_ni = { reveal_to = root } + } + } + else = { + if = { + limit = { exists = scope:fp2_2021_secreto_numero_ichi } + send_interface_toast = { + type = event_intrigue_good + title = fp2_struggle.2021.c.spynet.a + + scope:fp2_2021_secreto_numero_ichi = { reveal_to = root } + } + } + else_if = { + limit = { exists = scope:fp2_2021_secreto_numero_ni } + send_interface_toast = { + type = event_intrigue_good + title = fp2_struggle.2021.c.spynet.a + + scope:fp2_2021_secreto_numero_ni = { reveal_to = root } + } + } + } + } + + scope:fp2_2009_garduna_guild_master = { silent_disappearance_effect = yes } + } + + option = { # Duel option (get title late) + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2009_event_outcome = flag:lobbed_head } + desc = fp2_struggle.2021.d.alt + } + desc = fp2_struggle.2021.d + } + } + } + trigger = { NOT = { age < 14 } } + + custom_tooltip = fp2_struggle.2021.d.b + show_as_tooltip = { + if = { + limit = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + give_nickname = nick_the_Thief_Slayer + } + } + ROOT = { save_scope_as = fp2_2021_root_in_duel } + scope:fp2_2009_garduna_guild_master = { + set_variable = { + name = signature_weapon + value = flag:dagger + } + } + + if = { # Changes the background to match, you cannot use conditional values on scripted effects + limit = { scope:fp2_2009_event_outcome = flag:cleared_out } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:fp2_2009_garduna_guild_master + FATALITY = always + FIXED = no + LOCALE = alley_day + OUTPUT_EVENT = fp2_struggle.2022 + INVALIDATION_EVENT = fp2_struggle.2022 + } + } + else_if = { + limit = { scope:fp2_2009_event_outcome = flag:paid_off } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:fp2_2009_garduna_guild_master + FATALITY = always + FIXED = no + LOCALE = tavern + OUTPUT_EVENT = fp2_struggle.2022 + INVALIDATION_EVENT = fp2_struggle.2022 + } + } + else_if = { + limit = { scope:fp2_2009_event_outcome = flag:worked_together } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:fp2_2009_garduna_guild_master + FATALITY = always + FIXED = no + LOCALE = throne_room + OUTPUT_EVENT = fp2_struggle.2022 + INVALIDATION_EVENT = fp2_struggle.2022 + } + } + else_if = { + limit = { scope:fp2_2009_event_outcome = flag:lobbed_head } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:fp2_2009_garduna_guild_master + FATALITY = always + FIXED = no + LOCALE = alley_night + OUTPUT_EVENT = fp2_struggle.2022 + INVALIDATION_EVENT = fp2_struggle.2022 + } + } + } + + after = { remove_global_variable = fp2_struggle_2009_thief_king_char } +} + +fp2_struggle.2022 = { # You become the KING OF THIEVES again, well, late is better than never... + hidden = yes + immediate = { + if = { + limit = { + exists = scope:fp2_2022_reuse_gate + root = scope:fp2_2021_root_in_duel + } + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2021.d.a + right_icon = ROOT + if = { + limit = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + give_nickname = nick_the_Thief_Slayer + } + add_prestige = medium_prestige_gain # Penalty for finishing the job late + add_gold = minor_gold_value + } + } + else = { + save_scope_as = fp2_2022_reuse_gate + trigger_event = { + id = fp2_struggle.2022 + days = 1 + } + } + } +} + +################################### +# The Price of War +# by Veronica Pazos +################################### +# You pawn your crown to get some gold to help in your war +############################################################## +fp2_struggle.3001 = { + type = character_event + title = fp2_struggle.3001.t + desc = { + desc = fp2_struggle.3001.desc + first_valid = { + triggered_desc = { + trigger = { + is_at_war = yes + } + desc = fp2_struggle.3001.desc_war_intro + } + triggered_desc = { + trigger = { + is_at_war = no + } + desc = fp2_struggle.3001.desc_no_war_intro + } + } + desc = fp2_struggle.3001.desc_outro + } + + theme = crown + cooldown = { years = 5 } #in case you don't sell your crown you'll have to wait to get the chance again + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = cp:councillor_steward + animation = personality_rational + } + + trigger = { + has_fp2_dlc_trigger = yes #dlc check + is_available_even_at_war_adult = yes + primary_title.tier >= tier_kingdom #so we make sure you have an actual crown + OR = { #someone has to suggest this + exists = cp:councillor_steward + any_courtier = { + stewardship >= medium_skill_rating + } + } + gold < minor_gold_value #you don't have much gold + NOT = { has_character_flag = sold_crown_charmod } #you haven't sold your crown before + struggle:iberian_struggle = { + NOT = { is_struggle_phase = struggle_iberia_phase_compromise } #you're not in the compromise phase + } + } + + weight_multiplier = { #more likely to trigger the poorer you are + modifier = { + add = 0.25 + gold <= 25 + } + modifier = { + add = 0.25 + gold <= 20 + } + modifier = { + add = 0.5 + gold <= 15 + } + modifier = { + add = 0.5 + gold <= 10 + } + } + + immediate = { + play_music_cue = "mx_cue_touching_moment" + if = { + limit = { + exists = cp:councillor_steward + } + cp:councillor_steward = { save_scope_as = struggle_3001_steward } + } + else = { + random_courtier = { + limit = { + stewardship >= medium_skill_rating + } + save_scope_as = struggle_3001_steward + } + } + if = { + limit = { + has_any_artifact = yes + any_character_artifact = { artifact_type = helmet } #we check if you have a crown artifact + } + random_character_artifact = { + limit = { artifact_type = helmet } + save_scope_as = struggle_3001_crown_artifact + } + } + if = { + limit = { + is_married = yes + } + primary_spouse = { + save_scope_as = struggle_3001_spouse + } + } + } + + option = { #sell your own crown + name = fp2_struggle.3001.a + flavor = fp2_struggle.3001.a_flavour + add_character_flag = sold_crown_charmod #you lose your crown + give_nickname = nick_the_crownless #now everyone knows + add_gold = medium_gold_max_value + add_prestige = major_prestige_loss + stress_impact = { + arrogant = medium_stress_impact_gain + humble = minor_stress_loss + } + + ai_chance = { + base = 5 + modifier = { + add = 5 + gold <= 15 + } + ai_value_modifier = { + ai_greed = 0.15 + ai_rationality = 0.2 + } + } + } + + option = { #sell artifact crown instead + name = fp2_struggle.3001.b + trigger = { #triggers if you actually have one + any_character_artifact = { + artifact_slot_type = helmet + } + } + add_gold = medium_gold_value + add_prestige = minor_prestige_loss + destroy_artifact = scope:struggle_3001_crown_artifact + stress_impact = { + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 5 + modifier = { + add = 5 + gold <= 15 + } + ai_value_modifier = { + ai_greed = -0.3 + ai_rationality = 0.2 + } + } + } + + option = { #but my spouse also has a crown... + name = fp2_struggle.3001.c + flavor = fp2_struggle.3001.c_flavour + trigger = { + is_married = yes #you have a spouse + scope:struggle_3001_spouse = { + NOT = { has_character_flag = sold_crown_charmod } #and you didn't sell their crown + } + } + add_gold = medium_gold_value + add_prestige = minor_prestige_loss + if = { + limit = { + scope:struggle_3001_spouse = { + has_trait = humble + } + } + scope:struggle_3001_spouse = { + add_opinion = { + target = ROOT + opinion = -25 #they are displeased + modifier = struggle_3001_spouse_crown_modifier + } + add_character_flag = sold_crown_charmod #your spouse loses their crown + } + } + else = { + scope:struggle_3001_spouse = { + add_opinion = { + target = ROOT + opinion = -75 #they REALLY hate you + modifier = struggle_3001_spouse_crown_modifier + } + add_character_flag = sold_crown_charmod #your spouse loses their crown + } + } + stress_impact = { + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = 5 + gold <= 15 + } + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + option = { #I'll be dead before losing my crown + name = fp2_struggle.3001.d + stress_impact = { + base = medium_stress_gain #you really need money + } + + ai_chance = { + base = 5 + } + } +} + +################################### +# Order of the Hatchet +# By Veronica Pazos +################################### +# Order of the Hachet - Woman are defending your city +####################################################### +fp2_struggle.3011 = { + type = character_event + title = fp2_struggle.3011.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + desc = fp2_struggle.3011.desc_men #reverse genre event + } + desc = fp2_struggle.3011.desc + } + desc = fp2_struggle.3011.desc_outro + } + + theme = realm + cooldown = { years = 20 } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = cp:councillor_marshal + animation = marshal + } + lower_right_portrait = scope:bishop + + trigger = { + has_fp2_dlc_trigger = yes + fp2_character_any_involvement_iberian_struggle_trigger = yes #there's an ongoing struggle (includes dlc check) + is_available_even_at_war_adult = yes + is_landed_or_landless_administrative = yes + any_character_war = { + war_days >= 30 #a battle has likely happened + } + exists = cp:councillor_marshal #someone tells you about the incident + exists = cp:councillor_court_chaplain + faith = { + NOT = { has_doctrine = doctrine_gender_equal } #checks that this is unusual + } + OR = { #checks again that this makes sense, Ola Jentzsch's note + has_game_rule = default_gender_equality + has_game_rule = inversed_gender_equality + } + struggle:iberian_struggle = { #there's a struggle going on + OR = { + is_struggle_phase = struggle_iberia_phase_hostility + is_struggle_phase = struggle_iberia_phase_opportunity + } + } + any_sub_realm_barony = { + exists = holder + title_province = { has_holding_type = city_holding } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + cp:councillor_marshal = { save_scope_as = struggle_3011_marshal } + cp:councillor_court_chaplain = { save_scope_as = bishop } + random_sub_realm_barony = { + limit = { + exists = holder + title_province = { has_holding_type = city_holding } + } + county = { save_scope_as = struggle_3011_county_town } + } + } + + option = { #that's dope + name = fp2_struggle.3011.a + scope:struggle_3011_county_town = { + add_county_modifier = { + modifier = fp2_order_of_the_hachet_modifier + years = 5 + } + } + scope:bishop = { + add_opinion = { + target = ROOT + opinion = -25 + modifier = angry_opinion + } + } + every_vassal = { + custom = custom.every_zealous_callous_or_sadistic_vassal + limit = { + OR = { + has_trait = zealous + has_trait = callous + } + } + add_opinion = { + target = ROOT + opinion = -10 + modifier = annoyed_opinion + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = -1 #zealous AI will never pick this + ai_compassion = 0.2 + ai_honor = 0.2 + } + } + } + + option = { #ridiculous + name = { + trigger = { + faith = { has_doctrine = doctrine_gender_male_dominated } + } + text = fp2_struggle.3011.b + } + name = { + trigger = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + text = fp2_struggle.3011.b_men + } + scope:bishop = { + add_opinion = { + target = ROOT + opinion = 10 + modifier = grateful_opinion + } + } + if = { + limit = { + faith = { has_doctrine = doctrine_gender_male_dominated } + } + every_courtier = { + custom = custom.every_female_courtier + limit = { + is_female = yes + } + add_opinion = { + target = ROOT + opinion = -10 + modifier = insult_opinion + } + } + } + else_if = { + limit = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + every_courtier = { + custom = custom.every_male_courtier + limit = { + is_male = yes + } + add_opinion = { + target = ROOT + opinion = -10 + modifier = insult_opinion + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 0.2 + ai_rationality = -0.2 + } + } + } + + option = { #witches! + name = fp2_struggle.3011.c + trigger = { + has_trait = zealous + } + add_dread = medium_dread_gain + add_character_modifier = { + modifier = fp2_punished_order_of_the_hachet_modifier + years = 5 + } + + ai_chance = { #zealous AI will pick this option + base = 1 + ai_value_modifier = { + ai_zeal = 0.8 + ai_energy = -0.7 + ai_vengefulness = 0.5 + } + } + } + + option = { #I shall save these damsels in distress! + name = fp2_struggle.3011.d + trigger = { + faith = { has_doctrine = doctrine_gender_male_dominated } + OR = { + has_trait = gallant + has_trait = arrogant + culture = { + has_cultural_tradition = tradition_chanson_de_geste + } + } + } + random_list = { #how does that go + 75 = { + add_stress = medium_stress_gain + } + 25 = { + add_stress = medium_stress_impact_loss + } + } + + ai_chance = { + base = 10 + } + } +} + +################################### +# The Wrath of Heaven +# By Veronica Pazos +################################### +# "Lightning stones" in a siege +################################### +fp2_struggle.3021 = { + type = character_event + title = fp2_struggle.3021.t + desc = fp2_struggle.3021.desc + + theme = martial + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:struggle_3021_knight + animation = shock + } + lower_right_portrait = scope:struggle_3021_courtier + + trigger = { + has_fp2_dlc_trigger = yes + fp2_character_any_involvement_iberian_struggle_trigger = yes + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_struggle_3021 } #so you don't research the same thing again + struggle:iberian_struggle = { #there's some kind of hostility going on + is_struggle_phase = struggle_iberia_phase_hostility + + } + any_knight = { #someone sees this + is_available_healthy_ai_adult = yes + } + any_courtier = { #someone will research this + is_available_healthy_ai_adult = yes + count > 0 + } + any_directly_owned_province = { #we have a castle to use it on + has_holding_type = castle_holding + NOT = { has_province_modifier = fp2_lightning_stones_modifier } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_at_war = yes + } + } + + immediate = { + add_character_flag = had_event_struggle_3021 + random_knight = { + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = struggle_3021_knight + } + every_courtier = { #get your courtiers + limit = { + is_available_ai_adult = yes + this != root.primary_spouse #you shouldn't lose your spouse or heir because of this + this != root.player_heir + } + add_to_list = struggle_3021_courtier_list + } + ordered_in_list = { #sort through to pick the one with highest learning + list = struggle_3021_courtier_list + order_by = learning + max = 1 + save_scope_as = struggle_3021_courtier + } + random_directly_owned_province = { #this is where we can try it + limit = { + has_holding_type = castle_holding + } + save_scope_as = lightning_stones_province + } + } + + option = { #we need to research this stuff + name = fp2_struggle.3021.a + + scope:struggle_3021_courtier = { #This is who is doing the research + duel = { + skill = learning #The skill needed for research + value = average_skill_rating #Found in 00_basic_values.txt - An 8 in this case + 12 = { #Success - We keep the weight values fairly close to our skill values so they can be affected. 20 is a good max. + compare_modifier = { + value = scope:duel_value + multiplier = 2 #This multiplies the *difference* between the skill and the target. Meaning folks with good skills will be much more likely to get it. + min = -5 #This prevents truly terrible people from completely losing the chance to succeed. + } + desc = good_struggle_3021_courtier_desc + root = { + send_interface_toast = { + title = good_stone_research_title + left_icon = scope:struggle_3021_courtier + scope:lightning_stones_province = { + add_province_modifier = { + modifier = fp2_lightning_stones_modifier + } + } + } + } + } + 14 = { #Failure! + compare_modifier = { + value = scope:duel_value + multiplier = -2 #This multiplies and inverts the *difference* between the skill and the target. Meaning folks with bad skills will be much more likely to get this. + } + desc = bad_struggle_3021_courtier_desc + root = { + send_interface_toast = { #send a toast + title = bad_stone_research_title + desc = bad_struggle_3021_courtier_desc + left_icon = scope:struggle_3021_courtier + scope:struggle_3021_courtier = { + death = { death_reason = death_accident } + } + } + } + } + } + } + + stress_impact = { + zealous = medium_stress_impact_gain + } + } + + option = { #this is not the greatest idea + name = fp2_struggle.3021.b + reverse_add_opinion = { + target = scope:struggle_3021_courtier + modifier = insulted_opinion + opinion = -15 + } + stress_impact = { + base = minor_stress_impact_loss + zealous = medium_stress_impact_gain + craven = minor_stress_impact_loss + brave = medium_stress_impact_gain + } + } + + option = { #we can maybe use this in a feast + name = fp2_struggle.3021.c + trigger = { + OR = { + has_trait = vengeful + has_trait = deceitful + has_trait = arbitrary + has_trait = callous + intrigue >= high_skill_rating + has_lifestyle = intrigue_lifestyle + } + } + + duel = { + skill = learning + target = scope:struggle_3021_courtier + 30 = { #it works + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + desc = good_struggle_3021_courtier_desc + root = { + send_interface_toast = { + title = good_stone_research_title + left_icon = scope:struggle_3021_courtier + + add_character_modifier = { + modifier = fp2_lightning_stones_poison_modifier + years = 5 + } + } + } + } + 70 = { #it doesnt work + compare_modifier = { + value = scope:duel_value + } + desc = bad_struggle_3021_courtier_desc + root = { + send_interface_toast = { #send a toast + title = bad_stone_research_title + desc = bad_struggle_3021_courtier_desc + left_icon = scope:struggle_3021_courtier + + scope:struggle_3021_courtier = { + death = { death_reason = death_accident } + } + } + } + } + } + + stress_impact = { + forgiving = medium_stress_impact_gain + honest = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.2 + ai_vengefulness = 1 + } + } + } + + option = { #god's punihsment! + name = fp2_struggle.3021.d + trigger = { + OR = { + has_trait = zealous + stress >= high_medium_stress + } + } + add_piety = minor_piety_gain + stress_impact = { + zealous = minor_stress_loss + } + } + + option = { #lightning stones for the lightning stone god + name = fp2_struggle.3021.e + trigger = { + religion = { is_in_family = rf_pagan } + } + add_piety = medium_piety_gain + } +} diff --git a/N3OW/events/dlc/fp2/fp2_yearly_events.txt b/N3OW/events/dlc/fp2/fp2_yearly_events.txt new file mode 100644 index 00000000..9075d9a1 --- /dev/null +++ b/N3OW/events/dlc/fp2/fp2_yearly_events.txt @@ -0,0 +1,6882 @@ +namespace = fp2_yearly + +### EVENT LIST #################################################################### +## XXXX - XXXX YYY by ZZZ +## 1001 - 1001 Chess Two by Daniel Moore +## 1002 - 1002 Compromising Position by Daniel Moore +## 1003 - 1003 Tilting at Giants by Daniel Moore +## 1004 - 1004 The Hawk of Quarysh by Daniel Moore +## 1005 - 1005 Lost Viking by Daniel Moore +## 1006 - 1007 Viking Cheese by Daniel Moore +## 1008 - 1008 Consuming the Cheese by Daniel Moore +## 2020 - 2020 Açò es or, xata! by Hugo Cortell +## 2025 - 2025 Suffering From Success by Hugo Cortell +## 3000 - 3000 Neighboring Muslims are growing rice by Alexander Oltner +## 3001 - 3001 You commission your epitaph by Veronica Pazos +## 3002 - 3002 Oh my god they were roommates by Veronica Pazos +## 3003 - 3003 Best friend throws a terrible party by Veronica Pazos +## 4001 - 4001 You fancy a little siesta by Nick Meredith +## 4002 - 4002 County is increasingly religiously intertwined by Nick Meredith +## 4003 - 4003 The road to Santiago is under threat from bandits by Nick Meredith +## 4004 - 4004 Talented Mozarab offers their services by Nick Meredith +## 4005 - 4005 Mozarabs in a city ask for their own quarter by Nick Meredith +## 4006 - 4006 Mozarabs ask for permission to build churches by Nick Meredith +## 4007 - 4007 Finding a shell on the road to Santiago by Nick Meredith +## 4008 - 4008 Folk stories around the fireside by Nick Meredith +## 4009 - 4009 Visiting the Malato Tree by Nick Meredith +## 4010 - 4010 Finding a Verraco by Nick Meredith +## 8000 - 8000 Destroying the Vineyards by Ola Jentzsch +## 8001 - 8001 Assembling the Cortes by Ola Jentzsch +## 8002 - 8002 Dietary Dilemma By Ola Jentzsch +## 8003 - 8003 Flight of Fancy By Ola Jentzsch +## 8004 - 8004 Trasnlation Schools By Ola Jentzsch +## 8005 - 8005 Under the Stone Pine by Ola Jentzsch +## 8006 - 8006 Saqaliba Settlers by Ola Jentzsch +## 9000 - 9002 Conversos and Jewish events By James Beaumont +## 9005 - 9005 Toledan Nights By James Beaumont +## 9006 - 9006 Local bishop mad his church faces the wrong way By James Beaumont +################################################################################### +# A lot of effort went into the readability of these lists and headers # +# In fact, now there have been two whole passes of file organization # +################################################################################### + +################################### +# Chess Two +# By Daniel Moore +################################### +fp2_yearly.1001 = { + type = character_event + title = fp2_yearly.1001.t + desc = fp2_yearly.1001.desc + theme = crown + left_portrait = { + character = root + animation = worry + + } + + trigger = { + #Strategy Games Culture Tradition + has_fp2_dlc_trigger = yes + is_landed_or_landless_administrative = yes + capital_province = { + geographical_region = world_europe_west_iberia + } + + NOT = { + has_character_flag = fp2_yearly.1001 + } + } + + immediate = { + add_character_flag = fp2_yearly.1001 + + } + + option = { #Torture the pawns + name = fp2_yearly.1001.c + + trigger = { + OR = { + has_trait = sadistic + has_trait = torturer + dread > medium_dread + } + } + + add_dread = minor_dread_gain + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { #King should be stronger + name = fp2_yearly.1001.a + + add_prestige = medium_prestige_value + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + + } + + option = { #Bishop should be stronger + name = fp2_yearly.1001.b + + add_piety = medium_piety_value + + add_character_modifier = { + modifier = fp2_respected_clergy_chess + years = 10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } +} + +################################### +# Compromising Position +# By Daniel Moore +################################### +fp2_yearly.1002 = { + type = character_event + title = fp2_yearly.1002.t + desc = fp2_yearly.1002.desc + theme = seduction + left_portrait = { + character = root + animation = shock + + } + + right_portrait = { + character = scope:deviant_courtier + animation = prisondungeon + } + + trigger = { + has_fp2_dlc_trigger = yes + is_adult = yes + is_landed_or_landless_administrative = yes + any_courtier = { is_available_healthy_ai_adult = yes } + + NOT = { + has_character_flag = fp2_yearly.1002 + } + } + + immediate = { + add_character_flag = fp2_yearly.1002 + + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + OR = { + has_trait = deviant + any_secret = { + type = secret_deviant + } + } + } + + save_scope_as = deviant_courtier + } + + + if = { + limit = { + NOT = { exists = scope:deviant_courtier} + } + hidden_effect = { + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + } + + give_deviant_secret_or_trait_effect = yes + save_scope_as = deviant_courtier + } + } + } + + scope:deviant_courtier = { + + add_character_flag = { + flag = is_naked + days = 1 + } + + add_character_flag = { + flag = temporarily_blinded + days = 1 + } + } + } + + + option = { + name = fp2_yearly.1002.b + scope:deviant_courtier = { + random_secret = { + type = secret_deviant + reveal_to = root + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_honor = -1 + } + } + + stress_impact = { + deviant = medium_stress_gain + } + + } + + option = { + name = fp2_yearly.1002.c + stress_impact = { + deviant = medium_stress_loss + } + + if = { + limit = { + NOT = { + any_secret = { + type = secret_deviant + } + } + } + give_deviant_secret_or_trait_effect = yes + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 1 + ai_zeal = -1 + } + } + } + + option = { + name = fp2_yearly.1002.a + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + + stress_impact = { + deviant = medium_stress_gain + + } + } + + after = { + scope:deviant_courtier = { + remove_character_flag = is_naked + } + } +} + +################################### +# Tilting at Giants +# By Daniel Moore +################################### +fp2_yearly.1003 = { + type = character_event + title = fp2_yearly.1003.t + desc = fp2_yearly.1003.desc + theme = realm + right_portrait = { + character = scope:injured_knight + animation = paranoia + + } + + override_background = { reference = farmland } + + trigger = { + has_fp2_dlc_trigger = yes + any_knight = { + is_available_healthy_ai_adult = yes + } + + capital_province = { + geographical_region = world_europe_west_iberia + } + ROOT.culture = { + has_innovation = innovation_windmills + } + + NOT = { + has_character_flag = fp2_yearly.1003 + } + + + + + } + + immediate = { + + add_character_flag = fp2_yearly.1003 + random_knight = { + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = injured_knight + } + + scope:injured_knight = { + increase_wounds_effect = { REASON = fight } + } + + } + + option = { # + name = fp2_yearly.1003.a + remove_short_term_gold = medium_gold_value + root.capital_county = { + change_county_control = 5 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = 1 + } + } + } + + option = { # + name = fp2_yearly.1003.b + root.capital_county = { + change_county_control = -10 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + } + } + } +} + +################################### +# The Hawk of Quarysh +# By Daniel Moore +################################### +fp2_yearly.1004 = { + type = character_event + title = fp2_yearly.1004.t + desc = fp2_yearly.1004.desc + theme = learning + left_portrait = { + character = root + animation = worry + } + + + trigger = { + has_fp2_dlc_trigger = yes + + has_religion = religion:islam_religion + + capital_province = { + geographical_region = world_europe_west_iberia + } + + NOT = { + has_character_flag = fp2_yearly.1004 + } + } + + cooldown = { + years = 50 + } + + immediate = { + add_character_flag = fp2_yearly.1004 + + character:73679 = { + save_scope_as = hawk_of_quraysh + } + + dynasty:597 = { + save_scope_as = hawk_dynasty + } + + dynasty:100721 = { + save_scope_as = abbasid_dynasty + } + } + + option = { #I'm related! + name = fp2_yearly.1004.c + trigger = { + dynasty = { + this = scope:hawk_dynasty + } + } + + ai_chance = { + base = 1000 + } + add_prestige = medium_prestige_value + } + + option = { #How he inspired soldiers + name = fp2_yearly.1004.a + add_character_modifier = { + modifier = fp2_hawk_of_quarysh_martial_modifier + years = 10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 1 + } + } + } + + option = { #How diplomatic he was + name = fp2_yearly.1004.b + add_character_modifier = { + modifier = fp2_hawk_of_quarysh_diplomacy_modifier + years = 10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_compassion = 1 + } + } + } +} + +################################### +# Lost Viking +# By Daniel Moore +################################### +fp2_yearly.1005 = { + type = character_event + title = fp2_yearly.1005.t + desc = fp2_yearly.1005.desc + theme = realm + left_portrait = { + character = root + animation = worry + + } + + right_portrait = { + character = scope:hidden_viking + animation = anger + } + + trigger = { + has_fp2_dlc_trigger = yes + any_held_county = { + any_county_province = { + geographical_region = world_europe_west_iberia + } + } + + NOT = { + has_character_flag = fp2_yearly.1005 + } + } + + cooldown = { years = 50 } + + immediate = { + add_character_flag = fp2_yearly.1005 + + random_held_county = { + limit = { any_county_province = { geographical_region = world_europe_west_iberia } } + save_scope_as = viking_county + } + + + create_character = { + template = fp1_jomsviking_bigwig + location = root.capital_province + trait = compassionate + trait = scarred + save_scope_as = hidden_viking + } + } + + option = { + name = fp2_yearly.1005.a + add_courtier = scope:hidden_viking + + scope:viking_county = { + change_county_control = -5 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_compassion = 1 + } + } + } + + option = { + name = fp2_yearly.1005.b + + scope:hidden_viking = { + death = { + death_reason = death_execution + killer = root + } + } + + scope:viking_county = { + change_county_control = -10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + ai_compassion = -1 + } + } + } + + option = { + name = fp2_yearly.1005.c + scope:viking_county = { + change_county_control = 5 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } +} + +################################### +# Viking Cheese +# By Daniel Moore +################################### +fp2_yearly.1006 = { + type = character_event + title = fp2_yearly.1006.t + desc = fp2_yearly.1006.desc + theme = realm + override_background = { reference = wilderness_mountains } + left_portrait = { + character = root + animation = worry + + } + + right_portrait = { + character = scope:cheese_trader + animation = scheme + } + + + + trigger = { + has_fp2_dlc_trigger = yes + any_held_county = { + any_county_province = { + geographical_region = world_europe_west_iberia + } + } + + NOT = { + has_character_flag = fp2_yearly.1006 + } + + } + + immediate = { + add_character_flag = fp2_yearly.1006 + + random_held_county = { + limit = { + any_county_province = { + geographical_region = world_europe_west_iberia + } + } + save_scope_as = viking_county + } + + + create_character = { + template = generic_peasant_character + location = root.capital_province + + save_scope_as = cheese_trader + } + } + + option = { #Lose gold gain cheese + name = fp2_yearly.1006.a + remove_short_term_gold = minor_gold_value + #Cheese based bonus + stress_impact = { + base = miniscule_stress_impact_loss + gluttonous = minor_stress_impact_loss + comfort_eater = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + } + } + } + + option = { #You courageously chase the cheese + name = fp2_yearly.1006.b + + hidden_effect = { + random_list = { + 10 = { + trigger_event = { + id = fp2_yearly.1007 + days = { 10 20 } + } + } + + 5 = { + + } + } + } + + + custom_tooltip = fp2.1006.b.tt + } + + option = { #Nothing happens you hate cheese and having fun + name = fp2_yearly.1006.c + stress_impact = { + gluttonous = miniscule_stress_impact_gain + comfort_eater = miniscule_stress_impact_gain + eccentric = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + +fp2_yearly.1007 = { + type = character_event + title = fp2_yearly.1007.t + desc = fp2_yearly.1007.desc + theme = realm + left_portrait = { + character = root + animation = sadness + } + + right_portrait = { + character = scope:fake_cheese_viking + animation = beg + } + + trigger = { + has_fp2_dlc_trigger = yes + capital_province = { + geographical_region = world_europe_west_iberia + } + + NOT = { + has_character_flag = fp2_yearly.1007 + } + + } + + immediate = { + + add_character_flag = fp2_yearly.1007 + + root.capital_county = { + save_scope_as = viking_county + } + + create_character = { + template = generic_peasant_character + location = root.capital_province + + save_scope_as = fake_cheese_viking + } + } + + option = { + name = fp2_yearly.1007.a + + add_prestige = miniscule_prestige_value + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + option = { + name = fp2_yearly.1007.b + stress_impact = { + gluttonous = major_stress_loss + } + + add_gold = minor_gold_value + + create_artifact = { + name = fp2_cheese_artifact + description = fp2_cheese_artifact_desc + modifier = artifact_health_gain_1_modifier + modifier = artifact_attraction_opinion_negative_1_modifier + type = miscellaneous + visuals = pouch + + save_scope_as = newly_created_artifact + } + + scope:newly_created_artifact = { + flag_as_trash_artifact = yes + set_variable = has_cheese_artifact + + save_scope_as = cheese_artifact + } + } +} + +################################### +# Consuming the Cheese +# By Daniel Moore +################################### +fp2_yearly.1008 = { + type = character_event + title = fp2_yearly.1008.t + desc = fp2_yearly.1008.desc + theme = realm + override_background = { reference = bp1_wine_cellar } + left_portrait = { + character = root + animation = ecstasy + + } + + trigger = { + any_character_artifact = { + has_variable = has_cheese_artifact + } + + } + + immediate = { + + random_character_artifact = { + limit = { + has_variable = has_cheese_artifact + } + save_scope_as = cheese_artifact + } + + } + + option = { + name = fp2_yearly.1008.a + add_stress = scope:cheese_artifact.cheese_artifact_strength + + destroy_artifact = scope:cheese_artifact + + } + + option = { + name = fp2_yearly.1008.b + } + +} + +################################### +# Açò es or, xata! +# By Hugo Cortell +################################### +# (hurray for UTF8) +################################### +fp2_yearly.2020 = { + type = character_event + title = fp2_struggle.2020.t # Removed variation for Jaime I, as he is not in the game + desc = fp2_struggle.2020.desc # Breaks convention, usually events do not tell the player character how they feel. But it is fitting for this thematically tounge-and-cheek event. + + theme = recovery + override_background = { reference = farmland } + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:fp2_2020_laxatador + animation = beg + } + cooldown = { years = 100 } + + weight_multiplier = { + base = 1 + modifier = { + add = 5 + has_trait = gluttonous + } + } + trigger = { + has_fp2_dlc_trigger = yes + is_landed = yes + is_ai = no # The AI has no use for narrative-focused events + OR = { + has_title = title:c_valencia + title:c_valencia = { + holder = { + OR = { + liege = root + top_liege = root + } + } + } + } + title:c_valencia = { + NOR = { + has_county_modifier = fp2_horchata_colonialism_modifier + has_county_modifier = governance_1054_satisfied_peasants_modifier + has_county_modifier = fp2_funded_agriculture_modifier + } + } + } + + immediate = { + title:c_valencia.title_province = { save_scope_as = fp2_2020_valencia } + + create_character = { + age = { 19 36 } + location = scope:fp2_2020_valencia + gender = female + trait = beauty_good_2 # Chata, does not quite translate to beautiful, but english speakers might expect it to. + trait = logistician + trait = diligent + trait = temperate + trait = compassionate + random_traits = no + culture = scope:fp2_2020_valencia.culture + faith = scope:fp2_2020_valencia.faith + dynasty = none + save_scope_as = fp2_2020_laxatador + } + } + + option = { # Engage in resource extraction + name = fp2_struggle.2020.a + flavor = fp2_struggle.2020.a.desc + + trigger = { + OR = { + has_trait = gluttonous + has_trait = comfort_eater + } + } + + scope:fp2_2020_valencia.county = { + add_county_modifier = { + modifier = fp2_horchata_colonialism_modifier + years = 10 + } + } + + root.capital_county = { # The people love this + add_county_modifier = { + modifier = governance_1054_satisfied_peasants_modifier + years = 15 + } + } + } + + option = { # Give them money to make more + name = fp2_struggle.2020.d + + trigger = { + NOT = { + has_trait = gluttonous + has_trait = comfort_eater + } + } + + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:fp2_2020_valencia.county = { + add_county_modifier = { + modifier = fp2_funded_agriculture_modifier + years = 15 + } + } + } + + option = { # Take a few barrels for the family (wholesome outcome) + name = fp2_struggle.2020.b + + every_close_family_member = { + custom = all_close_family_members + add_opinion = { + target = root + modifier = delicious_morsel_opinion + opinion = 10 + } + } + } + + option = { # NO! THE DEVIL MUST BE TEMPTING ME (evil outcome) + name = fp2_struggle.2020.c + flavor = fp2_struggle.2020.c.desc + + stress_impact = { gluttonous = minor_stress_impact_gain } # As you need to be glut to trigger the event, the stress is reduced to compensate + if = { + limit = { has_trait = gluttonous } + add_prestige = medium_prestige_gain # Resisting is very difficult + } + else = { add_prestige = minor_prestige_gain } + + } + + after = { scope:fp2_2020_laxatador = { silent_disappearance_effect = yes } } +} + +################################### +# Suffering From Success +# By Hugo Cortell +################################### +fp2_yearly.2025 = { + type = character_event + title = fp2_struggle.2025.t + desc = fp2_struggle.2025.desc + theme = realm + override_background = { reference = wilderness_mountains } + cooldown = { years = 4 } + left_portrait = { + character = scope:fp2_2025_marshal + animation = flirtation_left + } + right_portrait = { + character = root + triggered_animation = { + trigger = { # Is sad + OR ={ + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = compassionate + has_trait = gallant + has_trait = peasant_leader + } + } + animation = sadness + } + animation = war_defender + } + + trigger = { + gold > medium_gold_value + + any_held_county = { + any_county_province = { geographical_region = world_europe_west_iberia } + recent_history = { + type = conquest + years = 4 + } + } + + OR = { + exists = cp:councillor_steward + exists = cp:councillor_marshal + } + } + + immediate = { + random_held_county = { + limit = { + any_county_province = { geographical_region = world_europe_west_iberia } + recent_history = { + type = conquest + years = 4 + } + } + save_scope_as = fp2_2025_razed_land + } + + if = { + limit = { exists = cp:councillor_marshal } + cp:councillor_marshal = { save_scope_as = fp2_2025_marshal } + } + else = { cp:councillor_steward = { save_scope_as = fp2_2025_marshal } } + } + + option = { # No more war from them. Let them rebuild in peace. + name = fp2_struggle.2025.a + + trigger = { + OR ={ + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = compassionate + has_trait = gallant + has_trait = peasant_leader + } + } + + add_stress = minor_stress_impact_loss + send_interface_toast = { + type = event_toast_effect_good + title = fp2_vow_against_conscription_modifier + left_icon = ROOT + + scope:fp2_2025_razed_land = { + add_county_modifier = { + modifier = fp2_vow_against_conscription_modifier + years = 40 + } + } + } + } + + option = { # I will build a great monument + name = fp2_struggle.2025.b + + remove_treasury_or_gold = minor_treasury_or_gold_value + send_interface_toast = { + type = event_toast_effect_good + title = fp2_monument_to_war_modifier + left_icon = ROOT + + add_prestige = medium_prestige_gain + scope:fp2_2025_razed_land = { + add_county_modifier = { + modifier = fp2_monument_to_war_modifier + years = 20 + } + } + } + } + + option = { # We will restore this town back to what it was + name = fp2_struggle.2025.c + + remove_treasury_or_gold = medium_treasury_or_gold_value + send_interface_toast = { + type = event_toast_effect_good + title = fp2_village_rebuiling_efforts_modifier + left_icon = ROOT + + scope:fp2_2025_razed_land = { + add_county_modifier = { + modifier = fp2_village_rebuiling_efforts_modifier + years = 10 + } + } + } + } + + option = { # I will establish a temporary outpost here + name = fp2_struggle.2025.d + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_border_encampments_modifier + left_icon = ROOT + + scope:fp2_2025_razed_land = { + add_county_modifier = { + modifier = fp2_border_encampments_modifier + years = 10 + } + } + } + } +} + +################################### +# Neighboring Muslims are growing rice +# By Alexander Oltner +################################### +scripted_trigger rice_field_potential = { + is_available_ai_adult = yes + faith.religion = religion:islam_religion + capital_county.faith.religion = religion:islam_religion + capital_province = { + geographical_region = world_europe_west_iberia + } + capital_county = { + county_control >= 100 + development_level >= root.capital_county.development_level + } +} + +fp2_yearly.3000 = { + type = character_event + title = fp2_flavor.0001.t + desc = fp2_flavor.0001.desc + theme = realm + override_background = { reference = farmland } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:rice_propagator + animation = happiness + } + + cooldown = { years = 30 } + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + is_landed = yes + + trigger_if = { + limit = { + fp2_character_any_involvement_iberian_struggle_trigger = yes + } + struggle:iberian_struggle = { + OR = { + is_struggle_phase = struggle_iberia_phase_compromise + is_struggle_phase = struggle_iberia_phase_conciliation + is_struggle_phase = struggle_iberia_phase_opportunity + } + } + } + + capital_province = { + geographical_region = world_europe_west_iberia + } + + NOR = { # Non-muslim with non-muslim capital + capital_county.faith.religion = religion:islam_religion + faith.religion = religion:islam_religion + capital_county = { + has_county_modifier = terraced_hills_modifier + } + } + OR = { # Vassal, neighbor, or liege is muslim with muslim capital + any_neighboring_and_across_water_top_liege_realm_owner = { + rice_field_potential = yes + } + any_vassal = { + rice_field_potential = yes + } + liege = { + rice_field_potential = yes + } + } + } + + immediate = { + capital_county = { save_scope_as = capital_county_scope } + + every_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + rice_field_potential = yes + } + add_to_list = rice_propagators + } + every_vassal = { + limit = { + rice_field_potential = yes + } + add_to_list = rice_propagators + } + if = { + limit = { + liege = { + rice_field_potential = yes + } + } + liege = { + add_to_list = rice_propagators + } + } + + random_in_list = { + list = rice_propagators + weight = { + base = 1 + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + modifier = { + add = stewardship + } + } + save_scope_as = rice_propagator + capital_county = { + if = { + limit = { + NOT = { + has_county_modifier = terraced_hills_modifier + } + } + hidden_effect = { + add_county_modifier = { + modifier = terraced_hills_modifier + years = 20 + } + } + } + save_scope_as = rice_propagator_capital + } + } + } + + option = { + name = fp2_flavor.0001.a + + pay_treasury_or_gold = { + target = scope:rice_propagator + value = scope:rice_propagator.medium_treasury_or_gold_value # The costs/duels were updated to be higher for balance reasons + } + + scope:capital_county_scope = { + add_county_modifier = { + modifier = terraced_hills_modifier + years = 20 + } + } + + stress_impact = { + greedy = massive_stress_impact_gain + zealous = major_stress_impact_gain + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = zealous + has_trait = deceitful + has_trait = arrogant + has_trait = paranoid + } + } + } + } + + option = { + name = fp2_flavor.0001.b + + duel = { + skill = diplomacy + value = scope:rice_propagator.diplomacy + + 11 = { # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -5 + } + + desc = fp2_flavor.0001.b.failure + send_interface_toast = { + title = fp2_flavor.0001.b.failure + left_icon = scope:rice_propagator + + scope:rice_propagator = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -15 + } + + hidden_effect = { + random = { + chance = 50 + if = { + limit = { can_set_relation_potential_rival_trigger = { CHARACTER = root } } + set_relation_potential_rival = root + } + } + } + } + } + } + 10 = { # Success + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + + desc = fp2_flavor.0001.b.success + send_interface_toast = { + title = fp2_flavor.0001.b.success + left_icon = scope:rice_propagator + + scope:capital_county_scope = { + add_county_modifier = { + modifier = terraced_hills_modifier + years = 20 + } + } + } + } + } + + stress_impact = { + paranoid = massive_stress_impact_gain + impatient = major_stress_impact_gain + shy = major_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = impatient + has_trait = shy + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { + name = fp2_flavor.0001.c + + duel = { + skill = intrigue + value = scope:rice_propagator.intrigue + + 11 = { # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -5 + } + + desc = fp2_flavor.0001.c.failure + send_interface_toast = { + title = fp2_flavor.0001.c.failure + left_icon = scope:rice_propagator + + scope:rice_propagator = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -35 + } + + progress_towards_rival_effect = { + REASON = rival_rice_stolen + CHARACTER = root + OPINION = 0 + } + } + } + } + 10 = { # Success + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + + desc = fp2_flavor.0001.c.success + send_interface_toast = { + title = fp2_flavor.0001.c.success + left_icon = scope:rice_propagator + + scope:capital_county_scope = { + add_county_modifier = { + modifier = terraced_hills_modifier + years = 20 + } + } + } + } + } + + stress_impact = { + honest = massive_stress_impact_gain + generous = major_stress_impact_gain + craven = medium_stress_impact_gain + content = medium_stress_impact_gain + patient = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = generous + has_trait = craven + has_trait = content + } + } + } + } + + option = { + name = fp2_flavor.0001.d + + stress_impact = { + diligent = major_stress_impact_gain + ambitious = major_stress_impact_gain + generous = medium_stress_impact_gain + trusting = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = ambitious + has_trait = generous + has_trait = trusting + } + } + } + } +} + +################################################## +# As I Lay Dying +# whether this title is a reference to Faulkner's novel or the metalcore band +# that I shall leave to the judgement of the reader +# by Veronica Pazos +# 3001 - 3001 +################################################## +fp2_yearly.3001 = { + type = character_event + title = fp2_flavor.3001.t + desc = fp2_flavor.3001.desc + + theme = death + left_portrait = { + character = ROOT + animation = worry + } + override_background = { reference = throne_room } + + trigger = { + has_fp2_dlc_trigger = yes + is_landed = yes + is_available_even_at_war_adult = yes + capital_province = { + geographical_region = world_europe_west_iberia + } + OR = { + AND = { + age >= 45 + has_trait = wounded_2 + } + AND = { + age >= 45 + has_trait = ill + } + has_trait = wounded_3 + has_trait = cancer + age >= 75 + } + NOT = { has_character_flag = had_event_fp2_flavor_3001 } + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:judaism_religion + religion = religion:islam_religion + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + add_character_flag = had_event_fp2_flavor_3001 + religion = { + save_scope_as = fp2_flavor_3001_religion + } + } + + option = { #your own official language (Latin/Hebrew/Arabic) + name = fp2_flavor.3001.a + add_piety = minor_piety_gain + add_prestige = minor_prestige_gain + + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = zealous + } + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { #Vulgar (Romance) language + name = fp2_flavor.3001.b + add_piety = medium_piety_loss + every_vassal = { + limit = { + religion = root.religion + } + custom = custom.every_vassal + add_opinion = { + target = ROOT + modifier = reputation_opinion + opinion = 20 + } + } + + ai_chance = { + base = 5 + modifier = { + add = 10 + OR = { + has_trait = compassionate + has_trait = humble + } + } + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { #your language + vulgar (Latin + Castillian / Hebrew + Sephardí / Arabic + Mozarabic ) + name = fp2_flavor.3001.c + stress_impact = { + base = minor_stress_loss + zealous = medium_stress_gain + } + + ai_chance = { + base = 20 + modifier = { + add = -10 + has_trait = zealous + } + ai_value_modifier = { + ai_zeal = -1 + } + } + } + + option = { #all of them! (vulgar + Latin + Hebrew + Arabic) + name = fp2_flavor.3001.d + add_character_modifier = { + modifier = fp2_epitaph_modifier + years = 5 + } + add_piety = minor_piety_loss + stress_impact = { + base = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + + ai_chance = { + base = 5 + modifier = { + add = -10 + has_trait = zealous + } + modifier = { + add = 10 + has_trait = compassionate + } + ai_value_modifier = { + ai_zeal = -1 + ai_compassion = 1 + } + } + } +} + +################################################## +# And They Were Roommates +# (oh my god they were roommates) +# by Veronica Pazos +# (idea by Baudelaire Welch) +# 3002 - 3002 +################################################## +fp2_yearly.3002 = { + type = character_event + title = fp2_flavor.3011.t + desc = fp2_flavor.3011.desc + + theme = seduction + left_portrait = { + character = ROOT + animation = ecstasy + } + right_portrait = { + character = scope:fp2_flavor_3011_best_friend + animation = flirtation + } + override_background = { reference = bedchamber } + + trigger = { + has_fp2_dlc_trigger = yes + is_playable_character = yes + is_available_even_at_war_adult = yes + any_relation = { #you have a best friend! + type = best_friend + is_available_healthy_ai_adult = yes + can_set_relation_lover_trigger = { CHARACTER = ROOT } #you're attracted to each other's genre + NOT = { has_trait = celibate } + NOT = { is_consort_of = root } + might_cheat_on_every_partner_trigger = yes + trigger_if = { + limit = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = root } } + OR = { + has_perk = subtle_desire_perk + accepts_incest_with_trigger = { CHARACTER = root } + } + } + } + } + + weight_multiplier = { + modifier = { + add = 0.5 + has_trait = lustful + } + } + + immediate = { + random_relation = { + type = best_friend + limit = { + is_available_healthy_ai_adult = yes + can_set_relation_lover_trigger = { CHARACTER = ROOT } + NOT = { has_trait = celibate } + NOT = { is_consort_of = root } + might_cheat_on_every_partner_trigger = yes + trigger_if = { + limit = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = root } } + OR = { + has_perk = subtle_desire_perk + accepts_incest_with_trigger = { CHARACTER = root } + } + } + } + save_scope_as = fp2_flavor_3011_best_friend + } + } + + option = { #become their lover + name = fp2_flavor.3011.a + + trigger = { + NOT = { has_trait = celibate } + OR = { + has_perk = unshackled_lust_perk + is_attracted_to_gender_of = root + } + trigger_if = { + limit = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:fp2_flavor_3011_best_friend } } + OR = { + has_perk = subtle_desire_perk + accepts_incest_with_trigger = { CHARACTER = scope:fp2_flavor_3011_best_friend } + } + } + } + + set_relation_lover = scope:fp2_flavor_3011_best_friend + if = { #if you're in a homosexual relationship and your faith disapproves this stresses you + limit = { + OR = { + AND = { + is_female = yes + scope:fp2_flavor_3011_best_friend = { + is_female = yes + } + NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } } + } + AND = { + is_male = yes + scope:fp2_flavor_3011_best_friend = { + is_male = yes + } + NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } } + } + } + } + stress_impact = { + base = medium_stress_impact_gain + zealous = medium_stress_impact_gain #some extra stress + } + } + if = { #your spouse finds this weird + limit = { + exists = primary_spouse + } + primary_spouse = { + add_opinion = { + target = ROOT + modifier = suspicion_opinion + opinion = -25 + } + } + } + + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = lustful + } + modifier = { + add = -5 + has_trait = chaste + } + modifier = { + add = -5 + exists = primary_spouse + } + ai_value_modifier = { + ai_zeal = -1 + } + } + } + + option = { #allowe them to move in but stay as friends + name = fp2_flavor.3011.b + stress_impact = { + base = medium_stress_loss + lustful = medium_stress_impact_gain + } + if = { + limit = { + exists = primary_spouse + } + primary_spouse = { + add_opinion = { + target = ROOT + modifier = suspicion_opinion + opinion = -20 + } + } + } + + ai_chance = { + base = 10 + modifier = { + add = -5 + has_trait = lustful + } + modifier = { + add = -2 + has_trait = chaste + } + modifier = { + add = 5 + has_trait = compassionate + } + modifier = { + add = -5 + exists = primary_spouse + } + ai_value_modifier = { + ai_compassion = 0.25 + } + } + } + + option = { #nah im good + name = { + trigger = { + exists = primary_spouse + } + text = fp2_flavor.3011.c_spouse + } + name = { + trigger = { + NOT = { exists = primary_spouse } + } + text = fp2_flavor.3011.c + } + stress_impact = { + base = medium_stress_impact_gain #you get stressed at losing your bff + lustful = minor_stress_impact_gain + callous = minor_stress_loss + chaste = minor_stress_loss + } + scope:fp2_flavor_3011_best_friend = { + add_opinion = { + target = ROOT + modifier = rejected_opinion + } + } + + ai_chance = { + base = 10 + modifier = { + add = -5 + has_trait = lustful + } + modifier = { + add = 10 + has_trait = chaste + } + modifier = { + add = -5 + has_trait = compassionate + } + modifier = { + add = 5 + exists = primary_spouse + } + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } +} + +################################################## +# A Flavorful Evening +# by Veronica Pazos +# (idea by Ewan Cowhig Croft) +# 3003 - 3003 +################################################## +fp2_yearly.3003 = { + type = character_event + title = fp2_flavor.3021.t + desc = fp2_flavor.3021.desc + + theme = feast_activity + left_portrait = { + character = scope:fp2_flavor_3021_best_friend + animation = ecstasy + } + right_portrait = { + character = ROOT + animation = stress + } + override_background = { reference = feast } + + trigger = { + has_fp2_dlc_trigger = yes + is_available_for_activity_trigger = yes + any_relation = { #you have a best friend! + type = best_friend + is_available_healthy_ai_adult = yes + } + } + + weight_multiplier = { + modifier = { + add = 0.5 + trigger_if = { + limit = { exists = scope:fp2_flavor_3021_best_friend } + scope:fp2_flavor_3021_best_friend = { + OR = { + has_trait = gregarious + has_trait = gluttonous + } + } + } + } + } + + immediate = { + random_relation = { + type = best_friend + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = fp2_flavor_3021_best_friend + } + } + + option = { #pretend nothing's wrong + name = fp2_flavor.3021.a + stress_impact = { + base = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + deceitful = minor_stress_loss + } + + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = deceitful + } + modifier = { + add = -10 + has_trait = honest + } + modifier = { + add = -5 + has_trait = brave + } + ai_value_modifier = { + ai_boldness = -1 + ai_rationality = -0.5 + ai_compassion = 0.5 + } + } + } + + option = { #try to gently tell them + name = fp2_flavor.3021.b + duel = { + skill = diplomacy + value = 5 + 50 = { + desc = fp2_flavor.3021.b.success_tt + compare_modifier = { + value = { + value = scope:duel_value + if = { + limit = { has_trait = deceitful } + add = 5 + } + if = { + limit = { intrigue >= medium_skill_rating } + add = 5 + } + if = { + limit = { scope:fp2_flavor_3021_best_friend = { has_trait = forgiving } } + add = 5 + } + if = { + limit = { scope:fp2_flavor_3021_best_friend = { has_trait = trusting } } + add = 5 + } + if = { + limit = { scope:fp2_flavor_3021_best_friend = { opinion = { target = ROOT value >= high_positive_opinion } } } + add = 5 + } + } + } + send_interface_toast = { + title = fp2_flavor.3021.b.success + left_icon = ROOT + stress_impact = { + base = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + deceitful = minor_stress_loss + } + } + } + 50 = { #they don't + send_interface_toast = { + title = fp2_flavor.3021.b.fail + left_icon = ROOT + scope:fp2_flavor_3021_best_friend = { + add_opinion = { + target = ROOT + modifier = insult_opinion + opinion = -20 + } + } + stress_impact = { + base = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + deceitful = minor_stress_loss + } + } + } + } + + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = compassionate + } + modifier = { + add = -5 + has_trait = deceitful + } + ai_value_modifier = { + ai_boldness = -1 + ai_rationality = 0.5 + ai_compassion = 1 + } + } + } + + option = { #directly tell them + name = fp2_flavor.3021.c + random_list = { + 25 = { #they take it well + modifier = { + add = 5 + has_trait = honest + } + modifier = { + add = 5 + diplomacy >= medium_skill_rating + } + modifier = { + add = 5 + scope:fp2_flavor_3021_best_friend = { + has_trait = honest + } + } + } + 75 = { #they dont (and they think you're being rude + scope:fp2_flavor_3021_best_friend = { + add_opinion = { + target = ROOT + modifier = insult_opinion + opinion = -30 + } + } + stress_impact = { + base = medium_stress_impact_gain + } + } + } + + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = brave + } + modifier = { + add = -5 + has_trait = deceitful + } + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = 0.5 + ai_compassion = -1 + } + } + } + + option = { #ghost them + name = fp2_flavor.3021.d + scope:fp2_flavor_3021_best_friend = { #they REALLY dislike you + add_opinion = { + target = ROOT + modifier = insult_opinion + opinion = -50 + } + } + stress_impact = { + base = minor_stress_loss + brave = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = -10 + has_trait = brave + } + modifier = { + add = -5 + has_trait = honest + } + ai_value_modifier = { + ai_boldness = -1 + ai_rationality = -0.5 + ai_compassion = -1 + } + } + } +} + +################################### +# You fancy a little siesta +# By Nick Meredith +################################### +# Look, this was inspired by our actual Spanish designer having a nap after lunch +# Don't look at me like that +################################### +fp2_yearly.4001 = { + type = character_event + title = fp2_yearly.4001.t + desc = fp2_yearly.4001.desc + theme = mental_health + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = boredom + } + + trigger = { + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_playable_character = yes + is_available_at_peace_adult = yes + + #is Iberian + culture = { has_cultural_pillar = heritage_iberian } + + #has more than 5 stress + stress > 5 + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + option = { #No, I have work to do! + name = fp2_yearly.4001.a + + add_prestige = minor_prestige_gain + + stress_impact = { + base = medium_stress_impact_gain + lazy = medium_stress_impact_gain + diligent = major_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + } + } + } + + option = { #a little nap can't hurt anyone + name = fp2_yearly.4001.b + + stress_impact = { + base = minor_stress_impact_loss + diligent = massive_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = diligent + } + } + } +} + +################################### +# County is increasingly religiously intertwined +# By Nick Meredith +################################### +fp2_yearly.4002 = { + type = character_event + title = fp2_yearly.4002.t + desc = fp2_yearly.4002.desc + theme = faith + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:realm_priest + animation = worry + } + + cooldown = { years = 30 } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #is Iberian + culture = { has_cultural_pillar = heritage_iberian } + + #has a court chaplain + exists = cp:councillor_court_chaplain + + #has a county that doesn't match your faith + any_directly_owned_province = { + faith != root.faith + } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + random_directly_owned_province = { + limit = { + faith != root.faith + } + save_scope_as = interfaith_province + } + cp:councillor_court_chaplain = { + save_scope_as = realm_priest + } + } + + option = { #I welcome a multifaith community. + name = fp2_yearly.4002.a + + add_character_modifier = { + modifier = fp2_multifaith_county_modifier + years = 10 + } + + scope:realm_priest = { + add_opinion = { + target = liege + modifier = annoyed_opinion + opinion = -30 + } + } + + stress_impact = { + zealous = major_stress_gain + cynical = minor_stress_loss + arrogant = medium_stress_gain + impatient = medium_stress_gain + arbitrary = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = impatient + has_trait = arrogant + } + } + } + } + + option = { #This must be stopped! + name = fp2_yearly.4002.b + + add_piety = minor_piety_gain + + scope:interfaith_province.county = { + change_county_control = medium_county_control_loss + set_county_faith = root.faith + add_county_modifier = { + modifier = fp2_religious_strife_modifier + years = 10 + } + } + + scope:realm_priest = { + add_opinion = { + target = liege + modifier = respect_opinion + opinion = 40 + } + } + + stress_impact = { + zealous = medium_stress_loss + cynical = medium_stress_gain + forgiving = major_stress_gain + just = medium_stress_gain + stubborn = minor_stress_gain + content = minor_stress_gain + patient = minor_stress_gain + trusting = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = forgiving + has_trait = just + } + } + } + } +} + +################################### +# The road to Santiago is under threat from bandits +# By Nick Meredith +################################### +fp2_yearly.4003 = { + type = character_event + title = fp2_yearly.4003.t + desc = fp2_yearly.4003.desc + theme = martial + override_background = { reference = terrain } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:steward + animation = worry + } + + trigger = { + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #is Iberian + culture = { has_cultural_pillar = heritage_iberian } + + #has a steward + exists = cp:councillor_steward + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + + #and is Christian + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + + #and owns at least one county on the road to Santiago + OR = { + has_title = title:c_santiago + has_title = title:c_astorga + has_title = title:c_leon + has_title = title:c_burgos + has_title = title:c_amaya + has_title = title:c_najera + has_title = title:c_navarra + } + } + + immediate = { + every_county_in_region = { + region = world_europe_west_iberia + limit = { # all counties on the road to Santiago + OR = { + this = title:c_santiago + this = title:c_astorga + this = title:c_leon + this = title:c_burgos + this = title:c_amaya + this = title:c_najera + this = title:c_navarra + } + OR = { + holder = root + holder.top_liege = root + } + } + add_to_list = camino_de_santiago + } + + faith = { + if = { + limit = { + any_faith_holy_order = { + any_leased_title = { + any_this_title_or_de_jure_above = { + is_in_list = camino_de_santiago + } + } + } + } + random_faith_holy_order = { + limit = { + any_leased_title = { + any_this_title_or_de_jure_above = { + is_in_list = camino_de_santiago + } + } + } + save_scope_as = santiago_defenders + } + scope:santiago_defenders = { + random_leased_title = { + limit = { + any_this_title_or_de_jure_above = { + is_in_list = camino_de_santiago + } + } + county = { save_scope_as = ho_province } + } + } + } + } + cp:councillor_steward = { + save_scope_as = steward + } + } + + option = { #Call upon a local Holy Order + name = fp2_yearly.4003.a + + trigger = { + exists = scope:ho_province + } + + scope:ho_province = { + add_county_modifier = { + modifier = fp2_camino_santiago_ho_protected_modifier + years = 10 + } + } + + custom_tooltip = fp2_yearly.4003.tt + + add_piety = minor_piety_gain + + remove_treasury_or_gold = minor_treasury_or_gold_value + + add_internal_flag = special + + ai_chance = { + base = 100 + } + } + + option = { #Pay for the protection of the road + name = fp2_yearly.4003.b + + random_in_list = { + list = camino_de_santiago + add_county_modifier = { + modifier = fp2_camino_santiago_protected_modifier + years = 10 + } + } + + add_piety = medium_piety_gain + + remove_treasury_or_gold = major_treasury_or_gold_value + + stress_impact = { + greedy = major_stress_impact_gain + arbitrary = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = greedy + has_trait = arrogant + } + } + } + } + + option = { #Pilgrims will have to fend for themselves + name = fp2_yearly.4003.c + + add_piety = medium_piety_loss + + stress_impact = { + base = miniscule_stress_impact_gain + zealous = major_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = humble + has_trait = compassionate + } + } + } + } +} + +################################### +# Talented Mozarab offers their services +# By Nick Meredith +################################### +fp2_yearly.4004 = { + type = character_event + title = fp2_yearly.4004.t + desc = fp2_yearly.4004.desc + theme = vassal + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:mozarab_wanderer + animation = marshal + } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_landed = yes + is_available_at_peace_adult = yes + + #Mozarabic exists... + exists = faith:mozarabic_church + + #...but you are not Mozarabic + NOT = { + faith = faith:mozarabic_church + } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + create_character = { + age = { 20 40 } + location = root.capital_province + gender_female_chance = { + if = { + limit = { root.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { root.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + random_traits_list = { + count = 1 + education_martial_3 = {} + education_martial_4 = {} + } + random_traits_list = { #Something nice + count = 2 + brave = {} + honest = {} + gregarious = {} + trusting = {} + compassionate = {} + generous = {} + humble = {} + calm = {} + } + random_traits_list = { + count = 1 + lustful = {} + chaste = {} + wrathful = {} + arrogant = {} + impatient = {} + patient = {} + impatient = {} + ambitious = {} + cynical = {} + zealous = {} + stubborn = {} + } + + trait = lifestyle_blademaster + + random_traits = no + + diplomacy = { min_template_low_skill max_template_average_skill } + martial = { min_template_decent_skill max_template_high_skill } + stewardship = { min_template_low_skill max_template_average_skill } + intrigue = { min_template_low_skill max_template_average_skill } + learning = { min_template_low_skill max_template_average_skill } + prowess = { min_template_decent_skill max_template_high_skill } + + culture = root.culture + faith = faith:mozarabic_church + + dynasty = none + after_creation = { + add_gold = { minor_gold_value medium_gold_value } + add_prestige = { minor_prestige_gain medium_prestige_gain } + add_piety = { minor_piety_gain medium_piety_gain } + add_trait_xp = { + trait = lifestyle_blademaster + value = { + integer_range = { + min = medium_lifestyle_random_xp_low + max = medium_lifestyle_random_xp_high + } + } + } + } + + save_scope_as = mozarab_wanderer + } + } + + option = { #Of course you may join my court! + name = fp2_yearly.4004.a + + add_piety = minor_piety_loss + + stress_impact = { + base = minor_stress_impact_gain + zealous = major_stress_impact_gain + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + add_courtier = scope:mozarab_wanderer + + scope:mozarab_wanderer = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + + option = { #Yes; so long as you convert + name = fp2_yearly.4004.b + + random_list = { + + 40 = { + + add_courtier = scope:mozarab_wanderer + + modifier = { + scope:mozarab_wanderer = { + has_trait = stubborn + } + add = -10 + } + + modifier = { + scope:mozarab_wanderer = { + has_trait = zealous + } + add = -20 + } + + modifier = { + scope:mozarab_wanderer = { + has_trait = arrogant + } + add = -5 + } + + modifier = { + scope:mozarab_wanderer = { + has_trait = wrathful + } + add = -5 + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_yearly.4004.b.succ + + left_icon = root + right_icon = scope:mozarab_wanderer + + scope:mozarab_wanderer = { + set_character_faith = root.faith + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + } + } + + 60 = { + + custom_tooltip = fp2_yearly.4004.tt + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_yearly.4004.b.fail + + left_icon = root + right_icon = scope:mozarab_wanderer + + scope:mozarab_wanderer = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -40 + } + } + } + } + } + + ai_chance = { + base = 100 + } + } + + option = { #Send them away + name = fp2_yearly.4004.c + + custom_tooltip = fp2_yearly.4004.c.tt + + scope:mozarab_wanderer = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -40 + } + } + ai_chance = { + base = 100 + } + } +} + +################################### +# Mozarabs in a city ask for their own quarter +# By Nick Meredith +################################### +fp2_yearly.4005 = { + type = character_event + title = fp2_yearly.4005.t + desc = { + first_valid = { + triggered_desc = { + trigger = { religion = religion:islam_religion } + desc = fp2_yearly.4005.desc.muslim + } + triggered_desc = { + trigger = { always = yes } + desc = fp2_yearly.4005.desc.christian + } + } + desc = fp2_yearly.4005.desc + } + theme = faith + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:mozarab_merchant + animation = worry + } + + cooldown = { years = 10 } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #Mozarabic exists... + exists = faith:mozarabic_church + + #...but you are not Mozarabic + NOT = { + faith = faith:mozarabic_church + } + + #and you have a county that has a city holding + any_held_county= { + any_county_province = { + has_holding_type = city_holding + } + } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + random_held_county = { + limit = { + any_county_province = { + has_holding_type = city_holding + } + } + save_scope_as = mozarab_quarter + } + + if = { + limit = { + any_pool_character = { + province = scope:mozarab_quarter.title_province + faith = faith:mozarabic_church + is_available_healthy_ai_adult = yes + } + } + random_pool_character = { + province = scope:mozarab_quarter.title_province + limit = { + faith = faith:mozarabic_church + is_available_healthy_ai_adult = yes + } + save_scope_as = mozarab_merchant + } + } + + else = { + create_character = { + age = { 20 40 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + random_traits_list = { + count = 1 + education_stewardship_3 = {} + education_stewardship_4 = {} + } + + random_traits = yes + + culture = scope:mozarab_quarter.culture + faith = faith:mozarabic_church + + dynasty = none + + save_scope_as = mozarab_merchant + } + } + } + + option = { #You may have a little enclave, as a treat + name = fp2_yearly.4005.a + + remove_treasury_or_gold = medium_treasury_or_gold_value + + scope:mozarab_quarter = { + add_county_modifier = { + modifier = fp2_mozarab_quarter_modifier + years = 10 + } + } + + scope:mozarab_merchant = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + } + + every_vassal = { + limit = { + has_trait = zealous + } + add_opinion = { + target = liege + modifier = impious_opinion + opinion = -20 + } + } + + stress_impact = { + zealous = major_stress_impact_gain + greedy = major_stress_impact_gain + arrogant = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = greedy + has_trait = arrogant + } + } + } + } + + option = { #Begone, heathen! + name = fp2_yearly.4005.b + + add_piety = medium_piety_gain + + scope:mozarab_merchant = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -40 + } + } + + every_vassal = { + limit = { + has_trait = zealous + NOT = { + faith = faith:mozarabic_church + } + } + add_opinion = { + target = liege + modifier = pious_opinion + opinion = 20 + } + } + + every_vassal = { + limit = { + faith = faith:mozarabic_church + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + + stress_impact = { + zealous = medium_stress_loss + cynical = medium_stress_gain + forgiving = major_stress_gain + just = medium_stress_gain + stubborn = minor_stress_gain + content = minor_stress_gain + patient = minor_stress_gain + trusting = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = forgiving + has_trait = just + } + } + } + } +} + +################################### +# Mozarabs ask for permission to build churches +# By Nick Meredith +################################### +fp2_yearly.4006 = { + type = character_event + title = fp2_yearly.4006.t + desc = fp2_yearly.4006.desc + theme = faith + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:mozarab_priest + animation = beg + } + + cooldown = { years = 30 } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #Mozarabic exists + exists = faith:mozarabic_church + + #You are not Christian at all + NOT = { + faith = { religion_tag = christianity_religion } + } + + #and you have a county that has a free holding slot + any_held_county = { + any_county_province = { + has_holding = no + } + } + + #and your capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + + exists = cp:councillor_court_chaplain + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + has_holding = no + } + } + save_scope_as = mozarab_church + } + + if = { + limit = { + any_pool_character = { + province = scope:mozarab_church.title_province + faith = faith:mozarabic_church + is_available_healthy_ai_adult = yes + has_trait = devoted + } + } + random_pool_character = { + province = scope:mozarab_church.title_province + limit = { + faith = faith:mozarabic_church + is_available_healthy_ai_adult = yes + } + save_scope_as = mozarab_priest + } + } + + else = { + create_character = { + age = { 20 40 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + random_traits_list = { + count = 1 + education_learning_3 = {} + education_learning_4 = {} + } + + trait = devoted + + random_traits = yes + + culture = scope:mozarab_church.culture + faith = faith:mozarabic_church + + dynasty = none + + save_scope_as = mozarab_priest + } + } + cp:councillor_court_chaplain = { + save_scope_as = realm_priest + } + } + + option = { #You can build a church + name = fp2_yearly.4006.a + + remove_treasury_or_gold = medium_treasury_or_gold_value + + root = { + add_character_modifier = { + modifier = fp2_mozarab_church_modifier + years = 30 + } + } + + scope:mozarab_priest = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + } + + scope:realm_priest = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + + stress_impact = { + zealous = major_stress_impact_gain + greedy = major_stress_impact_gain + arrogant = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = greedy + has_trait = arrogant + } + } + } + } + + option = { #You are not allowed to build a church + name = fp2_yearly.4006.b + + add_piety = minor_piety_gain + + root = { + add_character_modifier = { + modifier = fp2_mozarab_rejected_modifier + years = 30 + } + } + + scope:mozarab_priest = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -40 + } + } + + every_vassal = { + limit = { + faith = faith:mozarabic_church + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + + stress_impact = { + zealous = medium_stress_loss + compassionate = massive_stress_gain + generous = major_stress_gain + just = major_stress_gain + forgiving = medium_stress_gain + cynical = medium_stress_gain + content = medium_stress_gain + patient = minor_stress_gain + trusting = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = just + has_trait = forgiving + has_trait = cynical + has_trait = content + } + } + } + } +} + +################################### +# Finding a shell on the road to Santiago +# By Nick Meredith +################################### +fp2_yearly.4007 = { + type = character_event + title = fp2_yearly.4007.t + desc = fp2_yearly.4007.desc + theme = faith + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:realm_priest + animation = disapproval + } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #You have a realm priest + exists = cp:councillor_court_chaplain + + #You are Christian + faith = { religion_tag = christianity_religion } + + #You can see sea shells on the sea shore + NOT = { + has_trait = blind + } + + #You own a county on the road to Santiago + OR = { + has_title = title:c_santiago + has_title = title:c_astorga + has_title = title:c_leon + has_title = title:c_burgos + has_title = title:c_amaya + has_title = title:c_najera + has_title = title:c_navarra + } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + cp:councillor_court_chaplain = { + save_scope_as = realm_priest + } + } + + option = { #I'm keeping it and you're keeping your mouth closed m8 + name = fp2_yearly.4007.a + + root = { + create_artifact = { + name = fp2_scallop_shell_artifact + description = fp2_scallop_shell_artifact_desc + type = miscellaneous + visuals = pouch + modifier = artifact_same_faith_opinion_1_modifier + modifier = artifact_monthly_piety_1_modifier + save_scope_as = newly_created_artifact + } + + scope:newly_created_artifact = { + flag_as_trash_artifact = yes + } + } + + add_piety = minor_piety_loss + + scope:realm_priest = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + + stress_impact = { + zealous = massive_stress_impact_gain + honest = massive_stress_impact_gain + just = major_stress_impact_gain + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + generous = minor_stress_impact_gain + temperate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = honest + has_trait = just + has_trait = craven + } + } + } + } + + option = { #Ok fine I guess I won't keep the stolen valour shell + name = fp2_yearly.4007.b + + add_piety = miniscule_piety_value + + stress_impact = { + base = miniscule_stress_impact_loss + cynical = massive_stress_impact_gain + deceitful = massive_stress_impact_gain + greedy = major_stress_impact_gain + arbitrary = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = deceitful + has_trait = greedy + has_trait = arbitrary + } + } + } + } + + option = { #Who do you think they'll believe fam? + name = fp2_yearly.4007.c + + custom_tooltip = fp2_yearly.4007.c.tt.flavour + + scope:realm_priest = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + + stress_impact = { + base = miniscule_stress_impact_gain + zealous = massive_stress_impact_gain + honest = massive_stress_impact_gain + just = major_stress_impact_gain + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + generous = minor_stress_impact_gain + temperate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + cynical = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + greedy = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + duel = { + skill = intrigue + target = scope:realm_priest + + #You win the duel + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_yearly.4007.c.tt.success + send_interface_toast = { + title = fp2_yearly.4007.c.tt.success + left_icon = root + right_icon = scope:realm_priest + root = { + add_trait = pilgrim + add_piety = 500 + + create_artifact = { + name = fp2_scallop_shell_artifact + description = fp2_scallop_shell_artifact_desc + type = miscellaneous + visuals = pouch + modifier = artifact_same_faith_opinion_1_modifier + modifier = artifact_monthly_piety_1_modifier + save_scope_as = newly_created_artifact + } + + scope:newly_created_artifact = { + flag_as_trash_artifact = yes + } + } + } + } + + #You lose the duel + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_yearly.4007.c.tt.fail + send_interface_toast = { + title = fp2_yearly.4007.c.tt.fail + left_icon = root + right_icon = scope:realm_priest + root = { + add_piety = major_piety_loss + add_stress = medium_stress_gain + + create_artifact = { + name = fp2_fake_scallop_shell_artifact + description = fp2_fake_scallop_shell_artifact_desc + type = miscellaneous + visuals = pouch + modifier = artifact_same_faith_opinion_negative_1_modifier + modifier = artifact_monthly_piety_negative_1_modifier + save_scope_as = newly_created_artifact + } + + scope:newly_created_artifact = { + flag_as_trash_artifact = yes + } + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = deceitful + has_trait = greedy + has_trait = arbitrary + } + } + } + } +} + +################################### +# Folk stories around the fireside +# By Nick Meredith +################################### +fp2_yearly.4008 = { + type = character_event + title = fp2_yearly.4008.t + + override_background = { reference = bp1_bonfire } + + desc = { + desc = fp2_yearly.4008.desc.intro + random_valid = { + triggered_desc = { + trigger = { culture = culture:basque } + desc = fp2_yearly.4008.desc.basque.a + } + triggered_desc = { + trigger = { culture = culture:basque } + desc = fp2_yearly.4008.desc.basque.b + } + triggered_desc = { + trigger = { culture = culture:galician } + desc = fp2_yearly.4008.desc.galician.a + } + triggered_desc = { + trigger = { culture = culture:galician } + desc = fp2_yearly.4008.desc.galician.b + } + triggered_desc = { + trigger = { culture = culture:castilian } + desc = fp2_yearly.4008.desc.castilian.a + } + triggered_desc = { + trigger = { culture = culture:castilian } + desc = fp2_yearly.4008.desc.castilian.b + } + triggered_desc = { + trigger = { culture = culture:catalan } + desc = fp2_yearly.4008.desc.catalan.a + } + triggered_desc = { + trigger = { culture = culture:catalan } + desc = fp2_yearly.4008.desc.catalan.b + } + triggered_desc = { + trigger = { culture = culture:aragonese } + desc = fp2_yearly.4008.desc.aragonese.a + } + triggered_desc = { + trigger = { culture = culture:aragonese } + desc = fp2_yearly.4008.desc.aragonese.b + } + desc = fp2_yearly.4008.desc.spain.a + desc = fp2_yearly.4008.desc.spain.b + desc = fp2_yearly.4008.desc.spain.c + } + desc = fp2_yearly.4008.desc.ending + } + + theme = friendly + + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:old_crone + animation = throne_room_conversation_1 + } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_landed_or_landless_administrative = yes + is_available_at_peace_adult = yes + + #You are Iberian + culture = { has_cultural_pillar = heritage_iberian } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.capital_province + age = { 50 80 } + culture = { has_cultural_pillar = heritage_iberian } + is_available_healthy_ai_adult = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { + age = { 50 80 } + culture = { has_cultural_pillar = heritage_iberian } + is_available_healthy_ai_adult = yes + } + save_scope_as = old_crone + } + } + + else = { + create_character = { + age = { 50 80 } + location = root.capital_province + gender = female + + trait = lifestyle_poet + + random_traits = yes + + culture = root.culture + faith = root.faith + + dynasty = none + + save_scope_as = old_crone + } + } + } + + option = { #What a fun old story! + name = fp2_yearly.4008.a + + add_stress = minor_stress_loss + + ai_chance = { + base = 100 + } + } + + option = { #Gimme a lil prestige for not believe in ghosts + name = fp2_yearly.4008.b + + add_prestige = minor_prestige_value + + stress_impact = { + cynical = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = arrogant + has_trait = stubborn + } + } + } + } + + option = { #Invite her to your court + name = fp2_yearly.4008.c + + trigger = { #Make sure they have Royal Court but no poet + has_ep1_dlc_trigger = yes + can_appoint_char_to_court_position = { + CHAR = scope:old_crone + COURT_POS = court_poet_court_position + } + } + + hidden_effect = { + add_courtier = scope:old_crone + scope:old_crone = { + add_trait = whole_of_body + } + } + + court_position_grant_effect = { + EMPLOYER = root + CANDIDATE = scope:old_crone + POS = court_poet + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:old_crone + opinion = 50 + } + + ai_chance = { + base = 100 + } + } +} + +################################### +# Visiting the Malato Tree +# By Nick Meredith +################################### +fp2_yearly.4009 = { + type = character_event + title = fp2_yearly.4009.t + desc = fp2_yearly.4009.desc + theme = crown + override_background = { reference = wilderness_forest } + left_portrait = { + character = root + animation = admiration + } + + cooldown = { years = 30 } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #You are Basque + culture = culture:basque + + #You own the county where the tree is + has_title = title:c_viscaya + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + title:c_viscaya = { save_scope_as = viscaya } + culture = {save_scope_as = root_culture} + } + + option = { #One day I too will shoot all their nobs! + name = fp2_yearly.4009.a + + every_vassal = { + custom = custom.every_same_culture_vassal + limit = { + culture = culture:basque + } + add_opinion = { + target = liege + modifier = respect_opinion + opinion = 20 + } + } + + every_vassal = { + custom = custom.every_different_culture_vassal + limit = { + NOT = { + culture = culture:basque + } + } + add_opinion = { + target = liege + modifier = scared_opinion + opinion = -20 + } + } + + stress_impact = { + calm = medium_stress_impact_gain + craven = medium_stress_impact_gain + content = major_stress_impact_gain + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = craven + has_trait = content + has_trait = lazy + has_trait = impatient + } + } + } + } + + option = { #Perhaps I need to dream bigger + name = fp2_yearly.4009.b + + every_vassal = { + limit = { + culture = culture:basque + } + add_opinion = { + target = liege + modifier = disappointed_opinion + opinion = -20 + } + } + + every_vassal = { + limit = { + NOT = { + culture = culture:basque + } + } + add_opinion = { + target = liege + modifier = pleased_opinion + opinion = 20 + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + calm = medium_stress_impact_gain + craven = medium_stress_impact_gain + content = major_stress_impact_gain + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = craven + has_trait = content + has_trait = lazy + has_trait = impatient + } + } + } + } + + option = { #Take some bark from the tree + name = fp2_yearly.4009.c + + root = { + create_artifact = { + name = fp2_malato_bark_artifact + description = fp2_malato_bark_artifact_desc + type = miscellaneous + visuals = pouch + modifier = artifact_vassal_limit_1_modifier + modifier = artifact_monthly_martial_lifestyle_xp_1_modifier + save_scope_as = newly_created_artifact + } + + scope:newly_created_artifact = { + flag_as_trash_artifact = yes + } + } + + ai_chance = { + base = 100 + } + } +} + +################################### +# Finding a Verraco +# By Nick Meredith +################################### +fp2_yearly.4010 = { + type = character_event + title = fp2_yearly.4010.t + desc = fp2_yearly.4010.desc + override_background = { reference = farmland } + theme = learning + left_portrait = { + character = root + animation = personality_rational + } + + cooldown = { years = 20 } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #owns land formerly inhabited by the Vettones + OR = { + has_title = title:c_plasencia + has_title = title:c_caceres + has_title = title:c_merida + has_title = title:c_malagon + has_title = title:c_almader + has_title = title:c_medellin + has_title = title:c_toledo + } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + every_county_in_region = { + region = world_europe_west_iberia + limit = { # all relevant counties + OR = { + this = title:c_plasencia + this = title:c_caceres + this = title:c_merida + this = title:c_malagon + this = title:c_almader + this = title:c_medellin + this = title:c_toledo + } + } + add_to_list = verracos_counties + } + random_in_list = { + list = verracos_counties + save_scope_as = verraco_county + } + } + + option = { # Maybe these were tombs for religious figures? + name = fp2_yearly.4010.a + + trigger = { + faith = { religion_tag = christianity_religion } + } + + duel = { + skill = learning + value = decent_skill_rating + + #Sounds good to us! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_yearly.4010.a.success + send_interface_toast = { + title = fp2_yearly.4010.a.success + type = event_toast_effect_good + left_icon = root + add_prestige = medium_prestige_value + } + scope:verraco_county = { + add_county_modifier = { + modifier = fp2_saints_tombs_modifier + years = 20 + } + } + } + + #What the hell are you talking about? + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_yearly.4010.a.fail + send_interface_toast = { + title = fp2_yearly.4010.a.fail + type = event_toast_effect_bad + left_icon = root + stress_impact = { + base = medium_stress_gain + ambitious = major_stress_impact_gain + zealous = medium_stress_impact_gain + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = zealous + } + } + } + } + + option = { # We can use these for buildings + name = fp2_yearly.4010.b + + trigger = { + NOT = { + faith = { religion_tag = islam_religion } + } + } + + scope:verraco_county = { + add_county_modifier = { + modifier = fp2_dismantling_verracos_modifier + years = 20 + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + calm = medium_stress_impact_gain + content = medium_stress_impact_gain + humble = medium_stress_impact_gain + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = content + has_trait = lazy + has_trait = impatient + } + } + } + } + + option = { # Tear these blasphemous things down! + name = fp2_yearly.4010.c + + trigger = { + faith = { religion_tag = islam_religion } + } + + add_piety = minor_piety_gain + + scope:verraco_county = { + add_county_modifier = { + modifier = fp2_dismantling_verracos_modifier + years = 20 + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = lazy + } + } + } + } + + option = { # Kinda interesting, I guess + name = fp2_yearly.4010.d + + ai_chance = { + base = 100 + } + } +} + +################################### +# Destroying the Vineyards +# by Ola Jentzsch +################################### +fp2_yearly.8000 = { + type = character_event + title = fp2_yearly.8000.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_religion = religion:islam_religion + } + desc = fp2_yearly.8000.desc_muslim_opening + } + desc = fp2_yearly.8000.desc_jewish_opening + } + first_valid = { + triggered_desc = { + trigger = { + has_title = title:c_cadiz + } + desc = fp2_yearly.8000.desc_jerez + } + desc = fp2_yearly.8000.desc_not_jerez + } + } + + theme = realm + override_background = { reference = garden } + + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:hof_emissary + animation = chancellor + } + + lower_left_portrait = { + character = scope:vinoclast_caliph + } + + + + trigger = { + has_fp2_dlc_trigger = yes + + OR = { + has_religion = religion:islam_religion + has_religion = religion:judaism_religion + } + + root.faith = { + OR = { + has_doctrine = tenet_religious_legal_pronouncements + has_doctrine = tenet_literalism + has_doctrine = tenet_adaptive + } + } + + faith.religious_head != root + + exists = root.faith.religious_head + + root.faith.religious_head = { is_ai = yes } + + fp2_character_involved_in_struggle_trigger = yes + + any_held_county = { + county_has_province_with_terrain = { + terrain = farmlands + terrain = plains + terrain = hills + terrain = floodplains + } + } + } + + cooldown = { years = 50 } + + immediate = { + + + random_held_county = { + limit = { this = title:c_cadiz } + save_scope_as = vineyard_county + } + + IF = { + limit = { + NOT = { + exists = scope:vineyard_county + } + } + random_held_county = { + limit = { + county_has_province_with_terrain = { + terrain = farmlands + terrain = plains + terrain = hills + terrain = floodplains + } + } + save_scope_as = vineyard_county + } + } + + title:b_jerez = { + if = { + limit = { + OR = { + holder = root + holder = { + any_liege_or_above = { + this = root + } + } + } + } + save_scope_as = jerez_vineyards + } + } + + root.faith.religious_head = { save_scope_as = vinoclast_caliph } + + hidden_effect = { + scope:vinoclast_caliph = { + IF = { + limit = { + NOT = { + has_character_modifier = crusading_against_iberian_wine_modifier + } + } + } + add_character_modifier = { + modifier = crusading_against_iberian_wine_modifier + years = 30 + } + } + } + + create_character = { #this is the head of faith's emissary + age = { 25 75 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance #could be female, if given the right context. + trait = zealous + template = priest_character_template + save_scope_as = hof_emissary #this saves him as a scope so we can get nice effects to bounce off him! + } + } + + + option = { #Destroying fine wine? Have the caliph gone insane? + name = fp2_yearly.8000.a + trigger = { + NOT = { has_trait = zealous } + OR = { + has_trait = drunkard + has_trait = gregarious + has_trait = lifestyle_reveler + } + } + + ai_chance = { #hedonistic AI pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.2 + ai_energy = 0.7 + ai_greed = -0.5 + ai_zeal = -0.5 + } + } + + stress_impact = { + craven = minor_stress_impact_gain + temperate = medium_stress_impact_gain + trusting = minor_stress_impact_gain + } + + add_piety_level = -1 + + scope:vinoclast_caliph = { + progress_towards_rival_effect = { + REASON = rival_vineyard_burned + CHARACTER = root + OPINION = -25 + } + } + + add_character_modifier = { + modifier = wine_supply_secure_modifier + years = 30 + } + } + + + option = { #Let's burn 'em + name = fp2_yearly.8000.b + + ai_chance = { #radically zealous AIs pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_zeal = 0.9 + ai_compassion = -0.5 + ai_greed = -0.5 + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + cynical = minor_stress_impact_gain + gluttonous = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + lifestyle_reveler = major_stress_impact_gain + drunkard = massive_stress_impact_gain + } + + add_piety = major_piety_gain + + scope:vinoclast_caliph = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + scope:vineyard_county = { + add_county_modifier = { + modifier = vineyards_burnt_county_modifier + years = 20 + } + } + + if = { + limit = { has_title = title:c_cadiz } + add_hook = { + type = favor_hook + target = scope:vinoclast_caliph + } + } + } + + + option = { #Never, I like wine + name = fp2_yearly.8000.c + + ai_chance = { #administrative or stubborn AI pick this option + base = 10 + ai_value_modifier = { + ai_honor = 0.2 + ai_energy = 0.5 + ai_greed = 0.5 + ai_compassion = 0.3 + ai_zeal = -0.8 + } + } + + stress_impact = { + craven = minor_stress_impact_gain + temperate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + + add_piety_level = -1 + + scope:vinoclast_caliph = { + add_opinion = { + target = root + opinion = -30 + modifier = angry_opinion + } + } + + scope:vineyard_county = { + add_county_modifier = { + modifier = vineyards_protected_county_modifier + years = 50 + } + } + } +} + +################################### +# Assembling the Cortes +# by Ola Jentzsch +################################### +scripted_trigger people_loving_councillor_trigger = { + is_available_healthy_ai_adult = yes + NOT = { is_vassal_of = root } +} + +fp2_yearly.8001 = { + type = character_event + title = fp2_yearly.8001.t + desc = fp2_yearly.8001.desc + theme = realm + + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:commoner_enthusiast + animation = chancellor + } + + trigger = { + has_fp2_dlc_trigger = yes + any_held_county = { any_county_province = { geographical_region = world_europe_west_iberia } } + + culture = { has_cultural_pillar = heritage_iberian } + + government_has_flag = government_is_feudal + + highest_held_title_tier >= tier_kingdom + + gold < medium_gold_value + + any_councillor = { people_loving_councillor_trigger = yes } + } + + cooldown = { years = 30 } + + immediate = { + random_councillor = { + limit = { people_loving_councillor_trigger = yes } + save_scope_as = commoner_enthusiast + } + } + + option = { #Invite the cities' representatives + name = fp2_yearly.8001.a + + add_character_modifier = { + modifier = cortes_modifier + years = 20 + } + + add_prestige = medium_prestige_loss + + scope:commoner_enthusiast = { + add_opinion = { + target = root + opinion = 10 + modifier = took_my_advice_opinion + } + } + + custom_tooltip = fp2_flavor.8001_vassal_opinion + hidden_effect = { + every_vassal = { + IF = { + limit = { + OR = { + has_trait = ambitious + has_trait = arrogant + has_trait = callous + has_trait = cynical + has_trait = wrathful + } + } + add_opinion = { + target = root + opinion = -10 + modifier = privileges_to_people_opinion + } + } + } + } + + ai_chance = { #Administrative or visionary characters pick this option, but it's also the Christian thing to do + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = 0.5 + ai_rationality = 0.6 + ai_zeal = 0.3 + } + } + + stress_impact = { + # Characters who are set in their ways or have no respect for common folk find this a very unappealing option. + arrogant = medium_stress_impact_gain + august = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + option = { #Invite everyone! I mean everyone. + name = fp2_yearly.8001.b + + trigger = { + NOT = { has_character_modifier = associates_with_strange_peasants_modifier } #since this modifier is a re-use from one of the learning lifestyle events, this is a safety measure to prevent root from getting a double of the same modifier + } + + add_character_modifier = { + modifier = associates_with_strange_peasants_modifier + years = 20 + } + + add_character_modifier = { + modifier = extra_large_cortes_modifier + years = 20 + } + + add_prestige = medium_prestige_loss + + scope:commoner_enthusiast = { + add_opinion = { + target = root + opinion = 10 + modifier = took_my_advice_opinion + } + } + + ai_chance = { #this is picked by AI who are hypersocial to the point of madness, or visionary way beyond their time + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_rationality = -0.5 + ai_greed = -0.5 + ai_vengefulness = -0.5 + ai_zeal = -0.3 + } + } + + stress_impact = { + # Characters who are careful or hate the masses find this a very unappealing option. + eccentric = minor_stress_impact_loss + craven = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + august = minor_stress_impact_gain + shy = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + option = { #No, the nobles knows best, as we always have. + name = fp2_yearly.8001.c + + add_prestige = medium_prestige_gain + + scope:commoner_enthusiast = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + + ai_chance = { #this is picked by AI who want to safeguard their privileges. + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_vengefulness = 0.5 + ai_rationality = 0.2 + ai_compassion = -0.5 + ai_energy = -0.5 + } + } + + stress_impact = { + # Characters who likes efficiency and democracy dislikes this option + ambitious = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + diligent = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + } +} + +################################### +# Dietary Dilemma +# By Ola Jentzsch +################################### +fp2_yearly.8002 = { + type = character_event + title = fp2_yearly.8002.t + desc = fp2_yearly.8002.desc + theme = faith + override_background = { reference = council_chamber } + + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:preoccupied_ulama + animation = worry + } + + trigger = { + has_fp2_dlc_trigger = yes + any_realm_province = { is_coastal = yes } + + OR = { + has_religion = religion:islam_religion + has_religion = religion:judaism_religion + } + + faith = { + OR = { + has_doctrine = tenet_religious_legal_pronouncements + has_doctrine = tenet_literalism + has_doctrine = tenet_adaptive + } + } + + any_held_title = { is_head_of_faith = no } + + exists = cp:councillor_court_chaplain + } + + cooldown = { years = 50 } + + immediate = { + + cp:councillor_court_chaplain = { save_scope_as = preoccupied_ulama } + + random_realm_province = { + limit = { + is_coastal = yes + } + save_scope_as = beached_whale_province + } + } + + option = { #Make a ruling + name = fp2_yearly.8002.a + trigger = { + OR = { + has_trait = sayyid + has_trait = crusader_king + has_trait = order_member + piety_level >= 4 + learning >= very_high_skill_rating + } + } + + add_character_modifier = { + modifier = lay_ruler_issued_fatwa_modifier + years = 10 + } + + scope:preoccupied_ulama = { + add_opinion = { + target = root + opinion = -10 + modifier = dismissed_me_opinion + } + } + + ai_chance = { #rational AIs pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = 0.9 + ai_zeal = -0.7 + } + } + + stress_impact = { + # Craven character's don't wanna take the risk, and humble and trusting doesn't want to undermine the ulama + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + } + + option = { #Just go to town on it + name = fp2_yearly.8002.b + + scope:preoccupied_ulama = { + add_opinion = { + target = root + opinion = -10 + modifier = dismissed_me_opinion + } + } + + random_list = { + 60 = { + modifier = { + add = 30 + has_trait = whole_of_body + } + send_interface_toast = { + left_icon = root + title = healthy_whale_toast + add_character_modifier = { + modifier = mystery_meat_health_benefits_modifier + years = 10 + } + } + } + 40 = { + send_interface_toast = { + left_icon = root + title = unhealthy_whale_toast + add_character_modifier = { + modifier = mystery_meat_unhealth_benefits_modifier + years = 10 + } + } + } + } + + ai_chance = { #hungry AI pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = -0.8 + } + } + + stress_impact = { #temperate or cautious characters don't wanna eat strange blobs washed up from the Atlantic + inappetetic = medium_stress_impact_gain + temperate = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + + # but gluttons really wanna try it! + comfort_eater = medium_stress_impact_loss + gluttonous = medium_stress_impact_loss + lifestyle_reveler = minor_stress_impact_loss + } + } + + option = { #Be cautious and wait for official ruling + name = fp2_yearly.8002.c + + scope:preoccupied_ulama = { + add_opinion = { + target = root + opinion = 20 + modifier = took_my_advice_opinion + } + } + + ai_chance = { #cautious but faithful AIs pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 0.7 + ai_boldness = -0.5 + } + } + + stress_impact = { + # Ambitious or Impatient characters don't wanna wait for the ulama + ambitious = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + impatient = medium_stress_impact_gain + } + } + + option = { #Burn the carcass, just to be safe + name = fp2_yearly.8002.d + + add_dread = minor_dread_gain + + scope:preoccupied_ulama = { + add_opinion = { + target = root + opinion = 10 + modifier = admires_resolve_opinion + } + } + + + random = { + chance = 10 + custom_tooltip = exploding_whale.tt + send_interface_toast = { + left_icon = root + title = exploding_whale_toast + root = { + increase_wounds_effect = { REASON = by_exploding_whale } #it can happen... :D + } + } + } + + ai_chance = { #overly zealous AIs pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = 0.5 + } + } + + stress_impact = { + # Rational characters find this to be total overkill + cynical = minor_stress_impact_gain + + #but zealous truly prefer to burn things + zealous = medium_stress_impact_loss + } + } +} + +################################### +# Flight of Fancy +# By Ola Jentzsch +################################### +# Inspired by an idea by Isabella welch +########################################## +fp2_yearly.8003 = { + type = character_event + title = fp2_yearly.8003.t + desc = fp2_yearly.8003.desc + theme = family + left_portrait = { + character = scope:enthusiastic_child + animation = admiration + } + right_portrait = { + character = scope:flying_polymath + animation = beg + } + + cooldown = { years = 125 } # Should be replaced with a playthrough cooldown (but global vars are too heavy atm) + + trigger = { + has_fp2_dlc_trigger = yes + is_landed = yes + is_ai = no + any_child = { + is_available_child = yes + age >= 6 + age <= 13 + NOT = { has_trait = blind } + } + has_trait = eccentric + OR = { + capital_province = { geographical_region = world_europe_west_iberia } + culture = { has_cultural_pillar = heritage_iberian } + } + } + + weight_multiplier = { + base = 0.4 + modifier = { + AND = { + current_year > 866 + current_year < 890 + NOT = { exists = global_var:ibnfirnas_created } + } + add = 0.6 + } + } + + immediate = { + + random_child = { + limit = { + is_available_child = yes + age >= 6 + age <= 13 + NOT = { has_trait = blind} + } + save_scope_as = enthusiastic_child + } + + root.capital_province = { save_scope_as = flight_capital } + + if = { + limit = { #their rough period of activity + AND = { + current_year > 866 + current_year < 890 + } + NOT = { exists = global_var:ibnfirnas_created } #makes sure that he wasn't already spawned by the event elsewhere (mostly relevant in multiplayer, since this is a player-only event) + } + create_character = { + age = { 56 80 } #their rough age during the period of their flourishing + location = root.capital_province + name = "Abbas ibn Firnas" #Armen Firman + gender = male + template = scholar_character + trait = intellect_good_1 + trait = lifestyle_poet + trait = education_learning_4 + random_traits_list = { #his personality + count = 3 + ambitious = {} + brave = {} + diligent = {} + impatient = {} + } + culture = culture:baranis + dynasty = none + faith = faith:muwalladi + save_scope_as = flying_polymath + } + set_global_variable = ibnfirnas_created + } + + else = { #or it defaults to a random one + create_character = { + age = { 50 80 } + location = root.capital_province + template = scholar_character + trait = intellect_good_2 + trait = education_learning_3 + trait = architect + random_traits_list = { + count = 3 + brave = {} + calm = {} + diligent = {} + cynical = {} + humble = {} + patient = {} + } + culture = root.capital_province.culture + faith = root.faith + save_scope_as = flying_polymath + } + } + hidden_effect = { + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_physician + LEVEL_1 = no + LEVEL_3 = yes + } + } + } + + option = { #Very well, I shall allow it + name = fp2_yearly.8003.a + flavor = fp2_yearly.8003_child_reaction + + + scope:enthusiastic_child = { + add_opinion = { + target = root + opinion = 30 + modifier = pleased_opinion + } + } + + random_list = { + 30 = { + trigger = { + scope:enthusiastic_child = { + number_of_personality_traits <= 2 + NOT = { has_trait = brave } + } + } + send_interface_toast = { + title = polymath_flight_attempt_toast.success + left_icon = scope:enthusiastic_child + right_icon = scope:flying_polymath + add_prestige = medium_prestige_gain + add_courtier = scope:flying_polymath + scope:enthusiastic_child = { add_trait_force_tooltip = brave } + } + } + 30 = { + send_interface_toast = { + title = polymath_flight_attempt_toast.success + left_icon = scope:enthusiastic_child + right_icon = scope:flying_polymath + add_prestige = medium_prestige_gain + add_courtier = scope:flying_polymath + } + modifier = { + add = 30 + scope:enthusiastic_child = { + OR = { + number_of_personality_traits >= 3 + has_trait = brave + } + } + } + } + 20 = { + trigger = { + scope:enthusiastic_child = { + number_of_personality_traits <= 2 + NOT = { has_trait = sadistic } + } + } + send_interface_toast = { + title = polymath_flight_attempt_toast.failure + left_icon = scope:enthusiastic_child + right_icon = scope:flying_polymath + scope:flying_polymath = { + death = { death_reason = death_flight_attempt } + } + scope:enthusiastic_child = { add_trait_force_tooltip = sadistic} + } + } + 20 = { + trigger = { + scope:enthusiastic_child = { + NOT = { has_trait = depressed } + } + } + send_interface_toast = { + title = polymath_flight_attempt_toast.failure + left_icon = scope:enthusiastic_child + right_icon = scope:flying_polymath + scope:flying_polymath = { + death = { death_reason = death_flight_attempt } + } + scope:enthusiastic_child = { add_trait_force_tooltip = depressed_1 } + } + modifier = { + add = 20 + scope:enthusiastic_child = { + number_of_personality_traits >= 3 + } + } + } + 40 = { + trigger = { + scope:enthusiastic_child = { + has_trait = depressed + OR = { + has_trait = brave + has_trait = sadistic + } + } + } + send_interface_toast = { + title = polymath_flight_attempt_toast.failure + left_icon = scope:enthusiastic_child + right_icon = scope:flying_polymath + scope:flying_polymath = { + death = { death_reason = death_flight_attempt } + } + scope:enthusiastic_child = { add_stress = minor_stress_gain } + } + } + } + + stress_impact = { #Compassionate people worry about bystanders getting hurt + compassionate = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + } + + + + option = { #I too, want to fly! + name = fp2_yearly.8003.b + + duel = { #time to fly! + skill = learning + value = high_skill_rating + + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = flight_attempt_toast.success + left_icon = root + + add_character_modifier = { + modifier = saw_the_world_from_above_modifier + years = 30 + } + scope:enthusiastic_child = { + add_opinion = { + target = root + opinion = 30 + modifier = pleased_opinion + } + } + random = { + chance = 50 + root = { give_nickname = nick_the_flying } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = flight_attempt_toast.failure + left_icon = root + + increase_wounds_effect = { REASON = flight_attempt } + + scope:enthusiastic_child = { + add_opinion = { + target = root + opinion = -20 + modifier = scared_opinion + } + } + random = { + chance = 50 + root = { give_nickname = nick_the_flightless } + } + } + } + } + + stress_impact = { #cravens, contents and the bedridden don't wanna take the risk + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + ill = minor_stress_impact_gain + infirm = medium_stress_impact_gain + brave = minor_stress_impact_loss + } + } + + option = { #No, this is madness! + name = fp2_yearly.8003.c + + scope:enthusiastic_child = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + brave = minor_stress_impact_gain + curious = minor_stress_impact_gain + } + } +} + +################################### +# Translation Schools +# By Ola Jentzsch +################################### +scripted_trigger fp2_yearly.8004_court_chaplain_traits = { + has_council_position = councillor_court_chaplain + learning >= excellent_skill_level + is_available_ai_adult = yes + NOT = { + has_trait = dull + has_trait = vengeful + has_trait = zealous + } +} + +fp2_yearly.8004 = { + type = character_event + title = fp2_yearly.8004.t + + desc = { + first_valid = { + desc = fp2_yearly.8004.desc_opening + } + first_valid = { + triggered_desc = { + trigger = { + scope:translation_enthusiast = { fp2_yearly.8004_court_chaplain_traits = yes } + } + desc = fp2_yearly.8004.desc_chaplain + } + desc = fp2_yearly.8004.desc_wanderer + } + } + + + theme = learning + + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:translation_enthusiast + animation = chancellor + } + + trigger = { + has_fp2_dlc_trigger = yes + OR = { + AND = { + exists = struggle:iberian_struggle + struggle:iberian_struggle = { is_struggle_phase = struggle_iberia_phase_conciliation } + fp2_character_involved_in_struggle_trigger = yes + } + AND = { + has_global_variable = fp2_struggle_conciliation_ending + root.capital_province = { geographical_region = world_europe_west_iberia } + } + } + + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + + cooldown = { years = 100 } + + immediate = { + + if = { #This looks to see if Gerard of Cremona will be used in the event + limit = { #his rough period of activity + AND = { + current_year > 1144 + current_year < 1190 + } + NOT = { exists = global_var:gerard_of_cremona_created } #makes sure that he wasn't already spawned by the event elsewhere + is_ai = no + } + create_character = { + age = { 34 70 } #his rough age during the period of his flourishing + location = root.capital_province + name = "Gherardo da Cremona" #Gerard of Cremona + gender = male + template = scholar_character + trait = scholar + trait = education_learning_4 + random_traits_list = { #his personality + count = 3 + diligent = {} + impatient = {} + calm = {} + cynical = {} + } + culture = culture:italian + dynasty = none + faith = faith:catholic + save_scope_as = translation_enthusiast #this is needed to get the loc right + } + set_global_variable = gerard_of_cremona_created + } + + if = { #or a brilliant court chaplain, if you happen to have one + limit = { + NOT = { exists = scope:translation_enthusiast } + } + random_councillor = { + limit = { fp2_yearly.8004_court_chaplain_traits = yes } + save_scope_as = translation_enthusiast + } + } + + if = { #or it defaults to a random scholar + limit = { + NOT = { exists = scope:translation_enthusiast } + } + create_character = { + age = { 32 50 } + location = root.capital_province + template = scholar_character + trait = education_learning_3 + random_traits_list = { + count = 3 + ambitious = {} + calm = {} + diligent = {} + cynical = {} + humble = {} + patient = {} + } + culture = root.culture + faith = root.faith + save_scope_as = translation_enthusiast + } + } + + root.capital_county = { save_scope_as = translation_capital } + } + + option = { #I shall spare #italic no#! expense to find the most capable people + name = fp2_yearly.8004.a + + + remove_treasury_or_gold = monumental_treasury_or_gold_value #this is expensive! + + if = { + limit = { + NOT = { cp:councillor_court_chaplain = scope:translation_enthusiast } + } + add_courtier = scope:translation_enthusiast #he's added to root's court + } + + duel = { #you try to recruit a bunch of genius translators + skill = learning + value = very_high_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + modifier = { + add = 40 + has_trait = scholar + } + modifier = { + add = 40 + has_trait = diligent + } + modifier = { + add = 40 + has_trait = gregarious + } + modifier = { + add = 40 + has_trait = diplomat + } + modifier = { + add = 40 + has_trait = administrator + } + modifier = { + add = 40 + culture = { has_cultural_tradition = tradition_xenophilic } + } + modifier = { + add = 60 + any_held_county = { + any_county_province = { + barony = title:b_toledo + } + } + } + modifier = { + add = 60 + prestige_level >= high_prestige_level + } + send_interface_toast = { #you succeed! + title = recruiting_brilliance_toast.success + left_icon = root + add_character_modifier = { + modifier = great_translation_school_modifier + years = 30 + } + add_prestige = major_prestige_gain + if = { + limit = { is_ai = no } + give_nickname = nick_the_wise + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = recruiting_mediocrity_toast.failure + left_icon = root + add_character_modifier = { + modifier = mediocre_translation_school_modifier + years = 30 + } + add_prestige = minor_prestige_gain + } + } + } + + ai_chance = { #rational and ambitious AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 1 + ai_boldness = 0.7 + ai_zeal = -0.3 + ai_vengefulness = -0.5 + } + } + + stress_impact = { + # Content or lazy characters don't want to make the effort + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + + # Nor do self-absorbed ones + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + + #and impatient ones don't wanna wait + impatient = minor_stress_impact_gain + } + } + + option = { #If you are so capable, #italic you#! can do all the translations + name = fp2_yearly.8004.b + + remove_treasury_or_gold = medium_treasury_or_gold_value #this is expensive! + + + if = { + limit = { + NOT = { cp:councillor_court_chaplain = scope:translation_enthusiast } + } + add_courtier = scope:translation_enthusiast #he's added to root's court + } + + scope:translation_enthusiast = { + add_opinion = { + target = root + opinion = -20 + modifier = unfair_expectations_opinion + } + } + + add_character_modifier = { + modifier = translation_effort_modifier + years = 30 + } + + ai_chance = { #rational and cautious AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + ai_boldness = -0.4 + } + } + + stress_impact = { + # self-absorbed cheapskates still don't want to pay for this + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + + #and ambitious and diligent feel it's not enough + ambitious = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + } + + option = { #I would rather have the books collecting dust..." + name = fp2_yearly.8004.c + + add_character_modifier = { + modifier = dusty_libraries_modifier + years = 30 + } + + + if = { + limit = { cp:councillor_court_chaplain = scope:translation_enthusiast } + scope:translation_enthusiast = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + } + + if = { + limit = { + NOT = { cp:councillor_court_chaplain = scope:translation_enthusiast } + } + scope:translation_enthusiast = { silent_disappearance_effect = yes } + } + + ai_chance = { #zealous or ignorant AI pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.4 + ai_energy = -0.7 + } + } + + stress_impact = { + # ambitious or learned characters cry from this + ambitious = minor_stress_impact_gain + diligent = minor_stress_impact_gain + generous = minor_stress_impact_gain + scholar = major_stress_impact_gain + } + } +} + +################################### +# Under the Stone Pine +# by Ola Jentzsch +################################### +fp2_yearly.8005 = { + type = character_event + title = fp2_yearly.8005.t + desc = { + desc = fp2_yearly.8005.desc_opening + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_iberian } + } + desc = fp2_yearly.8005.desc_iberian + } + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_arabic } + } + desc = fp2_yearly.8005.desc_arabic + } + desc = fp2_yearly.8005.desc_language_neutral + } + desc = fp2_yearly.8005.desc_middle_part + first_valid = { + triggered_desc = { + trigger = { current_year >= 1120 } + desc = fp2_yearly.8005.desc_post_troubadours + } + desc = fp2_yearly.8005.desc_pre_troubadours + } + } + theme = love + left_portrait = { + character = root + animation = sadness + } + + cooldown = { years = 50 } + + trigger = { + has_fp2_dlc_trigger = yes + is_landed_or_landless_administrative = yes + OR = { + capital_province = { geographical_region = world_europe_west_iberia } + culture = { has_cultural_pillar = heritage_iberian } + } + } + + immediate = { + + random_relation = { + type = lover + save_scope_as = courtly_lover + } + + capital_county = { save_scope_as = tree_capital } + } + + option = { #Embrace the love in your heart + name = fp2_yearly.8005.a + + trigger = { + any_relation = { type = lover } + NOT = { has_trait = lifestyle_poet } + } + + add_trait = lifestyle_poet + + scope:courtly_lover = { + add_opinion = { + target = root + opinion = 10 + modifier = flattered_opinion + } + } + + ai_chance = { #energetic, honorable and compassionate AI goes for this option + base = 10 + ai_value_modifier = { + ai_energy = 0.5 + ai_compassion = 0.6 + ai_honor = 0.5 + ai_rationality = -0.5 + } + } + + stress_impact = { + chaste = major_stress_impact_gain + content = minor_stress_impact_gain + arrogant = major_stress_impact_gain + callous = major_stress_impact_gain + } + } + + option = { #Feel something + name = fp2_yearly.8005.b + + ai_chance = { #humble AI goes for this option + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 0.5 + ai_honor = 0.5 + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + add_character_modifier = { + modifier = felt_something_modifier + years = 10 + } + } + + + + option = { #Sponsor more musicians + name = fp2_yearly.8005.c + + remove_treasury_or_gold = medium_treasury_or_gold_value + + add_character_modifier = { + modifier = investing_in_music_modifier + years = 25 + } + + ai_chance = { #energetic, constructive AI goes for this option + base = 10 + ai_value_modifier = { + ai_energy = 0.5 + ai_compassion = 0.5 + ai_rationality = 0.5 + ai_greed = -1 + } + } + + stress_impact = { + content = minor_stress_impact_gain + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + } + + option = { #Chop down the damned tree + name = fp2_yearly.8005.d + + add_character_modifier = { + modifier = aversion_to_joy_modifier + years = 20 + } + + scope:tree_capital = { + add_county_modifier = { + modifier = great_pine_chopped_down_county_modifier + years = 10 + } + } + + ai_chance = { #vengeful and uncompassionate AI goes for this option + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.7 + ai_zeal = 0.3 + ai_compassion = -1 + ai_rationality = -0.5 + } + } + + stress_impact = { + base = minor_stress_impact_gain + calm = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + cynical = minor_stress_impact_gain + humble = minor_stress_impact_gain + arrogant = medium_stress_impact_loss + callous = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + } + } +} + +################################### +# Saqaliba Settlers +# by Ola Jentzsch +################################### +scripted_trigger fp2_yearly.8006_province_trigger = { + has_holding_type = city_holding + barony = { + is_under_holy_order_lease = no + is_capital_barony = no + } +} + +scripted_trigger fp2_yearly.8006_ruler_trigger = { + has_religion = religion:islam_religion + is_ai = yes +} + +fp2_yearly.8006 = { + type = character_event + title = fp2_yearly.8006.t + desc = fp2_yearly.8006.desc + theme = crown + + left_portrait = { + character = root + animation = personality_rational + } + + right_portrait = { + character = scope:saqaliba_leader + animation = happiness + } + + lower_left_portrait = { + character = scope:former_master + } + + trigger = { + is_ai = no + has_fp2_dlc_trigger = yes + is_landed = yes + any_neighboring_top_liege_realm_owner = { fp2_yearly.8006_ruler_trigger = yes } + any_held_county = { any_county_province = { fp2_yearly.8006_province_trigger = yes } } + + OR = { #implemented for FP3 to prevent triggering in Iran + capital_province = { geographical_region = world_europe_west_iberia } + culture = { has_cultural_pillar = heritage_iberian } + } + } + + cooldown = { years = 50 } + + immediate = { + + random_neighboring_top_liege_realm_owner = { + limit = { fp2_yearly.8006_ruler_trigger = yes } + save_scope_as = former_master + } + + random_held_county = { + limit = { + any_county_province = { fp2_yearly.8006_province_trigger = yes } + } + save_scope_as = saqaliba_county #for use in the claim the former_master might get + } + + scope:saqaliba_county = { + random_county_province = { + limit = { fp2_yearly.8006_province_trigger = yes } + barony = { save_scope_as = saqaliba_barony } + } + } + + create_character = { #this is the saqaliba refugee's leader + age = { 20 50 } + location = root.capital_province + gender_female_chance = 50 + random_traits_list = { + count = 3 + ambitious = {} + brave = {} + stubborn = {} + honest = {} + cynical = {} + } + random_traits_list = { #something fun to give them character! + count = 2 + beauty_good_3 = {} + overseer = {} + shrewd = {} + scarred = {} + } + culture = culture:russian + faith = scope:former_master.faith + dynasty = none + save_scope_as = saqaliba_leader + + after_creation = { + if = { + limit = { is_female = no } + add_trait = beardless_eunuch + } + } + } + + hidden_effect = { + scope:saqaliba_leader = { + add_character_modifier = former_slave_npc_modifier + } + } + } + + option = { #Give them what they want + name = fp2_yearly.8006.a + + scope:saqaliba_leader = { + add_opinion = { + target = root + opinion = 20 + modifier = received_title_barony + } + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + + scope:saqaliba_barony = { + change_title_holder = { + holder = scope:saqaliba_leader + change = scope:change + } + } + + resolve_title_and_vassal_change = scope:change + + + scope:former_master = { + if = { + limit = { has_relation_rival = root } + custom_tooltip = { + text = furious_rival_8006.desc + hidden_effect = { add_unpressed_claim = scope:saqaliba_county } + } + } + else = { + progress_towards_rival_effect = { + REASON = rival_saqalibas_refuge + CHARACTER = root + OPINION = 0 + } + } + } + + scope:saqaliba_county = { + add_county_modifier = { + modifier = saqaliba_settlers_county_modifier + years = 30 + } + } + + ai_chance = { #ambitious or compassionate AI goes for this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.8 + ai_greed = 0.5 + ai_honor = 0.6 + ai_compassion = 0.6 + } + } + + stress_impact = { + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + } + + option = { #You can stay, but your friends must go elsewhere + name = fp2_yearly.8006.b + flavor = fp2_yearly.8006.flavor.b.tt + + + scope:former_master = { + add_opinion = { + target = root + opinion = -10 + modifier = harbored_a_fugitive_opinion + } + } + + add_courtier = scope:saqaliba_leader + + ai_chance = { #cautious AI goes for this option + base = 10 + ai_value_modifier = { + ai_boldness = -0.5 + ai_rationality = 0.5 + ai_compassion = -0.3 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = major_stress_impact_gain + } + } + + + option = { #Send them back to their former master + name = fp2_yearly.8006.c + flavor = fp2_yearly.8006.flavor.c.tt + + + if = { + limit = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:former_master } + } + add_character_modifier = { + modifier = obligations_fulfilled_modifier + years = 10 + } + } + else = { + add_hook = { + type = favor_hook + target = scope:former_master + } + } + + #Flag that scope:saqaliba_leader should leave. + save_scope_as = disappear_saqaliba + + ai_chance = { #cruel AI go for this option + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = 0.5 + ai_greed = 0.5 + ai_vengefulness = 0.5 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + compassionate = massive_stress_impact_gain + generous = massive_stress_impact_gain + } + } + + after = { + if = { + limit = { exists = scope:disappear_saqaliba } + scope:saqaliba_leader = { silent_disappearance_effect = yes } + } + } +} + +################################### +# Conversos and Jewish events +# By James Beaumont +################################### +scripted_trigger valid_grantable_county_barony = { + title_province = { + geographical_region = world_europe_west_iberia + } + title_province = { has_building_or_higher = common_tradeport_01 } + is_holy_site = no + county.holder = { + any_held_title = { # Make sure it isn't revoking their last title + title_tier = county + count >= 2 + } + } +} + +fp2_yearly.9000 = { + type = character_event + title = fp2_james.0001.t + desc = fp2_james.0001.desc + theme = secret + override_background = { + reference = docks + } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fp2_james_0001_jewish_trader + animation = personality_bold + } + + trigger = { + NOT = { root.religion = religion:judaism_religion } + highest_held_title_tier >= tier_county + any_sub_realm_barony = { + valid_grantable_county_barony = yes + } + } + + immediate = { + random_sub_realm_barony = { + limit = { + valid_grantable_county_barony = yes + } + save_scope_as = fp2_james_0001_thriving_community + } + create_character = { + template = spanish_jewish_merchant_character + location = root.capital_province + save_scope_as = fp2_james_0001_jewish_trader + } + } + + option = { + name = fp2_james.0001.a + scope:fp2_james_0001_thriving_community.county = { + add_county_modifier = { + modifier = fp2_jewish_community_denied_modifier + years = 10 + } + } + scope:fp2_james_0001_jewish_trader.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_negative_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + callous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = -0.5 + ai_zeal = 1.5 + } + } + } + + option = { + name = fp2_james.0001.b + trigger = { + NOT = { # Prevent all of Iberia from converting + any_county_in_region = { + region = world_europe_west_iberia + culture = culture:sephardi + } + } + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:fp2_james_0001_thriving_community.county = { + change_title_holder = { + holder = scope:fp2_james_0001_jewish_trader + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + hidden_effect = { + add_opinion = { + target = scope:fp2_james_0001_jewish_trader + modifier = received_title_county + } + } + scope:fp2_james_0001_thriving_community.county = { + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + set_county_culture = scope:fp2_james_0001_jewish_trader.culture + set_county_faith = scope:fp2_james_0001_jewish_trader.faith + } + scope:fp2_james_0001_jewish_trader.culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_greed = 1.5 + ai_zeal = -0.5 + } + } + } + + option = { + name = fp2_james.0001.c + scope:fp2_james_0001_thriving_community.county = { + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + } + scope:fp2_james_0001_jewish_trader.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_greed = 1.5 + ai_zeal = -0.5 + } + } + } +} + +scripted_effect fp2_polish_should_heritage_israelite_get_upset_effect = { + if = { + limit = { + scope:fp2_james_0002_conversos_character = { culture = { has_cultural_pillar = heritage_israelite } } + } + scope:fp2_james_0002_conversos_character.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_negative_culture_acceptance + desc = cultural_acceptance_loss_conversos_tolerance + } + } + } +} + +# Suspect Conversos of secretly praciticing Judaism +fp2_yearly.9001 = { + type = character_event + title = fp2_james.0002.t + desc = fp2_james.0002.desc + theme = secret + override_background = { + reference = temple + } + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:fp2_james_0002_conversos_character + animation = personality_cynical + } + + trigger = { + OR = { root.religion = religion:eastern_orthodox_religion root.religion = religion:catholic_religion root.religion = religion:protestant_religion } + is_landed = yes + NOT = { faith = faith:conversos } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_character_struggle = { + is_struggle_type = iberian_struggle + is_struggle_phase = struggle_iberia_phase_hostility + } + } + } + + immediate = { + every_sub_realm_county = { + limit = { + faith = faith:conversos + holder = { + liege = { # Don't convert player-Conversos territory + OR = { + is_ai = yes + NOT = { faith = faith:conversos } + } + } + } + } + add_to_list = fp2_james_0002_conversos_county + } + # Try to find a Conversos vassal if one exists + if = { + limit = { + any_vassal = { + faith = faith:conversos + is_available_ai = yes + } + } + random_vassal = { + limit = { + faith = faith:conversos + is_available_ai = yes + } + save_scope_as = fp2_james_0002_conversos_character + } + } + # Otherwise find a pool character + else_if = { + limit = { + any_pool_character = { + province = root.capital_province + faith = faith:conversos + } + } + random_pool_character = { + province = root.capital_province + limit = { + faith = faith:conversos + } + save_scope_as = fp2_james_0002_conversos_character + } + } + # Otherwise create one + else = { + create_character = { + template = spanish_conversos_character + location = root.capital_province + save_scope_as = fp2_james_0002_conversos_character + } + } + scope:fp2_james_0002_conversos_character = { + random_list = { + 50 = { + add_character_flag = is_secretly_jewish_flag + } + 50 = { + } + } + } + # Get a religion for them to potentially be secretly praciticing + religion:judaism_religion = { + random_faith = { + limit = { is_mainstream_jewish_faith = yes } + save_scope_as = fp2_james_0002_jewish_faith + } + } + } + + option = { + name = fp2_james.0002.a + custom_tooltip = fp2_james.0002.a.tt + hidden_effect = { + if = { + limit = { + scope:fp2_james_0002_conversos_character = { has_character_flag = is_secretly_jewish_flag } + } + send_interface_toast = { + type = event_toast_effect_good + title = fp2_james.0002.a.jewish_communities_thrive + every_in_list = { + list = fp2_james_0002_conversos_county + set_county_faith = scope:fp2_james_0002_jewish_faith + } + scope:fp2_james_0002_conversos_character = { + set_character_faith = scope:fp2_james_0002_jewish_faith + every_vassal = { + limit = { + faith = faith:conversos + is_available_ai = yes + } + set_character_faith = scope:fp2_james_0002_jewish_faith + } + } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_james.0002.a.nothing_happened_toast + } + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -0.5 + ai_zeal = 1.5 + } + } + } + + option = { + name = fp2_james.0002.b + duel = { + skill = intrigue + target = scope:fp2_james_0002_conversos_character + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = fp2_james.0002.b.succesful_interrogation + + if = { + limit = { scope:fp2_james_0002_conversos_character = { has_character_flag = is_secretly_jewish_flag } } + + send_interface_message = { # Begrudgingly added "unecessary" polish + type = event_prison_good + title = fp2_james.0002.t + right_icon = scope:fp2_james_0002_conversos_character + + rightfully_imprison_character_effect = { + TARGET = scope:fp2_james_0002_conversos_character + IMPRISONER = root + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + } + else = { + send_interface_message = { + type = event_intrigue_bad + title = fp2_james.0002.a.offended_conversos + right_icon = scope:fp2_james_0002_conversos_character + + reverse_add_opinion = { + target = scope:fp2_james_0002_conversos_character + modifier = hate_opinion + opinion = -30 + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = fp2_james.0002.b.failed_interrogation + send_interface_message = { + type = event_intrigue_bad + title = fp2_james.0002.a.offended_conversos + right_icon = scope:fp2_james_0002_conversos_character + + every_sub_realm_county = { + custom = fp2_james_0002.b.failed_interrogation.tt + limit = { + faith = { + religion = { + OR = { + this = religion:christianity_religion + this = religion:judaism_religion + } + } + } + } + add_county_modifier = { + modifier = fp2_conversos_persecution_modifier + years = 10 + } + } + reverse_add_opinion = { + target = scope:fp2_james_0002_conversos_character + modifier = hate_opinion + opinion = -30 + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + } + } + + stress_impact = { compassionate = medium_stress_impact_gain } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } + + option = { # Imprison the suspect without trial + name = fp2_james.0002.c + + send_interface_message = { + type = event_prison_neutral + title = fp2_james.0002.t + right_icon = scope:fp2_james_0002_conversos_character + + imprison_character_effect = { + TARGET = scope:fp2_james_0002_conversos_character + IMPRISONER = root + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + + stress_impact = { + compassionate = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + } + + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = diligent + has_trait = just + } + } + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + } + has_trait = zealous + } + } + } +} + +# Jewish people come fleeing persecution from a nearby realm +fp2_yearly.9002 = { + type = character_event + title = fp2_james.0003.t + desc = fp2_james.0003.desc + theme = secret + override_background = { + reference = throne_room + } + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:fp2_james_003_jewish_refugee_leader + animation = beg + } + + trigger = { + NOT = { root.religion = religion:judaism_religion } + NOT = { faith = faith:conversos } + any_neighboring_and_across_water_top_liege_realm = { # There is someone to do persecuting + holder = { + is_ai = yes + NOT = { root.religion = religion:judaism_religion } + NOT = { faith = faith:conversos } + } + } + highest_held_title_tier >= tier_county + any_held_county = { + is_landless_type_title = no + title_province = { + geographical_region = world_europe_west_iberia + } + NOT = { # Don't give away the capital + this = this.holder.top_liege.capital_county + } + holder = { + any_held_title = { + title_tier = county + count >= 2 + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_character_struggle = { + is_struggle_type = iberian_struggle + is_struggle_phase = struggle_iberia_phase_hostility + } + } + modifier = { + factor = 0.1 + any_county_in_region = { + region = world_europe_west_iberia + culture = culture:sephardi + } + } + } + + immediate = { + # Grab the neighbour for loc purposes + random_neighboring_and_across_water_top_liege_realm = { + limit = { + holder = { + is_ai = yes + NOT = { root.religion = religion:judaism_religion } + NOT = { faith = faith:conversos } + } + } + holder = { save_scope_as = fp2_james_003_intolerant_ruler } + } + # find a pool character + if = { + limit = { + any_pool_character = { + province = root.capital_province + religion = religion:judaism_religion + } + } + random_pool_character = { + province = root.capital_province + limit = { + religion = religion:judaism_religion + } + save_scope_as = fp2_james_003_jewish_refugee_leader + } + } + # Otherwise create one + else = { + create_character = { + template = spanish_jewish_merchant_character # May as well reuse the template + location = root.capital_province + save_scope_as = fp2_james_003_jewish_refugee_leader + } + } + # Get a religion for them to potentially be secretly praciticing + religion:judaism_religion = { + random_faith = { + limit = { is_mainstream_jewish_faith = yes } + save_scope_as = fp2_james_0003_jewish_faith + } + } + random_held_county = { + limit = { + is_landless_type_title = no + title_province = { + geographical_region = world_europe_west_iberia + } + NOT = { # Don't give away the capital + this = this.holder.top_liege.capital_county + } + holder = { + any_held_title = { + title_tier = county + count >= 2 + } + } + } + weight = { + modifier = { # Low-dev counties should be more highly considered + add = 50 + development_level <= medium_development_level + } + } + save_scope_as = fp2_james_0003_province_to_convert + } + } + + option = { # Offer the community protection in your realm + name = fp2_james.0003.a + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:fp2_james_0003_province_to_convert.county = { + change_title_holder = { + holder = scope:fp2_james_003_jewish_refugee_leader + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + hidden_effect = { + add_opinion = { + target = scope:fp2_james_003_jewish_refugee_leader + modifier = received_title_county + } + } + scope:fp2_james_0003_province_to_convert.county = { + change_development_level = 1 + if = { + limit = { + root = { + is_ai = no + } + NOT = { + any_county_in_region = { + region = world_europe_west_iberia + culture = culture:sephardi + } + } + } + set_county_culture = scope:fp2_james_003_jewish_refugee_leader.culture + set_county_faith = scope:fp2_james_003_jewish_refugee_leader.faith + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + } + else = { + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + } + } + scope:fp2_james_003_jewish_refugee_leader.culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + callous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + compassionate = medium_stress_impact_loss + zealous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_zeal = -0.5 + } + } + } + + option = { + name = fp2_james.0003.b + scope:fp2_james_003_jewish_refugee_leader = { silent_disappearance_effect = yes } + + stress_impact = { + paranoid = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -0.5 + ai_zeal = 1.5 + } + } + } +} + +################################### +# Toledan Nights +# By James Beaumont +################################### +fp2_yearly.9005 = { + type = character_event + title = fp2_james.0004.t + desc = fp2_james.0004.desc + theme = secret + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:fp2_james_0004_murder_baron + animation = scheme + } + + trigger = { + any_sub_realm_county = { # Are any of my realm's counties a hostile faith that is not governed by someone with protected religious rights? + is_unprotected_hostile_faith = yes + is_landless_type_title = no + } + OR = { # You have to be a bit of a monster to even consider this + has_trait = zealous + has_trait = sadistic + has_trait = callous + dread >= medium_dread + } + } + + immediate = { + create_character = { + template = toledan_night_character + location = root.capital_province + save_scope_as = fp2_james_0004_murder_baron + } + random_sub_realm_county = { + limit = { + is_unprotected_hostile_faith = yes + is_landless_type_title = no + } + save_scope_as = fp2_james_0004_place_of_murder + # If the holder is of that same hostile faith, murder them! + if = { + limit = { + faith = holder.faith + holder = { + is_ai = yes + } + } + holder = { save_scope_as = fp2_james_0004_murder_victim } + } + } + } + + option = { # Go ahead and have some people murdered + name = fp2_james.0004.a + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:fp2_james_0004_place_of_murder = { + change_title_holder = { + holder = scope:fp2_james_0004_murder_baron + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + hidden_effect = { + add_opinion = { + target = scope:fp2_james_0004_murder_baron + modifier = received_title_county + } + } + scope:fp2_james_0004_place_of_murder = { + change_county_control = major_county_control_gain + set_county_faith = root.faith + add_county_modifier = { + modifier = fp2_toledo_nights_modifier + years = 10 + } + } + every_sub_realm_county = { + limit = { + faith = scope:fp2_james_0004_place_of_murder.faith + } + add_county_modifier = fp2_toledo_nights_fallout_modifier + } + add_hook = { + type = favor_hook + target = scope:fp2_james_0004_murder_baron + } + + stress_impact = { + just = massive_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + NOR = { + has_trait = zealous + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { + name = fp2_james.0004.b + scope:fp2_james_0004_murder_baron = { silent_disappearance_effect = yes } + ai_chance = { + base = 10 + modifier = { + factor = 0.5 + OR = { + has_trait = zealous + has_trait = sadistic + has_trait = callous + } + } + } + } +} + +################################################### +# Local bishop mad his church faces the wrong way # +# By James Beaumont # +################################################### +fp2_yearly.9006 = { + type = character_event + title = fp2_james.0005.t + desc = { + desc = fp2_james.0005.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = fp2_james.0005.desc.christian + } + triggered_desc = { + trigger = { + religion = religion:islam_religion + } + desc = fp2_james.0005.desc.muslim + } + } + desc = fp2_james.005.desc.outro + } + theme = faith + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:fp2_james_angry_priest + animation = personality_zealous + } + + trigger = { + any_sub_realm_barony = { # There's a church held by a right-faith bishop in a wrong-faith province + holder != root # Ensure it's not a lay-clergy player + holder.faith = root.faith + holder.capital_province = { has_holding_type = church_holding } + is_unprotected_hostile_faith = yes + OR = { # Mosque is now church or church is now mosque + AND = { + OR = { root.religion = religion:eastern_orthodox_religion root.religion = religion:catholic_religion root.religion = religion:protestant_religion } + faith = { religion = religion:islam_religion } + } + AND = { + root.religion = religion:islam_religion + faith = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + } + } + } + } + + immediate = { + random_sub_realm_barony = { + limit = { + holder != root + holder.faith = root.faith + holder.capital_province = { has_holding_type = church_holding } + is_unprotected_hostile_faith = yes + OR = { + AND = { + OR = { root.religion = religion:eastern_orthodox_religion root.religion = religion:catholic_religion root.religion = religion:protestant_religion } + faith = { religion = religion:islam_religion } + } + AND = { + root.religion = religion:islam_religion + faith = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + } + } + } + save_scope_as = fp2_james_wrong_temple + holder = { save_scope_as = fp2_james_angry_priest } + } + } + + option = { # Change the orientation of the church + name = fp2_james.0005.a + remove_treasury_or_gold = medium_treasury_or_gold_value + add_piety = medium_piety_gain + scope:fp2_james_wrong_temple.county ={ + set_county_faith = root.faith + add_county_modifier = { + modifier = fp2_correctly_facing_church + years = 15 + } + } + reverse_add_opinion = { + target = scope:fp2_james_angry_priest + modifier = grateful_opinion + opinion = 20 + } + + stress_impact = { + greedy = medium_stress_impact_gain + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Tell the baron it's not worth the cost are you insane + name = fp2_james.0005.b + add_piety = minor_piety_loss + reverse_add_opinion = { + target = scope:fp2_james_angry_priest + modifier = hate_opinion + opinion = -25 + } + + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = zealous + } + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_heritage_events.txt b/N3OW/events/dlc/fp3/fp3_heritage_events.txt new file mode 100644 index 00000000..274172ca --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_heritage_events.txt @@ -0,0 +1,3505 @@ +namespace = fp3_yearly + +########EVENT INDEX############ +#fp3_yearly.8019 - Refuge of Light, by Ola Jentzsch +#fp3_yearly.8020 - The Lady of the Land, by Ola Jentzsch +#fp3_yearly.8021 - An Acidic Accident (The Road to Disfigurement series), by Ola Jentzsch and Lucas Ribiero + #fp3_yearly.8022 - Vitriolic Visions (follow-up event) + #fp3_yearly.8023 - Corrosive Conundrums (follow-up event) +#fp3_yearly.8024 - The Return to the Sky, by Ola Jentzsch + #fp3_yearly.8025 - The Fourth Morning (follow-up event) + #fp3_yearly.8026 - The Secret Dakhma (follow-up event) +#fp3_yearly.8027 - Nine Hundred Ninety Chapters of Gold + #fp3_yearly.8028 - The Book of Kings (follow-up event) + #fp3_yearly.8029 - A Tale of Old Glory (follow-up event) + #fp3_yearly.8030 - Insulting Letter (letter event, follow-up) + #fp3_yearly.8031 - Grateful Letter (letter event, follow-up) +#fp3_yearly.8032 - The Ten Days of Death, by Ola Jentzsch +#fp3_yearly.8033 - Frozen Delights, by Ola Jentzsch +#fp3_yearly.8034 - The Hephthalite Hoard, by Ola Jentzsch +#fp3_yearly.8035 - The Heart and the Creator, by Ola Jentzsch +#fp3_yearly.8036 - The City of the Mouthless, by Ola Jentzsch + +################################### +# Refuge of Light +# by Ola Jentzsch +################################### +scripted_trigger fp3_hateful_ruler_trigger = { + is_ai = yes + NOR = { + target_is_liege_or_above = root + faith = { has_doctrine = special_doctrine_is_gnostic_faith } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + has_trait = compassionate + has_trait = forgiving + } + OR = { + has_trait = callous + has_trait = wrathful + has_trait = vengeful + has_trait = zealous + has_trait = sadistic + has_trait = paranoid + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + } +} + +fp3_yearly.8019 = { + type = character_event + title = fp3_yearly.8019.t + desc = fp3_yearly.8019.desc + theme = faith + + left_portrait = { + character = root + animation = boredom + } + + right_portrait = { + character = scope:manichean_leader + animation = beg + } + + lower_left_portrait = { + character = scope:hateful_ruler + } + + trigger = { + is_ai = no + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_healthy_adult = yes + + + #checking that the premise makes sense + root.capital_province = { + OR = { + geographical_region = world_persian_empire + geographical_region = world_steppe + } + } + NOR = { + has_title = title:k_mesopotamia + has_title = title:k_jazira + } + + #checking for a ruler that would persecute the Manicheans in Mesopotamia. Ideally the caliph, but any ruler would do. + any_independent_ruler = { + in_diplomatic_range = root + any_realm_province = { + OR = { + geographical_region = world_mesopotamia #this is where the Manichean communities were originally concentrated + geographical_region = world_jazira + } + } + fp3_hateful_ruler_trigger = yes + } + + any_held_county = { } + } + + cooldown = { years = 100 } + + immediate = { + + random_independent_ruler = { + limit = { + in_diplomatic_range = root + any_realm_province = { + OR = { + geographical_region = world_mesopotamia + geographical_region = world_jazira + } + } + fp3_hateful_ruler_trigger = yes + } + weight = { #weighting for the most suitable candidate + modifier = { + factor = 40 + any_held_title = { is_head_of_faith = yes } + } + modifier = { + factor = 20 + has_title = title:k_mesopotamia + } + modifier = { + factor = 20 + has_title = title:c_baghdad + } + modifier = { + factor = 20 + has_trait = zealous + } + modifier = { + factor = 40 + has_relation_rival = root + } + } + save_scope_as = hateful_ruler + } + + random_held_county = { + weight = { + modifier = { + factor = 70 + any_county_province = { + barony = { + is_holy_site_of = faith:manichean #This will typically be Samarkand + } + } + } + modifier = { + factor = 50 + faith = faith:manichean + } + modifier = { + factor = 50 + any_county_province = { + geographical_region = dlc_fp3_greater_persian_frontier_regions + } + } + modifier = { + factor = -40 + any_county_province = { + this = root.capital_province + } + } + } + save_scope_as = refuge_of_light + } + + create_character = { #this is the Manichean leader + template = fp3_gnostic_paragon + location = root.capital_province + culture = scope:hateful_ruler.culture + gender_female_chance = { + if = { + limit = { + faith:manichean = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + faith:manichean = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = manichean_leader + } + } + + + option = { #By all means, stay + name = fp3_yearly.8019.a + + scope:manichean_leader = { + add_opinion = { + target = root + opinion = 20 + modifier = grateful_opinion + } + } + + scope:hateful_ruler = { + add_opinion = { + target = root + opinion = -30 + modifier = harbored_a_fugitive_opinion + } + } + + add_courtier = scope:manichean_leader + + scope:refuge_of_light = { + add_county_modifier = { + modifier = fp3_gnostic_fervor_county_modifier + years = 50 + } + } + + add_character_modifier = { + modifier = fp3_rare_books_modifier + years = 25 + } + + ai_chance = { #ambitious and sociable AI goes for this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.8 + ai_greed = 0.5 + ai_honor = 0.6 + ai_sociability = 0.6 + } + } + + stress_impact = { + paranoid = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + } + + option = { #stay and pay tax + name = fp3_yearly.8019.b + + trigger = { + faith = { + AND = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + NOT = { has_doctrine = special_doctrine_is_gnostic_faith } + } + } + } + + scope:hateful_ruler = { + add_opinion = { + target = root + opinion = -20 + modifier = fp3_harbors_heretics_opinion + } + } + + scope:refuge_of_light = { + add_county_modifier = { + modifier = fp3_gnostic_fervor_county_modifier + years = 50 + } + add_county_modifier = { + modifier = hold_court_8120_tax_modifier + years = 50 + } + } + + #Flag that scope:manichean_leader should leave. + save_scope_as = disappear_manichean + + ai_chance = { #compassionate-greedy AI goes for this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 0.8 + ai_greed = 0.5 + } + } + + stress_impact = { + generous = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + } + + option = { #Go where you may + name = fp3_yearly.8019.c + custom_tooltip = manicheans_sent_away.tt + + add_piety = minor_piety_gain + + scope:hateful_ruler = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + ai_chance = { #zealous-cruel AI goes for this option + base = 10 + ai_value_modifier = { + ai_zeal = 0.8 + ai_vengefulness = 0.8 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = major_stress_impact_gain + } + } + + after = { + if = { + limit = { exists = scope:disappear_manichean } + scope:manichean_leader = { silent_disappearance_effect = yes } + } + } +} + + +################################### +# The Lady of the Land +# by Ola Jentzsch +################################### + +scripted_trigger fp3_zealous_caliph_trigger = { + is_ai = yes + NOR = { + is_vassal_of = root + faith = { has_doctrine = doctrine_pluralism_pluralistic } + has_trait = compassionate + has_trait = forgiving + } + OR = { + has_trait = callous + has_trait = wrathful + has_trait = vengeful + has_trait = impatient + has_trait = zealous + has_trait = sadistic + has_trait = paranoid + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + } +} + +scripted_trigger fp3_bibi_shahrbanu_devotee_trigger = { + is_female = yes + top_liege != this + is_available_ai_adult = yes + has_religion = ROOT.religion + NOT = { + has_trait = cynical + } +} + +scripted_trigger fp3_assertive_female_believer_trigger = { + OR = { + has_trait = zealous + has_trait = wrathful + has_trait = vengeful + has_trait = stubborn + has_trait = brave + has_trait = ambitious + } +} + +scripted_trigger fp3_zoroastrian_holy_sites_province_trigger = { + OR = { + is_holy_site_of = faith:mazdayasna + is_holy_site_of = faith:zurvanism + is_holy_site_of = faith:gayomarthianism + is_holy_site_of = faith:khurmazta + is_holy_site_of = faith:khurramism + is_holy_site_of = faith:mazdakism + is_holy_site_of = faith:urartuism + } +} + +fp3_yearly.8020 = { + type = character_event + title = fp3_yearly.8020.t + desc = fp3_yearly.8020.desc + theme = faith + + left_portrait = { + character = root + animation = personality_rational + } + + right_portrait = { + character = scope:pious_woman + animation = paranoia + } + + lower_left_portrait = { + character = scope:righteous_caliph + } + + + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_healthy_adult = yes + + #premise checks - we need ROOT's faith to not have been reformed into a matriarchal faith for this historical context + OR = { + has_religion = religion:islam_religion + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + } + + has_game_rule = default_gender_equality #this triggers an error. Suspected code issue. + + NOT = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + + #checking for approppriate county + any_held_county = { + OR = { + this = title:c_rayy + any_county_province = { + barony = { fp3_zoroastrian_holy_sites_province_trigger = yes } + } + } + } + + #checking that we have a HoF with the appropriate interests + faith.religious_head != root + + exists = root.faith.religious_head + + root.faith.religious_head = { + fp3_zealous_caliph_trigger = yes + #checking that his Islam hasn't been reformed into something that'd make the event's premise weird + faith = { + NOT = { + has_doctrine = doctrine_gender_female_dominated + } + } + } + + #checking that we have a spouse or daughter that would fit the scope + OR = { + any_spouse = { + fp3_bibi_shahrbanu_devotee_trigger = yes + } + any_concubine = { + fp3_bibi_shahrbanu_devotee_trigger = yes + } + any_child = { + fp3_bibi_shahrbanu_devotee_trigger = yes + } + any_courtier_or_guest = { + fp3_bibi_shahrbanu_devotee_trigger = yes + has_relation_friend = root + } + } + } + + immediate = { + + + #Saving relevant historical characters and faiths as scopes + character:180638 = { save_scope_as = bibi_shahrbanu } + + character:33912 = { save_scope_as = imam_husayn } + + religion:zoroastrianism_religion = { save_scope_as = anahita_faith } + + #saving the caliph as a scope + root.faith.religious_head = { + if = { + limit = { + fp3_zealous_caliph_trigger = yes + faith = { + NOT = { + has_doctrine = doctrine_gender_female_dominated + } + } + } + } + save_scope_as = righteous_caliph + } + + random_held_county = { + limit = { this = title:c_rayy } + save_scope_as = temple_county + } + + if = { + limit = { + NOT = { exists = scope:temple_county } + } + random_held_county = { + limit = { + any_county_province = { + barony = { fp3_zoroastrian_holy_sites_province_trigger = yes } + } + } + save_scope_as = temple_county + } + } + + #getting the best pious woman for our purposes + if = { + limit = { + any_spouse = { fp3_bibi_shahrbanu_devotee_trigger = yes } + } + random_spouse = { + limit = { + fp3_bibi_shahrbanu_devotee_trigger = yes + } + save_scope_as = pious_woman + } + } + else_if = { + limit = { + any_concubine = { fp3_bibi_shahrbanu_devotee_trigger = yes } + } + random_concubine = { + limit = { + any_concubine = { fp3_bibi_shahrbanu_devotee_trigger = yes } + } + save_scope_as = pious_woman + } + } + else_if = { + limit = { + any_child = { fp3_bibi_shahrbanu_devotee_trigger = yes } + } + random_child = { + limit = { + any_child = { fp3_bibi_shahrbanu_devotee_trigger = yes } + } + save_scope_as = pious_woman + } + } + else_if = { + limit = { + any_courtier_or_guest = { + fp3_bibi_shahrbanu_devotee_trigger = yes + has_relation_friend = root + } + } + random_courtier_or_guest = { + limit = { + any_courtier_or_guest = { + fp3_bibi_shahrbanu_devotee_trigger = yes + has_relation_friend = root + } + } + save_scope_as = pious_woman + } + } + } + + cooldown = { years = 100 } + + option = { + name = fp3_yearly.8020.a #triggered option if you like them very very much + + trigger = { + + reverse_opinion = { + target = scope:pious_woman + value >= 30 + } + } + + remove_short_term_gold = minor_gold_value + + scope:pious_woman = { + if = { + limit = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + } + } + add_opinion = { + target = root + modifier = happy_opinion + opinion = 20 + } + } + else = { + root = { + progress_towards_lover_effect = { + CHARACTER = scope:pious_woman + REASON = lover_sided_with_me_against_hof + OPINION = 20 + } + } + } + } + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = -30 + modifier = angry_opinion + } + } + + stress_impact = { + callous = major_stress_impact_gain + shy = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 1 + ai_rationality = 1 + ai_compassion = 1 + } + } + } + + option = { + name = fp3_yearly.8020.b + flavor = supporting_womens_faith_flavor + + remove_short_term_gold = medium_gold_value + + scope:temple_county = { + add_county_modifier = { + modifier = fp3_persian_resurgence_county_modifier + years = 50 + } + } + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = -30 + modifier = angry_opinion + } + } + + scope:pious_woman = { + add_opinion = { + target = root + opinion = 20 + modifier = happy_opinion + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + cynical = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 1 + ai_vengefulness = 0.5 + } + } + } + + option = { + name = fp3_yearly.8020.c + + add_piety = major_piety_gain + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + scope:pious_woman = { + if = { + limit = { #if she has a forceful personality, she'll be galvanized in her faith by this + fp3_assertive_female_believer_trigger = yes + } + add_character_modifier = { + modifier = fp3_womens_faith_galvanized_modifier + years = 25 + } + } + else = { #otherwise, she'll just be sad or angry + add_opinion = { + target = root + opinion = -20 + modifier = fp3_persecuted_my_faith_opinion + } + } + } + + hidden_effect = { + custom_tooltip = fp3_sharhabanu_devotees_angry.tt + random_courtier = { #female courtiers might get galvanized too, depending on their personality + if = { + limit = { + fp3_bibi_shahrbanu_devotee_trigger = yes + fp3_assertive_female_believer_trigger = yes + this != scope:pious_woman + } + add_character_modifier = { + modifier = fp3_womens_faith_galvanized_modifier + years = 25 + } + } + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + content = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 1 + ai_vengefulness = 0.5 + } + } + } +} + +################################### +# An Acidic Accident (The Path to Disfigurement, part 1) +# by Ola Jentzsch +################################### +scripted_trigger fp3_not_super_relevant_yet_suitable_person_trigger = { + is_ai = yes + is_adult = yes + OR = { + has_lifestyle = learning_lifestyle + learning > 4 + } + NOT = { + is_spouse_of = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + has_trait = disfigured + } + NAND = { + is_female = yes + root.faith = { #this is basically checking for Islam, but in a more emergent way. In medieval Islam, it wouldn't generally make sense for a noble woman to work together with a man in the way this event presupposes. + AND = { + has_doctrine = doctrine_gender_male_dominated + has_doctrine = doctrine_polygamy + } + } + } +} + + +fp3_yearly.8021 = { + type = character_event + title = fp3_yearly.8021.t + desc = fp3_yearly.8021.desc + theme = learning_medicine_focus + + left_portrait = { + character = scope:upset_vassal + animation = war_attacker + } + + right_portrait = { + character = scope:enthusiastic_alchemist + animation = beg + } + + lower_left_portrait = { + character = scope:alchemy_enthusiast + } + + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_healthy_adult = yes + root.capital_province = { geographical_region = world_persian_empire } + + #checking for a vassal with an appropriate relation + any_powerful_vassal = { + is_ai = yes + NOT = { has_trait = forgiving } + any_close_family_member = { + fp3_not_super_relevant_yet_suitable_person_trigger = yes + } + } + + is_ai = no #in order to not spam disfigured characters and upset vassals, we reserve this event for players only. + } + + cooldown = { years = 100 } + + weight_multiplier = { + base = 0.4 + modifier = { + OR = { + AND = { #for Rhazes + current_year >= 895 + current_year < 935 + } + AND = { #for Avicenna + current_year >= 1000 + current_year < 1040 + } + } + add = 1.6 + } + } + + immediate = { + + random_powerful_vassal = { + limit = { + is_ai = yes + NOT = { has_trait = forgiving } + any_close_family_member = { + fp3_not_super_relevant_yet_suitable_person_trigger = yes + } + } + random_close_family_member = { + limit = { + fp3_not_super_relevant_yet_suitable_person_trigger = yes + } + save_scope_as = alchemy_enthusiast + } + save_scope_as = upset_vassal + } + + if = { #This looks to see if one of two historical alchemists will be used in the event + limit = { #their rough period of activity + AND = { + current_year >= 895 + current_year < 935 + } + NOT = { exists = global_var:rhazes_created } #makes sure that he wasn't already spawned by any event elsewhere + } + create_character = { + location = root.capital_province + template = fp3_rhazes_template + save_scope_as = enthusiastic_alchemist #this saves him as a scope so we can get nice effects to bounce off him! + after_creation = { add_character_flag = fp3_historical_person_flag } + } + set_global_variable = rhazes_created + } + else_if = { + limit = { #their rough period of activity + AND = { + current_year >= 1000 + current_year < 1040 + } + NOT = { exists = global_var:avicenna_created } #makes sure that he wasn't already spawned by any event elsewhere + } + create_character = { + location = root.capital_province + template = fp3_avicenna_template + save_scope_as = enthusiastic_alchemist #this saves him as a scope so we can get nice effects to bounce off him! + after_creation = { add_character_flag = fp3_historical_person_flag } + } + set_global_variable = avicenna_created + } + else = { + create_character = { + age = { 32 50 } + location = root.capital_province + template = scholar_character + trait = education_learning_3 + trait = lifestyle_herbalist + trait = lifestyle_physician + random_traits_list = { + count = 3 + ambitious = {} + impatient = {} + cynical = {} + humble = {} + } + random_traits_list = { #for flavor + count = 1 + lunatic_1 = {} + deviant = {} + lifestyle_mystic = {} + hashishiyah = {} + witch = {} + } + culture = scope:alchemy_enthusiast.culture + faith = root.faith + save_scope_as = enthusiastic_alchemist + + after_creation = { + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_physician + LEVEL_1 = yes + LEVEL_3 = no + } + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_mystic + LEVEL_1 = yes + LEVEL_3 = no + } + } + } + } + + scope:alchemy_enthusiast = { + add_trait = disfigured + add_learning_lifestyle_xp = major_lifestyle_experience + + hidden_effect = { + set_relation_rival = { + target = scope:enthusiastic_alchemist + reason = rival_disfigured_me_in_lab + } + } + } + } + + option = { #Please stay and tell me more about this substance + name = fp3_yearly.8021.a + custom_tooltip = fp3_acid_delving_deeper_tooltip + + trigger = { + OR = { + has_lifestyle = learning_lifestyle + has_trait = lifestyle_herbalist + has_trait = lifestyle_gardener + has_trait = lifestyle_physician + has_character_modifier = inspired_medicine_modifier + has_character_modifier = medical_insights_modifier + has_character_modifier = inspiration_alchemy_condoned_by_church_modifier + } + } + + add_courtier = scope:enthusiastic_alchemist + + scope:upset_vassal = { + if = { + limit = { + NOT = { has_relation_rival = root } + } + root = { + progress_towards_rival_effect = { + CHARACTER = scope:upset_vassal + REASON = rival_disfigured_relative + OPINION = -25 + } + } + } + else = { + add_opinion = { + target = root + opinion = -40 + modifier = hate_opinion + } + } + } + + trigger_event = fp3_yearly.8022 + + stress_impact = { + fickle = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + option = { #the alchemist is executed + name = fp3_yearly.8021.b + + trigger = { + OR = { + tyranny >= medium_tyranny + dread >= high_dread + has_trait = sadistic + } + } + + add_dread = major_dread_gain + + add_tyranny = minor_tyranny_value + + scope:enthusiastic_alchemist = { + death = { + death_reason = death_execution + killer = root + } + } + + scope:upset_vassal = { + if = { + limit = { + OR = { + has_trait = vengeful + has_trait = callous + has_trait = sadistic + } + } + add_opinion = { + target = root + opinion = 30 + modifier = fp3_admires_resolve_opinion + } + } + else_if = { + limit = { + OR = { + has_trait = compassionate + has_trait = just + } + } + add_opinion = { + target = root + modifier = fp3_went_too_far_opinion + } + } + else = { + add_opinion = { + target = root + opinion = 20 + modifier = avenged_relative_opinion + } + } + } + + scope:alchemy_enthusiast = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + stress_impact = { + vengeful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + just = major_stress_impact_gain + forgiving = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + } + + option = { #the alchemist is merely imprisoned + name = fp3_yearly.8021.c + + trigger = { + NOR = { + tyranny >= medium_tyranny + dread >= high_dread + has_trait = sadistic + } + } + + add_dread = minor_dread_gain + + scope:enthusiastic_alchemist = { #the alchemist gets to languish in a dungeon + hard_imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + } + + scope:upset_vassal = { + add_opinion = { + target = root + opinion = 20 + modifier = avenged_relative_opinion + } + } + + scope:alchemy_enthusiast = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + stress_impact = { + vengeful = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + } + + option = { + name = fp3_yearly.8021.d + + #Flag that scope:enthusiastic_alchemist should leave. + save_scope_as = disappear_alchemist + + add_prestige = minor_prestige_value + + scope:upset_vassal = { + if = { + limit = { + NOT = { has_relation_rival = root } + } + root = { + progress_towards_rival_effect = { + CHARACTER = scope:upset_vassal + REASON = rival_disfigured_relative + OPINION = -25 + } + } + } + else = { #otherwise, she'll just be sad or angry + add_opinion = { + target = root + opinion = -30 + modifier = vengeful_opinion + } + } + } + + stress_impact = { + vengeful = medium_stress_impact_gain + craven = minor_stress_impact_gain + forgiving = medium_stress_impact_loss + just = medium_stress_impact_loss + } + } + + after = { + if = { + limit = { + OR = { + AND = { + exists = scope:disappear_alchemist + exists = global_var:avicenna_created + scope:enthusiastic_alchemist = { has_character_flag = fp3_historical_person_flag } + } + AND = { + exists = scope:disappear_alchemist + exists = global_var:rhazes_created + scope:enthusiastic_alchemist = { has_character_flag = fp3_historical_person_flag } + } + } + } + scope:enthusiastic_alchemist = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else_if = { + limit = { exists = scope:disappear_alchemist } + scope:enthusiastic_alchemist = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + } +} + +################################### +# Vitriolic Visions (The Path to Disfigurement, part 2) +# by Ola Jentzsch +################################### + +fp3_yearly.8022 = { + type = character_event + title = fp3_yearly.8022.t + desc = fp3_yearly.8022.desc + theme = learning_medicine_focus + + left_portrait = { + character = root + animation = chancellor + } + + right_portrait = { + character = scope:enthusiastic_alchemist + animation = personality_cynical + } + + trigger = { exists = scope:enthusiastic_alchemist } #safety check + + immediate = {} + + option = { #fascinating, let's delve deeper + name = fp3_yearly.8022.a + custom_tooltip = fp3_studying_acid_ominously_tooltip + + trigger_event = fp3_yearly.8023 + + } + + option = { #might it have military uses? + name = fp3_yearly.8022.b + flavor = fp3_yearly.8022.b.flavor + + remove_treasury_or_gold = major_treasury_or_gold_value + + if = { + limit = { + faith = { + OR = { + has_doctrine = tenet_dharmic_pacifism + has_doctrine = tenet_pacifism + } + } + } + add_piety = minor_piety_loss + } + + add_character_modifier = { + modifier = fp3_oil_of_vitriol_modifier + years = 25 + } + + stress_impact = { + compassionate = medium_stress_impact_gain + } + } + + option = { #leave now + name = fp3_yearly.8022.c + flavor = fp3_yearly.8022.c.flavor + + + if = { + limit = { + AND = { + OR = { + exists = global_var:avicenna_created + exists = global_var:rhazes_created + } + scope:enthusiastic_alchemist = { has_character_flag = fp3_historical_person_flag } + } + } + scope:enthusiastic_alchemist = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else = { + scope:enthusiastic_alchemist = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + + stress_impact = { + base = minor_stress_impact_loss + ambitious = medium_stress_impact_gain + } + } +} + +################################### +# Corrosive Conundrums (The Path to Disfigurement, part 3) +# by Ola Jentzsch +################################### + +fp3_yearly.8023 = { + type = character_event + title = fp3_yearly.8023.t + desc = fp3_yearly.8023.desc + theme = learning_medicine_focus + + left_portrait = { + character = root + animation = personality_greedy + } + + right_portrait = { + character = scope:enthusiastic_alchemist + animation = worry + } + + trigger = { exists = scope:enthusiastic_alchemist } #safety check + + immediate = {} + + option = { #I have come this far + name = fp3_yearly.8023.a + + + flavor = fp3_horrible_accident.flavor + if = { + limit = { + NOT = { has_trait = disfigured } + } + random = { + chance = 10 + add_trait = disfigured + } + } + + duel = { + skill = learning + value = high_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = experimenting_with_acid_toast.success + left_icon = root + + add_character_modifier = { + modifier = fp3_alchemical_insights_modifier + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = experimenting_with_acid_toast.failure + left_icon = root + add_character_modifier = { + modifier = fp3_dabbling_in_alchemy_modifier + years = 25 + } + } + } + } + } + } + + option = { #At least I learned something + name = fp3_yearly.8023.b + + add_learning_lifestyle_xp = major_lifestyle_experience + + add_character_modifier = { + modifier = fp3_dabbling_in_alchemy_modifier + years = 25 + } + + stress_impact = { + #no stress for this event + } + } + + option = { #Go, and take your acid with you + name = fp3_yearly.8023.c + + add_learning_lifestyle_xp = major_lifestyle_experience + + if = { + limit = { + AND = { + OR = { + exists = global_var:avicenna_created + exists = global_var:rhazes_created + } + scope:enthusiastic_alchemist = { has_character_flag = fp3_historical_person_flag } + } + } + scope:enthusiastic_alchemist = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else = { + scope:enthusiastic_alchemist = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + + stress_impact = { + #no stress for this event + } + } +} + +################################### +# The Return to the Sky +# by Ola Jentzsch +################################### + +scripted_trigger non_zoroastrian_faith_trigger = { + NOT = { + faith = { has_doctrine_parameter = sky_burials_active } + } +} + +scripted_trigger dakhma_nostalgic_trigger = { + culture = { has_cultural_pillar = heritage_iranian } + OR = { + faith = { has_doctrine_parameter = sky_burials_active } + has_trait = stubborn + learning > 14 + has_character_modifier = hallucinogenic_visions_uplifting_modifier + has_character_modifier = hallucinogenic_visions_terrifying_modifier + } + NAND = { + non_zoroastrian_faith_trigger = yes + has_trait = zealous + } +} + +scripted_trigger loyal_discreet_courtier_trigger = { + OR = { + faith = { has_doctrine_parameter = sky_burials_active } + has_trait = trusting + has_trait = compassionate + reverse_opinion = { + target = root + value >= 50 + } + } + NOR = { + has_trait = paranoid + has_trait = arrogant + has_trait = callous + has_trait = craven + } +} + +fp3_yearly.8024 = { + type = character_event + title = fp3_yearly.8024.t + desc = fp3_yearly.8024.desc + theme = death + + left_portrait = { + character = scope:dying_consort + animation = worry + } + + right_portrait = { + character = root + animation = sadness + triggered_animation = { + trigger = { + OR = { + has_trait = callous + reverse_opinion = { + target = scope:dying_consort + value < 0 + } + } + } + animation = schadenfreude + } + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_adult = yes + root.capital_province = { geographical_region = world_persian_empire } + + NOT = { + faith = { has_doctrine_parameter = sky_burials_active } + } + + any_consort = { #we need a dying consort + is_ai = yes + dakhma_nostalgic_trigger = yes + OR = { + health <= death_chance_dying_health + has_trait = infirm + } + } + } + + cooldown = { years = 100 } + + immediate = { + + random_consort = { #we need a dying consort + limit = { + is_ai = yes + dakhma_nostalgic_trigger = yes + OR = { + health <= death_chance_dying_health + has_trait = infirm + } + } + save_scope_as = dying_consort + } + + if = { + limit = { + any_courtier = { + is_ai = yes + NOR = { + is_close_or_extended_family_of = root + is_consort_of = root + } + loyal_discreet_courtier_trigger = yes + } + } + random_courtier = { + limit = { + is_ai = yes + NOR = { + is_close_or_extended_family_of = root + is_consort_of = root + } + loyal_discreet_courtier_trigger = yes + } + save_scope_as = helpful_courtier + } + } + + hidden_effect = { + if = { + limit = { + opinion = { + target = scope:dying_consort + value >= 50 + } + } + add_character_flag = fp3_love_for_consort_flag + } + } + } + + option = { + name = fp3_yearly.8024.a + + scope:dying_consort = { + death = natural + } + + add_piety = medium_piety_loss + + trigger_event = { + id = fp3_yearly.8025 + days = 3 + } + + custom_tooltip = fp3_relations_care_about_sky_burial.tt + hidden_effect = { + every_vassal_or_below = { + if = { + limit = { is_ai = yes } + opinion_based_on_sky_burial_viewpoint_scripted_effect = yes + } + } + every_courtier = { opinion_based_on_sky_burial_viewpoint_scripted_effect = yes } + every_close_family_member = { + if = { + limit = { is_ai = yes } + opinion_based_on_sky_burial_viewpoint_for_relatives_scripted_effect = yes + } + } + } + + stress_impact = { + base = minor_stress_impact_loss + honest = medium_stress_impact_loss + callous = medium_stress_impact_gain + zealous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { #loving, non-zealous AI will do this + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = 0.5 + ai_zeal = -1 + } + } + } + + + option = { + name = fp3_yearly.8024.b + + trigger = { + exists = scope:helpful_courtier + } + + scope:dying_consort = { + death = natural + } + + custom_tooltip = fp3_helpful_courtier.tt + + duel = { + skill = intrigue + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = hiding_sky_burial_toast.success + left_icon = root + + custom_tooltip = fp3_hidden_sky_burial.tt + trigger_event = fp3_yearly.8026 + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = hiding_sky_burial_toast.failure + left_icon = root + + custom_tooltip = fp3_unhidden_sky_burial.tt + trigger_event = fp3_yearly.8026 + + hidden_effect = { + every_vassal_or_below = { + if = { + limit = { is_ai = yes } + opinion_based_on_sky_burial_viewpoint_scripted_effect = yes + } + } + every_courtier = { opinion_based_on_sky_burial_viewpoint_scripted_effect = yes } + every_close_family_member = { + if = { + limit = { is_ai = yes } + opinion_based_on_sky_burial_viewpoint_for_relatives_scripted_effect = yes + } + } + } + } + } + } + } + + stress_impact = { + brave = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { #loving, non-zealous but craven AI will do this + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_energy = 0.5 + ai_boldness = -0.5 + ai_zeal = -1 + } + } + } + + option = { + name = fp3_yearly.8024.c + + add_piety = medium_piety_gain + + scope:dying_consort = { + death = natural + } + + stress_impact = { + zealous = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + loyal = medium_stress_impact_gain + cynical = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { #callous/zealous AI will do this + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_zeal = 1 + } + } + } +} + +fp3_yearly.8025 = { + type = character_event + title = fp3_yearly.8025.t + desc = fp3_yearly.8025.desc + theme = faith + + left_portrait = { + character = root + animation = sadness + triggered_animation = { + trigger = { + has_character_flag = fp3_love_for_consort_flag + } + animation = grief + } + } + + override_background = { + reference = bp1_bonfire + } + + option = { + + trigger = { has_character_flag = fp3_love_for_consort_flag } + + name = fp3_yearly.8025.a + } + + option = { + + name = fp3_yearly.8025.b + } +} + +fp3_yearly.8026 = { + type = character_event + title = fp3_yearly.8026.t + desc = fp3_yearly.8026.desc + theme = faith + + left_portrait = { + character = root + animation = paranoia + } + + right_portrait = { + character = scope:helpful_courtier + animation = sadness + } + + override_background = { + reference = wilderness + } + + option = { + name = fp3_yearly.8026.a + } + + option = { + name = fp3_yearly.8026.b + + trigger = { + OR = { + has_trait = callous + has_trait = paranoid + has_trait = sadistic + has_trait = lunatic + tyranny >= medium_tyranny + } + } + + scope:helpful_courtier = { + death = { + death_reason = death_murder + killer = root + } + } + + add_secret = { + type = secret_murder + target = scope:helpful_courtier + } + + stress_impact = { + base = minor_stress_impact_loss + paranoid = medium_stress_impact_loss + compassionate = massive_stress_impact_gain + just = massive_stress_impact_gain + } + } +} + + +############################################################### +# Nine Hundred Ninety Chapters of Gold # by Ola Jentzsch +############################################################### + +scripted_trigger fp3_rich_foreign_ruler_trigger = { + is_ai = yes + gold >= major_gold_value + NOT = { + reverse_opinion = { + target = root + value >= 50 + } + } + OR = { + culture = { has_cultural_pillar = heritage_iranian } + knows_language_of_culture = culture:persian + dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_2 } + } +} + +fp3_yearly.8027 = { + type = character_event + title = fp3_yearly.8027.t + desc = fp3_yearly.8027.desc + theme = crown + + left_portrait = { + character = root + animation = personality_bold + } + + right_portrait = { + character = scope:snubbed_poet + animation = chancellor + } + + lower_left_portrait = { + character = scope:former_employer + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_healthy_adult = yes + root.capital_province = { geographical_region = world_persian_empire } + + #Must know Persian for this event to make sense + knows_language_of_culture = culture:persian + + #Must have lots of gold to pay the poet + gold >= major_gold_value + + has_ep1_dlc_trigger = yes + has_royal_court = yes + + is_ai = no #since this event potentially spawns both artifacts and courtiers, let's keep it player-only in order to avoid spamming the game world with books and poets + + any_neighboring_top_liege_realm_owner = { fp3_rich_foreign_ruler_trigger = yes } + } + + weight_multiplier = { + base = 0.4 + modifier = { + AND = { #for Ferdowsi + current_year >= 980 + current_year < 1025 + } + add = 1.6 + } + } + + cooldown = { years = 20 } + + immediate = { + + random_neighboring_top_liege_realm_owner = { + limit = { fp3_rich_foreign_ruler_trigger = yes } + save_scope_as = former_employer + } + + if = { #This looks to see if Ferdowsi will be used in the event + limit = { #his rough period of activity + AND = { + current_year >= 980 + current_year < 1025 + } + NOT = { exists = global_var:ferdowsi_created } #makes sure that he wasn't already spawned by any event elsewhere + } + create_character = { + location = root.capital_province + template = fp3_ferdowsi_template + save_scope_as = snubbed_poet #this saves him as a scope so we can get nice effects to bounce off him! + } + set_global_variable = ferdowsi_created + } + else = { + create_character = { + location = root.capital_province + template = writer_character + gender_female_chance = root_faith_dominant_gender_female_chance + faith = faith:maturidi + culture = culture:persian + trait = lifestyle_poet + trait = shrewd + save_scope_as = snubbed_poet + } + } + } + + option = { + name = fp3_yearly.8027.a + + custom_tooltip = fp3_promise_to_pay_for_book.tt + + add_courtier = scope:snubbed_poet + + scope:former_employer = { + add_opinion = { + target = root + opinion = -30 + modifier = fp3_stole_my_court_poet_opinion + } + } + + if = { + limit = { exists = global_var:ferdowsi_created } + trigger_event = { + id = fp3_yearly.8028 + days = { 250 390 } + } + } + else = { + trigger_event = { + id = fp3_yearly.8029 + days = { 250 390 } + } + } + + stress_impact = { + generous = medium_stress_impact_loss + content = medium_stress_impact_gain + greedy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + + option = { + name = fp3_yearly.8027.b + flavor = fp3_mediate_between_them.flavor + + trigger = { + NOT = { has_relation_rival = scope:former_employer } + } + + duel = { #this duel is root trying to mediate + skill = diplomacy + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + modifier = { + add = 40 + scope:former_employer = { + has_trait = forgiving + } + } + modifier = { + add = 20 + scope:former_employer = { + OR = { + has_trait = trusting + has_trait = generous + } + } + } + custom_tooltip = fp3_mediation_succeeds.tt + custom_tooltip = fp3_poet_leaves.tt + hidden_effect = { + trigger_event = fp3_yearly.8031 + + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + modifier = { + add = 40 + scope:former_employer = { + OR = { + has_trait = vengeful + has_trait = paranoid + } + } + } + modifier = { + add = 20 + scope:former_employer = { + OR = { + has_trait = wrathful + has_trait = arrogant + } + } + } + custom_tooltip = fp3_mediation_fails.tt + show_as_tooltip = { + if = { + limit = { exists = global_var:ferdowsi_created } + scope:snubbed_poet = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else = { + scope:snubbed_poet = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + } + hidden_effect = { + trigger_event = fp3_yearly.8030 + + } + } + } + + stress_impact = { + just = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + cynical = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + option = { + name = fp3_yearly.8027.c + + if = { + limit = { exists = global_var:ferdowsi_created } + scope:snubbed_poet = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else = { + scope:snubbed_poet = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + + stress_impact = { + greedy = medium_stress_impact_loss + ambitious = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + } +} + +fp3_yearly.8028 = { + type = character_event + title = fp3_yearly.8028.t + desc = fp3_yearly.8028.desc + theme = crown + + left_portrait = { + character = root + animation = admiration + } + + right_portrait = { + character = scope:snubbed_poet + animation = chancellor + } + + artifact = { # To display the artifact in the event-window + target = scope:shahnameh + position = lower_left_portrait + } + + trigger = { + scope:snubbed_poet = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + + save_scope_as = owner + set_artifact_rarity_illustrious = yes + + create_artifact = { + name = shahnameh_name + creator = scope:snubbed_poet + description = shahnameh_desc + visuals = book + type = book + modifier = fp3_artifact_shahnameh_modifier + wealth = scope:wealth # This comes from the scripted effect above + quality = scope:quality # This comes from the scripted effect above + save_scope_as = shahnameh # Allows the BOOK to be accessed via scope after its creation + } + } + + option = { + name = fp3_yearly.8028.a + + pay_short_term_gold = { + gold = 495 + target = scope:snubbed_poet + } + } + + option = { + name = fp3_yearly.8028.b + + pay_short_term_gold = { + gold = 495 + target = scope:snubbed_poet + } + + scope:snubbed_poet = { + move_to_pool = yes + } + } + + option = { + name = fp3_yearly.8029.c + + add_character_modifier = { + modifier = fp3_reneged_on_promise_modifier + years = 10 + } + + scope:snubbed_poet = { + add_opinion = { + target = root + modifier = contempt_opinion + opinion = -30 + } + } + + scope:snubbed_poet = { + move_to_pool = yes + } + } +} + +fp3_yearly.8029 = { + type = character_event + title = fp3_yearly.8029.t + desc = fp3_yearly.8029.desc + theme = crown + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:snubbed_poet + animation = chancellor + } + + artifact = { # To display the artifact in the event-window + target = scope:persian_epic + position = lower_left_portrait + } + + immediate = { + + save_scope_as = owner + set_artifact_rarity_masterwork = yes + + create_artifact = { + name = persian_epic_name + creator = scope:snubbed_poet + description = persian_epic_desc + visuals = book + type = book + modifier = fp3_artifact_persian_epic_modifier + wealth = scope:wealth # This comes from the scripted effect above + quality = scope:quality # This comes from the scripted effect above + save_scope_as = persian_epic # Allows the sword to be accessed via scope after its creation + } + } + + option = { + name = fp3_yearly.8029.a + + pay_short_term_gold = { + gold = 495 + target = scope:snubbed_poet + } + } + + option = { + name = fp3_yearly.8029.b + + pay_short_term_gold = { + gold = 495 + target = scope:snubbed_poet + } + + scope:snubbed_poet = { + move_to_pool = yes + silent_disappearance_effect = yes + } + } + + option = { + name = fp3_yearly.8029.c + + add_character_modifier = { + modifier = fp3_reneged_on_promise_modifier + years = 10 + } + + scope:snubbed_poet = { + move_to_pool = yes + silent_disappearance_effect = yes + } + } +} + +fp3_yearly.8030 = { + type = letter_event + opening = fp3_yearly.8030.opening + desc = fp3_yearly.8030.desc + sender = scope:former_employer + + immediate = { + + scope:former_employer = { + add_opinion = { + target = root + opinion = -20 + modifier = angry_opinion + } + } + } + + option = { + name = fp3_yearly.8030.a + } +} + +fp3_yearly.8031 = { + type = letter_event + opening = fp3_yearly.8031.opening + desc = fp3_yearly.8031.desc + sender = scope:former_employer + + immediate = { + + scope:former_employer = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + add_courtier = scope:snubbed_poet + } + scope:snubbed_poet = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + + add_prestige = medium_prestige_value + } + + option = { + name = fp3_yearly.8031.a + } +} + + +############################################################### +# The Ten Days of the Dead # by Ola Jentzsch +############################################################### + +fp3_yearly.8032 = { + type = character_event + title = fp3_yearly.8032.t + desc = fp3_yearly.8032.desc + theme = death + + left_portrait = { + character = root + animation = personality_cynical + } + + right_portrait = { + character = scope:death_enthusiast + animation = sadness + } + + trigger = { #this event triggers from yearly_persian.1001, and in order to not mess that up, I decided to not demand a fp3_dlc_trigger for this one. + + is_available_adult = yes + OR = { + culture = { has_cultural_pillar = heritage_iranian } + AND = { + any_consort = { + culture = { has_cultural_pillar = heritage_iranian } + } + root.capital_province = { geographical_region = world_persian_empire } + } + } + + any_consort = { + is_ai = yes + culture = { has_cultural_pillar = heritage_iranian } + NOR = { + has_trait = arrogant + has_trait = cynical + has_trait = callous + } + } + + any_ancestor = { + even_if_dead = yes + house = root.house + } + } + + immediate = { + + add_character_flag = { + flag = had_event_yearly_persian_1002 #though counter-intuitively named, this will now block both this and yearly_persian_1002 for five years + years = 5 + } + + random_consort = { + limit = { + is_ai = yes + culture = { has_cultural_pillar = heritage_iranian } + NOR = { + has_trait = arrogant + has_trait = cynical + has_trait = callous + } + } + save_scope_as = death_enthusiast + } + + + random_ancestor = { + even_if_dead = yes + limit = { + house = root.house + } + save_scope_as = ancestor_1 + } + + scope:death_enthusiast = { + add_character_modifier = { + modifier = fp3_thinking_about_the_afterlife_modifier + years = 5 + } + } + } + + option = { #Say no to paganism + name = fp3_yearly.8032.a + + trigger = { + OR = { + has_religion = religion:islam_religion + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + } + } + + add_piety = medium_piety_gain + + scope:death_enthusiast = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + } + + option = { #of course my love + name = fp3_yearly.8032.b + + trigger = { + reverse_opinion = { + target = scope:death_enthusiast + value >= 30 + } + NOR = { + AND = { + has_religion = religion:islam_religion + has_trait = zealous + } + AND = { + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + has_trait = zealous + } + } + } + + scope:death_enthusiast = { + if = { + limit = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + } + } + add_opinion = { + target = root + modifier = happy_opinion + opinion = 20 + } + } + else = { + root = { + progress_towards_lover_effect = { + CHARACTER = scope:death_enthusiast + REASON = lover_loves_death + OPINION = 20 + } + } + } + } + + stress_impact = { + base = medium_stress_impact_loss + shy = major_stress_impact_gain + } + } + + option = { #think of my dynasty + name = fp3_yearly.8032.c + + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_value } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + } + } + + option = { #you're right, death awaits us all + name = fp3_yearly.8032.d + + trigger = { + NOT = { has_character_modifier = fp3_thinking_about_the_afterlife_modifier } + } + + add_character_modifier = { + modifier = fp3_thinking_about_the_afterlife_modifier + years = 15 + } + + stress_impact = { + base = medium_stress_impact_gain + craven = miniscule_stress_impact_gain + } + } +} + +############################################################### +# Frozen Treats - by Ola Jentzsch +############################################################### +scripted_trigger fp3_loves_faloodeh_trigger = { + is_available_ai = yes + is_healthy = yes + OR = { + has_trait = gluttonous + has_trait = gregarious + has_trait = comfort_eater + has_character_modifier = feast_life_reaffirmed_modifier + } + NOR = { + has_trait = temperate + has_trait = inappetetic + AND = { + faith = { has_doctrine = tenet_asceticism } + ai_zeal >= medium_positive_ai_value + } + } +} + +fp3_yearly.8033 = { + type = character_event + title = fp3_yearly.8033.t + desc = fp3_yearly.8033.desc + theme = realm + + left_portrait = { + character = root + animation = personality_compassionate + } + + right_portrait = { + character = scope:sorbet_enthusiast + animation = worry + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available = yes + is_healthy = yes + root.capital_province = { geographical_region = world_persian_empire } + + #checking that we have an interesting character that would fit the scope + OR = { + any_consort = { + fp3_loves_faloodeh_trigger = yes + } + any_powerful_vassal = { + fp3_loves_faloodeh_trigger = yes + } + any_councillor = { + fp3_loves_faloodeh_trigger = yes + } + any_child = { + fp3_loves_faloodeh_trigger = yes + age >= 10 + } + } + + #checking that we have fitting country for ice houses + + any_held_county = { + any_county_province = { + geographical_region = world_persian_empire + OR = { + terrain = desert + terrain = drylands + terrain = desert_mountains + terrain = oasis + } + } + } + } + + cooldown = { years = 100 } + + immediate = { + + #getting the best faloodeh lover for our purposes + if = { + limit = { + any_consort = { fp3_loves_faloodeh_trigger = yes } + } + random_consort = { + limit = { + fp3_loves_faloodeh_trigger = yes + } + save_scope_as = sorbet_enthusiast + } + } + else_if = { + limit = { + any_powerful_vassal = { fp3_loves_faloodeh_trigger = yes } + } + random_powerful_vassal = { + limit = { + fp3_loves_faloodeh_trigger = yes + } + save_scope_as = sorbet_enthusiast + } + } + else_if = { + limit = { + any_councillor = { fp3_loves_faloodeh_trigger = yes } + } + random_councillor = { + limit = { + fp3_loves_faloodeh_trigger = yes + } + save_scope_as = sorbet_enthusiast + } + } + else_if = { + limit = { + any_child = { + fp3_loves_faloodeh_trigger = yes + age >= 10 + } + } + random_child = { + limit = { + fp3_loves_faloodeh_trigger = yes + age >= 10 + } + save_scope_as = sorbet_enthusiast + } + } + + random_held_county = { + limit = { + any_county_province = { + geographical_region = world_persian_empire + OR = { + terrain = desert + terrain = drylands + terrain = desert_mountains + terrain = oasis + } + } + } + save_scope_as = yakhchal_county + } + + scope:yakhchal_county = { + add_county_modifier = { + modifier = fp3_broken_icehouses_county_modifier + years = 25 + } + } + } + + option = { + name = fp3_yearly.8033.a + + trigger = { + OR = { + has_trait = gluttonous + has_trait = gregarious + has_trait = comfort_eater + } + } + + add_character_modifier = { + modifier = fp3_securing_sorbet_supply_modifier + years = 25 + } + + scope:sorbet_enthusiast = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + just = medium_stress_impact_gain + temperate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + ai_sociability = 0.5 + } + } + } + + option = { + name = fp3_yearly.8033.b + + trigger = { + NOR = { + has_trait = gluttonous + has_trait = gregarious + has_trait = comfort_eater + } + } + + scope:sorbet_enthusiast = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + + add_character_modifier = { + modifier = fp3_court_austerity_modifier + years = 25 + } + + stress_impact = { + temperate = minor_stress_impact_loss + gluttonous = major_stress_impact_gain + gregarious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_sociability = -0.5 + } + } + } + + option = { + name = fp3_yearly.8033.c + + remove_treasury_or_gold = medium_treasury_or_gold_value + + scope:yakhchal_county = { + remove_county_modifier = fp3_broken_icehouses_county_modifier + } + + scope:sorbet_enthusiast = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + + stress_impact = { + generous = minor_stress_impact_loss + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.7 + ai_greed = -0.5 + } + } + } + + option = { + name = fp3_yearly.8033.d + + scope:sorbet_enthusiast = { + add_opinion = { + target = root + modifier = insulted_opinion + } + } + + stress_impact = { + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.7 + ai_compassion = -0.5 + } + } + } +} + + + + +############################################################### +# The Hephthalite Hoard - by Ola Jentzsch +############################################################### +scripted_trigger hypothetical_hephthalite_heritage_trigger = { + OR = { + has_culture = culture:saka + has_culture = culture:tajik + has_culture = culture:sogdian + has_culture = culture:turkish + has_culture = culture:khwarezmian + has_culture = culture:afghan + has_culture = culture:tocharian + } +} + +scripted_trigger hephthalite_hoard_province_trigger = { + OR = { + geographical_region = dlc_fp3_eastern_persian_frontier_regions + geographical_region = custom_bactria + geographical_region = world_steppe_tarim + } +} + +fp3_yearly.8034 = { + type = character_event + title = fp3_yearly.8034.t + desc = fp3_yearly.8034.desc + theme = vassal + + left_portrait = { + character = root + animation = personality_rational + } + + right_portrait = { + character = scope:wronged_vassal + animation = beg + } + + lower_left_portrait = { + character = scope:greedy_vassal + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available = yes + is_healthy = yes + + any_vassal = { + is_ai = yes + OR = { + has_trait = greedy + has_trait = arrogant + has_trait = deceitful + } + any_vassal_or_below = { + is_ai = yes + hypothetical_hephthalite_heritage_trigger = yes + any_held_county = { + any_county_province = { hephthalite_hoard_province_trigger = yes } + } + } + } + } + + cooldown = { years = 100 } + + immediate = { + + random_vassal = { + limit = { + is_ai = yes + OR = { + has_trait = greedy + has_trait = arrogant + has_trait = deceitful + } + any_vassal_or_below = { + is_ai = yes + hypothetical_hephthalite_heritage_trigger = yes + any_held_county = { + any_county_province = { hephthalite_hoard_province_trigger = yes } + } + } + } + save_scope_as = greedy_vassal + } + + random_vassal_or_below = { + limit = { + is_vassal_of = scope:greedy_vassal + is_ai = yes + hypothetical_hephthalite_heritage_trigger = yes + any_held_county = { + any_county_province = { hephthalite_hoard_province_trigger = yes } + } + } + random_held_county = { + limit = { + any_county_province = { hephthalite_hoard_province_trigger = yes } + } + save_scope_as = hephthalite_hoard_province + } + save_scope_as = wronged_vassal + } + + scope:wronged_vassal = { + add_gold = massive_gold_value + } + + scope:greedy_vassal = { + add_opinion = { + target = scope:wronged_vassal + modifier = fp3_resentful_opinion + opinion = -20 + } + } + + scope:wronged_vassal = { + add_opinion = { + target = scope:greedy_vassal + modifier = bitter_rivalry_opinion + years = 10 + } + } + } + + option = { + name = fp3_yearly.8034.a + + scope:wronged_vassal = { + pay_short_term_gold = { + target = root + gold = massive_gold_value + } + } + + add_tyranny = medium_tyranny_value + + stress_impact = { + greedy = minor_stress_impact_loss + just = massive_stress_impact_gain + craven = medium_stress_impact_gain + content = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.7 + ai_greed = 1 + ai_compassion = -1 + } + } + } + + option = { + name = fp3_yearly.8034.b + + scope:wronged_vassal = { + pay_short_term_gold = { + target = scope:greedy_vassal + gold = massive_gold_value + } + } + + scope:wronged_vassal = { + add_opinion = { + target = root + modifier = fp3_dismayed_opinion + } + } + + scope:greedy_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_rationality = 0.5 + } + } + } + + option = { + name = fp3_yearly.8034.c + + scope:wronged_vassal = { + remove_short_term_gold = massive_gold_value + } + + if = { + limit = { + faith = { + OR = { + trait_is_virtue = compassionate + trait_is_virtue = generous + trait_is_virtue = peasant_leader + } + } + } + add_piety = medium_piety_value + } + else = { + add_prestige = minor_prestige_value + } + + scope:wronged_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + scope:greedy_vassal = { + add_opinion = { + target = root + modifier = intrusive_liege_opinion + } + } + + stress_impact = { + just = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 0.5 + ai_greed = -0.5 + } + } + } + + option = { + name = fp3_yearly.8034.d + + scope:wronged_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + + add_hook = { + type = indebted_hook + target = scope:wronged_vassal + } + + scope:greedy_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + + stress_impact = { + generous = minor_stress_impact_loss + craven = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.3 + ai_boldness = 0.5 + ai_rationality = 0.5 + ai_greed = -0.5 + } + } + } +} + +############################################################### +# The Heart and the Creator - by Ola Jentzsch +############################################################### + +fp3_yearly.8035 = { + type = character_event + title = fp3_yearly.8035.t + desc = fp3_yearly.8035.desc + theme = learning_theology_focus + + left_portrait = { + character = scope:sufi_mystic + animation = personality_zealous + } + + right_portrait = { + character = root + animation = personality_rational + } + + override_background = { + reference = corridor_night + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_available_healthy_adult = yes + learning >= average_skill_level + + NOT = { has_character_modifier = fp3_sufi_initiate_modifier } + + #checking that we have a suitable sufism mentor + OR = { + any_relation = { + type = friend + fp3_sufism_enthusiast_trigger = yes + } + any_relation = { + type = lover + fp3_sufism_enthusiast_trigger = yes + } + any_courtier_or_guest = { + fp3_sufism_enthusiast_trigger = yes + reverse_opinion = { + target = root + value >= 50 + } + } + } + } + + weight_multiplier = { + base = 0.4 + modifier = { + OR = { + fp3_sufism_enthusiast_trigger = yes + has_trait = lifestyle_mystic + } + add = 1.6 + } + modifier = { #Sufis don't get along with legalists, so legalist faiths are less likely to have sufi events + faith = { has_doctrine = tenet_legalism } + add = -0.2 + } + } + + cooldown = { years = 100 } + + immediate = { + + if = { + limit = { + any_relation = { + type = friend + fp3_sufism_enthusiast_trigger = yes + } + } + random_relation = { + type = friend + limit = { fp3_sufism_enthusiast_trigger = yes } + save_scope_as = sufi_mystic + } + } + else_if = { + limit = { + any_relation = { + type = lover + fp3_sufism_enthusiast_trigger = yes + } + } + random_relation = { + type = lover + limit = { fp3_sufism_enthusiast_trigger = yes } + save_scope_as = sufi_mystic + } + } + else_if = { + limit = { + any_courtier_or_guest = { fp3_sufism_enthusiast_trigger = yes } + } + random_courtier_or_guest = { + limit = { + fp3_sufism_enthusiast_trigger = yes + } + save_scope_as = sufi_mystic + } + } + + scope:sufi_mystic = { + add_character_modifier = { + modifier = fp3_sufi_initiate_modifier #Unlocks the "Meditate in Seclusion" decision if you are a ruler + } + } + } + + option = { + name = fp3_yearly.8035.a + + duel = { + skill = learning + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = learning_muraqaba_toast.success + left_icon = root + + custom_tooltip = fp3_unlock_meditation.tt + add_character_modifier = { + modifier = fp3_sufi_initiate_modifier #Unlocks the "Meditate in Seclusion" decision if you are a ruler + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = learning_muraqaba_toast.failure + left_icon = root + add_learning_lifestyle_xp = minor_lifestyle_experience + } + } + } + } + + scope:sufi_mystic = { + add_opinion = { + target = root + modifier = trusted_friend_opinion + } + } + + stress_impact = { #while the stress mods here are low, note that they stack with the base modifier + base = medium_stress_impact_gain + zealous = minor_stress_impact_loss + patient = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + callous = medium_stress_impact_gain + lazy = minor_stress_impact_gain + content = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_boldness = 0.5 + ai_energy = 0.5 + ai_zeal = 1 + } + } + } + + option = { + name = fp3_yearly.8035.b + + add_piety = medium_piety_value + + scope:sufi_mystic = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + + stress_impact = { + stubborn = minor_stress_impact_loss + zealous = minor_stress_impact_loss + ambitious = medium_stress_impact_gain + trusting = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_zeal = 1 + } + } + } + + option = { + name = fp3_yearly.8035.c + + scope:sufi_mystic = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + + stress_impact = { + base = minor_stress_impact_loss + zealous = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + ai_zeal = -0.5 + } + } + } +} + +############################################################### +# The City of the Mouthless - by Ola Jentzsch +############################################################### +scripted_trigger superstitious_coward_trigger = { + is_available_healthy_ai_adult = yes + NOT = { + has_trait = brave + has_trait = cynical + has_trait = stubborn + learning >= good_skill_level + } +} + + +fp3_yearly.8036 = { + type = character_event + title = fp3_yearly.8036.t + desc = fp3_yearly.8036.desc + theme = skull + + left_portrait = { + character = root + animation = personality_content + } + + right_portrait = { + character = scope:superstitious_councillor + animation = paranoia + } + + override_background = { + reference = bp1_bonfire + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_available_healthy_adult = yes + is_ruler = yes + root.capital_province = { geographical_region = world_persian_empire } + + any_councillor = { superstitious_coward_trigger = yes } + + any_held_county = { + OR = { + this = title:c_ardabil + development_level <= medium_development_level + } + } + } + + cooldown = { years = 10 } + + immediate = { + + random_councillor = { + limit = { superstitious_coward_trigger = yes } + save_scope_as = superstitious_councillor + } + + random_held_county = { + if = { + limit = { this = title:c_ardabil } + save_scope_as = spooky_county + } + else_if = { + limit = { + development_level < medium_development_level + } + save_scope_as = spooky_county + } + } + } + + option = { + name = fp3_yearly.8036.a + + trigger = { has_lifestyle = learning_lifestyle } + + add_learning_lifestyle_xp = minor_lifestyle_experience + + scope:superstitious_councillor = { + add_opinion = { + target = root + modifier = perplexed_opinion + opinion = -15 + } + } + + stress_impact = { + craven = medium_stress_impact_gain + impatient = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 1 + ai_rationality = 0.5 + } + } + } + + option = { + name = fp3_yearly.8036.b + + scope:superstitious_councillor = { + add_opinion = { + target = root + modifier = took_my_advice_opinion + opinion = 15 + } + } + + add_character_modifier = { + modifier = fp3_avoiding_dark_places_modifier + years = 5 + } + + stress_impact = { + brave = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = -1 + ai_zeal = 0.5 + } + } + } + + option = { + name = fp3_yearly.8036.c + + add_character_modifier = { + modifier = fp3_relentless_skeptic_modifier + years = 5 + } + + scope:superstitious_councillor = { + add_opinion = { + target = root + modifier = stress_upset_councillor + } + } + + stress_impact = { + craven = medium_stress_impact_gain + callous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 0.5 + ai_rationality = 1 + } + } + } + + option = { + name = fp3_yearly.8036.d + + add_piety = minor_piety_value + + stress_impact = { + cynical = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = -0.5 + ai_rationality = -0.5 + } + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_migration_travel_events.txt b/N3OW/events/dlc/mpo/mpo_migration_travel_events.txt new file mode 100644 index 00000000..2e174e3e --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_migration_travel_events.txt @@ -0,0 +1,1322 @@ +namespace = mpo_migration_travel_events + +# A ruler in the county you're in offers you some herd to help you on your way +mpo_migration_travel_events.0001 = { + type = character_event + title = mpo_migration_travel_events.0001.t + desc = mpo_migration_travel_events.0001.desc + theme = migration + + left_portrait = { + character = root + animation = personality_honorable + } + + right_portrait = { + character = scope:messenger + animation = shepherd_with_sheep + } + + lower_center_portrait = scope:ruler + + cooldown = { years = 25 } + + immediate = { + location.county.holder = { save_scope_as = ruler } + scope:ruler = { + random_courtier = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = messenger + } + } + } + + trigger = { + is_migrating = yes + domicile ?= { + herd <= twenty_percent_herd_value + } + location.county.holder = { + NOR = { + this = root + has_hook = root + has_trait = greedy + has_trait = callous + } + has_good_opinion_of_root_trigger = yes + is_available_ai_adult = yes + any_courtier = { + is_available_adult = yes + } + } + } + + # Take it + option = { + name = mpo_migration_travel_events.0001.a + scope:ruler = { + pay_herd = { + target = root + value = domicile.medium_herd_value + } + add_hook = { + target = root + type = favor_hook + } + } + hidden_effect = { + add_opinion = { + modifier = grateful_opinion + target = scope:ruler + opinion = 15 + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 2 + domicile = { herd <= domicile.ten_percent_herd_value } + } + modifier = { + factor = 1.5 + domicile = { herd <= domicile.twenty_percent_herd_value } + } + modifier = { + factor = 0 + has_trait = paranoid + } + ai_value_modifier = { + ai_greed = 1 + } + } + } + + # Decline + option = { + name = mpo_migration_travel_events.0001.b + + scope:ruler = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + + stress_impact = { + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = arrogant + } + } + } +} + +# An old vassal and a new vassal urge you to give them some herd +mpo_migration_travel_events.0010 = { + type = character_event + title = mpo_migration_travel_events.0010.t + desc = mpo_migration_travel_events.0010.desc + theme = migration + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:messenger + animation = beg + } + + lower_left_portrait = scope:vassal_1 + lower_right_portrait = scope:vassal_2 + + cooldown = { years = 10 } + + immediate = { + random_courtier = { + limit = { + is_adult = yes + } + save_scope_as = messenger + } + random_vassal = { + limit = { + government_has_flag = government_is_nomadic + domicile ?= { herd < max_herd } + } + save_scope_as = vassal_1 + } + var:migration_title.holder = { + random_vassal = { + limit = { + government_has_flag = government_is_nomadic + domicile ?= { herd < max_herd } + } + save_scope_as = vassal_2 + } + } + } + + trigger = { + is_migrating = yes + has_variable = migration_title + domicile ?= { + herd > max_herd + } + any_courtier = { count >=1 } + any_vassal = { count >= 1 government_has_flag = government_is_nomadic domicile ?= { herd < max_herd } } + var:migration_title.holder = { any_vassal = { count >= 1 government_has_flag = government_is_nomadic domicile ?= { herd < max_herd } } } + } + + # Give to vassal 1 + option = { + name = mpo_migration_travel_events.0010.a + + pay_herd = { + target = scope:vassal_1 + value = domicile.excess_herd_value + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:vassal_1 + opinion = excess_herd_opinion_value + } + + custom_tooltip = no_longer_herd_limit_tt + + stress_impact = { + generous = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + opinion_modifier = { + opinion_target = scope:vassal_1 + multiplier = 1 + } + } + } + + # Give to vassal 2 + option = { + name = mpo_migration_travel_events.0010.b + + pay_herd = { + target = scope:vassal_2 + value = domicile.excess_herd_value + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:vassal_2 + opinion = excess_herd_opinion_value + } + + custom_tooltip = no_longer_herd_limit_tt + + stress_impact = { + generous = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + opinion_modifier = { + opinion_target = scope:vassal_2 + multiplier = 1 + } + } + } + + # Give to none + option = { + name = mpo_migration_travel_events.0010.c + + domicile = { + change_herd = root.excess_herd_value_negative + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:vassal_2 + opinion = -15 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:vassal_1 + opinion = -15 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:messenger + opinion = -5 + } + + custom_tooltip = no_longer_herd_limit_tt + + stress_impact = { + callous = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + + option = { + name = mpo_migration_travel_events.0010.d + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:vassal_2 + opinion = -5 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:vassal_1 + opinion = -5 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:messenger + opinion = -5 + } + + stress_impact = { + greedy = medium_stress_impact_loss + diligent = minor_stress_impact_gain + } + + add_character_modifier = { + modifier = nomad_keep_herd_modifier + years = 5 + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + factor = 0 + has_trait = diligent + } + } + } +} + +# The county you're migrating to has low fertility +mpo_migration_travel_events.0020 = { + type = character_event + title = mpo_migration_travel_events.0020.t + desc = mpo_migration_travel_events.0020.desc + theme = migration + + left_portrait = { + character = root + animation = worry + } + + lower_center_portrait = { + trigger = { + exists = scope:astrologer + } + character = scope:astrologer + } + + trigger = { + is_migrating = yes + has_variable = migration_title + var:migration_title ?= { + tier = tier_county + county_fertility <= bad_county_fertility_level + } + } + + cooldown = { years = 15 } + + immediate = { + if = { + limit = { + employs_court_position = court_astrologer_court_position + } + random_courtier = { + limit = { + has_court_position = court_astrologer_court_position + } + save_scope_as = astrologer + } + } + var:migration_title = { save_scope_as = target_title } + } + + option = { + name = mpo_migration_travel_events.0020.a + + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + } + } + + option = { + name = mpo_migration_travel_events.0020.c + trigger = { + domicile = { herd >= major_herd_value } + } + show_as_unavailable = { always = yes } + + domicile = { + change_herd = major_herd_loss + } + + var:migration_title = { + change_county_fertility = minor_county_fertility_level_gain + } + + ai_chance = { + base = 25 + } + } + + option = { + name = mpo_migration_travel_events.0020.d + trigger = { + employs_court_position = court_astrologer_court_position + } + show_as_unavailable = { always = yes } + scope:astrologer = { + duel = { + desc = mpo_migration_travel_events.0020.d_tt + skill = learning + value = very_high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = mpo_migration_travel_events.0020.win + root = { + send_interface_toast = { + title = mpo_migration_travel_events.0020.win + type = event_toast_effect_good + left_icon = root + right_icon = scope:astrologer + var:migration_title = { + change_county_fertility = major_county_fertility_level_gain + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = mpo_migration_travel_events.0020.lose + root = { + send_interface_toast = { + title = mpo_migration_travel_events.0020.lose + type = event_toast_effect_bad + left_icon = root + right_icon = scope:astrologer + stress_impact = { + base = minor_stress_impact_gain + } + } + } + } + } + } + + ai_chance = { + base = 75 + } + } +} + +# Danger! A sickness effecting the herd +mpo_migration_travel_events.0030 = { + type = character_event + title = mpo_migration_travel_events.0030.t + desc = mpo_migration_travel_events.0030.desc + theme = migration + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:messenger + animation = jockey_idle + camera = camera_event_horse_right + } + + cooldown = { years = 5 } + + trigger = { + is_migrating = yes + NOT = { domicile ?= { herd <= twenty_percent_herd_value } } + } + + immediate = { + traveler_danger_xp_effect = { + MIN = 3 + MAX = 7 + } + domicile = { + change_herd = minor_herd_loss + } + random_courtier = { + limit = { + is_adult = yes + } + save_scope_as = messenger + } + current_travel_plan = { delay_travel_plan = { days = 30 } } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 1.5 + domicile ?= { herd >= max_herd } + } + } + + # Lose more herd + option = { + name = mpo_migration_travel_events.0030.a + domicile = { + change_herd = medium_herd_loss + } + stress_impact = { + base = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + callous = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + # Consult a local shepherd + option = { + name = mpo_migration_travel_events.0030.b + trigger = { + short_term_gold >= medium_gold_value + } + show_as_unavailable = { always = yes } + remove_short_term_gold = medium_gold_value + random_list = { + 50 = { + show_chance = no + desc = mpo_migration_travel_events.0030.b_good + send_interface_toast = { + title = mpo_migration_travel_events.0030.b_good + type = event_toast_effect_good + left_icon = root + right_icon = scope:messenger + } + } + 50 = { + show_chance = no + desc = mpo_migration_travel_events.0030.b_bad + send_interface_toast = { + title = mpo_migration_travel_events.0030.b_bad + type = event_toast_effect_bad + left_icon = root + right_icon = scope:messenger + current_travel_plan = { + add_travel_plan_modifier = nomad_slow_horses_modifier + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = -0.75 + } + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + gold <= major_gold_value + factor = 0 + } + } + } + + # Ignore it + option = { + name = mpo_migration_travel_events.0030.c + + random_list = { + 10 = { + show_chance = no + desc = mpo_migration_travel_events.0030.c_none + send_interface_toast = { + title = mpo_migration_travel_events.0030.c_none + type = event_toast_effect_neutral + left_icon = root + right_icon = scope:messenger + add_character_modifier = { + modifier = nomad_weak_herd_modifier + years = 2 + } + } + } + 30 = { + show_chance = no + desc = mpo_migration_travel_events.0030.c_medium + send_interface_toast = { + title = mpo_migration_travel_events.0030.c_medium + type = event_toast_effect_bad + left_icon = root + right_icon = scope:messenger + domicile = { + change_herd = miniscule_herd_loss + } + } + } + 40 = { + show_chance = no + desc = mpo_migration_travel_events.0030.c_major + send_interface_toast = { + title = mpo_migration_travel_events.0030.c_major + type = event_toast_effect_bad + left_icon = root + right_icon = scope:messenger + domicile = { + change_herd = minor_herd_loss + } + } + } + 20 = { + show_chance = no + desc = mpo_migration_travel_events.0030.c_massive + send_interface_toast = { + title = mpo_migration_travel_events.0030.c_massive + type = event_toast_effect_bad + left_icon = root + right_icon = scope:messenger + domicile = { + change_herd = medium_herd_loss + } + } + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:messenger + opinion = -15 + } + + current_travel_plan = { delay_travel_plan = { days = 90 } } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + } + modifier = { + factor = 0.5 + domicile ?= { herd <= forty_percent_herd_value } + } + modifier = { + factor = 2 + domicile ?= { herd >= max_herd } + } + } + } +} + +# You have to cross a river with your herd +mpo_migration_travel_events.0040 = { + type = character_event + title = mpo_migration_travel_events.0040.t + desc = mpo_migration_travel_events.0040.desc + theme = migration + + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_right + } + + cooldown = { years = 5 } + + trigger = { + is_migrating = yes + location = { + OR = { + is_riverside_province = yes + is_river_province = yes + } + } + } + + immediate = { + location.county = { save_scope_as = county } + } + + override_background = { + reference = bp3_riverside + } + + # Bum rush it + option = { + name = mpo_migration_travel_events.0040.a + duel = { + desc = mpo_migration_travel_events.0040.a_tt + skill = prowess + value = decent_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = mpo_migration_travel_events.0040.win + send_interface_toast = { + title = mpo_migration_travel_events.0040.win + type = event_toast_effect_good + left_icon = root + if = { + limit = { + NOT = { has_trait = lifestyle_traveler } + } + add_trait = lifestyle_traveler + } + traveler_travel_xp_effect = { + MIN = 3 + MAX = 7 + } + } + if = { + limit = { + NOR = { + has_trait = brave + has_trait = craven + } + } + random = { + chance = 5 + add_trait = brave + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = mpo_migration_travel_events.0040.lose + root = { + send_interface_toast = { + title = mpo_migration_travel_events.0040.lose + type = event_toast_effect_bad + left_icon = root + domicile = { + change_herd = medium_herd_loss + } + } + } + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 75 + modifier = { + factor = 0 + has_trait = craven + } + } + } + + # Build a raft + option = { + name = mpo_migration_travel_events.0040.b + trigger = { + short_term_gold >= minor_gold_value + } + show_as_unavailable = { always = yes } + flavor = mpo_migration_travel_events.0040.b_flavor + remove_short_term_gold = minor_gold_value + + stress_impact = { + base = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_gain + } + + current_travel_plan = { delay_travel_plan = { days = 15 } } + + stress_impact = { + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + gold <= medium_gold_value + factor = 0 + } + } + } + + # Look for a ford + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = mpo_migration_travel_events.0040.c_christian + } + desc = mpo_migration_travel_events.0040.c + } + } + } + + current_travel_plan = { delay_travel_plan = { days = 60 } } + + stress_impact = { + lazy = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +scripted_trigger is_eligible_courtier_0050 = { + is_adult = yes + is_ai = yes + NOR = { + is_consort_of = root + is_close_family_of = root + } +} + +scripted_trigger is_eligible_local_0050 = { + is_adult = yes + is_ai = yes + exists = liege + liege ?= { NOT = { this = root } } +} + +# A courtier falls in love with a local and wants to stay +mpo_migration_travel_events.0050 = { + type = character_event + title = mpo_migration_travel_events.0050.t + desc = mpo_migration_travel_events.0050.desc + theme = migration + override_background = { + reference = mpo_camp_steppe + } + + left_portrait = { + character = root + animation = shock + } + + right_portrait = { + character = scope:courtier + animation = storyteller + } + + lower_center_portrait = scope:local + + cooldown = { years = 15 } + + + trigger = { + is_migrating = yes + any_courtier = { + is_eligible_courtier_0050 = yes + save_temporary_scope_as = courtier_temp + } + location = { + any_character_in_location = { + is_eligible_local_0050 = yes + can_set_relation_lover_trigger = { CHARACTER = scope:courtier_temp } + is_similar_age_trigger = { CHARACTER = scope:courtier_temp } + } + } + } + + immediate = { + random_courtier = { + limit = { + is_eligible_courtier_0050 = yes + } + weight = { + base = 10 + modifier = { # Someone we actually care about + add = 15 + OR = { + has_any_court_position = yes + is_councillor = yes + } + } + modifier = { + add = -25 + has_trait = chaste + } + modifier = { + add = 25 + has_trait = lustful + } + modifier = { + add = 100 + has_relation_lover = root + } + } + save_scope_as = courtier + } + location = { + random_character_in_location = { + limit = { + is_eligible_local_0050 = yes + can_set_relation_lover_trigger = { CHARACTER = scope:courtier } + is_similar_age_trigger = { CHARACTER = scope:courtier } + } + weight = { + base = 10 + modifier = { + add = 25 + might_cheat_on_every_partner_trigger = yes + } + } + save_scope_as = local + } + } + hidden_effect = { + scope:courtier = { + set_relation_lover = scope:local + random_secret = { + limit = { + secret_type = secret_lover + secret_target = scope:local + } + save_scope_as = secret + } + } + } + scope:secret = { reveal_to = root } + } + + # Okay, farewell + option = { + name = mpo_migration_travel_events.0050.a + remove_courtier_or_guest = scope:courtier + scope:local.liege = { + add_courtier = scope:courtier + } + + stress_impact = { + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 75 + modifier = { + factor = 0.5 + scope:courtier = { + OR = { + is_councillor = yes + has_any_court_position = yes + } + } + } + modifier = { + factor = 0 + has_relation_lover = scope:courtier + } + } + } + + # No, stay + option = { + name = mpo_migration_travel_events.0050.b + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:courtier + opinion = -20 + } + + stress_impact = { + callous = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + modifier = { + factor = 2 + scope:courtier = { + OR = { + is_councillor = yes + has_any_court_position = yes + } + } + } + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + # Be with me instead + option = { + name = mpo_migration_travel_events.0050.c + trigger = { + has_trait = lustful + can_set_relation_lover_trigger = { CHARACTER = scope:courtier } + is_similar_age_trigger = { CHARACTER = scope:courtier } + } + + duel = { + desc = mpo_migration_travel_events.0050.c_tt + skill = intrigue + value = decent_skill_rating + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = mpo_migration_travel_events.0050.win + send_interface_toast = { + title = mpo_migration_travel_events.0050.win + type = event_toast_effect_good + left_icon = root + right_icon = scope:courtier + scope:courtier = { remove_relation_lover = scope:local } + set_relation_lover = scope:courtier + } + stress_impact = { + base = minor_stress_impact_loss + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = mpo_migration_travel_events.0050.lose + root = { + send_interface_toast = { + title = mpo_migration_travel_events.0050.lose + type = event_toast_effect_bad + left_icon = root + reverse_add_opinion = { + modifier = disgusted_opinion + target = scope:courtier + opinion = -10 + } + remove_courtier_or_guest = scope:courtier + scope:local.liege = { + add_courtier = scope:courtier + } + } + } + } + } + + ai_chance = { + base = 75 + } + } + + # How could you betray me? + option = { + name = mpo_migration_travel_events.0050.d + trigger = { + has_relation_lover = scope:courtier + } + + remove_relation_lover = scope:courtier + + rightfully_imprison_character_effect = { + TARGET = scope:courtier + IMPRISONER = root + } + + stress_impact = { + callous = medium_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } +} + +# Danger! A horse goes mad and might trample a courtier +mpo_migration_travel_events.0060 = { + type = character_event + title = mpo_migration_travel_events.0060.t + desc = mpo_migration_travel_events.0060.desc + theme = migration + + left_portrait = { + character = root + animation = stress + } + + lower_center_portrait = scope:courtier + + trigger = { + is_migrating = yes + any_courtier = { count >= 4 } + } + + immediate = { + traveler_danger_xp_effect = { + MIN = 3 + MAX = 7 + } + random_courtier = { + weight = { + base = 10 + modifier = { # Someone we actually care about + add = 10 + OR = { + has_any_court_position = yes + is_councillor = yes + } + } + } + save_scope_as = courtier + } + } + + cooldown = { years = 5 } + + # Put it down + option = { + name = mpo_migration_travel_events.0060.a + custom_tooltip = mpo_migration_travel_events.0060.a_tt + + domicile = { + change_herd = miniscule_herd_loss + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:courtier + opinion = 10 + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + opinion_modifier = { + opinion_target = scope:courtier + multiplier = 2 + } + } + } + + # Try to calm the horse + option = { + name = mpo_migration_travel_events.0060.b + duel = { + desc = mpo_migration_travel_events.0060.tt + skill = diplomacy + value = decent_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = mpo_migration_travel_events.0060.win + send_interface_toast = { + title = mpo_migration_travel_events.0060.win + type = event_toast_effect_good + left_icon = root + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:courtier + opinion = 10 + } + add_prestige = minor_prestige_gain + } + if = { + limit = { + NOR = { + has_trait = brave + has_trait = craven + } + } + random = { + chance = 5 + add_trait = brave + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = mpo_migration_travel_events.0060.lose + send_interface_toast = { + title = mpo_migration_travel_events.0060.lose + type = event_toast_effect_bad + left_icon = root + scope:courtier = { + increase_wounds_effect = { REASON = trampled_by_horse } + } + } + } + } + + stress_impact = { + craven = minor_stress_impact_gain + brave = minor_stress_impact_loss + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 0 + has_trait = craven + } + } + } + + # Let the courtier die + option = { + name = mpo_migration_travel_events.0060.c + + random_list = { + 50 = { + show_chance = no + desc = mpo_migration_travel_events.0060.people + send_interface_toast = { + title = mpo_migration_travel_events.0060.people + type = event_toast_effect_bad + left_icon = root + scope:courtier = { + increase_wounds_effect = { REASON = trampled_by_horse } + } + custom_tooltip = { + text = mpo_migration_travel_events.0060.people_tt + random = { + chance = 75 + random_courtier = { + limit = { + is_adult = yes + NOT = { this = scope:courtier } + } + save_scope_as = courtier_2 + increase_wounds_effect = { REASON = trampled_by_horse } + } + } + } + } + } + 30 = {} + } + + stress_impact = { + compassionate = minor_stress_impact_gain + callous = minor_stress_impact_loss + lazy = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + opinion_modifier = { + opinion_target = scope:courtier + multiplier = -2 + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } +} diff --git a/N3OW/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt b/N3OW/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt new file mode 100644 index 00000000..12b0f47e --- /dev/null +++ b/N3OW/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt @@ -0,0 +1,4447 @@ + +namespace = learning_medicine +namespace = learning_medicine_special +################################################## + +# Learning Medicine Lifestyle events + + # 2001 - Become Herbalist, by Mathilda Bjarnehed + # 2010 - Improve court Physician, by Mathilda Bjarnehed + # 2020 - Fertility treatment, by Mathilda Bjarnehed + # 2030 - Healthy coping mechanism: becoming a confider, by Mathilda Bjarnehed + # 2040 - Healthy coping mechanism: journaller or athletic, by Mathilda Bjarnehed + # 2050 - Helping healing hand (medicine friend), by Mathilda Bjarnehed + # 2110 - A vassal (or your liege) wants to eat some hashish while visiting your capital, by Ewan Cowhig Croft + +#Special Learning Medicine Lifestyle events + # 1001 - Study Cadavers, by Linnéa Thimrén + # 2100 - You consume a hallucinogenic fish, by Ewan Cowhig Croft + +################################################## + + +################################################## +# Become a herbalist +# by Mathilda Bjarnehed +################################################## + +scripted_trigger learning_medicine_2001_basic_herbalist_trigger = { + has_trait = lifestyle_herbalist + is_available_ai = yes + is_adult = yes +} + +scripted_trigger learning_medicine_2001_pool_herbalist_trigger = { + learning_medicine_2001_basic_herbalist_trigger = yes + guest_allowed_to_arrive_trigger = { HOST = root } +} + +learning_medicine.2001 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:herbalist = { is_pool_character = yes } } + desc = learning_medicine.2001.pool.desc + } + desc = learning_medicine.2001.no_pool.desc + } + triggered_desc = { + trigger = { exists = scope:chaplain_hates_herbs } + desc = learning_medicine.2001.chaplain_hates_herbs.desc + } + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:herbalist + animation = physician + } + lower_right_portrait = scope:chaplain_hates_herbs + + trigger = { + exists = root.capital_province + OR = { + learning >= high_skill_rating + culture = { has_cultural_parameter = herbalist_traits_more_common } + } + NOR = { + has_character_flag = had_event_learning_medicine_2001 + has_trait = lifestyle_herbalist + } + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + any_courtier_or_guest = { learning_medicine_2001_basic_herbalist_trigger = yes } + any_relation = { type = friend learning_medicine_2001_basic_herbalist_trigger = yes } + } + add = 0.75 + } + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_medicine_2001 + years = 5 + } + #Pick a herbalist + #Friends get extra chance by not being merged with court/pool and witches are weighted for/are prioritized + random_list = { + 3 = { #Friends + trigger = { any_relation = { type = friend learning_medicine_2001_basic_herbalist_trigger = yes } } + modifier = { + any_relation = { + type = friend + learning_medicine_2001_basic_herbalist_trigger = yes + is_witch_trigger = yes + } + factor = 3 + } + random_relation = { + type = friend + limit = { + learning_medicine_2001_basic_herbalist_trigger = yes + is_witch_trigger = yes + } + alternative_limit = { learning_medicine_2001_basic_herbalist_trigger = yes } + save_scope_as = herbalist + } + } + 2 = { #Courtiers + trigger = { any_courtier_or_guest = { learning_medicine_2001_basic_herbalist_trigger = yes } } + modifier = { + any_courtier_or_guest = { + learning_medicine_2001_basic_herbalist_trigger = yes + is_witch_trigger = yes + } + factor = 3 + } + random_courtier_or_guest = { + limit = { + learning_medicine_2001_basic_herbalist_trigger = yes + is_witch_trigger = yes + } + alternative_limit = { learning_medicine_2001_basic_herbalist_trigger = yes } + save_scope_as = herbalist + } + } + 1 = { #Pool characters + trigger = { + any_pool_character = { + province = root.capital_province + learning_medicine_2001_pool_herbalist_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { learning_medicine_2001_pool_herbalist_trigger = yes } + weight = { #Pool characters don't get witch prio, only witch weight, or it will be super easy to find a witch (probably) + base = 1 + modifier = { + factor = 3 + is_witch_trigger = yes + } + } + save_scope_as = herbalist + } + } + } + + #No one there? Make one + if = { + limit = { NOT = { exists = scope:herbalist } } + save_scope_as = created_char + random_list = { + 90 = { #Make a regular herbalist + create_character = { + location = root.capital_province + faith = root.faith + culture = root.culture + template = witchy_template + save_scope_as = herbalist + } + } + 10 = { #Make a witch + modifier = { + root = { is_ai = no } + add = 20 + } + create_witch_effect = { WHO = root } + scope:created_witch = { save_scope_as = herbalist } + } + } + } + + #Give a flower to someone option? + if = { + limit = { + any_scheme = { + OR = { + scheme_type = seduce + scheme_type = courting + } + } + } + random_scheme = { + limit = { + OR = { + scheme_type = seduce + scheme_type = courting + } + } + scheme_target_character = { save_scope_as = flower_receiver } + } + } + else_if = { + limit = { any_relation = { type = soulmate always = yes } } + random_relation = { type = soulmate save_scope_as = flower_receiver } + } + else_if = { + limit = { exists = primary_spouse } + primary_spouse = { save_scope_as = flower_receiver } + } + + #Would the court chaplain disagree? + random_learning_councillor = { + limit = { + NOR = { + has_trait = lifestyle_herbalist + faith = { has_doctrine_parameter = witchcraft_accepted } + ai_zeal <= high_negative_ai_value + } + } + save_scope_as = chaplain_hates_herbs + } + } + + + #Learn herbalism + option = { + name = learning_medicine.2001.a + + add_trait = lifestyle_herbalist + + if = { + limit = { exists = scope:chaplain_hates_herbs } + reverse_add_opinion = { + target = scope:chaplain_hates_herbs + modifier = impious_opinion + opinion = -20 + } + } + + if = { + limit = { + NOR = { + has_trait = witch + any_secret = { type = secret_witch } + } + } + #Chance to become witch + hidden_effect = { + random_list = { + #Yes + 30 = { + trigger_event = { + id = learning_medicine.2002 + days = { 7 14 } + } + modifier = { + add = 30 + OR = { + # Driven to look for deeper meanings to things (Regardless of if they're there or not) + has_trait = ambitious + has_trait = paranoid + } + } + } + #No + 70 = { + modifier = { + scope:herbalist = { is_witch_trigger = yes } + add = -70 + } + modifier = { + add = 50 + OR = { + # Unwilling to see the truth... + has_trait = zealous + has_trait = trusting + # ...or unable to see the truth. + has_trait = dull + has_trait = intellect_bad + } + } + } + } + } + } + + #Pool character becomes guest + if = { + limit = { scope:herbalist = { is_pool_character = yes } } + add_visiting_courtier = scope:herbalist + } + } + + #Arrange a garden + option = { + name = learning_medicine.2001.c + add_piety = medium_piety_value + #Pool character becomes guest + if = { + limit = { scope:herbalist = { is_pool_character = yes } } + add_visiting_courtier = scope:herbalist + } + } + + #Help me pick a bouqet + option = { + trigger = { + exists = scope:flower_receiver + } + name = learning_medicine.2001.b + #Scheme modifier or opinion bonus + if = { + limit = { + any_scheme = { + OR = { + scheme_type = seduce + scheme_type = courting + } + scheme_target_character = scope:flower_receiver + } + } + random_scheme = { + limit = { + OR = { + scheme_type = seduce + scheme_type = courting + } + scheme_target_character = scope:flower_receiver + } + add_scheme_modifier = { + type = seduce_and_courting_fragrant_flowers_modifier + } + } + } + else = { + reverse_add_opinion = { + target = scope:flower_receiver + modifier = romance_opinion + opinion = 20 + } + } + + #Pool character becomes guest + if = { + limit = { scope:herbalist = { is_pool_character = yes } } + add_visiting_courtier = scope:herbalist + } + } + + #Condemn + option = { + name = { + trigger = { NOT = { exists = scope:chaplain_hates_herbs } } + text = learning_medicine.2001.d + } + name = { + trigger = { exists = scope:chaplain_hates_herbs } + text = learning_medicine.2001.d.chaplain_hates_herbs + } + + zealous_progression_effect = yes + + reverse_add_opinion = { + target = scope:herbalist + modifier = insulted_opinion + opinion = -15 + } + + if = { + limit = { exists = scope:chaplain_hates_herbs } + reverse_add_opinion = { + target = scope:chaplain_hates_herbs + modifier = pious_opinion + opinion = 25 + } + } + + } + + after = { + add_learning_lifestyle_xp = minor_lifestyle_xp + if = { + limit = { + exists = scope:created_char + } + scope:herbalist = { + silent_disappearance_ai_effect = yes + } + } + } +} + +#Become a witch? +learning_medicine.2002 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2001.t + desc = { + desc = learning_medicine.2002.start.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:chaplain_hates_herbs + any_learning_councillor = { this = scope:chaplain_hates_herbs } + } + desc = learning_medicine.2002.chaplain_hates_herbs.desc + } + triggered_desc = { + trigger = { + faith = { NOT = { has_doctrine_parameter = witchcraft_accepted } } + } + desc = learning_medicine.2002.not_witchcraft_accepted.desc + } + desc = learning_medicine.2002.witchcraft_accepted.desc + } + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = page_flipping + } + right_portrait = { + character = scope:herbalist + animation = physician + } + + trigger = { + scope:herbalist = { + basic_is_available_ai = yes + OR = { + has_relation_friend = root + is_courtier_of = root + is_foreign_court_or_pool_guest_of = root + } + } + } + + #Ask to be made witch + option = { + name = learning_medicine.2002.a + + random_list = { + 1 = { #Become a witch + show_chance = no + desc = learning_medicine.2002.a.success.t + modifier = { + scope:herbalist = { is_witch_trigger = no } + add = -1 + } + show_as_tooltip = { give_witch_secret_or_trait_effect = yes } + trigger_event = learning_medicine.2003 + } + 1 = { #They're not actually a witch + show_chance = no + desc = learning_medicine.2002.a.failure.t + trigger = { #If we know that she is a witch, don't even bother showing failure + scope:herbalist = { + NOR = { + has_trait = witch + any_secret = { + type = secret_witch + is_known_by = root + } + } + } + } + modifier = { + scope:herbalist = { is_witch_trigger = yes } + add = -1 + } + send_interface_toast = { + title = learning_medicine.2002.a.failure.t + left_icon = scope:herbalist + if = { + limit = { scope:herbalist = { faith = { NOT = { has_doctrine_parameter = witchcraft_accepted } } } } + reverse_add_opinion = { + target = scope:herbalist + modifier = impious_opinion + opinion = -15 + } + + if = { + limit = { faith = { NOT = { has_doctrine_parameter = witchcraft_accepted } } } + add_piety = minor_piety_loss + } + } + } + } + } + } + + #Investigate + option = { + trigger = { + intrigue >= mediocre_skill_rating + scope:herbalist = { + NOR = { + has_trait = witch + any_secret = { + type = secret_witch + is_known_by = root + } + } + } + } + skill = intrigue + name = learning_medicine.2002.b + + duel = { + skill = intrigue + target = scope:herbalist + 20 = { #TRUTH + desc = learning_medicine.2002.b.success.t + compare_modifier = { + value = scope:duel_value + } + custom_tooltip = learning_medicine.2002.b.success.tt + + hidden_effect = { + if = { + limit = { scope:herbalist = { is_witch_trigger = yes } } + send_interface_toast = { + title = learning_medicine.2002.b.success.witch.t + left_icon = scope:herbalist + add_learning_lifestyle_xp = minor_lifestyle_xp + scope:herbalist = { + random_secret = { + type = secret_witch + reveal_to = root + } + } + } + } + else = { + send_interface_toast = { + title = learning_medicine.2002.b.success.no_witch.t + left_icon = scope:herbalist + desc = learning_medicine.2002.b.success.no_witch.desc + add_learning_lifestyle_xp = minor_lifestyle_xp + } + } + } + } + 10 = { #INCONCLUSIVE + desc = learning_medicine.2002.b.inconclusive.t + compare_modifier = { + value = scope:duel_value + multiplier = -0.2 + } + send_interface_toast = { + title = learning_medicine.2002.b.inconclusive.t + left_icon = scope:herbalist + desc = learning_medicine.2002.b.inconclusive.desc + } + } + 10 = { #CAUGHT + desc = learning_medicine.2002.b.failure.t + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = learning_medicine.2002.b.failure.t + left_icon = scope:herbalist + reverse_add_opinion = { + target = scope:herbalist + modifier = disappointed_opinion + opinion = -20 + } + } + } + } + } + + #Let it go + option = { + name = learning_medicine.2002.c + + add_character_modifier = { + modifier = diligent_student + years = 5 + } + + reverse_add_opinion = { + target = scope:herbalist + modifier = respect_opinion + opinion = 15 + } + } +} + +#You become a cool witch! +learning_medicine.2003 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2001.t + desc = learning_medicine.2003.desc + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:herbalist + animation = eccentric + } + + immediate = { + play_music_cue = "mx_cue_murder" + scope:herbalist = { + random_secret = { + type = secret_witch + limit = { + NOT = { is_known_by = root } + } + reveal_to = root + } + } + } + + option = { + name = learning_medicine.2003.a + give_witch_secret_or_trait_effect = yes + } +} + + +################################################## +# Improve the skills of your court physician +# by Mathilda Bjarnehed +################################################## +learning_medicine.2010 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2010.t + desc = { + desc = learning_medicine.2010.start.desc + first_valid = { + random_valid = { + triggered_desc = { + trigger = { + is_valid_for_east_asian_events_trigger = no + NOR = { + has_culture = culture:greek + scope:court_physician = { has_culture = culture:greek } + } + } + desc = learning_medicine.2010.galen.desc + } + triggered_desc = { + trigger = { + is_valid_for_east_asian_events_trigger = no + NOR = { + has_culture = culture:greek + scope:court_physician = { has_culture = culture:greek } + } + } + desc = learning_medicine.2010.hippocrates.desc + } + triggered_desc = { + trigger = { + is_valid_for_east_asian_events_trigger = no + NOR = { + has_culture = culture:greek + scope:court_physician = { has_culture = culture:greek } + } + } + desc = learning_medicine.2010.herophilus.desc + } + triggered_desc = { + trigger = { + OR = { + is_valid_for_east_asian_events_trigger = yes # Culture is Japanese, Chinese or Korean + scope:court_physician = { is_valid_for_east_asian_events_trigger = yes } + } + NOR = { + culture = { has_cultural_pillar = heritage_chinese } + scope:court_physician.culture = { has_cultural_pillar = heritage_chinese } + } + } + desc = learning_medicine.2010.bianque.desc + } + triggered_desc = { + trigger = { + OR = { + culture = { has_cultural_pillar = heritage_chinese } + scope:court_physician.culture = { has_cultural_pillar = heritage_chinese } + } + } + desc = learning_medicine.2010.sun_simiao.desc + } + triggered_desc = { + trigger = { + OR = { + culture = { has_cultural_pillar = heritage_chinese } + scope:court_physician.culture = { has_cultural_pillar = heritage_chinese } + } + } + desc = learning_medicine.2010.zhan_zhongjing.desc + } + triggered_desc = { + trigger = { + OR = { + location = { geographical_region = world_asia } + is_valid_for_east_asian_events_trigger = yes # Culture is Japanese, Chinese or Korean + scope:court_physician.culture = { is_valid_for_east_asian_events_trigger = yes } + } + } + desc = learning_medicine.2010.hua_tuo.desc + } + triggered_desc = { + trigger = { + current_date >= 984.1.1 + OR = { + culture = { has_cultural_pillar = heritage_japonic } + scope:court_physician.culture = { has_cultural_pillar = heritage_japonic } + } + } + desc = learning_medicine.2010.tamba_yasuyori.desc + } + triggered_desc = { + trigger = { + current_date >= 1120.1.1 + location = { + geographical_region = world_europe + } + } + desc = learning_medicine.2010.hildegard.desc + } + triggered_desc = { + trigger = { + current_date >= 1316.12.30 + location = { + geographical_region = world_europe + } + } + desc = learning_medicine.2010.mundinus.desc + } + triggered_desc = { + trigger = { + NOR = { + culture = { has_cultural_pillar = heritage_arabic } + scope:court_physician = { culture = { has_cultural_pillar = heritage_arabic } } + faith = { religion_tag = islam_religion } + scope:court_physician.faith = { religion_tag = islam_religion } + } + current_date >= 1225.1.1 + } + desc = learning_medicine.2010.avicenna.desc + } + triggered_desc = { + trigger = { + NOR = { + has_culture = culture:italian + scope:court_physician = { has_culture = culture:italian } + } + current_date >= 1150.1.1 + } + desc = learning_medicine.2010.trota.desc + } + } + desc = learning_medicine.2010.fallback.desc + } + desc = learning_medicine.2010.end.desc + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:court_physician + animation = stressed_teacher + } + + trigger = { + court_physician_available_trigger = yes + NOT = { has_character_flag = had_event_learning_medicine_2010 } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + save_court_physician_as_effect = { SCOPE_NAME = court_physician } + add_character_flag = { + flag = had_event_learning_medicine_2010 + years = 5 + } + } + + #Help out + option = { + name = learning_medicine.2010.a + duel = { + skill = learning + value = mediocre_skill_rating + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + desc = learning_medicine.2010.a.success.desc + send_interface_toast = { + title = learning_medicine.2010.a.success.desc + left_icon = scope:court_physician + scope:court_physician = { + add_learning_skill = 2 + } + add_learning_lifestyle_xp = major_lifestyle_xp + } + } + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = learning_medicine.2010.a.failure.desc + send_interface_toast = { + title = learning_medicine.2010.a.failure.desc + left_icon = scope:court_physician + reverse_add_opinion = { + target = scope:court_physician + modifier = disappointed_opinion + opinion = -10 + } + } + } + } + cynical_progression_effect = yes + } + + #These books are bad, I know better ones + option = { + name = learning_medicine.2010.b + add_learning_lifestyle_xp = minor_lifestyle_xp + remove_short_term_gold = minor_gold_value + + scope:court_physician = { + physician_lifestyle_rank_up_effect = yes + } + } + + #You should look to the holy text instead! + option = { + name = learning_medicine.2010.c + add_learning_lifestyle_xp = minor_lifestyle_xp + add_piety = medium_piety_value + if = { + limit = { + scope:court_physician = { ai_zeal >= low_positive_ai_value } + faith = scope:court_physician.faith + } + reverse_add_opinion = { + target = scope:court_physician + modifier = pious_opinion + opinion = 15 + } + } + else = { + reverse_add_opinion = { + target = scope:court_physician + modifier = disappointed_opinion + opinion = -10 + } + } + + zealous_progression_effect = yes + } +} + + +################################################## +# Fertility treatment +# by Mathilda Bjarnehed +################################################## + +scripted_trigger learning_medicine_2020_can_have_child_trigger = { + trigger_if = { + limit = { is_male = yes } + is_visibly_fertile = yes + fertility >= 0.1 + } + trigger_if = { + limit = { is_female = yes } + is_visibly_fertile = yes + fertility >= 0.1 + is_pregnant = no + } + NOT = { + has_court_position = court_physician_court_position + } +} + +learning_medicine.2020 = { + hidden = yes + + trigger = { + learning_medicine_2020_can_have_child_trigger = yes + any_spouse = { + learning_medicine_2020_can_have_child_trigger = yes #Also checking that they are in fact not the court physician + } + NAND = { + any_child = { + character_gender_can_inherit_from_trigger = { CHARACTER = root } + count >= 4 + } + player_heir.dynasty = root.dynasty + } + NOT = { has_character_flag = had_event_learning_medicine_2020 } + } + + weight_multiplier = { + base = 1 + + #Age + modifier = { + add = { + value = age + subtract = 30 #An age where you could start to worry + multiply = 0.06 #45 years = 1 + min = -1 + max = 1.5 + } + } + + #Fertility + modifier = { + add = { + add = 1 #100% fertility + subtract = { + add = fertility + add = primary_spouse.fertility + divide = 2 #To get the average fertility + } + #Now we have the inverted fertility, the lower the fertility, the higher the remaining number is + subtract = medium_fertility #So high fertility equals negative modifier + } + } + + #Number of children + modifier = { + add = { + every_child = { + if = { + limit = { character_gender_can_inherit_from_trigger = { CHARACTER = root } } + add = -0.25 + } + else = { + add = -0.1 + } + } + } + } + + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + + if = { + limit = { exists = scope:physician } + save_scope_value_as = { + name = new_physician + value = no + } + trigger_event = learning_medicine.2022 + } + else_if = { + limit = { + can_employ_court_position_type = court_physician_court_position + } + save_scope_value_as = { + name = new_physician + value = yes + } + trigger_event = learning_medicine.2021 + } + + add_character_flag = { + flag = had_event_learning_medicine_2020 + years = 10 + } + } +} + + +#You have no physician but this person wants to help you with fertility issues! +learning_medicine.2021 = { #by Mathilda Bjarnehed + type = letter_event + opening = learning_medicine.2021.t + desc = learning_medicine.2021.desc + sender = scope:physician + + immediate = { + random_pool_character = { + province = root.capital_province + limit = { learning >= medium_skill_rating } + weight = { + base = 1 + modifier = { + add = { + value = learning + subtract = medium_skill_rating + } + } + } + save_scope_as = physician + } + if = { + limit = { NOT = { exists = scope:physician } } + create_character = { + template = pool_repopulate_learning + gender_female_chance = 50 + location = root.capital_province + save_scope_as = physician + } + } + } + + #Yes I want your services + option = { + name = learning_medicine.2021.a + pay_treasury_or_gold = { + value = high_skill_court_physician_cost + target = scope:physician + } + set_court_physician_effect = { + EMPLOYER = root + PHYSICIAN = scope:physician + } + custom_tooltip = learning_medicine.2021.a.tt + trigger_event = { + id = learning_medicine.2022 + days = { 7 10 } + } + } + + #Maybe there is something else you can help me with + option = { + name = learning_medicine.2021.b + custom_tooltip = learning_medicine.2021.b.tt + pay_treasury_or_gold = { + value = low_skill_court_physician_cost + target = scope:physician + } + set_court_physician_effect = { + EMPLOYER = root + PHYSICIAN = scope:physician + } + } + + #Nah thanks + option = { + name = learning_medicine.2021.c + add_prestige = miniscule_prestige_gain + } +} + +#Physician offers you to try different methods +scripted_trigger learning_medicine_2022_valid_physician_trigger = { + exists = scope:physician + root = { + any_court_position_holder = { + type = court_physician_court_position + this = scope:physician + } + } +} + +learning_medicine.2022 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2022.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:new_physician = no } + desc = learning_medicine.2022.old_physician.desc + } + triggered_desc = { + trigger = { scope:new_physician = yes } + desc = learning_medicine.2022.new_physician.desc + } + } + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = stunned + } + right_portrait = { + character = scope:physician + animation = physician + } + lower_right_portrait = scope:spouse + + trigger = { + learning_medicine_2022_valid_physician_trigger = yes + any_spouse = { learning_medicine_2020_can_have_child_trigger = yes } + } + + immediate = { + #pick a spouse + random_spouse = { + limit = { + learning_medicine_2020_can_have_child_trigger = yes + this = root.primary_spouse + } + alternative_limit = { + learning_medicine_2020_can_have_child_trigger = yes + } + save_scope_as = spouse + if = { + limit = { is_female = yes } + save_scope_as = woman + } + else = { + save_scope_as = man + } + } + if = { + limit = { is_female = yes } + save_scope_as = woman + } + else = { + save_scope_as = man + } + } + + #Something safe + option = { + name = learning_medicine.2022.b + + random_list = { + 85 = { + modifier = { + add = { + value = scope:physician.learning + subtract = average_skill_rating + multiply = 5 + } + } + desc = learning_medicine.2022.b.success + send_interface_toast = { + title = learning_medicine.2022.b.success + left_icon = scope:physician + right_icon = scope:spouse + add_character_modifier = { + modifier = successful_fertility_treatment + years = 10 + } + scope:spouse = { + add_character_modifier = { + modifier = successful_fertility_treatment + years = 10 + } + } + } + } + 15 = { + modifier = { + add = { + value = scope:physician.learning + subtract = average_skill_rating + multiply = -1 + min = -10 + } + } + desc = learning_medicine.2022.b.failure + send_interface_toast = { + title = learning_medicine.2022.b.failure + left_icon = scope:physician + right_icon = scope:spouse + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + scope:spouse = { + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + } + } + } + } + } + + #Something new + option = { + name = learning_medicine.2022.a + + random_list = { + desc = outcome_in_a_few_days + 55 = { #Good outcome + modifier = { + add = { + value = scope:physician.learning + subtract = average_skill_rating + multiply = 5 + } + } + desc = learning_medicine.2022.a.success + show_as_tooltip = { + add_character_modifier = { + modifier = very_successful_fertility_treatment + years = 10 + } + scope:spouse = { + add_character_modifier = { + modifier = very_successful_fertility_treatment + years = 10 + } + } + } + trigger_event = { + id = learning_medicine.2023 + days = { 3 7 } + } + } + 30 = { #Strange outcome + modifier = { + scope:physician = { + OR = { + has_trait = lifestyle_mystic + ai_honor <= medium_negative_ai_value + } + } + add = 20 + } + trigger = { + is_ai = no + scope:spouse = { might_cheat_on_every_partner_trigger = yes } + scope:physician = { might_cheat_on_every_partner_trigger = yes } + } + desc = learning_medicine.2022.a.unexpected + custom_tooltip = learning_medicine.2022.a.unexpected.tt + hidden_effect = { + random_list = { + 30 = { #Did the court physician have sex with my spouse...? + trigger = { + scope:spouse = { is_female = yes } + scope:physician = { + is_male = yes + learning_medicine_2020_can_have_child_trigger = yes + } + } + modifier = { + add = { + value = scope:physician.ai_honor + divide = high_negative_ai_value + multiply = 30 + } + } + hidden_effect = { + scope:spouse = { + random_list = { + 80 = { + had_sex_with_effect = { #Use effect because we want possibility of suspicion + CHARACTER = scope:physician + PREGNANCY_CHANCE = 100 + } + } + 20 = { + make_pregnant = { + father = root + } + } + } + } + } + trigger_event = { + id = learning_medicine.2025 + days = { 30 40 } + } + } + 70 = { #Regular side effects (good outcome + additional effects) + save_scope_value_as = { + name = side_effects + value = yes + } + trigger_event = { + id = learning_medicine.2023 #The good outcome + days = { 3 7 } + } + } + } + } + } + 15 = { # Bad outcome + modifier = { + add = { + value = scope:physician.learning + subtract = average_skill_rating + multiply = -1 + min = -10 + } + } + desc = learning_medicine.2022.a.failure + trigger_event = { + id = learning_medicine.2024 + days = { 3 7 } + } + show_as_tooltip = { + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + scope:spouse = { + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + } + } + } + } + } + + + + #Actually, I just want some... tricks + option = { + name = learning_medicine.2022.c + + reverse_add_opinion = { + target = scope:spouse + modifier = romance_opinion + opinion = 25 + } + } + + #Nah thanks + option = { + trigger = { scope:new_physician = no } + name = learning_medicine.2021.c + add_prestige = miniscule_prestige_gain + } +} + +scripted_trigger learning_medicine_2023_continue_chain_trigger = { + learning_medicine_2022_valid_physician_trigger = yes + exists = scope:spouse + scope:spouse = { + is_alive = yes + is_consort_of = root + } +} + +scripted_trigger learning_medicine_2023_random_foreign_ruler_trigger = { + is_landed = yes + is_ai = yes + NOT = { in_diplomatic_range = root } + might_cheat_on_every_partner_trigger = yes +} + +scripted_trigger learning_medicine_2023_random_family_member_trigger = { + is_male = yes + is_ai = yes + learning_medicine_2020_can_have_child_trigger = yes + might_cheat_on_every_partner_trigger = yes + save_temporary_scope_as = incest_relative + NOR = { + has_trait = chaste + guaranteed_under_20_incest_rejection_trigger = { + TARGET = scope:incest_relative + SEDUCER = scope:spouse + } + guaranteed_under_20_incest_rejection_trigger = { + TARGET = scope:spouse + SEDUCER = scope:incest_relative + } + } +} + +#Risky option: It went great! +learning_medicine.2023 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2022.t + desc = { + random_valid = { + desc = { + desc = learning_medicine.2023.urine.desc + desc = learning_medicine.2023.unpleasant_end.desc + } + desc = { + desc = learning_medicine.2023.pig_testicles.desc + desc = learning_medicine.2023.pig_testicles_end.desc + } + desc = { + desc = learning_medicine.2023.udder.desc + desc = learning_medicine.2023.unpleasant_end.desc + } + desc = { + desc = learning_medicine.2023.milk_bath.desc + desc = learning_medicine.2023.milk_bath_end.desc + } + desc = { + desc = learning_medicine.2023.female_orgasm.start.desc + first_valid = { + triggered_desc = { + trigger = { is_female = yes } + desc = learning_medicine.2023.female_orgasm.female.desc + } + triggered_desc = { + trigger = { is_male = yes } + desc = learning_medicine.2023.female_orgasm.male.desc + } + } + } + } + desc = learning_medicine.2023.end.desc + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:physician + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_right_portrait = scope:spouse + + trigger = { + learning_medicine_2023_continue_chain_trigger = yes + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + hidden_effect = { + if = { + limit = { + scope:woman = { is_pregnant = no } #We could have gotten pregnant while waiting + } + if = { + limit = { exists = scope:side_effects } + + random_list = { + 10 = { #Far away pregnancy + trigger = { + scope:spouse = { + is_female = yes + might_cheat_on_every_partner_trigger = yes + } + any_independent_ruler = { learning_medicine_2023_random_foreign_ruler_trigger = yes } + } + random_independent_ruler = { + limit = { learning_medicine_2023_random_foreign_ruler_trigger = yes } + weight = { + base = 1 + modifier = { + add = 1000 + capital_province = { + squared_distance = { + target = root.capital_province + value >= squared_distance_monstrous + } + } + } + } + save_scope_as = foreign_ruler + create_character = { + location = root.capital_province + template_character = scope:foreign_ruler + gender = male + age = { 15 35 } + save_scope_as = foreign_father + } + } + scope:spouse = { + had_sex_with_effect = { + CHARACTER = scope:foreign_father + PREGNANCY_CHANCE = pregnancy_chance + } + } + } + 15 = { #Incest pregnancy + trigger = { + scope:spouse = { + is_female = yes + NOT = { has_trait = chaste } + might_cheat_on_every_partner_trigger = yes + any_close_family_member = { learning_medicine_2023_random_family_member_trigger = yes } + } + } + scope:spouse = { + random_close_family_member = { + limit = { learning_medicine_2023_random_family_member_trigger = yes } + save_scope_as = incest_father + } + had_sex_with_effect = { #Use effect because we want possibility of suspicion + CHARACTER = scope:incest_father + PREGNANCY_CHANCE = 100 + } + } + } + 30 = { #Unexpected trait + scope:woman = { + add_character_flag = { + flag = medicine_learning_fertility_treamtent_unexpected_trait + years = 1 + } + make_pregnant = { + father = scope:man + } + } + } + 45 = { #Twins + scope:woman = { + make_pregnant = { + father = scope:man + number_of_children = 2 + } + } + } + } + } + else = { #Just regular pregnancy roll + random = { + chance = 50 + scope:woman = { + had_sex_with_effect = { + CHARACTER = scope:man + PREGNANCY_CHANCE = pregnancy_chance + } + } + } + } + } + + location = { save_scope_as = location } + } + } + + option = { + name = learning_medicine.2023.a + + add_character_modifier = { + modifier = very_successful_fertility_treatment + years = 10 + } + reverse_add_opinion = { + modifier = romance_opinion + target = scope:spouse + opinion = 15 + } + scope:spouse = { + add_character_modifier = { + modifier = very_successful_fertility_treatment + years = 10 + } + } + } +} + + +#Risky option: It went awful! +learning_medicine.2024 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2022.t + desc = { + random_valid = { + desc = learning_medicine.2023.urine.desc + desc = learning_medicine.2023.pig_testicles.desc + desc = learning_medicine.2023.udder.desc + desc = learning_medicine.2023.milk_bath.desc + } + desc = learning_medicine.2024.end.desc + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = sick_stomach + } + right_portrait = { + character = scope:physician + animation = worry + } + lower_right_portrait = scope:spouse + + trigger = { + learning_medicine_2023_continue_chain_trigger = yes + } + + immediate = { + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + scope:spouse = { + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + } + location = { save_scope_as = location } + } + + #Forgive + option = { + name = learning_medicine.2024.a + + reverse_add_opinion = { + target = scope:physician + modifier = grateful_opinion + opinion = 10 + } + + stress_impact = { + wrathful = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + vengeful = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_compassion_target_modifier = { VALUE = 50 } + ai_vengefulness_target_modifier = { VALUE = -50 } + } + } + + #Imprison + option = { + name = learning_medicine.2024.b + + imprison_physician_effect = yes + + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + ai_compassion_target_modifier = { VALUE = -30 } + ai_vengefulness_target_modifier = { VALUE = 100 } + } + } +} + + +#Risky option: My spouse is pregnant but nothing was done...? +learning_medicine.2025 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2022.t + desc = { + desc = learning_medicine.2025.start.desc + first_valid = { + triggered_desc = { + trigger = { scope:physician.faith = { fertilitygod_is_active_trigger = yes } } + desc = learning_medicine.2025.fertilitygod.desc + } + desc = learning_medicine.2025.the_universe.desc + } + desc = learning_medicine.2025.end.desc + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:physician + animation = happiness + } + lower_right_portrait = scope:spouse + + trigger = { + learning_medicine_2023_continue_chain_trigger = yes + } + + #Ok + option = { + name = learning_medicine.2025.b + + stress_impact = { + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + add = -90 + } + } + } + + option = { #Confront spouse! + name = learning_medicine.2025.a + custom_tooltip = learning_medicine.2025.a.tt + + add_character_flag = confront_spouse + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + after = { + hidden_effect = { + if = { + limit = { has_character_flag = confront_spouse } + remove_character_flag = confront_spouse + scope:spouse = { save_scope_as = lover_spouse } + save_scope_as = spouse + scope:lover_spouse = { + trigger_event = { + id = adultery.0003 + } + } + } + } + } +} + +####################################### +# Healthy coping mechanism: becoming a confider +# by Mathilda Bjarnehed +####################################### + +scripted_trigger leaning_medicine_2030_potential_confider_friend_trigger = { + opinion = { + target = root + value >= low_positive_opinion + } + target_is_liege_or_above = root.top_liege + basic_is_available_ai = yes + is_adult = yes + NOT = { has_relation_rival = root } +} + +scripted_effect medicine_2030_confider_chance_effect = { + random = { + chance = 40 + modifier = { + has_relation_friend = $FRIEND$ + add = 25 + } + modifier = { + add = { + value = ai_honor + divide = high_positive_ai_value + multiply = 40 + max = 40 + min = -20 + } + } + + + send_interface_toast = { + title = learning_medicine.2030.a.message + add_trait = confider + scope:confider_target = { + if = { + limit = { has_relation_friend = root } + if = { + limit = { + has_relation_best_friend = root + } + add_relation_flag = { + target = root + relation = best_friend + flag = has_been_confided_in + } + } + else = { + add_relation_flag = { + target = root + relation = friend + flag = has_been_confided_in + } + } + } + } + add_stress = medium_stress_loss + } + } +} + +learning_medicine.2030 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2030.t + desc = learning_medicine.2030.desc + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:confider_target + animation = personality_compassionate + } + lower_right_portrait = scope:confider_target_2 + + trigger = { + NOR = { + has_trait = confider + has_character_flag = had_event_learning_medicine_2030 + } + get_characters_of_major_interest_trigger = { LISTNAME = confider_list } + any_in_list = { + list = confider_list + leaning_medicine_2030_potential_confider_friend_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = stress + divide = extremely_high_stress + multiply = 2 + subtract = 0.5 + max = 1 #Will end up with a modifier between -0.5 at 0 stress and 1 at upper third of stress scale + } + } + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_medicine_2030 + years = 10 + } + + #Build confider list + get_characters_of_major_interest_effect = { LISTNAME = confider_list } + + #OPTION 1 alternatives: + # Alt 1: Medicine friend helps you out (guaranteed confider) + # Alt 2: Confide in list character (random chance of confider) + + #Do I have a medicine friend? if so, alt 1 + random_relation = { + type = friend + limit = { + basic_is_available_ai = yes + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + } + save_scope_as = confider_target + save_scope_value_as = { + name = option_1 + value = flag:medicine_friend_guaranteed + } + } + + #No medicine friend? pick someone in list for alt 2 + if = { + limit = { NOT = { exists = scope:option_1 } } + + #Find someone to confide in (OPTION 1) + random_in_list = { + list = confider_list + limit = { + leaning_medicine_2030_potential_confider_friend_trigger = yes + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + } + alternative_limit = { leaning_medicine_2030_potential_confider_friend_trigger = yes } + weight = { + base = 1 + modifier = { + OR = { + is_close_family_of = root + is_powerful_vassal = yes + } + add = 5 + } + modifier = { + has_relation_potential_friend = root + add = 10 + } + compatibility_modifier = { + compatibility_target = root + min = -20 + max = 20 + multiplier = 1 + } + modifier = { + any_secret = { + NOT = { is_known_by = root } + } + add = 20 + } + } + save_scope_as = confider_target + save_scope_value_as = { + name = option_1 + value = flag:list_character_random + } + } + } + + + #OPTION 2 alternatives: + # Alt 1: Confide in list character (random chance of confider), if option 1 is medicine friend or I have no secret to trade + # Alt 2: Secret trade with random list character (guaranteed confider) + + + #Alt 1: Confide in list character + if = { + limit = { + OR = { + scope:option_1 = flag:medicine_friend_guaranteed + NOT = { + any_secret = { + is_known_by = scope:confider_target + } + } + } + } + + random_in_list = { + list = confider_list + limit = { + this != scope:confider_target + leaning_medicine_2030_potential_confider_friend_trigger = yes + NOT = { has_relation_friend = root } #Because there is no friend benefit on this option + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + } + alternative_limit = { + this != scope:confider_target + NOT = { has_relation_friend = root } #Because there is no friend benefit on this option + leaning_medicine_2030_potential_confider_friend_trigger = yes + } + weight = { + base = 1 + modifier = { + OR = { + is_close_family_of = root + is_powerful_vassal = yes + } + add = 5 + } + modifier = { + has_relation_potential_friend = root + add = 10 + } + compatibility_modifier = { + compatibility_target = root + min = -20 + max = 20 + multiplier = 1 + } + } + save_scope_as = confider_target_2 + save_scope_value_as = { + name = option_2 + value = flag:list_character_random + } + } + } + ## Alt 2: Secret trade with random list character + else = { + #Find one of my secrets + random_secret = { + limit = { + is_shunned_for = root + NOT = { is_known_by = scope:confider_target } + } + alternative_limit = { + NOT = { is_known_by = scope:confider_target } + } + save_scope_as = root_secret + } + + #Try to find one of their secrets for the trade + scope:confider_target = { + if = { + limit = { NOT = { any_secret = { NOT = { is_known_by = root } } } } + give_random_likely_secret_effect = yes + } + + random_secret = { + limit = { + is_blackmailable_secret_trigger = { + PARTICIPANT = scope:confider_target + BLACKMAILER = root + } + NOT = { is_known_by = root } + } + alternative_limit = { + NOT = { is_known_by = root } + } + save_scope_as = confider_target_secret + } + } + + save_scope_value_as = { + name = option_2 + value = flag:secret_trading_guaranteed + } + } + } + + #OPTION 1 + + #Medicine friend helps you + option = { + trigger = { scope:option_1 = flag:medicine_friend_guaranteed } + name = learning_medicine.2030.a + + add_trait = confider + + scope:confider_target = { + add_relation_flag = { + target = root + relation = friend + flag = has_been_confided_in + } + } + + stress_impact = { + base = major_stress_loss + deceitful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + #Regular confide in target 1 + option = { + trigger = { scope:option_1 = flag:list_character_random } + name = learning_medicine.2030.a + + #Become friends or potential friend + progress_towards_friend_effect = { + CHARACTER = scope:confider_target + REASON = friend_free_therapy + OPINION = default_friend_opinion + } + + #Might become confider + medicine_2030_confider_chance_effect = { FRIEND = scope:confider_target } + + #Save them as a confidant if they became your friend + if = { + limit = { + has_relation_friend = scope:confider_target + } + scope:confider_target = { + add_relation_flag = { + target = root + relation = friend + flag = has_been_confided_in + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_boldness_target_modifier = { VALUE = 30 } + ai_honor_target_modifier = { VALUE = 100 } + } + } + + #OPTION 2 + + #Regular confide in target 2 + option = { + trigger = { + exists = scope:option_2 + scope:option_2 = flag:list_character_random + } + name = learning_medicine.2030.b + + #Become friends or potential friend + progress_towards_friend_effect = { + CHARACTER = scope:confider_target_2 + REASON = friend_free_therapy + OPINION = default_friend_opinion + } + + #Might become confider + medicine_2030_confider_chance_effect = { FRIEND = scope:confider_target_2 } + + #Save them as a confidant if they became your friend + if = { + limit = { + has_relation_friend = scope:confider_target + } + scope:confider_target = { + if = { + limit = { + has_relation_best_friend = root + } + add_relation_flag = { + target = root + relation = best_friend + flag = has_been_confided_in + } + } + else = { + add_relation_flag = { + target = root + relation = friend + flag = has_been_confided_in + } + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_boldness_target_modifier = { VALUE = 30 } + ai_honor_target_modifier = { VALUE = 100 } + } + } + + #Trader secrets with target 1 + option = { + trigger = { + exists = scope:option_2 + scope:option_2 = flag:secret_trading_guaranteed + exists = scope:root_secret + } + name = learning_medicine.2030.c + + #Secret trading + scope:root_secret = { + reveal_to = scope:confider_target + } + custom_tooltip = learning_medicine.2030.c.tt + if = { + limit = { exists = scope:confider_target } + hidden_effect = { + send_interface_toast = { + title = learning_medicine.2030.c.message + left_icon = scope:confider_target + scope:confider_target_secret = { + reveal_to = root + } + } + } + } + + #Set friendship, add trait and lose stress + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:confider_target } + } + set_relation_friend = { reason = friend_confiding_each_other target = scope:confider_target } + } + + add_trait = confider + + scope:confider_target = { + add_relation_flag = { + target = root + relation = friend + flag = has_been_confided_in + } + } + + stress_impact = { + base = medium_stress_loss + deceitful = major_stress_impact_gain + paranoid = major_stress_impact_gain + shy = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_boldness_target_modifier = { VALUE = 15 } + ai_honor_target_modifier = { VALUE = 30 } + } + } + + #OPTION 3 (fallback) + + #Keep secrets close to chest + option = { + name = learning_medicine.2030.d + + add_character_modifier = { + modifier = guarded_modifier + years = 15 + } + + stress_impact = { + honest = minor_stress_impact_gain + trusting = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_boldness_target_modifier = { VALUE = -30 } + ai_honor_target_modifier = { VALUE = -50 } + } + } +} + + + +################################################ +# Healthy coping mechanism: journaller or athletic +# by Mathilda Bjarnehed +################################################ + +learning_medicine.2040 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2040.t + desc = { + desc = learning_medicine.2040.start.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:friend_help + scope:friend_help = flag:athletic + } + desc = learning_medicine.2040.athletic_friend.desc + } + triggered_desc = { + trigger = { + exists = scope:friend_help + scope:friend_help = flag:journaller + } + desc = learning_medicine.2040.journaller_friend.desc + } + desc = learning_medicine.2040.no_friend.desc + } + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:friend + triggered_animation = { + trigger = { scope:friend_help ?= flag:journaller } + animation = writing + } + triggered_animation = { + trigger = { scope:friend_help ?= flag:athletic } + animation = hero_flex + } + animation = personality_compassionate + trigger = { + exists = scope:friend + } + } + + trigger = { + NOR = { + has_traits_that_negate_athletic_trigger = yes #Are we already athletic or does any of our traits contradict athletic? + has_trait = journaller + has_character_flag = had_event_learning_medicine_2040 + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = stress + divide = extremely_high_stress + multiply = 2 + subtract = 0.5 + max = 1 #Will end up with a modifier between -0.5 at 0 stress and 1 at upper third of stress scale + } + } + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_medicine_2040 + flag = had_event_learning_medicine_2040 + flag = had_event_learning_medicine_2040 + years = 10 + } + + #Grab a medicine friend if we have one and randomize what they can help you with + random_relation = { + type = friend + limit = { + basic_is_available_ai = yes + OR = { + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + has_trait = athletic + has_trait = journaller + } + } + save_scope_as = friend + random_list = { + 100 = { #Athletic + modifier = { + add = { + value = prowess + subtract = average_skill_rating + multiply = 10 + } + } + modifier = { + add = { + value = ai_energy + divide = high_positive_ai_value + multiply = 50 + } + } + modifier = { + factor = 0 + has_trait = journaller + } + save_scope_value_as = { + name = friend_help + value = flag:athletic + } + if = { + limit = { + NOT = { has_trait = athletic } + } + add_trait = athletic + } + } + 100 = { #Journaller + modifier = { + add = { + value = learning + subtract = average_skill_rating + multiply = 10 + } + } + modifier = { + add = { + value = ai_energy + divide = high_positive_ai_value + multiply = -30 + } + } + modifier = { + has_trait = shy + add = 30 + } + modifier = { + factor = 0 + has_trait = athletic + } + save_scope_value_as = { + name = friend_help + value = flag:journaller + } + if = { + limit = { + NOT = { has_trait = journaller } + } + add_trait = journaller + } + } + } + } + } + + #FRIEND HELP OPTIONS + + #Friend helps with athletic + option = { + trigger = { + exists = scope:friend_help + scope:friend_help = flag:athletic + } + name = learning_medicine.2040.a + + add_trait = athletic + + stress_impact = { + base = medium_stress_loss + lazy = minor_stress_impact_gain + } + } + + #Friend helps with journaller + option = { + trigger = { + exists = scope:friend_help + scope:friend_help = flag:journaller + } + name = learning_medicine.2040.b + + add_trait = journaller + + stress_impact = { + base = medium_stress_loss + dull = minor_stress_impact_gain + intellect_bad_1 = minor_stress_impact_gain + intellect_bad_2 = minor_stress_impact_gain + intellect_bad_3 = minor_stress_impact_gain + } + } + + + #REGULAR OPTIONS + + #Athletic + option = { + trigger = { + has_traits_that_negate_athletic_trigger = no #Fail-safe in case the event gets triggered somehow + OR = { + NOT = { exists = scope:friend_help } + trigger_if = { + limit = { + exists = scope:friend_help + } + NOT = { scope:friend_help = flag:athletic } + } + } + } + name = learning_medicine.2040.c + + random_list = { + 50 = { + desc = learning_medicine.2030.c.trait + send_interface_toast = { + title = learning_medicine.2030.c.trait + add_trait = athletic + stress_impact = { + base = minor_stress_loss + } + } + } + 50 = { + desc = learning_medicine.2030.c.modifier + send_interface_toast = { + title = learning_medicine.2030.c.modifier + add_character_modifier = { + modifier = exercise_modifier + years = 15 + } + } + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + } + } + + #Journaller + option = { + trigger = { + OR = { + NOT = { exists = scope:friend_help } + trigger_if = { + limit = { + exists = scope:friend_help + } + NOT = { scope:friend_help = flag:journaller } + } + } + } + name = learning_medicine.2040.d + + random_list = { + 50 = { + desc = learning_medicine.2030.d.trait + send_interface_toast = { + title = learning_medicine.2030.d.trait + add_trait = journaller + stress_impact = { + base = minor_stress_loss + } + } + } + 50 = { + desc = learning_medicine.2030.d.modifier + send_interface_toast = { + title = learning_medicine.2030.d.modifier + add_character_modifier = { + modifier = wide_vocabulary_modifier + years = 15 + } + } + } + } + + stress_impact = { + dull = minor_stress_impact_gain + intellect_bad_1 = minor_stress_impact_gain + intellect_bad_2 = minor_stress_impact_gain + intellect_bad_3 = minor_stress_impact_gain + } + } + + + #OPT OUT + option = { + name = learning_medicine.2040.e + + stress_impact = { + base = medium_stress_loss + diligent = minor_stress_impact_gain + } + } +} + + +######################################################### +# Helping healing hand (medicine friend) +# by Mathilda Bjarnehed +########################################################## + +learning_medicine.2050 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2050.t + desc = { + desc = learning_medicine.2050.start.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:physician } + desc = learning_medicine.2050.physician.desc + } + desc = learning_medicine.2050.no_physician.desc + } + desc = learning_medicine.2050.end.desc + } + + theme = learning_medicine_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:soldier + animation = shiver + } + lower_right_portrait = scope:helper + + trigger = { + NOT = { + has_character_flag = had_event_learning_medicine_2050 + } + is_playable_character = yes + exists = root.capital_province.culture + number_of_maa_regiments >= 1 + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + any_knight = { prowess < average_skill_rating } + number_of_knights < max_number_of_knights + } + add = 0.5 + } + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + play_music_cue = "mx_cue_stress" + add_character_flag = { + flag = had_event_learning_medicine_2050 + years = 10 + } + #Find a helper (potential friend) + if = { + limit = { + NOT = { + any_relation = { + type = friend + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + } + } + } + potential_lifestyle_friend_saving_effect = { FOCUS = learning_medicine_focus SCOPE_NAME = helper } + } + else = { + random_relation = { + type = friend + limit = { + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + } + save_scope_as = helper + } + } + + #Create a soldier + create_character = { + location = root.capital_province + culture = root.capital_province.culture + faith = root.capital_province.faith + template = pool_repopulate_prowess + save_scope_as = soldier + trait = wounded_2 + } + + #Grab physician for loc + if = { + limit = { + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + this != scope:helper + is_physically_able = yes + } + } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = physician + } + } + } + + #Accept help + option = { + name = learning_medicine.2050.a + + if = { + limit = { + has_relation_friend = scope:helper + } + show_as_tooltip = { medicine_2050_a_success_effect = yes } + trigger_event = learning_medicine.2051 + } + else = { + duel = { + skill = learning + value = average_skill_rating + 60 = { + desc = learning_medicine.2050.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + modifier = { + add = { + value = scope:helper.learning + subtract = average_skill_rating + multiply = 2 + min = 10 #Guaranteed help + } + } + show_as_tooltip = { medicine_2050_a_success_effect = yes } + trigger_event = learning_medicine.2051 + } + 40 = { + desc = learning_medicine.2050.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + modifier = { + add = { + value = scope:helper.learning + subtract = average_skill_rating + multiply = -2 + max = 0 #They shouldn't make this worse + } + } + show_as_tooltip = { medicine_2050_a_failure_effect = yes } + trigger_event = learning_medicine.2052 + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + #Do it yourself + option = { + name = learning_medicine.2050.b + + reverse_add_opinion = { + target = scope:helper + modifier = insult_opinion + opinion = -10 + } + + duel = { + skill = learning + value = average_skill_rating + 60 = { + desc = learning_medicine.2050.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + show_as_tooltip = { medicine_2050_b_success_effect = yes } + trigger_event = learning_medicine.2053 + } + 40 = { + desc = learning_medicine.2050.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + show_as_tooltip = { medicine_2050_b_failure_effect = yes } + trigger_event = learning_medicine.2054 + } + } + + stress_impact = { + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + #Let them die + option = { + name = learning_medicine.2050.c + add_dread = medium_dread_gain + + + stress_impact = { + base = medium_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = medium_stress_impact_gain + just = minor_stress_impact_gain + sadistic = major_stress_impact_loss + callous = medium_stress_impact_loss + vengeful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + } + + if = { + limit = { + scope:helper = { ai_compassion >= low_negative_ai_value } + } + reverse_add_opinion = { + target = scope:helper + modifier = cruelty_opinion + opinion = -20 + } + progress_towards_rival_effect = { + REASON = rival_let_soldier_die + CHARACTER = scope:helper + OPINION = 0 + } + } + + scope:soldier = { + death = { + death_reason = death_wounds + } + } + + ai_chance = { + base = 20 + ai_compassion_target_modifier = { VALUE = -100 } + ai_vengefulness_target_modifier = { VALUE = 50 } + } + } + after = { + scope:soldier = { + silent_disappearance_ai_effect = yes + } + scope:helper = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +#We saved soldier together! +learning_medicine.2051 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2050.t + desc = { + desc = learning_medicine.2051.start_our.desc + desc = learning_medicine.2051.start.desc + desc = learning_medicine.2051.middle.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:helper.highest_held_title_tier >= root.highest_held_title_tier + is_spouse_of = scope:helper + is_close_family_of = scope:helper + } + } + desc = learning_medicine.2051.my_ladylord.desc + } + desc = learning_medicine.2051.firstname.desc + } + desc = learning_medicine.2051.end.desc + } + + theme = learning_medicine_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:soldier + animation = admiration + } + lower_right_portrait = scope:helper + + immediate = { + medicine_2050_a_success_effect = yes + } + + option = { + name = learning_medicine.2051.a + } +} + + +#We lost the soldier together... +learning_medicine.2052 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2050.t + desc = { + desc = learning_medicine.2051.start_our.desc + desc = learning_medicine.2051.start.desc + desc = learning_medicine.2052.middle.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:helper.highest_held_title_tier >= root.highest_held_title_tier + is_spouse_of = scope:helper + is_close_family_of = scope:helper + } + } + desc = learning_medicine.2051.my_ladylord.desc + } + desc = learning_medicine.2051.firstname.desc + } + desc = learning_medicine.2052.end.desc + } + + theme = learning_medicine_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:soldier + animation = dead + } + lower_right_portrait = scope:helper + + immediate = { + medicine_2050_a_failure_effect = yes + } + + #Accept comfort + option = { + name = learning_medicine.2052.a + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:helper } + } + progress_towards_friend_effect = { + CHARACTER = scope:helper + OPINION = 20 + REASON = friend_reassurance + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + } + } + + #Be proud + option = { + name = learning_medicine.2052.b + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:helper + modifier = insulted_opinion + opinion = -5 + } + + stress_impact = { + humble = minor_stress_impact_gain + } + } +} + +#I saved the soldier! +learning_medicine.2053 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2050.t + desc = { + desc = learning_medicine.2053.start_my.desc + desc = learning_medicine.2051.start.desc + desc = learning_medicine.2053.desc + } + + theme = learning_medicine_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:soldier + animation = admiration + } + + immediate = { + medicine_2050_b_success_effect = yes + } + + option = { + name = learning_medicine.2053.a + } +} + +#I lost the soldier... +learning_medicine.2054 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2050.t + desc = { + desc = learning_medicine.2053.start_my.desc + desc = learning_medicine.2051.start.desc + desc = learning_medicine.2054.desc + first_valid = { + triggered_desc = { + trigger = { + scope:helper = { + OR = { + ai_vengefulness >= medium_positive_ai_value + ai_compassion <= 0 + } + } + } + desc = learning_medicine.2054.disgust.desc + } + desc = learning_medicine.2054.pity.desc + } + } + + theme = learning_medicine_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = sadness + } + right_portrait = { + character = scope:soldier + animation = dead + } + + immediate = { + medicine_2050_b_failure_effect = yes + } + + option = { + name = learning_medicine.2054.a + } +} + + +################################################## +# Tea and Cakes +# by Ewan Cowhig Croft +# 2110 +################################################## + +scripted_trigger learning_medicine_2110_valid_hashish_vassal_or_liege = { + is_available_ai_adult = yes + NOR = { + has_trait = zealous + has_trait = temperate + } + OR = { + AND = { + highest_held_title_tier = tier_barony + is_powerful_vassal_of = root + } + highest_held_title_tier >= tier_county + } +} + +# A vassal (or your liege) wants to eat some hashish while visiting your capital. +# by Ewan Cowhig Croft +learning_medicine_special.2110 = { + type = character_event + title = learning_medicine.2110.t + desc = { + desc = learning_medicine.2110.desc #Preamble. + first_valid = { + triggered_desc = { #Oh, hey, I like that guy. + trigger = { scope:hashish_relation = flag:positive } + desc = learning_medicine.2110.desc_good_terms + } + triggered_desc = { #What is this bastard doing in my city? + trigger = { scope:hashish_relation = flag:negative } + desc = learning_medicine.2110.desc_bad_terms + } + triggered_desc = { #Yes. You. Person who I have met at some point. + trigger = { scope:hashish_relation = flag:neutral } + desc = learning_medicine.2110.desc_neutral_terms + } + } + } + theme = learning_medicine_focus + override_background = { + reference = bp1_crossroads_inn + } + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:hashish_vassal_or_liege + animation = toast_goblet + } + + trigger = { + is_at_war = no + NOT = { has_character_flag = had_event_learning_medicine_2110 } + any_vassal = { learning_medicine_2110_valid_hashish_vassal_or_liege = yes } + root.capital_province = { + NOR = { + geographical_region = world_europe + geographical_region = world_asia + } + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_medicine_2110 + days = 1825 + } + every_vassal = { + limit = { learning_medicine_2110_valid_hashish_vassal_or_liege = yes } + add_to_list = potential_hashish_vassal_or_liege_list + } + root.liege = { + if = { + limit = { + learning_medicine_2110_valid_hashish_vassal_or_liege = yes + top_liege != this + } + add_to_list = potential_hashish_vassal_or_liege_list + } + } + random_in_list = { + list = potential_hashish_vassal_or_liege_list + weight = { + base = 1 + modifier = { #Powerful vassals are interesting characters. + add = 30 + is_powerful_vassal_of = root + } + modifier = { #Vassals who aren't on the council likely have more tense relations, so major non-councillors are a good pick. + add = 30 + AND = { + highest_held_title_tier >= tier_barony + NOT = { is_councillor_of = root } + } + } + modifier = { #What an excellent way to get over a rivalry! + add = 20 + OR = { + has_relation_potential_rival = root + has_relation_rival = root + } + } + modifier = { #Also good for dealing with factions. + add = 20 + AND = { + this != root.liege + OR = { + is_a_faction_leader = yes + is_a_faction_member = yes + } + } + } + modifier = { + add = 20 + this = root.liege + } + modifier = { #Plus weight up a little for gluttons and gloriers of gluttony. + add = 10 + OR = { + has_trait = gluttonous + faith = { trait_is_virtue = gluttonous } + } + } + modifier = { #We just like meeting interesting people, to be honest. + add = 5 + martial >= high_skill_rating + } + modifier = { + add = 5 + intrigue >= high_skill_rating + } + modifier = { + add = 5 + diplomacy >= high_skill_rating + } + modifier = { #Except barons. Barons suck. + add = -20 + highest_held_title_tier = tier_barony + } + } + save_scope_as = hashish_vassal_or_liege + } + scope:hashish_vassal_or_liege = { + if = { + limit = { + OR = { + has_relation_friend = root + has_relation_potential_friend = root + AND = { + NOR = { + has_relation_rival = root + has_relation_potential_rival = root + } + opinion = { + target = root + value >= medium_positive_opinion + } + } + } + } + save_scope_value_as = { + name = hashish_relation + value = flag:positive + } + } + else_if = { + limit = { + OR = { + has_relation_rival = root + has_relation_potential_rival = root + AND = { + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + } + opinion = { + target = root + value <= medium_negative_opinion + } + } + } + } + save_scope_value_as = { + name = hashish_relation + value = flag:negative + } + } + else = { + save_scope_value_as = { + name = hashish_relation + value = flag:neutral + } + } + } + root.capital_province = { save_scope_as = capital } + } + + option = { #You politely, but firmly, turn them down. + name = { + text = learning_medicine.2110.a.good_terms + trigger = { scope:hashish_relation = flag:positive } + } + name = { + text = learning_medicine.2110.a.bad_terms + trigger = { scope:hashish_relation = flag:negative } + } + name = { + text = learning_medicine.2110.a.neutral_terms + trigger = { scope:hashish_relation = flag:neutral } + } + scope:hashish_vassal_or_liege = { + add_opinion = { + modifier = insult_opinion + opinion = -25 + target = root + } + } + if = { #Muslims receive additional piety due to their religion's prohibitions on intoxicants. + limit = { + faith = { religion_tag = islam_religion } + } + add_piety = medium_piety_gain + } + else_if = { #If your faith hates such things, you get a little piety. + limit = { + faith = { trait_is_sin = gluttonous } + } + add_piety = minor_piety_gain + } + else_if = { #Unless they like them, in which case you confuse and annoy people. + limit = { + faith = { trait_is_virtue = gluttonous } + } + add_piety = minor_piety_loss + } + else = { add_prestige = miniscule_prestige_gain } #Otherwise you're just a bit of a neutral kill-joy, I guess. + stress_impact = { + gregarious = minor_stress_impact_gain + hashishiyah = medium_stress_impact_gain + shy = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.25 #Who the hell just turns up on my doorstep and expects me to go out? Rude. + ai_sociability = -0.5 + } + modifier = { + add = 40 + has_trait = shy + } + modifier = { + add = 30 + has_trait = temperate + } + modifier = { + add = -20 + has_trait = gregarious + } + modifier = { + add = -20 + has_trait = gluttonous + } + modifier = { + add = -30 + has_trait = hashishiyah + } + } + } + option = { #The two of you have a mellow evening of hashishery. + name = { + text = learning_medicine.2110.b.good_terms + trigger = { scope:hashish_relation = flag:positive } + } + name = { + text = learning_medicine.2110.b.bad_terms + trigger = { scope:hashish_relation = flag:negative } + } + name = { + text = learning_medicine.2110.b.neutral_terms + trigger = { scope:hashish_relation = flag:neutral } + } + flavor = learning_medicine.2110.b.flavour + scope:hashish_vassal_or_liege = { + if = { #Rivalries are overcome! + limit = { has_relation_rival = root } + remove_relation_rival = root + add_opinion = { + modifier = friendliness_opinion + opinion = 20 + target = root + } + } + else_if = { #Potential foeships are nipped in the bud. So to speak. + limit = { has_relation_potential_rival = root } + remove_relation_potential_rival = root + add_opinion = { + modifier = friendliness_opinion + opinion = 20 + target = root + } + } + } + progress_towards_friend_effect = { #Make some friends! + CHARACTER = scope:hashish_vassal_or_liege + OPINION = 30 + REASON = friend_got_high_together + } + add_character_modifier = { + modifier = cosmic_insights_modifier + days = 3650 + } + stress_impact = { + temperate = medium_stress_impact_gain + shy = minor_stress_impact_gain + hashishiyah = major_stress_impact_loss + } + if = { + limit = { + faith = { + OR = { + religion_tag = islam_religion + trait_is_sin = gluttonous + } + } + } + stress_impact = { zealous = minor_stress_impact_gain } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 0.5 + ai_vengefulness = -0.25 + } + modifier = { + add = 30 + has_trait = hashishiyah + } + modifier = { + add = 20 + has_trait = gluttonous + } + modifier = { + add = 10 + has_trait = gregarious + } + modifier = { + add = -20 + has_trait = temperate + } + modifier = { + add = 20 + has_trait = shy + } + } + } + option = { #You and your vassal have it large. + name = { + text = learning_medicine.2110.c.good_terms + trigger = { scope:hashish_relation = flag:positive } + } + name = { + text = learning_medicine.2110.c.bad_terms + trigger = { scope:hashish_relation = flag:negative } + } + name = { + text = learning_medicine.2110.c.neutral_terms + trigger = { scope:hashish_relation = flag:neutral } + } + duel = { + skill = learning + target = scope:hashish_vassal_or_liege + 50 = { #You steer the conversation to favour you. + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = learning_medicine.2110.c.tt_success + send_interface_toast = { + title = learning_medicine.2110.c.tt_success + left_icon = scope:hashish_vassal_or_liege + if = { + limit = { + can_add_hook = { + target = scope:hashish_vassal_or_liege + type = manipulation_hook + } + } + add_hook = { + type = manipulation_hook + target = scope:hashish_vassal_or_liege + } + add_prestige = medium_prestige_gain + } + else = { add_prestige = major_prestige_gain } + scope:hashish_vassal_or_liege = { + add_opinion = { + modifier = friendliness_opinion + opinion = 40 + target = root + } + } + } + } + 50 = { #Your vassal manages to dominate the discussion. + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = learning_medicine.2110.c.tt_fail + send_interface_toast = { + title = learning_medicine.2110.c.tt_fail + left_icon = scope:hashish_vassal_or_liege + scope:hashish_vassal_or_liege = { + if = { + limit = { + can_add_hook = { + target = root + type = manipulation_hook + } + } + add_hook = { + type = manipulation_hook + target = root + } + add_prestige = medium_prestige_gain + } + else = { add_prestige = major_prestige_gain } + add_opinion = { + modifier = friendliness_opinion + opinion = 30 + target = root + } + } + } + } + } + stress_impact = { + temperate = major_stress_impact_gain + shy = medium_stress_impact_gain + hashishiyah = major_stress_impact_loss + } + if = { + limit = { + faith = { + OR = { + religion_tag = islam_religion + trait_is_sin = gluttonous + } + } + } + stress_impact = { zealous = medium_stress_impact_gain } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 0.75 + ai_vengefulness = -0.5 + } + modifier = { + add = 40 + has_trait = hashishiyah + } + modifier = { + add = 30 + has_trait = gluttonous + } + modifier = { + add = 15 + has_trait = gregarious + } + modifier = { + add = -30 + has_trait = shy + } + modifier = { + add = -40 + has_trait = temperate + } + } + } +} + +######################################################################################### +################# SPECIAL EVENTS ######################################################## +######################################################################################### + + + +################################################## +# Study human cadavers +# by Linnéa Thimrén and Flavio Verna +################################################## + +learning_medicine_special.1001 = { + type = character_event + title = learning_medicine_special.1001.t + desc = learning_medicine_special.1001.desc + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = page_flipping + } + + trigger = { + OR = { + has_focus = learning_medicine_focus + has_focus = learning_adventurer_focus + has_realm_law = camp_purpose_scholars + } + NOT = { has_character_flag = had_learning_medicine_special_1001_this_lifetime } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1.5 + has_trait = sadistic + } + modifier = { + add = 1.75 + has_trait = callous + } + } + + immediate = { + add_character_flag = { + flag = is_in_learning_special_event + days = 200 + } + add_character_flag = had_learning_medicine_special_1001_this_lifetime + } + option = { #Proceed. + name = learning_medicine_special.1001.a + custom_tooltip = learning_lifestyle_rank_up_indication + trigger_event = { + id = learning_medicine_special.1002 + days = { 3 7 } + } + ai_chance = { + base = 75 + } + } + + option = { #nah + name = learning_medicine_special.1001.b + add_piety = medium_piety_gain + remove_character_flag = is_in_learning_special_event + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.4 + ai_compassion = 0.4 + } + } + } +} + +#First botched autopsy, need more bodies. +learning_medicine_special.1002 = { + type = character_event + title = learning_medicine_special.1001.t + desc = learning_medicine_special.1002.desc + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:scoped_physician + animation = interested + } + immediate = { + if = { + limit = { + court_physician_available_trigger = yes + } + save_court_physician_as_effect = { SCOPE_NAME = scoped_physician } + } + + if = { + limit = { + exists = capital_county + } + capital_county = { + save_scope_as = scoped_capital + + } + } + } + option = { #Ask Court Physician to provide more bodies. + name = learning_medicine_special.1002.a + trigger = { + exists = scope:scoped_physician + } + duel = { + skill = diplomacy + target = scope:scoped_physician + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -14 + } + opinion_modifier = { #their opinion of you matters + who = scope:scoped_physician + opinion_target = root + multiplier = 0.25 + } + desc = learning_medicine_special.1002.a.good + show_as_tooltip = {add_learning_lifestyle_xp = minor_lifestyle_xp } + trigger_event = { + id = learning_medicine_special.1003 + days = { 7 14 } + } + } + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -14 + } + desc = learning_medicine_special.1002.a.bad + show_as_tooltip = { + scope:scoped_physician = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = -20 + } + } + } + trigger_event = { + id = learning_medicine_special.1004 + days = { 7 14 } + } + } + } + ai_chance = { + base = 50 + opinion_modifier = { #their opinion of you matters + who = scope:scoped_physician + opinion_target = root + multiplier = 0.4 + } + } + } + + option = { #Find bodies through other means... + name = learning_medicine_special.1002.b + trigger_event = { + id = learning_medicine_special.1103 + days = { 3 7 } + } + if = { + limit = { + exists = scope:scoped_capital + scope:scoped_capital.holder = root + } + scope:scoped_capital = { + add_county_modifier = { + modifier = tomb_defiler_modifier + years = 10 + } + } + } + add_learning_lifestyle_xp = minor_lifestyle_xp + stress_impact = { + base = medium_stress_impact_gain + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + } + ai_chance = { + base = 75 + } + } + + option = { #Back out + name = learning_medicine_special.1002.c + add_piety = minor_piety_gain + add_learning_lifestyle_xp = minor_lifestyle_xp + remove_character_flag = is_in_learning_special_event + ai_chance = { + base = 0 + } + } +} + +#Court Physician (or ruler) provides bodies. +learning_medicine_special.1003 = { + type = character_event + title = learning_medicine_special.1001.t + desc = { + desc = learning_medicine_special.1003.desc_physician + desc = learning_medicine_special.1003.desc_ending + } + theme = learning_medicine_focus + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:scoped_physician + animation = sick + } + + trigger = { + scope:scoped_physician = { + is_available_ai_adult = yes + } + } + + on_trigger_fail = { + trigger_event = learning_medicine_special.1004 + } + + immediate = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + + option = { + name = learning_medicine_special.1003.a + duel = { + skill = learning + value = 12 + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + desc = learning_medicine_special.1003.a.good + show_as_tooltip = { add_learning_lifestyle_perk_points = 1 } + trigger_event = { + id = learning_medicine_special.1005 + days = { 7 14 } + } + } + 5 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = learning_medicine_special.1003.a.bad + show_as_tooltip = { + if = { + limit = { + has_trait = ill + } + death = { + death_reason = death_ill + } + } + else = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + if = { + limit = { + NOT = { has_game_rule = epidemic_frequency_disabled } + } + random = { + chance = 10 + scope:scoped_capital ?= { + title_province = { + create_epidemic_outbreak = { + type = dysentery + intensity = minor + } + } + } + } + } + } + trigger_event = { + id = learning_medicine_special.1006 + days = { 7 14 } + } + } + } + } + option = { #Stop working. + name = learning_medicine_special.1003.b + add_learning_lifestyle_xp = medium_lifestyle_xp + remove_character_flag = is_in_learning_special_event + } +} + +#Gained bodies in some other fashion +learning_medicine_special.1103 = { + type = character_event + title = learning_medicine_special.1001.t + desc = { + desc = learning_medicine_special.1003.desc_fallback + desc = learning_medicine_special.1003.desc_ending + } + theme = learning_medicine_focus + left_portrait = { + character = root + animation = worry + } + + immediate = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + + option = { + name = learning_medicine_special.1003.a + duel = { + skill = learning + value = high_skill_rating + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -14 + } + desc = learning_medicine_special.1003.a.good + show_as_tooltip = { add_learning_lifestyle_perk_points = 1 } + trigger_event = { + id = learning_medicine_special.1005 + days = { 7 14 } + } + } + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -14 + } + desc = learning_medicine_special.1003.a.bad + show_as_tooltip = { + if = { + limit = { + has_trait = ill + } + death = { + death_reason = death_ill + } + } + else = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + if = { + limit = { + NOT = { has_game_rule = epidemic_frequency_disabled } + } + random = { + chance = 10 + scope:scoped_capital ?= { + title_province = { + create_epidemic_outbreak = { + type = dysentery + intensity = minor + } + } + } + } + } + } + trigger_event = { + id = learning_medicine_special.1006 + days = { 7 14 } + } + } + } + } + option = { #Stop working. + name = learning_medicine_special.1003.b + add_learning_lifestyle_xp = medium_lifestyle_xp + remove_character_flag = is_in_learning_special_event + } +} + + +#Court Physician disapproves +learning_medicine_special.1004 = { + type = character_event + title = learning_medicine_special.1001.t + desc = { + triggered_desc = { + trigger = { + scope:scoped_physician = { is_available_ai_adult = yes } + } + desc = learning_medicine_special.1004.desc + } + triggered_desc = { + trigger = { + scope:scoped_physician = { is_available_ai_adult = no } + } + desc = learning_medicine_special.1004.unavailable.desc + } + } + theme = learning_medicine_focus + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:scoped_physician + animation = anger + } + + option = { + name = { + trigger = { + scope:scoped_physician = { is_available_ai_adult = yes } + } + text = learning_medicine_special.1004.a + } + name = { + trigger = { + scope:scoped_physician = { is_available_ai_adult = no } + } + text = learning_medicine_special.1004.unavailable.a + } + + if = { + limit = { + scope:scoped_physician = { is_available_ai_adult = yes } + } + scope:scoped_physician = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = -20 + } + } + } + else = { + custom_tooltip = learning_medicine_special.1004.unavailable.tt + } + + remove_character_flag = is_in_learning_special_event + } +} + +#No sickness! +learning_medicine_special.1005 = { + type = character_event + title = learning_medicine_special.1001.t + desc = learning_medicine_special.1005.desc + theme = learning_medicine_focus + left_portrait = { + character = root + animation = eccentric + } + + option = { + name = learning_medicine_special.1005.a + add_learning_lifestyle_perk_points = 1 + remove_character_flag = is_in_learning_special_event + } +} + +#Sickness +learning_medicine_special.1006 = { + type = character_event + title = learning_medicine_special.1001.t + desc = { + desc = learning_medicine_special.1006.desc_opening + first_valid = { + triggered_desc = { + trigger = { + has_trait = ill + } + desc = learning_medicine_special.1006.desc_death + } + desc = learning_medicine_special.1006.desc + } + } + theme = learning_medicine_focus + left_portrait = { + character = root + animation = sick + } + + immediate = { + random = { + chance = 10 + scope:scoped_capital ?= { + title_province = { + create_epidemic_outbreak = { + type = dysentery + intensity = minor + } + } + } + } + } + + option = { + name = learning_medicine_special.1006.a + if = { + limit = { + has_trait = ill + } + death = { + death_reason = death_ill + } + } + else = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + if = { + limit = { is_alive = yes } + remove_character_flag = is_in_learning_special_event + } + } +} + + +################################################## +# #A Most Miraculous Fish +# by Ewan Cowhig Croft +# #2100 +################################################## + +scripted_trigger learning_medicine_special_2100_broad_dreamfish_range = { + is_coastal = yes + OR = { + geographical_region = world_europe_west_britannia + geographical_region = world_europe_west_francia + geographical_region = world_europe_west_iberia + geographical_region = world_europe_south + geographical_region = world_asia_minor + geographical_region = world_middle_east_jerusalem + geographical_region = world_africa_north + geographical_region = world_africa_west + } +} + +# You consume a hallucinogenic fish. +# by Ewan Cowhig Croft +learning_medicine_special.2100 = { + type = character_event + title = learning_medicine_special.2100.t + desc = learning_medicine_special.2100.desc + theme = learning_medicine_focus + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:fish_alchemist + animation = scheme + } + + trigger = { + is_ai = no + is_at_war = no + house ?= { + NOT = { has_variable = had_event_learning_medicine_special_2100 } + } + OR = { + any_directly_owned_province = { learning_medicine_special_2100_broad_dreamfish_range = yes } + domicile ?= { + domicile_location = { + learning_medicine_special_2100_broad_dreamfish_range = yes + } + } + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + house ?= { + set_variable = { + name = had_event_learning_medicine_special_2100 + value = yes + days = 36500 + } + } + random_directly_owned_province = { + limit = { learning_medicine_special_2100_broad_dreamfish_range = yes } + save_scope_as = hallucinogenic_fish_locale + } + if = { + limit = { + NOT = { exists = scope:hallucinogenic_fish_locale } + } + domicile ?= { + domicile_location = { + save_scope_as = hallucinogenic_fish_locale + } + } + } + scope:hallucinogenic_fish_locale.county = { save_scope_as = hallucinogenic_fish_county }#For loc. + create_character = { + age = { 25 70 } + gender_female_chance = 50 + trait = deceitful + random_traits_list = { + count = 1 + education_diplomacy_1 = {} + education_martial_1 = {} + education_stewardship_1 = {} + education_intrigue_1 = {} + education_learning_1 = {} + } + trait = lifestyle_herbalist + random_traits_list = { + count = 1 + ambitious = {} + gregarious = {} + impatient = {} + lustful = {} + wrathful = {} + compassionate = {} + callous = {} + stubborn = {} + vengeful = {} + } + random_traits = no + employer = root + faith = scope:hallucinogenic_fish_locale.faith + culture = scope:hallucinogenic_fish_locale.culture + intrigue = 10 + learning = 10 + dynasty = none + save_scope_as = fish_alchemist + } + scope:fish_alchemist ?= { give_witch_secret_or_trait_effect = yes } + } + + option = { #Eat the hallucinogenic fish. + name = learning_medicine_special.2100.a + random_list = { + 40 = { #You seem some radical angels and such. + desc = learning_medicine_special.2100.a.tt_success + send_interface_toast = { + title = learning_medicine_special.2100.a.tt_success + left_icon = scope:fish_alchemist + add_character_modifier = { + modifier = hallucinogenic_visions_uplifting_modifier + days = 7300 + } + random_secret = { + type = secret_non_believer + remove_secret = yes + } + } + modifier = { + add = 30 + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = witch + any_secret = { type = secret_witch } + } + } + } + 60 = { #The devil tries to rip your heart out through your kneecaps. + desc = learning_medicine_special.2100.a.tt_failure + send_interface_toast = { + title = learning_medicine_special.2100.a.tt_failure + left_icon = scope:fish_alchemist + add_character_modifier = { + modifier = hallucinogenic_visions_terrifying_modifier + days = 7300 + } + random_secret = { + type = secret_non_believer + remove_secret = yes + } + } + modifier = { + add = -30 + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = witch + any_secret = { type = secret_witch } + } + } + } + } + stress_impact = { + craven = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { ai_boldness = 0.5 } + ai_value_modifier = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_shunned } + } + ai_zeal = -0.25 + } + ai_value_modifier = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + ai_zeal = -0.50 + } + modifier = { + add = 20 + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = witch + any_secret = { type = secret_witch } + } + } + modifier = { + add = -20 + has_trait = craven + } + modifier = { + add = -20 + has_trait = temperate + } + } + } + option = { #You MUST teach me this ritual! + name = learning_medicine_special.2100.b + duel = { + skill = learning + target = scope:fish_alchemist + 60 = { #The alchemist teaches you where to catch the right fish and how to prepare them. + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = learning_medicine_special.2100.b.tt_success + send_interface_toast = { + title = learning_medicine_special.2100.b.tt_success + left_icon = scope:fish_alchemist + if = { + limit = { number_of_lifestyle_traits = 0 } + add_trait = lifestyle_herbalist + } + add_learning_skill = 5 + if = { + limit = { + NOT = { + any_secret = { type = secret_witch } + } + } + give_witch_secret_or_trait_effect = yes + } + custom_tooltip = learning_medicine_special.2100.b.tt_success.tt + hidden_effect = { + scope:fish_alchemist = { + add_opinion = { + target = root + modifier = loyal_servant + } + set_relation_potential_friend = root + } + } + } + } + 40 = { #The alchemist is having none of your tomfoolery, and flees the court, causing a scandal. + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = learning_medicine_special.2100.b.tt_fail + send_interface_toast = { + title = learning_medicine_special.2100.b.tt_fail + left_icon = scope:fish_alchemist + add_character_modifier = { + modifier = associates_with_strange_peasants_modifier + days = 3650 + } + if = { + limit = { has_any_nickname = no } + give_nickname = nick_the_fishy + } + custom_tooltip = learning_medicine_special.2100.b.tt_failure.tt + hidden_effect = { + scope:fish_alchemist = { + move_to_pool = yes + add_opinion = { + modifier = spell_thief_attempted_opinion + target = root + } + set_relation_potential_rival = root + } + } + } + } + } + if = { + limit = { + faith = { + OR = { + has_doctrine_parameter = witchcraft_shunned + has_doctrine_parameter = witchcraft_illegal + } + } + } + stress_impact = { zealous = medium_stress_impact_gain } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.25 + ai_greed = 0.25 + } + ai_value_modifier = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_shunned } + } + ai_zeal = -0.50 + } + ai_value_modifier = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + ai_zeal = -0.75 + } + modifier = { + add = 20 + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = witch + any_secret = { type = secret_witch } + } + } + modifier = { + add = -20 + trigger = { + faith = { + OR = { + has_doctrine_parameter = witchcraft_shunned + has_doctrine_parameter = witchcraft_illegal + } + } + } + has_trait = zealous + } + } + } + option = { #Suffer not the witch to live. + name = learning_medicine_special.2100.c + trigger = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + add_piety = major_piety_gain + custom_tooltip = learning_medicine_special.2100.c.tt + hidden_effect = { + scope:fish_alchemist = { + death = { + death_reason = death_burned_witch + killer = root + } + } + } + stress_impact = { compassionate = medium_stress_impact_gain } + ai_chance = { + base = 50 + ai_value_modifier = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + ai_zeal = 0.75 + } + modifier = { + add = -20 + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = witch + any_secret = { type = secret_witch } + } + } + modifier = { + add = -30 + has_trait = compassionate + } + modifier = { + add = 20 + has_trait = callous + } + modifier = { + add = 30 + has_trait = sadistic + } + } + } + option = { #Magic or no, get this commoner out of my good [faith] court. + name = learning_medicine_special.2100.d + if = { + limit = { + faith = { has_doctrine_parameter = witchcraft_shunned } + } + add_prestige = minor_prestige_gain + } + else_if = { + limit = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + add_prestige = medium_prestige_gain + } + add_character_modifier = { + modifier = aloof_from_the_commoners_modifier + days = 3650 + } + custom_tooltip = learning_medicine_special.2100.d.tt + hidden_effect = { + scope:fish_alchemist = { + move_to_pool = yes + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -30 + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.25 + } + } + } +} diff --git a/N3OW/events/lifestyles/scholarship_lifestyle/learning_theology_events.txt b/N3OW/events/lifestyles/scholarship_lifestyle/learning_theology_events.txt new file mode 100644 index 00000000..5df5a5b8 --- /dev/null +++ b/N3OW/events/lifestyles/scholarship_lifestyle/learning_theology_events.txt @@ -0,0 +1,3946 @@ +namespace = learning_theology + +namespace = learning_theology_special + +################################################## + +# Learning Theology Lifestyle events + + # 1301 - Realm Priest Needs Books, by Linnéa Thimrén + # 2020 - Flatter Bishop, by Mathilda Bjarnehed + # 3002 - Age of the World + # 3003 - The Number of Spheres + # 3011 - Worship in the same church (theology friend), by Linnéa Thimrén + # 3021 - Send fan mail to religious head, by Linnéa Thimrén + # 3031 - Deal with province of different faith, by Linnéa Thimrén + # 3051 - Passion Play drama, by James Beaumont + +#Special Learning Theology Lifestyle events + + # 1001 - Finding old text + # 1101 - Traveling Rabbi + +################################################## + +################################################## +# Your realm priest asks for books +# by Linnéa Thimrén +################################################## +learning_theology.1301 = { + type = character_event + title = learning_theology.1301.t + desc = { + desc = learning_theology.1301.desc_opening + first_valid = { + triggered_desc = { + trigger = { + faith = { religion_tag = christianity_religion } + } + desc = learning_theology.1301.desc_regula_pastoralis + } + desc = learning_theology.1301.desc + } + desc = learning_theology.1301.desc_ending + } + theme = learning_theology_focus + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:bishop + animation = beg + } + + trigger = { + NOT = { + has_character_flag = had_event_learning_theology_1301 + } + exists = cp:councillor_court_chaplain + can_add_hook = { + type = favor_hook + target = cp:councillor_court_chaplain + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_1301 + years = 5 + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + } + } + + option = { #Give the book to the scholar + name = learning_theology.1301.a + remove_short_term_gold = medium_gold_value + add_learning_lifestyle_xp = miniscule_lifestyle_xp + add_hook = { + target = scope:bishop + type = favor_hook + } + ai_chance = { + base = 50 + } + } + + option = { #Take the book for yourself + name = learning_theology.1301.b + remove_short_term_gold = medium_gold_value + add_learning_lifestyle_xp = minor_lifestyle_xp + add_learning_skill = 1 + scope:bishop = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + ai_chance = { + base = 50 + } + } + + option = { #nah + name = learning_theology.1301.c + scope:bishop = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -10 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + + +################################################## +# Flatter your court chaplain with some bible verses +# by Mathilda Bjarnehed +################################################## + +learning_theology.2020 = { #by Mathilda Bjarnehed + type = character_event + title = learning_theology.2020.t + desc = learning_theology.2020.desc + + theme = learning_theology_focus + left_portrait = { + character = root + animation = page_flipping + } + right_portrait = { + character = scope:court_chaplain + animation = personality_callous + } + + trigger = { + root.religion = { is_in_family = rf_abrahamic } + any_learning_councillor = { + is_available_ai = yes + } + faith = { #Matches learning_theology_2020_randomize_virtue_options_effect, to make sure you can get at least 1 option + calc_true_if = { + amount >= 2 + trait_is_virtue = brave + trait_is_virtue = just + trait_is_virtue = temperate + trait_is_virtue = chaste + trait_is_virtue = compassionate + trait_is_virtue = honest + trait_is_virtue = forgiving + trait_is_virtue = wrathful + trait_is_virtue = vengeful + trait_is_virtue = content + trait_is_virtue = patient + trait_is_virtue = calm + trait_is_virtue = humble + trait_is_virtue = diligent + trait_is_virtue = generous + } + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + random_learning_councillor = { + save_scope_as = court_chaplain + } + + #Randomize virtue texts (try to get 3) + learning_theology_2020_randomize_virtue_options_effect = yes + learning_theology_2020_randomize_virtue_options_effect = yes + if = { + limit = { learning >= high_skill_rating } + learning_theology_2020_randomize_virtue_options_effect = yes + } + else = { + learning_theology_2020_randomize_bad_virtue_options_effect = yes + } + } + + # brave + option = { + trigger = { has_character_flag = virtue_brave } + name = learning_theology.2020.brave + save_scope_value_as = { name = virtue_choice value = flag:brave } + } + + # just + option = { + trigger = { has_character_flag = virtue_just } + name = learning_theology.2020.just + save_scope_value_as = { name = virtue_choice value = flag:just } + } + + # temperate + option = { + trigger = { has_character_flag = virtue_temperate } + name = learning_theology.2020.temperate + save_scope_value_as = { name = virtue_choice value = flag:temperate } + } + + # chaste + option = { + trigger = { has_character_flag = virtue_chaste } + name = learning_theology.2020.chaste + save_scope_value_as = { name = virtue_choice value = flag:chaste } + } + + # compassionate + option = { + trigger = { has_character_flag = virtue_compassionate } + name = learning_theology.2020.compassionate + save_scope_value_as = { name = virtue_choice value = flag:compassionate } + } + + # honest + option = { + trigger = { has_character_flag = virtue_honest } + name = learning_theology.2020.honest + save_scope_value_as = { name = virtue_choice value = flag:honest } + } + + + # forgiving + option = { + trigger = { has_character_flag = virtue_forgiving } + name = learning_theology.2020.forgiving + save_scope_value_as = { name = virtue_choice value = flag:forgiving } + } + + + # wrathful + option = { + trigger = { has_character_flag = virtue_wrathful } + name = learning_theology.2020.wrathful + save_scope_value_as = { name = virtue_choice value = flag:wrathful } + } + + + # vengeful + option = { + trigger = { has_character_flag = virtue_vengeful } + name = learning_theology.2020.vengeful + save_scope_value_as = { name = virtue_choice value = flag:vengeful } + } + + # content + option = { + trigger = { has_character_flag = virtue_content } + name = learning_theology.2020.content + save_scope_value_as = { name = virtue_choice value = flag:content } + } + + # patient + option = { + trigger = { has_character_flag = virtue_patient } + name = learning_theology.2020.patient + save_scope_value_as = { name = virtue_choice value = flag:patient } + } + + # calm + option = { + trigger = { has_character_flag = virtue_calm } + name = learning_theology.2020.calm + save_scope_value_as = { name = virtue_choice value = flag:calm } + } + + # humble + option = { + trigger = { has_character_flag = virtue_humble } + name = learning_theology.2020.humble + save_scope_value_as = { name = virtue_choice value = flag:humble } + } + + # diligent + option = { + trigger = { has_character_flag = virtue_diligent } + name = learning_theology.2020.diligent + save_scope_value_as = { name = virtue_choice value = flag:diligent } + } + + # generous + option = { + trigger = { has_character_flag = virtue_generous } + name = learning_theology.2020.generous + save_scope_value_as = { name = virtue_choice value = flag:generous } + } + + # greedy + option = { + trigger = { has_character_flag = virtue_greedy } + name = learning_theology.2020.greedy + save_scope_value_as = { name = virtue_choice value = flag:greedy } + } + + # lustful + option = { + trigger = { has_character_flag = virtue_lustful } + name = learning_theology.2020.lustful + save_scope_value_as = { name = virtue_choice value = flag:lustful } + } + + # ambitious + option = { + trigger = { has_character_flag = virtue_ambitious } + name = learning_theology.2020.ambitious + save_scope_value_as = { name = virtue_choice value = flag:ambitious } + } + + # gluttonous + option = { + trigger = { has_character_flag = virtue_gluttonous } + name = learning_theology.2020.gluttonous + save_scope_value_as = { name = virtue_choice value = flag:gluttonous } + } + + + after = { + learning_theology_2020_tooltip_effect = yes + hidden_effect = { + #(These effects must match learning_theology_2020_tooltip_effect) + if = { + limit = { exists = scope:virtue_choice } + + #HIDDEN SUPERBAD OUTCOME + if = { + limit = { + #That's not a virtue! + OR = { + AND = { + faith = { NOT = { trait_is_virtue = brave } } + scope:virtue_choice = flag:brave + } + AND = { + faith = { NOT = { trait_is_virtue = just } } + scope:virtue_choice = flag:just + } + AND = { + faith = { NOT = { trait_is_virtue = temperate } } + scope:virtue_choice = flag:temperate + } + AND = { + faith = { NOT = { trait_is_virtue = chaste } } + scope:virtue_choice = flag:chaste + } + AND = { + faith = { NOT = { trait_is_virtue = compassionate } } + scope:virtue_choice = flag:compassionate + } + AND = { + faith = { NOT = { trait_is_virtue = honest } } + scope:virtue_choice = flag:honest + } + AND = { + faith = { NOT = { trait_is_virtue = forgiving } } + scope:virtue_choice = flag:forgiving + } + AND = { + faith = { NOT = { trait_is_virtue = wrathful } } + scope:virtue_choice = flag:wrathful + } + AND = { + faith = { NOT = { trait_is_virtue = vengeful } } + scope:virtue_choice = flag:vengeful + } + AND = { + faith = { NOT = { trait_is_virtue = content } } + scope:virtue_choice = flag:content + } + AND = { + faith = { NOT = { trait_is_virtue = patient } } + scope:virtue_choice = flag:patient + } + AND = { + faith = { NOT = { trait_is_virtue = calm } } + scope:virtue_choice = flag:calm + } + AND = { + faith = { NOT = { trait_is_virtue = humble } } + scope:virtue_choice = flag:humble + } + AND = { + faith = { NOT = { trait_is_virtue = diligent } } + scope:virtue_choice = flag:diligent + } + AND = { + faith = { NOT = { trait_is_virtue = generous } } + scope:virtue_choice = flag:generous + } + AND = { + faith = { NOT = { trait_is_virtue = greedy } } + scope:virtue_choice = flag:greedy + } + AND = { + faith = { NOT = { trait_is_virtue = lustful } } + scope:virtue_choice = flag:lustful + } + AND = { + faith = { NOT = { trait_is_virtue = ambitious } } + scope:virtue_choice = flag:ambitious + } + AND = { + faith = { NOT = { trait_is_virtue = gluttonous } } + scope:virtue_choice = flag:gluttonous + } + } + } + trigger_event = { + id = learning_theology.2021 + days = 2 + } + } + else_if = { + limit = { + OR = { + #They have the trait + AND = { + scope:court_chaplain = { has_trait = brave } + scope:virtue_choice = flag:brave + } + AND = { + scope:court_chaplain = { has_trait = just } + scope:virtue_choice = flag:just + } + AND = { + scope:court_chaplain = { has_trait = temperate } + scope:virtue_choice = flag:temperate + } + AND = { + scope:court_chaplain = { has_trait = chaste } + scope:virtue_choice = flag:chaste + } + AND = { + scope:court_chaplain = { has_trait = compassionate } + scope:virtue_choice = flag:compassionate + } + AND = { + scope:court_chaplain = { has_trait = honest } + scope:virtue_choice = flag:honest + } + AND = { + scope:court_chaplain = { has_trait = forgiving } + scope:virtue_choice = flag:forgiving + } + AND = { + scope:court_chaplain = { has_trait = wrathful } + scope:virtue_choice = flag:wrathful + } + AND = { + scope:court_chaplain = { has_trait = vengeful } + scope:virtue_choice = flag:vengeful + } + AND = { + scope:court_chaplain = { has_trait = content } + scope:virtue_choice = flag:content + } + AND = { + scope:court_chaplain = { has_trait = patient } + scope:virtue_choice = flag:patient + } + AND = { + scope:court_chaplain = { has_trait = calm } + scope:virtue_choice = flag:calm + } + AND = { + scope:court_chaplain = { has_trait = humble } + scope:virtue_choice = flag:humble + } + AND = { + scope:court_chaplain = { has_trait = diligent } + scope:virtue_choice = flag:diligent + } + AND = { + scope:court_chaplain = { has_trait = generous } + scope:virtue_choice = flag:generous + } + #Matching ai value + AND = { + scope:court_chaplain = { ai_boldness >= medium_positive_ai_value } + OR = { + scope:virtue_choice = flag:brave + scope:virtue_choice = flag:wrathful + } + } + AND = { + scope:court_chaplain = { ai_honor >= medium_positive_ai_value } + OR = { + scope:virtue_choice = flag:just + scope:virtue_choice = flag:honest + } + } + AND = { + scope:court_chaplain = { ai_greed <= medium_negative_ai_value } + OR = { + scope:virtue_choice = flag:temperate + scope:virtue_choice = flag:chaste + scope:virtue_choice = flag:content + scope:virtue_choice = flag:humble + scope:virtue_choice = flag:generous + } + } + AND = { + scope:court_chaplain = { ai_compassion >= medium_positive_ai_value } + OR = { + scope:virtue_choice = flag:compassionate + scope:virtue_choice = flag:generous + } + } + AND = { + scope:court_chaplain = { ai_vengefulness <= medium_negative_ai_value } + scope:virtue_choice = flag:forgiving + } + AND = { + scope:court_chaplain = { ai_vengefulness >= medium_positive_ai_value } + scope:virtue_choice = flag:vengeful + } + AND = { + scope:court_chaplain = { ai_energy <= medium_negative_ai_value } + OR = { + scope:virtue_choice = flag:content + scope:virtue_choice = flag:patient + scope:virtue_choice = flag:humble + } + } + AND = { + scope:court_chaplain = { ai_rationality <= medium_negative_ai_value } + OR = { + scope:virtue_choice = flag:patient + scope:virtue_choice = flag:calm + } + } + AND = { + scope:court_chaplain = { ai_boldness <= medium_negative_ai_value } + scope:virtue_choice = flag:calm + } + AND = { + scope:court_chaplain = { ai_energy >= medium_positive_ai_value } + OR = { + scope:virtue_choice = flag:brave + scope:virtue_choice = flag:diligent + } + } + } + } + send_interface_toast = { + title = learning_theology.2020.success.desc + left_icon = scope:court_chaplain + add_piety = medium_piety_gain + add_learning_lifestyle_xp = minor_lifestyle_xp + reverse_add_opinion = { + target = scope:court_chaplain + modifier = kindness_opinion + opinion = 30 + } + } + } + #BAD OUTCOME + else_if = { + limit = { + #They have the opposite trait + OR = { + AND = { + scope:court_chaplain = { has_trait = craven } + scope:virtue_choice = flag:brave + } + AND = { + scope:court_chaplain = { has_trait = arbitrary } + scope:virtue_choice = flag:just + } + AND = { + scope:court_chaplain = { has_trait = gluttonous } + scope:virtue_choice = flag:temperate + } + AND = { + scope:court_chaplain = { has_trait = lustful } + scope:virtue_choice = flag:chaste + } + AND = { + scope:court_chaplain = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + scope:virtue_choice = flag:compassionate + } + AND = { + scope:court_chaplain = { has_trait = deceitful } + scope:virtue_choice = flag:honest + } + AND = { + scope:court_chaplain = { has_trait = vengeful } + scope:virtue_choice = flag:forgiving + } + AND = { + scope:court_chaplain = { has_trait = calm } + scope:virtue_choice = flag:wrathful + } + AND = { + scope:court_chaplain = { has_trait = forgiving } + scope:virtue_choice = flag:vengeful + } + AND = { + scope:court_chaplain = { has_trait = ambitious } + scope:virtue_choice = flag:content + } + AND = { + scope:court_chaplain = { has_trait = impatient } + scope:virtue_choice = flag:patient + } + AND = { + scope:court_chaplain = { has_trait = wrathful } + scope:virtue_choice = flag:calm + } + AND = { + scope:court_chaplain = { has_trait = arrogant } + scope:virtue_choice = flag:humble + } + AND = { + scope:court_chaplain = { has_trait = lazy } + scope:virtue_choice = flag:diligent + } + AND = { + scope:court_chaplain = { has_trait = greedy } + scope:virtue_choice = flag:generous + } + } + } + send_interface_toast = { + title = learning_theology.2020.failure.desc + left_icon = scope:court_chaplain + reverse_add_opinion = { + target = scope:court_chaplain + modifier = insulted_opinion + opinion = -15 + } + } + } + #NEUTRAL OUTCOME + else = { + send_interface_toast = { + title = learning_theology.2020.neutral.desc + left_icon = scope:court_chaplain + add_piety = medium_piety_gain + } + } + } + } + remove_character_flag = virtue_brave + remove_character_flag = virtue_just + remove_character_flag = virtue_temperate + remove_character_flag = virtue_chaste + remove_character_flag = virtue_compassionate + remove_character_flag = virtue_honest + remove_character_flag = virtue_forgiving + remove_character_flag = virtue_wrathful + remove_character_flag = virtue_vengeful + remove_character_flag = virtue_content + remove_character_flag = virtue_patient + remove_character_flag = virtue_calm + remove_character_flag = virtue_humble + remove_character_flag = virtue_diligent + remove_character_flag = virtue_generous + remove_character_flag = virtue_greedy + remove_character_flag = virtue_lustful + remove_character_flag = virtue_ambitious + remove_character_flag = virtue_gluttonous + } +} + +#What, that's not even a virtue! +learning_theology.2021 = { #by Mathilda Bjarnehed + type = character_event + title = learning_theology.2020.t + desc = learning_theology.2021.desc + + theme = learning_theology_focus + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:court_chaplain + animation = personality_vengeful + } + + + option = { + name = learning_theology.2021.a + + reverse_add_opinion = { + target = scope:court_chaplain + modifier = impious_opinion + opinion = -15 + } + add_piety = minor_piety_loss + } +} + +#Determine the age of the world +# by Petter Vilberg +learning_theology.3002 = { + type = character_event + title = learning_theology.3002.t + desc = learning_theology.3002.desc + + theme = learning_theology_focus + left_portrait = { + character = root + animation = page_flipping + } + right_portrait = { + character = scope:chaplain + animation = disapproval + } + + trigger = { + NOT = { has_character_flag = had_event_learning_theology_3002 } + faith = { + OR = { + religion = religion:hinduism_religion + religion = religion:buddhism_religion + religion = religion:jainism_religion + religion = religion:zoroastrianism_religion + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:islam_religion + } + } + OR = { + exists = cp:councillor_court_chaplain + employs_court_position = camp_priest_camp_officer + } + } + + weight_multiplier = { + base = 1 + downweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3002 + years = 20 + } + cp:councillor_court_chaplain ?= { + save_scope_as = chaplain + } + if = { + limit = { + NOT = { exists = scope:chaplain } + } + random_court_position_holder = { + type = camp_priest_camp_officer + save_scope_as = chaplain + } + } + } + + option = { #People deserve to know the truth! + name = learning_theology.3002.a + add_learning_lifestyle_xp = minor_lifestyle_xp + add_prestige = medium_prestige_gain + add_piety = minor_piety_loss + scope:chaplain = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -15 + } + } + cynical_progression_effect = yes + } + + option = { #The church knows best + name = learning_theology.3002.b + add_learning_lifestyle_xp = miniscule_lifestyle_xp + add_piety = major_piety_gain + add_prestige = minor_prestige_loss + zealous_progression_effect = yes + scope:chaplain = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + + option = { + name = learning_theology.3002.c + add_learning_lifestyle_xp = medium_lifestyle_xp + } +} + +#Determine the number of spheres in the heavens +# by Petter Vilberg +learning_theology.3003 = { + type = character_event + title = learning_theology.3003.t + desc = learning_theology.3003.desc + + theme = learning_theology_focus + left_portrait = { + character = root + animation = survey + } + right_portrait = { + character = scope:chaplain + animation = disapproval + } + + trigger = { + root.religion = { is_in_family = rf_abrahamic } + NOT = { has_character_flag = had_event_learning_theology_3003 } + NOR = { + has_character_modifier = scholarship_astrological_insights_modifier + has_character_modifier = scholarship_down_to_earth_modifier + } + OR = { + exists = cp:councillor_court_chaplain + employs_court_position = camp_priest_camp_officer + } + } + + weight_multiplier = { + base = 1 + downweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3003 + years = 5 + } + cp:councillor_court_chaplain ?= { + save_scope_as = chaplain + } + if = { + limit = { + NOT = { exists = scope:chaplain } + } + random_court_position_holder = { + type = camp_priest_camp_officer + save_scope_as = chaplain + } + } + } + + option = { #Answers about the world lie in the heavens + name = learning_theology.3003.a + add_learning_lifestyle_xp = minor_lifestyle_xp + add_character_modifier = { + modifier = scholarship_astrological_insights_modifier + years = 10 + } + scope:chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + cynical_progression_effect = yes + } + + option = { #Focus on earthly matters + name = learning_theology.3003.b + add_learning_lifestyle_xp = miniscule_lifestyle_xp + add_piety = major_piety_gain + add_character_modifier = { + modifier = scholarship_down_to_earth_modifier + years = 10 + } + scope:chaplain = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 15 + } + } + zealous_progression_effect = yes + } +} + + +################################################## +# Worship in the same church (theology friend) +# by Linnéa Thimrén +################################################## + +scripted_trigger learning_theology_3011_building_trigger = { + faith = root.faith + OR = { #To check that you CAN build the next lvl of the building + AND = { + root.culture = { + has_innovation = innovation_manorialism + } + has_building = temple_01 + } + AND = { + root.culture = { + has_innovation = innovation_windmills + } + has_building = temple_02 + } + AND = { + root.culture = { + has_innovation = innovation_cranes + } + has_building = temple_03 + } + } +} + +learning_theology.3011 = { + type = character_event + title = learning_theology.3011.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_relation_friend = scope:believer + } + desc = learning_theology.3011.desc_friend + } + desc = learning_theology.3011.desc + } + desc = learning_theology.3011.ending + } + + theme = learning_theology_focus + left_portrait = { + character = root + animation = stunned + } + right_portrait = { + character = scope:believer + animation = debating + } + + trigger = { + is_ai = no # Develops the world a tad too fast + NOT = { + has_character_flag = had_event_learning_theology_3011 + } + OR = { + any_realm_province = { + learning_theology_3011_building_trigger = yes + } + domicile ?= { + domicile_location = { + learning_theology_3011_building_trigger = yes + } + } + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3011 + years = 5 + } + + random_realm_province = { + limit = { + learning_theology_3011_building_trigger = yes + } + weight = { #More likely if it's your province + base = 100 + modifier = { + add = 200 + province_owner = root + } + modifier = { + add = 500 + this = root.capital_province + } + } + save_scope_as = temple_county + } + if = { + limit = { + NOT = { exists = scope:temple_county } + } + domicile ?= { + domicile_location = { + save_scope_as = temple_county + } + } + } + + #Find a believer (potential friend) + if = { + limit = { + NOT = { + any_relation = { + type = friend + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_theology_focus } + } + } + } + potential_lifestyle_friend_saving_effect = { FOCUS = learning_theology_focus SCOPE_NAME = believer } + } + else = { + random_relation = { + type = friend + limit = { + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_theology_focus } + } + save_scope_as = believer + } + } + } + + option = { #Convince them to invest in the church + name = { + trigger = { has_relation_friend = scope:believer } + text = learning_theology.3011.a_friend + } + name = { + trigger = { NOT = { has_relation_friend = scope:believer } } + text = learning_theology.3011.a + } + if = { + limit = { + has_relation_friend = scope:believer + } + theology_3011_a_success_effect = yes + } + else = { + duel = { + skill = learning + value = 10 + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + modifier = { + add = { + value = scope:believer.learning + subtract = average_skill_rating + multiply = 2 + min = 10 #Guaranteed help + } + } + desc = learning_theology.3011.a.success + send_interface_toast = { + title = learning_theology.3011.a.success + left_icon = scope:believer + theology_3011_a_success_effect = yes + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + modifier = { + add = { + value = scope:believer.learning + subtract = average_skill_rating + multiply = -2 + max = 0 #They shouldn't make this worse + } + } + desc = learning_theology.3011.a.failure + send_interface_toast = { + title = learning_theology.3011.a.failure + left_icon = scope:believer + theology_3011_a_failure_effect = yes + } + } + } + } + ai_chance = { + base = 50 + } + } + + option = { #nah + name = learning_theology.3011.b + add_gold = minor_gold_value + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 2 + } + } + } + + after = { + scope:believer = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + + +################################################## +# Send fan mail to religious head +# by Linnéa Thimrén +################################################## + +learning_theology.3021 = { + type = character_event + title = learning_theology.3021.t + desc = { + desc = learning_theology.3021.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.desc_friend + } + desc = learning_theology.3021.desc + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + faith = { + religion_tag = christianity_religion + } + } + desc = learning_theology.3021.desc_christian + } + desc = learning_theology.3021.desc_other + } + } + } + + theme = learning_theology_focus + left_portrait = { + character = root + animation = writing + } + right_portrait = { + character = scope:compliment_receiver + animation = personality_zealous + } + lower_right_portrait = scope:believer + + trigger = { + NOT = { + has_character_flag = had_event_learning_theology_3021 + } + exists = faith.religious_head + faith.religious_head = { + this != root + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3021 + years = 5 + } + + #Do I have a friend? + if = { + limit = { + any_relation = { + type = friend + this != faith.religious_head + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_theology_focus } + } + } + random_relation = { + type = friend + limit = { + this != faith.religious_head + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_theology_focus } + } + save_scope_as = believer + } + } + + faith.religious_head = { + save_scope_as = compliment_receiver + } + + if = { + limit = { #Only give a good option if you have a friend! + exists = scope:believer + } + randomize_good_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:compliment_receiver } + } + else = { + #Randomize 3 compliment types + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:compliment_receiver } + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:compliment_receiver } + randomize_good_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:compliment_receiver } + } + } + + #Compassionate + option = { + trigger = { has_character_flag = available_compliment_compassionate } + name = diplomacy_majesty.0004.compassionate + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = compassionate COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #bold + option = { + trigger = { has_character_flag = available_compliment_bold } + name = diplomacy_majesty.0004.bold + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = bold COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #honorable + option = { + trigger = { has_character_flag = available_compliment_honorable } + name = diplomacy_majesty.0004.honorable + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = honorable COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #greed + option = { + trigger = { has_character_flag = available_compliment_greedy } + name = diplomacy_majesty.0004.greed + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = greed COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #rational + option = { + trigger = { has_character_flag = available_compliment_rational } + name = diplomacy_majesty.0004.rational + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = rational COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #zealous + option = { + trigger = { has_character_flag = available_compliment_zealous } + name = diplomacy_majesty.0004.zealous + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = zealous COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #energetic + option = { + trigger = { has_character_flag = available_compliment_energetic } + name = diplomacy_majesty.0004.energetic + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = energetic COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #forgiving + option = { + trigger = { has_character_flag = available_compliment_forgiving } + name = diplomacy_majesty.0004.forgiving + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = forgiving COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #beautiful + option = { + trigger = { has_character_flag = available_compliment_beautiful } + name = diplomacy_majesty.0004.beautiful + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = beautiful COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #strong + option = { + trigger = { has_character_flag = available_compliment_strong } + name = diplomacy_majesty.0004.strong + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = strong COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #extroverted + option = { + trigger = { has_character_flag = available_compliment_extroverted } + name = diplomacy_majesty.0004.extroverted + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = extroverted COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #dominant + option = { + trigger = { has_character_flag = available_compliment_dominant } + name = diplomacy_majesty.0004.dominant + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = dominant COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + option = { #Nah + name = learning_theology.3021.b + add_piety = medium_piety_gain + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.75 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 10 + } + } + } + + after = { + clear_available_compliments_effect = yes + } +} + + +#It was well received! +learning_theology.3022 = { + type = letter_event + opening = { + desc = learning_theology.3022.opening + } + desc = learning_theology.3022.desc + sender = scope:compliment_receiver + + immediate = { + save_scope_as = letter_receiver + if = { + limit = { + scope:compliment_receiver = { is_alive = yes } + } + theology_3021_a_success_effect = yes + } + hidden_effect = { + if = { + limit = { + has_royal_court = yes + NOT = { + has_character_flag = got_scroll_artifact + } + } + scope:compliment_receiver = { + create_artifact_pedestal_religious_head_letter_effect = { OWNER = scope:compliment_receiver } + } + add_character_flag = { + flag = got_scroll_artifact + years = 30 + } + } + } + } + + option = { + name = learning_theology.3022.a + if = { + limit = { + exists = scope:newly_created_artifact + } + scope:newly_created_artifact = { + set_owner = root + } + } + } +} + + +#It fell flat +learning_theology.3023 = { + type = letter_event + opening = { + desc = learning_theology.3023.opening + } + desc = learning_theology.3023.desc + sender = scope:compliment_receiver + + immediate = { + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + } + + option = { + name = learning_theology.3023.a + } +} + +#It was not well received +learning_theology.3024 = { + type = letter_event + opening = { + desc = learning_theology.3024.opening + } + desc = learning_theology.3024.desc + sender = scope:compliment_receiver + + immediate = { + if = { + limit = { + scope:compliment_receiver = { is_alive = yes } + } + theology_3021_a_failure_effect = yes + } + } + + option = { + name = learning_theology.3024.a + } +} + + +################################################## +# Deal with province of different faith +# by Linnéa Thimrén +################################################## +scripted_trigger learning_theology_3031_province_trigger = { + religion != root.religion + faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } +} + +learning_theology.3031 = { + type = character_event + title = learning_theology.3031.t + desc = { + desc = learning_theology.3031.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:bishop + } + desc = learning_theology.3031.desc_bishop + } + desc = learning_theology.3031.desc + } + } + + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:bishop + animation = dismissal + trigger = { exists = scope:bishop } + } + + trigger = { + NOT = { + has_character_flag = had_event_learning_theology_3031 + } + any_sub_realm_county = { + learning_theology_3031_province_trigger = yes + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3031 + years = 5 + } + random_sub_realm_county = { + limit = { + learning_theology_3031_province_trigger = yes + } + save_scope_as = county + } + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + } + } + } + + option = { #Leave them be + name = learning_theology.3031.a + scope:county = { + add_county_modifier = { + modifier = modifier_religious_understanding_modifier + years = 25 + } + } + if = { + limit = { + exists = scope:bishop + } + scope:bishop = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -5 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.75 + } + } + } + + option = { #Force conversion + name = { + text = { + first_valid = { + # Praying is part of faith + triggered_desc = { + trigger = { religion != religion:confucianism_religion } + desc = learning_theology.3031.b + } + # They're Confucian + desc = learning_theology.3031.b_confucian + } + } + } + if = { + limit = { + exists = root.cp:councillor_court_chaplain + root.cp:councillor_court_chaplain = { + is_performing_council_task = task_conversion + } + scope:county = { + is_target_of_council_task = task_conversion + } + } + custom_tooltip = learning_theology.3031.b_tt + } + else = { + custom_tooltip = learning_theology.3031.b_tt2 + } + scope:county = { + set_variable = { + name = learning_encouraged_conversion + years = 30 + } + } + if = { + limit = { + exists = scope:bishop + } + scope:bishop = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.75 + } + } + } +} + + +################################# +# Study Mysticism - Chain +# by Petter Vilberg +################################# +learning_theology.3041 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3041.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_cynical + } + + trigger = { + NOT = { has_trait = lifestyle_mystic } + NOT = { + has_character_flag = had_event_learning_theology_3041 + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3041 + years = 10 + } + } + + option = { # Some practical experience would be useful... + name = learning_theology.3041.a + custom_tooltip = learning_theology.3041.a.tt + trigger_event = { + id = learning_theology.3042 + days = 10 + } + ai_chance = { + base = 50 + } + } + + option = { # Dive deeper into the books + name = learning_theology.3041.b + custom_tooltip = learning_theology.3041.b.tt + trigger_event = { + id = learning_theology.3044 + days = 10 + } + ai_chance = { + base = 50 + } + } +} + +# Practical experiments +learning_theology.3042 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3042.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = delirium + } + + option = { # This is what I have been looking for + name = learning_theology.3042.a + custom_tooltip = learning_theology.3042.a.tt + hidden_effect = { + random_list = { + 80 = { + trigger_event = { + id = learning_theology.3043 + days = 10 + } + } + 20 = { + trigger_event = { + id = learning_theology.3045 + days = 10 + } + } + } + } + ai_chance = { + base = 100 + } + } + + option = { # Worth noting down for the future + name = learning_theology.3042.b + add_learning_lifestyle_xp = medium_lifestyle_xp + ai_chance = { + base = 0 + } + } +} + +# Results +learning_theology.3043 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3043.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_content + } + + option = { # This is what I have been looking for + name = learning_theology.3043.a + add_trait = lifestyle_mystic + stress_impact = { + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + option = { # I feel nothing, but it's very relaxing + name = learning_theology.3043.b + add_stress = major_stress_loss + add_character_modifier = { + modifier = introspective_rest_modifier + years = 5 + } + stress_impact = { + diligent = medium_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 0 + compare_modifier = { + value = stress + } + } + } +} + +# Theoretical study of Mysticism +learning_theology.3044 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3044.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = happiness + } + + option = { # This is what I have been looking for + name = learning_theology.3044.a + add_learning_skill = 1 + add_learning_lifestyle_perk_points = 1 + ai_chance = { + base = 80 + } + } + + option = { # No, I want the trait after all + name = learning_theology.3044.b + custom_tooltip = learning_theology.3041.b.tt + trigger_event = { + id = learning_theology.3042 + days = 10 + } + ai_chance = { + base = 20 + } + } +} + +# Things go a little wrong +learning_theology.3045 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3045.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_cynical + } + + option = { # I have to recapture the feeling! + name = learning_theology.3045.a + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = theology_dangerous_habits_modifier + years = 5 + } + hidden_effect = { + random = { + chance = 30 + trigger_event = { + id = learning_theology.3046 + days = { 365 730 } + } + } + } + } + + option = { # A little prayer to make up for it + name = learning_theology.3045.b + trigger = { + OR = { + has_trait = zealous + has_trait = fickle + has_trait = diligent + } + } + trait = zealous + trait = fickle + trait = diligent + add_piety = medium_piety_gain + stress_impact = { + stubborn = medium_stress_impact_gain + } + } +} + +# Chance to finally figure it out +learning_theology.3046 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3046.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_cynical + } + + trigger = { + NOR = { + has_trait = lifestyle_mystic + has_trait = lunatic + } + is_available = yes + has_character_modifier = theology_dangerous_habits_modifier + } + + option = { # Let's see where it leads + name = learning_theology.3046.a + random_list = { + 70 = { + desc = learning_theology.3046.a.success + compare_modifier = { + value = learning + multiplier = 2 + } + custom_tooltip = learning_theology.3046.a.success.tt + trigger_event = { + id = learning_theology.3043 + days = 5 + } + } + 30 = { + desc = learning_theology.3046.a.failure + custom_tooltip = learning_theology.3046.a.failure.tt + hidden_effect = { + trigger_event = { + id = learning_theology.3047 + days = 5 + } + } + } + } + ai_chance = { + base = 100 + modifier = { + add = 500 + has_trait = stubborn + } + } + } + + option = { # It is time to give up + name = learning_theology.3046.b + add_stress = medium_stress_loss + ai_chance = { + base = 100 + modifier = { + add = 300 + has_trait = fickle + } + } + } + + after = { + remove_character_modifier = theology_dangerous_habits_modifier + } +} + + +# Your quest drives you mad +learning_theology.3047 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3047.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = manic + } + + trigger = { + NOT = { + has_trait = lunatic + } + } + + option = { # This is what I have been looking for + name = learning_theology.3047.a + add_trait = lunatic_1 + } +} + + + +### END Mysticism chain + +################################# +# Passion Play drama - Chain +# by James Beaumont +################################# +# Should I go see the play? +learning_theology.3051 = { + type = character_event + title = learning_theology.3051.t + desc = { + desc = learning_theology.3051.desc.intro + random_valid = { + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = passion_flag + } + } + desc = learning_theology.3051.desc.passion + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = nights_flag + } + } + desc = learning_theology.3051.desc.arabian_nights + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = inferno_flag + } + } + desc = learning_theology.3051.desc.inferno + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = ravenway_flag + } + } + desc = learning_theology.3051.desc.my_immortal + } + } + desc = learning_theology.3051.desc.outro + } + theme = learning_theology_focus + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:passion_playwright + animation = personality_honorable + } + + trigger = { + NOT = { + has_character_flag = had_event_learning_theology_3051 + } + root.religion = { is_in_family = rf_abrahamic } + any_pool_character = { + province = root.capital_province + # Standard sanity check + is_available_ai_adult = yes + # Character doesn't still have any lingering flags from a previous event + NOT = { has_character_flag = has_been_passion_playwright_flag } + # Character is at least your religion + religion = root.religion + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3051 + years = 10 + } + random_pool_character = { + province = capital_province + limit = { + # Standard sanity check + is_available_ai_adult = yes + # Character doesn't still have any lingering flags from a previous event + NOT = { has_character_flag = has_been_passion_playwright_flag } + # Character is at least your religion + religion = root.religion + } + weight = { + base = 1 + modifier = { # Faith is the same as Root + faith = root.faith + add = 20 + } + modifier = { # Characters of this gender generally take part in religious activities + can_be_clergy_due_to_gender_trigger = yes + add = 20 + } + modifier = { # Likes religion + has_trait = zealous + add = 5 + } + modifier = { # Good at writing + has_trait = lifestyle_poet + add = 2 + } + modifier = { + has_trait = journaller + add = 2 + } + } + add_character_flag = { + flag = has_been_passion_playwright_flag + years = 5 + } + save_scope_as = passion_playwright + random_list = { + 99 = { + random_list = { + 10 = { + # For loc + add_character_flag = { + flag = passion_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = nights_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = inferno_flag + years = 5 + } + } + } + } + 1 = { + add_character_flag = { + flag = ravenway_flag + years = 5 + } + random_list = { + 10 = { + # For loc + add_character_flag = { + flag = trait_intellect_good_1_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_intellect_good_2_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_intellect_good_3_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_physique_good_1_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_physique_good_2_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_physique_good_3_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_fecund_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_pure_blooded_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_beauty_good_1_flag + years = 5 + } + } + 10 = { + trigger = { + is_attracted_to_women = yes + } + add_character_flag = { + flag = trait_beauty_good_2_female_flag + years = 5 + } + } + 10 = { + trigger = { + is_attracted_to_men = yes + } + add_character_flag = { + flag = trait_beauty_good_2_male_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_beauty_good_3_flag + years = 5 + } + } + } + } + } + } + } + + option = { # Let's go see it + name = learning_theology.3051.a + custom_tooltip = { + text = learning_lifestyle_experience_gain_indication + if = { + limit = { + scope:passion_playwright = { + has_character_flag = ravenway_flag + } + } + trigger_event = { + id = learning_theology.3053 + days = 10 + } + } + else = { + trigger_event = { + id = learning_theology.3052 + days = 10 + } + } + } + ai_chance = { + base = 50 + } + } + + option = { # Nah, I don't want this one + name = learning_theology.3051.b + stress_impact = { + gregarious = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 0 + } + } +} + +# Normal outcome +learning_theology.3052 = { + type = character_event + title = { + random_valid = { + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = passion_flag + } + } + desc = learning_theology.3051.passion + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = nights_flag + } + } + desc = learning_theology.3051.arabian_nights + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = inferno_flag + } + } + desc = learning_theology.3051.inferno + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = ravenway_flag + } + } + desc = learning_theology.3051.my_immortal + } + } + } + trigger = { + scope:passion_playwright = { + is_alive = yes + } + } + desc = learning_theology.3052.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:passion_playwright + animation = personality_honorable + } + + option = { # Teach me your ways! + name = learning_theology.3052.a + pay_short_term_gold = { + target = scope:passion_playwright + gold = minor_gold_value + } + add_piety = minor_piety_gain + add_learning_lifestyle_xp = minor_lifestyle_xp + stress_impact = { + zealous = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 2 + ai_compassion = 2 + } + } + } + + option = { # Nah, I can write it better + name = learning_theology.3052.b + custom_tooltip = { + text = learning_lifestyle_rank_up_indication + trigger_event = { + id = learning_theology.3054 + days = 10 + } + } + show_as_tooltip = { + duel = { + skill = learning + target = scope:passion_playwright + } + } + stress_impact = { + journaller = minor_stress_impact_loss # You find writing relaxing + arrogant = minor_stress_impact_loss + content = minor_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2 + ai_sociability = 2 + } + } + } +} + +# My Immortal outcome +learning_theology.3053 = { + type = character_event + title = learning_theology.3051.desc.my_immortal + desc = learning_theology.3053.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:passion_playwright + animation = flirtation_left + } + trigger = { + scope:passion_playwright = { + is_alive = yes + } + } + + option = { # Boo! + name = learning_theology.3053.a + add_piety = minor_piety_gain + stress_impact = { + deviant = medium_stress_impact_gain + lustful = medium_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + option = { # I'll do it better + name = learning_theology.3053.b + custom_tooltip = { + text = learning_lifestyle_rank_up_indication + trigger_event = { + id = learning_theology.3054 + days = 10 + } + } + show_as_tooltip = { + duel = { + skill = learning + target = scope:passion_playwright + } + } + stress_impact = { + journaller = minor_stress_impact_loss # You find writing relaxing + arrogant = minor_stress_impact_loss + content = minor_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + option = { # I liked the horny fanfiction + trigger = { + OR = { + has_trait = deviant + has_trait = lustful + } + } + name = learning_theology.3053.c + add_piety = minor_piety_loss + add_courtier = scope:passion_playwright + set_relation_friend = { reason = friend_passion_play target = scope:passion_playwright } + stress_impact = { + deviant = minor_stress_impact_loss + lustful = minor_stress_impact_loss + chaste = minor_stress_impact_gain + } + ai_chance = { # This is for player memes + base = 0 + } + } +} + +scripted_trigger 3054_suitable_actor_trigger = { + NOT = { this = scope:passion_playwright } + is_available_ai_adult = yes +} + +# Deciding on a lead actor +learning_theology.3054 = { + type = character_event + title = learning_theology.3054.t + desc = { + desc = learning_theology.3054.desc.intro + random_valid = { + triggered_desc = { + trigger = { + scope:passion_playwright = { + NOT = { has_character_flag = passion_flag } + } + } + desc = learning_theology.3051.passion + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + NOT = { has_character_flag = nights_flag } + } + } + desc = learning_theology.3051.arabian_nights + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + NOT = { has_character_flag = inferno_flag } + } + } + desc = learning_theology.3051.inferno + } + } + desc = learning_theology.3054.desc.outro + } + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_honorable + } + lower_left_portrait = { + character = scope:family_actor + } + lower_center_portrait = { + character = scope:random_actor + } + lower_right_portrait = { + character = scope:passion_playwright + } + + + immediate = { + hidden_effect = { + duel = { + skill = learning + target = scope:passion_playwright + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + add_character_flag = { + flag = superior_passion_play_flag + years = 5 + } + } + } + # Your writing was not as good as the Playwright + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + add_character_flag = { + flag = inferior_passion_play_flag + years = 5 + } + } + } + } + random_courtier_or_guest = { + limit = { + 3054_suitable_actor_trigger = yes + is_close_family_of = root + } + weight = { + base = 1 + modifier = { # Faith is the same as Root + faith = root.faith + add = 20 + } + modifier = { # Characters of this gender generally take part in religious activities + can_be_clergy_due_to_gender_trigger = yes + add = 20 + } + modifier = { # Likes religion + has_trait = zealous + add = 5 + } + modifier = { # Good at writing + has_trait = gregarious + add = 2 + } + modifier = { + has_trait = ambitious + add = 2 + } + } + save_scope_as = family_actor + } + random_courtier_or_guest = { + limit = { + 3054_suitable_actor_trigger = yes + NOT = { is_close_family_of = root } + } + weight = { + base = 1 + modifier = { # Faith is the same as Root + faith = root.faith + add = 20 + } + modifier = { # Characters of this gender generally take part in religious activities + can_be_clergy_due_to_gender_trigger = yes + add = 20 + } + modifier = { # Likes religion + has_trait = zealous + add = 5 + } + modifier = { # Good at writing + has_trait = gregarious + add = 2 + } + modifier = { + has_trait = ambitious + add = 2 + } + } + save_scope_as = random_actor + } + } + } + + option = { # Myself, of course! + name = learning_theology.3054.a + show_as_tooltip = { + duel = { + skill = diplomacy + target = scope:passion_playwright + } + } + custom_tooltip = { + text = learning_theology.3054.a.tt + save_scope_as = lead_actor + } + + stress_impact = { + shy = medium_stress_impact_gain + humble = medium_stress_impact_gain + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 2 + ai_sociability = 2 + } + modifier = { + add = 20 + # I am a good actor + root.diplomacy >= scope:passion_playwright.diplomacy + } + modifier = { + factor = 0.5 + # I'm a bad actor + root.diplomacy < scope:passion_playwright.diplomacy + } + } + } + + option = { # My close family member + name = learning_theology.3054.b + trigger = { + exists = scope:family_actor + } + show_as_tooltip = { + duel = { + skill = diplomacy + target = scope:passion_playwright + } + } + custom_tooltip = { + text = learning_theology.3054.b.tt + scope:family_actor = { save_scope_as = lead_actor } + } + reverse_add_opinion = { + modifier = flattered_opinion + opinion = 15 + target = scope:family_actor + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + family_first = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + factor = 2 + has_trait = family_first + } + modifier = { + add = 50 + # I am a bad actor + root.diplomacy < scope:passion_playwright.diplomacy + # My family member is a good actor + scope:family_actor.diplomacy >= scope:passion_playwright.diplomacy + } + } + } + + option = { # Random dude + name = learning_theology.3054.c + trigger = { + exists = scope:random_actor + } + show_as_tooltip = { + duel = { + skill = diplomacy + target = scope:passion_playwright + } + } + custom_tooltip = { + text = learning_theology.3054.c.tt + scope:random_actor = { save_scope_as = lead_actor } + } + reverse_add_opinion = { + modifier = flattered_opinion + opinion = 15 + target = scope:random_actor + } + if = { + limit = { + scope:random_actor = { NOT = { is_courtier_of = root } } + } + pay_short_term_gold = { + target = scope:random_actor + gold = minor_gold_value + } + add_courtier = scope:random_actor + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 20 + modifier = { + add = 80 + # I am a bad actor + root.diplomacy < scope:passion_playwright.diplomacy + # My family member is a bad actor + exists = scope:family_actor + scope:family_actor.diplomacy < scope:passion_playwright.diplomacy + # This random courtier is a good actor + scope:random_actor.diplomacy >= scope:passion_playwright.diplomacy + } + } + } + + after = { + trigger_event = { + id = learning_theology.3055 + days = 10 + } + } +} + +# Final outcome +learning_theology.3055 = { + type = character_event + title = learning_theology.3055.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { scope:lead_actor = root } + } + desc = learning_theology.3055.desc.intro.hired_actor + } + desc = learning_theology.3055.desc.intro.solo + } + first_valid = { + #Hired, victory + triggered_desc = { + trigger = { + NOT = { scope:lead_actor = root } + has_character_flag = superior_passion_play_flag + has_character_flag = superior_acting_flag + } + desc = learning_theology.3055.desc.victory.hired_actor + } + #Hired, defeat writing + triggered_desc = { + trigger = { + NOT = { scope:lead_actor = root } + has_character_flag = inferior_passion_play_flag + has_character_flag = superior_acting_flag + } + desc = learning_theology.3055.desc.defeat_writing.hired_actor + } + #Hired, defeat acting + triggered_desc = { + trigger = { + NOT = { scope:lead_actor = root } + has_character_flag = inferior_acting_flag + } + desc = learning_theology.3055.desc.defeat_acting.hired_actor + } + #Solo, win + triggered_desc = { + trigger = { + has_character_flag = superior_passion_play_flag + has_character_flag = superior_acting_flag + } + desc = learning_theology.3055.desc.victory.solo + } + #Solo, defeat writing + triggered_desc = { + trigger = { + has_character_flag = inferior_passion_play_flag + has_character_flag = superior_acting_flag + } + desc = learning_theology.3055.desc.defeat_writing.solo + } + #Solo, defeat acting + triggered_desc = { + trigger = { + has_character_flag = inferior_acting_flag + } + desc = learning_theology.3055.desc.defeat_acting.solo + } + } + first_valid = { + #Victory + triggered_desc = { + trigger = { + has_character_flag = superior_acting_flag + has_character_flag = superior_passion_play_flag + } + desc = learning_theology.3055.desc.victory_outro + } + #Hired, defeat + triggered_desc = { + trigger = { + NOT = { scope:lead_actor = root } + OR = { + has_character_flag = inferior_acting_flag + has_character_flag = inferior_passion_play_flag + } + } + desc = learning_theology.3055.desc.defeat_outro.hired_actor + } + #Defeat + triggered_desc = { + trigger = { + OR = { + has_character_flag = inferior_acting_flag + has_character_flag = inferior_passion_play_flag + } + } + desc = learning_theology.3055.desc.defeat_outro.solo + } + } + } + theme = learning_theology_focus + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_character_flag = superior_acting_flag + has_character_flag = superior_passion_play_flag + } + animation = happiness + } + triggered_animation = { + trigger = { + scope:lead_actor != root + has_character_flag = inferior_acting_flag + } + animation = anger + } + animation = disbelief + } + right_portrait = { + trigger = { + NOT = { scope:lead_actor = root } + } + character = scope:lead_actor + triggered_animation = { + trigger = { + root = { + OR = { + has_character_flag = inferior_acting_flag + has_character_flag = inferior_passion_play_flag + } + } + } + animation = shame + } + animation = storyteller + } + lower_right_portrait = { + character = scope:passion_playwright + } + + immediate = { + hidden_effect = { + scope:lead_actor = { + duel = { + skill = diplomacy + target = scope:passion_playwright + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + add_character_flag = { + flag = superior_acting_flag + years = 5 + } + } + } + # Your writing was not as good as the Playwright + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + add_character_flag = { + flag = inferior_acting_flag + years = 5 + } + } + } + } + } + } + } + + option = { # I made the better play + trigger = { + root = { + has_character_flag = superior_passion_play_flag + has_character_flag = superior_acting_flag + } + } + name = learning_theology.3055.a + add_learning_lifestyle_perk_points = 1 + add_piety = medium_piety_gain + # Give prestige for + if = { + limit = { + scope:lead_actor = root + } + add_prestige = medium_prestige_gain + } + else = { + add_prestige = minor_prestige_gain + } + ai_chance = { + base = 50 + } + } + + option = { # I failed at making a better play + name = learning_theology.3055.b + trigger = { + root = { + OR = { + has_character_flag = inferior_passion_play_flag + has_character_flag = inferior_acting_flag + } + } + } + add_piety = minor_piety_loss + add_stress = medium_stress_impact_gain + ai_chance = { + base = 50 + } + } + + after = { + root = { + if = { + limit = { + has_character_flag = superior_passion_play_flag + } + remove_character_flag = superior_passion_play_flag + } + if = { + limit = { + has_character_flag = superior_acting_flag + } + remove_character_flag = superior_acting_flag + } + if = { + limit = { + has_character_flag = inferior_passion_play_flag + } + remove_character_flag = inferior_passion_play_flag + } + if = { + limit = { + has_character_flag = inferior_acting_flag + } + remove_character_flag = inferior_acting_flag + } + } + } +} + + +################################################################################################################################ +################################################################################################################################ + +################################################## +# Find old text +# by Linnéa Thimrén & Flavio Verna +################################################## + +learning_theology_special.1001 = { + type = character_event + title = learning_theology_special.1001.t + desc = learning_theology_special.1001.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = stressed_teacher + } + right_portrait = { + character = scope:portrait + animation = thinking + trigger = { + exists = scope:portrait + scope:portrait != root + } + } + + trigger = { + is_ai = no + OR = { + has_focus = learning_theology_focus + has_focus = learning_adventurer_focus + has_realm_law = camp_purpose_scholars + } + NOT = { has_character_flag = had_learning_theology_special_1001_this_lifetime } + faith = { + NOR = { + exists = var:variable_changed_doctrine_learning_theology_special_1001 + has_doctrine_parameter = unreformed + } + } + OR = { + exists = cp:councillor_court_chaplain + AND = { + exists = faith.religious_head + root = faith.religious_head + } + AND = { + exists = faith.religious_head + exists = faith.religious_head.liege + faith.religious_head.liege = root + } + } + OR = { + has_trait = scholar + learning >= very_high_skill_rating + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -0.5 + faith = { fervor < medium_fervor_value } + } + modifier = { + add = -0.5 + NOR = { + AND = { + exists = faith.religious_head + root = faith.religious_head + } + AND = { + exists = faith.religious_head + exists = faith.religious_head.liege + faith.religious_head.liege = root + faith.religious_head = { is_ai = yes } + } + } + } + } + + immediate = { + add_character_flag = had_learning_theology_special_1001_this_lifetime + if = { + limit = { + exists = faith.religious_head + root = faith.religious_head + } + faith.religious_head = { + save_scope_as = player_pope + save_scope_as = portrait #For portrait + } + } + else_if = { + limit = { + exists = faith.religious_head + exists = faith.religious_head.liege + faith.religious_head.liege = root + faith.religious_head = { is_ai = yes } + } + faith.religious_head = { + save_scope_as = vassal_pope + save_scope_as = portrait #For portrait + } + save_scope_as = pope_liege + } + else_if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + save_scope_as = portrait #For portrait + } + } + hidden_effect = { #To randomize the doctrine that's changed + random_list = { + 10 = { + trigger = { + NOT = { faith = { has_doctrine = doctrine_adultery_women_accepted } } + } + save_scope_value_as = { + name = female_adultery_doctrine + value = yes + } + } + 10 = { + trigger = { + NOT = { faith = { has_doctrine = doctrine_adultery_men_accepted } } + } + save_scope_value_as = { + name = male_adultery_doctrine + value = yes + } + } + 10 = { + trigger = { + NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } } + } + save_scope_value_as = { + name = homosexuality_doctrine + value = yes + } + } + 10 = { + trigger = { + NOT = { faith = { has_doctrine = doctrine_kinslaying_accepted } } + } + save_scope_value_as = { + name = kinslyaing_doctrine + value = yes + } + } + 10 = { + trigger = { + NOT = { faith = { has_doctrine_parameter = witchcraft_accepted } } + } + save_scope_value_as = { + name = witchcraft_doctrine + value = yes + } + } + 10 = { + trigger = { + NOT = { faith = { has_doctrine = doctrine_consanguinity_unrestricted } } + } + save_scope_value_as = { + name = consanguinity_doctrine + value = yes + } + } + } + } + } + option = { #Player Religious Head decides to incorporate doctrine. + name = learning_theology_special.1001.d + trigger = { + exists = scope:player_pope + faith = { fervor >= medium_fervor_value } + } + duel = { + skill = learning + value = extremely_high_skill_rating + 10 = { + desc = learning_theology_special.1001.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + show_as_tooltip = { + learning_theology_special_1001_doctrine_effect = yes + add_learning_lifestyle_perk_points = 1 + } + trigger_event = learning_theology_special.1002 + } + 20 = { + desc = learning_theology_special.1001.d.failure + send_interface_toast = { + title = learning_theology_special.1001.d.failure.toast + left_icon = root + add_learning_lifestyle_xp = minor_lifestyle_xp + add_piety = major_piety_loss + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + option = { #Player petitions vassal religious head to integrate doctrine. + name = learning_theology_special.1001.e + trigger = { + exists = scope:vassal_pope + faith = { fervor >= medium_fervor_value } + } + duel = { + skill = learning + target = scope:vassal_pope + 1 = { + desc = learning_theology_special.1001.e.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + opinion_modifier = { # Opinion Factor + who = scope:vassal_pope + opinion_target = root + multiplier = 0.25 + } + show_as_tooltip = { + learning_theology_special_1001_doctrine_effect = yes + add_learning_lifestyle_perk_points = 1 + } + trigger_event = learning_theology_special.1002 + } + 50 = { + desc = learning_theology_special.1001.e.failure + send_interface_toast = { + title = learning_theology_special.1001.e.failure.toast + left_icon = scope:vassal_pope + add_learning_lifestyle_xp = minor_lifestyle_xp + add_piety = major_piety_loss + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + + option = { #Share findings with Court Chaplain. + name = learning_theology_special.1001.a + trigger = { + exists = scope:bishop + } + scope:bishop = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + random_list = { + desc = learning_theology_special.1001.a.desc + 100 = { + desc = learning_theology_special.1001.a.success + show_chance = no + modifier = { + add = { + value = scope:bishop.ai_zeal + } + } + send_interface_toast = { + title = learning_theology_special.1001.a.success.toast + add_learning_lifestyle_perk_points = 1 + } + } + 100 = { + desc = learning_theology_special.1001.a.failure + show_chance = no + modifier = { #Make this instant success + scope:bishop.ai_zeal >= low_positive_ai_value + add = -1000 + } + modifier = { + add = { + value = scope:bishop.ai_zeal + multiply = -1 + } + } + send_interface_toast = { + title = learning_theology_special.1001.a.failure.toast + left_icon = scope:bishop + add_learning_lifestyle_xp = miniscule_lifestyle_xp + add_piety = minor_piety_gain + } + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { #Study in private. + name = learning_theology_special.1001.b + add_learning_lifestyle_xp = medium_lifestyle_xp + add_piety = minor_piety_loss + stress_impact = { + zealous = medium_stress_impact_gain + cynical = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + } + } + } + + option = { #Burn. + name = learning_theology_special.1001.c + add_piety = medium_piety_gain + zealous_progression_effect = yes + stress_impact = { + zealous = medium_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1.5 + } + } + } +} + +#Player successfully changed the faith's doctrine. +learning_theology_special.1002 = { + type = character_event + title = learning_theology_special.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:player_pope + } + desc = learning_theology_special.1002.a.desc + } + triggered_desc = { + trigger = { + exists = scope:vassal_pope + } + desc = learning_theology_special.1002.b.desc + } + } + } + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:portrait + animation = disapproval + trigger = { + exists = scope:portrait + scope:portrait != root + } + } + + immediate = { + learning_theology_special_1001_doctrine_effect = yes + add_learning_lifestyle_perk_points = 1 + + } + option = { # + name = learning_theology_special.1002.a + every_player = { + limit = { + NOR = { + this = root + this = scope:vassal_pope + } + faith = root.faith + } + trigger_event = learning_theology_special.1003 + } + } +} + +#Other players notified of the doctrinal change. +learning_theology_special.1003 = { + type = character_event + title = learning_theology_special.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:player_pope + } + desc = learning_theology_special.1003.a.desc + } + triggered_desc = { + trigger = { + exists = scope:vassal_pope + } + desc = learning_theology_special.1003.b.desc + } + } + } + theme = learning_theology_focus + + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:portrait + animation = personality_zealous + trigger = { + exists = scope:portrait + scope:portrait != root + } + } + + immediate = { + show_as_tooltip = { + learning_theology_special_1001_doctrine_effect = yes + } + } + option = { + name = learning_theology_special.1003.a + } +} + +################################################## +# Learned scholar come to your court +# by Linnéa Thimrén +################################################## + +scripted_trigger learning_theology_special_1101_rabbi_trigger = { + faith = faith:rabbinism + OR = { + has_trait = education_learning_2 + has_trait = education_learning_3 + has_trait = education_learning_4 + } + learning >= medium_skill_rating + can_be_clergy_due_to_gender_trigger = yes +} + +learning_theology_special.1101 = { + type = character_event + title = learning_theology_special.1101.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = flag_learning_theology_2020_historical + } + desc = learning_theology_special.1101.desc + } + desc = learning_theology_special.1101.desc.fallback + } + } + + theme = learning_theology_focus + override_background = { + reference = throne_room + } + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:scholar + animation = writing + } + + trigger = { + OR = { + has_focus = learning_theology_focus + has_focus = learning_adventurer_focus + has_realm_law = camp_purpose_scholars + } + NOT = { has_character_flag = had_learning_theology_special_1101_this_lifetime } + is_playable_character = yes + faith = { + OR = { + religion_tag = judaism_religion + religion_tag = christianity_religion + religion_tag = dualism_religion + religion_tag = islam_religion + } + } + } + + immediate = { + add_character_flag = { + flag = is_in_learning_special_event + days = 200 + } + add_character_flag = had_learning_theology_special_1101_this_lifetime + + if = { #If Rashi could have been alive we create him (for players!) + limit = { + game_start_date >= 1040.1.1 + game_start_date <= 1105.1.1 + is_ai = no + NOT = { #Only spawns once. + is_target_in_global_variable_list = { + name = special_character_list + target = flag:flag_theology_1101_shlomo_yitzchaki + } + } + } + create_character = { + location = root.capital_province + template = scholar_character + faith = faith:rabbinism + culture = culture:french + trait = scholar + trait = diligent + name = "Shlomo Yitzchaki" + gender = male + save_scope_as = scholar + } + save_scope_value_as = { + name = rashi + value = yes + } + add_to_global_variable_list = { + name = special_character_list + target = flag:flag_theology_1101_shlomo_yitzchaki + } + add_character_flag = flag_learning_theology_2020_historical + } + else_if = { + limit = { + exists = root.capital_province + any_pool_character = { + province = root.capital_province + learning_theology_special_1101_rabbi_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { learning_theology_special_1101_rabbi_trigger = yes } + save_scope_as = scholar + } + save_scope_value_as = { + name = rashi + value = no + } + } + else = { + create_character = { + location = root.capital_province + template = scholar_character + faith = root.faith + culture = root.culture + gender_female_chance = { + if = { + limit = { faith:rabbinism = { has_doctrine_parameter = clergy_must_be_male } } + value = 0 + } + else_if = { + limit = { faith:rabbinism = { has_doctrine_parameter = clergy_must_be_female } } + value = 100 + } + else = { + value = 50 + } + } + save_scope_as = scholar + after_creation = { + add_character_flag = created + } + } + save_scope_value_as = { + name = rashi + value = no + } + } + } + + option = { # Let's write commentaries! + name = learning_theology_special.1101.a + custom_tooltip = learning_lifestyle_rank_up_indication + trigger_event = { + id = learning_theology_special.1102 + days = { 14 21 } + } + add_visiting_courtier = scope:scholar + if = { + limit = { + root.faith = { + faith_hostility_level = { + target = scope:scholar.faith + value >= faith_hostile_level + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + ai_chance = { + base = 75 + } + } + + option = { #nah + name = learning_theology_special.1101.b + cynical_progression_effect = yes + add_character_modifier = { + modifier = focused_modifier + years = 10 + } + remove_character_flag = is_in_learning_special_event + ai_chance = { + base = 0 + } + } + + option = { #heretic!! + name = learning_theology_special.1101.c + trigger = { + root.faith = { + faith_hostility_level = { + target = scope:scholar.faith + value >= faith_hostile_level + } + } + } + zealous_progression_effect = yes + add_piety = major_piety_gain + scope:scholar = { + add_opinion = { + modifier = disappointed_opinion + opinion = -15 + target = root + } + } + remove_character_flag = is_in_learning_special_event + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.75 + } + } + } + + after = { + remove_character_flag = flag_learning_theology_2020_historical + scope:scholar = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +#Writing commentaries - publish one or do more? +learning_theology_special.1102 = { + type = character_event + title = learning_theology_special.1101.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:scholar + } + desc = learning_theology_special.1102.desc + } + desc = learning_theology_special.1102.desc_dead + } + desc = learning_theology_special.1102.desc_ending + } + + theme = learning_theology_focus + left_portrait = { + character = root + animation = writing + } + right_portrait = { + character = scope:scholar + animation = happy_teacher + } + + option = { #Give credit to scholar + trigger = { + scope:scholar = { is_alive = yes } + } + name = learning_theology_special.1102.c + + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:scholar } + } + set_relation_friend = { reason = friend_bible_commentary target = scope:scholar } + } + + random_list = { + desc = learning_theology_special.1102.c.rl_desc + 100 = { + desc = learning_theology_special.1102.c.success + show_chance = no + modifier = { + add = { + value = scope:scholar.ai_honor + } + } + + send_interface_toast = { + title = learning_theology_special.1102.c.success.toast + left_icon = scope:scholar + add_learning_lifestyle_perk_points = 1 + } + } + 100 = { + desc = learning_theology_special.1102.c.failure + show_chance = no + modifier = { #Make this instant success + scope:scholar.ai_honor >= low_positive_ai_value + add = -1000 + } + modifier = { + add = { + value = scope:scholar.ai_honor + multiply = -1 + } + } + send_interface_toast = { + title = learning_theology_special.1102.c.failure.toast + left_icon = scope:scholar + add_learning_lifestyle_xp = minor_lifestyle_xp + } + } + } + + ai_chance = { + base = 200 + } + } + + option = { #"Publish" and claim prestige + trigger = { + scope:scholar = { is_alive = yes } + } + name = learning_theology_special.1102.b + + set_relation_rival = { + target = scope:scholar + reason = rival_academic_dispute + } + scope:scholar = { select_and_move_to_pool_effect = yes } + + duel = { + skill = intrigue + target = scope:scholar + 60 = { + desc = learning_theology_special.1102.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 4 + } + add_learning_lifestyle_perk_points = 1 + add_prestige = medium_prestige_gain + + } + 40 = { + desc = learning_theology_special.1102.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + add_learning_lifestyle_xp = minor_lifestyle_xp + add_prestige = medium_prestige_loss + } + } + ai_chance = { + base = 25 + modifier = { + factor = 2.5 + OR = { + has_trait = ambitious + has_trait = arrogant + } + } + } + } + + option = { #Cop-out if the scholar has died + name = learning_theology_special.1102.d + trigger = { + scope:scholar = { + is_alive = no + } + } + add_learning_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 200 + } + } + + after = { + remove_character_flag = is_in_learning_special_event + } +} + diff --git a/N3OW/events/lifestyles/warfare_lifestyle/warhorse_events.txt b/N3OW/events/lifestyles/warfare_lifestyle/warhorse_events.txt new file mode 100644 index 00000000..7461ef88 --- /dev/null +++ b/N3OW/events/lifestyles/warfare_lifestyle/warhorse_events.txt @@ -0,0 +1,1578 @@ + +namespace = warhorse + + +########################################### +# Name your warhorse +# by Linnéa Thimrén +# warhorse.0001 - Name your warhorse! Choose category +# warhorse.0002 - Historical name +# warhorse.0003 - Mythological name +# warhorse.0004 - Common name +# +# Other events for your warhorse +# by Linnéa Thimrén +# warhorse.1001 - Buy new gear for your horse +# warhorse.1101 - Stress reduction or prowess +# warhorse.1201 - Your horse is sick! Pay gold or risk its death +# warhorse.1301 - Another horse-enthusiast compliments your horse +# warhorse.1401 - Your horse is cursed +# +# Breed your warhorse +# by Linnéa Thimrén +# 8001 - You trusted steed is getting old, you should consider breeding! (25-30 years) +########################################### + +########################################### +# Name your warhorse +# 0001-0999 +########################################### + +#Name your warhorse +warhorse.0001 = { + type = character_event + title = warhorse.0001.t + desc = warhorse.0001.desc + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + + option = { #Historical name + name = warhorse.0001.a + trigger_event = warhorse.0002 + } + + option = { #Mythological name + name = warhorse.0001.b + trigger_event = warhorse.0003 + } + + option = { #Common name + name = warhorse.0001.c + trigger_event = warhorse.0004 + } + + after = { + if = { + limit = { + scope:story = { exists = var:story_cycle_horse_name } + } + remove_character_flag = is_in_naming_event + } + } +} + +scripted_trigger warhorse_0002_steppe_trigger = { + OR = { + culture = { + has_cultural_pillar = heritage_mongolic + } + culture = { + has_cultural_pillar = heritage_turkic + } + faith.religion = faith:tengri_pagan.religion + } +} + +#Historical name +warhorse.0002 = { + type = character_event + title = warhorse.0001.t + desc = warhorse.0002.desc + theme = martial_chivalry_focus + override_background = { + reference = market + } + left_portrait = { + character = root + animation = jockey_wave + camera = camera_event_horse_left + } + + option = { + name = warhorse.0002.a + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + OR = { + faith = faith:catholic + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe } + } + culture = { + has_cultural_pillar = heritage_frankish + } + culture = { + has_cultural_pillar = heritage_central_germanic + } + } + } + hidden_effect = { + scope:story= { + set_variable = { #King Charlemagne's warhorse in The Song of Roland + name = story_cycle_horse_name + value = flag:tencendur + } + } + } + } + + option = { + name = warhorse.0002.c + trigger = { + OR = { + faith.religion = religion:hellenism_religion + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe_south } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe_west } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_middle_east_jerusalem } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_asia_minor } + } + culture = { + has_cultural_pillar = heritage_latin + } + culture = { + has_cultural_pillar = heritage_byzantine + } + } + } + hidden_effect = { + scope:story= { + set_variable = { #The cursed horse of Gnaeus Seius + name = story_cycle_horse_name + value = flag:seianian + } + } + } + } + + option = { + name = warhorse.0002.d + trigger = { + faith.religion = religion:islam_religion + } + hidden_effect = { + scope:story= { + set_variable = { #The horse of Husayn ibn Ali + name = story_cycle_horse_name + value = flag:zuljanah + } + } + } + } + + option = { + name = warhorse.0002.e + trigger = { + OR = { + culture = { + has_cultural_pillar = heritage_chinese + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { OR = { + geographical_region = world_tibet + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + } + } + hidden_effect = { + scope:story= { + set_variable = { #The warlord Lü Bu's horse + name = story_cycle_horse_name + value = flag:red_hare + } + } + } + } + + option = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + OR = { + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe_west } + } + culture = { + has_cultural_pillar = heritage_frankish + } + culture = { + has_cultural_pillar = heritage_central_germanic + } + culture = { + has_cultural_pillar = heritage_latin + } + culture = { + has_cultural_pillar = heritage_brythonic + } + culture = { + has_cultural_pillar = heritage_iberian + } + culture = { + has_cultural_pillar = heritage_west_germanic + } + } + } + name = warhorse.0002.f + hidden_effect = { + scope:story= { + set_variable = { # The horse of Roland, general under Charlemagne + name = story_cycle_horse_name + value = flag:veillantif + } + } + } + } + + option = { + trigger = { + OR = { + faith.religion = religion:hellenism_religion + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe_south } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe_west } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_middle_east_jerusalem } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_asia_minor } + } + culture = { + has_cultural_pillar = heritage_latin + } + culture = { + has_cultural_pillar = heritage_byzantine + } + } + } + name = warhorse.0002.g + hidden_effect = { + scope:story= { + set_variable = { # The favorite horse of Emperor Caligula + name = story_cycle_horse_name + value = flag:incitatus + } + } + } + } + #Moved to "historical" horses because close enough? And needs more steppe horses + option = { + name = warhorse.0003.aranjagaan + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #Jangar's mount in the Epic of Jangar + name = story_cycle_horse_name + value = flag:aranjagaan + } + } + } + } + option = { + name = warhorse.0003.aranzhale + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #Another of Jangar's horses in the Epic of Jangar + name = story_cycle_horse_name + value = flag:aranzhale + } + } + } + } + option = { + name = warhorse.0003.oyomaa + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #Mengen Shigshirge's mount in the Epic of Jangar + name = story_cycle_horse_name + value = flag:oyomaa + } + } + } + } + option = { + name = warhorse.0003.rakhsh + trigger = { + current_date > 1000 + OR = { + culture = { + has_cultural_pillar = heritage_iranian + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_middle_east_persia } + } + } + } + hidden_effect = { + scope:story= { + set_variable = { #From the Persian national epic Shahnameh + name = story_cycle_horse_name + value = flag:rakhsh + } + } + } + } + + #Moved to end for use as fallback + option = { + trigger = { + warhorse_0002_steppe_trigger = no + } + name = warhorse.0002.b + hidden_effect = { + scope:story= { + set_variable = { #Alexander the Great's horse + name = story_cycle_horse_name + value = flag:bucephalus + } + } + } + } + + option = { + name = warhorse.0002.go_back + trigger_event = warhorse.0001 + } + + after = { + if = { + limit = { + scope:story = { exists = var:story_cycle_horse_name } + } + remove_character_flag = is_in_naming_event + } + } +} + +#Mythological +warhorse.0003 = { + type = character_event + title = warhorse.0001.t + desc = warhorse.0003.desc + theme = martial_chivalry_focus + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = jockey_gallop + camera = camera_event_horse_very_left + } + + option = { + name = warhorse.0003.khiimori + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #The Wind Horse in Mongolic syncretic spirituality + name = story_cycle_horse_name + value = flag:khiimori + } + } + } + } + option = { + name = warhorse.0003.tulpar + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #A winged Turkic horse + name = story_cycle_horse_name + value = flag:tulpar + } + } + } + } + option = { + name = warhorse.0003.rlung_rta + trigger = { + OR = { + faith = faith:lamaism + culture = { + has_cultural_pillar = heritage_tibetan + } + } + } + hidden_effect = { + scope:story= { + set_variable = { #The Wind Horse in Tibetan Buddhism + name = story_cycle_horse_name + value = flag:rlung_rta + } + } + } + } + option = { + name = warhorse.0003.jonon_khar + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #The origin story of the horsehead fiddle, a flying horse + name = story_cycle_horse_name + value = flag:jonon_khar + } + } + } + } + option = { + name = warhorse.0003.llamrei + trigger = { + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe } + } + trigger_else_if = { + limit = { exists = location } + location = { geographical_region = world_europe } + } + trigger_else = { always = yes } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of King Arthur + name = story_cycle_horse_name + value = flag:llamrei + } + } + } + } + + option = { + name = warhorse.0003.sleipnir + trigger = { + faith = { religion_tag = germanic_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of Oden + name = story_cycle_horse_name + value = flag:sleipnir + } + } + } + } + + option = { + name = warhorse.0003.uchchaihshravas + trigger = { + faith = { religion_tag = hinduism_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of Surya (and Bali) + name = story_cycle_horse_name + value = flag:uchchaihshravas + } + } + } + } + + option = { + name = warhorse.0003.dadhi_kra + trigger = { + faith = { religion_tag = hinduism_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Personification of the morning Sun + name = story_cycle_horse_name + value = flag:dadhi_kra + } + } + } + } + + option = { + name = warhorse.0003.devadatta + trigger = { + faith = { religion_tag = hinduism_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of Kalki + name = story_cycle_horse_name + value = flag:devadatta + } + } + } + } + + option = { + name = warhorse.0003.keshi + trigger = { + faith = { religion_tag = hinduism_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of Kalki + name = story_cycle_horse_name + value = flag:keshi + } + } + } + } + + option = { + name = warhorse.0003.kanthaka + trigger = { + faith = { religion_tag = buddhism_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of Siddhartha + name = story_cycle_horse_name + value = flag:kanthaka + } + } + } + } + + option = { + name = warhorse.0003.haizum + trigger = { + faith = { religion_tag = islam_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of the archangel Gabriel (Jibril) + name = story_cycle_horse_name + value = flag:haizum + } + } + } + } + + option = { + name = warhorse.0003.buraq + trigger = { + faith = { religion_tag = islam_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of certain prophets + name = story_cycle_horse_name + value = flag:buraq + } + } + } + } + + option = { + name = warhorse.0003.burko + trigger = { + culture = { has_cultural_pillar = heritage_east_slavic } + } + hidden_effect = { + scope:story= { + set_variable = { #Magical horse in Russian folklore + name = story_cycle_horse_name + value = flag:burko + } + } + } + } + + option = { + trigger = { + warhorse_0002_steppe_trigger = no + } + name = warhorse.0003.balius + hidden_effect = { + scope:story= { + set_variable = { #Horse of Achilles + name = story_cycle_horse_name + value = flag:balius + } + } + } + } + + option = { + trigger = { + warhorse_0002_steppe_trigger = no + } + name = warhorse.0003.xanthos + hidden_effect = { + scope:story= { + set_variable = { #Horse of Achilles + name = story_cycle_horse_name + value = flag:xanthos + } + } + } + } + + option = { + trigger = { + warhorse_0002_steppe_trigger = no + } + name = warhorse.0003.boreas + hidden_effect = { + scope:story= { + set_variable = { #God of the north wind + name = story_cycle_horse_name + value = flag:boreas + } + } + } + } + + option = { + name = warhorse.0002.go_back + trigger_event = warhorse.0001 + } + + after = { + if = { + limit = { + scope:story = { exists = var:story_cycle_horse_name } + } + remove_character_flag = is_in_naming_event + } + } +} + +#Common +warhorse.0004 = { + type = character_event + title = warhorse.0001.t + desc = warhorse.0004.desc + theme = martial_chivalry_focus + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_extreme_closeup_left + } + + option = { + name = warhorse.0004.a + hidden_effect = { + scope:story= { + set_variable = { + name = story_cycle_horse_name + value = flag:charger + } + } + } + } + + option = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + name = warhorse.0004.b + hidden_effect = { + scope:story= { + set_variable = { + name = story_cycle_horse_name + value = flag:abbot + } + } + } + } + + option = { + name = warhorse.0004.c + hidden_effect = { + scope:story= { + set_variable = { + name = story_cycle_horse_name + value = flag:prancer + } + } + } + } + option = { + name = warhorse.0004.courser + hidden_effect = { + scope:story= { + set_variable = { + name = story_cycle_horse_name + value = flag:courser + } + } + } + } + + option = { + name = warhorse.0004.d + trigger = { + has_trait = lunatic + } + hidden_effect = { + scope:story= { + set_variable = { + name = story_cycle_horse_name + value = flag:glitterhoof + } + } + } + } + + option = { + name = warhorse.0002.go_back + trigger_event = warhorse.0001 + } + + after = { + if = { + limit = { + scope:story = { exists = var:story_cycle_horse_name } + } + remove_character_flag = is_in_naming_event + } + } +} + + +########################################### +# Other events for your warhorse +# 1001-1999 +########################################### + +#Pay gold to get a better modifier +#Buy new gear for your horse +warhorse.1001 = { + type = character_event + title = warhorse.1001.t + desc = warhorse.1001.desc + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + + trigger = { + NOT = { + has_character_flag = had_warhorse_1001_event + root.var:warhorse_modifier_level >= 2 #Update if we add more levels later + } + minor_gold_value_trigger = yes + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + } + + immediate = { + add_character_flag = { + flag = had_warhorse_1001_event + days = 1825 + } + if = { + limit = { + has_royal_court = yes + employs_court_position = master_of_horse_court_position + any_court_position_holder = { + type = master_of_horse_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = master_of_horse_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = m_horse + } + } + } + + option = { #Strength + name = warhorse.1001.a + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:strength + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + ai_chance = { + base = 50 + } + } + + option = { #Agility + name = warhorse.1001.b + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:agility + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + ai_chance = { + base = 50 + } + } + + option = { #Endurance + name = warhorse.1001.c + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:endurance + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + ai_chance = { + base = 50 + } + } + + option = { #Fierceness + name = warhorse.1001.d + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:fierceness + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + ai_chance = { + base = 50 + } + } + + option = { #Master of Horse + name = warhorse.1001.f + trigger = { + exists = scope:m_horse + } + custom_tooltip = warhorse.1001.f.tt + scope:m_horse = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + hidden_effect = { + random_list = { + 50 = { # nothing happens + modifier = { + scope:m_horse.aptitude:master_of_horse_court_position = 4 + factor = 0.1 + } + modifier = { + scope:m_horse.aptitude:master_of_horse_court_position = 3 + factor = 0.2 + } + modifier = { + scope:m_horse.aptitude:master_of_horse_court_position = 2 + factor = 0.3 + } + modifier = { + scope:m_horse.aptitude:master_of_horse_court_position = 1 + factor = 0.5 + } + send_interface_toast = { + title = warhorse.1001.f.failure + left_icon = scope:m_horse + custom_tooltip = warhorse.1001.f.failure.tt + } + } + 5 = { #Your master of the horse makes your horse better + save_scope_value_as = { + name = horse_skill_to_level + value = flag:strength + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + } + 5 = { #Your master of the horse makes your horse better + save_scope_value_as = { + name = horse_skill_to_level + value = flag:agility + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + } + 5 = { #Your master of the horse makes your horse better + save_scope_value_as = { + name = horse_skill_to_level + value = flag:endurance + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + } + 5 = { #Your master of the horse makes your horse better + save_scope_value_as = { + name = horse_skill_to_level + value = flag:fierceness + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + } + } + } + ai_chance = { + base = 70 + } + } + + option = { #Nah + name = warhorse.1001.e + custom_tooltip = warhorse.1001.e.tt + ai_chance = { + base = 0 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } +} + +#My horse is cooler now! +warhorse.1002 = { + type = character_event + title = warhorse.1001.t + desc = warhorse.1002.desc + theme = martial_chivalry_focus + override_background = { + reference = terrain + } + left_portrait = { + character = root + animation = jockey_victory + camera = camera_event_horse_left + } + + immediate = { + level_horse_modifier_effect = yes + } + + option = { + name = warhorse.1002.a + } +} + +#Stress reduction or prowess +warhorse.1101 = { + type = character_event + title = warhorse.1101.t + desc = warhorse.1101.desc + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + + trigger = { + NOT = { has_character_flag = had_warhorse_1101_event } + stress > medium_stress_gain + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + stress > 75 + } + } + + immediate = { + add_character_flag = { + flag = had_warhorse_1101_event + days = 1825 + } + } + + option = { #Practice cool battle stuff + name = warhorse.1101.a + add_character_modifier = { + modifier = horse_practice_modifier + years = 5 + } + stress_impact = { + base = minor_stress_gain + diligent = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + option = { #Ride leisurely + name = warhorse.1101.b + stress_impact = { + base = medium_stress_loss + lazy = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + + +#Your horse is sick! Pay gold or risk its death (end of story) +warhorse.1201 = { + type = character_event + title = warhorse.1201.t + desc = warhorse.1201.desc + theme = martial_chivalry_focus + override_background = { + reference = alley_night + } + left_portrait = { + character = root + animation = horse_exhausted + camera = camera_event_horse_very_left + } + override_effect_2d = { + reference = rain + } + + trigger = { + NOT = { has_character_flag = had_warhorse_1201_event } + } + + immediate = { + add_character_flag = { + flag = had_warhorse_1201_event + days = 1825 + } + } + + option = { #I'll pay whatever! + name = warhorse.1201.a + remove_short_term_gold = minor_gold_value + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.75 + } + } + } + + option = { #no + name = warhorse.1201.b + random_list = { + 50 = { + desc = warhorse.1201.b_good + show_chance = no + custom_tooltip = warhorse.1201.b.tt + send_interface_toast = { + title = warhorse.1201.b_good + } + } + 50 = { + desc = warhorse.1201.b_bad + show_chance = no + send_interface_toast = { + title = warhorse.1201.b_bad + show_as_tooltip = { remove_horse_story_modifiers_effect = yes } + } + scope:story = { + hidden_effect = { end_story = yes } + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.25 + ai_greed = 0.25 + } + } + } +} + + +#Another horse-enthusiast compliments your horse +warhorse.1301 = { + type = character_event + title = warhorse.1301.t + desc = warhorse.1301.desc + theme = martial_chivalry_focus + override_background = { + reference = garden + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + right_portrait = { + character = scope:horse_vassal + animation = admiration + camera = camera_event_very_right + } + + trigger = { + NOT = { has_character_flag = had_warhorse_1301_event } + any_vassal = { + is_available_healthy_ai_adult = yes + OR = { + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + has_lifestyle = martial_lifestyle + has_court_position = master_of_horse_court_position + } + } + } + + immediate = { + add_character_flag = { + flag = had_warhorse_1301_event + days = 1825 + } + random_vassal = { + limit = { + is_available_healthy_ai_adult = yes + is_powerful_vassal = yes + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + } + alternative_limit = { + is_available_healthy_ai_adult = yes + has_court_position = master_of_horse_court_position + } + alternative_limit = { + is_available_healthy_ai_adult = yes + is_powerful_vassal = yes + has_lifestyle = martial_lifestyle + } + alternative_limit = { + is_available_healthy_ai_adult = yes + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + } + alternative_limit = { + is_available_healthy_ai_adult = yes + has_lifestyle = martial_lifestyle + } + save_scope_as = horse_vassal + } + } + + option = { #Let them ride + name = warhorse.1301.a + reverse_add_opinion = { + target = scope:horse_vassal + modifier = friendliness_opinion + opinion = 20 + } + if = { + limit = { #They can't handle the horse + has_character_modifier = horse_fierceness_modifier + scope:horse_vassal = { + prowess < medium_skill_rating + } + } + random = { + chance = 50 + scope:horse_vassal = { + increase_wounds_effect = { REASON = horse_riding_accident } + } + } + custom_tooltip = warhorse.1301.a.tt + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + + } + } + + option = { #Don't let them ride + name = warhorse.1301.b + add_prestige = medium_prestige_gain + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_greed = 0.25 + } + + } + } +} + + +################ +#Your horse is cursed +################ + +#They give you the chills +warhorse.1401 = { + type = character_event + title = warhorse.1401.t + desc = warhorse.1401.desc + theme = martial_chivalry_focus + override_background = { + reference = bp1_bonfire + } + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_extreme_closeup_left + } + + trigger = { + NOT = { has_character_flag = had_warhorse_1401_event } + scope:story = { + exists = var:story_cycle_horse_name + var:story_cycle_horse_name = flag:seianian + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_warhorse_1401_event + days = 1825 + } + } + + option = { + name = warhorse.1401.a + custom_tooltip = warhorse.1401.a.tt + trigger_event = { + id = warhorse.1402 + days = { 30 60 } + } + } + + option = { + name = warhorse.1401.b + show_as_tooltip = { + remove_horse_story_modifiers_effect = yes + } + scope:story = { + hidden_effect = { end_story = yes } + } + stress_impact = { + base = minor_stress_loss + } + } +} + +#The horse has injured you +warhorse.1402 = { + type = character_event + title = warhorse.1401.t + desc = warhorse.1402.desc + theme = martial_chivalry_focus + override_background = { + reference = army_camp + } + left_portrait = { + character = root + animation = horse_exhausted + camera = camera_event_horse_left_forward + } + + immediate = { + add_character_modifier = { + modifier = cursed_horse_modifier + years = 5 + } + } + + option = { + name = warhorse.1402.a + random = { + chance = 25 + show_as_tooltip = { + death = { + death_reason = death_horse_riding_accident + } + } + trigger_event = { + id = warhorse.1499 + days = { 30 60 } + } + } + } + + option = { + name = warhorse.1402.b + show_as_tooltip = { + remove_horse_story_modifiers_effect = yes + } + scope:story = { + hidden_effect = { end_story = yes } + } + } +} + +#The horse kills you... +warhorse.1499 = { + type = character_event + title = warhorse.1401.t + desc = warhorse.1499.desc + theme = martial_chivalry_focus + override_effect_2d = { + reference = rain + trigger = { + location = { + has_winter_trigger = no + graphical_wilderness_desert_trigger = no + } + } + } + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = throne_room_kneel_1 + } + + option = { + name = warhorse.1499.a + death = { + death_reason = death_horse_riding_accident + } + } +} + + +########################################### +# Breed your warhorse +# 8001-8999 +########################################### + +#You trusted steed is getting old, you should consider breeding! (25-30 years) +warhorse.8001 = { + type = character_event + title = warhorse.8001.t + desc = warhorse.8001.desc + theme = martial_chivalry_focus + override_background = { + reference = garden + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + + immediate = { + + } + + option = { #Strength + name = warhorse.8001.a + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:strength + } + trigger_event = { #A new horse is born! + id = warhorse.8002 + days = { 30 60 } + } + ai_chance = { + base = 10 + } + } + + option = { #Agility + name = warhorse.8001.b + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:agility + } + trigger_event = { #A new horse is born! + id = warhorse.8002 + days = { 30 60 } + } + ai_chance = { + base = 10 + } + } + + option = { #Endurance + name = warhorse.8001.c + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:endurance + } + trigger_event = { #A new horse is born! + id = warhorse.8002 + days = { 30 60 } + } + ai_chance = { + base = 10 + } + } + + option = { #Fierceness + name = warhorse.8001.d + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:fierceness + } + trigger_event = { #A new horse is born! + id = warhorse.8002 + days = { 30 60 } + } + ai_chance = { + base = 10 + } + } + + option = { #Nah + name = warhorse.8001.e + trigger_event = { #Horse dies + id = warhorse.8003 + days = { 30 60 } + } + ai_chance = { + base = 0 + } + } +} + +#A new horse is born! +warhorse.8002 = { + type = character_event + title = warhorse.8002.t + desc = warhorse.8002.desc + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = personality_compassionate + } + + immediate = { + level_horse_modifier_effect = yes + } + + option = { + name = warhorse.8002.a + } + + after = { + scope:story = { #To start over with the new horse + remove_variable = story_cycle_horse_name + remove_variable = horse_gender + assign_horse_gender_effect = { GENDER = random } + } + } +} + +#Horse dies +warhorse.8003 = { + type = character_event + title = warhorse.8001.t + desc = warhorse.8003.desc + theme = martial_chivalry_focus + override_background = { + reference = garden + } + left_portrait = { + character = root + animation = sadness + } + + immediate = { + + } + + option = { + name = warhorse.8003.a + show_as_tooltip = { + remove_horse_story_modifiers_effect = yes + } + scope:story = { + hidden_effect = { end_story = yes } + } + } +} diff --git a/N3OW/events/religion_events/great_holy_war_events.txt b/N3OW/events/religion_events/great_holy_war_events.txt new file mode 100644 index 00000000..bc02708c --- /dev/null +++ b/N3OW/events/religion_events/great_holy_war_events.txt @@ -0,0 +1,4662 @@ +namespace = great_holy_war + +### Great Holy Wars Events +# by Flavio Verna +# updated by Ewan Cowhig Croft +# 0001 - A Great Holy War is declared. +# 0003 - Players informed of the start of the preparation phase of a GHW. +# 0004 - Sponsor selects a new target Kingdom. +# 0010 - A Faith unlocks GHWs for its Religion. +# 0015 - Excommunication is lifted for joining a GHW. +# 0016 - Sponsor admonishes ruler for unpledging from a GHW. +# 0017 - Confirm unpledging. +# 0018 - Confirm pledging. +# 0020 - AI rulers pledge to Undirected GHW. +# 0092 - AI rulers pledge to Directed GHW. +# 0090 - Holy Orders pledging to GHW. +# 0021 - AI rulers counterpledge to Undirected GHW. +# 0093 - AI rulers counterpledge to Directed GHW. +# 0091 - Holy Orders counterpledging to GHW. +# 0022, 0023 - The Pope calls out unpledged player. +# 0024 - Dead Recipient is replaced. +# 0025 - Converted Recipient is replaced. +# 0026, 0027 - A Beneficiary is selected for pledged AI rulers. +# 0028 - Resetting a Beneficiary upon death. +# 0029 - Resetting a Beneficiary upon conversion. +# 0030 - Resetting a Beneficiary due to illness, excommunication, inheritance or celibacy vow. +# 0040 - Player donates money to the GHW War Chest. +# 0050 - GHW preparation phase starts (defender). +# 0051 - GHW was declared. +# 0052 - GHW was won. +# 0053 - GHW was lost. +# 0055 - GHW failed to start. +# 0060 - Crusader trait gained. +# 0058 - Crusader trait lost. +# 0061 - Beneficiaries rewarded upon GHW victory. +# 0080 - GHW sponsor is replaced upon death. +# 0081, 0082 - Player redirected GHW during preparation phase. + +# The Sponsor declares a Great Holy War +great_holy_war.0001 = { + hidden = yes + scope = faith + + trigger = { + has_doctrine = doctrine_spiritual_head + save_temporary_scope_as = the_faith + exists = religious_head + NOR = { + exists = great_holy_war + exists = var:variable_ghw_cooldown + religion = { exists = var:variable_first_ghw_cooldown } # Do not event spam after Crusades have been just unlocked. + } + religious_head = { is_imprisoned = no } + religion = { exists = var:variable_ghw_unlocked } #Activated by event for every religion. + suitable_faith_for_undirected_ghw_trigger = yes #Right combinations of Doctrines to have GHWs. And a valid target exists + } + + immediate = { + save_scope_as = the_faith + + #Determine Sponsor. + religious_head = { save_scope_as = ghw_sponsor } + determine_ghw_target_effect = { FAITH = scope:the_faith } + + # Launch the preparation phase + start_great_holy_war = { + target_character = scope:target_character + target_title = scope:target_kingdom + delay = { 365 545 } + } + scope:target_character.faith = { save_scope_as = target_faith } #Used for counterpledges. + + great_holy_war = { + set_war_declarer = scope:ghw_sponsor + if = { + limit = { is_directed_ghw = no } + undirected_ghw_recipient_selection_effect = yes + } + } + if = { + limit = { scope:ghw_sponsor.gold > 0 } + great_holy_war = { + change_war_chest_gold = { + value = scope:ghw_sponsor.gold + divide = 2 + max = 5000 + } + } + scope:ghw_sponsor = { + remove_short_term_gold = { + value = gold + divide = 2 + max = 5000 + } + } + } + great_holy_war = { + pledge_attacker = scope:ghw_sponsor + set_variable = { + name = redirect_cost + value = 500 + } + } + #If no Claimant or Title Holder is available to be the Papal choice and the Crusade has not proceeded far enough to have a favorite beneficiary, select a fallback Recipient so that the CB's tooltip does not appear incomplete. + if = { #Random Courtier in the Pope's court. + limit = { + NOT = { exists = scope:the_faith.great_holy_war.ghw_title_recipient } + exists = scope:ghw_sponsor + exists = scope:the_faith.great_holy_war + scope:ghw_sponsor = { + any_courtier = { + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + } + } + scope:ghw_sponsor = { + random_courtier = { + alternative_limit = { + scope:the_faith = { has_doctrine = doctrine_gender_male_dominated } + is_male = yes + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + alternative_limit = { + scope:the_faith = { has_doctrine = doctrine_gender_female_dominated } + is_female = yes + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + limit = { + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + save_scope_as = fallback_recipient + add_character_flag = flag_is_ghw_fallback_recipient + } + } + } + else_if = { #Else Generate a fallback recipient. + limit = { + NOT = { exists = scope:the_faith.great_holy_war.ghw_title_recipient } + } + create_character = { + location = scope:ghw_sponsor.capital_province + template = new_commander_character + faith = scope:the_faith + culture = scope:ghw_sponsor.culture + save_scope_as = fallback_recipient + gender_female_chance = { + if = { + limit = { + scope:the_faith = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + scope:the_faith = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { + add = 50 + } + } + } + scope:fallback_recipient = { add_character_flag = flag_is_ghw_fallback_recipient } + } + great_holy_war = { + set_variable = { + name = var_fallback_recipient + value = scope:fallback_recipient + } + } + + every_player = { #Inform players + limit = { + faith = scope:the_faith + highest_held_title_tier >= tier_county + this != scope:ghw_sponsor + } + trigger_event = great_holy_war.0003 #Send event immediately for player, then delay it for all the AIs. + } + every_player = { #Inform defending players + limit = { + OR = { + faith = scope:target_faith #All infidels. + any_liege_or_above = { + scope:the_faith.great_holy_war = { has_pledged_defender = prev } + } + AND = { + faith != scope:the_faith + scope:the_faith.great_holy_war = { has_pledged_defender = prev } + } + } + } + trigger_event = great_holy_war.0050 + } + + #Attackers Pledge to the Crusade. (AI only) + every_faith_ruler = { + limit = { + is_ai = yes + is_landed = yes + highest_held_title_tier >= tier_county + NOR = { + this = scope:ghw_sponsor + root.great_holy_war = { has_pledged_attacker = prev } + target_is_liege_or_above = scope:target_character + } + } + trigger_event = { + #AI pledging. There is a chance the AI might pledge after the Crusade starts, but it's a lot less likely. + id = great_holy_war.0020 + days = { 50 450 } + } + } + every_faith_holy_order = { + trigger_event = { + #Holy orders always join + id = great_holy_war.0090 + days = { 30 60 } + } + } + + #Defenders Pledge to the Crusade. (AI only) + scope:target_character = { + religion = { + every_faith = { + every_faith_ruler = { + limit = { + is_ai = yes + is_landed = yes + highest_held_title_tier >= tier_county + NOT = { + root.great_holy_war = { has_pledged_defender = prev } + } + } + trigger_event = { + #AI counterpledging. Unlike attackers, defenders should be selected much faster during the preparation phase and then stop. + id = great_holy_war.0021 + days = { 25 150 } + } + } + } + } + faith = { + every_faith_holy_order = { + trigger_event = { + # Holy orders always join + id = great_holy_war.0091 + days = { 30 60 } + } + } + } + } + #EP3 Redirected Crusade setup event + great_holy_war = { + if = { + limit = { + has_ep3_dlc_trigger = yes + scope:the_faith = { this = faith:catholic } + ep3_frankokratia_ghw_trigger = yes + ep3_frankokratia_financier_exists_trigger = yes + } + #start with player + if = { + limit = { + any_player = { + ep3_frankokratia_story_owner_trigger = yes + } + } + random_player = { + limit = { + ep3_frankokratia_story_owner_trigger = yes + } + trigger_event = { + id = ep3_frankokratia_events.0001 + days = 20 + } + } + } + #Next, ai with a closely related claimant who will accept + else_if = { + limit = { + scope:the_faith = { + any_faith_playable_ruler = { + ep3_frankokratia_story_owner_trigger = yes + ep3_frankokratia_will_start_trigger = yes + save_temporary_scope_as = char_temp + + #Thorough check for close relation claimants + OR = { + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + } + #In laws of family in court/realm + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_transiting_relative_trigger = yes + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + } + #Spouse claimant + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + #Spouse's close family in realm/court + any_spouse = { + ep3_frankokratia_transiting_relative_trigger = yes + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_claimant_trigger = yes + } + } + #friends + any_relation = { + type = friend + ep3_frankokratia_claimant_trigger = yes + } + #soulmates + any_relation = { + type = soulmate + ep3_frankokratia_claimant_trigger = yes + } + } + } + } + } + scope:the_faith = { + ordered_faith_playable_ruler = { + order_by = { + value = 0 + add = current_military_strength + } + limit = { + ep3_frankokratia_story_owner_trigger = yes + ep3_frankokratia_will_start_trigger = yes + save_temporary_scope_as = char_temp + + #Thorough check for close relation claimants + OR = { + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + } + #In laws of family in court/realm + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_transiting_relative_trigger = yes + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + } + #Spouse claimant + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + #Spouse's close family in realm/court + any_spouse = { + ep3_frankokratia_transiting_relative_trigger = yes + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_claimant_trigger = yes + } + } + #friends + any_relation = { + type = friend + ep3_frankokratia_claimant_trigger = yes + } + #soulmates + any_relation = { + type = soulmate + ep3_frankokratia_claimant_trigger = yes + } + } + } + trigger_event = { + id = ep3_frankokratia_events.0001 + days = 20 + } + } + } + } + #Someone with looser relation to claimant who will accept + else_if = { + limit = { + scope:the_faith = { + any_faith_playable_ruler = { + ep3_frankokratia_story_owner_trigger = yes + ep3_frankokratia_will_start_trigger = yes + } + } + } + scope:the_faith = { + ordered_faith_playable_ruler = { + order_by = { + value = 0 + add = current_military_strength + } + limit = { + ep3_frankokratia_story_owner_trigger = yes + ep3_frankokratia_will_start_trigger = yes + } + trigger_event = { + id = ep3_frankokratia_events.0001 + days = 20 + } + } + } + } + #Next, ai with a closely related claimant who might not accept + else_if = { + limit = { + scope:the_faith = { + any_faith_playable_ruler = { + ep3_frankokratia_story_owner_trigger = yes + save_temporary_scope_as = char_temp + + #Thorough check for close relation claimants + OR = { + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + } + #In laws of family in court/realm + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_transiting_relative_trigger = yes + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + } + #Spouse claimant + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + #Spouse's close family in realm/court + any_spouse = { + ep3_frankokratia_transiting_relative_trigger = yes + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_claimant_trigger = yes + } + } + #friends + any_relation = { + type = friend + ep3_frankokratia_claimant_trigger = yes + } + #soulmates + any_relation = { + type = soulmate + ep3_frankokratia_claimant_trigger = yes + } + } + } + } + } + scope:the_faith = { + ordered_faith_playable_ruler = { + order_by = { + value = 0 + add = current_military_strength + } + limit = { + ep3_frankokratia_story_owner_trigger = yes + save_temporary_scope_as = char_temp + + #Thorough check for close relation claimants + OR = { + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + } + #In laws of family in court/realm + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_transiting_relative_trigger = yes + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + } + #Spouse claimant + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + #Spouse's close family in realm/court + any_spouse = { + ep3_frankokratia_transiting_relative_trigger = yes + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_claimant_trigger = yes + } + } + #friends + any_relation = { + type = friend + ep3_frankokratia_claimant_trigger = yes + } + #soulmates + any_relation = { + type = soulmate + ep3_frankokratia_claimant_trigger = yes + } + } + } + trigger_event = { + id = ep3_frankokratia_events.0001 + days = 20 + } + } + } + } + #Someone with looser relation to claimant who might not accept + else_if = { + limit = { + scope:the_faith = { + any_faith_playable_ruler = { + ep3_frankokratia_story_owner_trigger = yes + } + } + } + scope:the_faith = { + ordered_faith_playable_ruler = { + order_by = { + value = 0 + add = current_military_strength + } + limit = { + ep3_frankokratia_story_owner_trigger = yes + } + trigger_event = { + id = ep3_frankokratia_events.0001 + days = 20 + } + } + } + } + } + } + if = { + limit = { + NOT = { + exists = global_var:cath_crusade_1 + } + scope:the_faith = { this = faith:catholic } + } + set_global_variable = { + name = cath_crusade_1 + value = 1 + } + } + else_if = { + limit = { + scope:the_faith = { this = faith:catholic } + } + change_global_variable = { + name = cath_crusade_1 + add = 1 + } + } + } +} + +# The preparation for the next Great Holy War begins. Faithful assemble. +great_holy_war.0003 = { + title = great_holy_war.0003.title + desc = { + first_valid = { + #Catholic flavour + triggered_desc = { + desc = great_holy_war.0003.catholic.desc + trigger = { scope:the_faith = faith:catholic } + } + #Everyone else + desc = great_holy_war.0003.fallback.desc + } + } + theme = faith + override_background = { + reference = temple_scope + } + left_portrait = scope:ghw_sponsor + + immediate = { + scope:ghw_sponsor = { + save_scope_as = background_temple_scope + } + play_music_cue = "mx_cue_general_crusade_event_2" + + set_variable = { + name = ghw_pledge_amount + value = great_holy_war_pledge_amount + } + set_variable = { + name = half_great_holy_war_pledge_amount + value = { + value = root.great_holy_war_pledge_amount + multiply = 0.5 + } + } + } + + option = { + name = great_holy_war.0003.a + trigger = { + root.faith = scope:the_faith + NOR = { + exists = scope:the_faith.great_holy_war.ghw_war + #Religious head should never unpledge: + this = scope:the_faith.great_holy_war.ghw_war_declarer + has_character_flag = ghw_unpledging_cooldown #Safety event. + #Do not pledge against your own liege: + any_liege_or_above = { this = scope:the_faith.great_holy_war.ghw_target_character } + } + OR = { #Either be independent, or all lieges above you MUST be of the same Faith declaring the war to avoid messy situations of vassals and lieges fighting against each other. + top_liege = this + NOT = { + any_liege_or_above = { + faith != scope:the_faith + } + } + } + } + custom_tooltip = great_holy_war.0003.a.tt + if = { + limit = { + NOT = { + scope:the_faith.great_holy_war = { has_pledged_attacker = root } + } + } + pledge_ghw_piety_gain_effect = yes + #Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine_parameter = excommunication_active } + } + custom_tooltip = great_holy_war.0003.a.lifted_excommunication + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + } + scope:the_faith.great_holy_war = { + hidden_effect = { pledge_attacker = root } + pledge_ghw_war_chest_prestige_effect = yes + pledge_ghw_war_chest_piety_effect = yes + } + + ai_chance = { + base = 10 + modifier = { + factor = 0.5 + top_liege != this + } + modifier = { + factor = 0.5 + highest_held_title_tier = tier_county + } + modifier = { + factor = 5 + highest_held_title_tier >= tier_kingdom + } + modifier = { #Excommunicated characters like getting rid of the trait. + factor = 2 + has_trait = excommunicated + } + } + } + + option = { + name = great_holy_war.0003.b + add_piety = root.var:half_great_holy_war_pledge_amount + #Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine_parameter = excommunication_active } + } + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + remove_short_term_gold = var:ghw_pledge_amount + set_variable = { + name = ghw_war_chest_donated_sum + value = var:ghw_pledge_amount + } + scope:the_faith.great_holy_war = { + change_war_chest_gold = root.var:ghw_pledge_amount + } + if = { + limit = { + NOT = { has_character_flag = ghw_pledged_gold } + is_ai = no + } + add_character_flag = { #Used to check whether the Pope will harass for more later. + flag = ghw_pledged_gold + days = 7300 + } + } + ai_chance = { + base = 10 + } + } + + option = { + name = great_holy_war.0003.c + ai_chance = { + base = 0 + } + } + + after = { + remove_variable = ghw_pledge_amount + } +} + +# Rel head selects new target +great_holy_war.0004 = { + hidden = yes + scope = ghw + + immediate = { + faith = { save_scope_as = the_faith } + + determine_ghw_target_effect = { FAITH = scope:the_faith } + + set_great_holy_war_target = { target_title = scope:target_kingdom target_character = scope:target_character } + if = { + limit = { exists = var:last_redirector } + change_variable = { + name = redirect_cost + divide = 2 + } + var:last_redirector = { add_piety = root.var:redirect_cost } + remove_variable = last_redirector + } + } +} + +# War is launched +great_holy_war.0005 = { + hidden = yes + scope = ghw + + immediate = { + if = { + limit = { + any_pledged_attacker = { + primary_title = { is_head_of_faith = yes } + faith = faith:catholic + } + exists = global_var:byz_claimant_champion + global_var:byz_claimant_champion = { + is_alive = yes + is_ruler = yes + any_owned_story = { + type = frankokratia_story + } + } + exists = title:e_byzantium.holder + } + #Check claimant isn't dead, invalidate if they are + if = { + limit = { + global_var:byz_claimant_champion = { + any_owned_story = { + type = frankokratia_story + var:byz_claimant = { is_alive = no } + } + } + } + global_var:byz_claimant_champion = { + random_owned_story = { + type = frankokratia_story + every_in_list = { + variable = frankokratia_leaders + limit = { + is_ai = no + } + trigger_event = ep3_frankokratia_events.0005 + } + } + } + } + else = { + ep3_frankokratia_remove_pledged_attackers_effect = yes + } + } + + start_ghw_war = undirected_great_holy_war + divide_war_chest = { + fraction = 0.2 + prestige = no + gold = no + } + } +} + +#Unlocking Holy Wars. (on later dates Crusades and Jihads start already unlocked from Character History) +#Hidden check event, fired on_faith pulse. + +scripted_trigger great_holy_war_0010_jerusalem_reason_trigger = { + title:c_jerusalem.holder.top_liege = { + faith.religion != scope:awakening_faith.religion + } +} + +scripted_trigger great_holy_war_0010_rome_reason_trigger = { + title:c_roma.holder.top_liege = { + faith.religion != scope:awakening_faith.religion + } +} + +scripted_trigger great_holy_war_0010_byzantion_reason_trigger = { + OR = { + trigger_if = { # Byzantine Empire + limit = { exists = title:e_byzantium.holder } # Make sure a holder exists beforehand + title:e_byzantium.holder.religion = { + NOT = { + this = religion:christianity_religion + } + } + } + title:c_byzantion.holder.top_liege.religion = { # Constantinople + NOT = { + this = religion:christianity_religion + } + } + title:c_paphlagonia.holder.top_liege.religion = { # Ankyra + NOT = { + this = religion:christianity_religion + } + } + title:c_attica.holder.top_liege.religion = { # Athens + NOT = { + this = religion:christianity_religion + } + } + title:c_korinthos.holder.top_liege.religion = { # Corinth + NOT = { + this = religion:christianity_religion + } + } + } +} + +scripted_trigger great_holy_war_0010_europe_reason_trigger = { + OR = { + title:c_venaissin.holder.top_liege.religion = { # Provence + NOT = { + this = religion:christianity_religion + } + } + title:c_toulouse.holder.top_liege.religion = { # Toulouse + NOT = { + this = religion:christianity_religion + } + } + title:c_ile_de_france.holder.top_liege.religion = { # Paris + NOT = { + this = religion:christianity_religion + } + } + title:c_cologne.holder.top_liege.religion = { # Cologne + NOT = { + this = religion:christianity_religion + } + } + title:c_halberstadt.holder.top_liege.religion = { # Halberstadt + NOT = { + this = religion:christianity_religion + } + } + } +} + +scripted_trigger great_holy_war_0010_mecca_reason_trigger = { + title:c_mecca.holder.top_liege = { + faith.religion != scope:awakening_faith.religion + } +} + +scripted_trigger great_holy_war_0010_centre_reason_trigger = { + OR = { + title:c_baghdad.holder.top_liege.religion = { # Baghdad + NOT = { + this = religion:christianity_religion + } + } + title:c_damascus.holder.top_liege.religion = { # Damascus + NOT = { + this = religion:christianity_religion + } + } + title:c_cairo.holder.top_liege.religion = { # Cairo + NOT = { + this = religion:christianity_religion + } + } + } +} + +scripted_trigger great_holy_war_0010_africa_reason_trigger = { + OR = { + title:c_marrakesh.holder.top_liege.religion = { # Marrakesh + NOT = { + this = religion:christianity_religion + } + } + title:c_tunis.holder.top_liege.religion = { # Tunis + NOT = { + this = religion:christianity_religion + } + } + title:c_algier.holder.top_liege.religion = { # Algier + NOT = { + this = religion:christianity_religion + } + } + } +} + +great_holy_war.0010 = { + hidden = yes + scope = faith + + trigger = { + suitable_faith_for_any_ghw_trigger = yes # Faith must have right Doctrines. + NOR = { + religion = { exists = var:variable_ghw_unlocked } + has_global_variable = variable_ghw_global_unlocking_cooldown + } + religious_head ?= { is_imprisoned = no } + num_county_followers >= 35 # Faith must have at least SOME legitimacy. + OR = { + AND = { # Historical setup. + title:c_jerusalem.holder = { + faith.religion != root.religion + } + current_date >= 1095.1.1 + faith:catholic = root + } + AND = { # Historical setup. + great_holy_war_0010_byzantion_reason_trigger = yes + current_date >= 1000.1.1 + faith:catholic = root + } + AND = { # Historical setup. + great_holy_war_0010_europe_reason_trigger = yes + current_date >= 800.1.1 + faith:catholic = root + } + AND = { # Historical setup. + title:c_roma.holder.top_liege = { + faith.religion != root.religion + } + faith:catholic = root + } + current_date >= 1100.1.1 # Free for all after Historical years + AND = { # Any Faith is seriously under attack. + any_holy_site = { + holder.top_liege = { + faith.religion != root.religion + } + count >= 2 + } + current_date >= 800.1.1 + } + AND = { # I learned it from you! - Muslims second. + religion:christianity_religion = { + exists = var:variable_ghw_unlocked + } + religion:islam_religion = root.religion + any_holy_site = { + holder.top_liege = { + faith.religion != root.religion + } + count >= 1 + } + } + AND = { # And we learned it from you! - Everyone else last. + religion:christianity_religion = { + exists = var:variable_ghw_unlocked + } + religion:islam_religion = { + exists = var:variable_ghw_unlocked + } + any_holy_site = { + holder.top_liege = { + faith.religion != root.religion + } + count >= 1 + } + NOR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:islam_religion + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { # Historical push for local Christian control. + add = 2 + title:c_jerusalem.holder = { + NOT = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + } + current_date >= 1095.1.1 + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + modifier = { # Historical push for overall Islamic control. + add = 2 + title:c_jerusalem.holder.top_liege = { + NOT = { faith.religion = religion:islam_religion } + } + current_date >= 1095.1.1 + root.religion = religion:islam_religion + } + } + + immediate = { + set_global_variable = { + name = variable_ghw_global_unlocking_cooldown # Slow Down cascade of Religious Heads unlocking Crusades all over the place, trying to outplay ach other. + value = yes + days = 3650 + } + religion = { + set_variable = { + name = variable_first_ghw_cooldown # Wait at least a couple of months before firing the first Crusade after this event. + value = yes + days = 120 + } + } + save_scope_as = awakening_faith + if = { + limit = { + exists = religious_head + } + religious_head = { save_scope_as = ghw_first_sponsor } + } + else = { + random_theocratic_ruler = { + limit = { faith = root } + save_scope_as = ghw_first_sponsor + } + } + if = { # Fallback + limit = { + NOT = { + exists = scope:ghw_first_sponsor + } + } + random_ruler = { + limit = { faith = root } + save_scope_as = ghw_first_sponsor + } + } + religion = { + set_variable = { + name = variable_ghw_unlocked # Crusades + value = yes + } + } + every_player = { + trigger_event = great_holy_war.0011 # Flavor fluff for various Faiths. + } + } +} + +#Flavor Fluff. +great_holy_war.0011 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + } + desc = great_holy_war.0011.christian.t + } + triggered_desc = { + trigger = { + scope:awakening_faith.religion = religion:islam_religion + } + desc = great_holy_war.0011.muslim.t + } + triggered_desc = { #Pagan Polytheists + trigger = { + scope:awakening_faith.religion = { + is_in_family = rf_pagan + } + } + desc = great_holy_war.0011.pagans.t + } + desc = great_holy_war.0011.fallback.t + } + } + desc = { + first_valid = { + #Christian Flavor + triggered_desc = { #Catholic Crusades, because of Rome. + trigger = { + scope:awakening_faith = faith:catholic + exists = scope:ghw_first_sponsor + great_holy_war_0010_rome_reason_trigger = yes + } + desc = great_holy_war.0011.catholic.rome.desc + } + triggered_desc = { #Christian Crusades, because of fall of Europe. + trigger = { + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + exists = scope:ghw_first_sponsor + great_holy_war_0010_europe_reason_trigger = yes + } + desc = great_holy_war.0011.christian.europe.desc + } + triggered_desc = { #Christian Crusades, because of fall of Byzantium. + trigger = { + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + exists = scope:ghw_first_sponsor + great_holy_war_0010_byzantion_reason_trigger = yes + } + desc = great_holy_war.0011.christian.byzantion.desc + } + triggered_desc = { #Catholic Crusades, because of Jerusalem. + trigger = { + scope:awakening_faith = faith:catholic + exists = scope:ghw_first_sponsor + great_holy_war_0010_jerusalem_reason_trigger = yes + } + desc = great_holy_war.0011.catholic.jerusalem.desc + } + triggered_desc = { #Christian Crusades, fallback. + trigger = { + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + } + desc = great_holy_war.0011.christian.fallback.desc + } + + #Muslim Flavor + triggered_desc = { #Jihads, because of Mecca. + trigger = { + scope:awakening_faith.religion = religion:islam_religion + exists = scope:ghw_first_sponsor + great_holy_war_0010_mecca_reason_trigger = yes + } + desc = great_holy_war.0011.muslim.mecca.desc + } + triggered_desc = { #Jihads, because of Jerusalem. + trigger = { + scope:awakening_faith.religion = religion:islam_religion + exists = scope:ghw_first_sponsor + great_holy_war_0010_mecca_reason_trigger = yes + } + desc = great_holy_war.0011.muslim.jerusalem.desc + } + triggered_desc = { #Jihads, because of Arabia/Egypt. + trigger = { + scope:awakening_faith.religion = religion:islam_religion + exists = scope:ghw_first_sponsor + great_holy_war_0010_centre_reason_trigger = yes + } + desc = great_holy_war.0011.muslim.arabia.desc + } + triggered_desc = { #Jihads, because of Africa. + trigger = { + scope:awakening_faith.religion = religion:islam_religion + exists = scope:ghw_first_sponsor + great_holy_war_0010_africa_reason_trigger = yes + } + desc = great_holy_war.0011.muslim.africa.desc + } + triggered_desc = { #Jihads, fallback. + trigger = { + scope:awakening_faith.religion = religion:islam_religion + } + desc = great_holy_war.0011.muslim.fallback.desc + } + #Generic Flavor + triggered_desc = { #Generic, with Head. + trigger = { + NOR = { + scope:awakening_faith.religion = religion:islam_religion + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + } + exists = scope:ghw_first_sponsor + } + desc = great_holy_war.0011.generic.fallback.head.desc + } + desc = great_holy_war.0011.generic.fallback.desc + } + first_valid = { #Ending, favorable or not, depending on receiver. + triggered_desc = { # Crusades are good! + trigger = { + OR = { + faith = scope:awakening_faith + faith = { + faith_hostility_level = { + target = scope:awakening_faith + value < faith_hostile_level + } + } + } + faith.religion != scope:awakening_faith.religion + } + desc = great_holy_war.0011.generic.ending.positive + } + triggered_desc = { # Crusades are bad! + trigger = { + NOR = { + faith = scope:awakening_faith + faith.religion = scope:awakening_faith.religion + faith = { + faith_hostility_level = { + target = scope:awakening_faith + value < faith_hostile_level + } + } + } + } + desc = great_holy_war.0011.generic.ending.negative + } + triggered_desc = { # Co-religionists. + trigger = { + faith.religion = scope:awakening_faith.religion + faith != scope:awakening_faith + exists = faith.religious_head + } + desc = great_holy_war.0011.generic.ending.coreligionist.head + } + triggered_desc = { # Co-religionists (no Head). + trigger = { + faith.religion = scope:awakening_faith.religion + faith != scope:awakening_faith + NOT = { exists = faith.religious_head } + } + desc = great_holy_war.0011.generic.ending.coreligionist.autonomous + } + } + } + theme = faith + override_background = { + reference = temple_scope + } + left_portrait = { + character = scope:ghw_first_sponsor + triggered_animation = { + trigger = { + scope:awakening_faith = { + has_doctrine = doctrine_temporal_head + } + } + animation = marshal + } + animation = personality_zealous + } + + immediate = { + scope:ghw_first_sponsor = { + save_scope_as = background_temple_scope + } + play_music_cue = "mx_cue_epic_sacral_moment" + + if = { #Localisation use only + limit = { + faith.religion = scope:awakening_faith.religion + faith != scope:awakening_faith + exists = faith.religious_head + } + faith.religious_head = { + save_scope_as = other_pope + } + } + } + + option = { #God's will + name = great_holy_war.0011.a + trigger = { + root.faith = scope:awakening_faith + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + } + } + option = { #Allahu Akhbar + name = great_holy_war.0011.b + trigger = { + root.faith = scope:awakening_faith + scope:awakening_faith.religion = religion:islam_religion + } + } + option = { #PaganGodName is with us. + name = great_holy_war.0011.c + trigger = { + root.faith = scope:awakening_faith + NOR = { + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + scope:awakening_faith.religion = religion:islam_religion + } + } + } + option = { #Infidels incoming. + name = great_holy_war.0011.d + trigger = { + root.faith != scope:awakening_faith + root.faith = { + faith_hostility_level = { + target = scope:awakening_faith + value >= faith_hostile_level + } + } + } + } + option = { #Good luck, I suppose... + name = great_holy_war.0011.e + trigger = { + NOR = { + root.faith = scope:awakening_faith + root.faith = { + faith_hostility_level = { + target = scope:awakening_faith + value >= faith_hostile_level + } + } + } + } + } + after = { + custom_tooltip = great_holy_war.0011.tooltip.effect + } +} + +#Excommunication lifted for joining the Crusade. +great_holy_war.0015 = { + type = letter_event + opening = { + desc = great_holy_war.0015.opening + } + desc = great_holy_war.0015.desc + sender = { + character = scope:scoped_pope + animation = happiness + } + + trigger = { + faith.great_holy_war = { + has_pledged_attacker = root + } + has_trait = excommunicated + } + + immediate = { + if = { #If Pope died in the meantime. + limit = { + OR = { + NOT = { + exists = faith.great_holy_war.ghw_war_declarer + } + NOT = { + faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + } + faith = { ghw_set_new_war_declarer_effect = yes } + } + root.faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + remove_trait = excommunicated + add_character_modifier = { + modifier = excommunication_recently_lifted + years = 10 + } + } + + option = { + name = great_holy_war.0015.a + trigger = { has_trait = cynical } + } + option = { + name = great_holy_war.0015.b + trigger = { + NOT = { has_trait = cynical } + } + } +} + +#Pope upset because ruler unpledged. +great_holy_war.0016 = { + type = letter_event + opening = { + desc = great_holy_war.0015.opening + } + desc = { + first_valid = { #Light Punishment + triggered_desc = { + trigger = { + has_character_flag = ghw_light_punishment + } + desc = great_holy_war.0016.desc.a + } + } + first_valid = { #Harsh Punishment + triggered_desc = { + trigger = { + has_character_flag = ghw_harsh_punishment + } + desc = great_holy_war.0016.desc.b + } + } + first_valid = { #Excommunication Punishment + triggered_desc = { + trigger = { + has_character_flag = ghw_excommunication + } + desc = great_holy_war.0016.desc.c + } + } + } + sender = { + character = scope:scoped_pope + animation = anger + } + + trigger = { + NOT = { + faith.great_holy_war = { + has_pledged_attacker = root + } + } + is_landless_adventurer = no + } + + immediate = { + hidden_effect = { + if = { #If Pope died in the meantime. + limit = { + OR = { + NOT = { + exists = faith.great_holy_war.ghw_war_declarer + } + NOT = { + faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + } + faith = { ghw_set_new_war_declarer_effect = yes } + } + root.faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + random_list = { + 40 = { + opinion_modifier = { + who = scope:scoped_pope + opinion_target = root + } + modifier = { + factor = 2 + highest_held_title_tier = tier_county + } + add_character_flag = { + flag = ghw_light_punishment + days = 500 + } + } + 30 = { + modifier = { + factor = 1.25 + highest_held_title_tier >= tier_duchy + } + add_character_flag = { + flag = ghw_harsh_punishment + days = 500 + } + } + 30 = { #Excommunication available only if target already not excommunicated and religion allows it. + trigger = { + NOT = { has_trait = excommunicated } + faith = { has_doctrine_parameter = excommunication_active } + highest_held_title_tier >= tier_kingdom + } + modifier = { #Fool me once... + factor = 2 + has_character_modifier = excommunication_recently_lifted + } + modifier = { + factor = 2 + highest_held_title_tier >= tier_empire + } + add_character_flag = { + flag = ghw_excommunication + days = 500 + } + } + } + } + } + + option = { + name = great_holy_war.0016.a + trigger = { has_trait = cynical } + } + option = { + name = great_holy_war.0016.b + trigger = { + NOT = { has_trait = cynical } + } + } + after = { + if = { + limit = { has_character_flag = ghw_light_punishment } + scope:scoped_pope = { + add_opinion = { + target = root + modifier = unpledged_from_ghw_opinion + opinion = -25 + } + } + } + if = { + limit = { has_character_flag = ghw_harsh_punishment } + add_piety = medium_piety_loss + scope:scoped_pope = { + add_opinion = { + target = root + modifier = unpledged_from_ghw_opinion + opinion = -35 + } + } + if = { + limit = { + any_theocratic_vassal = { faith = root.faith } + } + every_theocratic_vassal = { + custom = great_holy_war.0016.custom + limit = { faith = root.faith } + add_opinion = { + target = root + modifier = impious_opinion + opinion = -35 + } + } + } + if = { + limit = { exists = cp:councillor_court_chaplain } + add_opinion = { + target = root + modifier = impious_opinion + opinion = -35 + } + } + } + if = { + limit = { has_character_flag = ghw_excommunication } + add_excommunication_actual_effect = yes + if = { + limit = { has_character_modifier = excommunication_recently_lifted } + hidden_effect = { remove_character_modifier = excommunication_recently_lifted } + } + scope:scoped_pope = { + add_opinion = { + target = root + modifier = unpledged_from_ghw_opinion + opinion = -40 + } + } + } + remove_character_flag = ghw_light_punishment + remove_character_flag = ghw_harsh_punishment + remove_character_flag = ghw_excommunication + stress_impact = { + zealous = medium_stress_impact_gain + } + } +} + +#Confirmation to unpledge. +great_holy_war.0017 = { + title = great_holy_war.0017.title + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:scoped_pope = { faith = faith:catholic } + } + desc = great_holy_war.0017.desc.a + } + triggered_desc = { + trigger = { + NOT = { + scope:scoped_pope = { faith = faith:catholic } + } + } + desc = great_holy_war.0017.desc.b + } + } + } + theme = faith + left_portrait = scope:scoped_pope + + immediate = { + if = { + limit = { + NOR = { + exists = faith.great_holy_war.ghw_war_declarer + faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + faith = { ghw_set_new_war_declarer_effect = yes } + } + root.faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + add_character_flag = { + flag = ghw_unpledging_cooldown + days = 500 + } + } + + option = { + name = great_holy_war.0017.a + if = { + limit = { #Stop from doing it if the player opens the Crusade Interface and joins from there. + scope:great_holy_war = { has_pledged_attacker = root } + } + root.faith.great_holy_war = { + unpledge_attacker = root + unpledge_ghw_war_chest_prestige_effect = yes + unpledge_ghw_war_chest_piety_effect = yes + } + } + #Piety price + pledge_ghw_piety_loss_effect = yes + add_piety_level = -1 + #Set Cooldown + set_variable = { + name = variable_ghw_unpledged_cooldown + value = yes + days = 60 + } + #Religious Head is upset + trigger_event = { + id = great_holy_war.0016 + days = 37 + } + remove_character_flag = ghw_unpledging_cooldown + add_character_flag = { #Used to check whether the Pope will harass for more later. + flag = ghw_unpledged_once + days = 550 + } + } + option = { + name = great_holy_war.0017.b + remove_character_flag = ghw_unpledging_cooldown + } +} + +#Confirmation to pledge. +great_holy_war.0018 = { + title = great_holy_war.0003.title + desc = great_holy_war.0018.desc + theme = faith + left_portrait = scope:scoped_pope + + immediate = { + if = { + limit = { + OR = { + NOT = { + exists = faith.great_holy_war.ghw_war_declarer + } + NOT = { + faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + } + faith = { ghw_set_new_war_declarer_effect = yes } + } + root.faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + add_character_flag = { + flag = ghw_unpledging_cooldown + days = 500 + } + } + + option = { + name = great_holy_war.0018.a + faith.great_holy_war = { + pledge_attacker = root + pledge_ghw_war_chest_prestige_effect = yes + pledge_ghw_war_chest_piety_effect = yes + } + #Piety bonus + root = { + pledge_ghw_piety_gain_effect = yes + #Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine = tenet_communion } + } + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + } + remove_character_flag = ghw_unpledging_cooldown + } + option = { + name = great_holy_war.0018.b + remove_character_flag = ghw_unpledging_cooldown + } +} + +# AI hidden event to pledge to a Great Holy War during the preparation phase. +# Event is fired when the Pope calls for the Crusade. +# Requires a the_faith scope, defined by event. +great_holy_war.0020 = { + hidden = yes + + trigger = { + is_ai = yes + is_ruler = yes + is_landed = yes + is_at_war = no + is_imprisoned = no + highest_held_title_tier >= tier_county + NOT = { has_trait = incapable } + ai_zeal >= 0 + root.faith = scope:the_faith + NOT = { target_is_liege_or_above = scope:target_character } + scope:the_faith = { # Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_attacker = root } + } + } + } + + immediate = { + scope:the_faith.great_holy_war = { + set_variable = { + name = triple_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 3 + } + } + set_variable = { + name = double_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 2 + } + } + set_variable = { + name = one_and_a_half_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 1.5 + } + } + set_variable = { + name = half_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 0.5 + } + } + set_variable = { + name = quarter_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 0.25 + } + } + } + random_list = { + 25 = { # Pledge. + trigger = { + OR = { # Either be independent, or have no liege above you of the defending Faith, to avoid messy situations of vassals and lieges fighting against each other. + top_liege = this + any_liege_or_above = { + count = all + faith != scope:target_faith + } + } + } + scope:the_faith.great_holy_war = { + pledge_attacker = root + pledge_ghw_war_chest_prestige_effect = yes + pledge_ghw_war_chest_piety_effect = yes + } + pledge_ghw_piety_gain_effect = yes + # Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine_parameter = excommunication_active } + } + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + if = { + limit = { is_ai = yes } + trigger_event = { id = great_holy_war.0026 } # Set Beneficiary automatically. + } + } + 75 = { # Do not pledge. + random = { # When not pledging, there is still a chance that the AI will donate money. + chance = 35 + modifier = { + factor = 0.75 + has_trait = greedy + } + modifier = { + factor = 1.5 + has_trait = generous + } + modifier = { + factor = 0.25 + has_trait = cynical + } + modifier = { + factor = 1.75 + has_trait = zealous + } + modifier = { + factor = 1.75 + short_term_gold >= root.great_holy_war_pledge_amount + } + ai_value_modifier = { # Raw Zeal + ai_zeal = 1.0 + } + scope:the_faith.great_holy_war = { + change_war_chest_gold = { + value = root.great_holy_war_pledge_amount + multiply = 0.5 + } + } + } + + modifier = { # More pledging happening at start of preparation phase. + factor = 0.75 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch > 200 } + } + modifier = { # Less pledging happening after. + factor = 1.5 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch < 150 } + } + modifier = { # Less pledging happening after. + factor = 1.75 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch < 100 } + } + modifier = { # Less pledging happening after. + factor = 1.75 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch < 70 } + } + modifier = { # More likely if war is close by. + factor = 0.85 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 150000 } + } + } + } + modifier = { # More likely if war is close by. + factor = 0.9 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 1500000 } # Roughly Rome to Portugal + } + } + } + modifier = { # Less likely if war is far away. + factor = 1.5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2000000 } + } + } + } + modifier = { # Just too darn far away... + factor = 1.75 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2500000 } + } + } + } + modifier = { # Much less likely to happen if the war has started. + factor = 0.25 + exists = scope:the_faith.great_holy_war.ghw_war + } + modifier = { # Don't get too crowded now. + factor = 2 + scope:the_faith.great_holy_war = { ghw_attackers_strength > ghw_defenders_strength } + } + modifier = { # Don't get too crowded now. + factor = 1.85 + scope:the_faith.great_holy_war = { ghw_attackers_strength > var:triple_defenders_strength } + } + modifier = { # Don't get too crowded now. + factor = 1.75 + scope:the_faith.great_holy_war = { ghw_attackers_strength > var:double_defenders_strength } + } + modifier = { # Don't get too crowded now. + factor = 1.5 + scope:the_faith.great_holy_war = { ghw_attackers_strength > var:one_and_a_half_of_defenders_strength } + } + modifier = { # Try to prevent the Crusade from failing before even starting. (Less strength than defenders) + factor = 0.75 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_attackers_strength < ghw_defenders_strength } + } + modifier = { # Try to prevent the Crusade from failing before even starting. (Less than half of the defenders' strength) + factor = 0.5 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_attackers_strength < var:half_of_defenders_strength } + } + modifier = { # Try to prevent the Crusade from failing before even starting. (Less than quarter of the defenders' strength) + factor = 0.35 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_attackers_strength < var:quarter_of_defenders_strength } + } + modifier = { # Slightly more likely to join when fighting for a Holy Site. + factor = 0.85 + scope:target_kingdom = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + } + modifier = { # Hoping for forgiveness + factor = 0.8 + has_trait = excommunicated + } + ai_value_modifier = { # Raw Zeal + ai_zeal = -1.0 + } + modifier = { # Basic traits + factor = 2 + has_trait = cynical + } + modifier = { # Basic traits + factor = 0.5 + has_trait = zealous + } + modifier = { # Tier + factor = 0.75 + highest_held_title_tier = tier_kingdom + } + modifier = { # Tier + factor = 0.5 + highest_held_title_tier = tier_empire + } + } + } + } +} + +#AI hidden event to pledge to a Directed Great Holy War. +#Event is fired on_declaration. +#Requires a the_faith scope, defined in the cb. +great_holy_war.0092 = { + hidden = yes + + trigger = { + is_ai = yes + is_ruler = yes + is_landed = yes + is_at_war = no + is_imprisoned = no + highest_held_title_tier >= tier_county + NOT = { has_trait = incapable } + ai_zeal >= 0 + root.faith = scope:the_faith + NOT = { target_is_liege_or_above = scope:ghw_defender } #scope:target_character isn't created in the holy war decision where this event is called + scope:the_faith = { #Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_attacker = root } + } + } + } + + immediate = { + scope:the_faith.great_holy_war = { + set_variable = { + name = triple_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 3 + } + } + set_variable = { + name = double_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 2 + } + } + set_variable = { + name = one_and_a_half_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 1.5 + } + } + set_variable = { + name = half_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 0.5 + } + } + set_variable = { + name = quarter_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 0.25 + } + } + } + random_list = { + 35 = { #Pledge. + trigger = { + OR = { # Either be independent, or have no liege above you of the defending Faith, to avoid messy situations of vassals and lieges fighting against each other. + top_liege = this + any_liege_or_above = { + count = all + faith != scope:target_faith + } + } + } + scope:the_faith.great_holy_war = { + pledge_attacker = root + pledge_ghw_war_chest_prestige_effect = yes + pledge_ghw_war_chest_piety_effect = yes + } + if = { + limit = { is_ai = yes } + trigger_event = { + id = great_holy_war.0026 #Set Beneficiary automatically. + } + } + } + 65 = { #Do not pledge. + + random = { #When not pledging, there is still a chance that the AI will donate money. + chance = 35 + modifier = { + factor = 0.75 + has_trait = greedy + } + modifier = { + factor = 1.5 + has_trait = generous + } + modifier = { + factor = 0.25 + has_trait = cynical + } + modifier = { + factor = 1.75 + has_trait = zealous + } + modifier = { + factor = 1.75 + short_term_gold >= root.great_holy_war_pledge_amount + } + ai_value_modifier = { #Raw Zeal + ai_zeal = 1.0 + } + scope:the_faith.great_holy_war = { + change_war_chest_gold = root.great_holy_war_pledge_amount + } + } + modifier = { #More likely if war is close by. + factor = 0.85 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 150000 } + } + } + } + modifier = { #More likely if war is close by. + factor = 0.9 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 1500000 } # Roughly Rome to Portugal + } + } + } + modifier = { #Less likely if war is far away. + factor = 2 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2000000 } + } + } + } + modifier = { #Just too darn far away... + factor = 5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2500000 } + } + } + } + modifier = { #Slightly more likely to join when fighting for a Holy Site. + factor = 0.85 + scope:target_kingdom = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + } + ai_value_modifier = { #Raw Zeal + ai_zeal = -1.0 + } + modifier = { #Basic traits + factor = 2 + has_trait = cynical + } + modifier = { #Basic traits + factor = 0.5 + has_trait = zealous + } + modifier = { #Tier + factor = 0.75 + highest_held_title_tier = tier_kingdom + } + modifier = { #Tier + factor = 0.5 + highest_held_title_tier = tier_empire + } + } + } + } +} + +#AI hidden event to have a holy order pledge to a Great Holy War during the preparation phase. +#Event is fired when the Pope calls for the Crusade. +#Requires a the_faith scope, defined by event. +great_holy_war.0090 = { + hidden = yes + scope = holy_order + + trigger = { + scope:the_faith = { #Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_attacker = root.leader } + } + } + } + + immediate = { + scope:the_faith = { + great_holy_war = { + pledge_attacker = root.leader + } + } + } +} + +#AI hidden event to counterpledge to a Great Holy War during the preparation phase. +#Event is fired when the Pope calls for the Crusade and when the target Kingdom is switched. +#Requires a target_faith scope, defined by event. +#Requires a the_faith scope, defined by event. +great_holy_war.0021 = { + hidden = yes + + trigger = { + is_ai = yes + is_ruler = yes + is_landed = yes + is_at_war = no + is_imprisoned = no + highest_held_title_tier >= tier_county + NOT = { has_trait = incapable } + root.faith = scope:the_faith.great_holy_war.ghw_target_character.faith + scope:the_faith = { #Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_defender = root } + } + NOT = { exists = great_holy_war.ghw_war } #Must not have started already, only in preparation phase. + } + } + + immediate = { + scope:the_faith.great_holy_war = { + set_variable = { + name = triple_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 3 + } + } + set_variable = { + name = double_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 2 + } + } + set_variable = { + name = one_and_a_half_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 1.5 + } + } + set_variable = { + name = half_of_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 0.5 + } + } + set_variable = { + name = quarter_of_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 0.25 + } + } + } + random_list = { + 15 = { #Pledge. + trigger = { + OR = { # Either be independent, or have no liege above you of the attacking Faith, to avoid messy situations of vassals and lieges fighting against each other. + top_liege = this + any_liege_or_above = { + count = all + faith != scope:the_faith + } + } + } + scope:the_faith.great_holy_war = { pledge_defender = root } + } + 85 = { #Do not pledge. + modifier = { #More pledging happening at start of preparation phase. + factor = 0.75 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch > 200 } + } + modifier = { #Less pledging happening after. + factor = 1.5 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch < 100 } + } + modifier = { #More likely if war is close by. + factor = 0.5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 25000 } + } + } + } + modifier = { #More likely if war is close by. + factor = 0.75 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 50000 } + } + } + } + modifier = { #More likely if war is close by. + factor = 0.8 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 800000 } # Roughly Rome to Portugal + } + } + } + modifier = { #Less likely if war is close by. + factor = 1.75 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 1000000 } + } + } + } + modifier = { #Less likely if war is close by. + factor = 1.75 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 1500000 } + } + } + } + modifier = { #Less likely if war is close by. + factor = 2 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2000000 } + } + } + } + modifier = { #Just too darn far away... + factor = 2.5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2500000 } + } + } + } + modifier = { #Much less likely to happen if the war has started. + factor = 1.75 + exists = scope:the_faith.great_holy_war.ghw_war + } + modifier = { #Don't get too crowded now. + factor = 1.5 + scope:the_faith.great_holy_war = { ghw_defenders_strength > ghw_attackers_strength } + } + modifier = { #Don't get too crowded now. + factor = 1.5 + scope:the_faith.great_holy_war = { ghw_defenders_strength > var:triple_attackers_strength } + } + modifier = { #Don't get too crowded now. + factor = 1.5 + scope:the_faith.great_holy_war = { ghw_defenders_strength > var:double_attackers_strength } + } + modifier = { #Don't get too crowded now. + factor = 1.25 + scope:the_faith.great_holy_war = { ghw_defenders_strength > var:one_and_a_half_attackers_strength } + } + modifier = { #Try to balance. + factor = 0.35 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_defenders_strength < var:half_of_attackers_strength } + } + modifier = { #Try to balance. + factor = 0.25 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_defenders_strength < var:quarter_of_attackers_strength } + } + modifier = { #Slightly more likely to join when fighting for a Holy Site. + factor = 0.75 + scope:target_kingdom = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:target_faith + } + } + } + ai_value_modifier = { #Raw Zeal + ai_zeal = -1.0 + } + modifier = { #Basic traits + factor = 2 + has_trait = cynical + } + modifier = { #Basic traits + factor = 0.5 + has_trait = zealous + } + modifier = { #Tier + factor = 0.75 + highest_held_title_tier = tier_kingdom + } + modifier = { #Tier + factor = 0.5 + highest_held_title_tier = tier_empire + } + } + } + } +} + +#AI hidden event to counterpledge to a Directed Great Holy War. +#Event is fired on_declaration. +#Requires a target_faith scope, defined in the cb. +#Requires a the_faith scope, defined in the cb. +great_holy_war.0093 = { + hidden = yes + + trigger = { + is_ai = yes + is_ruler = yes + is_landed = yes + is_at_war = no + is_imprisoned = no + highest_held_title_tier >= tier_county + NOT = { has_trait = incapable } + root.faith = scope:target_faith + scope:the_faith = { #Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_defender = root } + } + } + } + + immediate = { + scope:the_faith.great_holy_war = { + set_variable = { + name = triple_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 3 + } + } + set_variable = { + name = double_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 2 + } + } + set_variable = { + name = one_and_a_half_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 1.5 + } + } + set_variable = { + name = half_of_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 0.5 + } + } + set_variable = { + name = quarter_of_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 0.25 + } + } + } + random_list = { + 30 = { #Pledge. + trigger = { + OR = { # Either be independent, or have no liege above you of the attacking Faith, to avoid messy situations of vassals and lieges fighting against each other. + top_liege = this + any_liege_or_above = { + count = all + faith != scope:the_faith + } + } + } + scope:the_faith.great_holy_war = { pledge_defender = root } + } + 70 = { #Do not pledge. + modifier = { #More likely if war is close by. + factor = 0.5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 25000 } + } + } + } + modifier = { #More likely if war is close by. + factor = 0.75 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 50000 } + } + } + } + modifier = { #More likely if war is close by. + factor = 0.8 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 800000 } # Roughly Rome to Portugal + } + } + } + modifier = { #Less likely if war is close by. + factor = 2 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 1000000 } + } + } + } + modifier = { #Less likely if war is close by. + factor = 5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 1500000 } + } + } + } + modifier = { #Less likely if war is close by. + factor = 6 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2000000 } + } + } + } + modifier = { #Just too darn far away... + factor = 10 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2500000 } + } + } + } + modifier = { #Try to balance. + factor = 0.35 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_defenders_strength < var:half_of_attackers_strength } + } + modifier = { #Try to balance. + factor = 0.25 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_defenders_strength < var:quarter_of_attackers_strength } + } + modifier = { #Slightly more likely to join when fighting for a Holy Site. + factor = 0.75 + scope:target_kingdom = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:target_faith + } + } + } + ai_value_modifier = { #Raw Zeal + ai_zeal = -1.0 + } + modifier = { #Basic traits + factor = 2 + has_trait = cynical + } + modifier = { #Basic traits + factor = 0.5 + has_trait = zealous + } + modifier = { #Tier + factor = 0.75 + highest_held_title_tier = tier_kingdom + } + modifier = { #Tier + factor = 0.5 + highest_held_title_tier = tier_empire + } + } + } + } +} + +#AI hidden event to have a holy order counterpledge to a Great Holy War during the preparation phase. +#Event is fired when the Pope calls for the Crusade and when the target Kingdom is switched. +#Requires a the_faith scope, defined by event. +great_holy_war.0091 = { + hidden = yes + scope = holy_order + + trigger = { + scope:the_faith = { #Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_defender = root.leader } + } + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } #Must not have started already, only in preparation phase. + } + } + + immediate = { + scope:the_faith.great_holy_war = { + pledge_defender = root.leader + } + } +} + + +great_holy_war.0022 = { + hidden = yes + scope = faith + + trigger = { + exists = great_holy_war + NOT = { exists = great_holy_war.ghw_war } + great_holy_war = { days_until_ghw_launch <= 200 } + great_holy_war = { days_until_ghw_launch >= 150 } + save_temporary_scope_as = the_faith + any_player = { + ghw_pope_annoyed_at_lack_of_participation_trigger = yes + ghw_pope_annoyed_at_lack_of_participation_tier_trigger = yes + NOT = { has_character_flag = ghw_pope_poking } + is_landless_adventurer = no + } + } + + immediate = { + save_scope_as = the_faith + + if = { + limit = { exists = great_holy_war.ghw_target_character } + great_holy_war.ghw_target_character = { save_scope_as = target_character } + } + every_player = { + limit = { + ghw_pope_annoyed_at_lack_of_participation_trigger = yes + ghw_pope_annoyed_at_lack_of_participation_tier_trigger = yes + NOT = { has_character_flag = ghw_pope_poking } + is_landless_adventurer = no + } + trigger_event = { + id = great_holy_war.0023 + days = { 25 50 } + } + } + } +} + +#Actual event letter to players. +great_holy_war.0023 = { + type = letter_event + opening = { desc = great_holy_war.0015.opening } + desc = { + first_valid = { #Regular letter + triggered_desc = { + trigger = { + NOT = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + } + desc = great_holy_war.0023.desc + } + } + first_valid = { #Hooked player + triggered_desc = { + trigger = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + desc = great_holy_war.0023.desc.hooked + } + } + } + sender = scope:scoped_pope + + trigger = { + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + ghw_pope_annoyed_at_lack_of_participation_trigger = yes + ghw_pope_annoyed_at_lack_of_participation_tier_trigger = yes + is_landless_adventurer = no + } + + immediate = { + if = { #If the Pope died in the meantime. + limit = { + NOR = { + exists = scope:the_faith.great_holy_war.ghw_war_declarer + scope:the_faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + scope:the_faith = { ghw_set_new_war_declarer_effect = yes } + } + scope:the_faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + add_character_flag = { #Do not fire again. + flag = ghw_pope_poking + days = 200 + } + set_variable = { + name = ghw_pledge_amount + value = great_holy_war_pledge_amount + } + set_variable = { + name = half_great_holy_war_pledge_amount + value = { + value = root.great_holy_war_pledge_amount + multiply = 0.5 + } + } + } + + option = { + name = { + trigger = { + NOT = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + } + text = great_holy_war.0003.a + } + name = { + trigger = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + text = great_holy_war.0003.a.hooked + } + trigger = { + ghw_pope_annoyed_at_lack_of_participation_trigger = yes + } + if = { + limit = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + scope:scoped_pope = { + use_hook = root + } + add_character_flag = { + flag = variable_ghw_papal_hooked_pledge + days = 500 + } + } + if = { + limit = { + NOT = { + scope:the_faith.great_holy_war = { has_pledged_attacker = root } + } + } + pledge_ghw_piety_gain_effect = yes + #Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine_parameter = excommunication_active } + } + custom_tooltip = great_holy_war.0003.a.lifted_excommunication + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + scope:the_faith.great_holy_war = { + pledge_attacker = root + pledge_ghw_war_chest_prestige_effect = yes + pledge_ghw_war_chest_piety_effect = yes + } + } + stress_impact = { + cynical = minor_stress_impact_gain + zealous = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + modifier = { + factor = 0.5 + top_liege != this + } + modifier = { + factor = 0.5 + highest_held_title_tier = tier_county + } + modifier = { + factor = 0.1 + top_liege != this + highest_held_title_tier <= tier_county + } + modifier = { + factor = 5 + highest_held_title_tier >= tier_kingdom + } + } + } + + option = { + name = great_holy_war.0003.b + trigger = { + NOT = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + } + add_piety = root.var:half_great_holy_war_pledge_amount + #Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine_parameter = excommunication_active } + } + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + remove_short_term_gold = var:ghw_pledge_amount + set_variable = { + name = ghw_war_chest_donated_sum + value = var:ghw_pledge_amount + } + scope:the_faith.great_holy_war = { + change_war_chest_gold = root.var:ghw_pledge_amount + } + if = { + limit = { + NOT = { has_character_flag = ghw_pledged_gold } + } + add_character_flag = { #Used to check whether the Pope will harass for more later. + flag = ghw_pledged_gold + days = 550 + } + } + stress_impact = { + cynical = minor_stress_impact_gain + greedy = minor_stress_impact_gain + generous = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + option = { + name = great_holy_war.0023.c + #But I'm already fighting infidels in another war! + trigger = { + is_at_war = yes + NOR = { + any_war_enemy = { faith = scope:the_faith } + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + } + ai_chance = { + base = 0 + } + } + option = { #No excuses. + name = great_holy_war.0023.d + trigger = { + OR = { + is_at_war = no + NOT = { + any_war_enemy = { + faith != scope:the_faith + } + } + } + NOT = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + } + #Piety price + pledge_ghw_piety_loss_effect = yes + add_piety_level = -1 + #Set Cooldown + set_variable = { + name = variable_ghw_unpledged_cooldown + value = yes + days = 60 + } + #Religious Head is upset + trigger_event = { + id = great_holy_war.0016 + days = 37 + } + stress_impact = { + zealous = minor_stress_impact_gain + cynical = minor_stress_impact_loss + } + ai_chance = { + base = 0 + } + } + after = { + remove_variable = ghw_pledge_amount + } +} + +#On_death: of Recipient, pick another one. +great_holy_war.0024 = { + hidden = yes + scope = character + + trigger = { + exists = faith.great_holy_war + faith.great_holy_war.ghw_designated_winner = root + } + + immediate = { + save_scope_as = former_recipient + faith.great_holy_war = { + faith = { save_scope_as = the_faith } + ghw_target_title = { save_scope_as = target_kingdom } + if = { #If Pope died in the meantime. + limit = { + NOR = { + exists = scope:the_faith.great_holy_war.ghw_war_declarer + scope:the_faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + scope:the_faith = { ghw_set_new_war_declarer_effect = yes } + } + scope:the_faith.great_holy_war.ghw_war_declarer = { save_scope_as = ghw_sponsor } + #Check and set sponsor if needed. + undirected_ghw_recipient_selection_on_death_effect = yes + } + every_player = { + limit = { + scope:the_faith.great_holy_war = { + OR = { + has_pledged_attacker = prev + has_pledged_defender = prev + } + } + } + if = { + limit = { exists = scope:ghw_claimant } + send_interface_toast = { + type = event_toast_effect_bad + left_icon = scope:former_recipient + right_icon = scope:ghw_claimant + title = great_holy_war.0024.dead.recipient.title + custom_tooltip = great_holy_war.0024.dead.recipient.replaced + } + } + else = { + send_interface_toast = { + type = event_toast_effect_bad + left_icon = scope:former_recipient + title = great_holy_war.0024.dead.recipient.title + custom_tooltip = great_holy_war.0024.dead.recipient.open + } + } + } + } +} + +#on_character_faith_change: of Recipient, pick another one. +great_holy_war.0025 = { + hidden = yes + scope = character + + trigger = { + exists = scope:old_faith.great_holy_war + scope:old_faith.great_holy_war.ghw_designated_winner = root + } + + immediate = { + scope:old_faith.great_holy_war = { + faith = { save_scope_as = the_faith } + ghw_target_title = { save_scope_as = target_kingdom } + if = { #If Pope died in the meantime. + limit = { + OR = { + NOT = { + exists = scope:the_faith.great_holy_war.ghw_war_declarer + } + NOT = { + scope:the_faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + } + scope:the_faith = { ghw_set_new_war_declarer_effect = yes } + } + scope:the_faith.great_holy_war.ghw_war_declarer = { save_scope_as = ghw_sponsor } + #Check and set sponsor if needed. + undirected_ghw_recipient_selection_effect = yes + } + } +} + +#select Beneficiary for the AI automatically. Fired when it joins from great_holy_war.0020. +scripted_trigger great_holy_war_0026_valid_beneficiary_trigger = { + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + has_trait_with_flag = debilitating_illness + } + faith = root.faith + is_adult = yes + is_ruler = no + any_heir_title = { count = 0 } #Not heir to anything + OR = { #Either not married, or not married to a ruler. + is_married = no + NOT = { + any_spouse = { + is_ruler = yes + } + } + } +} + +great_holy_war.0026 = { + hidden = yes + scope = character + + trigger = { + exists = faith.great_holy_war + faith.great_holy_war = { + has_pledged_attacker = root + } + } + + immediate = { + reset_beneficiary = yes #Reset by default, then, if also an AI, reassign automatically. + if = { + limit = { #If potential new beneficiary exists, pick one. + is_lowborn = no + dynasty = { + any_dynasty_member = { + great_holy_war_0026_valid_beneficiary_trigger = yes + } + } + } + dynasty = { + random_dynasty_member = { + limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + OR = { + AND = { + is_male = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_female_dominated } + } + NOR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + is_close_family_or_spouse_of_root_trigger = yes + age <= 40 + NOT = { has_relation_rival = root } + is_married = no + culture = root.culture + } + alternative_limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + OR = { + AND = { + is_male = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_female_dominated } + } + NOR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + is_close_family_or_spouse_of_root_trigger = yes + age <= 40 + NOT = { has_relation_rival = root } + is_married = no + } + alternative_limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + OR = { + AND = { + is_male = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_female_dominated } + } + NOR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + is_close_family_or_spouse_of_root_trigger = yes + age <= 40 + NOT = { has_relation_rival = root } + } + alternative_limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + OR = { + AND = { + is_male = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_female_dominated } + } + NOR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + age <= 40 + } + alternative_limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + OR = { + AND = { + is_male = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_female_dominated } + } + NOR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + } + alternative_limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + } + weight = { + base = 1 + opinion_modifier = { # Nepotism + opinion_target = this + who = root + } + modifier = { # More likely to send a soldier into enemy territory. + add = 25 + has_trait = education_martial + } + modifier = { # Skill + add = 15 + OR = { + diplomacy >= 12 + martial >= 12 + stewardship >= 12 + intrigue >= 12 + learning >= 12 + } + } + modifier = { #Zeal + add = 5 + has_strong_religious_conviction_trigger = yes + } + modifier = { #Virtues + add = 2 + num_virtuous_traits >= 2 + } + } + save_scope_as = scoped_beneficiary + } + } + set_beneficiary = scope:scoped_beneficiary + } + else = { #Else reset. + reset_beneficiary = yes + } + } +} + +#Same as above, but fired on death of a participant of a ghw, with different scopes. +great_holy_war.0027 = { + hidden = yes + scope = character + + trigger = { + exists = scope:great_holy_war + exists = scope:replacement.faith.great_holy_war + } + + immediate = { + scope:replacement = { + if = { + limit = { + NOT = { + scope:great_holy_war = { has_pledged_attacker = prev } + } + } + scope:great_holy_war = { pledge_attacker = prev } + } + reset_beneficiary = yes #Reset by default, then, if also an AI, reassign automatically. + if = { + limit = { is_ai = yes } + trigger_event = { + id = great_holy_war.0026 + days = 2 + } + } + } + } +} + +#Resetting beneficiary when he becomes invalid for the spot, for whatever reason. +#On_death. +great_holy_war.0028 = { + hidden = yes + scope = character + + trigger = { + exists = faith.great_holy_war + faith.great_holy_war = { + any_pledged_attacker = { + ghw_beneficiary ?= root + } + } + } + + immediate = { + faith.great_holy_war = { + every_pledged_attacker = { + limit = { + ghw_beneficiary ?= root + } + ghw_beneficiary = { save_scope_as = former_beneficiary } + reset_beneficiary = yes #Reset by default, then, if also an AI, reassign automatically. + if = { + limit = { is_ai = no } #Send notification to player. + send_interface_toast = { + left_icon = root + title = great_holy_war.0028.dead.beneficiary_title + custom_tooltip = great_holy_war.0028.dead.beneficiary + } + } + else = { + trigger_event = { + id = great_holy_war.0026 + days = 2 + } + } + } + } + } +} + +#On_character_faith_change. +great_holy_war.0029 = { + hidden = yes + scope = character + + trigger = { + exists = scope:old_faith.great_holy_war + scope:old_faith.great_holy_war = { + any_pledged_attacker = { + ghw_beneficiary ?= root + } + } + } + + immediate = { + scope:old_faith.great_holy_war = { + every_pledged_attacker = { + limit = { + ghw_beneficiary ?= root + } + ghw_beneficiary = { save_scope_as = former_beneficiary } + reset_beneficiary = yes #Reset by default, then, if also an AI, reassign automatically. + if = { + limit = { is_ai = no } #Send notification to player. + send_interface_toast = { + left_icon = root + title = great_holy_war.0029.invalid.beneficiary_title + custom_tooltip = great_holy_war.0029.converted.beneficiary + } + } + else = { + trigger_event = { + id = great_holy_war.0026 + days = 2 + } + } + } + } + } +} + +#All other conditions checked on_faith_monthly. + +#If sick +#If incapable +#If monk/nun +#If Excommunicated +#If ruler +#If heir + +great_holy_war.0030 = { + hidden = yes + scope = faith + + trigger = { + great_holy_war ?= { + any_pledged_attacker = { #If beneficiary has become invalid in the meantime, for whatever reason. + ghw_beneficiary ?= { + OR = { + has_trait = incapable + has_trait = excommunicated + has_trait = devoted + has_trait_with_flag = debilitating_illness + is_ruler = yes + any_heir_title = { } #Shouldn't be heir to anything + } + } + } + } + } + + immediate = { + great_holy_war = { + every_pledged_attacker = { + limit = { + ghw_beneficiary ?= { + OR = { + has_trait = incapable + has_trait = excommunicated + has_trait = devoted + has_trait_with_flag = debilitating_illness + AND = { + is_ruler = yes + NOT = { government_has_flag = government_is_landless_adventurer } + } + any_heir_title = { } #Shouldn't be heir to anything + } + } + } + ghw_beneficiary = { + save_scope_as = former_beneficiary + } + reset_beneficiary = yes #Reset by default, then, if also an AI, reassign automatically. + if = { + limit = { + is_ai = no #Send notification to player. + scope:former_beneficiary = { + OR = { + has_trait = incapable + has_trait = excommunicated + has_trait = devoted + has_trait_with_flag = debilitating_illness + is_ruler = yes + any_heir_title = { } #Shouldn't be heir to anything + } + } + } + send_interface_toast = { + type = event_toast_effect_bad + left_icon = root + title = great_holy_war.0029.invalid.beneficiary_title + scope:former_beneficiary = { + if = { + limit = { has_trait = incapable } + custom_tooltip = great_holy_war.0030.incapable.beneficiary + } + else_if = { + limit = { has_trait = excommunicated } + custom_tooltip = great_holy_war.0030.excommunicated.beneficiary + } + else_if = { + limit = { has_trait = devoted } + custom_tooltip = great_holy_war.0030.devoted.beneficiary + } + else_if = { + limit = { has_trait_with_flag = debilitating_illness } + custom_tooltip = great_holy_war.0030.sick.beneficiary + } + else_if = { + limit = { is_ruler = yes } + custom_tooltip = great_holy_war.0030.ruler.beneficiary + } + else_if = { + limit = { any_heir_title = { } } #Shouldn't be heir to anything + custom_tooltip = great_holy_war.0030.heir.beneficiary + } + } + } + } + else_if = { + limit = { is_ai = yes } + trigger_event = { + id = great_holy_war.0026 + days = 2 + } + } + } + } + } +} + +# Player wishes to give money to the Crusade. +great_holy_war.0040 = { + type = character_event + title = great_holy_war.0003.title + desc = great_holy_war.0040.desc + theme = faith + left_portrait = root + + immediate = { + add_character_flag = { # Do not spam button. + flag = ghw_pledging_gold + days = 550 + } + set_variable = { + name = double_great_holy_war_pledge_amount + value = { + value = root.great_holy_war_pledge_amount + multiply = 2 + } + } + set_variable = { + name = triple_great_holy_war_pledge_amount + value = { + value = root.great_holy_war_pledge_amount + multiply = 3 + } + } + + #Set halves of above to give as Piety. + + set_variable = { + name = half_great_holy_war_pledge_amount + value = { + value = root.great_holy_war_pledge_amount + multiply = 0.5 + } + } + set_variable = { + name = half_of_triple_great_holy_war_pledge_amount + value = { + value = root.var:triple_great_holy_war_pledge_amount + multiply = 0.5 + } + } + + if = { + limit = { + NOR = { + exists = faith.great_holy_war.ghw_war_declarer + faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + faith = { ghw_set_new_war_declarer_effect = yes } + } + root.faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + } + + option = { # Big donation. + name = great_holy_war.0040.a + trigger = { gold >= var:triple_great_holy_war_pledge_amount } + add_piety = var:half_of_triple_great_holy_war_pledge_amount + remove_short_term_gold = var:triple_great_holy_war_pledge_amount + set_variable = { + name = ghw_war_chest_donated_sum + value = var:triple_great_holy_war_pledge_amount + } + scope:great_holy_war = { + change_war_chest_gold = root.var:triple_great_holy_war_pledge_amount + } + scope:scoped_pope = { + add_opinion = { + target = root + modifier = donated_ghw_money_2 + } + } + add_character_flag = { # Used to check whether the Pope will harass for more later. + flag = ghw_pledged_gold + days = 7300 + } + stress_impact = { + cynical = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + option = { # Medium donation. + name = great_holy_war.0040.b + trigger = { gold >= var:double_great_holy_war_pledge_amount } + add_piety = root.great_holy_war_pledge_amount + remove_short_term_gold = var:double_great_holy_war_pledge_amount + set_variable = { + name = ghw_war_chest_donated_sum + value = var:double_great_holy_war_pledge_amount + } + + scope:great_holy_war = { change_war_chest_gold = root.var:double_great_holy_war_pledge_amount } + scope:scoped_pope = { + add_opinion = { + target = root + modifier = donated_ghw_money_1 + } + } + add_character_flag = { # Used to check whether the Pope will harass for more later. + flag = ghw_pledged_gold + days = 7300 + } + stress_impact = { + cynical = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + option = { # Small donation. + name = great_holy_war.0040.c + trigger = { gold >= great_holy_war_pledge_amount } + add_piety = var:half_great_holy_war_pledge_amount + remove_short_term_gold = great_holy_war_pledge_amount + set_variable = { + name = ghw_war_chest_donated_sum + value = great_holy_war_pledge_amount + } + scope:great_holy_war = { + change_war_chest_gold = root.great_holy_war_pledge_amount + } + add_character_flag = { # Used to check whether the Pope will harass for more later. + flag = ghw_pledged_gold + days = 7300 + } + } + + option = { #Never mind... + name = great_holy_war.0040.d + } + after = { + remove_character_flag = ghw_pledging_gold + remove_variable = double_great_holy_war_pledge_amount + remove_variable = triple_great_holy_war_pledge_amount + remove_variable = half_great_holy_war_pledge_amount + remove_variable = half_of_triple_great_holy_war_pledge_amount + } +} + +#great_holy_war.0050 Crusade preparation phase starts (defender) (fired from great_holy_war.0001) +#great_holy_war.0051 Crusade is declared (attackers/defenders) (fired from cb) +#great_holy_war.0052 crusade was won (attackers/defenders/bystanders) (fired from cb) +#great_holy_war.0053 crusade was lost (attackers/defenders/bystanders) (fired from cb) +#great_holy_war.0055 crusade failed to start (attackers/defenders/bystanders) (fired from on_great_holy_war_invalidation) + +#Rulers of target faith are informed of the start of the preparation phase of the GHW against them. +great_holy_war.0050 = { + title = great_holy_war.0050.title + desc = { + desc = great_holy_war.0050.base.desc + first_valid = { + #Defender. + triggered_desc = { + desc = great_holy_war.0050.defender.desc + trigger = { + scope:target_character = root + } + } + #Everybody else. + triggered_desc = { + desc = great_holy_war.0050.others.desc + trigger = { + scope:target_character != root + } + } + } + } + left_portrait = { + character = scope:ghw_sponsor + animation = war_attacker + } + lower_right_portrait = scope:target_character + + theme = faith + override_background = { + reference = armory + } + + immediate = { + scope:ghw_sponsor = { + save_scope_as = background_temple_scope + } + play_music_cue = "mx_cue_combat_2" + } + + option = { + name = great_holy_war.0050.a + } +} + +#On_declaration of the GHW. +great_holy_war.0051 = { + title = great_holy_war.0050.title + desc = { + first_valid = { + #Catholic Flavor - Attackers + triggered_desc = { + trigger = { + scope:attacker.faith.great_holy_war = { + has_pledged_attacker = root + } + scope:the_faith = faith:catholic + } + desc = great_holy_war.0051.catholic.attackers.desc + } + #Everybody else's flavor - Attackers. + triggered_desc = { + trigger = { + scope:attacker.faith.great_holy_war = { + has_pledged_attacker = root + } + NOT = { scope:the_faith = faith:catholic } + } + desc = great_holy_war.0051.generic.attackers.desc + } + #Everybody else's flavor - Defenders. + triggered_desc = { + trigger = { + scope:attacker.faith.great_holy_war = { + has_pledged_defender = root + } + } + desc = great_holy_war.0051.generic.defenders.desc + } + } + } + + theme = faith + override_background = { reference = temple } + + left_portrait = { + character = scope:ghw_sponsor + animation = war_attacker + } + lower_right_portrait = { + character = scope:ghw_defender + animation = war_defender + } + + immediate = { + show_as_tooltip = { + scope:attacker.faith.great_holy_war = { + divide_war_chest = { fraction = 0.2 } + } + } + play_music_cue = "mx_cue_combat_3" + } + + option = { + name = great_holy_war.0011.a + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + OR = { root.faith.religion = religion:eastern_orthodox_religion root.faith.religion = religion:catholic_religion root.faith.religion = religion:protestant_religion } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.b + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + root.faith.religion = religion:islam_religion + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.c + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + NOR = { + OR = { root.faith.religion = religion:eastern_orthodox_religion root.faith.religion = religion:catholic_religion root.faith.religion = religion:protestant_religion } + root.faith.religion = religion:islam_religion + } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.d + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_defender = root } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } +} + +#On_declaration of the GHW. +great_holy_war.0071 = { + title = great_holy_war.0050.title + desc = { + first_valid = { + #Everybody else's flavor - Attackers. + triggered_desc = { + trigger = { + OR = { + faith = scope:attacker.faith + is_vassal_of = scope:attacker + } + } + desc = great_holy_war.0071.generic.attackers.desc + } + #Everybody else's flavor - Defenders. + triggered_desc = { + trigger = { + OR = { + faith = scope:defender.faith + is_vassal_of = scope:defender + } + } + desc = great_holy_war.0071.generic.defenders.desc + } + } + } + theme = faith + override_background = { + reference = armory + } + right_portrait = { + character = scope:ghw_sponsor + animation = war_attacker + } + left_portrait = { + character = scope:ghw_defender + animation = war_defender + } + + + option = { #Join directed GHW as attacker. + name = great_holy_war.0011.directed.a + trigger = { + is_ai = no + is_at_war = no + faith = scope:attacker.faith + NOR = { + this = scope:attacker + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + scope:attacker.faith.great_holy_war = { has_pledged_defender = root } + } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + scope:attacker.faith.great_holy_war = { pledge_attacker = root } + } + + option = { #Join directed GHW as defender. + name = great_holy_war.0011.directed.b + trigger = { + is_ai = no + is_at_war = no + faith = scope:defender.faith + NOR = { + this = scope:defender + scope:attacker.faith.great_holy_war = { has_pledged_defender = root } + scope:attacker.faith.great_holy_war = { has_pledged_defender = root } + } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + scope:attacker.faith.great_holy_war = { pledge_defender = root } + } + + option = { + name = great_holy_war.0011.a + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + OR = { root.faith.religion = religion:eastern_orthodox_religion root.faith.religion = religion:catholic_religion root.faith.religion = religion:protestant_religion } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.b + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + root.faith.religion = religion:islam_religion + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.c + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + NOR = { + OR = { root.faith.religion = religion:eastern_orthodox_religion root.faith.religion = religion:catholic_religion root.faith.religion = religion:protestant_religion } + root.faith.religion = religion:islam_religion + } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.d + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_defender = root } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0050.a + trigger = { + scope:attacker.faith != root.faith + } + fallback = yes + + custom_tooltip = great_holy_war.0051.generic.start.tt + } +} + +#The Crusade was successful. +great_holy_war.0052 = { + title = { + first_valid = { #Title for winners/bystanders + triggered_desc = { + trigger = { + scope:ghw_defender.faith.religion != root.faith.religion + } + desc = great_holy_war.0052.title.winners + } + } + first_valid = { #Title for losers + triggered_desc = { + trigger = { scope:ghw_defender.faith.religion = root.faith.religion } + desc = great_holy_war.0052.title.losers + } + } + } + desc = { + first_valid = { + #Everybody else's flavor - Attackers. + triggered_desc = { + trigger = { scope:attacker.faith = root.faith } + desc = great_holy_war.0052.generic.attackers.desc + } + #Everybody else's flavor - Defenders. + triggered_desc = { + trigger = { scope:ghw_defender.faith.religion = root.faith.religion } + desc = great_holy_war.0052.generic.defenders.desc + } + #Other players. + triggered_desc = { + trigger = { + NOR = { + scope:attacker.faith = root.faith + scope:ghw_defender.faith.religion = root.faith.religion + } + } + desc = great_holy_war.0052.generic.outsiders.desc + } + } + } + theme = faith + override_background = { + reference = battlefield + } + left_portrait = { + character = scope:title_recipient + animation = war_over_win + } + right_portrait = { + character = scope:ghw_defender + animation = shame + } + + immediate = { + play_music_cue = "mx_cue_general_crusade_event_3" + if = { + limit = { + has_trait = faith_warrior + save_temporary_scope_as = char_temp + scope:attacker.faith.great_holy_war = { + any_pledged_attacker = { this = scope:char_temp } + } + } + absolve_crusaders_of_gallowsbait_effect = yes + } + } + + option = { + name = great_holy_war.0052.a + trigger = { scope:attacker.faith = root.faith } + } + + option = { + name = great_holy_war.0052.b + trigger = { scope:ghw_defender.faith = root.faith } + } + + option = { + name = great_holy_war.0052.c + trigger = { + NOR = { + scope:attacker.faith = root.faith + scope:ghw_defender.faith = root.faith + } + } + } + + after = { remove_variable = ghw_war_chest_donated_sum } +} + +#The Crusade failed. +great_holy_war.0053 = { + title = great_holy_war.0053.title + desc = { + first_valid = { + #Everybody else's flavor - Attackers. + triggered_desc = { + trigger = { scope:attacker.faith = root.faith } + desc = great_holy_war.0053.generic.attackers.desc + } + #Everybody else's flavor - Defenders. + triggered_desc = { + trigger = { scope:ghw_defender.faith.religion = root.faith.religion } + desc = great_holy_war.0053.generic.defenders.desc + } + #Other players. + triggered_desc = { + trigger = { + NOR = { + scope:attacker.faith = root.faith + scope:ghw_defender.faith.religion = root.faith.religion + } + } + desc = great_holy_war.0053.generic.outsiders.desc + } + } + } + theme = faith + override_background = { + reference = battlefield + } + left_portrait = { + character = scope:ghw_sponsor + animation = shame + } + right_portrait = { + character = scope:ghw_defender + animation = war_over_win + } + + immediate = { + play_music_cue = "mx_cue_general_crusade_event_3" + } + + option = { + name = great_holy_war.0053.a + trigger = { scope:attacker.faith = root.faith } + } + + option = { + name = great_holy_war.0053.b + trigger = { scope:ghw_defender.faith.religion = root.faith.religion } + } + + option = { + name = great_holy_war.0052.c + trigger = { + NOR = { + scope:attacker.faith = root.faith + scope:ghw_defender.faith.religion = root.faith.religion + } + } + } + + after = { remove_variable = ghw_war_chest_donated_sum } +} + +#on_great_holy_war_invalidation: Crusade has been invalidated before starting. +great_holy_war.0055 = { + hidden = yes + scope = ghw + + immediate = { + save_scope_as = the_ghw + + #Loc keys for localisation fluff. + ghw_target_character = { save_scope_as = ghw_defender } + faith = { + religious_head = { save_scope_as = ghw_sponsor } + save_scope_as = the_faith + change_fervor = { + value = -10 + desc = fervor_loss_crusade_invalid + } + set_variable = { + name = variable_ghw_cooldown + value = yes + years = 30 + } + } + every_player = { + limit = { + OR = { + faith = scope:ghw_sponsor.faith + faith = scope:ghw_defender.faith + } + } + trigger_event = great_holy_war.0056 + } + } +} + +great_holy_war.0056 = { + title = great_holy_war.0056.title + desc = great_holy_war.0056.desc + theme = faith + override_background = { + reference = battlefield + } + right_portrait = { + character = scope:ghw_sponsor + animation = shame + } + left_portrait = { + character = scope:ghw_defender + animation = war_over_win + } + + + option = { + name = great_holy_war.0056.a + trigger = { scope:ghw_sponsor.faith = root.faith } + + if = { + limit = { has_variable = ghw_war_chest_donated_sum } + add_gold = var:ghw_war_chest_donated_sum + remove_variable = ghw_war_chest_donated_sum + } + } + + option = { + name = great_holy_war.0056.b + trigger = { scope:ghw_defender.faith = root.faith } + } + option = { + name = great_holy_war.0056.c + trigger = { + NOR = { + scope:ghw_sponsor.faith = root.faith + scope:ghw_defender.faith = root.faith + } + } + } +} + +#Crusader trait gained during GHW. +#Fired on_army_enter_province +#Hidden first event fires for the owner of the army. +#root = owner of the army +#scope:army = the army itself. +great_holy_war.0060 = { + hidden = yes + + trigger = { + exists = root.faith.great_holy_war + OR = { #Either army owner or one of his lieges is involved in a GHW. + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_attacker = root + } + any_liege_or_above = { + faith = root.faith + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_attacker = root + } + } + } + scope:army = { + exists = army_commander + location = { save_temporary_scope_as = current_location } + army_commander = { + NOR = { + has_trait = crusader_king + has_trait = faith_warrior + } + } + } + root.faith.great_holy_war.ghw_target_title = { #The dejure Kingdom targeted by the GHW + any_in_de_jure_hierarchy = { + tier = tier_barony + title_province = { this = scope:current_location } #Any province within it. + holder ?= { #The province's owner must also be part of the GHW on the opposite side. + OR = { + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_defender = prev + } + any_liege_or_above = { + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_defender = prev + } + } + } + } + } + } + } + + immediate = { + scope:army.location = { save_scope_as = current_location } + faith = { save_scope_as = the_faith } + faith.great_holy_war = { save_scope_as = scoped_ghw } + faith.great_holy_war.ghw_target_title = { save_scope_as = target_kingdom } + scope:army = { + army_commander = { trigger_event = great_holy_war.0057 } + army_owner = { + every_knight = { + limit = { + location = scope:current_location + } + trigger_event = great_holy_war.0057 + } + } + } + } +} + +great_holy_war.0057 = { + title = great_holy_war.0057.title + desc = { + first_valid = { + triggered_desc = { #Crusaders + trigger = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + desc = great_holy_war.0057.crusader.desc + } + triggered_desc = { #Muslims + trigger = { faith.religion = religion:islam_religion } + desc = great_holy_war.0057.mujahid.desc + } + triggered_desc = { #Everybody else + trigger = { + NOR = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + faith.religion = religion:islam_religion + } + } + desc = great_holy_war.0057.generic.outsiders.desc + } + } + } + theme = faith + override_background = { + reference = wilderness_scope + } + left_portrait = { + character = root + animation = marshal_shield + } + + trigger = { + root.faith = scope:the_faith + exists = faith.great_holy_war + NOR = { + has_trait = crusader_king + has_trait = faith_warrior + } + OR = { + is_commanding_army = yes + is_knight = yes + } + } + + immediate = { + location = { save_scope_as = background_wilderness_scope } + } + + option = { + name = great_holy_war.0057.a + add_trait = faith_warrior + hidden_effect = { #Punish player sneakery. + trigger_event = { + id = great_holy_war.0058 + days = { 15 60 } + } + } + } +} + +#Character is no longer in the Holy Land fighting infidels, not even a few weeks after getting the trait! +great_holy_war.0058 = { + title = great_holy_war.0058.title + desc = great_holy_war.0058.base.desc + theme = faith + left_portrait = { + character = root + animation = shame + } + + trigger = { + exists = faith.great_holy_war #GHW must still be ongoing. + has_trait = faith_warrior + is_commanding_army = no #Should have stayed in command. + is_knight = no + is_imprisoned = no #Don't penalise captured faith_warriors. + NOR = { + has_trait = incapable + has_trait_with_flag = debilitating_illness + } + OR = { #Character or liege must still be at war, obviously. + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_attacker = root + } + any_liege_or_above = { + faith = root.faith + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_attacker = root + } + } + } + } + + + option = { + name = great_holy_war.0058.a + if = { + limit = { is_ai = no } #Punish player more. + add_piety = major_piety_loss + } + if = { + limit = { has_trait = faith_warrior } + remove_trait = faith_warrior + } + } +} + +#on_character_faith_change: check if the character has changed Religion, in which case the Crusader trait should be cleared. +great_holy_war.0059 = { + hidden = yes + scope = character + + trigger = { + OR = { + has_trait = crusader_king + has_trait = faith_warrior + } + } + + immediate = { + if = { + limit = { + has_trait = crusader_king + } + remove_trait = crusader_king + } + else_if = { + limit = { + has_trait = faith_warrior + } + remove_trait = faith_warrior + } + } +} + +#great_holy_war.0060 Taken for hidden event. + + +#Event firing for all existing Beneficiaries on_victory to give proper modifiers to their dynasty/House. +great_holy_war.0061 = { + hidden = yes + scope = character + + trigger = { + is_alive = yes + is_landed = yes #Must have received land in the Crusade. + } + + immediate = { + save_scope_as = scoped_beneficiary + dynasty = { + add_dynasty_modifier = { + modifier = dynasty_beneficiary_won_ghw + years = 30 + } + every_dynasty_member = { + limit = { is_ai = no } + send_interface_message = { + type = event_great_holy_war_good_message + title = great_holy_war.0061.title + desc = great_holy_war.0061.notification + left_icon = scope:scoped_beneficiary.primary_title + right_icon = scope:scoped_beneficiary + } + } + } + if = { + limit = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + house = { + add_house_modifier = { + modifier = house_beneficiary_won_ghw_crusade + years = 30 + } + } + } + else_if = { + limit = { faith.religion = religion:islam_religion } + house = { + add_house_modifier = { + modifier = house_beneficiary_won_ghw_jihad + years = 30 + } + } + } + else = { + house = { + add_house_modifier = { + modifier = house_beneficiary_won_ghw + years = 30 + } + } + } + # Plus if we're gallowsbait, remove most/all of it — accounting for some weirdnesses from laamps. + if = { + limit = { + NOR = { + has_trait = crusader_king + save_temporary_scope_as = char_temp + scope:attacker.faith.great_holy_war = { + any_pledged_attacker = { this = scope:char_temp } + } + } + } + absolve_crusaders_of_gallowsbait_effect = yes + } + } +} + +great_holy_war.0070 = { + title = great_holy_war.0070.title + desc = great_holy_war.0070.base.desc + theme = faith + override_background = { + reference = throne_room_scope + } + + left_portrait = { + character = scope:title_recipient + animation = ecstasy + } + + trigger = { is_ai = no } + + immediate = { + scope:title_recipient = { + save_scope_as = background_throne_room_scope + } + } + + option = { + name = great_holy_war.0070.a + set_player_character = scope:title_recipient + } + option = { name = great_holy_war.0070.b } +} + +#0071 taken for directed GHW notification. + +#on_death: of ghw_sponsor, pick a new one immediately. +great_holy_war.0080 = { + hidden = yes + scope = character + + trigger = { + exists = faith.great_holy_war + root = faith.great_holy_war.ghw_war_declarer + } + + immediate = { + faith = { + save_scope_as = the_faith + ghw_set_new_war_declarer_effect = yes + } + } +} + +#Player redirected GHW during preparation phase. (old defenders) +great_holy_war.0081 = { + title = great_holy_war.0081.title + desc = great_holy_war.0081.desc + theme = faith + right_portrait = { + character = scope:actor + animation = scheme + } + left_portrait = scope:second_recipient + lower_left_portrait = scope:recipient + + + option = { name = great_holy_war.0081.a } +} + +#Player redirected GHW during preparation phase. (new defenders) +great_holy_war.0082 = { + title = great_holy_war.0081.title + desc = great_holy_war.0082.desc + theme = faith + right_portrait = { + character = scope:actor + animation = scheme + } + left_portrait = scope:second_recipient + lower_left_portrait = scope:recipient + + option = { name = great_holy_war.0082.a } +} + +#On_death event to reset GHW fallback recipient. +great_holy_war.0083 = { + hidden = yes + + trigger = { + exists = faith.great_holy_war + has_character_flag = flag_is_ghw_fallback_recipient + } + + immediate = { + faith.great_holy_war = { remove_variable = var_fallback_recipient } + if = { + limit = { exists = faith.great_holy_war.ghw_war_declarer.capital_province } + faith.great_holy_war.ghw_war_declarer = { save_scope_as = fallback_host } + } + else_if = { + limit = { + NOT = { exists = faith.great_holy_war.ghw_war_declarer.capital_province } + } + random_ruler = { + limit = { + is_landed = yes + faith = root.faith + highest_held_title_tier > 1 + } + save_scope_as = fallback_host + } + } + #Generate a fallback recipient. + create_character = { + location = scope:fallback_host.capital_province + template = new_commander_character + faith = root.faith + culture = root.culture + save_scope_as = fallback_recipient + gender_female_chance = { + if = { + limit = { + root.faith = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + root.faith = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { add = 50 } + } + } + scope:fallback_recipient = { + add_character_flag = flag_is_ghw_fallback_recipient + } + root.faith.great_holy_war = { + set_variable = { + name = var_fallback_recipient + value = scope:fallback_recipient + } + } + } +} + +#On_faith_conversion event to reset GHW fallback recipient. +great_holy_war.0084 = { + hidden = yes + + trigger = { + exists = scope:old_faith.great_holy_war + has_character_flag = flag_is_ghw_fallback_recipient + } + + immediate = { + scope:old_faith.great_holy_war = { remove_variable = var_fallback_recipient } + if = { + limit = { exists = scope:old_faith.great_holy_war.ghw_war_declarer.capital_province } + scope:old_faith.great_holy_war.ghw_war_declarer = { save_scope_as = fallback_host } + } + else_if = { + limit = { + NOT = { exists = scope:old_faith.great_holy_war.ghw_war_declarer.capital_province } + } + scope:old_faith = { + random_faith_ruler = { + limit = { + is_landed = yes + highest_held_title_tier > tier_barony + } + save_scope_as = fallback_host + } + } + + } + #Generate a fallback recipient. + create_character = { + location = scope:fallback_host.capital_province + template = new_commander_character + faith = scope:old_faith + culture = root.culture + save_scope_as = fallback_recipient + gender_female_chance = { + if = { + limit = { + root.faith = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + root.faith = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { add = 50 } + } + } + scope:fallback_recipient = { add_character_flag = flag_is_ghw_fallback_recipient } + scope:old_faith.great_holy_war = { + set_variable = { + name = var_fallback_recipient + value = scope:fallback_recipient + } + } + } +} + +#On_faith_conversion: clear all vassals of the old faith who may be pledged to a GHW. +great_holy_war.0085 = { + hidden = yes + + trigger = { + exists = scope:old_faith.great_holy_war + NOT = { exists = scope:old_faith.great_holy_war.ghw_war } + any_vassal = { + faith = scope:old_faith + faith.great_holy_war = { has_pledged_attacker = prev } + } + } + + immediate = { + save_scope_as = converter + every_vassal = { + limit = { + faith = scope:old_faith + faith.great_holy_war = { has_pledged_attacker = prev } + } + send_interface_toast = { + type = event_toast_effect_bad + right_icon = this + left_icon = scope:converter + title = great_holy_war.0085.toast + faith.great_holy_war = { + unpledge_attacker = prev + unpledge_ghw_war_chest_prestige_effect = yes + unpledge_ghw_war_chest_piety_effect = yes + } + } + } + } +} diff --git a/N3OW/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt b/N3OW/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt new file mode 100644 index 00000000..25fac7cd --- /dev/null +++ b/N3OW/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt @@ -0,0 +1,5518 @@ + + +namespace = court_ongoing + + +# ONGOING MANAGEMENT +# court_ongoing.0001 - Generic "player target opted out"-event + +# START EVENTS +# court_ongoing.0500 - + +# ONGOING EVENTS +# court_ongoing.1000 - Someone farted! +# court_ongoing.1010 - Defend their honor through duel or diplomacy +# court_ongoing.1020 - Fetch gift +# court_ongoing.1022 - Gift: Wolf pelt +# court_ongoing.1030 - Gift: cat or dog or eagle +# court_ongoing.1040 - Gift: necklace +# court_ongoing.1050 - Gift: flower +# court_ongoing.1100 - Compliment poem +# court_ongoing.1110 - Dealing with competition +# court_ongoing.1120 - Boring party guest +# court_ongoing.1200 - Extreme request + + + +###################### +# ONGOING MANAGEMENT # +###################### + +#Generic "player target opted out"-event +court_ongoing.0001 = { #by Linnéa Thimrén + type = character_event + title = court_ongoing.0001.t + desc = court_ongoing.0001.desc + + theme = romance_scheme + left_portrait = scope:target + + option = { + name = court_ongoing.0001.a + + scope:scheme = { end_scheme = yes } + } +} + + +################ +# START EVENTS # +################ + +#Pick a method +scripted_effect court_ongoing_0501_option_randomizer_effect = { + random_list = { + 10 = { #Song + trigger = { + NOR = { + has_character_flag = court_start_song + #Nothing shunned/criminal, as song text is public and explicitly about love + court_love_is_shunned_or_criminal_trigger = yes + } + } + modifier = { + add = { + value = diplomacy + multiply = 10 + } + } + add_character_flag = court_start_song + } + 10 = { #Sneaky love letter + trigger = { NOT = { has_character_flag = court_start_sneaky_love_letter } } + modifier = { + add = { + value = intrigue + multiply = 10 + } + } + add_character_flag = court_start_sneaky_love_letter + } + 10 = { #Poem love letter + trigger = { NOT = { has_character_flag = court_start_poem_love_letter } } + modifier = { + add = { + value = learning + multiply = 10 + } + } + add_character_flag = court_start_poem_love_letter + } + 10 = { #Sparring + trigger = { + NOT = { has_character_flag = court_start_sparring } + can_be_warrior_trigger = { ARMY_OWNER = root } + } + modifier = { + add = { + value = prowess + multiply = 10 + } + } + add_character_flag = court_start_sparring + } + } +} + +court_ongoing.0501 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.0501.t + desc = court_ongoing.0501.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:target + animation = personality_compassionate + camera = camera_event_right_forward + } + + cooldown = { years = 1 } + + trigger = { + OR = { + scope:owner = { is_ai = no } + scope:target = { is_ai = no } + } + } + + immediate = { + #Randomize options + court_ongoing_0501_option_randomizer_effect = yes + court_ongoing_0501_option_randomizer_effect = yes + court_ongoing_0501_option_randomizer_effect = yes + } + + #Song + option = { + trigger = { has_character_flag = court_start_song } + name = court_ongoing.0501.a + custom_tooltip = court_ongoing.0501.tt + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_song + } + + ai_chance = { + base = 1 + modifier = { + add = { value = diplomacy } + } + } + } + + #sneaky love letter + option = { + trigger = { has_character_flag = court_start_sneaky_love_letter } + name = court_ongoing.0501.b + custom_tooltip = court_ongoing.0501.tt + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_sneaky_love_letter + } + + ai_chance = { + base = 1 + modifier = { + add = { value = intrigue } + } + } + } + + #poem love letter + option = { + trigger = { has_character_flag = court_start_poem_love_letter } + name = court_ongoing.0501.c + custom_tooltip = court_ongoing.0501.tt + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_poem_love_letter + } + ai_chance = { + base = 1 + modifier = { + add = { value = learning } + } + } + } + + #drill + option = { + trigger = { has_character_flag = court_start_sparring } + name = court_ongoing.0501.d + custom_tooltip = court_ongoing.0501.tt + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_sparring + } + ai_chance = { + base = 1 + modifier = { + add = { value = prowess } + } + } + } + + #go with the flow + option = { + name = court_ongoing.0501.x + custom_tooltip = court_ongoing.0501.tt + + hidden_effect = { + random_list = { + 1 = { + trigger = { #Nothing shunned/criminal, as song text is public and explicitly about love + court_love_is_shunned_or_criminal_trigger = no + } + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_song + } + } + 1 = { + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_sneaky_love_letter + } + } + 1 = { + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_poem_love_letter + } + } + 1 = { + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_sparring + } + } + } + } + } + + after = { + remove_character_flag = court_start_song + remove_character_flag = court_start_sneaky_love_letter + remove_character_flag = court_start_poem_love_letter + remove_character_flag = court_start_sparring + if = { + limit = { + exists = scope:starting_event_flavor + scope:starting_event_flavor = flag:court_start_poem_love_letter + } + scope:target = { trigger_event = court_ongoing.0512 } + } + else = { + scope:target = { trigger_event = court_ongoing.0502 } + } + } +} + + + +#Start narrative event for target (for everything but love poem) +court_ongoing.0502 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.0502.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_song } + desc = { + desc = court_ongoing.court_start_song.start.0502.desc + first_valid = { + triggered_desc = { + trigger = { scope:owner.diplomacy < mediocre_skill_rating } + desc = court_ongoing.court_start_song.bad.0502.desc + } + desc = court_ongoing.court_start_song.good.0502.desc + } + } + } + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_sneaky_love_letter } + desc = { + desc = court_ongoing.court_start_sneaky_love_letter.start.0502.desc + first_valid = { + triggered_desc = { + trigger = { is_close_or_extended_family_of = scope:owner } + desc = court_ongoing.court_start_sneaky_love_letter.relative.0502.desc + } + desc = court_ongoing.court_start_sneaky_love_letter.compliment.0502.desc + } + desc = court_ongoing.court_start_sneaky_love_letter.end.0502.desc + } + } + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_sparring } + desc = { + desc = court_ongoing.court_start_sparring.start.0502.desc + first_valid = { + triggered_desc = { + trigger = { scope:owner.prowess < mediocre_skill_rating } + desc = court_ongoing.court_start_sparring.bad.0502.desc + } + triggered_desc = { + trigger = { scope:owner.prowess < high_skill_rating } + desc = court_ongoing.court_start_sparring.good.0502.desc + } + desc = court_ongoing.court_start_sparring.great.0502.desc + } + desc = court_ongoing.court_start_sparring.end.0502.desc + } + } + } + } + + theme = romance_scheme + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_sparring } + reference = courtyard + } + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_sneaky_love_letter } + reference = sitting_room + } + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_song } + reference = garden + } + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { + OR = { + scope:starting_event_flavor = flag:court_start_song + scope:starting_event_flavor = flag:court_start_sparring + } + } + animation = flirtation + } + triggered_animation = { + trigger = { always = yes } + animation = idle + } + } + + trigger = { + exists = scope:scheme + scope:scheme = { + scheme_type = courting + } + } + + immediate = { + #Stuff for the desc + if = { + limit = { scope:starting_event_flavor = flag:court_start_sparring } + scope:owner = { set_signature_weapon_effect = yes } + } + } + + #How delightful! Yes please + option = { + name = court_ongoing.0502.a + custom_tooltip = court_ongoing.0502.a.tt + + # If you already have a soulmate, they get very mad + every_relation = { + type = soulmate + limit = { soulmate_relation_is_exclusive_trigger = yes } + add_opinion = { + modifier = betrayed_our_promise + target = root + } + } + + ai_chance = { + base = 100 + + incest_acceptance_modifier = { #Factor between 1 and 0 + SEDUCER = scope:owner + TARGET = scope:target + } + modifier = { + num_of_relation_soulmate = 1 + factor = { + value = 0 + add = { + value = ai_honor + multiply = -0.005 # 0.5 at -100 + } + add = { + value = ai_compassion + multiply = -0.005 # 0.5 at -100 + } + if = { + limit = { + has_trait = lustful + } + add = 0.2 + } + min = 0 + max = 1 + } + } + + modifier = { + has_relation_lover = scope:owner + add = 1000 + } + } + } + + #Ew, no! + option = { + name = { + trigger = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + text = court_ongoing.0502.b.incest + } + name = { + trigger = { NOT = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } } + text = court_ongoing.0502.b + } + + save_scope_value_as = { + name = hard_court_reject + value = yes + } + + show_as_tooltip = { + scope:scheme = { end_scheme = yes } + } + + ai_chance = { + base = 0 + + modifier = { + is_close_or_extended_family_of = scope:owner + add = 50 + } + modifier = { + relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } + add = 200 + } + modifier = { + relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } + add = 200 + } + modifier = { + has_relation_rival = scope:owner + add = 200 + } + modifier = { + has_relation_lover = scope:owner + factor = 0.01 + } + } + } + + after = { + scope:owner = { trigger_event = court_ongoing.0503 } + } +} + + +#Start narrative event for target (love poem) +court_ongoing.0512 = { + type = letter_event + opening = court_ongoing.1101.t + desc = court_ongoing.court_start_poem_love_letter.0502.desc + sender = { + character = scope:owner + animation = flirtation + } + + immediate = { + scope:owner = { love_letter_calculation_effect = yes } + } + + + #How delightful! Yes please + option = { + name = court_ongoing.0502.a + custom_tooltip = court_ongoing.0502.a.tt + + ai_chance = { + base = 100 + + incest_acceptance_modifier = { #Factor between 1 and 0 + SEDUCER = scope:owner + TARGET = scope:target + } + modifier = { + num_of_relation_soulmate = 1 + factor = { + value = 0 + add = { + value = ai_honor + multiply = -0.005 # 0.5 at -100 + } + add = { + value = ai_compassion + multiply = -0.005 # 0.5 at -100 + } + if = { + limit = { + has_trait = lustful + } + add = 0.2 + } + min = 0 + max = 1 + } + } + + modifier = { + has_relation_lover = scope:owner + add = 1000 + } + } + } + + #Ew, no! + option = { + name = { + trigger = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + text = court_ongoing.0502.b.incest + } + name = { + trigger = { NOT = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } } + text = court_ongoing.0502.b + } + + save_scope_value_as = { + name = hard_court_reject + value = yes + } + + show_as_tooltip = { + scope:scheme = { end_scheme = yes } + } + + ai_chance = { + base = 0 + + modifier = { + relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } + add = { + if = { + limit = { sexually_liberal_trigger = yes } + value = 200 + } + else = { + value = 500 + } + } + } + modifier = { + relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } + add = 200 + } + modifier = { + has_relation_rival = scope:owner + add = 200 + } + modifier = { + has_relation_lover = scope:owner + factor = 0.01 + } + } + } + + after = { + scope:owner = { trigger_event = court_ongoing.0503 } + } +} + +#Start narrative event for owner +court_ongoing.0503 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.0501.t + desc = { + first_valid = { + #SONG + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_song } + desc = { + desc = court_ongoing.court_start_song.intro.0503.desc + first_valid = { + triggered_desc = { + trigger = { #Sodomy reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.public_sodomy_rejection.0503.desc + } + triggered_desc = { + trigger = { #Incest reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.public_incest_rejection.0503.desc + } + triggered_desc = { + trigger = { #Regular reject + exists = scope:hard_court_reject + } + desc = court_ongoing.public_regular_rejection.0503.desc + } + desc = court_ongoing.court_start_song.success.0503.desc + } + } + } + #SNEAKY LOVE LETTER + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_sneaky_love_letter } + desc = { + desc = court_ongoing.court_start_sneaky_love_letter.intro.0503.desc + first_valid = { + triggered_desc = { + trigger = { #Sodomy reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.written_sodomy_rejection.0503.desc + } + triggered_desc = { + trigger = { #Incest reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.written_incest_rejection.0503.desc + } + triggered_desc = { + trigger = { #Regular reject + exists = scope:hard_court_reject + } + desc = court_ongoing.written_regular_rejection.0503.desc + } + desc = court_ongoing.court_start_sneaky_love_letter.success.0503.desc + } + } + } + #LOVE POEM + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_poem_love_letter } + desc = { + desc = court_ongoing.court_start_poem_love_letter.intro.0503.desc + first_valid = { + triggered_desc = { + trigger = { #Sodomy reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.written_sodomy_rejection.0503.desc + } + triggered_desc = { + trigger = { #Incest reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.written_incest_rejection.0503.desc + } + triggered_desc = { + trigger = { #Regular reject + exists = scope:hard_court_reject + } + desc = court_ongoing.written_regular_rejection.0503.desc + } + desc = court_ongoing.court_start_sneaky_love_letter.success.0503.desc + } + } + } + #DRILL + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_sparring } + desc = { + first_valid = { + triggered_desc = { + trigger = { location = scope:target.location } + desc = court_ongoing.court_start_sparring.same_locaton_intro.0503.desc + } + desc = court_ongoing.court_start_sparring.other_locaton_intro.0503.desc + } + first_valid = { + triggered_desc = { + trigger = { #Sodomy reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.public_sodomy_rejection.0503.desc + } + triggered_desc = { + trigger = { #Incest reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.public_incest_rejection.0503.desc + } + triggered_desc = { + trigger = { #Regular reject + exists = scope:hard_court_reject + } + desc = court_ongoing.public_regular_rejection.0503.desc + } + desc = court_ongoing.court_start_sparring.success.0503.desc + } + } + } + } + } + + theme = romance_scheme + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_sparring } + reference = courtyard + } + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_sneaky_love_letter } + reference = sitting_room + } + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_song } + reference = garden + } + left_portrait = { + character = root + animation = storyteller + } + right_portrait = { + character = scope:target + animation = admiration + } + + immediate = { + scope:target.location = { save_scope_as = target_location } + #Stuff for the desc + if = { + limit = { scope:starting_event_flavor = flag:court_start_sparring } + random_dummy_gender_soldier_effect = { SCOPE_NAME = sparring_soldier } + } + } + + option = { + trigger = { NOT = { exists = scope:hard_court_reject } } + name = court_ongoing.0503.a + custom_tooltip = court_ongoing.0503.a.tt + + } + + option = { + trigger = { exists = scope:hard_court_reject } + name = court_ongoing.0503.b + + end_court_scheme_effect = { OUTCOME = failure_hard REASON = saved_from_wolf } + } + + after = { + if = { + limit = { + scope:starting_event_flavor = flag:court_start_poem_love_letter + } + remove_variable = love_letter_quality + } + } +} + + +################## +# ONGOING EVENTS # +################## + +#################################### +###SAVE TARGET FROM FART SHAME <3### +#################################### +#court_ongoing.1000 = { #by Mathilda Bjarnehed +# type = character_event +# title = court_ongoing.1000.t +# desc = court_ongoing.1000.desc +# +# theme = romance_scheme +# left_portrait = scope:target +# right_portrait = scope:scapegoat +# widget = { +# gui = "event_window_widget_scheme" +# container = "custom_widgets_container" +# } +# +# trigger = { +# exists = scope:target.court_owner +# # Account for landless court owners. +# scope:target.court_owner = { is_landed = yes } +# NOT = { +# scope:scheme = { +# has_scheme_modifier = courting_kindness_modifier +# } +# } +# } +# +# weight_multiplier = { +# base = 1 +# modifier = { +# exists = scope:scheme.var:court_milestone_event +# add = { #0 at milestone 1, -0.45 at milestone 2, -0.9 at milestone 3 +# value = scope:scheme.var:court_milestone_event +# multiply = -0.45 +# add = 0.45 +# } +# } +# } +# +# immediate = { +# #Savin' some scopes +# scope:target = { +# if = { +# limit = { is_ruler = no } +# court_owner = { save_scope_as = scapegoat } +# } +# else_if = { +# limit = { exists = primary_spouse } +# primary_spouse = { save_scope_as = scapegoat } +# } +# +# court_owner.capital_province = { save_scope_as = location } +# } +# } +# +# #It was me! +# option = { +# name = court_ongoing.1000.a +# +# add_prestige = medium_prestige_loss +# +# random_list = { +# 67 = { +# desc = court_ongoing.1000.a.success +# send_interface_toast = { +# left_icon = scope:target +# title = court_ongoing.1000.a.success +# reverse_add_opinion = { +# target = scope:target +# modifier = grateful_opinion +# opinion = 15 +# } +# scope:scheme = { +# add_scheme_modifier = { +# type = courting_kindness_modifier +# } +# } +# } +# } +# 33 = { +# desc = court_ongoing.1000.a.failure +# send_interface_toast = { +# left_icon = scope:target +# title = court_ongoing.1000.a.failure +# reverse_add_opinion = { +# target = scope:target +# modifier = disgusted_opinion +# opinion = -10 +# } +# } +# } +# } +# +# stress_impact = { +# craven = minor_stress_impact_gain +# gregarious = minor_stress_impact_gain +# arrogant = minor_stress_impact_gain +# shy = minor_stress_impact_gain +# } +# } +# +# #It was this other dude! +# option = { +# trigger = { +# exists = scope:scapegoat +# this != scope:scapegoat +# } +# name = court_ongoing.1000.b +# +# reverse_add_opinion = { +# target = scope:target +# modifier = amused_opinion +# opinion = 15 +# } +# reverse_add_opinion = { +# target = scope:scapegoat +# modifier = insulted_opinion +# opinion = -15 +# } +# +# stress_impact = { +# compassionate = minor_stress_impact_gain +# honest = minor_stress_impact_gain +# } +# } +# +# #Don't do anything +# option = { +# name = court_ongoing.1000.c +# +# stress_impact = { +# brave = minor_stress_impact_gain +# compassionate = minor_stress_impact_gain +# deceitful = minor_stress_impact_gain +# } +# } +#} + + +###DEFEND THEIR HONOR### +scripted_trigger court_ongoing_1010_insulter_trigger = { + save_temporary_scope_as = potential_insulter + basic_is_available_ai = yes + is_adult = yes + exists = liege + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:potential_insulter.liege } + this != scope:target + OR = { + opinion = { + target = scope:target + value <= neutral_opinion + } + AND = { + opinion = { + target = scope:target + value <= low_positive_opinion + } + number_of_opposing_traits = { + target = scope:target + value >= 1 + } + } + } +} + +court_ongoing.1010 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1010.t + desc = court_ongoing.1010.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:insulter + animation = manic + } + lower_right_portrait = scope:target + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + cooldown = { years = 1 } + + trigger = { + NOR = { + has_trait_rank = { + trait = wounded + rank >= 2 + } + scope:scheme = { + has_scheme_modifier = courting_act_of_heroism_modifier + } + } + scope:target = { + OR = { + AND = { + court_owner ?= { + OR = { + any_courtier = { court_ongoing_1010_insulter_trigger = yes } + any_vassal = { court_ongoing_1010_insulter_trigger = yes } + } + } + } + any_relation = { type = rival court_ongoing_1010_insulter_trigger = yes } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + scope:scheme.var:court_milestone_event = 1 + add = -0.75 + } + } + + immediate = { + scope:target = { + if = { + limit = { root = { is_ai = no } } + assign_quirk_effect = yes + } + court_owner = { + every_vassal = { + limit = { court_ongoing_1010_insulter_trigger = yes } + add_to_list = insulter_list + } + every_courtier = { + limit = { court_ongoing_1010_insulter_trigger = yes } + add_to_list = insulter_list + } + } + every_relation = { type = rival + limit = { court_ongoing_1010_insulter_trigger = yes } + add_to_list = insulter_list + } + + random_in_list = { + list = insulter_list + weight = { + base = 1 + modifier = { + is_ruler = yes + add = 10 + } + ai_value_modifier = { + ai_compassion = { #20 for high negative compassion, -20 for high positive compassion + value = high_negative_ai_value_inverse + multiply = 20 + } + } + opinion_modifier = { + opinion_target = scope:target + multiplier = -0.3 + } + } + save_scope_as = insulter + } + } + } + + + #Duel them! + option = { + name = court_ongoing.1010.a + + reverse_add_opinion = { + target = scope:insulter + modifier = angry_opinion + opinion = -20 + } + + duel = { + skill = prowess + target = scope:insulter + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.1 + } + desc = court_ongoing.1010.a.success + show_as_tooltip = { court_ongoing_1010_good_duel_outcome_effect = yes } + trigger_event = { + days = 1 + id = court_ongoing.1011 + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.1 + } + desc = court_ongoing.1010.a.failure + send_interface_toast = { + title = court_ongoing.1010.a.failure + left_icon = scope:insulter + right_icon = scope:target + + add_prestige = medium_prestige_loss + increase_wounds_no_death_effect = { REASON = duel } + reverse_add_opinion = { + target = scope:target + modifier = pity_opinion + opinion = 15 + } + } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + lazy = minor_stress_impact_gain + calm = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + + ai_boldness_target_modifier = { VALUE = 40 } + ai_energy_target_modifier = { VALUE = 20 } + ai_vengefulness_target_modifier = { VALUE = 20 } + } + } + + #Convince them to apologize + option = { + name = court_ongoing.1010.b + + duel = { + skill = diplomacy + target = scope:insulter + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.1 + } + desc = court_ongoing.1010.b.success + send_interface_toast = { + title = court_ongoing.1010.b.success + left_icon = scope:insulter + right_icon = scope:target + + reverse_add_opinion = { + target = scope:target + modifier = grateful_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:insulter + modifier = respect_opinion + opinion = 15 + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.1 + } + desc = court_ongoing.1010.b.failure + send_interface_toast = { + title = court_ongoing.1010.b.failure + left_icon = scope:insulter + right_icon = scope:target + + reverse_add_opinion = { + target = scope:insulter + modifier = refusal_opinion + opinion = -15 + } + } + } + } + + stress_impact = { + wrathful = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + ai_compassion_target_modifier = { VALUE = 30 } + ai_vengefulness_target_modifier = { VALUE = -30 } + ai_boldness_target_modifier = { VALUE = -30 } + } + } + + #Say a kind word + option = { + name = court_ongoing.1010.c + + reverse_add_opinion = { + target = scope:target + modifier = kindness_opinion + opinion = 15 + } + + stress_impact = { + wrathful = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + + ai_compassion_target_modifier = { VALUE = 50 } + ai_vengefulness_target_modifier = { VALUE = -30 } + ai_boldness_target_modifier = { VALUE = -50 } + } + } +} + +#You won the duel! Go you! +court_ongoing.1011 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1010.t + desc = court_ongoing.1011.desc + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = personality_honorable + } + right_portrait = { + character = scope:target + animation = flirtation_left + } + lower_right_portrait = scope:insulter + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + option = { + name = court_ongoing.1011.a + court_ongoing_1010_good_duel_outcome_effect = yes + } +} + + + +###FETCH GIFT### +scripted_trigger court_ongoing_1020_necklace_owner_trigger = { + sex_same_as = scope:target + basic_is_available_ai = yes + NOR = { + is_spouse_of = scope:target + this = scope:target + this = scope:owner + } +} + +scripted_effect court_ongoing_1020_save_necklace_owner_effect = { + scope:target = { + if = { + limit = { exists = liege } + liege = { + every_spouse = { + limit = { court_ongoing_1020_necklace_owner_trigger = yes } + add_to_temporary_list = necklace_owner_list + } + every_powerful_vassal = { + if = { + limit = { court_ongoing_1020_necklace_owner_trigger = yes } + add_to_temporary_list = necklace_owner_list + } + every_spouse = { + limit = { court_ongoing_1020_necklace_owner_trigger = yes } + add_to_temporary_list = necklace_owner_list + } + } + } + random_in_list = { + list = necklace_owner_list + save_scope_as = necklace_owner + } + } + } +} + +scripted_trigger court_ongoing_1020_necklace_option_trigger = { + exists = scope:target.liege + scope:target.liege = { + OR = { + any_spouse = { + court_ongoing_1020_necklace_owner_trigger = yes + } + any_powerful_vassal = { + OR = { + court_ongoing_1020_necklace_owner_trigger = yes + any_spouse = { court_ongoing_1020_necklace_owner_trigger = yes } + } + } + } + } +} + +court_ongoing.1020 = { + hidden = yes + + trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_gift_modifier + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + scope:scheme.var:court_milestone_event >= 3 + add = -0.75 + } + } + + immediate = { + #Lets a player target chose gift or randomizes one for ai targets + if = { + limit = { scope:target = { is_ai = no } } + scope:target = { trigger_event = court_ongoing.1021 } + } + else = { + random_list = { + #Wolf pelt + 2 = { + trigger = { + scope:target = { NOT = { has_character_flag = court_ongoing_wolf_pelt_flag } } + #Target will not request a pregnant woman to go hunting unless they allow women to be combatants + OR = { + NOT = { has_trait = pregnant } + AND = { + has_trait = pregnant + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:target } + } + } + } + trigger_event = court_ongoing.1022 + scope:target = { add_character_flag = court_ongoing_wolf_pelt_flag } + } + #Cat or dog or eagle + 1 = { + trigger = { + scope:target = { + NOR = { + has_character_modifier = cat_story_modifier + has_character_modifier = dog_story_modifier + AND = { + has_character_modifier = eagle_story_modifier + location = { geographical_region = world_steppe } + } + } + } + } + trigger_event = court_ongoing.1030 + } + #Necklace + 3 = { #Higher to compensate for trigger + trigger = { + court_ongoing_1020_necklace_option_trigger = yes + scope:target = { NOT = { has_character_flag = court_ongoing_necklace_flag } } + } + trigger_event = court_ongoing.1040 + scope:target = { add_character_flag = court_ongoing_necklace_flag } + } + #Orchid + 2 = { + trigger = { scope:target = { NOT = { has_character_flag = court_ongoing_orchid_flag } } } + trigger_event = court_ongoing.1050 + scope:target = { add_character_flag = court_ongoing_orchid_flag } + } + } + } + } +} + + + +#Player target picks gift +scripted_effect court_ongoing_1021_save_gift_option_effect = { + random_list = { + 10 = { #Wolf pelt + trigger = { + NOR = { + has_character_flag = court_ongoing_wolf_pelt_flag + exists = scope:court_ongoing_1021_wolf_pelt_option + } + #Cannot request a pregnant woman to go hunting unless the target's faith allow women to be combatants + OR = { + scope:owner = { NOT = { has_trait = pregnant } } + + scope:owner = { + AND = { + has_trait = pregnant + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:target } + } + } + } + } + save_scope_value_as = { + name = court_ongoing_1021_wolf_pelt_option + value = yes + } + } + 2 = { #Cat/dog/eagle + trigger = { + NOR = { + any_owned_story = { + type = story_cycle_pet_cat + } + any_owned_story = { + type = story_cycle_pet_dog + } + AND = { + any_owned_story = { + story_type = story_cycle_pet_eagle + } + location = { geographical_region = world_steppe } + } + exists = scope:court_ongoing_1021_cat_dog_option + } + } + save_scope_value_as = { + name = court_ongoing_1021_cat_dog_option + value = yes + } + } + 10 = { #Necklace + trigger = { + NOR = { + has_character_flag = court_ongoing_necklace_flag + exists = scope:court_ongoing_1021_necklace_gift_option + } + court_ongoing_1020_necklace_option_trigger = yes + } + save_scope_value_as = { + name = court_ongoing_1021_necklace_gift_option + value = yes + } + court_ongoing_1020_save_necklace_owner_effect = yes + } + 10 = { #Orchid + trigger = { + NOR = { + has_character_flag = court_ongoing_orchid_flag + exists = scope:court_ongoing_1021_orchid_option + } + } + save_scope_value_as = { + name = court_ongoing_1021_orchid_option + value = yes + } + } + } +} + +court_ongoing.1021 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1021.t + desc = court_ongoing.1021.desc + theme = romance_scheme + left_portrait = { + character = scope:target + animation = flirtation_left + } + right_portrait = { + character = scope:owner + animation = beg + } + cooldown = { years = 1 } + + immediate = { + #What gift can you ask for (set 3 options) + court_ongoing_1021_save_gift_option_effect = yes + court_ongoing_1021_save_gift_option_effect = yes + court_ongoing_1021_save_gift_option_effect = yes + } + + #Wolf pelt + option = { + name = court_ongoing.1021.a + trigger = { exists = scope:court_ongoing_1021_wolf_pelt_option } + + show_as_tooltip = { + random_list = { + 1 = { + show_chance = no + desc = court_ongoing.1021.wolf_pelt.success + court_ongoing_fetch_gift_modifier_effect = { GIFT = wolf_pelt } + } + 1 = { + show_chance = no + desc = court_ongoing.1021.wolf_pelt.failure + } + } + } + + hidden_effect = { + scope:owner = { trigger_event = court_ongoing.1022 } + } + } + + #Cat/dog/eagle + option = { + trigger = { exists = scope:court_ongoing_1021_cat_dog_option } + name = court_ongoing.1021.b + + show_as_tooltip = { + random_list = { + 1 = { + show_chance = no + desc = court_ongoing.1021.cat_pet.success + show_as_tooltip = { court_ongoing_1030_cat_modifier_effect = yes } + } + 1 = { + show_chance = no + desc = court_ongoing.1021.dog_pet.success + show_as_tooltip = { court_ongoing_1030_dog_modifier_effect = yes } + } + 1 = { + show_chance = no + trigger = { + location = { geographical_region = world_steppe } + } + desc = court_ongoing.1021.eagle_pet.success + show_as_tooltip = { court_ongoing_1030_eagle_modifier_effect = yes } + } + 1 = { + show_chance = no + desc = court_ongoing.1021.pet.failure + } + } + } + + hidden_effect = { + scope:owner = { trigger_event = court_ongoing.1030 } + } + } + + #Necklace + option = { + trigger = { exists = scope:court_ongoing_1021_necklace_gift_option } + name = court_ongoing.1021.c + show_as_tooltip = { + random_list = { + 1 = { + show_chance = no + desc = court_ongoing.1021.necklace.success + + court_ongoing_fetch_gift_modifier_effect = { GIFT = necklace } + } + 1 = { + show_chance = no + desc = court_ongoing.1021.necklace.failure + } + } + } + hidden_effect = { + scope:owner = { trigger_event = court_ongoing.1040 } + } + } + + #Orchid + option = { + trigger = { exists = scope:court_ongoing_1021_orchid_option } + name = court_ongoing.1021.d + show_as_tooltip = { + random_list = { + 1 = { + show_chance = no + desc = court_ongoing.1021.orchid.success + + court_ongoing_fetch_gift_modifier_effect = { GIFT = orchid } + } + 1 = { + show_chance = no + desc = court_ongoing.1021.orchid.failure + } + } + } + hidden_effect = { + scope:owner = { trigger_event = court_ongoing.1050 } + } + } + + #Stop pestering me! + option = { + name = court_ongoing.1021.x + + show_as_tooltip = { scope:scheme = { end_scheme = yes } } + scope:owner = { trigger_event = court_ongoing.0001 } + } +} + +###GIFT: WOLF PELT### +court_ongoing.1022 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1022.t + desc = { + desc = court_ongoing.1022.start.desc + desc = court_ongoing.1022.end.desc + } + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = personality_callous + } + lower_left_portrait = { + trigger = { + exists = scope:master_of_hunt + } + character = scope:master_of_hunt + } + + trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_gift_modifier + } + } + } + + immediate = { + #Save Master of the Hunt + if = { + limit = { + employs_court_position = master_of_hunt_court_position + any_court_position_holder = { + type = master_of_hunt_court_position + is_physically_able = yes + } + } + random_court_position_holder = { + type = master_of_hunt_court_position + limit = { is_physically_able = yes } + save_scope_as = master_of_hunt + } + } + + } + + #Hunt down a wolf + option = { + name = court_ongoing.1022.a + + duel = { + skill = prowess + value = medium_skill_rating + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.1 + } + modifier = { + has_trait = lifestyle_hunter + add = 2 + } + desc = court_ongoing.1022.a.success + send_interface_toast = { + title = court_ongoing.1022.a.success + left_icon = scope:target + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = success } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.1 + } + desc = court_ongoing.1022.a.failure + send_interface_toast = { + title = court_ongoing.1022.a.failure + left_icon = scope:target + + add_prestige = minor_prestige_loss + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = failure } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + ai_honor_target_modifier = { VALUE = 40 } + ai_boldness_target_modifier = { VALUE = 40 } + ai_energy_target_modifier = { VALUE = 20 } + ai_vengefulness_target_modifier = { VALUE = 20 } + } + } + + #Kill a dog in the kennels + option = { + trigger = { + OR = { + intrigue >= decent_skill_rating + has_trait = deceitful + } + } + skill = intrigue + trait = deceitful + name = court_ongoing.1022.b + + duel = { + skill = intrigue + target = scope:target + 30 = { #You trick them + compare_modifier = { + value = scope:duel_value + multiplier = 0.1 + } + desc = court_ongoing.1022.b.success + send_interface_toast = { + title = court_ongoing.1022.b.success + left_icon = scope:target + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = success } + } + 20 = { #They know what you did + compare_modifier = { + value = scope:duel_value + multiplier = -0.1 + } + desc = court_ongoing.1022.b.failure + + show_as_tooltip = { + reverse_add_opinion = { + modifier = suspicion_opinion + target = scope:target + opinion = -10 + } + } + + hidden_effect = { + random_list = { + 85 = { + send_interface_toast = { + title = court_ongoing.1022.b.failure + left_icon = scope:target + + reverse_add_opinion = { + modifier = suspicion_opinion + target = scope:target + opinion = -10 + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = failure } + } + 15 = { + modifier = { + scope:target = { ai_compassion >= 0 } + add = { + value = scope:target.ai_compassion + multiply = 2 + } + } + scope:target = { + trigger_event = { + id = court_ongoing.1023 + days = 3 + } + } + } + } + } + + } + } + + stress_impact = { + honest = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + ai_honor_target_modifier = { VALUE = -100 } + ai_energy_target_modifier = { VALUE = -20 } + ai_compassion_target_modifier = { VALUE = -50 } + } + } + + + #Buy a pelt + option = { + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + NOT = { exists = scope:master_of_hunt } + } + name = court_ongoing.1022.c + + remove_short_term_gold = minor_gold_value + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + + stress_impact = { + honest = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = success } + + ai_chance = { + base = 100 + + ai_greed_target_modifier = { VALUE = -80 } + ai_energy_target_modifier = { VALUE = -20 } + ai_honor_target_modifier = { VALUE = -20 } + } + } + + #Buy a pelt; Master of the Hunt version + option = { + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + exists = scope:master_of_hunt + } + name = court_ongoing.1022.c.master_of_hunt + + scope:master_of_hunt = { + duel = { + skill = martial + value = average_skill_rating + 30 = { + desc = court_ongoing.1022.c.master_of_hunt.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + root = { + send_interface_toast = { + title = court_ongoing.1022.c.master_of_hunt.success + left_icon = scope:target + right_icon = scope:master_of_hunt + + custom_tooltip = court_ongoing.1022.c.master_of_hunt.success.tt + } + } + } + 20 = { + desc = court_ongoing.1022.c.master_of_hunt.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + root = { + send_interface_toast = { + title = court_ongoing.1022.c.master_of_hunt.failure + left_icon = scope:target + right_icon = scope:master_of_hunt + + remove_short_term_gold = minor_gold_value + } + } + } + } + } + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + + stress_impact = { + honest = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = success } + + ai_chance = { + base = 100 + + ai_greed_target_modifier = { VALUE = -80 } + ai_energy_target_modifier = { VALUE = -20 } + ai_honor_target_modifier = { VALUE = -20 } + } + } + + #Asking too much + option = { + name = court_ongoing.1022.d + + stress_impact = { + brave = minor_stress_impact_gain + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = failure } + + ai_chance = { + base = 50 + } + } +} + +#Owner killed target's favorite dog (target perspective) +court_ongoing.1023 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1021.t + desc = court_ongoing.1023.desc + + theme = romance_scheme + override_background = { reference = ep2_dog_kennels } + left_portrait = { + character = scope:target + animation = shock + } + right_portrait = { + character = scope:owner + animation = happiness + } + + immediate = { + random_dummy_gender_effect = yes + scope:dummy_gender = { save_scope_as = dog_gender } + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + } + + #Forgive + option = { + name = court_ongoing.1023.a + } + + #End scheme + option = { + trigger = { is_ai = no } + name = court_ongoing.1023.b + + show_as_tooltip = { + scope:scheme = { end_scheme = yes } + } + save_temporary_scope_as = scheme_ended + } + + after = { + scope:owner = { trigger_event = court_ongoing.1024 } + } +} + +#Owner killed target's favorite dog (owner perspective) +court_ongoing.1024 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1022.t + desc = court_ongoing.1024.desc + + theme = romance_scheme + left_portrait = { + character = scope:target + animation = grief + } + right_portrait = { + character = scope:owner + animation = shame + } + + + #Forgive + option = { + name = court_ongoing.1024.a + + if = { + limit = { exists = scope:scheme_ended } + scope:scheme = { end_scheme = yes } + } + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:target + opinion = -25 + } + } +} + +###GIFT: PET### +scripted_trigger court_ongoing_1030_cat_lover = { + OR = { + ai_compassion >= high_positive_ai_value + ai_rationality >= high_positive_ai_value + ai_zeal <= high_negative_ai_value + has_trait = intellect_good + has_trait = shrewd + has_trait_introverted_trigger = yes + has_trait_submissive_trigger = yes + } +} + +scripted_trigger court_ongoing_1030_dog_lover = { + OR = { + ai_compassion >= high_positive_ai_value + ai_energy >= high_positive_ai_value + ai_boldness >= high_positive_ai_value + ai_honor >= high_positive_ai_value + has_trait = intellect_bad + has_trait = dull + has_trait_extroverted_trigger = yes + has_trait_dominant_trigger = yes + } +} + + +court_ongoing.1030 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1030.t + desc = { + desc = court_ongoing.1030.desc + triggered_desc = { + trigger = { + location = { + geographical_region = world_steppe + } + } + desc = court_ongoing.1030.desc.eagle + } + } + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = personality_callous + } + cooldown = { years = 1 } + + trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_gift_modifier + } + } + } + + immediate = { + scope:target.location = { save_scope_as = location } + } + + #Cat + option = { + name = court_ongoing.1030.a + + show_as_tooltip = { + random_list = { + 1 = { + desc = court_ongoing.1030.a.success + show_chance = no + + show_as_tooltip = { + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + scope:target = { + court_ongoing_1030_cat_modifier_effect = yes + } + } + } + 1 = { + desc = court_ongoing.1030.a.failure + show_chance = no + show_as_tooltip = { + court_ongoing_1030_failure_effect = yes + } + } + } + } + + hidden_effect = { + scope:target = { + trigger_event = { + id = court_ongoing.1032 + days = 2 + } + } + } + + ai_chance = { + base = 100 + modifier = { + scope:target = { court_ongoing_1030_cat_lover = yes } + add = 50 + } + } + } + + #Dog + option = { + name = court_ongoing.1030.b + + show_as_tooltip = { + random_list = { + 1 = { + desc = court_ongoing.1030.b.success + show_chance = no + + show_as_tooltip = { + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + scope:target = { + court_ongoing_1030_dog_modifier_effect = yes + } + } + } + 1 = { + desc = court_ongoing.1030.b.failure + show_chance = no + show_as_tooltip = { + court_ongoing_1030_failure_effect = yes + } + } + } + } + + hidden_effect = { + scope:target = { + trigger_event = { + id = court_ongoing.1031 + days = 2 + } + } + } + + ai_chance = { + base = 100 + modifier = { + scope:target = { court_ongoing_1030_dog_lover = yes } + add = 50 + } + } + } + + #Eagle + option = { + name = court_ongoing.1030.d + trigger = { + location = { + geographical_region = world_steppe + } + } + show_as_tooltip = { + random_list = { + 1 = { + desc = court_ongoing.1030.d.success + show_chance = no + + show_as_tooltip = { + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + scope:target = { + court_ongoing_1030_eagle_modifier_effect = yes + } + } + } + 1 = { + desc = court_ongoing.1030.d.failure + show_chance = no + show_as_tooltip = { + court_ongoing_1030_failure_effect = yes + } + } + } + } + + hidden_effect = { + scope:target = { + trigger_event = { + id = court_ongoing.1033 + days = 2 + } + } + } + + ai_chance = { + base = 100 + } + } + + #Me! + option = { + name = court_ongoing.1030.c + + reverse_add_opinion = { + target = scope:target + modifier = pleased_opinion + opinion = 10 + } + + hidden_effect = { + scope:target = { + send_interface_toast = { + title = court_ongoing.1021.pet.failure + left_icon = scope:owner + } + } + } + + ai_chance = { + base = 0 + } + } +} + +#Target gets offered a dog +court_ongoing.1031 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1021.t + desc = court_ongoing.1031.start.desc + + theme = romance_scheme + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = happiness + } + + #yes dog! + option = { + name = court_ongoing.1031.a + + court_ongoing_1030_dog_modifier_effect = yes + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.b.success + left_icon = scope:target + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + show_as_tooltip = { scope:target = { court_ongoing_1030_dog_modifier_effect = yes } } + } + } + } + + ai_chance = { + base = 50 + + ai_compassion_target_modifier = { VALUE = 50 } + ai_energy_target_modifier = { VALUE = 50 } + ai_boldness_target_modifier = { VALUE = 50 } + ai_honor_target_modifier = { VALUE = 20 } + + } + } + + #Yeah, that's gonna be a no for me, dawg + option = { + name = court_ongoing.1031.b + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.b.failure + left_icon = scope:target + court_ongoing_1030_failure_effect = yes + } + } + } + + ai_chance = { + base = 50 + + modifier = { + court_ongoing_1030_dog_lover = yes + add = -1000 + } + } + } +} + +#Target gets offered a cat +court_ongoing.1032 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1021.t + desc = court_ongoing.1032.desc + + theme = romance_scheme + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = happiness + } + + immediate = { + assign_cat_eye_color_effect = { COLOR = random } + } + + #yes cat! + option = { + name = court_ongoing.1031.a + + court_ongoing_1030_cat_modifier_effect = yes + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.a.success + left_icon = scope:target + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + show_as_tooltip = { scope:target = { court_ongoing_1030_cat_modifier_effect = yes } } + } + } + } + + ai_chance = { + base = 50 + + ai_compassion_target_modifier = { VALUE = 50 } + ai_zeal_target_modifier = { VALUE = -50 } + ai_rationality_target_modifier = { VALUE = 50 } + ai_honor_target_modifier = { VALUE = -20 } + + } + } + + #no cat, because I'm an awful human being + option = { + name = court_ongoing.1031.b + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.a.failure + left_icon = scope:target + court_ongoing_1030_failure_effect = yes + } + } + } + + ai_chance = { + base = 50 + + modifier = { + court_ongoing_1030_cat_lover = yes + add = -1000 + } + } + } + after = { + remove_variable = cat_eye_color + } +} + + +#Target gets offered an eagle +court_ongoing.1033 = { #by Ariana Tranumn + type = character_event + title = court_ongoing.1021.t + desc = court_ongoing.1033.desc + + theme = romance_scheme + + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = happiness + } + + option = { + name = court_ongoing.1031.a + + court_ongoing_1030_eagle_modifier_effect = yes + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.d.success + left_icon = scope:target + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + show_as_tooltip = { scope:target = { court_ongoing_1030_eagle_modifier_effect = yes } } + } + } + } + + ai_chance = { + base = 50 + + ai_compassion_target_modifier = { VALUE = 50 } + ai_zeal_target_modifier = { VALUE = -50 } + ai_rationality_target_modifier = { VALUE = 50 } + ai_honor_target_modifier = { VALUE = -20 } + modifier = { + has_trait = lifestyle_hunter + add = 50 + } + } + } + + option = { + name = court_ongoing.1031.b + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.d.failure + left_icon = scope:target + court_ongoing_1030_failure_effect = yes + } + } + } + + ai_chance = { + base = 50 + } + } +} + +###GIFT:NECKLACE## +court_ongoing.1040 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1040.t + desc = { + desc = court_ongoing.1022.start.desc + desc = court_ongoing.1040.end.desc + } + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = personality_callous + } + lower_right_portrait = scope:necklace_owner + cooldown = { years = 1 } + + trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_gift_modifier + } + } + } + + immediate = { + if = { + limit = { NOT = { exists = scope:necklace_owner } } + court_ongoing_1020_save_necklace_owner_effect = yes + } + } + + #Buy + option = { + name = court_ongoing.1040.a + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + } + + remove_short_term_gold = minor_gold_value + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = necklace OUTCOME = success } + + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_greed_target_modifier = { VALUE = -90 } + } + } + + #Offer favor + option = { + trigger = { + NOT = { scope:necklace_owner = { has_hook = root } } + } + name = court_ongoing.1040.b + + scope:necklace_owner = { + add_hook = { + target = root + type = favor_hook + } + } + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = necklace OUTCOME = success } + + stress_impact = { + paranoid = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 70 + ai_honor_target_modifier = { VALUE = 40 } + } + } + + #Steal + option = { + name = court_ongoing.1040.c + + duel = { + target = scope:necklace_owner + skill = intrigue + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 4 + min = -40 + } + desc = court_ongoing.1040.c.success + send_interface_toast = { + title = court_ongoing.1040.c.success + left_icon = scope:target + right_icon = scope:necklace_owner + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = necklace OUTCOME = success } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -4 + min = -40 + } + desc = court_ongoing.1040.c.failure + send_interface_toast = { + title = court_ongoing.1040.c.failure + left_icon = scope:target + right_icon = scope:necklace_owner + reverse_add_opinion = { + target = scope:necklace_owner + modifier = angry_opinion + opinion = -20 + } + if = { + limit = { + exists = scope:necklace_owner.primary_spouse + this != scope:necklace_owner.primary_spouse + scope:necklace_owner.primary_spouse = { is_ruler = yes } + } + reverse_add_opinion = { + target = scope:necklace_owner.primary_spouse + modifier = angry_opinion + opinion = -20 + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = necklace OUTCOME = failure } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + honest = medium_stress_impact_gain + generous = minor_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_honor_target_modifier = { VALUE = -80 } + ai_compassion_target_modifier = { VALUE = -80 } + } + } + + #Never mind... + option = { + name = court_ongoing.1040.d + + reverse_add_opinion = { + target = scope:target + modifier = pleased_opinion + opinion = 5 + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = necklace OUTCOME = failure } + ai_chance = { + base = 50 + } + } +} + + +### GIFT: FLOWER ### +court_ongoing.1050 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1050.t + desc = { + desc = court_ongoing.1050.start.desc + first_valid = { + triggered_desc = { + trigger = { + scope:target_host.faith = { + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:buddhism_religion + religion = religion:hinduism_religion + religion = religion:jainism_religion + } + } + } + desc = court_ongoing.1050.monastery.desc + } + desc = court_ongoing.1050.temple.desc + } + } + theme = romance_scheme + override_background = { + reference = garden + } + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = flirtation + } + lower_right_portrait = scope:helpful_friend + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + cooldown = { years = 1 } + + trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_gift_modifier + } + } + exists = scope:target.location + } + + + immediate = { + # Location & host + scope:target.location = { save_scope_as = target_location } + if = { + limit = { exists = scope:target.host } + scope:target.host = { save_scope_as = target_host } + } + else = { + scope:target.location.province_owner = { save_scope_as = target_host } + } + + # Where is the bloom from? + if = { + limit = { root = { is_ai = no } } #Only needed for text and a bit costly so only players + random_independent_ruler = { + limit = { + highest_held_title_tier >= tier_kingdom + NOT = { in_diplomatic_range = scope:target } + } + alternative_limit = { + highest_held_title_tier >= tier_kingdom + } + primary_title = { save_scope_as = orchid_origin } + } + } + + # Where does it grow? + scope:target_host = { + random_sub_realm_barony = { + limit = { + title_province = { + faith = scope:target_host.faith + has_holding_type = church_holding + } + } + alternative_limit = { + title_province = { faith = scope:target_host.faith } + } + title_province = { save_scope_as = orchid_location } + } + } + + # Do you have a better friend? + random_relation = { + type = friend + limit = { + has_trait = lifestyle_herbalist + basic_is_available_ai = yes + this != scope:target + } + alternative_limit = { + basic_is_available_ai = yes + prowess > root.prowess + this != scope:target + } + save_scope_as = helpful_friend + } + } + + # Buy + option = { + name = court_ongoing.1050.a + + remove_short_term_gold = minor_gold_value + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = success } + + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_greed_target_modifier = { VALUE = -90 } + modifier = { + is_ai = yes + short_term_gold <= minor_gold_value + add = -200 + } + } + } + + # Adventure + option = { + name = court_ongoing.1050.b + + stress_impact = { + craven = major_stress_impact_gain + lazy = medium_stress_impact_gain + } + + duel = { + skill = prowess + value = average_skill_rating + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 4 + min = -55 + } + desc = court_ongoing.1050.b.success + send_interface_toast = { + title = court_ongoing.1050.b.success + left_icon = scope:target + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = success } + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + add_prestige = medium_prestige_gain + } + } + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -25 + } + desc = court_ongoing.1050.b.soft_failure + send_interface_toast = { + title = court_ongoing.1050.b.soft_failure + left_icon = scope:target + add_stress = minor_stress_gain + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -9 + } + desc = court_ongoing.1050.b.hard_failure + send_interface_toast = { + title = court_ongoing.1050.b.hard_failure + left_icon = scope:target + increase_wounds_effect = { REASON = fall } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + } + } + } + } + + # Friend adventure + option = { + trigger = { + exists = scope:helpful_friend + scope:helpful_friend = { NOT = { has_trait = lifestyle_herbalist } } + } + name = court_ongoing.1050.b.friend + custom_tooltip = court_ongoing.1050.b.friend.f + add_internal_flag = special + + scope:helpful_friend = { + duel = { + skill = prowess + value = average_skill_rating + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 4 + min = -50 + } + desc = court_ongoing.1050.b.friend.success + root = { + send_interface_toast = { + title = court_ongoing.1050.b.friend.success + left_icon = scope:helpful_friend + right_icon = scope:target + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = success } + } + } + } + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -20 + } + desc = court_ongoing.1050.b.friend.soft_failure + root = { + send_interface_toast = { + title = court_ongoing.1050.b.friend.soft_failure + left_icon = scope:helpful_friend + right_icon = scope:target + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -1 + } + desc = court_ongoing.1050.b.friend.hard_failure + root = { + send_interface_toast = { + title = court_ongoing.1050.b.friend.hard_failure + left_icon = scope:helpful_friend + right_icon = scope:target + scope:helpful_friend = { increase_wounds_effect = { REASON = fall } } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + } + } + } + } + } + + ai_chance = { + base = 100 + } + } + + # Grow it yourself + option = { + name = court_ongoing.1050.c + trigger = { + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_gardener + } + } + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = success } + } + + # Friend can grow it + option = { + name = court_ongoing.1050.b.friend + trigger = { + exists = scope:helpful_friend + scope:helpful_friend = { + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_gardener + } + } + } + custom_tooltip = court_ongoing.1050.c.friend.f + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = success } + } + + + # No thanks (coward) + option = { + name = court_ongoing.1050.d + trigger = { + has_trait = craven + diplomacy < decent_skill_rating + } + trait = craven + + reverse_add_opinion = { + target = scope:target + modifier = weak_opinion + opinion = -5 + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + + ai_chance = { + base = 100 + } + } + + # No thanks (compliment) + option = { + name = court_ongoing.1050.e + trigger = { diplomacy >= decent_skill_rating } + skill = diplomacy + + reverse_add_opinion = { + target = scope:target + modifier = pleased_opinion + opinion = 10 + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + + ai_chance = { + base = 100 + } + } + + # No thanks (regular) + option = { + name = court_ongoing.1050.f + trigger = { + NOR = { + has_trait = craven + diplomacy >= decent_skill_rating + } + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + + ai_chance = { + base = 50 + } + } +} + + +### COMPLIMENT POEM ### + +#What compliment should I use... +court_ongoing.1100 = { + type = character_event + title = court_ongoing.1100.t + desc = court_ongoing.1100.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = writing + } + right_portrait = { + character = scope:target + animation = flirtation + } + cooldown = { years = 1 } + + trigger = { + scope:target = { + can_receieve_good_available_compliment_trigger = yes + } + NOT = { + scope:scheme = { + has_scheme_modifier = courting_charm_modifier + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + scope:scheme.var:court_milestone_event >= 3 + add = -0.75 + } + } + + immediate = { + hidden_effect = { + #Randomize 3 compliment types + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:target } + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:target } + randomize_good_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:target } + } + } + + #Compassionate + option = { + trigger = { has_character_flag = available_compliment_compassionate } + name = court_ongoing.1100.compassionate + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = compassionate COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #bold + option = { + trigger = { has_character_flag = available_compliment_bold } + name = court_ongoing.1100.bold + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = bold COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #honorable + option = { + trigger = { has_character_flag = available_compliment_honorable } + name = court_ongoing.1100.honorable + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = honorable COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #greed + option = { + trigger = { has_character_flag = available_compliment_greedy } + name = court_ongoing.1100.greed + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = greed COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #rational + option = { + trigger = { has_character_flag = available_compliment_rational } + name = court_ongoing.1100.rational + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = rational COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #zealous + option = { + trigger = { has_character_flag = available_compliment_zealous } + name = court_ongoing.1100.zealous + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = zealous COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #energetic + option = { + trigger = { has_character_flag = available_compliment_energetic } + name = court_ongoing.1100.energetic + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = energetic COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #forgiving + option = { + trigger = { has_character_flag = available_compliment_forgiving } + name = court_ongoing.1100.forgiving + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = forgiving COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #beautiful + option = { + trigger = { has_character_flag = available_compliment_beautiful } + name = court_ongoing.1100.beautiful + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = beautiful COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #strong + option = { + trigger = { has_character_flag = available_compliment_strong } + name = court_ongoing.1100.strong + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = strong COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #extroverted + option = { + trigger = { has_character_flag = available_compliment_extroverted } + name = court_ongoing.1100.extroverted + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = extroverted COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #dominant + option = { + trigger = { has_character_flag = available_compliment_dominant } + name = court_ongoing.1100.dominant + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = dominant COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #No thanks + option = { + name = court_ongoing.1100.fallback + } + + after = { + clear_available_compliments_effect = yes + compliment_to_love_letter_effect = yes + } +} + +#Target responds to poem +court_ongoing.1101 = { #by Mathilda Bjarnehed + type = letter_event + opening = court_ongoing.1101.t + desc = court_ongoing.1101.desc + sender = scope:owner + + trigger = { + exists = scope:scheme + } + + #I like + option = { + name = { + trigger = { scope:compliment_outcome = flag:good } + text = court_ongoing.1101.a.good + } + name = { + trigger = { NOT = { scope:compliment_outcome = flag:good } } + text = court_ongoing.1101.a.bad + } + + set_variable = { + name = love_letter_quality + value = 4 + days = 150 + } + + scope:owner = { + add_opinion = { + target = scope:target + modifier = romance_opinion + opinion = 15 + } + trigger_event = court_ongoing.1102 + } + + ai_chance = { + base = 0 + modifier = { + scope:compliment_outcome = flag:good + add = 100 + } + } + } + + #Neutral (ai only) + option = { + trigger = { is_ai = yes } + + scope:owner = { + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1100.neutral.tt + } + } + + ai_chance = { + base = 0 + modifier = { + scope:compliment_outcome = flag:neutral + add = 100 + } + } + } + + #I dislike + option = { + name = { + trigger = { scope:compliment_outcome = flag:good } + text = court_ongoing.1101.c.good + } + name = { + trigger = { NOT = { scope:compliment_outcome = flag:good } } + text = court_ongoing.1101.c.bad + } + + set_variable = { + name = love_letter_quality + value = 1 + days = 150 + } + + scope:owner = { + add_opinion = { + target = scope:target + modifier = disappointed_opinion + opinion = -10 + } + trigger_event = court_ongoing.1103 + } + + ai_chance = { + base = 0 + modifier = { + scope:compliment_outcome = flag:bad + add = 100 + } + } + } + + after = { + scope:owner = { + compliment_to_love_letter_cleanup_effect = yes + } + } +} + +#I get a response, target liked the poem! +court_ongoing.1102 = { #by Mathilda Bjarnehed + type = letter_event + opening = court_ongoing.1102.t + desc = court_ongoing.1102.desc + sender = scope:target + + trigger = { + exists = scope:scheme + } + + option = { + name = court_ongoing.1102.a + scope:scheme = { + add_scheme_modifier = { + type = courting_charm_modifier + } + } + } + + after = { + scope:target = { + compliment_to_love_letter_cleanup_effect = yes + } + } +} + + +#I get a response, disliked the poem... :( +court_ongoing.1103 = { #by Mathilda Bjarnehed + type = letter_event + opening = court_ongoing.1103.t + desc = court_ongoing.1102.desc + sender = scope:target + + trigger = { + exists = scope:scheme + } + + option = { + name = court_ongoing.1103.a + reverse_add_opinion = { + target = scope:target + modifier = insult_opinion + opinion = -10 + } + } + + after = { + scope:target = { + compliment_to_love_letter_cleanup_effect = yes + } + } +} + + + +################################### +# Dealing with competition +# by Mathilda Bjarnehed +################################### + +scripted_trigger court_ongoing_1110_can_court_target_trigger = { + is_adult = yes + this != scope:owner + this != scope:target + basic_is_available_ai = yes + save_temporary_scope_as = can_court + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:can_court + CHARACTER_2 = scope:target + } + opinion = { + target = scope:target + value >= 0 + } + reverse_opinion = { + target = scope:target + value >= 0 + } + NOR = { + is_close_or_extended_family_of = scope:target + is_consort_of = scope:target + has_relation_lover = scope:target + } +} + +#Outcome effects +scripted_effect court_ongoing_1110_remove_competitor_effect = { + scope:scheme = { + remove_scheme_modifier = court_competitor_modifier + } + scope:target = { + hidden_effect = { + if = { + limit = { has_relation_potential_lover = scope:competitor } + remove_relation_potential_lover = scope:competitor + } + } + } +} + +scripted_effect court_ongoing_1110_duel_success_effect = { + court_ongoing_1110_remove_competitor_effect = yes + add_prestige = medium_prestige_gain +} + +scripted_effect court_ongoing_1110_duel_failure_effect = { + add_prestige = minor_prestige_loss + custom_tooltip = court_ongoing_1110.competitor_remains.tt +} + +scripted_effect court_ongoing_1110_poison_success_effect = { + court_ongoing_1110_remove_competitor_effect = yes + add_intrigue_lifestyle_perk_points = 1 + scope:competitor = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } +} + +scripted_effect court_ongoing_1110_poison_failure_effect = { + custom_tooltip = court_ongoing_1110.competitor_remains.tt + reverse_add_opinion = { + target = scope:target + modifier = disappointed_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:competitor + modifier = suspicion_opinion + opinion = -20 + } +} + +scripted_effect court_ongoing_1110_poison_murder_effect = { + court_ongoing_1110_remove_competitor_effect = yes + unknown_murder_effect = { + MURDERER = scope:owner + VICTIM = scope:competitor + REASON = death_murder + } +} + +# What to do about competitor? +court_ongoing.1110 = { + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1110.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:competitor + animation = disapproval + } + lower_right_portrait = scope:target + + cooldown = { years = 1 } + + trigger = { + OR = { + any_relation = { + type = rival + court_ongoing_1110_can_court_target_trigger = yes + } + AND = { + exists = scope:target.court_owner #The recipient or their liege if unlanded + scope:target.court_owner = { + OR = { + any_knight = { court_ongoing_1110_can_court_target_trigger = yes } + any_vassal = { court_ongoing_1110_can_court_target_trigger = yes } + } + } + } + scope:target = { + any_relation = { + type = potential_lover + court_ongoing_1110_can_court_target_trigger = yes + } + } + } + } + + immediate = { + #If I have a rival(s), add them to list + if = { + limit = { + any_relation = { + type = rival + court_ongoing_1110_can_court_target_trigger = yes + } + } + every_relation = { + type = rival + limit = { court_ongoing_1110_can_court_target_trigger = yes } + add_to_list = competitors_list + } + } + #Else, add knights/vassals of recipient/host + potential lovers + else = { + if = { + limit = { + exists = scope:target.court_owner #The recipient or their liege if unlanded + } + scope:target.court_owner = { + every_knight = { + limit = { court_ongoing_1110_can_court_target_trigger = yes } + add_to_list = competitors_list + } + every_vassal = { + limit = { court_ongoing_1110_can_court_target_trigger = yes } + add_to_list = competitors_list + } + } + } + scope:target = { + every_relation = { + type = potential_lover + limit = { court_ongoing_1110_can_court_target_trigger = yes } + add_to_list = competitors_list + } + } + } + + #Randomize from list + random_in_list = { + list = competitors_list + weight = { + base = 5 + modifier = { + add = { + value = attraction + divide = medium_positive_attraction + multiply = 20 + } + } + modifier = { + add = { + value = ai_sociability + multiply = 0.2 + } + } + modifier = { + has_trait = lustful + add = 20 + } + modifier = { + OR = { + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_temptation_focus } + has_focus_or_focus_trait_trigger = { FOCUS = martial_chivalry_focus } + } + add = 20 + } + opinion_modifier = { + opinion_target = scope:owner + multiplier = -0.3 + } + opinion_modifier = { + opinion_target = scope:target + multiplier = 0.5 + } + } + save_scope_as = competitor + } + + scope:scheme = { + add_scheme_modifier = { + type = court_competitor_modifier + } + } + hidden_effect = { + if = { + limit = { + scope:target = { might_cheat_on_every_partner_trigger = yes } + scope:competitor = { might_cheat_on_every_partner_trigger = yes } + } + scope:target = { + progress_towards_lover_effect = { + CHARACTER = scope:competitor + REASON = lover_followed_around + OPINION = 0 + } + } + } + } + } + + #Duel + option = { + name = court_ongoing.1110.a + trigger = { + OR = { + AND = { + exists = liege + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = liege } + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + + duel = { + skill = prowess + target = scope:competitor + 60 = { + desc = court_ongoing.1110.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + modifier = { + add = { + value = ai_boldness + divide = high_positive_ai_value + multiply = 20 + } + } + show_as_tooltip = { court_ongoing_1110_duel_success_effect = yes } + save_scope_value_as = { + name = competitor_outcome + value = flag:duel_success + } + } + 40 = { + desc = court_ongoing.1110.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + modifier = { + add = { + value = scope:competitor.ai_boldness + divide = high_positive_ai_value + multiply = 20 + } + } + show_as_tooltip = { court_ongoing_1110_duel_failure_effect = yes } + save_scope_value_as = { + name = competitor_outcome + value = flag:duel_failure + } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + calm = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_energy = 1 + ai_honor = 2 + } + } + } + + + #Poision + option = { + name = court_ongoing.1110.b + + duel = { + skill = intrigue + target = scope:competitor + 60 = { + desc = court_ongoing.1110.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + show_as_tooltip = { court_ongoing_1110_poison_success_effect = yes } + save_scope_value_as = { + name = competitor_outcome + value = flag:poison_success + } + } + 35 = { + desc = court_ongoing.1110.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + modifier = { + scope:competitor = { has_trait = paranoid } + } + show_as_tooltip = { court_ongoing_1110_poison_failure_effect = yes } + save_scope_value_as = { + name = competitor_outcome + value = flag:poison_failure + } + } + 5 = { + desc = court_ongoing.1110.b.murder + trigger = { root = { is_ai = no } } # Only available for players + show_as_tooltip = { court_ongoing_1110_poison_murder_effect = yes } + trigger_event = court_ongoing.1116 + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + honest = medium_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -2 + ai_honor = -2 + } + } + } + + #Pay off + option = { + trigger = { + OR = { + is_ai = no + short_term_gold >= tiny_gold_value + } + } + name = court_ongoing.1110.c + + pay_short_term_gold = { + target = scope:competitor + gold = tiny_gold_value + } + + random_list = { + 90 = { #Success + desc = court_ongoing.1110.c.success + modifier = { + scope:competitor.ai_greed > 0 + add = { + value = scope:competitor.ai_greed + divide = high_positive_ai_value + multiply = 20 + } + } + modifier = { + scope:competitor.ai_honor < 0 + add = { + value = scope:competitor.ai_honor + divide = high_negative_ai_value + multiply = 20 + } + } + send_interface_toast = { + title = court_ongoing.1110.c.success + left_icon = scope:competitor + right_icon = scope:target + court_ongoing_1110_remove_competitor_effect = yes + } + } + 10 = { #Failure + min = 5 + desc = court_ongoing.1110.c.failure + modifier = { + scope:competitor.ai_honor > 0 + add = { + value = scope:competitor.ai_honor + divide = high_positive_ai_value + multiply = 5 + } + } + modifier = { + scope:competitor.ai_greed < 0 + add = { + value = scope:competitor.ai_greed + divide = high_negative_ai_value + multiply = 5 + } + } + send_interface_toast = { + title = court_ongoing.1110.c.failure + left_icon = scope:competitor + right_icon = scope:target + reverse_add_opinion = { + target = scope:target + modifier = disappointed_opinion + opinion = -10 + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = -1 + ai_energy = -1 + } + } + } + + after = { + if = { + limit = { exists = scope:competitor_outcome } + scope:target = { + trigger_event = court_ongoing.1111 + } + } + } +} + + +#Recipient perspective on outcome +court_ongoing.1111 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1111.t + desc = { + desc = court_ongoing.1111.start.desc + first_valid = { + triggered_desc = { + trigger = { scope:competitor_outcome = flag:duel_success } + desc = court_ongoing.1111.duel_success.desc + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:duel_failure } + desc = court_ongoing.1111.duel_failure.desc + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:poison_success } + desc = court_ongoing.1111.poison_success.desc + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:poison_failure } + desc = court_ongoing.1111.poison_failure.desc + } + } + } + + theme = romance_scheme + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { + OR = { + scope:competitor_outcome = flag:duel_success + scope:competitor_outcome = flag:poison_success + } + } + animation = personality_bold + } + triggered_animation = { + trigger = { scope:competitor_outcome = flag:duel_failure } + animation = pain + } + triggered_animation = { + trigger = { always = yes } + animation = idle + } + } + right_portrait = { + character = scope:competitor + triggered_animation = { + trigger = { scope:competitor_outcome = flag:duel_success } + animation = pain + } + triggered_animation = { + trigger = { scope:competitor_outcome = flag:duel_failure } + animation = personality_bold + } + triggered_animation = { + trigger = { scope:competitor_outcome = flag:poison_success } + animation = shame + } + triggered_animation = { + trigger = { always = yes } + animation = idle + } + } + + trigger = { + exists = scope:scheme + } + + #Target did well/should keep trying + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:competitor_outcome = flag:duel_success + scope:competitor_outcome = flag:poison_success + } + } + desc = court_ongoing.1111.a.success + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:duel_failure } + desc = court_ongoing.1111.a.duel_failure + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:poison_failure } + desc = court_ongoing.1111.a.poison_failure + } + } + } + } + + reverse_add_opinion = { + target = scope:owner + modifier = romance_opinion + opinion = 20 + } + + scope:owner = { + if = { + limit = { + OR = { + scope:competitor_outcome = flag:duel_success + scope:competitor_outcome = flag:duel_failure + } + } + trigger_event = court_ongoing.1112 #Duel success + } + else = { + trigger_event = court_ongoing.1114 #Poison success + } + } + + ai_chance = { + base = 0 + modifier = { + OR = { + scope:competitor_outcome = flag:duel_success + scope:competitor_outcome = flag:poison_success + } + add = 100 + } + } + } + + #I'm not impressed + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:competitor_outcome = flag:poison_success } + desc = court_ongoing.1111.b.poison_success + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:poison_failure } + desc = court_ongoing.1111.b.poison_failure + } + desc = court_ongoing.1111.b + } + } + } + + scope:owner = { + if = { + limit = { + OR = { + scope:competitor_outcome = flag:duel_success + scope:competitor_outcome = flag:duel_failure + } + } + trigger_event = court_ongoing.1113 #Duel failure + } + else = { + trigger_event = court_ongoing.1115 #Poison failure + } + } + + ai_chance = { + base = 0 + modifier = { + OR = { + scope:competitor_outcome = flag:duel_failure + scope:competitor_outcome = flag:poison_failure + } + add = 100 + } + } + } + + #I prefer competitor! (ends scheme, player only) + option = { + trigger = { is_ai = no } + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:competitor_outcome = flag:duel_failure } + desc = court_ongoing.1111.c.duel_failure + } + desc = court_ongoing.1111.c + } + } + } + + reverse_add_opinion = { + target = scope:competitor + modifier = romance_opinion + opinion = 20 + } + + show_as_tooltip = { scope:scheme = { end_scheme = yes } } + scope:owner = { trigger_event = court_ongoing.0001 } + } + + #be gone, both of you! (ends scheme, player only) + option = { + trigger = { is_ai = no } + name = court_ongoing.1111.d + + show_as_tooltip = { scope:scheme = { end_scheme = yes } } + scope:owner = { trigger_event = court_ongoing.0001 } + } +} + + +#Duel success for owner +court_ongoing.1112 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1112.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:competitor + animation = pain + } + lower_right_portrait = scope:target + + trigger = { + exists = scope:scheme + } + + option = { + name = court_ongoing.1112.a + court_ongoing_1110_duel_success_effect = yes + } +} + +#Duel failure for owner +court_ongoing.1113 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1113.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:competitor + animation = personality_bold + } + lower_right_portrait = scope:target + + trigger = { + exists = scope:scheme + } + + #OK... + option = { + name = court_ongoing.1113.a + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + #Rivalry! + option = { + trigger = { + NOT = { has_relation_rival = scope:competitor } + } + name = court_ongoing.1113.b + set_relation_rival = { + target = scope:competitor + reason = rival_duel_vengeance + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 5 + } + } + } + + after = { + court_ongoing_1110_duel_failure_effect = yes + } +} + +#Poison success for owner +court_ongoing.1114 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1114.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:competitor + animation = sick + } + lower_right_portrait = scope:target + + trigger = { + exists = scope:scheme + } + + option = { + name = court_ongoing.1114.a + court_ongoing_1110_poison_success_effect = yes + } +} + +#Poison failure for owner +court_ongoing.1115 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1115.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:competitor + animation = dismissal + } + lower_right_portrait = scope:target + + trigger = { + exists = scope:scheme + } + + #OK... + option = { + name = court_ongoing.1115.a + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + #Rivalry! + option = { + trigger = { + NOT = { has_relation_rival = scope:competitor } + } + name = court_ongoing.1113.b + + set_relation_rival = { + target = scope:competitor + reason = rival_poison_vengeance + } + + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 5 + } + } + } + + after = { + court_ongoing_1110_poison_failure_effect = yes + } +} + +#Poison murder for owner +court_ongoing.1116 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1116.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:competitor + animation = dead + } + lower_right_portrait = scope:target + + trigger = { + exists = scope:scheme + } + + immediate = { court_ongoing_1110_poison_murder_effect = yes } + + option = { + name = court_ongoing.1116.a + } +} + + + + +############################## +# Boring party guest +# by Mathilda Bjarnehed +############################## + +scripted_trigger court_ongoing_1120_unpleasant_guest_trigger = { + basic_is_available_ai = yes + NOR = { + has_relation_friend = root + has_relation_lover = root + opinion = { + target = root + value > low_positive_opinion + } + } + NOR = { + this = scope:owner + this = scope:target + } +} + +court_ongoing.1120 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1120.t + desc = court_ongoing.1120.desc + theme = romance_scheme + override_background = { + reference = throne_room_scope + } + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:unpleasant_guest + animation = wedding_drunk + } + lower_right_portrait = scope:target + + cooldown = { years = 1 } + + trigger = { + trigger_if = { + limit = { exists = scope:target.host } + scope:target.host = { save_temporary_scope_as = target_host_temp } + } + trigger_else_if = { + limit = { + exists = scope:target.location.province_owner + } + scope:target.location.province_owner = { save_temporary_scope_as = target_host_temp } + } + trigger_else = { always = no } + scope:target_host_temp.top_liege ?= { + OR = { + court_ongoing_1120_unpleasant_guest_trigger = yes + any_vassal_or_below = { court_ongoing_1120_unpleasant_guest_trigger = yes } + } + } + } + + immediate = { + # Location & host + scope:target.location = { save_scope_as = target_location } + if = { + limit = { exists = scope:target.host } + scope:target.host = { save_scope_as = target_host } + } + else = { + scope:target.location.province_owner = { save_scope_as = target_host } + } + + # Save all potential guests + scope:target_host = { + save_scope_as = background_throne_room_scope + + # Host themselves + if = { + limit = { court_ongoing_1120_unpleasant_guest_trigger = yes } + add_to_list = important_guests + } + + # Host's liege + if = { + limit = { + top_liege != this + liege = { court_ongoing_1120_unpleasant_guest_trigger = yes } + } + liege = { add_to_list = important_guests } + } + + # Host's powerful vassals + every_powerful_vassal = { + limit = { court_ongoing_1120_unpleasant_guest_trigger = yes } + add_to_list = important_guests + } + } + # Your powerful vassals, if same realm + every_powerful_vassal = { + limit = { + top_liege = scope:target_host.top_liege + court_ongoing_1120_unpleasant_guest_trigger = yes + } + add_to_list = important_guests + } + + # Pick a guest + random_in_list = { + list = important_guests + limit = { + OR = { + is_powerful_vassal_of = root + AND = { + exists = root.liege + this = root.liege + } + highest_held_title_tier >= root.highest_held_title_tier + } + } + alternative_limit = { always = yes } + weight = { + base = 10 + modifier = { + add = { + value = ai_compassion + add = ai_rationality + add = ai_honor + multiply = -1 + } + } + compatibility_modifier = { + who = scope:target + compatibility_target = this + multiplier = -2 + } + compatibility_modifier = { + who = root + compatibility_target = this + multiplier = -2 + } + opinion_modifier = { + who = root + opinion_target = this + multiplier = -1 + } + modifier = { + add = { + value = diplomacy + subtract = high_skill_rating + multiply = -5 + } + } + } + save_scope_as = unpleasant_guest + } + + if = { + limit = { NOT = { exists = scope:unpleasant_guest } } + # Still no guest? Look further + scope:target_host.top_liege = { + random_vassal_or_below = { + limit = { court_ongoing_1120_unpleasant_guest_trigger = yes } + weight = { + base = 10 + modifier = { + add = { + value = ai_compassion + add = ai_rationality + add = ai_honor + multiply = -1 + } + } + modifier = { + add = { + value = diplomacy + subtract = high_skill_rating + multiply = -5 + } + } + } + save_scope_as = unpleasant_guest + } + } + # The top liege might be the only possible candidate + if = { + limit = { NOT = { exists = scope:unpleasant_guest } } + if = { + limit = { scope:target_host.top_liege = { court_ongoing_1120_unpleasant_guest_trigger = yes } } + scope:target_host.top_liege = { save_scope_as = unpleasant_guest } + } + } + } + } + + # Subterfuge distraction + option = { + name = court_ongoing.1120.a + skill = intrigue + trigger = { + intrigue >= high_skill_rating + intrigue > scope:unpleasant_guest.intrigue + } + + scope:scheme = { + add_scheme_modifier = { + type = courting_kindness_modifier + } + } + + scope:target = { + save_scope_value_as = { + name = unpleasant_guest_outcome + value = flag:intrigue + } + trigger_event = court_ongoing.1121 + } + + stress_impact = { + honest = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 200 + + ai_value_modifier = { + ai_boldness = 2 + ai_honor = -2 + ai_compassion = 1 + } + } + } + + # Strike up a really nice conversation + option = { + name = court_ongoing.1120.b + skill = diplomacy + trigger = { + diplomacy >= high_skill_rating + diplomacy > scope:unpleasant_guest.diplomacy + } + + scope:scheme = { + add_scheme_modifier = { + type = courting_kindness_modifier + } + } + + scope:target = { + save_scope_value_as = { + name = unpleasant_guest_outcome + value = flag:diplomacy + } + trigger_event = court_ongoing.1121 + } + + stress_impact = { + shy = medium_stress_impact_gain + } + + ai_chance = { + base = 200 + + ai_value_modifier = { + ai_sociability = 2 + ai_boldness = 2 + ai_honor = 1 + ai_compassion = 2 + } + } + } + + # Distract them (boring) + option = { + name = court_ongoing.1120.c + + add_stress = medium_stress_gain + + send_interface_toast = { + title = court_ongoing.1120.a.failure + add_character_modifier = { + modifier = chronic_headaches_modifier + years = 10 + } + } + + scope:scheme = { + add_scheme_modifier = { + type = courting_kindness_modifier + } + } + + scope:target = { + save_scope_value_as = { + name = unpleasant_guest_outcome + value = flag:diplomacy + } + trigger_event = court_ongoing.1121 + } + + stress_impact = { + shy = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + ai_value_modifier = { + ai_compassion = 2 + ai_honor = 1 + ai_energy = 1 + ai_sociability = 2 + } + } + } + + # Insult them + option = { + name = court_ongoing.1120.d + + add_prestige = miniscule_prestige_loss + + reverse_add_opinion = { + target = scope:unpleasant_guest + modifier = insulted_opinion + opinion = -15 + } + + progress_towards_rival_effect = { CHARACTER = scope:unpleasant_guest OPINION = 0 REASON = rival_boring_party_guest } + + scope:scheme = { + add_scheme_modifier = { + type = courting_kindness_modifier + } + } + + scope:target = { + save_scope_value_as = { + name = unpleasant_guest_outcome + value = flag:insult + } + trigger_event = court_ongoing.1121 + } + + stress_impact = { + compassionate = medium_stress_impact_gain + shy = medium_stress_impact_gain + craven = medium_stress_impact_gain + forgiving = minor_stress_impact_gain + calm = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + ai_value_modifier = { + ai_compassion = -2 + ai_boldness = 2 + ai_honor = -1 + } + } + } + + # Nothing can be done + option = { + trigger = { + NOR = { + AND = { + intrigue >= high_skill_rating + intrigue > scope:unpleasant_guest.intrigue + } + AND = { + diplomacy >= high_skill_rating + diplomacy > scope:unpleasant_guest.diplomacy + } + } + } + name = court_ongoing.1120.e + + ai_chance = { + base = 50 + } + } +} + +# Target outcome event (unpleasant guest) +court_ongoing.1121 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1121.t + desc = { + desc = court_ongoing.1121.start.desc + first_valid = { + triggered_desc = { + trigger = { scope:unpleasant_guest_outcome = flag:diplomacy } + desc = court_ongoing.1121.diplomacy.desc + } + triggered_desc = { + trigger = { scope:unpleasant_guest_outcome = flag:intrigue } + desc = court_ongoing.1121.intrigue.desc + } + triggered_desc = { + trigger = { scope:unpleasant_guest_outcome = flag:insult } + desc = court_ongoing.1121.insult.desc + } + } + } + theme = romance_scheme + override_background = { + reference = throne_room + } + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { scope:unpleasant_guest_outcome = flag:diplomacy } + animation = personality_compassionate + } + triggered_animation = { + trigger = { scope:unpleasant_guest_outcome = flag:intrigue } + animation = personality_dishonorable + } + triggered_animation = { + trigger = { scope:unpleasant_guest_outcome = flag:insult } + animation = boredom + } + } + right_portrait = { + character = scope:unpleasant_guest + triggered_animation = { + trigger = { scope:unpleasant_guest_outcome = flag:intrigue } + animation = worry + } + triggered_animation = { + trigger = { scope:unpleasant_guest_outcome = flag:insult } + animation = disapproval + } + animation = idle + } + + + # Study owner's diplomatic skills + option = { + name = court_ongoing.1121.a + + trigger = { scope:unpleasant_guest_outcome = flag:diplomacy } + + #Stress and opinion + add_stress = minor_stress_gain + + + #Diplomacy experience + random_list = { + 10 = { + modifier = { + add = { + value = scope:owner.diplomacy + subtract = average_skill_rating + multiply = 2 + } + } + desc = court_ongoing.1121.a.critical_success + send_interface_toast = { + left_icon = scope:owner + title = court_ongoing.1121.a.critical_success + add_diplomacy_lifestyle_perk_points = 1 + } + } + 90 = { + desc = court_ongoing.1121.a.success + send_interface_toast = { + left_icon = scope:owner + title = court_ongoing.1121.a.success + add_character_modifier = { + modifier = diplomacy_student_modifier + years = 5 + } + } + } + } + } + + # Study owner's intrigue skills + option = { + trigger = { scope:unpleasant_guest_outcome = flag:intrigue } + name = court_ongoing.1121.b + + #Stress and opinion + add_stress = minor_stress_gain + + + #Diplomacy experience + random_list = { + 10 = { + modifier = { + add = { + value = scope:owner.intrigue + subtract = average_skill_rating + multiply = 2 + } + } + desc = court_ongoing.1121.b.critical_success + send_interface_toast = { + left_icon = scope:owner + title = court_ongoing.1121.b.critical_success + add_intrigue_lifestyle_perk_points = 1 + } + } + 90 = { + desc = court_ongoing.1121.b.success + send_interface_toast = { + left_icon = scope:owner + title = court_ongoing.1121.b.success + add_character_modifier = { + modifier = intrigue_student_modifier + years = 5 + } + } + } + } + } + + + # Join in with owner's insults + option = { + trigger = { scope:unpleasant_guest_outcome = flag:insult } + name = court_ongoing.1121.c + + #Owner opinion + reverse_add_opinion = { + target = scope:owner + modifier = respect_opinion + opinion = 10 + } + + #Unpleasant opinion + random_list = { + 50 = { + modifier = { + scope:unpleasant_guest = { has_trait = honest } + add = 50 + } + modifier = { + scope:unpleasant_guest = { has_trait = humble } + add = 50 + } + desc = court_ongoing.1121.c.success + send_interface_toast = { + left_icon = scope:unpleasant_guest + title = court_ongoing.1121.c.success + reverse_add_opinion = { + target = scope:unpleasant_guest + modifier = respect_opinion + opinion = 10 + } + } + } + 50 = { + desc = court_ongoing.1121.c.failure + modifier = { + scope:unpleasant_guest = { has_trait = arrogant } + add = 50 + } + send_interface_toast = { + left_icon = scope:unpleasant_guest + title = court_ongoing.1121.c.failure + reverse_add_opinion = { + target = scope:unpleasant_guest + modifier = insulted_opinion + opinion = -10 + } + } + } + } + + stress_impact = { + shy = medium_stress_impact_gain + craven = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + } + + # Stay with unpleasant guest + option = { + add_stress = minor_stress_gain + name = court_ongoing.1121.d + + reverse_add_opinion = { + target = scope:unpleasant_guest + modifier = friendliness_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:owner + modifier = disappointed_opinion + opinion = -5 + } + } + + # Get out while you can + option = { + name = court_ongoing.1121.e + add_stress = minor_stress_loss + } +} + + +### EXTREME REQUEST ### +# by Linnéa Thimrén +###################### + +scripted_trigger court_ongoing_1211_trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_devotion + } + } +} + +scripted_trigger court_ongoing_1221_trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_devotion + } + } +} + +court_ongoing.1200 = { #by Linnéa Thimrén + hidden = yes + + trigger = { + OR = { + court_ongoing_1211_trigger = yes + court_ongoing_1221_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { #more likely to fire later on in the scheme + scope:scheme.var:court_milestone_event < 2 + add = -0.5 + } + } + + immediate = { + if = { + limit = { + scope:target = { is_ai = no } + } + scope:target = { trigger_event = court_ongoing.1201 } + } + else = { + random_list = { + 10 = { + trigger = { court_ongoing_1211_trigger = yes } + trigger_event = { + id = court_ongoing.1211 + days = { 7 9 } + } + } + 10 = { + trigger = { court_ongoing_1221_trigger = yes } + trigger_event = { + id = court_ongoing.1221 + days = { 7 9 } + } + } + } + } + } +} + + +### EXTREME REQUEST - TARGET PLAYER CHOOSE ### + +scripted_effect court_ongoing_1211_a_success_target_effect = { + scope:target = { + add_character_modifier = { + modifier = seduce_rested_modifier + years = 5 + } + } +} + +scripted_effect court_ongoing_1211_a_success_effect = { + court_ongoing_1211_a_success_target_effect = yes + + reverse_add_opinion = { + target = scope:target + modifier = grateful_opinion + opinion = 20 + } + scope:scheme = { + add_scheme_modifier = { + type = courting_devotion + } + } +} + +scripted_effect court_ongoing_1211_failure_target_effect = { + scope:target = { + add_character_modifier = { + modifier = sleep_deprived_modifier + years = 5 + } + } +} + +scripted_effect court_ongoing_1211_a_failure_effect = { + court_ongoing_1211_failure_target_effect = yes + reverse_add_opinion = { + target = scope:target + modifier = disgusted_opinion + opinion = -10 + } +} + +scripted_effect court_ongoing_1211_b_failure_effect = { + court_ongoing_1211_failure_target_effect = yes + reverse_add_opinion = { + target = scope:target + modifier = insult_opinion + opinion = -15 + } +} + +scripted_effect court_ongoing_1221_a_success_target_effect = { + scope:target = { + add_prestige = medium_prestige_gain + } +} + +scripted_effect court_ongoing_1221_a_success_effect = { + court_ongoing_1221_a_success_target_effect = yes + reverse_add_opinion = { + target = scope:target + modifier = grateful_opinion + opinion = 15 + } + scope:scheme = { + add_scheme_modifier = { + type = courting_devotion + } + } +} + +scripted_effect court_ongoing_1221_a_failure_target_effect = { + scope:target = { + add_prestige = minor_prestige_loss + } +} + +scripted_effect court_ongoing_1221_a_failure_effect = { + court_ongoing_1221_a_failure_target_effect = yes + reverse_add_opinion = { + target = scope:target + modifier = disgusted_opinion + opinion = -10 + } +} + +scripted_effect court_ongoing_1221_b_failure_effect = { + court_ongoing_1221_a_failure_target_effect = yes + reverse_add_opinion = { + target = scope:target + modifier = insult_opinion + opinion = -15 + } +} + +court_ongoing.1201 = { #by Linnéa Thimrén + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1201.desc + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = flirtation + } + + cooldown = { years = 1 } + + #sleep + option = { + trigger = { court_ongoing_1211_trigger = yes } + name = court_ongoing.1201.a + + show_as_tooltip = { + random_list = { + 10 = { + show_chance = no + desc = court_ongoing.1201.a_success + court_ongoing_1211_a_success_target_effect = yes + } + 10 = { + show_chance = no + desc = court_ongoing.1201.a_failure + court_ongoing_1211_failure_target_effect = yes + } + } + } + + scope:owner = { + trigger_event = { + id = court_ongoing.1211 + days = { 7 9 } + } + } + } + + #food + option = { + trigger = { court_ongoing_1221_trigger = yes } + name = court_ongoing.1201.b + + show_as_tooltip = { + random_list = { + 10 = { + show_chance = no + desc = court_ongoing.1201.b_success + court_ongoing_1221_a_success_target_effect = yes + } + 10 = { + show_chance = no + desc = court_ongoing.1201.a_failure + court_ongoing_1221_a_failure_target_effect = yes + } + } + } + + scope:owner = { + trigger_event = { + id = court_ongoing.1221 + days = { 7 9 } + } + } + } + + #I don't want you to do anything + option = { + name = court_ongoing.1201.c + } +} + + +### EXTREME REQUEST - SLEEP ### + +court_ongoing.1211 = { #by Linnéa Thimrén + type = character_event + title = court_ongoing.1211.t + desc = { + desc = court_ongoing.1211.desc_opening + desc = court_ongoing.1211.desc + } + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = flirtation + } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + #I'll do it! + option = { + name = court_ongoing.1211.a + + add_character_modifier = { + modifier = sleep_deprived_modifier + years = 2 + } + + random_list = { + 60 = { + desc = court_ongoing.1211.a.success + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.a.success + + scope:target = { + trigger_event = court_ongoing.1212 + } + + court_ongoing_1211_a_success_effect = yes + } + } + 10 = { + desc = court_ongoing.1211.a.failure + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.a.failure + + scope:target = { + trigger_event = court_ongoing.1213 + } + court_ongoing_1211_a_failure_effect = yes + } + } + } + + stress_impact = { + lazy = medium_stress_impact_gain + } + } + + #Tell them you'll do it (liar!) + option = { + name = court_ongoing.1211.b + flavor = court_ongoing.1211.b.tt + + duel = { + skill = intrigue + target = scope:target + 67 = { + desc = court_ongoing.1211.b.success + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.b.success + + scope:target = { + trigger_event = court_ongoing.1214 + } + court_ongoing_1211_a_success_effect = yes + } + } + 33 = { + desc = court_ongoing.1211.b.failure + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.b.failure + + scope:target = { + trigger_event = court_ongoing.1215 + } + court_ongoing_1211_b_failure_effect = yes + } + } + } + + stress_impact = { + honest = minor_stress_impact_gain + } + } + + #I won't do it! + option = { + name = court_ongoing.1211.c + + reverse_add_opinion = { + target = scope:target + modifier = refusal_opinion + opinion = -5 + } + } +} + +#success - for target +court_ongoing.1212 = { + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1212.desc + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = personality_bold + } + theme = romance_scheme + + option = { + name = court_ongoing.1212.a + show_as_tooltip = { + court_ongoing_1211_a_success_target_effect = yes + } + } +} + +#failure - for target +court_ongoing.1213 = { + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1213.desc + left_portrait = { + character = scope:target + animation = eyeroll + } + right_portrait = { + character = scope:owner + animation = dead + } + theme = romance_scheme + + option = { + name = court_ongoing.1213.a + show_as_tooltip = { + court_ongoing_1211_failure_target_effect = yes + } + } +} + +#trickery success - for target +court_ongoing.1214 = { + type = character_event + title = court_ongoing.1201.t + desc = { + desc = court_ongoing.1212.desc + desc = court_ongoing.1214.desc + } + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = personality_bold + } + theme = romance_scheme + + option = { + name = court_ongoing.1212.a + show_as_tooltip = { + court_ongoing_1211_a_success_target_effect = yes + } + } +} + +#trickery failure - for target +court_ongoing.1215 = { + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1215.desc + left_portrait = { + character = scope:target + animation = eyeroll + } + theme = romance_scheme + + option = { + name = court_ongoing.1215.a + show_as_tooltip = { + court_ongoing_1211_failure_target_effect = yes + } + } +} + + + +### EXTREME REQUEST - FOOD ### + +court_ongoing.1221 = { #by Linnéa Thimrén + type = character_event + title = court_ongoing.1211.t + desc = { + desc = court_ongoing.1211.desc_opening + desc = court_ongoing.1221.desc + } + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = flirtation + } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + cooldown = { years = 1 } + + #I'll do it! + option = { + name = court_ongoing.1221.a + add_character_modifier = { + modifier = court_starved_modifier + years = 2 + } + random_list = { + 67 = { + desc = court_ongoing.1221.a.success + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1221.a.success + scope:target = { trigger_event = court_ongoing.1222 } + court_ongoing_1221_a_success_effect = yes + } + } + 33 = { + desc = court_ongoing.1221.a.failure + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1221.a.failure + scope:target = { trigger_event = court_ongoing.1223 } + court_ongoing_1221_a_failure_effect = yes + } + } + } + + stress_impact = { + gluttonous = medium_stress_impact_gain + } + } + + #Tell them you'll do it (liar!) + option = { + name = court_ongoing.1221.b + flavor = court_ongoing.1221.b.tt + + duel = { + skill = intrigue + target = scope:target + 67 = { + desc = court_ongoing.1211.b.success + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.b.success + scope:target = { trigger_event = court_ongoing.1224 } + court_ongoing_1221_a_success_effect = yes + } + } + 33 = { + desc = court_ongoing.1211.b.failure + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.b.failure + scope:target = { trigger_event = court_ongoing.1225 } + court_ongoing_1221_b_failure_effect = yes + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + } + } + + stress_impact = { + honest = minor_stress_impact_gain + } + } + + #I won't do it! + option = { + name = court_ongoing.1211.c + + reverse_add_opinion = { + target = scope:target + modifier = refusal_opinion + opinion = -5 + } + } +} + +#success - for target +court_ongoing.1222 = { + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1222.desc + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = sick + } + theme = romance_scheme + + option = { + name = court_ongoing.1222.a + show_as_tooltip = { + court_ongoing_1221_a_success_target_effect = yes + } + } +} + +#failure - for target +court_ongoing.1223 = { + type = character_event + title = court_ongoing.1201.t + desc = { + desc = court_ongoing.1223.desc + desc = court_ongoing.1223.desc_ending + } + left_portrait = { + character = scope:target + animation = eyeroll + } + right_portrait = { + character = scope:owner + animation = wedding_drunk + } + theme = romance_scheme + + option = { + name = court_ongoing.1223.a + show_as_tooltip = { + court_ongoing_1221_a_failure_target_effect = yes + } + } +} + +#trickery success - for target +court_ongoing.1224 = { + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1222.desc + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = sick + } + theme = romance_scheme + + option = { + name = court_ongoing.1222.a + show_as_tooltip = { + court_ongoing_1221_a_success_target_effect = yes + } + } +} + +#trickery failure - for target +court_ongoing.1225 = { + type = character_event + title = court_ongoing.1201.t + desc = { + desc = court_ongoing.1225.desc + desc = court_ongoing.1223.desc_ending + } + left_portrait = { + character = scope:target + animation = eyeroll + } + right_portrait = { + character = scope:owner + animation = wedding_drunk + } + theme = romance_scheme + + option = { + name = court_ongoing.1215.a + show_as_tooltip = { + court_ongoing_1221_a_failure_target_effect = yes + } + } +} diff --git a/N3OW/events/scheme_events/governor_contract_events.txt b/N3OW/events/scheme_events/governor_contract_events.txt new file mode 100644 index 00000000..65bc4398 --- /dev/null +++ b/N3OW/events/scheme_events/governor_contract_events.txt @@ -0,0 +1,4516 @@ +########################## +# GOVERNOR CONTRACT EVENTS +########################## +namespace = governor_contract_event + +### Overdue Taxes +# Intro event +governor_contract_event.1000 = { + type = character_event + title = governor_contract_event.1000.t + desc = governor_contract_event.1000.desc + theme = administrative + left_portrait = { + character = root + animation = thinking + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = overdue_taxes + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = tax_destination + } + } + } + + option = { + name = governor_contract_event.1000.a + + custom_tooltip = governor_contract_event.1001.a_tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:tax_destination + ARRIVAL_EVENT = governor_contract_event.1001 + } + + ai_chance = { + base = 100 + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 200 + has_trait = lazy + NOT = { has_trait = greedy } # Greedy always wants more gold, even when lazy. + } + } + } +} + +# Arrival at the village location +governor_contract_event.1001 = { + type = character_event + title = governor_contract_event.1000.t + desc = governor_contract_event.1001.desc + theme = administrative + override_background = { + trigger = { + root.location = { graphical_wilderness_desert_trigger = yes } + } + reference = wilderness_desert + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + NOR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = ep2_hunt_forest_hut + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + OR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = wilderness_forest + } + override_background = { + trigger = { + root.location = { graphical_wilderness_jungle_trigger = yes } + } + reference = wilderness_jungle + } + + override_background = { + trigger = { + root.location = { graphical_wilderness_steppe_trigger = yes } + } + reference = ep2_travel_settlement_steppe + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county = { + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + holder ?= { mpo_can_recruit_nomad_maa_trigger = yes } + } + } + } + } + reference = ep2_travel_nomad_settlement_desert + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county = { + NOR = { + culture = { culture_has_archer_cavalry_maa = yes } + holder ?= { mpo_can_recruit_nomad_maa_trigger = yes } + } + } + } + } + reference = ep2_travel_settlement_desert + } + override_background = { + trigger = { + root.location = { graphical_hills_trigger = yes } + } + reference = ep2_travel_settlement_hills + } + override_background = { + trigger = { + root.location = { graphical_wilderness_mountains_trigger = yes } + } + reference = ep2_travel_settlement_mountains + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = farmlands + terrain = plains + terrain = floodplains + } + } + } + reference = ep2_travel_settlement_farm + } + left_portrait = { + character = root + animation = disapproval + } + + immediate = { + random_character_active_contract = { + task_contract_type = overdue_taxes + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = tax_destination + } + } + } + + option = { + name = governor_contract_event.1001.a + + duel = { + skill = diplomacy + value = 10 + 60 = { + desc = governor_contract_event.1001.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + save_scope_value_as = { + name = governor_contract_event_1003_diplomacy + value = yes + } + trigger_event = { + id = governor_contract_event.1003 + } + custom_tooltip = governor_contract_event.1001.success + } + 40 = { + desc = governor_contract_event.1001.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + trigger_event = { + id = governor_contract_event.1004 + } + custom_tooltip = governor_contract_event.1001.failure + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = education_diplomacy + } + modifier = { + factor = 2 + has_trait = patient + } + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 1.5 + has_trait = trusting + } + modifier = { + factor = 1.5 + has_trait = compassionate + } + } + } + + option = { + name = governor_contract_event.1001.b + + duel = { + skill = stewardship + value = 10 + 60 = { + desc = governor_contract_event.1001.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + save_scope_value_as = { + name = governor_contract_event_1003_stewardship + value = yes + } + trigger_event = { + id = governor_contract_event.1003 + } + custom_tooltip = governor_contract_event.1001.success + } + 40 = { + desc = governor_contract_event.1001.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + trigger_event = { + id = governor_contract_event.1004 + } + custom_tooltip = governor_contract_event.1001.failure + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = education_stewardship + } + modifier = { + factor = 2 + has_trait = greedy + } + modifier = { + factor = 2 + has_trait = diligent + } + modifier = { + factor = 1.5 + has_trait = shy + } + modifier = { + factor = 1.5 + has_trait = paranoid + } + } + } +} + +# Success event +governor_contract_event.1003 = { + type = character_event + title = governor_contract_event.1003.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:governor_contract_event_1003_diplomacy + } + desc = governor_contract_event.1003.desc_diplomacy + } + triggered_desc = { + trigger = { + exists = scope:governor_contract_event_1003_stewardship + } + desc = governor_contract_event.1003.desc_stewardship + } + } + desc = governor_contract_event.1003.desc_outro + } + theme = administrative + left_portrait = { + character = root + animation = thinking + } + override_background = { + trigger = { + root.location = { graphical_wilderness_desert_trigger = yes } + } + reference = wilderness_desert + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + NOR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = ep2_hunt_forest_hut + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + OR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = wilderness_forest + } + override_background = { + trigger = { + root.location = { graphical_wilderness_jungle_trigger = yes } + } + reference = wilderness_jungle + } + + override_background = { + trigger = { + root.location = { graphical_wilderness_steppe_trigger = yes } + } + reference = ep2_travel_settlement_steppe + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county = { + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + holder ?= { mpo_can_recruit_nomad_maa_trigger = yes } + } + } + } + } + reference = ep2_travel_nomad_settlement_desert + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county = { + NOR = { + culture = { culture_has_archer_cavalry_maa = yes } + holder ?= { mpo_can_recruit_nomad_maa_trigger = yes } + } + } + } + } + reference = ep2_travel_settlement_desert + } + override_background = { + trigger = { + root.location = { graphical_hills_trigger = yes } + } + reference = ep2_travel_settlement_hills + } + override_background = { + trigger = { + root.location = { graphical_wilderness_mountains_trigger = yes } + } + reference = ep2_travel_settlement_mountains + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = farmlands + terrain = plains + terrain = floodplains + } + } + } + reference = ep2_travel_settlement_farm + } + + immediate = { + generate_governance_outcome_effect = { OPTIONS = 6 } + } + + option = { # Special governor trait option + name = governor_contract_event.1003.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = taxes_governor + } + } + option = { + name = governor_contract_event.1003.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = taxes_paid_in_full + } + } + option = { + name = governor_contract_event.1003.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = taxes_paid_partially + } + } + option = { + name = governor_contract_event.1003.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = taxes_station_troops + } + } + option = { + name = governor_contract_event.1003.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = taxes_assign_administrator + } + } + option = { + name = governor_contract_event.1003.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = taxes_lower_taxes + } + } +} + +# Failure +governor_contract_event.1004 = { + type = character_event + title = governor_contract_event.1004.t + desc = governor_contract_event.1004.desc + theme = administrative + left_portrait = { + character = root + animation = dismissal + } + override_background = { + trigger = { + root.location = { graphical_wilderness_desert_trigger = yes } + } + reference = wilderness_desert + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + NOR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = ep2_hunt_forest_hut + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + OR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = wilderness_forest + } + override_background = { + trigger = { + root.location = { graphical_wilderness_jungle_trigger = yes } + } + reference = wilderness_jungle + } + + override_background = { + trigger = { + root.location = { graphical_wilderness_steppe_trigger = yes } + } + reference = ep2_travel_settlement_steppe + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county.culture = { + culture_has_archer_cavalry_maa = yes + } + } + } + reference = ep2_travel_nomad_settlement_desert + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county.culture = { + NOT = { culture_has_archer_cavalry_maa = yes } + } + } + } + reference = ep2_travel_settlement_desert + } + override_background = { + trigger = { + root.location = { graphical_hills_trigger = yes } + } + reference = ep2_travel_settlement_hills + } + override_background = { + trigger = { + root.location = { graphical_wilderness_mountains_trigger = yes } + } + reference = ep2_travel_settlement_mountains + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = farmlands + terrain = plains + terrain = floodplains + } + } + } + reference = ep2_travel_settlement_farm + } + + option = { + name = governor_contract_event.1004.a + scope:ongoing_contract ?= { + complete_task_contract = failure_standard + } + } +} + +### Hoarding Mayor +# Intro event +governor_contract_event.1010 = { + type = character_event + title = governor_contract_event.1010.t + desc = governor_contract_event.1010.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = hoarding_mayor + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = mayor_destination + } + + # Save the employer + task_contract_employer = { + save_scope_as = hoarding_mayor + } + } + } + + option = { + name = governor_contract_event.1010.a + + custom_tooltip = governor_contract_event.1010.a_tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:mayor_destination + ARRIVAL_EVENT = governor_contract_event.1011 + } + } +} + +# Arrival at mayor's residence +governor_contract_event.1011 = { + type = character_event + title = governor_contract_event.1010.t + desc = { + desc = governor_contract_event.1011.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:hoarding_mayor = { + OR = { + has_trait = craven + has_trait = shy + } + } + } + desc = governor_contract_event.1011.desc_fear + } + triggered_desc = { + trigger = { + scope:hoarding_mayor = { + OR = { + has_trait = brave + has_trait = arrogant + has_trait = greedy + } + } + } + desc = governor_contract_event.1011.desc_upset + } + desc = governor_contract_event.1011.desc_worried + } + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = debating + } + right_portrait = { + character = scope:hoarding_mayor + triggered_animation = { + trigger = { + scope:hoarding_mayor = { + OR = { + has_trait = craven + has_trait = shy + } + } + } + animation = fear + } + triggered_animation = { + trigger = { + scope:hoarding_mayor = { + OR = { + has_trait = brave + has_trait = arrogant + has_trait = greedy + } + } + } + animation = anger + } + animation = shock + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = hoarding_mayor + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = mayor_destination + } + + # Save the employer + task_contract_employer = { + save_scope_as = hoarding_mayor + } + } + + generate_governance_outcome_effect = { OPTIONS = 6 } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + } + + option = { # Special governor trait option + name = governor_contract_event.1011.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = mayor_governor + } + } + option = { + name = governor_contract_event.1011.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = mayor_claim_gold + } + } + option = { + name = governor_contract_event.1011.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = mayor_invest_in_buildings + } + } + option = { + name = governor_contract_event.1011.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = mayor_hold_festivities + } + } + option = { + name = governor_contract_event.1011.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = mayor_reprimand + } + } + option = { + name = governor_contract_event.1011.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = mayor_hook + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +# Cancel travel plan confirmation - Do you really want to forgoe the contract? +governor_contract_event.1012 = { + type = character_event + title = governor_contract_event.1012.t + desc = governor_contract_event.1012.desc + theme = administrative + left_portrait = { + character = root + animation = thinking + } + + immediate = { + # Save the contract + random_character_active_contract = { + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + + # Save the employer + task_contract_employer ?= { + save_scope_as = contract_employer + } + + # Save your character + task_contract_taker = { + save_scope_as = contract_taker + } + } + } + + option = { # On second thought, let's go! + name = governor_contract_event.1012.a + custom_tooltip = governor_contract_event.1012.a_tt + start_travel_plan = { + destination = scope:ongoing_destination + on_arrival_event = governor_contract_event.1013 + on_travel_planner_cancel_event = governor_contract_event.1012 + on_arrival_destinations = all_but_last + } + } + + option = { # I have more important matters to deal with. + name = governor_contract_event.1012.b + + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } +} + +governor_contract_event.1013 = { + hidden = yes + + immediate = { + scope:ongoing_contract = { + switch = { + trigger = has_task_contract_type + overdue_taxes = { + scope:contract_taker = { trigger_event = governor_contract_event.1001 } + } + hoarding_mayor = { + scope:contract_taker = { trigger_event = governor_contract_event.1011 } + } + rampant_bandits = { + scope:contract_taker = { trigger_event = governor_contract_event.1031 } + } + inept_mayor = { + scope:contract_taker = { trigger_event = governor_contract_event.2011 } + } + raiding_peasants = { + scope:contract_taker = { trigger_event = governor_contract_event.2031 } + } + wild_predators = { + scope:contract_taker = { trigger_event = governor_contract_event.2041 } + } + evil_presence = { + scope:contract_taker = { trigger_event = governor_contract_event.2051 } + } + buried_treasure = { + scope:contract_taker = { trigger_event = governor_contract_event.2071 } + } + public_land = { + scope:contract_taker = { trigger_event = governor_contract_event.2081 } + } + mad_prophet = { + scope:contract_taker = { trigger_event = governor_contract_event.2091 } + } + hungry_times = { + scope:contract_taker = { trigger_event = governor_contract_event.2111 } + } + } + } + } +} + +### Bountiful Harvest +# Intro event +governor_contract_event.1020 = { + type = character_event + title = governor_contract_event.1020.t + desc = governor_contract_event.1020.desc + theme = administrative + override_background = { reference = bp1_wine_cellar } + left_portrait = { + character = root + animation = happiness + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = bountiful_harvest + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = mayor_destination + } + } + + generate_governance_outcome_effect = { OPTIONS = 6 } + } + + option = { # Special governor trait option + name = governor_contract_event.1020.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = harvest_governor + } + } + option = { + name = governor_contract_event.1020.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = harvest_distribute + } + } + option = { + name = governor_contract_event.1020.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = harvest_capital + } + } + option = { + name = governor_contract_event.1020.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = harvest_charity + } + } + option = { + name = governor_contract_event.1020.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = harvest_sell_excess + } + } + option = { + name = governor_contract_event.1020.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = harvest_claim_it_yourself + } + } +} + +### Rampaging Bandits +# Intro event +governor_contract_event.1030 = { + type = character_event + title = governor_contract_event.1030.t + desc = governor_contract_event.1030.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = rampant_bandits + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = bandit_destination + } + } + + show_as_tooltip = { # To make sure the player sees it + scope:bandit_destination.county = { + add_county_modifier = { + modifier = ep3_governance_rampant_bandits + years = 40 + } + } + } + } + + option = { + name = governor_contract_event.1030.a + + custom_tooltip = governor_contract_event.1038.a_tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:bandit_destination + ARRIVAL_EVENT = governor_contract_event.1031 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at bandit camp +governor_contract_event.1031 = { + type = character_event + title = governor_contract_event.1030.t + desc = governor_contract_event.1031.desc + theme = administrative + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = marshal + } + + immediate = { + add_character_flag = need_military_outfit + # Save the contract + random_character_active_contract = { + task_contract_type = rampant_bandits + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = bandit_destination + } + } + + hidden_effect = { + current_travel_plan ?= { + delay_travel_plan = { days = 180 } + } + } + } + + option = { # Overwhelm the bandits! + name = governor_contract_event.1031.a + + random_list = { + 60 = { # Success + trigger_event = { + id = governor_contract_event.1032 + days = 3 + } + custom_tooltip = governor_contract_event.1031.success + + modifier = { + factor = 1.2 + has_trait = brave + } + modifier = { + factor = 1.2 + has_trait = reckless + } + modifier = { + factor = 1.2 + has_trait = aggressive_attacker + } + modifier = { + factor = 1.4 + OR = { + has_trait = zealous + has_trait = holy_warrior + } + scope:bandit_destination.county = { + faith != root.faith + } + } + } + 40 = { # Failure + trigger_event = { + id = governor_contract_event.1033 + days = 3 + } + custom_tooltip = governor_contract_event.1031.failure + + modifier = { + factor = 1.2 + scope:ongoing_contract.task_contract_tier >= define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER + scope:ongoing_contract.task_contract_tier < define:NTaskContract|HIGH_TASK_CONTRACT_TIER + } + modifier = { + factor = 1.4 + scope:ongoing_contract.task_contract_tier >= define:NTaskContract|HIGH_TASK_CONTRACT_TIER + } + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = brave + } + modifier = { + factor = 2 + has_trait = reckless + } + modifier = { + factor = 1.5 + has_trait = aggressive_attacker + } + modifier = { + factor = 1.5 + has_trait = wrathful + } + } + } + + option = { # Let's lay out a tactic before we attack. + name = governor_contract_event.1031.b + + duel = { + skill = martial + value = 10 + 60 = { + desc = governor_contract_event.1031.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + save_scope_value_as = { + name = governor_contract_event_1031_tactical + value = yes + } + trigger_event = { + id = governor_contract_event.1032 + days = 3 + } + custom_tooltip = governor_contract_event.1031.success + } + 40 = { + desc = governor_contract_event.1031.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + trigger_event = { + id = governor_contract_event.1033 + days = 3 + } + custom_tooltip = governor_contract_event.1031.failure + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = education_martial + } + modifier = { + factor = 2 + has_trait = patient + } + modifier = { + factor = 1.5 + has_trait = ambitious + } + } + } + + option = { # Lure them into a trap. + name = governor_contract_event.1031.c + + duel = { + skill = intrigue + value = 10 + 60 = { + desc = governor_contract_event.1031.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + save_scope_value_as = { + name = governor_contract_event_1031_trap + value = yes + } + trigger_event = { + id = governor_contract_event.1032 + days = 3 + } + custom_tooltip = governor_contract_event.1031.success + } + 40 = { + desc = governor_contract_event.1031.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + trigger_event = { + id = governor_contract_event.1033 + days = 3 + } + custom_tooltip = governor_contract_event.1031.failure + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = education_intrigue + } + modifier = { + factor = 2 + has_trait = deceitful + } + modifier = { + factor = 1.5 + has_trait = paranoid + } + modifier = { + factor = 1.5 + has_trait = craven + } + } + } +} + +# Success! +governor_contract_event.1032 = { + type = character_event + title = governor_contract_event.1030.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:governor_contract_event_1031_tactical + } + desc = governor_contract_event.1032.desc_tactical + } + triggered_desc = { + trigger = { + exists = scope:governor_contract_event_1031_trap + } + desc = governor_contract_event.1032.desc_trap + } + desc = governor_contract_event.1032.desc_charge + } + desc = governor_contract_event.1032.desc_outro + } + theme = administrative + override_background = { reference = ep2_hunt_poachers_camp } + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:governor_contract_event_1031_tactical + } + animation = inspect_weapon + } + triggered_animation = { + trigger = { + exists = scope:governor_contract_event_1031_trap + } + animation = scheme + } + animation = celebrate_sword + camera = camera_event_left_forward + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = rampant_bandits + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = bandit_destination + } + } + + generate_governance_outcome_effect = { OPTIONS = 6 } + + scope:bandit_destination.county = { + if = { + limit = { + has_county_modifier = ep3_governance_rampant_bandits + } + remove_county_modifier = ep3_governance_rampant_bandits + } + } + } + + option = { # Special governor trait option + name = governor_contract_event.1032.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = bandit_governor + } + } + option = { + name = governor_contract_event.1032.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = bandit_pardon + } + } + option = { + name = governor_contract_event.1032.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = bandit_recruit + } + } + option = { + name = governor_contract_event.1032.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = bandit_payment + } + } + option = { + name = governor_contract_event.1032.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = bandit_execute + } + } + option = { + name = governor_contract_event.1032.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = bandit_gold + } + } + + after = { + hidden_effect = { + #current_travel_plan ?= { resume_travel_plan = yes } + } + current_travel_plan ?= { resume_travel_plan = yes } + remove_character_flag = need_military_outfit + } +} + +# Failure! +governor_contract_event.1033 = { + type = character_event + title = governor_contract_event.1030.t + desc = governor_contract_event.1033.desc + theme = administrative + override_background = { reference = ep2_hunt_poachers_camp } + left_portrait = { + character = root + animation = debating + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = rampant_bandits + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = bandit_destination + } + } + } + + option = { + name = governor_contract_event.1033.a + + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + current_travel_plan ?= { resume_travel_plan = yes } + } + + after = { + hidden_effect = { + #current_travel_plan ?= { resume_travel_plan = yes } + } + remove_character_flag = need_military_outfit + } +} + +### Discontent Soldiers +# Intro event +governor_contract_event.2000 = { + type = character_event + title = governor_contract_event.2000.t + desc = governor_contract_event.2000.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = discontent_soldiers + save_scope_as = ongoing_contract + } + random_neighboring_and_across_water_realm_same_rank_owner = { + limit = { liege = root.liege } + save_scope_as = other_gov + } + scope:ongoing_contract = { # Save other gov for reward effects + set_variable = { + name = other_gov + value = scope:other_gov + } + } + generate_governance_outcome_effect = { OPTIONS = 5 } + } + + option = { # Special governor trait option + name = governor_contract_event.2000.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = soldiers_land + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2000.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = soldiers_rival + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } + option = { + name = governor_contract_event.2000.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = soldiers_break + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + option = { + name = governor_contract_event.2000.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = soldiers_punish + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_greed = 0.5 + } + } + } + option = { + name = governor_contract_event.2000.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = soldiers_pay + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } +} + +### Inept Mayor +# Intro event +governor_contract_event.2010 = { + type = character_event + title = governor_contract_event.2010.t + desc = governor_contract_event.2010.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = inept_mayor + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = mayor_destination + } + + # Save the employer + task_contract_employer = { + save_scope_as = inept_mayor + } + } + } + + option = { + name = governor_contract_event.2010.a + custom_tooltip = governor_contract_event.1010.a_tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:mayor_destination + ARRIVAL_EVENT = governor_contract_event.2011 + } + } +} + +# Arrival at mayor's residence +governor_contract_event.2011 = { + type = character_event + title = governor_contract_event.2010.t + desc = { + desc = governor_contract_event.2011.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:inept_mayor = { + OR = { + has_trait = lazy + has_trait = craven + has_trait = loyal + has_trait = contrite + has_trait = honest + } + } + } + desc = governor_contract_event.2011.desc_fear + } + triggered_desc = { + trigger = { + scope:inept_mayor = { + OR = { + has_trait = brave + has_trait = arrogant + has_trait = diligent + } + } + } + desc = governor_contract_event.2011.desc_upset + } + desc = governor_contract_event.2011.desc_worried + } + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = debating + } + right_portrait = { + character = scope:inept_mayor + triggered_animation = { + trigger = { + scope:inept_mayor = { + OR = { + has_trait = craven + has_trait = shy + } + } + } + animation = fear + } + triggered_animation = { + trigger = { + scope:inept_mayor = { + OR = { + has_trait = brave + has_trait = arrogant + has_trait = greedy + } + } + } + animation = anger + } + animation = shock + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = inept_mayor + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = mayor_destination + } + + # Save the employer + task_contract_employer = { + save_scope_as = inept_mayor + } + } + + generate_governance_outcome_effect = { OPTIONS = 4 } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + } + + option = { # Special governor trait option + name = governor_contract_event.2011.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = mayor_in_govt + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2011.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = mayor_in_fire + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + option = { + name = governor_contract_event.2011.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = mayor_in_help + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + option = { + name = governor_contract_event.2011.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = mayor_in_punish + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +### Provincial Investment +# Intro event +governor_contract_event.2020 = { + type = character_event + title = governor_contract_event.2020.t + desc = governor_contract_event.2020.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = betting + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = prov_investment + save_scope_as = ongoing_contract + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + liege = { save_scope_as = emperor } + generate_governance_outcome_effect = { OPTIONS = 6 } + } + + option = { # Special governor trait option + name = governor_contract_event.2020.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = invest_infrastructure + } + add_character_flag = { + flag = admin_invest_infrastructure + days = 5 + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2020.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = invest_church + } + add_character_flag = { + flag = admin_invest_church + days = 5 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + option = { + name = governor_contract_event.2020.c + flavor = governor_contract_event.2020.c_tt + trigger = { exists = scope:governance_option_c } + duel = { + skill = intrigue + value = average_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = governor + add = 25 + } + save_scope_value_as = { + name = governor_contract_event_2020_duel + value = flag:invest_monument + } + desc = governor_contract_event.2020.success + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = invest_monument + } + } + add_character_flag = { + flag = admin_invest_monument_success + days = 5 + } + trigger_event = governor_contract_event.2021 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = governor_contract_event.2020.failure + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + add_character_flag = { + flag = admin_invest_monument_fail + days = 5 + } + trigger_event = governor_contract_event.2022 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + } + } + } + option = { + name = governor_contract_event.2020.d + trigger = { exists = scope:governance_option_d } + duel = { + skill = stewardship + value = average_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = governor + add = 25 + } + save_scope_value_as = { + name = governor_contract_event_2020_duel + value = flag:invest_traders + } + desc = governor_contract_event.2020.success + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = invest_traders + } + } + add_character_flag = { + flag = admin_invest_traders_success + days = 5 + } + trigger_event = governor_contract_event.2021 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = governor_contract_event.2020.failure + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + add_character_flag = { + flag = admin_invest_traders_fail + days = 5 + } + trigger_event = governor_contract_event.2022 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + option = { + name = governor_contract_event.2020.e + trigger = { exists = scope:governance_option_e } + duel = { + skill = martial + value = average_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = governor + add = 25 + } + save_scope_value_as = { + name = governor_contract_event_2020_duel + value = flag:invest_military + } + desc = governor_contract_event.2020.success + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = invest_military + } + } + add_character_flag = { + flag = admin_invest_military_success + days = 5 + } + + trigger_event = governor_contract_event.2021 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = governor_contract_event.2020.failure + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + add_character_flag = { + flag = admin_invest_military_fail + days = 5 + } + + trigger_event = governor_contract_event.2022 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_boldness = 0.5 + } + } + } + option = { + name = governor_contract_event.2020.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = invest_food + } + add_character_flag = { + flag = admin_invest_food + days = 5 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } +} + +#Success +governor_contract_event.2021 = { + type = character_event + title = governor_contract_event.2021.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = admin_invest_infrastructure + } + desc = governor_contract_event.2021.desc_infrastructure + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_church + } + desc = governor_contract_event.2021.desc_church + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_monument_success + } + desc = governor_contract_event.2021.desc_monument + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_traders_success + } + desc = governor_contract_event.2021.desc_traders + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_military_success + } + desc = governor_contract_event.2021.desc_military + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_food + } + desc = governor_contract_event.2021.desc_food + } + } + desc = governor_contract_event.2021.desc + } + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = personality_bold + } + + option = { + name = governor_contract_event.2021.a + if = { + limit = { + scope:governor_contract_event_2020_duel ?= flag:invest_monument + } + scope:ongoing_contract = { + complete_task_contract = invest_monument + } + } + else_if = { + limit = { + scope:governor_contract_event_2020_duel ?= flag:invest_traders + } + scope:ongoing_contract = { + complete_task_contract = invest_traders + } + } + else_if = { + limit = { + scope:governor_contract_event_2020_duel ?= flag:invest_military + } + scope:ongoing_contract = { + complete_task_contract = invest_military + } + } + } +} + +#Failure +governor_contract_event.2022 = { + type = character_event + title = governor_contract_event.2022.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = admin_invest_monument_fail + } + desc = governor_contract_event.2022.desc_monument + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_traders_fail + } + desc = governor_contract_event.2022.desc_traders + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_military_fail + } + desc = governor_contract_event.2022.desc_military + } + } + desc = governor_contract_event.2022.desc + } + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = disapproval + } + + option = { + name = governor_contract_event.2022.a + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } +} + +### Raiding Peasants +# Intro event +governor_contract_event.2030 = { + type = character_event + title = governor_contract_event.2030.t + desc = governor_contract_event.2030.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = raiding_peasants + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + scope:ongoing_destination.county = { + random_neighboring_county = { + limit = { + holder.top_liege = { + this != root.top_liege + } + } + holder.top_liege = { save_scope_as = neighbor } + } + } + } + + option = { + name = governor_contract_event.2030.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2031 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the village +governor_contract_event.2031 = { + type = character_event + title = governor_contract_event.2030.t + desc = governor_contract_event.2031.desc + theme = administrative + override_background = { reference = ep2_hunt_poachers_camp } + left_portrait = { + character = root + animation = debating + } + right_portrait = { + character = scope:peasant + animation = celebrate_spear + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = raiding_peasants + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + hidden_effect = { + random_pool_character = { + province = root.location + limit = { + has_dynasty = no + martial >= 8 + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + save_scope_as = peasant + } + scope:peasant ?= { add_trait = peasant_leader } + if = { + limit = { + NOT = { exists = scope:peasant } + } + create_character = { + template = peasant_faction_leader_template + location = root.location + culture = scope:ongoing_destination.county.culture + faith = scope:ongoing_destination.county.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = peasant + } + if = { + limit = { + is_ai = yes + } + scope:peasant = { add_character_flag = generated } + } + } + } + + generate_governance_outcome_effect = { OPTIONS = 5 } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + } + + option = { # Special governor trait option + name = governor_contract_event.2031.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:peasant = { add_to_court_and_entourage_only_effect = yes } + if = { + limit = { + maa_regiments_count < maa_regiments_max_count + } + create_maa_regiment = { + type = light_footmen + check_can_recruit = yes + size = 3 + } + } + scope:ongoing_contract = { + complete_task_contract = peasant_enroll + } + scope:peasant = { + remove_character_flag = generated + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2031.b + trigger = { exists = scope:governance_option_b } + scope:peasant = { + death = { death_reason = death_execution killer = root } + } + scope:ongoing_contract = { + complete_task_contract = peasant_punish + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + } + } + option = { + name = governor_contract_event.2031.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = peasant_encourage + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + } + } + } + option = { + name = governor_contract_event.2031.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = peasant_work + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + option = { + name = governor_contract_event.2031.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = peasant_take + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + if = { + limit = { + scope:peasant ?= { has_character_flag = generated } + } + scope:peasant = { silent_disappearance_effect = yes } + } + } + } +} + +### Wild Predators +# Intro event +governor_contract_event.2040 = { + type = character_event + title = governor_contract_event.2040.t + desc = governor_contract_event.2040.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = wild_predators + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + select_local_animal_effect = { TYPE = prowling } + } + + option = { + name = governor_contract_event.2040.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2041 + } + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2041 = { + type = character_event + title = governor_contract_event.2040.t + desc = governor_contract_event.2041.desc + theme = administrative + override_background = { reference = ep2_hunt_poachers_camp } + left_portrait = { + character = root + animation = personality_bold + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = wild_predators + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + generate_governance_outcome_effect = { OPTIONS = 6 } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + } + + option = { # Special governor trait option + name = governor_contract_event.2041.a + flavor = governor_contract_event.2041.a.tt + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = predators_poisoners + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2041.b + trigger = { exists = scope:governance_option_b } + duel = { + skill = prowess + value = decent_skill_rating + 50 = { + desc = governor_contract_event.2041.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = lifestyle_hunter + add = 20 + } + modifier = { + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= trait_second_level + } + add = 20 + } + save_scope_value_as = { + name = governor_contract_event_2041_duel + value = flag:predators_hunt + } + trigger_event = governor_contract_event.2042 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = predators_hunt + } + } + } + 50 = { + desc = governor_contract_event.2041.b.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + trigger_event = governor_contract_event.2043 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + increase_wounds_no_death_effect = { REASON = wild_animal } + } + add_character_flag = { + flag = governor_contract_event_2043_wounded + days = 5 + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + option = { + name = governor_contract_event.2041.c + trigger = { exists = scope:governance_option_c } + duel = { + skill = stewardship + value = average_skill_rating + 50 = { + desc = governor_contract_event.2041.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2041_duel + value = flag:predators_hunters + } + trigger_event = governor_contract_event.2042 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = predators_hunters + } + } + } + 50 = { + desc = governor_contract_event.2041.c.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + trigger_event = governor_contract_event.2043 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = -0.5 + } + } + } + option = { + name = governor_contract_event.2041.d + trigger = { exists = scope:governance_option_d } + random_list = { + 50 = { + desc = governor_contract_event.2041.d.success + modifier = { + scope:ongoing_destination.county = { + development_level >= medium_development_level + } + add = 10 + } + modifier = { + add = scope:ongoing_destination.holder.prowess + exists = scope:ongoing_destination.holder + } + save_scope_value_as = { + name = governor_contract_event_2041_duel + value = flag:predators_locals + } + trigger_event = governor_contract_event.2042 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = predators_locals + } + } + } + 50 = { + desc = governor_contract_event.2041.d.fail + modifier = { + scope:ongoing_destination.county = { + development_level <= bad_development_level + } + add = 10 + } + trigger_event = governor_contract_event.2043 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + option = { + name = governor_contract_event.2041.e + flavor = governor_contract_event.2041.e.tt + trigger = { exists = scope:governance_option_e } + duel = { + skill = martial + value = decent_skill_rating + 50 = { + desc = governor_contract_event.2041.e.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2041_duel + value = flag:predators_capture + } + trigger_event = governor_contract_event.2042 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = predators_capture + } + } + } + 50 = { + desc = governor_contract_event.2041.e.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + trigger_event = governor_contract_event.2043 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = -0.5 + } + } + } + option = { + name = governor_contract_event.2041.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = predators_preys + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_greed = -0.5 + } + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +#Success +governor_contract_event.2042 = { + type = character_event + title = governor_contract_event.2040.t + desc = governor_contract_event.2042.desc + theme = administrative + override_background = { reference = ep2_hunt_poachers_camp } + left_portrait = { + character = root + animation = personality_bold + } + + option = { + name = governor_contract_event.2042.a + scope:ongoing_contract = { + if = { + limit = { + scope:governor_contract_event_2041_duel ?= flag:predators_hunt + } + complete_task_contract = predators_hunt + } + else_if = { + limit = { + scope:governor_contract_event_2041_duel ?= flag:predators_hunters + } + complete_task_contract = predators_hunters + } + else_if = { + limit = { + scope:governor_contract_event_2041_duel ?= flag:predators_locals + } + complete_task_contract = predators_locals + } + else_if = { + limit = { + scope:governor_contract_event_2041_duel ?= flag:predators_capture + } + complete_task_contract = predators_capture + } + } + } +} + +#Failure +governor_contract_event.2043 = { + type = character_event + title = governor_contract_event.2040.t + desc = governor_contract_event.2043.desc + theme = administrative + override_background = { + trigger = { + has_character_flag = governor_contract_event_2043_wounded + } + reference = wilderness + } + override_background = { + trigger = { + NOT = { has_character_flag = governor_contract_event_2043_wounded } + } + reference = ep2_hunt_poachers_camp + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_character_flag = governor_contract_event_2043_wounded + } + animation = stayback + } + triggered_animation = { + trigger = { + NOT = { + has_character_flag = governor_contract_event_2043_wounded + } + } + animation = disapproval + } + } + + option = { + name = governor_contract_event.2043.a + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + if = { + limit = { + has_character_flag = governor_contract_event_2043_wounded + } + increase_wounds_no_death_effect = { REASON = wild_animal } + } + } +} + +### Evil Presence +# Intro event +governor_contract_event.2050 = { + type = character_event + title = governor_contract_event.2050.t + desc = { + desc = governor_contract_event.2050.desc + random_valid = { + desc = governor_contract_event.2051.desc_a + desc = governor_contract_event.2051.desc_b + desc = governor_contract_event.2051.desc_c + desc = governor_contract_event.2051.desc_d + desc = governor_contract_event.2051.desc_e + } + random_valid = { + desc = governor_contract_event.2051.desc_f + desc = governor_contract_event.2051.desc_g + desc = governor_contract_event.2051.desc_h + desc = governor_contract_event.2051.desc_i + } + random_valid = { + desc = governor_contract_event.2051.desc_l + desc = governor_contract_event.2051.desc_m + desc = governor_contract_event.2051.desc_n + desc = governor_contract_event.2051.desc_o + desc = governor_contract_event.2051.desc_p + desc = governor_contract_event.2051.desc_q + } + desc = governor_contract_event.2051.desc_end + } + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = evil_presence + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + } + + option = { + name = governor_contract_event.2050.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2051 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2051 = { + type = character_event + title = governor_contract_event.2050.t + desc = governor_contract_event.2051.desc + theme = administrative + override_background = { reference = ep2_hunt_foggy_forest } + override_effect_2d = { reference = fog } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = evil_presence + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + generate_governance_outcome_effect = { OPTIONS = 5 } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + } + + option = { # Special governor trait option + name = governor_contract_event.2051.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = presence_official + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2051.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = presence_exorcize + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + option = { + name = governor_contract_event.2051.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = presence_sorcerer + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.5 + ai_rationality = -0.5 + } + } + } + option = { + name = governor_contract_event.2051.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = presence_local + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_sociability = 0.5 + } + } + } + option = { + name = governor_contract_event.2051.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = presence_rationalize + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +### Miraculous Healing +# Intro event +governor_contract_event.2060 = { + type = character_event + title = governor_contract_event.2060.t + desc = governor_contract_event.2060.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:scammer + animation = beg + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = miraculous_healing + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + random_pool_character = { + province = scope:ongoing_destination + limit = { + is_adult = yes + OR = { + has_trait = eccentric + has_trait = deceitful + has_trait = zealous + has_trait = lifestyle_mystic + } + intrigue >= 12 + } + save_scope_as = scammer + } + if = { + limit = { + NOT = { exists = scope:scammer } + } + create_character = { + location = root.location + template = scammer_template + save_scope_as = scammer + after_creation = { + add_character_flag = created + } + } + } + generate_governance_outcome_effect = { OPTIONS = 6 } + scope:scammer = { assign_quirk_effect = yes } + } + + option = { # Special governor trait option + name = governor_contract_event.2060.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = healing_example + } + # We blind the scammer as punishment + scope:scammer = { add_trait = blind } + + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2060.b + trigger = { exists = scope:governance_option_b } + scope:scammer = { remove_character_flag = created_character } + add_courtier = scope:scammer + scope:ongoing_contract = { + complete_task_contract = healing_hire + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = -0.5 + } + } + } + option = { + name = governor_contract_event.2060.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = healing_relic + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + ai_greed = 0.5 + } + } + } + option = { + name = governor_contract_event.2060.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = healing_fine + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + option = { + name = governor_contract_event.2060.e + trigger = { exists = scope:governance_option_e } + scope:scammer = { remove_character_flag = created_character } + rightfully_imprison_character_effect = { + TARGET = scope:scammer + IMPRISONER = root + } + scope:ongoing_contract = { + complete_task_contract = healing_imprison + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + option = { + name = governor_contract_event.2060.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = healing_faith + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + after = { + scope:scammer = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +### Buried Treasure +# Intro event +governor_contract_event.2070 = { + type = character_event + title = governor_contract_event.2070.t + desc = governor_contract_event.2070.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = buried_treasure + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + } + + option = { + name = governor_contract_event.2070.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2071 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2071 = { + type = character_event + title = governor_contract_event.2070.t + desc = { + desc = governor_contract_event.2071.desc + first_valid = { + triggered_desc = { + trigger = { + liege = { has_title = title:e_byzantium } + } + desc = governor_contract_event.2071.desc.byz + } + desc = governor_contract_event.2071.desc.fallback + } + desc = governor_contract_event.2071.desc.end + } + theme = administrative + override_background = { reference = market } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + character = scope:peasant + animation = beg + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = buried_treasure + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + + random_pool_character = { + province = scope:ongoing_destination + limit = { + is_adult = yes + has_dynasty = no + } + save_scope_as = peasant + } + if = { + limit = { + NOT = { exists = scope:peasant } + } + create_character = { + location = root.location + template = generic_peasant_character + save_scope_as = peasant + } + if = { + limit = { + is_ai = yes + } + scope:peasant = { add_character_flag = created_character } + } + } + hidden_effect = { + scope:peasant = { add_gold = root.medium_gold_value } + } + generate_governance_outcome_effect = { OPTIONS = 5 } + } + + option = { # Special governor trait option + name = governor_contract_event.2071.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = treasure_invest + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2071.b + trigger = { exists = scope:governance_option_b } + scope:peasant = { + pay_treasury_or_gold = { + target = root + value = root.minor_treasury_or_gold_value + } + } + scope:ongoing_contract = { + complete_task_contract = treasure_tax + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + option = { + name = governor_contract_event.2071.c + trigger = { exists = scope:governance_option_c } + scope:peasant = { + pay_treasury_or_gold = { + target = root + value = root.medium_treasury_or_gold_value + } + } + scope:ongoing_contract = { + complete_task_contract = treasure_commandeer + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_honor = -0.5 + } + } + } + option = { + name = governor_contract_event.2071.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = treasure_acknowledge + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + option = { + name = governor_contract_event.2071.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = treasure_distribute + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + after = { + scope:peasant = { + if = { + limit = { + has_character_flag = created_character + } + silent_disappearance_effect = yes + } + } + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +### Public Land +# Intro event +governor_contract_event.2080 = { + type = character_event + title = governor_contract_event.2080.t + desc = governor_contract_event.2080.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + lower_right_portrait = scope:magnate + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = public_land + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + task_contract_employer = { + save_scope_as = magnate + } + } + } + + option = { + name = governor_contract_event.2080.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2081 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2081 = { + type = character_event + title = governor_contract_event.2080.t + desc = governor_contract_event.2081.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:magnate + animation = beg + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = buried_treasure + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + task_contract_employer = { + save_scope_as = magnate + } + } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + + generate_governance_outcome_effect = { OPTIONS = 5 } + } + + option = { # Special governor trait option + name = governor_contract_event.2081.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:magnate = { + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -20 + } + } + scope:ongoing_contract = { + complete_task_contract = land_reinstate + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2081.b + trigger = { exists = scope:governance_option_b } + scope:magnate = { + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -20 + } + } + scope:ongoing_contract = { + complete_task_contract = land_confiscate + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + option = { + name = governor_contract_event.2081.c + trigger = { exists = scope:governance_option_c } + scope:magnate = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + } + scope:ongoing_contract = { + complete_task_contract = land_bribe + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_honor = -0.5 + } + } + } + option = { + name = governor_contract_event.2081.d + trigger = { exists = scope:governance_option_d } + add_hook = { + target = scope:magnate + type = favor_hook + } + scope:ongoing_contract = { + complete_task_contract = land_favor + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + } + } + option = { + name = governor_contract_event.2081.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = land_people + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +### The Mad Prophet +# Intro event +governor_contract_event.2090 = { + type = character_event + title = governor_contract_event.2090.t + desc = governor_contract_event.2090.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = mad_prophet + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + } + + option = { + name = governor_contract_event.2090.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2091 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2091 = { + type = character_event + title = governor_contract_event.2090.t + desc = governor_contract_event.2091.desc + theme = administrative + override_background = { + trigger = { + location.county.culture = { + OR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + location.barony.holder = { + NOT = { government_has_flag = government_is_tribal } + } + } + reference = ep3_city_gate + } + override_background = { + trigger = { + OR = { + location.county.culture = { + NOR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + location.barony.holder = { + government_has_flag = government_is_tribal + } + } + } + reference = market + } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:prophet + animation = rage + outfit_tags = { beggar_rags } + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = mad_prophet + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_trait = zealous + learning >= 12 + faith = scope:ongoing_destination.county.faith + } + save_scope_as = prophet + } + if = { + limit = { + NOT = { exists = scope:prophet } + } + create_character = { + location = root.location + template = local_saint_template + faith = root.location.faith + culture = root.location.culture + save_scope_as = prophet + after_creation = { + add_character_flag = created + } + } + } + hidden_effect = { + scope:prophet = { + give_nickname = nick_the_prophet + add_trait = eccentric + } + } + + generate_governance_outcome_effect = { OPTIONS = 6 } + } + + option = { # Special governor trait option + name = governor_contract_event.2091.a + flavor = governor_contract_event.2091.a.tt + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = prophet_reassure + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2091.b + trigger = { exists = scope:governance_option_b } + duel = { + skill = martial + value = decent_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2091_duel + value = flag:prophet_persecute + } + trigger_event = governor_contract_event.2092 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = prophet_persecute + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2091_duel + value = flag:prophet_persecute + } + trigger_event = governor_contract_event.2093 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + option = { + name = governor_contract_event.2091.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = prophet_arrest + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:prophet + IMPRISONER = root + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = 0.5 + } + } + } + option = { + name = governor_contract_event.2091.d + trigger = { exists = scope:governance_option_d } + duel = { + skill = learning + target = scope:prophet + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2091_duel + value = flag:prophet_debate + } + trigger_event = governor_contract_event.2092 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = prophet_debate + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2091_duel + value = flag:prophet_debate + } + trigger_event = governor_contract_event.2093 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + option = { + name = governor_contract_event.2091.e + flavor = governor_contract_event.2091.e.tt + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = prophet_ceremonies + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + option = { + name = governor_contract_event.2091.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = prophet_clergy + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_energy = -0.5 + } + } + } + after = { + hidden_effect = { + if = { + limit = { + NOT = { + exists = scope:governor_contract_event_2091_duel + } + } + current_travel_plan ?= { resume_travel_plan = yes } + } + } + scope:prophet = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +#Success +governor_contract_event.2092 = { + type = character_event + title = governor_contract_event.2090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:governor_contract_event_2091_duel ?= flag:prophet_persecute + } + desc = governor_contract_event.2092.desc_persecute + } + desc = governor_contract_event.2092.desc_debate + } + } + theme = administrative + override_background = { reference = market } + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:prophet + animation = war_over_loss + outfit_tags = { beggar_rags } + } + + option = { + name = governor_contract_event.2092.a + scope:ongoing_contract = { + if = { + limit = { + scope:governor_contract_event_2091_duel ?= flag:prophet_persecute + } + complete_task_contract = prophet_persecute + } + else_if = { + limit = { + scope:governor_contract_event_2091_duel ?= flag:prophet_debate + } + complete_task_contract = prophet_debate + } + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +#Failure +governor_contract_event.2093 = { + type = character_event + title = governor_contract_event.2090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:governor_contract_event_2091_duel ?= flag:prophet_persecute + } + desc = governor_contract_event.2093.desc_persecute + } + desc = governor_contract_event.2093.desc_debate + } + } + theme = administrative + override_background = { reference = market } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:prophet + animation = personality_bold + outfit_tags = { beggar_rags } + } + + option = { + name = governor_contract_event.2093.a + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +### Titles for Sale +# Intro event +governor_contract_event.2100 = { + type = character_event + title = governor_contract_event.2100.t + desc = governor_contract_event.2100.desc + theme = administrative + override_background = { reference = holy_site_generic } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + animation = emotion_thinking_scepter + } + animation = thinking + } + right_portrait = { + character = scope:priest + animation = sadness + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = titles_sale + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + learning >= 10 + intrigue >= 10 + NOR = { + has_trait = honest + has_trait = generous + has_trait = zealous + } + faith = root.faith + trigger_if = { + limit = { faith = { has_doctrine_parameter = clergy_must_be_male } } + is_female = no + } + trigger_else_if = { + limit = { faith = { has_doctrine_parameter = clergy_must_be_female } } + is_female = yes + } + trigger_else = { always = yes } + } + save_scope_as = priest + add_character_flag = need_priest_outfit + } + if = { + limit = { + NOT = { exists = scope:priest } + } + create_character = { + location = root.location + template = priest_character_template + save_scope_as = priest + } + scope:priest = { add_character_flag = created } + } + generate_governance_outcome_effect = { OPTIONS = 4 } + } + + option = { # Special governor trait option + name = governor_contract_event.2100.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = titles_repay + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2100.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = titles_commandeer + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + option = { + name = governor_contract_event.2100.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = titles_back + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + option = { + name = governor_contract_event.2100.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = titles_bribe + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + } + } + } + after = { + if = { + limit = { + is_ai = yes + scope:priest = { has_character_flag = created } + } + scope:priest = { silent_disappearance_effect = yes } + } + } +} + +### Hungry Times +# Intro event +governor_contract_event.2110 = { + type = character_event + title = governor_contract_event.2110.t + desc = { + desc = governor_contract_event.2110.desc + first_valid = { + triggered_desc = { + trigger = { + any_character_active_contract = { + task_contract_type = hungry_times + task_contract_tier >= define:NTaskContract|HIGH_TASK_CONTRACT_TIER + } + } + desc = governor_contract_event.2110.desc_murder + } + triggered_desc = { + trigger = { + any_character_active_contract = { + task_contract_type = hungry_times + task_contract_tier = define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER + } + } + desc = governor_contract_event.2110.desc_cannibal + } + desc = governor_contract_event.2110.desc_animal + } + } + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = hungry_times + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + } + + option = { + name = governor_contract_event.2110.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2111 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2111 = { + type = character_event + title = governor_contract_event.2110.t + desc = governor_contract_event.2111.desc + theme = administrative + override_background = { reference = market } + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:cannibal + animation = prisondungeon + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = hungry_times + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + + random_pool_character = { + province = root.location + limit = { + is_adult = yes + culture = scope:ongoing_destination.county.culture + faith = scope:ongoing_destination.county.faith + has_dynasty = no + } + save_scope_as = cannibal + add_character_flag = peasant_outfit + } + if = { + limit = { + NOT = { exists = scope:cannibal } + } + create_character = { + location = root.location + template = generic_peasant_character + save_scope_as = cannibal + } + scope:cannibal = { add_character_flag = created } + } + + generate_governance_outcome_effect = { OPTIONS = 5 } + } + + option = { # Special governor trait option + name = governor_contract_event.2111.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = hungry_support + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2111.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = hungry_amnesty + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + option = { + name = governor_contract_event.2111.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = hungry_punish + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } + option = { + name = governor_contract_event.2111.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = hungry_persecute + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + option = { + name = governor_contract_event.2111.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = hungry_control + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + scope:cannibal = { + if = { + limit = { + has_character_flag = created + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +### Wartime Measures +# Intro event +governor_contract_event.2120 = { + type = character_event + title = governor_contract_event.2120.t + desc = governor_contract_event.2120.desc + theme = administrative + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = wartime_measures + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + generate_governance_outcome_effect = { OPTIONS = 6 } + } + + option = { # Special governor trait option + name = governor_contract_event.2120.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = wartime_support + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2120.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = wartime_supplies + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_energy = 0.5 + } + } + } + option = { + name = governor_contract_event.2120.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = wartime_lodgings + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = 0.5 + } + } + } + option = { + name = governor_contract_event.2120.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = wartime_gold + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + gold <= major_gold_value + factor = 0 + } + } + } + option = { + name = governor_contract_event.2120.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = wartime_lookouts + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = -0.5 + } + modifier = { + gold <= medium_gold_value + factor = 0 + } + } + } + option = { + name = governor_contract_event.2120.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = wartime_compensations + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} diff --git a/N3OW/events/scheme_events/mandala_schemes/disbelieve_mandala_scheme_events.txt b/N3OW/events/scheme_events/mandala_schemes/disbelieve_mandala_scheme_events.txt new file mode 100644 index 00000000..aed823d4 --- /dev/null +++ b/N3OW/events/scheme_events/mandala_schemes/disbelieve_mandala_scheme_events.txt @@ -0,0 +1,319 @@ +namespace = disbelieve_mandala_ongoing + +######################################### +# disbelieve_mandala_ongoing.0001 - Agents spread rumours about target's miracles being tricks +# disbelieve_mandala_ongoing.0010 - Plant a fake relic on your target's court +######################################### + +# Agents spread rumours about target's miracles being tricks +disbelieve_mandala_ongoing.0001 = { + type = character_event + title = disbelieve_mandala_ongoing.0001.t + desc = disbelieve_mandala_ongoing.0001.desc + + theme = intrigue + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = frontend_left_idle + } + right_portrait = { + character = scope:agent + animation = scheme + camera = camera_event_right_pointing_right_scheme + } + lower_right_portrait = scope:target + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + trigger = { + is_available_adult = yes + any_scheme = { + type = disbelieve_mandala + any_scheme_agent_character = { is_available_ai_adult = yes } + } + } + + immediate = { + random_scheme = { + type = disbelieve_mandala + save_scope_as = my_scheme + random_scheme_agent_character = { + limit = { is_available_ai_adult = yes } + weight = { + base = 1 + modifier = { add = intrigue } + } + save_scope_as = agent + } + scheme_target_character = { save_scope_as = target } + } + } + + # People believe it + option = { + name = disbelieve_mandala_ongoing.0001.a + scope:agent = { + duel = { + skills = { learning intrigue } + value = decent_skill_rating + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + desc = disbelieve_mandala_ongoing.0001.a.crit_success + root = { + send_interface_toast = { + title = disbelieve_mandala_ongoing.0001.a.crit_success + left_icon = scope:agent + right_icon = scope:target + add_piety = medium_piety_gain + scope:my_scheme = { + add_scheme_modifier = { + type = scheme_fake_miracles + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = disbelieve_mandala_ongoing.0001.a.success + root = { + send_interface_toast = { + title = disbelieve_mandala_ongoing.0001.a.success + left_icon = scope:agent + right_icon = scope:target + scope:my_scheme = { + add_scheme_modifier = { + type = scheme_fake_miracles + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = disbelieve_mandala_ongoing.0001.a.failure + root = { + send_interface_toast = { + title = disbelieve_mandala_ongoing.0001.a.failure + left_icon = scope:agent + right_icon = scope:target + if = { + limit = { + scope:my_scheme = { + NOT = { scheme_breaches >= scheme_breaches_about_to_hit_limit_value } + } + } + custom_tooltip = { + text = disbelieve_mandala_ongoing.0001.a.failure.breach + scope:my_scheme = { add_scheme_breach = 1 } + } + } + else = { add_piety = medium_piety_loss } + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Scheme_Rework/ep3_mx_sting_schemerework_scheme_suffering_breaches" + } + } + } + } + } + stress_impact = { + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = arrogant + scope:agent.learning >= high_skill_rating + scope:agent.intrigue >= high_skill_rating + } + } + } + } + + # Don't take the risk + option = { + name = disbelieve_mandala_ongoing.0001.b + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +# Plant a fake relic on your target's court +disbelieve_mandala_ongoing.0010 = { + type = character_event + title = disbelieve_mandala_ongoing.0010.t + desc = disbelieve_mandala_ongoing.0010.desc + + theme = intrigue + override_background = { reference = study } + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:spymaster + animation = schadenfreude + } + lower_right_portrait = scope:target + artifact = { + position = lower_left_portrait + target = scope:fake_relic + } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + trigger = { + is_available_adult = yes + exists = cp:councillor_spymaster + } + + immediate = { + random_scheme = { + type = disbelieve_mandala + save_scope_as = my_scheme + scheme_target_character = { save_scope_as = target } + } + cp:councillor_spymaster = { + assign_quirk_effect = yes + save_scope_as = spymaster + hidden_effect = { + if = { + limit = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + create_artifact_pedestal_reliquary_christian_effect = { OWNER = scope:spymaster } + } + else_if = { + limit = { religion = religion:islam_religion } + create_artifact_pedestal_reliquary_islam_effect = { OWNER = scope:spymaster } + } + else_if = { + limit = { religion = religion:buddhism_religion } + create_artifact_pedestal_reliquary_buddhism_effect = { OWNER = scope:spymaster } + } + else_if = { + limit = { religion = religion:judaism_religion } + create_artifact_pedestal_reliquary_judaism_effect = { OWNER = scope:spymaster } + } + else = { + create_artifact_sculpture_religious_effect = { OWNER = scope:spymaster } + } + scope:newly_created_artifact = { save_scope_as = fake_relic } + } + } + } + + # Do it! + option = { + name = disbelieve_mandala_ongoing.0010.a + scope:spymaster = { + duel = { + skills = { diplomacy intrigue } + value = decent_skill_rating + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = disbelieve_mandala_ongoing.0010.a.success + root = { + send_interface_toast = { + title = disbelieve_mandala_ongoing.0010.a.success + left_icon = scope:spymaster + right_icon = scope:target + scope:target = { add_piety = medium_piety_loss } + scope:my_scheme = { + add_scheme_progress = 60 + } + } + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = disbelieve_mandala_ongoing.0010.a.failure + root = { + send_interface_toast = { + title = disbelieve_mandala_ongoing.0010.a.failure + left_icon = scope:spymaster + right_icon = scope:target + scope:target = { + progress_towards_rival_effect = { + CHARACTER = root + OPINION = -40 + REASON = rival_planted_fake_artifact + } + } + } + } + } + } + } + stress_impact = { + deceitful = minor_stress_impact_loss + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = deceitful + scope:agent.diplomacy >= high_skill_rating + scope:agent.intrigue >= high_skill_rating + } + } + modifier = { + factor = 0 + has_trait = honest + } + } + } + + # Nah + option = { + name = disbelieve_mandala_ongoing.0010.b + stress_impact = { + honest = minor_stress_impact_loss + deceitful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = deceitful + } + modifier = { + factor = 2 + has_trait = honest + } + } + } +} \ No newline at end of file diff --git a/N3OW/events/scheme_events/sway_scheme/sway_outcome_events.txt b/N3OW/events/scheme_events/sway_scheme/sway_outcome_events.txt new file mode 100644 index 00000000..92f5f051 --- /dev/null +++ b/N3OW/events/scheme_events/sway_scheme/sway_outcome_events.txt @@ -0,0 +1,979 @@ +#Events handling Sway outcomes + +namespace = sway_outcome + +#Note: Outcome events for the Sway scheme are unusual. The default is simply a notification for success or failure + +################################ +# Standard outcomes +# 0000-0999 +################################ + +#Standard success + #by Petter Vilberg +sway_outcome.0001 = { + hidden = yes + + immediate = { + send_interface_message = { + type = sway_good_message + title = sway_sway_success_message + left_icon = scope:target + scope:target = { + if = { + limit = { + is_alive = yes + scope:owner = { is_alive = yes } + } + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = sway_opinion_increase_per_success + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = sway_opinion_increase_per_success + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + } + } + sway_end_effect = yes + } + } +} + +#Standard failure + #by Petter Vilberg +sway_outcome.0002 = { + hidden = yes + + immediate = { + send_interface_message = { + type = sway_bad_message + title = sway_sway_failed_message + left_icon = scope:target + stress_impact = { + gregarious = minor_stress_impact_gain + } + sway_end_effect = yes + } + } +} + + +################################# +# Positive Outcomes +# 1000-1999 +################################# + +#Diplomacy Duel to get an extra bonus + #by Petter Vilberg +sway_outcome.1001 = { + type = character_event + title = sway_outcome.1001.t + desc = sway_outcome.1001.desc + theme = sway_scheme + left_portrait = scope:target + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + override_background = { + trigger = { is_travelling_not_at_activity = yes } + reference = terrain_travel + } + override_background = { + trigger = { is_travelling_at_activity = yes } + reference = ep2_activity + } + + trigger = { + NOT = { + has_character_flag = had_event_sway_outcome_1001 + } + } + + immediate = { + add_character_flag = { + flag = had_event_sway_outcome_1001 + years = 5 + } + } + + option = { + name = sway_outcome.1001.a + duel = { + target = scope:target + skill = diplomacy + + 20 = { + compare_modifier = { + value = scope:duel_value + } + desc = sway_outcome.1001.a.success + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1001.a.success + + add_prestige = minor_prestige_gain + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = 50 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 50 + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = sway_outcome.1001.a.failure + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1001.a.failure + + add_prestige = minor_prestige_loss + } + } + } + sway_end_effect = yes + } + + option = { + name = sway_outcome.1001.b + scope:target = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 30 + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + sway_end_effect = yes + } +} + +#Learning Duel to get an extra bonus + #by Petter Vilberg +sway_outcome.1002 = { + type = character_event + title = sway_outcome.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { faith = scope:target.faith } + desc = sway_outcome.1002.same_faith + } + desc = sway_outcome.1002.other_faith + } + } + theme = sway_scheme + left_portrait = scope:target + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + override_background = { + trigger = { scope:target = { is_travelling = yes } } + reference = terrain_travel + } + + trigger = { + NOT = { + has_character_flag = had_event_sway_outcome_1002 + } + } + + weight_multiplier = { + base = 0 + compare_modifier = { + value = learning + multiplier = 0.1 + } + modifier = { + add = 2 + scope:target = { + is_landed = yes + government_has_flag = government_is_theocracy + } + } + } + + immediate = { + add_character_flag = { + flag = had_event_sway_outcome_1002 + years = 5 + } + } + + option = { + name = sway_outcome.1002.a + duel = { + target = scope:target + skill = learning + + 20 = { + compare_modifier = { + value = scope:duel_value + min = -18 + max = 20 + } + desc = sway_outcome.1001.a.success + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1001.a.success + + add_prestige = minor_prestige_gain + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = 50 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 50 + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -18 + max = 20 + } + desc = sway_outcome.1001.a.failure + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1001.a.failure + + add_prestige = minor_prestige_loss + } + } + } + sway_end_effect = yes + } + + option = { + name = sway_outcome.1002.b + scope:target = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 30 + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + sway_end_effect = yes + } +} + + +#They're warming up to me, can I take it further? + #by Linnéa Thimrén +sway_outcome.1003 = { + type = character_event + title = sway_outcome.1003.t + desc = sway_outcome.1003.desc + theme = sway_scheme + left_portrait = scope:target + right_portrait = scope:friend + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + override_background = { + trigger = { is_travelling_not_at_activity = yes } + reference = terrain_travel + } + override_background = { + trigger = { is_travelling_at_activity = yes } + reference = ep2_activity + } + + trigger = { + NOT = { + has_character_flag = had_event_sway_outcome_1003 + } + } + + immediate = { + add_character_flag = { + flag = had_event_sway_outcome_1003 + years = 5 + } + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = 30 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 30 + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + } + if = { + limit = { + any_relation = { + type = friend + diplomacy > root.diplomacy + } + } + random_relation = { + type = friend + limit = { + diplomacy > root.diplomacy + } + save_scope_as = friend + } + } + } + + option = { #Gamble! + name = sway_outcome.1003.a + duel = { + target = scope:target + skill = diplomacy + + 30 = { + compare_modifier = { + value = scope:duel_value + } + desc = sway_outcome.1003.a.success + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1003.a.success + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = 20 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 20 + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = sway_outcome.1003.a.failure + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1003.a.failure + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = -10 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = -10 + } + } + } + } + } + } + } + + option = { #Gamble! Friend helps you out! + name = sway_outcome.1003.a_friend + trigger = { + exists = scope:friend + } + scope:friend = { + duel = { + target = scope:target + skill = diplomacy + + 40 = { + compare_modifier = { + value = scope:duel_value + } + desc = sway_outcome.1003.a.success + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1003.a.success + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = 15 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 15 + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = sway_outcome.1003.a.failure + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1003.a.failure + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = -10 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = -10 + } + } + } + } + } + } + } + } + + option = { #Safe route + name = sway_outcome.1003.b + + } + + after = { + sway_end_effect = yes + } +} + +#A disloyal vassal can be compelled to reconsider during the Anarchy at Samarra Struggle + #by Ola Jentzsch + +sway_outcome.1004 = { + type = character_event + title = sway_outcome.1004.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:target = { + ai_vengefulness >= medium_positive_ai_value + } + } + desc = sway_outcome_grudgingly.1004.desc + } + random_valid = { + desc = sway_outcome_magnanimity.1004.desc + desc = sway_outcome_blessed.1004.desc + triggered_desc = { + trigger = { + scope:target = { + NOR = { + has_trait = stubborn + has_trait = arrogant + has_trait = august + has_trait = callous + } + } + } + desc = sway_outcome_flattery.1004.desc + } + triggered_desc = { + trigger = { + AND = { + scope:target = { + AND = { + OR = { + has_religion = religion:buddhism_religion + has_religion = religion:jainism_religion + has_religion = religion:hinduism_religion + } + ai_zeal >= low_positive_ai_value + } + } + scope:owner = { + OR = { + has_religion = religion:buddhism_religion + has_religion = religion:jainism_religion + has_religion = religion:hinduism_religion + } + } + } + } + desc = sway_outcome_dharmic.1004.desc + } + triggered_desc = { + trigger = { + scope:target = { + has_religion = religion:islam_religion + ai_zeal >= low_positive_ai_value + exists = faith.religious_head + faith.religious_head = { this = root } + } + } + desc = sway_outcome_caliph.1004.desc + } + } + } + } + theme = sway_scheme + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { + has_trait = callous + has_trait = vengeful + has_trait = sadistic + } + animation = personality_callous + } + animation = personality_bold + } + right_portrait = { + character = scope:target + animation = throne_room_bow_1 + } + + trigger = { + + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_scheme_more_powerful + } + + scope:target = { + AND = { + is_vassal_of = scope:owner + has_trait = disloyal + } + NOT = { + has_relation_rival = scope:owner + } + } + } + + weight_multiplier = { #more likely to trigger if the target likes you, or has a flexible personality + base = 1 + modifier = { + add = 0.5 + scope:target = { has_trait = fickle } #They're flexible + } + modifier = { + add = 0.5 + scope:target = { has_trait = trusting } #They trust you + } + modifier = { + add = -0.7 + scope:target = { has_trait = stubborn } #They are not prone to change their ways + } + modifier = { + add = -0.3 + scope:target = { has_trait = vengeful } #They are not soon to forgive slights, real or imagined + } + } + + immediate = { + + scope:target = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 20 + } + remove_trait = disloyal + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + } + + option = { + name = sway_outcome.1004.a + + trigger = { + OR = { + has_trait = vengeful + has_trait = arrogant + has_trait = paranoid + } + } + + scope:scheme = { + end_scheme = yes + } + } + + option = { + name = sway_outcome.1004.b + + trigger = { + NOR = { + has_trait = vengeful + has_trait = arrogant + has_trait = paranoid + } + } + + scope:scheme = { + end_scheme = yes + } + } +} + + +################################# +# Negative Outcomes +# 2000-2999 +################################# + +#Diplomatic misunderstanding + #by Petter Vilberg +sway_outcome.2001 = { + type = character_event + title = sway_outcome.2001.t + desc = { + desc = sway_outcome.2001.opening + first_valid = { + triggered_desc = { + trigger = { + scope:target = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + NOT = { + has_relation_rival = root + } + } + } + desc = sway_outcome.2001.not_interested_relation + } + triggered_desc = { + trigger = { + scope:target = { + possibly_interested_in_character_trigger = { + CHARACTER = root + } + } + } + desc = sway_outcome.2001.not_interested_romantically + } + random_valid = { + desc = sway_outcome.2001.not_interested_horses + desc = sway_outcome.2001.not_interested_toll_exemptions + desc = sway_outcome.2001.not_interested_friend + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + OR = { scope:target.religion = religion:eastern_orthodox_religion scope:target.religion = religion:catholic_religion scope:target.religion = religion:protestant_religion } + } + desc = sway_outcome.2001.not_interested_relics + } + } + } + desc = sway_outcome.2001.end + } + theme = sway_scheme + left_portrait = { + character = scope:target + animation = eyeroll + } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + override_background = { + trigger = { is_travelling_not_at_activity = yes } + reference = terrain_travel + } + override_background = { + trigger = { is_travelling_at_activity = yes } + reference = ep2_activity + } + + trigger = { + NOT = { + has_character_flag = had_event_sway_outcome_2001 + } + NOR = { + has_relation_lover = scope:target + has_relation_friend = scope:target + any_consort = { + this = scope:target + } + betrothed ?= scope:target + } + } + + immediate = { + add_character_flag = { + flag = had_event_sway_outcome_2001 + years = 5 + } + } + + option = { + name = sway_outcome.2001.a + scope:target = { + add_opinion = { + target = scope:owner + modifier = sway_blocker_opinion + opinion = -10 + } + } + scope:scheme = { + end_scheme = yes + } + } +} + + +#They think you're plotting against them + #by Linnéa Thimrén +sway_outcome.2002 = { + type = character_event + title = sway_outcome.2002.t + desc = sway_outcome.2002.desc + theme = sway_scheme + left_portrait = scope:target + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + override_background = { + trigger = { is_travelling_not_at_activity = yes } + reference = terrain_travel + } + override_background = { + trigger = { is_travelling_at_activity = yes } + reference = ep2_activity + } + + trigger = { + NOT = { + has_character_flag = had_event_sway_outcome_2002 + } + } + + weight_multiplier = { + base = 0.75 + modifier = { + add = 0.75 + has_trait = paranoid + } + } + + immediate = { + add_character_flag = { + flag = had_event_sway_outcome_2002 + years = 5 + } + } + + option = { + name = sway_outcome.2002.a + scope:target = { + add_opinion = { + target = scope:owner + modifier = sway_blocker_opinion + opinion = -10 + } + add_character_modifier = { + modifier = more_vigilant_recistance_modifier + years = 5 + } + } + scope:scheme = { + end_scheme = yes + } + } +} diff --git a/N3OW/events/test_events/debug.txt b/N3OW/events/test_events/debug.txt new file mode 100644 index 00000000..6b5c6134 --- /dev/null +++ b/N3OW/events/test_events/debug.txt @@ -0,0 +1,3442 @@ + +#Debugging events + +namespace = debug + +debug.1 = { # Max Portraits in Event Window + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + content_source = "dlc_006" + override_background = { + reference = temple + } + + left_portrait = { + character = root + animation = dancing + # camera = camera_event_kneeling + } + + right_portrait = { + character = scope:portrait_2 + animation = throne_room_kneel_1 + # camera = camera_event_standing_with_horse_right + } + + center_portrait = { + character = scope:portrait_3 + animation = loss_1 + } + + + lower_right_portrait = scope:portrait_4 + lower_center_portrait = scope:portrait_5 + lower_left_portrait = scope:portrait_6 + + immediate = { + random_ruler = { save_scope_as = portrait_1 } + random_ruler = { save_scope_as = portrait_2 } + random_ruler = { save_scope_as = portrait_3 } + random_ruler = { save_scope_as = portrait_4 } + random_ruler = { save_scope_as = portrait_5 } + random_ruler = { save_scope_as = portrait_6 } + } + + option = { name = LOREM_IPSUM_TITLE } +} + +debug.111 = { # Two Portraits + three Artifacts in Event Window + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + left_portrait = { + character = root + animation = idle + } + right_portrait = { + character = scope:portrait_1 + animation = idle + } + + artifact = { + target = scope:portrait_2 + position = lower_right_portrait + } + + artifact = { + target = scope:portrait_3 + position = lower_center_portrait + } + + artifact = { + target = scope:portrait_4 + position = lower_left_portrait + } + + immediate = { + random_ruler = { + save_scope_as = portrait_1 + } + random_artifact = { + save_scope_as = portrait_2 + } + random_artifact = { + save_scope_as = portrait_3 + } + random_artifact = { + save_scope_as = portrait_4 + } + } + + option = { + name = LOREM_IPSUM_TITLE + } +} + +debug.0002 = { + type = character_event + title = debug.0002.t + desc = debug.0002.desc + theme = default + left_portrait = scope:recipient + + immediate = { + if = { + limit = { is_female = yes } + save_scope_as = mother + scope:recipient = { save_scope_as = father } + } + + else = { + save_scope_as = father + scope:recipient = { save_scope_as = mother } + } + } + + #Normal pregnancy + option = { + name = debug.0002.a + + scope:mother = { + make_pregnant = { + father = scope:father + } + } + } + + #One please + option = { + name = debug.0002.b + + scope:mother = { + make_pregnant = { + father = scope:father + number_of_children = 1 + } + } + } + + #Two please + option = { + name = debug.0002.c + + scope:mother = { + make_pregnant = { + father = scope:father + number_of_children = 2 + } + } + } + + #Three please + option = { + name = debug.0002.d + + scope:mother = { + make_pregnant = { + father = scope:father + number_of_children = 3 + } + } + } + + #Go crazy + option = { + name = debug.0002.e + + scope:mother = { + make_pregnant = { + father = scope:father + number_of_children = 10 + } + } + } +} + +## globally upgrade some holdings for marketing videos and screenshots + +debug.0008 = { + type = character_event + hidden = yes + theme = default + orphan = yes + + immediate = { + every_duchy = { + if = { + limit = { is_titular = no } + title_capital_county = { + every_county_province = { + if = { + limit = { + is_county_capital = yes + NOT = { has_building = curtain_walls_02 } + } + add_building = curtain_walls_02 + } + if = { + limit = { + has_holding_type = castle_holding + NOT = { has_building = castle_02 } + } + add_building = castle_02 + } + else_if = { + limit = { + has_holding_type = church_holding + NOT = { has_building = temple_02 } + } + add_building = temple_03 + } + else_if = { + limit = { + has_holding_type = city_holding + NOT = { has_building = city_02 } + } + add_building = city_03 + } + } + } + } + } + every_kingdom = { + if = { + limit = { is_titular = no } + title_capital_county = { + every_county_province = { + if = { + limit = { + is_county_capital = yes + NOT = { has_building = curtain_walls_03 } + } + add_building = curtain_walls_03 + } + if = { + limit = { + has_holding_type = castle_holding + NOT = { has_building = castle_03 } + } + add_building = castle_03 + } + else_if = { + limit = { + has_holding_type = church_holding + NOT = { has_building = temple_03 } + } + add_building = temple_03 + } + else_if = { + limit = { + has_holding_type = city_holding + NOT = { has_building = city_03 } + } + add_building = city_03 + } + } + } + } + } + every_empire = { + if = { + limit = { is_titular = no } + title_capital_county = { + every_county_province = { + if = { + limit = { + is_county_capital = yes + NOT = { has_building = curtain_walls_08 } + } + add_building = curtain_walls_08 + } + if = { + limit = { + has_holding_type = castle_holding + NOT = { has_building = castle_04 } + } + add_building = castle_04 + } + else_if = { + limit = { + has_holding_type = church_holding + NOT = { has_building = temple_04 } + } + add_building = temple_04 + } + else_if = { + limit = { + has_holding_type = city_holding + NOT = { has_building = city_04 } + } + add_building = city_04 + } + } + } + } + } + } +} + +###################### +# HEALTH DATA EVENTS # +###################### + +# Set variable to collect data on birth +scripted_effect test_2_set_character_disease_data_variable_effect = { + set_variable = { + name = disease_data_character_$DISEASE$_amount + value = 0 + } +} + +# For likelihood of happening, set target values, change the weights of the diseases, et voila +# Calculate for deadliness: seed the world with disease and check how likely people are to die +debug.0010 = { #test.2 + hidden = yes + + trigger = { activate_disease_data_tracking_trigger = yes } + + immediate = { + set_variable = { + name = disease_data_activate_tracking + value = yes + } + + test_2_set_character_disease_data_variable_effect = { DISEASE = ill } + test_2_set_character_disease_data_variable_effect = { DISEASE = pneumonic } + test_2_set_character_disease_data_variable_effect = { DISEASE = gout_ridden } + test_2_set_character_disease_data_variable_effect = { DISEASE = leper } + test_2_set_character_disease_data_variable_effect = { DISEASE = typhus } + test_2_set_character_disease_data_variable_effect = { DISEASE = consumption } + test_2_set_character_disease_data_variable_effect = { DISEASE = cancer } + test_2_set_character_disease_data_variable_effect = { DISEASE = lovers_pox } + test_2_set_character_disease_data_variable_effect = { DISEASE = great_pox } + test_2_set_character_disease_data_variable_effect = { DISEASE = smallpox } + test_2_set_character_disease_data_variable_effect = { DISEASE = bubonic_plague } + test_2_set_character_disease_data_variable_effect = { DISEASE = measles } + test_2_set_character_disease_data_variable_effect = { DISEASE = dysentery } + test_2_set_character_disease_data_variable_effect = { DISEASE = ergotism } + } +} + + +scripted_effect test_3_create_disease_variables_effect = { + set_global_variable = { + name = disease_data_global_$DISEASE$_amount + value = 0 + } + set_global_variable = { + name = disease_data_global_premature_death_$DISEASE$_amount + value = 0 + } +} + +scripted_effect test_3_count_diseases_effect = { + change_global_variable = { + name = disease_data_global_$DISEASE$_amount + add = var:disease_data_character_$DISEASE$_amount + } +} + + +scripted_effect test_3_count_premature_disease_deaths_effect = { + if = { + limit = { death_reason = death_$DISEASE$ } + change_global_variable = { + name = disease_data_global_premature_death_amount + add = 1 + } + change_global_variable = { + name = disease_data_global_premature_death_$DISEASE$_amount + add = 1 + } + } +} + +# Collect data on death +debug.0011 = { #test.3 + hidden = yes + orphan = yes + + trigger = { + activate_disease_data_tracking_trigger = yes + has_variable = disease_data_activate_tracking + } + + immediate = { + if = { + limit = { NOT = { exists = global_var:disease_data_global_character_amount } } + + # All counters + set_global_variable = { + name = disease_data_global_character_amount + value = 0 + } + set_global_variable = { + name = disease_data_global_common_disease_amount + value = 0 + } + set_global_variable = { + name = disease_data_global_serious_disease_amount + value = 0 + } + set_global_variable = { + name = disease_data_global_premature_death_amount + value = 0 + } + + # Disease counters + test_3_create_disease_variables_effect = { DISEASE = ill } + test_3_create_disease_variables_effect = { DISEASE = pneumonic } + test_3_create_disease_variables_effect = { DISEASE = gout_ridden } + test_3_create_disease_variables_effect = { DISEASE = leper } + test_3_create_disease_variables_effect = { DISEASE = typhus } + test_3_create_disease_variables_effect = { DISEASE = consumption } + test_3_create_disease_variables_effect = { DISEASE = cancer } + test_3_create_disease_variables_effect = { DISEASE = lovers_pox } + test_3_create_disease_variables_effect = { DISEASE = great_pox } + test_3_create_disease_variables_effect = { DISEASE = smallpox } + test_3_create_disease_variables_effect = { DISEASE = bubonic_plague } + test_3_create_disease_variables_effect = { DISEASE = measles } + test_3_create_disease_variables_effect = { DISEASE = dysentery } + test_3_create_disease_variables_effect = { DISEASE = ergotism } + } + + + change_global_variable = { + name = disease_data_global_character_amount + add = 1 + } + + # Add to disease counters + test_3_count_diseases_effect = { DISEASE = ill } + test_3_count_diseases_effect = { DISEASE = pneumonic } + test_3_count_diseases_effect = { DISEASE = gout_ridden } + test_3_count_diseases_effect = { DISEASE = leper } + test_3_count_diseases_effect = { DISEASE = typhus } + test_3_count_diseases_effect = { DISEASE = consumption } + test_3_count_diseases_effect = { DISEASE = cancer } + test_3_count_diseases_effect = { DISEASE = lovers_pox } + test_3_count_diseases_effect = { DISEASE = great_pox } + test_3_count_diseases_effect = { DISEASE = smallpox } + test_3_count_diseases_effect = { DISEASE = bubonic_plague } + test_3_count_diseases_effect = { DISEASE = measles } + test_3_count_diseases_effect = { DISEASE = dysentery } + test_3_count_diseases_effect = { DISEASE = ergotism } + + # Had a "common" disease? + if = { + limit = { + OR = { + var:disease_data_character_ill_amount >= 1 + var:disease_data_character_lovers_pox_amount >= 1 + } + } + change_global_variable = { + name = disease_data_global_common_disease_amount + add = 1 + } + } + + # Had a "serious" disease? + if = { + limit = { + OR = { + var:disease_data_character_gout_ridden_amount >= 1 + var:disease_data_character_pneumonic_amount >= 1 + var:disease_data_character_leper_amount >= 1 + var:disease_data_character_typhus_amount >= 1 + var:disease_data_character_consumption_amount >= 1 + var:disease_data_character_cancer_amount >= 1 + var:disease_data_character_great_pox_amount >= 1 + var:disease_data_character_smallpox_amount >= 1 + var:disease_data_character_bubonic_plague_amount >= 1 + var:disease_data_character_measles_amount >= 1 + var:disease_data_character_dysentery_amount >= 1 + var:disease_data_character_ergotism_amount >= 1 + } + } + change_global_variable = { + name = disease_data_global_serious_disease_amount + add = 1 + } + } + + # Premature death data + if = { + limit = { age < 60 } + + save_scope_as = dead + random_independent_ruler = { + trigger_event = { # Death reason isn't set yet, so we send an event to someone else to check + id = debug.0013 + days = 2 + } + } + } + } +} + +# Display the current data +scripted_effect test_4_disease_data_calc_effect = { + set_variable = { + name = disease_data_calc_$DISEASE$_percentage + value = { + value = global_var:disease_data_global_$DISEASE$_amount + divide = global_var:disease_data_global_character_amount + multiply = 100 + } + } + set_variable = { + name = disease_data_calc_$DISEASE$_premature_death_chance + value = { + value = global_var:disease_data_global_premature_death_$DISEASE$_amount + divide = global_var:disease_data_global_$DISEASE$_amount + multiply = 100 + } + } +} + +debug.0012 = { # test.4 + type = character_event + title = test.4.title + desc = test.4.desc + theme = medicine + orphan = yes + override_background = { + reference = temple_generic + } + + immediate = { + ### COPY DATA ### + + #Total character amount + set_variable = { + name = local_copy_disease_data_global_character_amount + value = global_var:disease_data_global_character_amount + } + #Total early death amount + set_variable = { + name = local_copy_disease_data_global_premature_death_amount + value = global_var:disease_data_global_premature_death_amount + } + + + ### ADDITIONAL DATA ### + + #Percentage of early disease deaths + set_variable = { + name = disease_data_calc_premature_disease_death_percentage + value = { + value = global_var:disease_data_global_premature_death_amount + divide = global_var:disease_data_global_character_amount + multiply = 100 + } + } + + #Percentage common disease contraction + set_variable = { + name = disease_data_calc_common_disease_percentage + value = { + value = global_var:disease_data_global_common_disease_amount + divide = global_var:disease_data_global_character_amount + multiply = 100 + } + } + + #Percentage serious disease contraction + set_variable = { + name = disease_data_calc_serious_disease_percentage + value = { + value = global_var:disease_data_global_serious_disease_amount + divide = global_var:disease_data_global_character_amount + multiply = 100 + } + } + + #Disease chances + test_4_disease_data_calc_effect = { DISEASE = ill } + test_4_disease_data_calc_effect = { DISEASE = pneumonic } + test_4_disease_data_calc_effect = { DISEASE = gout_ridden } + test_4_disease_data_calc_effect = { DISEASE = leper } + test_4_disease_data_calc_effect = { DISEASE = typhus } + test_4_disease_data_calc_effect = { DISEASE = consumption } + test_4_disease_data_calc_effect = { DISEASE = cancer } + test_4_disease_data_calc_effect = { DISEASE = lovers_pox } + test_4_disease_data_calc_effect = { DISEASE = great_pox } + test_4_disease_data_calc_effect = { DISEASE = smallpox } + test_4_disease_data_calc_effect = { DISEASE = bubonic_plague } + test_4_disease_data_calc_effect = { DISEASE = measles } + test_4_disease_data_calc_effect = { DISEASE = dysentery } + test_4_disease_data_calc_effect = { DISEASE = ergotism } + + save_scope_value_as = { + name = a_value + value = var:disease_data_calc_common_disease_percentage + } + } + + option = { + if = { # To block error messages.... + limit = { + OR = { + exists = var:local_copy_disease_data_global_character_amount + exists = var:local_copy_disease_data_global_premature_death_amount + exists = var:disease_data_calc_premature_disease_death_percentage + exists = var:disease_data_calc_common_disease_percentage + exists = var:disease_data_calc_serious_disease_percentage + exists = var:disease_data_calc_ill_percentage + exists = var:disease_data_calc_ill_premature_death_chance + exists = var:disease_data_calc_pneumonic_percentage + exists = var:disease_data_calc_pneumonic_premature_death_chance + exists = var:disease_data_calc_gout_ridden_percentage + exists = var:disease_data_calc_gout_ridden_premature_death_chance + exists = var:disease_data_calc_leper_percentage + exists = var:disease_data_calc_leper_premature_death_chance + exists = var:disease_data_calc_typhus_percentage + exists = var:disease_data_calc_typhus_premature_death_chance + exists = var:disease_data_calc_consumption_percentage + exists = var:disease_data_calc_consumption_premature_death_chance + exists = var:disease_data_calc_cancer_percentage + exists = var:disease_data_calc_cancer_premature_death_chance + exists = var:disease_data_calc_lovers_pox_percentage + exists = var:disease_data_calc_lovers_pox_premature_death_chance + exists = var:disease_data_calc_great_pox_percentage + exists = var:disease_data_calc_great_pox_premature_death_chance + exists = var:disease_data_calc_smallpox_percentage + exists = var:disease_data_calc_smallpox_premature_death_chance + exists = var:disease_data_calc_bubonic_plague_percentage + exists = var:disease_data_calc_bubonic_plague_premature_death_chance + exists = var:disease_data_calc_measles_percentage + exists = var:disease_data_calc_measles_premature_death_chance + exists = var:disease_data_calc_dysentery_percentage + exists = var:disease_data_calc_dysentery_premature_death_chance + exists = var:disease_data_calc_ergotism_percentage + exists = var:disease_data_calc_ergotism_premature_death_chance + } + } + } + + debug_log = test.4.desc + } +} + +debug.0013 = { # test.5 + hidden = yes + + immediate = { + scope:dead = { + test_3_count_premature_disease_deaths_effect = { DISEASE = ill } + test_3_count_premature_disease_deaths_effect = { DISEASE = pneumonic } + test_3_count_premature_disease_deaths_effect = { DISEASE = gout_ridden } + test_3_count_premature_disease_deaths_effect = { DISEASE = leper } + test_3_count_premature_disease_deaths_effect = { DISEASE = typhus } + test_3_count_premature_disease_deaths_effect = { DISEASE = consumption } + test_3_count_premature_disease_deaths_effect = { DISEASE = cancer } + #test_3_count_premature_disease_deaths_effect = { DISEASE = lovers_pox } you can't die from lover's pox + test_3_count_premature_disease_deaths_effect = { DISEASE = great_pox } + test_3_count_premature_disease_deaths_effect = { DISEASE = smallpox } + test_3_count_premature_disease_deaths_effect = { DISEASE = bubonic_plague } + test_3_count_premature_disease_deaths_effect = { DISEASE = measles } + test_3_count_premature_disease_deaths_effect = { DISEASE = dysentery } + test_3_count_premature_disease_deaths_effect = { DISEASE = ergotism } + } + } +} + + + +debug.0020 = { + type = character_event + title = debug_test_event_progress_title + desc = debug_test_event_progress_desc + theme = default + orphan = yes + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + immediate = { + save_scope_value_as = { # 4 events in this event chain + name = event_chain_length + value = 4 + } + save_scope_value_as = { # Of which we are on the 2nd event + name = event_chain_progress + value = 2 + } + } + + option = { + } +} + +debug.0299 = { + hidden = yes + orphan = yes + + immediate = { + save_scope_as = owner + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = mace + type = regalia_simple + quality = 0 + wealth = 0 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = sword + type = regalia_simple + quality = 20 + wealth = 20 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = dagger + type = regalia_simple + quality = 40 + wealth = 40 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = axe + type = regalia_simple + quality = 60 + wealth = 60 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = hammer + type = regalia_simple + quality = 80 + wealth = 80 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = spear + type = regalia_simple + quality = 100 + wealth = 100 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + } +} +debug.0300 = { + hidden = yes + orphan = yes + + immediate = { + save_scope_as = owner + random_character_artifact = { + trigger_event = { + id = artifact.1000 + days = 0 + } + } + } +} + +debug.0301 = { + type = character_event + title = test_artifact_name + desc = artifact_sword_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_sword + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.302 = { + type = character_event + title = test_artifact_name + desc = artifact_dagger_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_dagger + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.303 = { + type = character_event + title = test_artifact_name + desc = artifact_axe_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_axe + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.304 = { + type = character_event + title = test_artifact_name + desc = artifact_hammer_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_hammer + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.305 = { + type = character_event + title = test_artifact_name + desc = artifact_spear_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_spear + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.306 = { + type = character_event + title = test_artifact_name + desc = artifact_mace_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_mace + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.307 = { + type = character_event + title = test_artifact_name + desc = artifact_brooch_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + save_scope_as = owner + create_artifact_brooch_effect = { + OWNER = root + SMITH = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.310 = { + type = character_event + title = artifact_armor_name + desc = artifact_armor_description + theme = stewardship_wealth_focus + override_background = { + reference = wilderness + } + left_portrait = root + orphan = yes + + immediate = { + create_artifact_armor_effect = { + OWNER = root + CREATOR = root + SET_ARMOR_TYPE = flag:no #Decided in the effect based on the variable saved on the inspiration owner + } + + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.311 = { + type = character_event + title = artifact_armor_name + desc = artifact_armor_description + theme = stewardship_wealth_focus + override_background = { + reference = wilderness + } + left_portrait = root + orphan = yes + + immediate = { + create_artifact_armor_effect = { + OWNER = root + CREATOR = root + SET_ARMOR_TYPE = flag:armor_type_lamellar + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.312 = { + type = character_event + title = test_artifact_name + desc = artifact_regalia_description + theme = stewardship_wealth_focus + override_background = { + reference = throne_room + } + #left_portrait = root + orphan = yes + + immediate = { + random_dummy_gender_effect = yes + create_artifact_regalia_effect = { + OWNER = root + SMITH = scope:dummy_gender + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.313 = { + type = character_event + title = test_artifact_name + desc = artifact_chest_description + theme = stewardship_wealth_focus + orphan = yes + + + immediate = { + save_scope_as = owner + title:c_kandy = { title_province = { add_to_list = artifact_material_sources } } + create_artifact_chest_effect = { + OWNER = root + CARPENTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + + +debug.314 = { + type = character_event + title = test_artifact_name + desc = artifact_cabinet_description + theme = stewardship_wealth_focus + orphan = yes + + + immediate = { + create_artifact_cabinet_effect = { + OWNER = root + CARPENTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.315 = { + type = character_event + title = test_artifact_name + desc = artifact_throne_description + theme = stewardship_wealth_focus + orphan = yes + + + immediate = { + save_scope_as = owner + create_artifact_throne_effect = { + OWNER = root + MAKER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + + +debug.316 = { + type = character_event + title = artifact_wall_tapestry_name + desc = artifact_wall_tapestry_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_tapestry_effect = { + OWNER = root + WEAVER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.317 = { + type = character_event + title = test_artifact_name + desc = artifact_crown_description + theme = stewardship_wealth_focus + orphan = yes + + + immediate = { + random_dummy_gender_effect = yes + create_artifact_crown_effect = { + OWNER = root + SMITH = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.318 = { + type = character_event + title = artifact_wall_tapestry_name + desc = artifact_wall_tapestry_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_tapestry_effect = { + OWNER = root + WEAVER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.319 = { + type = character_event + title = artifact_box_small_name + desc = artifact_box_small_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_box_small_effect = { + OWNER = root + CARPENTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.320 = { + type = character_event + title = artifact_box_medium_name + desc = artifact_box_medium_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_box_medium_effect = { + OWNER = root + CARPENTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.321 = { + type = character_event + title = artifact_goblet_name + desc = artifact_goblet_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_goblet_effect = { + OWNER = root + SMITH = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.322 = { + type = character_event + title = debug.322.title + desc = debug.322.desc + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + set_variable = { name = book_artifact_topic value = flag:martial_troop_compositions days = 1 } + set_variable = { name = book_artifact_topic value = flag:martial_military_strategies days = 1 } + set_variable = { name = book_artifact_topic value = flag:martial_ancient_military_campaigns days = 1 } + set_variable = { name = book_artifact_topic value = flag:military days = 1 } + set_variable = { name = book_artifact_topic value = flag:duels days = 1 } + set_variable = { name = book_artifact_topic value = flag:diplomacy_court_politics days = 1 } + set_variable = { name = book_artifact_topic value = flag:diplomacy_court_alliances days = 1 } + set_variable = { name = book_artifact_topic value = flag:cicero days = 1 } + set_variable = { name = book_artifact_topic value = flag:diplomacy_art_of_feasting days = 1 } + set_variable = { name = book_artifact_topic value = flag:hitopadesa days = 1 } + set_variable = { name = book_artifact_topic value = flag:kalila days = 1 } + set_variable = { name = book_artifact_topic value = flag:edda days = 1 } + set_variable = { name = book_artifact_topic value = flag:orkneyinga days = 1 } + set_variable = { name = book_artifact_topic value = flag:jokes days = 1 } + set_variable = { name = book_artifact_topic value = flag:learning_theological_treaties days = 1 } + set_variable = { name = book_artifact_topic value = flag:learning_metaphysical_conundrums days = 1 } + set_variable = { name = book_artifact_topic value = flag:aristotle days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_anatomy days = 1 } + set_variable = { name = book_artifact_topic value = flag:learning_tome_collections days = 1 } + set_variable = { name = book_artifact_topic value = flag:prayers days = 1 } + set_variable = { name = book_artifact_topic value = flag:hours days = 1 } + set_variable = { name = book_artifact_topic value = flag:iliad days = 1 } + set_variable = { name = book_artifact_topic value = flag:mahabharata days = 1 } + set_variable = { name = book_artifact_topic value = flag:mufaddaliyat days = 1 } + set_variable = { name = book_artifact_topic value = flag:stewardship_trade_routes days = 1 } + set_variable = { name = book_artifact_topic value = flag:stewardship_lawmaking days = 1 } + set_variable = { name = book_artifact_topic value = flag:stewardship_best_practices_tax_collectors days = 1 } + set_variable = { name = book_artifact_topic value = flag:digest days = 1 } + set_variable = { name = book_artifact_topic value = flag:architect days = 1 } + set_variable = { name = book_artifact_topic value = flag:speculum days = 1 } + set_variable = { name = book_artifact_topic value = flag:admin days = 1 } + set_variable = { name = book_artifact_topic value = flag:intrigue_poisons days = 1 } + set_variable = { name = book_artifact_topic value = flag:seduction days = 1 } + set_variable = { name = book_artifact_topic value = flag:intrigue_the_art_of_love days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_medicine days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_herbs days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_science days = 1 } + set_variable = { name = book_artifact_topic value = flag:galen days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_witch days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_witch_bible days = 1 } + set_variable = { name = book_artifact_topic value = flag:worship_horned_god days = 1 } + set_variable = { name = book_artifact_topic value = flag:love_sorcery days = 1 } + set_variable = { name = book_artifact_topic value = flag:curse_sorcery days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_cannibal days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_lunatic days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_mystic days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_hunter days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_nature days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_falconry days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_dogs days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_childhood days = 1 } + set_variable = { name = book_artifact_topic value = flag:science days = 1 } + save_scope_as = honorary_guest + save_scope_as = honorary_guest_regular + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.323 = { + type = character_event + title = artifact_animal_hide_big_name + desc = artifact_animal_hide_big_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + trigger = { + any_realm_province = { + OR = { + terrain = forest + terrain = steppe + terrain = jungle + terrain = taiga + terrain = oasis + } + } + } + + immediate = { + save_scope_value_as = { + name = animal_hide_size + value = flag:big + } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = root + LEGENDARY = no + ANIMAL = flag:none + } + random_realm_province = { + limit = { + OR = { + terrain = forest + terrain = steppe + terrain = jungle + terrain = taiga + terrain = oasis + } + } + save_scope_as = location + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.324 = { + type = character_event + title = artifact_animal_hide_medium_name + desc = artifact_animal_hide_medium_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + save_scope_value_as = { + name = animal_hide_size + value = flag:medium + } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = root + LEGENDARY = no + ANIMAL = flag:none + } + random_realm_province = { + save_scope_as = location + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.325 = { + type = character_event + title = artifact_small_hide_name + desc = artifact_small_hide_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + save_scope_value_as = { + name = animal_hide_size + value = flag:small + } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = root + LEGENDARY = no + ANIMAL = flag:none + } + random_realm_province = { + save_scope_as = location + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.326 = { + type = character_event + title = artifact_wall_banner_name + desc = artifact_wall_banner_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + trigger = { + exists = var:epic_battle_location + exists = var:epic_loser + } + + immediate = { + create_artifact_wall_banner_effect = { OWNER = root CREATOR = root TARGET = root.primary_title } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.327 = { + type = character_event + title = artifact_wall_shield_name + desc = artifact_wall_shield_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + create_artifact_wall_shield_effect = { + OWNER = root + TARGET = root.house + CREATOR = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.328 = { + type = character_event + title = artifact_wall_skull_name + desc = artifact_wall_shield_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + create_artifact_wall_skull_effect = { + OWNER = root + HUNTER = root + LEGENDARY = no + ANIMAL = flag:none + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.329 = { + type = character_event + title = artifact_wall_narwhal_horn_name + desc = artifact_wall_narwhal_horn + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + create_artifact_wall_narwhal_horn_effect = { + OWNER = root + HUNTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +#debug.330 = { +# type = character_event +# title = artifact_wall_rhino_horn_name +# desc = artifact_wall_rhino_horn +# theme = stewardship_wealth_focus +# orphan = yes +# +# immediate = { +# create_artifact_wall_rhino_horn_effect = { OWNER = root } +# } +# +# option = { +# name = debug_test_artifact_cloth_option +# } +#} + +debug.331 = { + type = character_event + title = artifact_sculpture_name + desc = artifact_sculpture_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + create_artifact_sculpture_effect = { + OWNER = root + SCULPTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.332 = { + type = character_event + title = artifact_pedestal_rock_name + desc = artifact_pedestal_rock_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_rock_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.333 = { + type = character_event + title = artifact_pedestal_pouch_name + desc = artifact_pedestal_pouch_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_pouch_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.334 = { + type = character_event + title = artifact_pedestal_scroll_name + desc = artifact_pedestal_scroll_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_scroll_effect = { + OWNER = root + WRITER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.335 = { + type = character_event + title = artifact_pedestal_crucifix_name + desc = artifact_pedestal_crucifix_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_crucifix_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.336 = { + type = character_event + title = artifact_pedestal_cross_name + desc = artifact_pedestal_cross_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_cross_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.337 = { + type = character_event + title = artifact_pedestal_human_skull_name + desc = artifact_pedestal_human_skull_description + theme = stewardship_wealth_focus + orphan = yes + + trigger = { + scope:owner = { + any_killed_character = { } + } + } + + immediate = { + create_artifact_pedestal_human_skull_effect = { OWNER = root DESKULLED = root CREATOR = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.338 = { + type = character_event + title = artifact_pedestal_massive_diamond_name + desc = artifact_pedestal_massive_diamond + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_diamond_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.339 = { + type = character_event + title = artifact_pedestal_gold_nugget_name + desc = artifact_pedestal_gold_nugget + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_gold_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +#debug.340 = { +# type = character_event +# title = artifact_pedestal_mosque_lamp_name +# desc = artifact_pedestal_mosque_lamp +# theme = stewardship_wealth_focus +# orphan = yes +# +# immediate = { +# create_artifact_pedestal_lamp_effect = { OWNER = root } +# } +# +# option = { +# name = debug_test_artifact_cloth_option +# } +#} + + +debug.342 = { + type = character_event + title = artifact_book_title + desc = artifact_book_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + random_dummy_gender_effect = yes + save_scope_as = author + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:no + SET_TOPIC = flag:no + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.343 = { + type = character_event + title = artifact_pedestal_reliquary_christian_name + desc = artifact_pedestal_reliquary_christian_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_reliquary_christian_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.344 = { + type = character_event + title = artifact_pedestal_reliquary_islam_name + desc = artifact_pedestal_reliquary_islam_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_reliquary_islam_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.345 = { + type = character_event + title = artifact_pedestal_reliquary_buddhism_name + desc = artifact_pedestal_reliquary_buddhism_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_reliquary_buddhism_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.346 = { + type = character_event + title = artifact_pedestal_reliquary_judaism_name + desc = artifact_pedestal_reliquary_judaism_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_reliquary_judaism_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.347 = { + type = character_event + title = artifact_sculpture_religious_name + desc = artifact_sculpture_religious_description + theme = stewardship_wealth_focus + orphan = yes + + trigger = { + faith = { + NOR = { + has_doctrine = tenet_aniconism + religion = religion:judaism_religion + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:islam_religion + } + } + } + + immediate = { + create_artifact_sculpture_religious_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.348 = { + type = character_event + title = artifact_sculpture_religious_christian_name + desc = artifact_sculpture_religious_christian_description + theme = stewardship_wealth_focus + orphan = yes + + trigger = { + faith = { + NOT = { + has_doctrine = tenet_aniconism + } + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + } + + immediate = { + create_artifact_sculpture_religious_christian_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.349 = { + type = character_event + title = artifact_pedestal_reliquary_christian_name + desc = artifact_pedestal_reliquary_christian_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_christian_relic_effect_hist = { OWNER = root } + create_artifact_pedestal_islamic_relic_effect_hist = { OWNER = root } + create_artifact_pedestal_buddhism_relic_effect_hist = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +# Set relationship +debug.350 = { + type = character_event + title = set_relationship_debug_name + desc = set_relationship_debug_desc + theme = default + left_portrait = scope:recipient + + option = { + name = set_relationship_debug_friend_add + + trigger = { + scope:actor = { + can_set_relation_friend_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_friend = { reason = test_friend_desc target = scope:recipient } + } + } + option = { + name = set_relationship_debug_friend_remove + + trigger = { + scope:actor = { + any_relation = { + type = friend + this = scope:recipient + } + } + + NOT = { + scope:actor = { + any_relation = { + type = best_friend + this = scope:recipient + } + } + } + } + + scope:actor = { + remove_relation_friend = scope:recipient + } + } + option = { + name = set_relationship_debug_best_friend_add + + trigger = { + scope:actor = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_best_friend = scope:recipient + } + } + option = { + name = set_relationship_debug_best_friend_remove + + trigger = { + scope:actor = { + any_relation = { + type = best_friend + this = scope:recipient + } + } + } + + scope:actor = { + remove_relation_best_friend = scope:recipient + } + } + option = { + name = set_relationship_debug_lover_add + + trigger = { + scope:actor = { + can_set_relation_lover_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_lover = { reason = test_lover_desc target = scope:recipient } + } + } + option = { + name = set_relationship_debug_lover_remove + + trigger = { + scope:actor = { + any_relation = { + type = lover + this = scope:recipient + } + } + + NOT = { + scope:actor = { + any_relation = { + type = soulmate + this = scope:recipient + } + } + } + } + + scope:actor = { + remove_relation_lover = scope:recipient + } + } + option = { + name = set_relationship_debug_soulmate_add + + trigger = { + scope:actor = { + can_set_relation_soulmate_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_soulmate = { reason = test_soulmate_desc copy_reason = lover target = scope:recipient } + } + } + option = { + name = set_relationship_debug_soulmate_remove + + trigger = { + scope:actor = { + any_relation = { + type = soulmate + this = scope:recipient + } + } + } + + scope:actor = { + remove_relation_soulmate = scope:recipient + } + } + option = { + name = set_relationship_debug_childhood_bully_add + + trigger = { + scope:actor = { + can_set_relation_bully_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_bully = scope:recipient + } + } + option = { + name = set_relationship_debug_childhood_bully_remove + + trigger = { + scope:actor = { + any_relation = { + type = bully + this = scope:recipient + } + } + } + + scope:actor = { + remove_relation_bully = scope:recipient + } + } + option = { + name = set_relationship_debug_childhood_victim_add + + trigger = { + scope:actor = { + can_set_relation_victim_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_victim = scope:recipient + } + } + option = { + name = set_relationship_debug_childhood_victim_remove + + trigger = { + scope:actor = { + any_relation = { + type = victim + this = scope:recipient + } + } + } + + scope:actor = { + remove_relation_victim = scope:recipient + } + } + option = { + name = set_relationship_debug_rival_add + + trigger = { + scope:actor = { + can_set_relation_rival_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_rival = { + target = scope:recipient + reason = rival_debug + } + } + } + option = { + name = set_relationship_debug_rival_remove + + trigger = { + scope:actor = { + any_relation = { + type = rival + this = scope:recipient + } + } + + NOT = { + scope:actor = { + any_relation = { + type = nemesis + this = scope:recipient + } + } + } + } + + scope:actor = { + remove_relation_rival = scope:recipient + } + } + option = { + name = set_relationship_debug_nemesis_add + + trigger = { + scope:actor = { + can_set_relation_nemesis_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_nemesis = { + target = scope:recipient + reason = nemesis_debug + } + } + } + option = { + name = set_relationship_debug_nemesis_remove + + trigger = { + scope:actor = { + any_relation = { + type = nemesis + this = scope:recipient + } + } + } + + scope:actor = { + remove_relation_nemesis = scope:recipient + } + } + option = { + name = set_relationship_debug_nevermind + } +} + +debug.360 = { + type = character_event + title = enter_text_save_in_death_title + desc = enter_text_save_in_death_desc + theme = default + left_portrait = root + orphan = yes + + widget = { + gui = "event_window_widget_enter_text" + container = "dynamic_birth_name" + controller = { + type = text + data = { + key = test_saved_text + default = cat_name_mite + } + } + setup_scope = { + root = { save_scope_as = text_target } + } + } + + option = { + name = enter_text_save_in_death_opt + store_localized_text_in_death = test_saved_text + add_to_global_variable_list = { + name = test_saved_text_character + target = root + } + remove_variable = test_saved_text + death = natural + } +} + +debug.361 = { + type = character_event + title = enter_text_save_in_death_title + desc = enter_text_save_in_death_retreive_desc + theme = default + left_portrait = scope:text_character + orphan = yes + + immediate = { + random_in_global_list = { + variable = test_saved_text_character + save_scope_as = text_character + } + } + + option = { + name = enter_text_save_in_death_retreive_opt + } + option = { + name = enter_text_save_in_death_clear_opt + every_in_global_list = { + variable = test_saved_text_character + remove_localized_text = test_saved_text + } + } +} + +debug.380 = { + type = character_event + hidden = yes + theme = default + orphan = yes + + immediate = { + capital_province = { + set_variable = { + name = random_building_variable + value = 0 + days = 365 + } + } + } +} + +debug.400 = { + type = character_event + title = generate_artifact_with_history_debug_name + desc = generate_artifact_with_history_debug_desc + theme = default + left_portrait = root + right_portrait = scope:recipient + + option = { + name = generate_artifact_with_history_debug_given + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = given + } + } + + option = { + name = generate_artifact_with_history_debug_discovered + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = discovered + } + } + + option = { + name = generate_artifact_with_history_debug_stolen_unknown + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = stolen_unknown + } + } + + option = { + name = generate_artifact_with_history_debug_stolen + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = stolen + } + } + + option = { + name = generate_artifact_with_history_debug_created_unknown + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = created_unknown + } + } + + option = { + name = generate_artifact_with_history_debug_created + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = created + } + } + + option = { + name = generate_artifact_with_history_debug_inherited_unknown + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = inherited_unknown + } + } + + option = { + name = generate_artifact_with_history_debug_inherited + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = inherited + } + } + + option = { + name = generate_artifact_with_history_debug_reforged + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = reforged + } + } + + option = { + name = generate_artifact_with_history_debug_conquest + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = conquest + } + } + + option = { + name = generate_artifact_with_history_debug_taken_in_siege + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = taken_in_siege + } + } + +} + +# Have Sex With Character (only usable via interaction) +debug.410 = { + hidden = yes + immediate = { + send_interface_message = { + type = sway_good_message + title = debug_sex_interaction + left_icon = scope:recipient + right_icon = ROOT # References root instead of scope:actor to verify that root is defined + + had_sex_with_effect = { + CHARACTER = scope:recipient + PREGNANCY_CHANCE = pregnancy_chance + } + } + } +} + +# Convert all of iberia to mozarab & conquer caucasian iberia +debug.411 = { # For usage debugging achievements. Should be a generic command rather than a predefined event. + orphan = yes + hidden = yes + immediate = { + debug_log = "Iberia Converted to Mozarab!" + every_county_in_region = { + region = world_europe_west_iberia + set_county_faith = faith:mozarabic_church + } + + debug_log = "Woosh! Caucasian Iberia is now yours!" + every_county_in_region = { + region = dlc_fp2_caucasian_iberia + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + } + change_title_holder_include_vassals = { + holder = root + change = scope:change + } + resolve_title_and_vassal_change = scope:change + change_county_control = 100 # (Not actually necessary, apparently) + } + } +} + +debug.412 = { # Spawn the CHESS-A-THRON 3000, a perfect creature designed to beat you up at the game of chess + orphan = yes + hidden = yes + immediate = { + create_character = { + age = { 20 32 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + martial = 100 + learning = 100 + intrigue = 100 + + dynasty = none + after_creation = { + add_gold = { minor_gold_value medium_gold_value } + add_prestige = { minor_prestige_gain medium_prestige_gain } + add_piety = { minor_piety_gain medium_piety_gain } + } + + save_scope_as = generated_actor + } + + send_interface_toast = { + type = event_toast_effect_good + title = b_chessy + left_icon = scope:generated_actor + + add_courtier = scope:generated_actor + } + } +} + +# Cycle through duel animations (hardcoded) - but easy to read and expand upon :) +debug.415 = { # You could have a system that checks the scripted animations themselves, but this was made only to test the animations themselves + type = character_event + title = { + desc = TITLE_ANIMATION + desc = CONSTRUCT_BUILDINGS_DETAILS + } + desc = building_type_nalanda_university_desc + + theme = mental_break + left_portrait = { + character = root + + ### DUEL ANIMATIONS + # Axe + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 0 scope:animation_view_celebrations = 0 } + animation = aggressive_axe + } + triggered_animation = { # Celebration animation (Originally designed with an elegant, concatenating design, then I realized the engine did not support it.) + trigger = { scope:animation_cycle = 0 scope:animation_view_celebrations = 1 } + animation = celebrate_axe + } + # Mace + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 1 scope:animation_view_celebrations = 0 } + animation = aggressive_mace + } + triggered_animation = { # Celebration animation + trigger = { scope:animation_cycle = 1 scope:animation_view_celebrations = 1 } + animation = celebrate_mace + } + # Sword + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 2 scope:animation_view_celebrations = 0 } + animation = aggressive_sword + } + triggered_animation = { # Celebration animation + trigger = { scope:animation_cycle = 2 scope:animation_view_celebrations = 1 } + animation = celebrate_sword + } + # Dagger + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 3 scope:animation_view_celebrations = 0 } + animation = aggressive_dagger + } + triggered_animation = { # Celebration animation + trigger = { scope:animation_cycle = 3 scope:animation_view_celebrations = 1 } + animation = celebrate_dagger + } + # Spear + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 4 scope:animation_view_celebrations = 0 } + animation = aggressive_spear + } + triggered_animation = { # Celebration animation + trigger = { scope:animation_cycle = 4 scope:animation_view_celebrations = 1 } + animation = celebrate_spear + } + # Hammer + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 5 scope:animation_view_celebrations = 0 } + animation = aggressive_hammer + } + triggered_animation = { # Celebration animation + trigger = { scope:animation_cycle = 5 scope:animation_view_celebrations = 1 } + animation = celebrate_hammer + } + # Fallback + animation = aggressive_sword + } + artifact = { + target = root.var:signature_weapon_scope + position = lower_left_portrait + trigger = { exists = root.var:signature_weapon_scope } + } + + immediate = { + # Create variables used for tracking where in the cycle you are + if = { + limit = { exists = scope:animation_cycle } + if = { + limit = { scope:animation_cycle_action = 1 } + save_scope_value_as = { + name = animation_cycle + value = { + value = scope:animation_cycle + add = 1 + } + } + } + if = { + limit = { scope:animation_cycle_action = 0 } + save_scope_value_as = { + name = animation_cycle + value = { + value = scope:animation_cycle + subtract = 1 + } + } + } + } + else = { + save_scope_value_as = { + name = animation_cycle + value = 0 + } + save_scope_value_as = { + name = animation_view_celebrations + value = 0 + } + } + + # Wrapping support + if = { + limit = { scope:animation_cycle < 0 } # Go from the back to the top + save_scope_value_as = { + name = animation_cycle + value = 5 # Replace this with the highest number in the animation set + } + } + if = { + limit = { scope:animation_cycle > 5 } # Replace this with the highest number in the animation set + save_scope_value_as = { + name = animation_cycle + value = 0 + } + } + } + + option = { # Forward (next anim) + name = dynn_Daflos_motto + + save_scope_value_as = { + name = animation_cycle_action + value = 1 + } + + trigger_event = debug.415 + } + + option = { # Backwards (prev anim) + name = default_retreat + + save_scope_value_as = { + name = animation_cycle_action + value = 0 + } + + trigger_event = debug.415 + } + + option = { # Switch to celebration animations + name = lover.3215.t + trigger = { scope:animation_view_celebrations = 0 } + save_scope_value_as = { + name = animation_view_celebrations + value = 1 + } + save_scope_value_as = { + name = animation_cycle_action + value = 2 # Used to keep still + } + + trigger_event = debug.415 + } + + option = { # Switch back from celebration animations + name = hold_court.8110.t + trigger = { scope:animation_view_celebrations = 1 } + save_scope_value_as = { + name = animation_view_celebrations + value = 0 + } + save_scope_value_as = { + name = animation_cycle_action + value = 2 + } + + trigger_event = debug.415 + } + + option = { name = EXIT_TO_DESKTOP } # Exit debug event +} + +# Debug set up conditions for childhood_education.0004 +debug.418 = { + hidden = yes + immediate = { + debug_log = "Running autotest for childhood_education.0004" + if = { + limit = { + any_relation = { + type = ward + has_any_focus = no + } + } + add_piety = 50000 # Acts as a warning that maintenance events did not run + } + if = { + limit = { # Then, this second time, we give it a new focus to force childhood_education.0004 to trigger + any_relation = { + type = ward + has_focus = education_martial + } + } + random_relation = { # Change focus + type = ward + set_focus = education_diplomacy + } + # (this is the part where the event auto-triggers itself) (or should. All reqs are met but it seems the hook fails) + } + else = { + random_relation = { + type = ward + set_focus = education_martial # Change focus (gives first focus), then call event again + } + trigger_event = debug.418 # Apparently the fact that this event calls itself makes it no longer an orphan, which I find very amusing + } + } +} + +# Family Feud +debug.501 = { # Have another house murder my close family + type = character_event + hidden = yes + orphan = yes + + immediate = { + faith = { + random_faith_playable_ruler = { + limit = { + in_diplomatic_range = root + house != root.house + } + save_scope_as = killer_scope + } + } + random_close_family_member = { + limit = { + is_close_family_of = root + this != root + } + death = { + death_reason = death_duel + killer = scope:killer_scope + } + } + } +} + +debug.502 = { # Have another house kill me + type = character_event + hidden = yes + orphan = yes + + immediate = { + faith = { + random_faith_playable_ruler = { + limit = { + house_feud_valid_feud_target_trigger = yes + } + save_scope_as = killer_scope + } + } + death = { + death_reason = death_duel + killer = scope:killer_scope + } + } +} + +debug.503 = { # Have my house kill a feud target member + type = character_event + hidden = yes + orphan = yes + + trigger = { + house = { + any_house_member = { + is_adult = yes + is_house_head = no + NOT = { this = root } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + any_house_relation = { + has_house_relation_level = feud + any_relation_house = { + NOT = { this = root.house } + any_house_member = { + is_adult = yes + is_house_head = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this.house.house_head } + } + } + } + } + } + + immediate = { + house = { + random_house_member = { + limit = { + is_adult = yes + is_house_head = no + NOT = { this = root } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + save_scope_as = murderer_scope + } + random_house_relation = { + limit = { + has_house_relation_level = feud + any_relation_house = { + NOT = { this = root.house } + any_house_member = { + is_adult = yes + is_house_head = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this.house.house_head } + save_temporary_scope_as = victim_temp + } + } + } + } + } + scope:victim_temp = { + death = { + death_reason = death_duel + killer = scope:murderer_scope + } + } + } +} + +debug.504 = { # Have my house killed by a feud target member + type = character_event + hidden = yes + orphan = yes + + trigger = { + house = { + any_house_member = { + is_adult = yes + this != root + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + any_house_relation = { + has_house_relation_level = feud + any_relation_house = { + NOT = { this = root.house } + any_house_member = { + is_adult = yes + is_house_head = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this.house.house_head } + } + } + } + } + } + + immediate = { + house = { + random_house_member = { + limit = { + is_adult = yes + this != root + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + save_scope_as = victim_scope + } + random_house_relation = { + limit = { + has_house_relation_level = feud + any_relation_house = { + NOT = { this = root.house } + any_house_member = { + is_adult = yes + is_house_head = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this.house.house_head } + save_temporary_scope_as = murderer_temp + } + } + } + } + } + scope:victim_scope = { + death = { + death_reason = death_duel + killer = scope:murderer_temp + } + } + } +} + +debug.510 = { # Placeholder debug event - Used to mark the location of placeholders + type = character_event + title = { # My favourite movie of the original triology + desc = d_star_company_adj + desc = game_concept_wars + desc = KEY_KP_MINUS + desc = cat_revenge_modifier + } + desc = { + desc = childhood.7400_mother_dead + desc = double_line_break + desc = RELIGION_LOC_PLACEHOLDER + desc = double_line_break + desc = RELIGION_LOC_PLACEHOLDER + desc = double_line_break + desc = RELIGION_LOC_PLACEHOLDER + desc = double_line_break + desc = RELIGION_LOC_PLACEHOLDER + } + + #orphan = yes + theme = mental_break + left_portrait = root + right_portrait = character:33922 + + option = { name = debug_generic_option } # Dear debug console, quiet please. + option = { name = debug_generic_option trigger = { always = no } trigger_event = debug.510 } +} + +debug.511 = { # Set secret faith for Character + type = character_event + theme = default + orphan = yes + + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + + option = { + name = debug.511.a + + trigger = { + NOT = { exists = root.secret_faith } + } + + root = { + set_character_secret_faith = faith:rabbinism + } + } + + option = { + name = debug.511.b + + trigger = { + exists = root.secret_faith + } + + root = { + remove_character_secret_faith = yes + } + } +} + +debug.512 = { + type = character_event + theme = default + orphan = yes + + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + + option = { + name = debug.512.a + } +} + +debug.513 = { + title = debug_main + desc = debug_main + theme = ep2_video_test + orphan = yes + + option = { + name = debug_main + } +} + +debug.605 = { + type = character_event + title = debug_main + desc = debug_main + theme = default + orphan = yes + + left_portrait = root + + option = { + name = debug_main + stress_impact = { + base = 30 + } + } + option = { + name = debug_main + + trigger = { + dread > 20 + } + } + option = { + name = debug_main + + trigger = { + has_trait = diligent + } + } + option = { + name = debug_main + + trigger = { + martial > 10 + } + } + option = { + name = debug_main + stress_impact = { + base = 30 + } + + trigger = { + dread > 20 + has_trait = diligent + has_trait = brave + martial > 10 + stewardship > 10 + } + } +} + +#steam rich presence test - update this event with your new rich presence text to see it in the desc +debug.700 = { + type = character_event + title = steam_rich_presence_debug_t + desc = steam_rich_presence_debug_desc + theme = realm + orphan = yes + + immediate = { + random_ruler = { + limit = { + has_trait = sayyid + NOR = { + has_trait = fp3_struggle_detractor + has_trait = fp3_struggle_supporter + } + } + save_scope_as = sayyid + } + random_ruler = { + limit = { + has_trait = fp3_struggle_detractor + NOT = { has_trait = fp3_struggle_supporter } + } + save_scope_as = fp3_struggle_detractor + } + random_ruler = { + limit = { + has_trait = fp3_struggle_supporter + NOT = { has_trait = fp3_struggle_detractor } + } + save_scope_as = fp3_struggle_supporter + } + random_ruler = { + limit = { + has_character_modifier = fp3_struggle_caliph_super_suspicious_modifier + } + save_scope_as = sus_caliph + } + random_ruler = { + limit = { + any_character_struggle = { + #involvement = involved + is_struggle_type = persian_struggle + } + } + save_scope_as = persian_struggle + } + random_ruler = { + limit = { + any_character_struggle = { + #involvement = involved + is_struggle_type = iberian_struggle + } + } + save_scope_as = iberian_struggle + } + } + + option = {} +} + +debug.9595 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = PROGRESS_TO_VICTORY_DEBUG + theme = realm + orphan = yes + lower_right_portrait = scope:bottom + lower_left_portrait = scope:top + + immediate = { + involved_activity = { save_scope_as = activity } + scope:activity = { + ordered_attending_character = { + limit = { + trigger_if = { + limit = { activity_tournament_race_contest_trigger = no } + activity_is_valid_tournament_contestant = yes + } + exists = var:contest_aptitude + } + order_by = var:contest_aptitude + save_scope_as = top + } + ordered_attending_character = { + limit = { + trigger_if = { + limit = { activity_tournament_race_contest_trigger = no } + activity_is_valid_tournament_contestant = yes + } + exists = var:contest_aptitude + } + order_by = { + value = 0 + subtract = var:contest_aptitude + } + save_scope_as = bottom + } + } + } + + option = { + name = LOREM_IPSUM_TITLE + } +} + +debug.9600 = { # Event for testing Tax Collector script support + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + lower_left_portrait = scope:tax_collector + lower_right_portrait = scope:tax_collector_vassal + + immediate = { + random_tax_collector = { save_scope_as = tax_collector } + + scope:tax_collector = { + random_tax_collector_vassal = { save_scope_as = tax_collector_vassal } + } + } + + option = { + name = aptitude_terrible + trigger = { + scope:tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value = 1 + } + } + } + + fire_tax_collector = scope:tax_collector + } + + option = { + name = aptitude_poor + trigger = { + scope:tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value = 2 + } + } + } + + fire_tax_collector = scope:tax_collector + } + + option = { + name = aptitude_average + trigger = { + scope:tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value = 3 + } + } + } + + fire_tax_collector = scope:tax_collector + } + + option = { + name = aptitude_good + trigger = { + scope:tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value = 4 + } + } + } + + fire_tax_collector = scope:tax_collector + } + + option = { + name = aptitude_excellent + trigger = { + scope:tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value = 5 + } + } + } + + fire_tax_collector = scope:tax_collector + } +} + + +# Test for maximum usage of everything in activities. +debug.9601 = { + type = activity_event + title = debug_9601.t + desc = debug_9601.desc + theme = feast_activity + left_portrait = { + character = root + animation = hunting_falcon + } + center_portrait = { + character = root + animation = hunting_falcon + } + right_portrait = { + character = root + animation = hunting_falcon + } + lower_left_portrait = root + lower_center_portrait = root + lower_right_portrait = root + orphan = yes + + trigger = { always = no } + + # Ayyy. + option = { name = debug_9601.a } + + # Yo. + option = { name = debug_9601.b } + + # I'm eventing here. + option = { name = debug_9601.c } + + # Come on. + option = { name = debug_9601.d } +} + +debug.9610 = { # Spawn a super tax collector + hidden = yes + orphan = yes + + immediate = { + create_character = { + name = "Super Tax Collector" + age = { 20 32 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + trait = blind + stewardship = 100 + + dynasty = none + after_creation = { add_character_flag = is_guaranteed_excellent_tax_collector } + + save_scope_as = generated_actor + } + + send_interface_message = { + type = event_stewardship_good + title = governance_1053_corrupt_tax_collectors_modifier + right_icon = scope:generated_actor + + add_courtier = scope:generated_actor + } + } +} + +debug.9611 = { # Spawn a assassin + hidden = yes + orphan = yes + + immediate = { + create_character = { + name = "Super Assassin" + age = { 20 32 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + intrigue = 100 + prowess = 100 + trait = schemer + trait = education_intrigue_4 + + dynasty = none + + save_scope_as = generated_actor + } + + send_interface_message = { + type = event_stewardship_good + title = { + desc = d_assassin + desc = motto_greed + } + right_icon = scope:generated_actor + + add_courtier = scope:generated_actor + } + } +} + +debug.9620 = { # Hunt Artifacts + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:hunter + scripted_animation = bow_drawn + } + + artifact = { + target = scope:trinket + position = lower_right_portrait + } + artifact = { + target = scope:skull + position = lower_center_portrait + } + artifact = { + target = scope:hide + position = lower_left_portrait + } + + immediate = { + random_courtier = { save_scope_as = hunter } + hidden_effect = { + random_list = { + 1 = { + hunt_activity_standard_game_effect = { PROVINCE = root.capital_province HUNTER = root } + } + 1 = { + hunt_activity_dangerous_game_effect = { PROVINCE = root.capital_province } + } + } + } + hunt_activity_standard_game_effect = { PROVINCE = root.capital_province HUNTER = root } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = no + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = hide } + if = { + limit = { + can_animal_produce_skull_trigger = { VARIABLE = root.var:animal_type } + } + create_artifact_wall_skull_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = no + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = skull } + } + create_artifact_animal_trinket_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = no + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = trinket } + } + + option = { + name = LOREM_IPSUM_TITLE + } + + after = { remove_variable = animal_type } +} + +debug.9621 = { # Legendary Artifacts + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:hunter + scripted_animation = bow_drawn + } + + artifact = { + target = scope:trinket + position = lower_right_portrait + } + artifact = { + target = scope:skull + position = lower_center_portrait + } + artifact = { + target = scope:hide + position = lower_left_portrait + } + + immediate = { + random_courtier = { save_scope_as = hunter } + hidden_effect = { + random_list = { + 1 = { + hunt_activity_standard_game_effect = { PROVINCE = root.capital_province HUNTER = root } + } + 1 = { + hunt_activity_dangerous_game_effect = { PROVINCE = root.capital_province } + } + } + } + hunt_activity_standard_game_effect = { PROVINCE = root.capital_province HUNTER = root } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = yes + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = hide } + if = { + limit = { + can_animal_produce_skull_trigger = { VARIABLE = root.var:animal_type } + } + create_artifact_wall_skull_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = yes + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = skull } + } + create_artifact_animal_trinket_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = yes + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = trinket } + } + + option = { + name = LOREM_IPSUM_TITLE + } + + after = { remove_variable = animal_type } +} + +# playground for great projects +debug.9622 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + immediate = { + random_realm_province = { + plan_great_project = { + founder = root + great_project_type = great_wall + save_scope_as = new_project + } + } + } + + option = { + name = debug_generic_option + + trigger = { + scope:new_project = { + great_project_construction_phase_is = planned + great_project_type = great_wall + } + } + # if planning new part of great wall add funds out of thin air + # create great project in random province + scope:new_project = { + great_project_founder = { + add_gold = 2000 + } + } + } + + option = { + name = debug_generic_option + + trigger = { + scope:new_project = {not = { + any_contribution = { + contribution_id = logistics + scope:new_project.great_project_founder = { + can_fund_project_contribution = prev + } + } + } } + } + scope:new_project = { + great_project_founder = { + add_prestige = 2000 + } + } + } + + option = { + name = debug_generic_option + + trigger = { + scope:new_project = { + any_contribution = { + contribution_is_required = yes + root = { + # prev = the selected contribution + can_fund_project_contribution = prev + } + } + } + } + + scope:new_project = { + random_contribution = { + limit = { contribution_is_required = yes } + root = { + # prev = the selected contribution + fund_great_project_contribution = { + contribution = prev + } + } + } + } + } +} diff --git a/N3OW/events/travel_events/travel_events_bp3.txt b/N3OW/events/travel_events/travel_events_bp3.txt new file mode 100644 index 00000000..107b3550 --- /dev/null +++ b/N3OW/events/travel_events/travel_events_bp3.txt @@ -0,0 +1,5738 @@ +namespace = travel_events_bp3 + +scripted_trigger bp3_travel_event_default_trigger = { + has_bp3_dlc_trigger = yes + is_location_valid_for_travel_event_on_land = yes + is_available_travelling_adult = yes +} + +scripted_trigger travel_events_bp3_1_character = { + age >= 12 + OR = { + is_child_of = root + is_spouse_of = root + has_friendly_relationship_trigger = { CHARACTER = root } + } +} + +travel_events_bp3.1 = { # Seasons of Change + type = character_event + content_source = dlc_015 + title = travel_events_bp3.1.t + desc = { + desc = travel_events_bp3.1.desc + first_valid = { + triggered_desc = { + trigger = { + current_season_spring = yes + } + desc = travel_events_bp3.1.desc.spring + } + triggered_desc = { + trigger = { + current_season_summer = yes + } + desc = travel_events_bp3.1.desc.summer + } + triggered_desc = { + trigger = { + current_season_autumn = yes + location = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + } + } + } + desc = travel_events_bp3.1.desc.autumn_desert + } + triggered_desc = { + trigger = { + current_season_autumn = yes + location = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + } + } + } + desc = travel_events_bp3.1.desc.autumn + } + triggered_desc = { + trigger = { + current_season_winter = yes + location = { + has_winter_trigger = no + } + } + desc = travel_events_bp3.1.desc.winter + } + triggered_desc = { + trigger = { + current_season_winter = yes + location = { + has_winter_trigger = yes + } + } + desc = travel_events_bp3.1.desc.winter_snow + } + triggered_desc = { + trigger = { + current_season_dry_season = yes + } + desc = travel_events_bp3.1.desc.dry_season + } + triggered_desc = { + trigger = { + current_season_rainy_season = yes + } + desc = travel_events_bp3.1.desc.rainy_season + } + } + } + + theme = travel + + override_background = { reference = wilderness } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:friendly_character + animation = survey + } + + override_effect_2d = { + trigger = { + current_season_rainy_season = yes + } + reference = rain + } + + override_effect_2d = { + trigger = { + OR = { + current_season_dry_season = yes + current_season_summer = yes + } + } + reference = legend_glow + } + + widget = { + is_shown = { + current_season_winter = yes + location = { + has_winter_trigger = yes + } + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.1 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + current_travel_plan = { + any_entourage_character = { + travel_events_bp3_1_character = yes + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + random_entourage_character = { + limit = { + travel_events_bp3_1_character = yes + } + save_scope_as = friendly_character + } + } + } + + option = { + name = travel_events_bp3.1.a + scope:friendly_character = { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 15 + } + } + current_travel_plan ?= { + delay_travel_plan = { days = 2 } + } + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 0 + } + } + + option = { + name = travel_events_bp3.1.b + flavor = travel_events_bp3.1.b.flavor + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +travel_events_bp3.5 = { # Caught Outside + type = character_event + content_source = dlc_015 + title = travel_events_bp3.5.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + current_season_winter = yes + } + desc = travel_events_bp3.5.desc.snow + } + triggered_desc = { + trigger = { + current_season_winter = no + } + desc = travel_events_bp3.5.desc.rain + } + } + } + theme = travel + + override_background = { reference = wilderness } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = disappointed + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.5 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + OR = { + AND = { + current_season_winter = yes + location = { + has_winter_trigger = yes + } + } + current_season_rainy_season = yes + AND = { + OR = { + current_season_spring = yes + current_season_autumn = yes + } + location = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + } + } + } + } + } + + override_effect_2d = { + trigger = { + current_season_winter = no + } + reference = rain + } + + widget = { + is_shown = { + current_season_winter = yes + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + } + + option = { + name = travel_events_bp3.5.a + + stress_impact = { + base = minor_stress_impact_loss + } + + current_travel_plan ?= { + delay_travel_plan = { weeks = 1 } + } + + ai_chance = { + base = 0 + modifier = { + age > 55 + add = 100 + } + } + } + + option = { + name = { + trigger = { + current_season_winter = yes + } + text = travel_events_bp3.5.b.snow + } + name = { + trigger = { + current_season_winter = no + } + text = travel_events_bp3.5.b.rain + } + + if = { + limit = { + NOT = { has_trait = ill } + } + random = { + chance = { + value = 20 + if = { + limit = { + age > 55 + } + add = { + value = age + subtract = 55 + } + } + } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + } + + custom_tooltip = travel_events_bp3.5.b.tt + + hidden_effect = { + current_travel_plan = { + every_entourage_character = { + limit = { + this != root + } + random = { + chance = { + value = 5 + if = { + limit = { + age > 55 + } + add = { + value = age + subtract = 55 + } + } + } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + } + } + } + + current_travel_plan ?= { + add_destination_progress = { days = 5 } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + age > 55 + } + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +scripted_effect find_holy_site_effect = { + random_county_province = { + limit = { + is_county_capital = yes + barony = { is_holy_site_of = root.faith } + } + alternative_limit = { + barony = { is_holy_site_of = root.faith } + } + save_scope_as = holy_location + } +} + +travel_events_bp3.10 = { # Pilgrims on the Road + type = character_event + content_source = dlc_015 + title = travel_events_bp3.10.t + desc = { + desc = travel_events_bp3.10.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:holy_order_character + } + desc = travel_events_bp3.10.desc.holy_order + } + triggered_desc = { + trigger = { + NOT = { exists = scope:holy_order_character } + } + desc = travel_events_bp3.10.desc.pilgrims + } + } + } + theme = travel + + override_background = { reference = ep3_campfire } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = toast + } + + right_portrait = { + character = scope:pilgrim_character + animation = lantern + hide_info = yes + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.10 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + NOT = { government_has_flag = government_is_celestial } + location.county = { + OR = { + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + any_neighboring_county = { + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + location.county = { + find_holy_site_effect = yes + if = { + limit = { + NOT = { exists = scope:holy_location } + } + random_neighboring_county = { + limit = { + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + } + find_holy_site_effect = yes + } + } + } + faith = { + random_faith_holy_order = { + leader = { save_scope_as = grandmaster } + } + } + if = { + limit = { + exists = scope:grandmaster + } + create_character = { + template = soldier_friend_character + culture = scope:grandmaster.culture + faith = scope:grandmaster.faith + location = root.location + + after_creation = { + save_scope_as = holy_order_character + save_scope_as = pilgrim_character + add_character_flag = { + flag = need_military_outfit + } + add_trait = order_member + add_piety_level = 1 + scope:grandmaster = { + add_courtier = prev + } + } + } + } + else = { + create_character = { + template = soldier_friend_character + culture = root.culture + faith = root.faith + gender = root + location = root.location + save_scope_as = pilgrim_character + } + } + } + + option = { + name = travel_events_bp3.10.a + if = { + limit = { + exists = scope:holy_order_character + } + add_piety = minor_piety_gain + add_hook = { + type = favor_hook + target = scope:holy_order_character + } + progress_towards_friend_effect = { + REASON = friend_story_by_fire + CHARACTER = scope:holy_order_character + OPINION = default_friend_opinion + } + } + else = { + add_prestige = minor_prestige_gain + } + + stress_impact = { + gregarious = minor_stress_impact_loss + paranoid = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + } + modifier = { + factor = 5 + has_trait = gregarious + } + } + } + + option = { + name = travel_events_bp3.10.b + trigger = { + current_travel_plan.next_destination_province = scope:holy_location + } + if = { + limit = { + exists = scope:holy_order_character + } + add_piety = medium_piety_gain + current_travel_plan = { + add_travel_plan_modifier = { + modifier = holy_knights_travel_modifier + years = 1 + } + } + } + else = { + current_travel_plan = { + add_travel_plan_modifier = { + modifier = holy_pilgrims_travel_modifier + years = 1 + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + paranoid = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + } + modifier = { + factor = 5 + has_trait = gregarious + } + } + } + + option = { + name = { + trigger = { + exists = scope:holy_order_character + } + text = travel_events_bp3.10.c.holy_order + } + name = { + trigger = { + NOT = { exists = scope:holy_order_character } + } + text = travel_events_bp3.10.c.pilgrims + } + flavor = travel_events_bp3.10.c.flavor + if = { + limit = { + exists = scope:holy_order_character + } + add_piety = medium_piety_loss + add_gold = { + value = { + value = tiny_gold_value + divide = 2 + multiply = scope:holy_order_character.stewardship + } + min = 50 + max = 1000 + } + scope:holy_order_character = { + death = { + death_reason = death_murder + killer = root + } + } + } + else = { + add_piety = major_piety_loss + add_dread = medium_dread_gain + add_gold = minor_gold_value + + hidden_effect = { + scope:pilgrim_character = { + death = { + death_reason = death_murder + killer = root + } + } + } + } + if = { + limit = { + has_government = landless_adventurer_government + NOT = { has_trait = gallowsbait } + } + add_trait = gallowsbait + } + else_if = { + limit = { + has_government = landless_adventurer_government + has_trait = gallowsbait + } + add_trait_xp = { + trait = gallowsbait + track = bandit + value = 5 + } + } + + stress_impact = { + compassionate = medium_stress_gain + greedy = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 5 + OR = { + has_trait = greedy + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { + name = travel_events_bp3.10.d + if = { + limit = { + exists = scope:holy_order_character + } + scope:holy_order_character = { + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -15 + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + gregarious = minor_stress_gain + compassionate = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = compassionate + } + } + modifier = { + factor = 5 + has_trait = paranoid + } + } + } + + after = { + mp_resume_travel_plan = yes + if = { + limit = { + NOT = { exists = scope:holy_order_character } + } + scope:pilgrim_character = { + silent_disappearance_ai_effect = yes + } + } + if = { + limit = { + exists = scope:holy_order_character + } + scope:holy_order_character = { + silent_disappearance_ai_effect = yes + } + } + } +} + +scripted_trigger bard_murderer_trait_trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = murderer + has_trait = schemer + has_trait = torturer + } +} + +scripted_trigger bard_lustful_trait_trigger = { + OR = { + has_trait = lustful + has_trait = adulterer + has_trait = fornicator + has_trait = deviant + } +} + +scripted_trigger bard_gluttonous_trait_trigger = { + OR = { + has_trait = drunkard + has_trait = gluttonous + has_trait = lifestyle_reveler + } +} + +scripted_trigger bard_fool_trait_trigger = { + OR = { + has_trait = lunatic + has_trait = possessed + has_trait = intellect_bad + has_trait = dull + } +} + +scripted_trigger bard_sinful_trait_trigger = { + OR = { + bard_murderer_trait_trigger = yes + bard_lustful_trait_trigger = yes + bard_gluttonous_trait_trigger = yes + bard_fool_trait_trigger = yes + has_trait = craven + } +} + +scripted_effect bard_replace_position_effect = { + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:bard_character + holder = court_position:$POSITION$ + court_position = $POSITION$ + } + remove_character_flag = temporary_court_position_cost_removal +} + +travel_events_bp3.15 = { # The Stories of + type = character_event + content_source = dlc_015 + title = travel_events_bp3.15.t + desc = { + desc = travel_events_bp3.15.desc + random_valid = { + triggered_desc = { + trigger = { + scope:liege = { bard_murderer_trait_trigger = yes } + } + desc = travel_events_bp3.15.desc.murderer + } + triggered_desc = { + trigger = { + scope:liege = { bard_lustful_trait_trigger = yes } + } + desc = travel_events_bp3.15.desc.lustful.man + } + triggered_desc = { + trigger = { + scope:liege = { bard_lustful_trait_trigger = yes } + } + desc = travel_events_bp3.15.desc.lustful.woman + } + triggered_desc = { + trigger = { + scope:liege = { bard_gluttonous_trait_trigger = yes } + } + desc = travel_events_bp3.15.desc.gluttonous + } + triggered_desc = { + trigger = { + scope:liege = { bard_fool_trait_trigger = yes } + } + desc = travel_events_bp3.15.desc.fool + } + triggered_desc = { + trigger = { + scope:liege = { has_trait = craven } + } + desc = travel_events_bp3.15.desc.craven + } + } + desc = travel_events_bp3.15.desc.outro + } + theme = travel + + override_background = { reference = wilderness } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = laugh + } + + right_portrait = { + character = scope:bard_character + animation = storyteller + } + + lower_right_portrait = scope:liege + + trigger = { + static_group_filter = { + group = travel_events_bp3.15 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + NOR = { + location.county.holder.top_liege = ROOT + location.county.title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + location.county.holder.top_liege = { + has_title = title:h_china + } + } + location.county.holder.top_liege = { + age > 16 + bard_sinful_trait_trigger = yes + } + } + + immediate = { + location = { save_scope_as = location } + mp_delay_travel_plan = { DAYS = 90 } + location.county.holder.top_liege = { + save_scope_as = liege + } + + create_character = { + template = master_bard_camp_officer_template + culture = location.culture + faith = location.faith + gender = root + location = location + save_scope_as = bard_character + } + } + + option = { + name = travel_events_bp3.15.a + stress_impact = { + base = minor_stress_impact_loss + } + custom_tooltip = travel_events_bp3.15.a.tt + hidden_effect = { + if = { + limit = { + is_ai = no + } + random = { + chance = 33 + scope:liege = { + random_secret = { + expose_secret = root + } + } + } + } + scope:bard_character = { + silent_disappearance_ai_effect = yes + } + } + + ai_chance = { + base = 250 + modifier = { + factor = 5 + has_trait = ambitious + } + } + } + + option = { + name = travel_events_bp3.15.b + trigger = { + OR = { + is_valid_to_hire_court_position_type = court_musician_court_position + is_valid_to_hire_court_position_type = court_jester_court_position + is_valid_to_hire_court_position_type = master_bard_camp_officer + } + } + + show_as_tooltip = { + if = { + limit = { + is_valid_to_hire_court_position_type = court_musician_court_position + } + appoint_court_position = { + recipient = scope:bard_character + court_position = court_musician_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_jester_court_position + } + appoint_court_position = { + recipient = scope:bard_character + court_position = court_jester_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + } + appoint_court_position = { + recipient = scope:bard_character + court_position = master_bard_camp_officer + } + } + } + custom_tooltip = will_have_excellent_aptitude + + hidden_effect = { + scope:bard_character = { add_to_court_and_entourage_effect = yes } + if = { + limit = { + is_valid_to_hire_court_position_type = court_musician_court_position + NOT = { employs_court_position = court_musician_court_position } + } + appoint_court_position = { + recipient = scope:bard_character + court_position = court_musician_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_musician_court_position + employs_court_position = court_musician_court_position + } + bard_replace_position_effect = { POSITION = court_musician_court_position } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_jester_court_position + NOT = { employs_court_position = court_jester_court_position } + } + appoint_court_position = { + recipient = scope:bard_character + court_position = court_jester_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_jester_court_position + employs_court_position = court_jester_court_position + } + bard_replace_position_effect = { POSITION = court_jester_court_position } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + NOT = { employs_court_position = master_bard_camp_officer } + } + appoint_court_position = { + recipient = scope:bard_character + court_position = master_bard_camp_officer + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + employs_court_position = master_bard_camp_officer + } + bard_replace_position_effect = { POSITION = master_bard_camp_officer } + } + } + + ai_chance = { + base = 100 + } + } + + option = { + name = travel_events_bp3.15.c + add_dread = minor_dread_gain + scope:liege = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + scope:bard_character = { + death = { + death_reason = death_murder + killer = root + } + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 10 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + after = { + mp_resume_travel_plan = yes + + scope:bard_character = { + silent_disappearance_ai_effect = yes + } + } +} + +scripted_trigger bp3_home_city_trigger = { + has_holding_type = city_holding + free_building_slots > 0 +} + +travel_events_bp3.20 = { # The Guild + type = character_event + content_source = dlc_015 + title = travel_events_bp3.20.t + desc = travel_events_bp3.20.desc + theme = travel + + override_background = { reference = market } + + cooldown = { years = 25 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:merchant_character + animation = debating + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 0.3 + is_ai = yes + } + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.20 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = city_holding + local_guild_trigger = yes + } + any_sub_realm_barony = { + title_province = { bp3_home_city_trigger = yes } + } + OR = { # Check if it is at all feasible that these people have an interest in your lands + location.empire = capital_barony.empire + location.county = { + any_title_to_title_neighboring_and_across_water_empire = { + this = root.capital_barony.empire + } + } + } + highest_held_title_tier < tier_empire + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + location = { + local_guild_effect = yes + } + random_sub_realm_barony = { + limit = { + county = { holder = root } + title_province = { + bp3_home_city_trigger = yes + local_guild_compare_trigger = yes + } + } + alternative_limit = { + title_province = { + bp3_home_city_trigger = yes + local_guild_compare_trigger = yes + } + } + alternative_limit = { + title_province = { + bp3_home_city_trigger = yes + } + } + title_province = { save_scope_as = new_home_province } + } + + create_character = { + template = merchant_template + faith = location.faith + culture = location.culture + gender = root + location = location + save_scope_as = merchant_character + } + } + + option = { + name = travel_events_bp3.20.a + add_gold = 1 + scope:new_home_province = { + if = { + limit = { + local_guild_compare_trigger = yes + } + local_guild_reward_effect = yes + } + else = { + add_random_economic_building_effect = yes + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = diligent + } + } + } + + option = { + name = travel_events_bp3.20.b + flavor = travel_events_bp3.20.b.tt + add_gold = tiny_gold_value + scope:new_home_province.county = { + change_development_progress_with_overflow = 25 + change_county_control = -25 + } + + stress_impact = { + greedy = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_gain + generous = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = generous + } + } + modifier = { + factor = 5 + OR = { + has_trait = greedy + has_trait = arbitrary + } + } + } + } + + option = { + name = travel_events_bp3.20.c + if = { + limit = { + location.culture != culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + else = { + add_prestige = minor_prestige_gain + } + + stress_impact = { + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = gregarious + } + } + } + + after = { + mp_resume_travel_plan = yes + scope:merchant_character = { + silent_disappearance_ai_effect = yes + } + } +} + +travel_events_bp3.25 = { # The Toils of War + type = character_event + content_source = dlc_015 + title = travel_events_bp3.25.t + desc = { + desc = travel_events_bp3.25.desc + random_valid = { + triggered_desc = { + trigger = { + NOT = { has_trait = sadistic } + } + desc = travel_events_bp3.25.desc.outro + } + triggered_desc = { + trigger = { + has_trait = sadistic + } + desc = travel_events_bp3.25.desc.outro.sadistic + } + } + } + + theme = travel + + override_background = { reference = market } + + cooldown = { years = 10 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = sadistic + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + NOT = { has_trait = sadistic } + } + animation = sadness + } + } + + right_portrait = { + character = scope:soldier_character + animation = storyteller + hide_info = yes + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.25 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = castle_holding + } + OR = { + location.county.holder = { + days_of_continuous_war > 150 + NOT = { is_at_war_with = root } + } + location.county.holder.top_liege = { + days_of_continuous_war > 150 + NOT = { is_at_war_with = root } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + location.county.holder = { + save_scope_as = liege + random_character_war = { + save_scope_as = ongoing_war + } + if = { + limit = { + NOT = { exists = scope:ongoing_war } + } + top_liege = { + save_scope_as = liege + random_character_war = { + save_scope_as = ongoing_war + } + } + } + } + scope:liege = { + random_war_enemy = { + save_scope_as = opponent + } + } + create_character = { + template = soldier_friend_character + culture = root.location.culture + faith = root.location.faith + gender = root + employer = scope:liege + save_scope_as = soldier_character + } + + save_scope_value_as = { + name = lifestyle_modifier_xp + value = { + integer_range = { + min = 100 max = 500 + } + divide = 10 + ceiling = yes + multiply = 10 + } + } + } + + option = { + name = travel_events_bp3.25.a + add_piety = medium_piety_gain + remove_short_term_gold = tiny_gold_value + if = { + limit = { + location.culture != culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + compassionate = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = compassionate + } + } + } + + option = { + name = travel_events_bp3.25.b + random_list = { + 25 = { + desc = travel_events_bp3.25.b.insulted + modifier = { + add = { + value = 35 + subtract = root.diplomacy + } + } + send_interface_toast = { + type = event_generic_bad + title = travel_events_bp3.25.b.insulted + left_icon = root + + add_prestige = medium_prestige_loss + } + } + 25 = { + desc = travel_events_bp3.25.b.stories + modifier = { + add = { + value = 0 + add = root.martial + add = root.prowess + } + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.25.b.stories + left_icon = root + + add_martial_lifestyle_xp = scope:lifestyle_modifier_xp + } + } + 50 = { + desc = travel_events_bp3.25.b.martial + modifier = { + add = { + value = 0 + subtract = root.martial + } + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.25.b.martial + left_icon = root + + add_martial_skill = 1 + } + } + 50 = { + desc = travel_events_bp3.25.b.prowess + modifier = { + add = { + value = 0 + subtract = root.prowess + } + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.25.b.prowess + left_icon = root + + add_prowess_skill = 1 + } + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_gain + shy = medium_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = shy + } + } + modifier = { + factor = 5 + has_trait = brave + } + } + } + + option = { + name = travel_events_bp3.25.c + stress_impact = { + base = minor_stress_impact_loss + diligent = minor_stress_impact_loss + } + current_travel_plan ?= { + add_destination_progress = { days = 3 } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = diligent + } + } + } + + after = { + mp_resume_travel_plan = yes + scope:soldier_character = { + silent_disappearance_ai_effect = yes + } + } +} + +travel_events_bp3.30 = { # The Mercenaries of + type = character_event + content_source = dlc_015 + title = travel_events_bp3.30.t + desc = travel_events_bp3.30.desc + + theme = travel + + override_background = { reference = tavern } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = drink + } + + right_portrait = { + character = scope:soldier_character + animation = toast + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.30 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = castle_holding + } + highest_held_title_tier < tier_empire + maa_regiments_max_count > 0 #This is to ensure we don't fire the event for characters that are not allowed to have MAA at all + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + create_character = { + template = great_mercenary + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + location = root.location + save_scope_as = soldier_character + + after_creation = { + add_character_flag = { + flag = need_military_outfit + } + if = { + limit = { NOT = { has_trait = lifestyle_blademaster } } + add_trait = lifestyle_blademaster + } + add_trait_xp = { + trait = lifestyle_blademaster + value = 75 + } + } + } + } + + option = { + name = travel_events_bp3.30.a + remove_short_term_gold = medium_gold_value + spawn_army = { + name = mercenary_army_default + levies = { + value = 200 + multiply = { + min = 1 + value = highest_held_title_tier + } + } + location = root.capital_province + inheritable = no + war_keep_on_attacker_victory = yes + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_education_martial_trigger = yes + } + modifier = { + factor = 5 + OR = { + has_trait = brave + has_trait = ambitious + } + } + } + } + + option = { + name = travel_events_bp3.30.b + trigger = { + NOR = { + is_valid_to_hire_court_position_type = bodyguard_court_position + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + } + } + remove_short_term_gold = { + value = tiny_gold_value + min = 20 + max = 100 + } + show_as_tooltip = { add_courtier = scope:soldier_character } + hidden_effect = { + scope:soldier_character = { add_to_court_and_entourage_effect = yes } + } + + stress_impact = { + paranoid = medium_stress_gain + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = shy + } + } + } + } + + option = { + name = travel_events_bp3.30.c + trigger = { + OR = { + is_valid_to_hire_court_position_type = bodyguard_court_position + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + } + } + remove_short_term_gold = { + value = minor_gold_value + min = 20 + max = 100 + } + + show_as_tooltip = { + if = { + limit = { + is_valid_to_hire_court_position_type = bodyguard_court_position + } + appoint_court_position = { + recipient = scope:soldier_character + court_position = bodyguard_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + } + appoint_court_position = { + recipient = scope:soldier_character + court_position = master_of_arms_camp_officer + } + } + } + custom_tooltip = will_have_excellent_aptitude + + scope:soldier_character = { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 25 + } + } + + hidden_effect = { + scope:soldier_character = { add_to_court_and_entourage_effect = yes } + if = { + limit = { + is_valid_to_hire_court_position_type = bodyguard_court_position + any_court_position_holder = { + count <= 1 + has_court_position = bodyguard_court_position + } + } + appoint_court_position = { + recipient = scope:soldier_character + court_position = bodyguard_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = bodyguard_court_position + any_court_position_holder = { + count > 1 + has_court_position = bodyguard_court_position + } + } + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:soldier_character + holder = court_position:bodyguard_court_position + court_position = bodyguard_court_position + } + remove_character_flag = temporary_court_position_cost_removal + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + NOT = { employs_court_position = master_of_arms_camp_officer } + } + appoint_court_position = { + recipient = scope:soldier_character + court_position = master_of_arms_camp_officer + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + employs_court_position = master_of_arms_camp_officer + } + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:soldier_character + holder = court_position:master_of_arms_camp_officer + court_position = master_of_arms_camp_officer + } + remove_character_flag = temporary_court_position_cost_removal + } + } + + stress_impact = { + paranoid = medium_stress_gain + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = shy + } + } + } + } + + option = { + name = travel_events_bp3.30.d + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 200 + modifier = { + factor = 5 + OR = { + has_trait = shy + has_trait = paranoid + } + } + } + } + + option = { + name = travel_events_bp3.30.e + trigger = { + OR = { + has_trait = callous + has_trait = wrathful + } + } + + add_dread = medium_dread_gain + scope:soldier_character = { + death = { + death_reason = death_murder + killer = root + } + } + + stress_impact = { + callous = minor_stress_impact_loss + wrathful = medium_stress_impact_loss + compassionate = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = callous + has_trait = wrathful + } + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + after = { + mp_resume_travel_plan = yes + if = { + limit = { + OR = { + is_ai = yes + scope:soldier_character != root + } + } + scope:soldier_character = { + silent_disappearance_ai_effect = yes + } + } + } +} + +scripted_trigger travel_event_teachable_kid_trigger = { + is_child_of = root + is_adult = no + age > 6 + has_focus = education_martial +} + +travel_events_bp3.35 = { # The Teacher of Knights + type = character_event + content_source = dlc_015 + title = travel_events_bp3.35.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:kid_character = { is_travel_entourage_character = yes } + } + desc = travel_events_bp3.35.desc.traveling + } + desc = travel_events_bp3.35.desc.home + } + first_valid = { + triggered_desc = { + trigger = { + NOT = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + scope:kid_character = { is_travel_entourage_character = yes } + } + desc = travel_events_bp3.35.outro.non_martial_gender + } + desc = travel_events_bp3.35.outro.martial_gender + } + } + + theme = travel + + override_background = { reference = courtyard } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:soldier_character + animation = marshal_wooden_sword + } + + lower_right_portrait = scope:kid_character + + trigger = { + static_group_filter = { + group = travel_events_bp3.35 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + any_child = { + travel_event_teachable_kid_trigger = yes + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + create_character = { + template = old_knight_teacher + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + location = root.location + save_scope_as = soldier_character + + after_creation = { + add_character_flag = { + flag = roaming_character + flag = need_military_outfit + } + add_trait_xp = { + trait = lifestyle_blademaster + value = 100 + } + add_character_modifier = knight_teacher_modifier + } + } + random_child = { + limit = { + is_travel_entourage_character = yes + travel_event_teachable_kid_trigger = yes + } + alternative_limit = { + travel_event_teachable_kid_trigger = yes + } + save_scope_as = kid_character + } + + save_scope_value_as = { + name = lifestyle_trait_xp + value = lifestyle_blademaster_xp_gain_minor_value + } + } + + option = { + name = { + trigger = { + scope:kid_character = { is_travel_entourage_character = yes } + } + text = travel_events_bp3.35.a.travel + } + name = { + trigger = { + scope:kid_character = { is_travel_entourage_character = no } + } + text = travel_events_bp3.35.a.home + } + if = { + limit = { + scope:kid_character = { is_travel_entourage_character = no } + } + remove_short_term_gold = { + value = minor_gold_value + min = 5 + max = 150 + } + } + + hidden_effect = { + scope:soldier_character = { add_to_court_and_entourage_effect = yes } + } + + scope:soldier_character = { + set_relation_ward = scope:kid_character + custom_tooltip = travel_events_bp3.35.a.tt + } + + stress_impact = { + diligent = minor_stress_impact_loss + paranoid = medium_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = diligent + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + option = { + name = { + trigger = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + text = travel_events_bp3.35.b.martial + } + name = { + trigger = { + NOT = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + } + text = travel_events_bp3.35.b.non_martial + } + if = { + limit = { + has_trait = lifestyle_blademaster + } + add_trait_xp = { + trait = lifestyle_blademaster + value = scope:lifestyle_trait_xp + } + } + duel = { + skill = prowess + target = scope:soldier_character + 50 = { + desc = travel_events_bp3.35.b.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -39 + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.35.b.win + left_icon = root + + add_prestige = minor_prestige_gain + stress_impact = { + base = minor_stress_impact_loss + } + if = { + limit = { + NOT = { has_trait = lifestyle_blademaster } + } + add_trait = lifestyle_blademaster + } + } + } + 50 = { + desc = travel_events_bp3.35.b.lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.35.b.lose + left_icon = root + + add_prowess_skill = 1 + } + } + } + + hidden_effect = { + scope:soldier_character = { + silent_disappearance_ai_effect = yes + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = brave + } + modifier = { + factor = 0 + has_trait = craven + } + } + } + + option = { + name = { + trigger = { + scope:kid_character = { is_travel_entourage_character = yes } + } + text = travel_events_bp3.35.c.travel + } + name = { + trigger = { + scope:kid_character = { is_travel_entourage_character = no } + } + text = travel_events_bp3.35.c.home + } + stress_impact = { + base = medium_stress_impact_loss + gregarious = minor_stress_impact_loss + } + + hidden_effect = { + scope:soldier_character = { + silent_disappearance_ai_effect = yes + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = gregarious + } + } + } + + after = { + mp_resume_travel_plan = yes + scope:soldier_character = { + silent_disappearance_ai_effect = yes + } + } +} + +scripted_trigger travel_event_decent_combatant_trigger = { + this != root + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + prowess >= 12 +} + +travel_events_bp3.40 = { # The Local Champion + type = character_event + content_source = dlc_015 + title = travel_events_bp3.40.t + desc = { + desc = travel_events_bp3.40.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:challenger_character } + desc = travel_events_bp3.40.outro.challenger + } + desc = travel_events_bp3.40.fallback + } + } + + theme = travel + + override_background = { reference = market } + + cooldown = { years = 10 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = brave + prowess > 12 + } + } + animation = anger + } + triggered_animation = { + trigger = { + OR = { + has_trait = craven + prowess <= 12 + } + } + animation = fear + } + } + + right_portrait = { + character = scope:soldier_character + animation = wrestling_victory + } + + lower_right_portrait = scope:challenger_character + + trigger = { + static_group_filter = { + group = travel_events_bp3.40 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + + OR = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + current_travel_plan = { + any_entourage_character = { + NOT = { this = root } + is_adult = yes + travel_event_decent_combatant_trigger = yes + prowess >= 12 + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + create_character = { + template = wrestler_character + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + location = root.location + save_scope_as = soldier_character + + after_creation = { + add_character_flag = should_be_topless + add_character_flag = no_hat + } + } + + current_travel_plan = { + ordered_entourage_character = { + limit = { + this != root + is_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + prowess >= 12 + } + order_by = prowess + save_scope_as = challenger_character + } + } + } + + option = { + name = travel_events_bp3.40.a + trigger = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + + duel = { + skill = prowess + target = scope:soldier_character + 50 = { + desc = travel_events_bp3.40.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -29 + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.40.win + left_icon = root + + add_prestige = medium_prestige_gain + add_gold = medium_gold_value + } + } + 50 = { + desc = travel_events_bp3.40.lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + send_interface_toast = { + type = event_generic_bad + title = travel_events_bp3.40.lose + left_icon = root + + remove_short_term_gold = tiny_gold_value + stress_impact = { + base = minor_stress_gain + ambitious = minor_stress_gain + } + } + } + } + + stress_impact = { + craven = medium_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = brave + has_trait = ambitious + has_trait = greedy + } + prowess > 12 + } + modifier = { + factor = 0 + has_trait = craven + } + } + } + + option = { + name = travel_events_bp3.40.b + trigger = { + exists = scope:challenger_character + } + scope:challenger_character ?= { + duel = { + skill = prowess + target = scope:soldier_character + 50 = { + desc = travel_events_bp3.40.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -29 + } + root = { + show_as_tooltip = { + add_prestige = { + value = medium_prestige_gain + multiply = 0.5 + } + add_gold = { + value = medium_gold_value + multiply = 0.75 + } + scope:challenger_character = { + add_prestige = { + value = medium_prestige_gain + multiply = 0.5 + } + add_gold = { + value = root.medium_gold_value + multiply = 0.25 + } + } + } + hidden_effect = { + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.40.win + left_icon = root + right_icon = scope:challenger_character + + add_prestige = { + value = medium_prestige_gain + multiply = 0.5 + } + add_gold = { + value = medium_gold_value + multiply = 0.75 + } + hidden_effect = { + scope:challenger_character = { + add_prestige = { + value = medium_prestige_gain + multiply = 0.5 + } + add_gold = { + value = root.medium_gold_value + multiply = 0.25 + } + } + } + } + } + } + } + 50 = { + desc = travel_events_bp3.40.lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + root = { + send_interface_toast = { + type = event_generic_bad + title = travel_events_bp3.40.lose + left_icon = root + + remove_short_term_gold = tiny_gold_value + + scope:challenger_character = { + stress_impact = { + base = minor_stress_gain + ambitious = minor_stress_gain + } + } + } + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = ambitious + has_trait = greedy + } + prowess <= 12 + } + } + } + + option = { + name = travel_events_bp3.40.c + + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + } + + after = { + mp_resume_travel_plan = yes + scope:soldier_character = { + remove_character_flag = should_be_topless + remove_character_flag = no_hat + silent_disappearance_ai_effect = yes + } + } +} + +travel_events_bp3.45 = { # The Wandering Knight + type = character_event + content_source = dlc_015 + title = travel_events_bp3.45.t + desc = travel_events_bp3.45.desc + + theme = travel + + override_background = { reference = market } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:knight_character + animation = debating + + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.45 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { has_holding_type = castle_holding } + has_government = feudal_government + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + create_character = { + template = wandering_knight_character + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + location = root.location + save_scope_as = knight_character + + after_creation = { + add_character_flag = no_hat + add_character_flag = need_military_outfit + add_prestige = { integer_range = { min = 250 max = 1250 } } + add_piety = { integer_range = { min = 100 max = 500 } } + add_gold = { integer_range = { min = 25 max = 250 } } + } + } + + save_scope_value_as = { + name = piety_chance + value = { integer_range = { min = 10 max = 30 } } + } + + save_scope_value_as = { + name = prestige_chance + value = { integer_range = { min = 10 max = 30 } } + } + } + + option = { + name = travel_events_bp3.45.a + pay_short_term_gold = { + target = scope:knight_character + gold = { + value = tiny_gold_value + divide = 2 + min = 25 + } + } + + scope:knight_character = { + add_to_court_and_entourage_effect = yes + } + + stress_impact = { + paranoid = medium_stress_gain + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = shy + } + } + } + } + + option = { + name = travel_events_bp3.45.b + flavor = travel_events_bp3.45.b.flavor + remove_short_term_gold = { + value = tiny_gold_value + max = 35 + } + random_list = { + 20 = { + desc = travel_events_bp3.45.diplomacy + modifier = { + add = { + value = 0 + subtract = root.diplomacy + } + } + send_interface_message = { + type = event_generic_good + title = travel_events_bp3.45.diplomacy + left_icon = root + right_icon = scope:knight_character + + add_diplomacy_skill = 1 + } + } + 20 = { + desc = travel_events_bp3.45.prowess + modifier = { + add = { + value = 0 + subtract = root.prowess + } + } + send_interface_message = { + type = event_generic_good + title = travel_events_bp3.45.prowess + left_icon = root + right_icon = scope:knight_character + + add_prowess_skill = 1 + } + } + 0 = { + desc = travel_events_bp3.45.piety + modifier = { + add = scope:piety_chance + } + + send_interface_message = { + type = event_generic_good + title = travel_events_bp3.45.piety + left_icon = root + right_icon = scope:knight_character + + add_piety = minor_piety_gain + } + } + 0 = { + desc = travel_events_bp3.45.prestige + modifier = { + add = scope:prestige_chance + } + + send_interface_message = { + type = event_generic_good + title = travel_events_bp3.45.prestige + left_icon = root + right_icon = scope:knight_character + + add_prestige = minor_prestige_gain + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = shy + } + modifier = { + factor = 5 + has_trait = gregarious + } + } + } + + option = { + name = travel_events_bp3.45.c + + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + scope:knight_character = { + remove_character_flag = no_hat + silent_disappearance_ai_effect = yes + } + } +} + +travel_events_bp3.50 = { # A Band of Two + type = character_event + content_source = dlc_015 + title = travel_events_bp3.50.t + desc = travel_events_bp3.50.desc + + theme = travel + + override_background = { reference = alley_day } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:child_character + animation = happiness + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.50 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { has_holding_type = city_holding } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + create_character = { + template = peasant_child_character + age = { 6 10 } + culture = root.location.culture + faith = root.location.faith + location = root.location + + save_scope_as = child_character + + after_creation = { + create_story = story_cycle_pet_dog + } + } + } + + option = { + name = travel_events_bp3.50.a + + remove_short_term_gold = { + value = tiny_gold_value + divide = 2 + min = 2 + max = 7 + } + add_piety = minor_piety_gain + + add_character_modifier = { + modifier = kind_ruler_modifier + years = 5 + } + + if = { + limit = { + location.culture != culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 1 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + generous = medium_stress_impact_loss + greedy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = generous + } + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { + name = travel_events_bp3.50.b + trigger = { + has_trait = compassionate + } + + add_character_modifier = { + modifier = kind_ruler_modifier + years = 5 + } + + stress_impact = { + compassionate = medium_stress_impact_loss + } + + scope:child_character = { + add_opinion = { + modifier = saviour_opinion + target = root + opinion = 100 + } + } + + show_as_tooltip = { add_courtier = scope:child_character } + hidden_effect = { + scope:child_character = { + add_to_court_and_entourage_effect = yes + remove_character_flag = peasant_outfit + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = compassionate + } + } + } + + option = { + name = travel_events_bp3.50.c + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + + show_as_tooltip = { + add_character_modifier = dog_story_modifier + } + create_story = story_cycle_pet_dog + add_character_modifier = { + modifier = heartless_modifier + years = 5 + } + scope:child_character = { + add_opinion = { + modifier = hate_opinion + target = root + opinion = -200 + } + } + hidden_effect = { + scope:child_character = { + random_owned_story = { + type = story_cycle_pet_dog + end_story = yes + } + } + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = major_stress_gain + generous = medium_stress_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = compassionate + } + } + + modifier = { + factor = 5 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { + name = travel_events_bp3.50.d + + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + scope:child_character = { + silent_disappearance_ai_effect = yes + } + } +} + +scripted_trigger republic_ruler_check_trigger = { + government_has_flag = government_is_republic + in_diplomatic_range = root + NOT = { is_allied_to = root } +} + +travel_events_bp3.55 = { # Traveling Traders + type = character_event + content_source = dlc_015 + title = travel_events_bp3.55.t + desc = travel_events_bp3.55.desc + + theme = travel + + override_background = { + trigger = { + location = { + OR = { + is_coastal = yes + is_riverside_province = yes + } + } + } + reference = docks + } + + override_background = { + trigger = { + location = { + is_coastal = no + is_riverside_province = no + } + } + reference = market + } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:merchant_character + animation = anger + } + + lower_right_portrait = scope:republic_ruler + + trigger = { + static_group_filter = { + group = travel_events_bp3.55 + match = 0.50 + } + is_ai = no + bp3_travel_event_default_trigger = yes + location = { has_holding_type = city_holding } + OR = { + any_independent_ruler = { + republic_ruler_check_trigger = yes + } + faith = { + any_faith_ruler = { + republic_ruler_check_trigger = yes + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + ordered_independent_ruler = { + order_by = current_military_strength + limit = { + republic_ruler_check_trigger = yes + } + position = 0 + save_scope_as = republic_ruler + } + if = { + limit = { + NOT = { exists = scope:republic_ruler } + } + faith = { + ordered_faith_ruler = { + order_by = current_military_strength + limit = { + republic_ruler_check_trigger = yes + } + position = 0 + save_scope_as = republic_ruler + } + } + } + create_character = { + template = merchant_template + faith = scope:republic_ruler.faith + culture = scope:republic_ruler.culture + gender = root + location = location + save_scope_as = merchant_character + + after_creation = { + add_prestige = { integer_range = { min = 25 max = 500 } } + add_piety = { integer_range = { min = 25 max = 250 } } + add_gold = { integer_range = { min = root.medium_gold_value max = root.major_gold_value } } + } + } + save_scope_value_as = { + name = price_for_alliance + value = { + value = scope:republic_ruler.current_military_strength + divide = 10 + } + } + } + + option = { + name = travel_events_bp3.55.a + flavor = travel_events_bp3.55.a.flavor + remove_short_term_gold = scope:price_for_alliance + create_alliance = scope:republic_ruler + custom_tooltip = travel_events_bp3.55.a.tt + scope:republic_ruler = { + add_opinion = { + modifier = event_negotiated_alliance_opinion + target = root + } + } + + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = generous + } + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { + name = travel_events_bp3.55.b + flavor = travel_events_bp3.55.b.flavor + duel = { + skill = stewardship + target = scope:merchant_character + + 50 = { + desc = travel_events_bp3.55.b.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_message = { + type = event_generic_good + title = travel_events_bp3.55.b.win + + scope:merchant_character = { + pay_short_term_gold = { + target = root + gold = root.medium_gold_value + } + } + scope:republic_ruler = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + } + } + 50 = { + desc = travel_events_bp3.55.b.lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_message = { + type = event_generic_bad + title = travel_events_bp3.55.b.lose + + pay_short_term_gold = { + target = scope:merchant_character + gold = root.minor_gold_value + } + scope:republic_ruler = { + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -15 + } + } + } + } + } + + stress_impact = { + generous = minor_stress_gain + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = greedy + } + modifier = { + factor = 0 + has_trait = generous + } + } + } + + option = { + name = travel_events_bp3.55.c + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 300 + } + } + + after = { + mp_resume_travel_plan = yes + hidden_effect = { + scope:merchant_character = { + set_employer = scope:republic_ruler + } + } + } +} + +travel_events_bp3.60 = { # A Small Deal + type = character_event + content_source = dlc_015 + title = travel_events_bp3.60.t + desc = travel_events_bp3.60.desc + + theme = travel + + override_background = { + trigger = { + location = { + OR = { + is_coastal = yes + is_riverside_province = yes + } + } + } + reference = docks + } + + override_background = { + trigger = { + location = { + is_coastal = no + is_riverside_province = no + } + } + reference = market + } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:merchant_character + animation = disbelief + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.60 + match = 0.50 + } + is_landed = yes + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = city_holding + this != root.capital_province + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + capital_province = { + set_variable = { + name = extra_building_resources + value = 3 + } + } + + create_character = { + template = merchant_template + faith = root.location.faith + culture = root.location.culture + gender = root + location = location + save_scope_as = merchant_character + + after_creation = { + add_prestige = { integer_range = { min = 25 max = 500 } } + add_piety = { integer_range = { min = 25 max = 250 } } + add_gold = { integer_range = { min = root.medium_gold_value max = root.major_gold_value } } + } + } + } + + option = { + name = travel_events_bp3.60.a + + remove_short_term_gold = { + value = minor_gold_value + min = 25 + max = 500 + } + + capital_province = { + add_province_modifier = travel_extra_building_resources_modifier + } + + ai_chance = { + base = 100 + } + } + + option = { + name = travel_events_bp3.60.b + + remove_short_term_gold = { + value = tiny_gold_value + min = 10 + max = 250 + } + + add_character_modifier = { + modifier = travel_extra_building_resources_character_modifier + years = 5 + } + + ai_chance = { + base = 100 + } + } + + option = { + name = travel_events_bp3.60.c + + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + hidden_effect = { + scope:merchant_character = { + silent_disappearance_ai_effect = yes + } + } + } +} + +travel_events_bp3.65 = { # Purse Pursuit + type = character_event + content_source = dlc_015 + title = travel_events_bp3.65.t + desc = travel_events_bp3.65.desc + + theme = travel + + override_background = market + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = shock + } + + right_portrait = { + character = scope:thief_character + animation = betting + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.65 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { has_holding_type = city_holding } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + create_character = { + random_traits = no + age = { 16 20 } + dynasty = none + faith = root.location.faith + culture = root.location.culture + location = root.location + random_traits_list = { + count = 1 + education_intrigue_3 = {} + education_intrigue_4 = {} + } + random_traits_list = { + count = 3 + brave = {} + ambitious = {} + stubborn = {} + vengeful = {} + arrogant = {} + deceitful = {} + stubborn = {} + callous = {} + } + intrigue = { + min_template_decent_skill + max_template_decent_skill + } + gender_female_chance = root_soldier_female_chance + save_scope_as = thief_character + + after_creation = { + add_gold = { integer_range = { min = 5 max = 75 } } + add_piety = { integer_range = { min = -100 max = -25 } } + } + } + + save_scope_value_as = { + name = gold_value + value = { + value = tiny_gold_value + divide = 2 + } + } + + remove_short_term_gold = scope:gold_value + } + + option = { + name = travel_events_bp3.65.a + + show_as_tooltip = { + add_courtier = scope:thief_character + } + + scope:thief_character = { + hidden_effect = { add_to_court_and_entourage_effect = yes } + + add_opinion = { + modifier = respect_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + paranoid = major_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + option = { + name = travel_events_bp3.65.b + + add_dread = minor_dread_gain + + add_gold = { + value = scope:gold_value + add = scope:thief_character.gold + } + + scope:thief_character = { + death = { + death_reason = death_murder + killer = root + } + } + + stress_impact = { + wrathful = medium_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + greedy = minor_stress_impact_loss + compassionate = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 5 + OR = { + has_trait = wrathful + has_trait = callous + has_trait = sadistic + has_trait = greedy + } + } + } + } + + option = { + name = travel_events_bp3.65.c + + add_gold = scope:gold_value + + stress_impact = { + base = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + wrathful = medium_stress_gain + vengeful = medium_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = wrathful + has_trait = vengeful + } + } + modifier = { + factor = 5 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { + mp_resume_travel_plan = yes + scope:thief_character = { + silent_disappearance_ai_effect = yes + } + } +} + +travel_events_bp3.70 = { # Festival + type = character_event + content_source = dlc_015 + title = travel_events_bp3.70.t + desc = { + desc = travel_events_bp3.70.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:local_character + } + desc = travel_events_bp3.70.desc.local + } + triggered_desc = { + trigger = { + exists = scope:dancing_partner + } + desc = travel_events_bp3.70.desc.entourage + } + } + desc = travel_events_bp3.70.desc.outro + } + + theme = travel + + override_background = { reference = village_festival } + + cooldown = { years = 50 } + + left_portrait = { + character = root + animation = dancing + } + + right_portrait = { + character = scope:dancing_partner + animation = dancing + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.70 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = city_holding + culture != root.culture + } + NOT = { exists = var:special_culture } + prestige_level >= 4 + NOR = { + has_trait = shy + has_trait = paranoid + } + location.culture = { + NOT = { + any_parent_culture = { this = root.culture } + } + } + culture = { + NOR = { + any_parent_culture = { this = root.location.culture } + has_same_culture_heritage = root.location.culture + } + } + highest_held_title_tier < tier_empire + } + + immediate = { + save_scope_as = root_scope + mp_delay_travel_plan = { DAYS = 90 } + + current_travel_plan = { + random_entourage_character = { + limit = { + OR = { + is_spouse_of = root + is_child_of = root + } + } + save_scope_as = dancing_partner + } + } + + if = { + limit = { + NOT = { exists = scope:dancing_partner } + } + create_character = { + template = merchant_template + age = { 20 25 } + faith = root.location.faith + culture = root.location.culture + opposite_gender = root + location = location + save_scope_as = local_character + save_scope_as = dancing_partner + } + } + + set_variable = { + name = special_culture_tooltip + value = root.location.culture + } + } + + option = { + name = travel_events_bp3.70.a + + reason = prestige_level + + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 5 + desc = cultural_acceptance_gain_event + } + } + + if = { + limit = { + has_dlc_feature = hybridize_culture + } + custom_tooltip = travel_events_bp3.70.a.cultural_acceptance + custom_tooltip = travel_events_bp3.70.a.counties + + set_variable = { + name = special_culture + value = root.location.culture + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = travel_events_bp3.70.b + + stress_impact = { + base = major_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + + remove_variable = special_culture_tooltip + } +} + +travel_events_bp3.75 = { # Dreams Brewing + type = character_event + content_source = dlc_015 + title = travel_events_bp3.75.t + desc = travel_events_bp3.75.desc + + theme = travel + + override_background = { reference = market } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = drink + } + + right_portrait = { + character = scope:brewmaster_character + animation = obsequious_bow + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.75 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + NOT = { has_trait = paranoid } + location = { + has_holding_type = church_holding + } + OR = { + root.culture = { has_cultural_parameter = allows_brewery } + root.faith = { + OR = { + this = faith:catholic + has_doctrine_parameter = allows_brewery + } + } + } + OR = { + any_sub_realm_barony = { + county.holder = root + title_province = { + has_holding_type = city_holding + NOT = { has_building_or_higher = breweries_01 } + } + root.culture = { has_cultural_parameter = allows_brewery } + } + any_sub_realm_barony = { + county.holder = root + title_province = { + has_holding_type = church_holding + NOT = { has_building_or_higher = breweries_01 } + } + root.faith = { + OR = { + has_doctrine_parameter = allows_brewery + this = faith:catholic + } + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + if = { + limit = { + culture = { has_cultural_parameter = allows_brewery } + } + random_sub_realm_barony = { + limit = { + county.holder = root + title_province = { + has_holding_type = city_holding + NOT = { has_building_or_higher = breweries_01 } + } + } + save_scope_as = target_barony + } + } + if = { + limit = { + NOT = { exists = scope:barony } + faith = { + OR = { + has_doctrine_parameter = allows_brewery + this = faith:catholic + } + } + } + random_sub_realm_barony = { + limit = { + county.holder = root + title_province = { + has_holding_type = church_holding + NOT = { has_building_or_higher = breweries_01 } + } + } + save_scope_as = target_barony + } + } + if = { + limit = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + faith = { + OR = { + this = faith:catholic + has_doctrine_parameter = allows_brewery + } + } + } + create_character = { + template = monk_brewer_template + culture = root.location.culture + location = root.location + + save_scope_as = brewmaster_character + } + } + else = { + create_character = { + template = merchant_template + age = { 18 28 } + culture = root.location.culture + faith = root.faith + gender_female_chance = root_faith_clergy_gender_female_chance + + random_traits_list = { + count = 1 + diligent = {} + patient = {} + } + + random_traits_list = { + count = 2 + humble = {} + content = {} + gluttonous = {} + chaste = {} + generous = {} + calm = {} + deceitful = {} + honest = {} + craven = {} + gregarious = {} + arbitrary = {} + just = {} + zealous = {} + trusting = {} + } + + location = root.location + + save_scope_as = brewmaster_character + } + } + } + + option = { + name = travel_events_bp3.75.a + + remove_treasury_or_gold = tiny_treasury_or_gold_value + + scope:target_barony.title_province = { + add_building = breweries_01 + } + + ai_chance = { + base = 0 + } + } + + option = { + name = travel_events_bp3.75.b + + remove_short_term_gold = minor_gold_value + + scope:target_barony.title_province = { + add_building = breweries_01 + } + + scope:brewmaster_character = { + show_as_tooltip = { set_employer = root } + hidden_effect = { add_to_court_and_entourage_effect = yes } + } + + show_as_tooltip = { + appoint_court_position = { + recipient = scope:brewmaster_character + court_position = court_brewmaster_court_position + } + custom_tooltip = will_have_excellent_aptitude + } + + hidden_effect = { + if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + NOT = { employs_court_position = court_brewmaster_court_position } + } + appoint_court_position = { + recipient = scope:brewmaster_character + court_position = court_brewmaster_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + employs_court_position = court_brewmaster_court_position + } + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:brewmaster_character + holder = court_position:court_brewmaster_court_position + court_position = court_brewmaster_court_position + } + remove_character_flag = temporary_court_position_cost_removal + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = travel_events_bp3.75.c + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + stress_impact = { + drunkard = medium_stress_impact_loss + } + if = { + limit = { + scope:brewmaster_character.liege != root + } + scope:brewmaster_character = { silent_disappearance_ai_effect = yes } + } + } +} + +scripted_trigger travel_events_monk_child_trigger = { + is_heir_of = root + NOT = { is_primary_heir_of = root } + age > 10 + age <= 25 + is_married = no + OR = { + has_trait = chaste + has_trait = temperate + has_trait = lazy + has_trait = humble + has_trait = diligent + has_trait = calm + has_trait = patient + has_trait = honest + has_trait = craven + has_trait = content + has_trait = zealous + has_trait = compassionate + has_trait = forgiving + has_trait = education_learning + ai_zeal >= 0 + } + NOR = { + has_trait = ambitious + has_trait = cynical + } +} + +travel_events_bp3.80 = { # A Life of Service + type = character_event + content_source = dlc_015 + title = travel_events_bp3.80.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:grandmaster + } + desc = travel_events_bp3.80.desc.holy_order + } + triggered_desc = { + trigger = { + scope:monk_character = { + is_adult = yes + } + } + desc = travel_events_bp3.80.desc.adult + } + triggered_desc = { + trigger = { + scope:monk_character = { + is_adult = no + } + } + desc = travel_events_bp3.80.desc.child + } + } + } + + theme = travel + + override_background = { reference = temple } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:monk_character + animation = debating + } + + lower_right_portrait = scope:grandmaster + lower_left_portrait = { + trigger = { + NOT = { exists = scope:grandmaster } + } + character = root.location.barony.holder + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.80 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = church_holding + faith = root.faith + } + current_travel_plan = { + any_entourage_character = { + travel_events_monk_child_trigger = yes + save_temporary_scope_as = monk_character_temp + } + } + faith = { + OR = { + has_doctrine_parameter = take_vows_active + AND = { + any_faith_holy_order = { } + scope:monk_character_temp = { + is_adult = yes + OR = { + has_trait = education_martial + prowess > 10 + } + } + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + random_entourage_character = { + limit = { + travel_events_monk_child_trigger = yes + } + save_scope_as = monk_character + } + } + if = { + limit = { + scope:monk_character = { + is_adult = yes + OR = { + has_trait = education_martial + prowess > 10 + } + } + } + faith = { + random_faith_holy_order = { + leader = { save_scope_as = grandmaster } + } + } + } + } + + option = { + name = travel_events_bp3.80.a + + scope:monk_character = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 25 + } + } + + if = { + limit = { + exists = scope:grandmaster + } + save_scope_as = actor + scope:monk_character = { + save_scope_as = recipient + send_child_to_holy_order_effect = { GRANDMASTER = grandmaster } + } + } + else = { + scope:monk_character = { + simplified_clergy_effect = { RECIPIENT = scope:monk_character } + } + if = { + limit = { + scope:monk_character = { is_adult = yes } + } + root.location.barony.holder = { + add_courtier = scope:monk_character + } + } + } + + stress_impact = { + zealous = medium_stress_impact_loss + content = minor_stress_impact_loss + cynical = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = cynical + } + modifier = { + factor = 5 + OR = { + has_trait = zealous + has_trait = content + } + } + } + } + + option = { + name = travel_events_bp3.80.b + + scope:monk_character = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + + stress_impact = { + zealous = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +travel_events_bp3.85 = { # Brewers of Fame + type = character_event + content_source = dlc_015 + title = travel_events_bp3.85.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + root.location = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + has_holding_type = church_holding + } + } + desc = travel_events_bp3.85.desc.monk + } + triggered_desc = { + trigger = { + root.location = { + NAND = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + has_holding_type = church_holding + } + } + } + desc = travel_events_bp3.85.desc + } + } + desc = travel_events_bp3.85.desc.outro + } + + theme = travel + + override_background = { reference = tavern } + + cooldown = { years = 20 } + + left_portrait = { + character = root + animation = drink + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.85 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_building_or_higher = breweries_01 + county.holder = { + NOR = { + this = root + any_liege_or_above = { + this = root + } + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + if = { + limit = { + any_held_title = { + title_tier = county + has_variable = brewery_counter_var + } + } + ordered_sub_realm_county = { + order_by = { + value = 10000 + subtract = var:brewery_counter_var + } + limit = { + has_variable = brewery_counter_var + } + position = 0 + save_scope_as = brewery_county + } + } + } + + option = { + name = travel_events_bp3.85.a + trigger = { + exists = scope:brewery_county + brewery_counter_value > 25 + } + + reason = brewery + + custom_tooltip = travel_events_bp3.85.a.tt + + add_prestige = { + value = brewery_counter_value + divide = 25 + floor = yes + multiply = 50 + min = 50 + max = 500 + } + + dynasty = { + add_dynasty_prestige = { + value = brewery_counter_value + divide = 25 + floor = yes + multiply = 5 + min = 5 + max = 50 + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_gain + } + + ai_chance = { + base = 0 + } + } + + option = { + name = travel_events_bp3.85.b + + remove_short_term_gold = minor_gold_value + + add_character_modifier = { + modifier = popular_beer_character_modifier + years = 5 + } + + stress_impact = { + greedy = minor_stress_gain + generous = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + factor = 5 + has_trait = generous + } + } + } + + option = { + name = travel_events_bp3.85.c + + stress_impact = { + base = minor_stress_impact_loss + content = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = content + } + } + } + + after = { + mp_resume_travel_plan = yes + stress_impact = { + drunkard = minor_stress_impact_loss + } + } +} + +travel_events_bp3.90 = { # Patron of the + type = character_event + content_source = dlc_015 + title = travel_events_bp3.90.t + desc = travel_events_bp3.90.desc + + theme = travel + + override_background = { reference = temple } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:priest_character + animation = obsequious_bow + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.90 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = church_holding + faith = root.faith + county.holder.top_liege = root.top_liege + } + NOR = { + has_character_modifier = church_investment_modifier + has_character_modifier = church_investment_cost_modifier + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + create_character = { + template = simple_priest_character_template + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_faith_clergy_gender_female_chance + employer = root.location.barony.holder + + save_scope_as = priest_character + } + set_variable = { + name = church_investment_year_var + value = { + value = current_year + subtract = 5 + } + } + save_scope_value_as = { + name = investment_cost + value = { + value = tiny_gold_value + divide = 10 + min = 2 + floor = yes + multiply = 10 + max = 100 + } + } + } + + option = { + name = travel_events_bp3.90.a + flavor = travel_events_bp3.90.a.flavor + + add_character_modifier = church_investment_modifier + add_character_modifier = church_investment_cost_modifier + + ai_chance = { + base = 100 + } + } + + option = { + name = travel_events_bp3.90.b + + remove_short_term_gold = scope:investment_cost + add_piety = { + value = scope:investment_cost + multiply = 2 + } + + ai_chance = { + base = 100 + } + } + + option = { + name = travel_events_bp3.90.c + + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + scope:priest_character ?= { silent_disappearance_ai_effect = yes } + } +} + +scripted_trigger unvisited_holy_site_trigger = { + root = { + OR = { + NOT = { has_variable_list = visited_unique_holy_sites_list } + AND = { + has_variable_list = visited_unique_holy_sites_list + NOT = { + is_target_in_variable_list = { + name = visited_unique_holy_sites_list + target = prev + } + } + } + } + } +} + +travel_events_bp3.95 = { # A Pilgrim's Tale + type = character_event + content_source = dlc_015 + title = travel_events_bp3.95.t + desc = travel_events_bp3.95.desc + + theme = travel + + override_background = { reference = temple } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:pilgrim_character + hide_info = yes + animation = storyteller + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.95 + match = 0.50 + } + is_ai = no + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = church_holding + faith = root.faith + barony = { is_holy_site = no } + } + faith = { + NOT = { has_doctrine = doctrine_pilgrimage_forbidden } + any_holy_site = { + unvisited_holy_site_trigger = yes + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + faith = { + random_holy_site = { + limit = { + unvisited_holy_site_trigger = yes + } + save_scope_as = unvisited_holy_site + } + } + create_character = { + template = merchant_template + faith = root.faith + culture = root.location.culture + gender = root + location = root.location + save_scope_as = pilgrim_character + + after_creation = { + add_piety = { integer_range = { min = 25 max = 250 } } + } + } + } + + option = { + name = travel_events_bp3.95.a + flavor = travel_events_bp3.95.a.flavor + + if = { + limit = { + has_lifestyle = wanderer_lifestyle + } + custom_tooltip = travel_events_bp3.95.a.tt.wanderer + } + else = { + custom_tooltip = travel_events_bp3.95.a.tt + } + + remove_short_term_gold = tiny_gold_value + + add_to_variable_list = { + name = holy_site_dreams + target = scope:unvisited_holy_site + } + + stress_impact = { + zealous = minor_stress_impact_loss + } + } + + option = { + name = travel_events_bp3.95.b + + stress_impact = { + base = minor_stress_impact_loss + } + } + + after = { + mp_resume_travel_plan = yes + scope:pilgrim_character = { silent_disappearance_ai_effect = yes } + } +} + +scripted_trigger bp3_good_relations_trigger = { + is_adult = yes + likes_character_trigger = { CHARACTER = root } + OR = { + is_close_family_of = root + is_spouse_of = root + has_important_relationship_with_character_trigger = { CHARACTER = root } + } +} + +travel_events_bp3.100 = { # Land of Milk and... Fish? + type = character_event + content_source = dlc_015 + title = travel_events_bp3.100.t + desc = travel_events_bp3.100.desc + + theme = travel + + override_background = { + trigger = { + location = { is_coastal = yes } + } + reference = bp3_coast + } + + override_background = { + trigger = { + location = { is_riverside_province = yes } + } + reference = bp3_riverside + } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:friend_character + animation = happiness + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.100 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + OR = { + is_coastal = yes + is_riverside_province = yes + } + } + current_travel_plan = { + any_entourage_character = { + bp3_good_relations_trigger = yes + } + } + OR = { + current_season_spring = yes + current_season_summer = yes + current_season_autumn = yes + current_season_dry_season = yes + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + random_entourage_character = { + limit = { + bp3_good_relations_trigger = yes + } + weight = { + base = 1 + modifier = { + factor = 5 + OR = { + is_spouse_of = root + is_close_family_of = root + } + } + } + save_scope_as = friend_character + } + } + } + + option = { + name = travel_events_bp3.100.a + flavor = travel_events_bp3.100.a.flavor + + progress_towards_friend_effect = { + REASON = friend_fishing_trip + CHARACTER = scope:friend_character + OPINION = default_friend_opinion + } + + domicile ?= { change_provisions = miniscule_provisions_gain } + + stress_impact = { + base = minor_stress_impact_loss + content = minor_stress_impact_loss + lazy = minor_stress_impact_loss + patient = minor_stress_impact_loss + + } + + current_travel_plan ?= { + delay_travel_plan = { days = 3 } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = lazy + has_trait = content + has_trait = patient + } + } + } + } + + option = { + name = travel_events_bp3.100.b + flavor = travel_events_bp3.100.b.flavor + + domicile ?= { change_provisions = minor_provisions_gain } + + stress_impact = { + base = medium_stress_impact_loss + content = minor_stress_impact_loss + lazy = minor_stress_impact_loss + } + + current_travel_plan ?= { + delay_travel_plan = { days = 10 } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = lazy + has_trait = content + } + } + } + } + + option = { + name = travel_events_bp3.100.c + + current_travel_plan ?= { + add_destination_progress = { days = 3 } + } + + stress_impact = { + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = diligent + } + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +scripted_effect bp3_skill_learning_duel_effect = { + root = { + duel = { + skill = $SKILL$ + value = 15 + 60 = { + desc = bp3_skill_travel_skill_learn_win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -59 + } + send_interface_message = { + type = event_generic_good + title = bp3_skill_travel_skill_learn_win + + left_icon = root + right_icon = scope:lifestyle_character + + add_trait = $TRAIT$ + } + } + 40 = { + desc = bp3_skill_travel_skill_learn_fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + send_interface_message = { + type = event_generic_bad + title = bp3_skill_travel_skill_learn_fail + + left_icon = root + right_icon = scope:lifestyle_character + + stress_impact = { + base = minor_stress_gain + } + } + } + } + } +} + +scripted_trigger bp3_lifestyle_trait_trigger = { + OR = { + has_trait = lifestyle_reveler + has_trait = lifestyle_blademaster + has_trait = lifestyle_hunter + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + has_trait = lifestyle_gardener + } +} + +travel_events_bp3.105 = { # A Woman/Man of Unusual Skills + type = character_event + content_source = dlc_015 + title = travel_events_bp3.105.t + desc = { + desc = travel_events_bp3.105.desc + first_valid = { + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_reveler } + } + desc = travel_events_bp3.105.desc.reveler + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_blademaster } + } + desc = travel_events_bp3.105.desc.blademaster + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_hunter } + } + desc = travel_events_bp3.105.desc.hunter + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_mystic } + } + desc = travel_events_bp3.105.desc.mystic + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_physician } + } + desc = travel_events_bp3.105.desc.physician + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_herbalist } + } + desc = travel_events_bp3.105.desc.herbalist + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_gardener } + } + desc = travel_events_bp3.105.desc.gardener + } + } + } + + theme = travel + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_reveler } + } + reference = ep3_campfire + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_blademaster } + } + reference = ep3_campfire + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_hunter } + } + reference = terrain_travel + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_mystic } + } + reference = terrain_travel + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_physician } + } + reference = market + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_herbalist } + } + reference = terrain_travel + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_gardener } + } + reference = garden + } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:lifestyle_character + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_reveler } + } + animation = toast + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_blademaster } + } + animation = inspect_weapon + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_hunter } + } + animation = bow_idle + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_mystic } + } + animation = happy_teacher + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_physician } + } + animation = physician + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_herbalist } + } + animation = storyteller + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_gardener } + } + animation = survey + } + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.105 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + bp3_lifestyle_trait_trigger = no + current_travel_plan = { + any_entourage_character = { + bp3_lifestyle_trait_trigger = yes + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + current_travel_plan = { + random_entourage_character = { + limit = { + bp3_lifestyle_trait_trigger = yes + } + save_scope_as = lifestyle_character + } + } + } + + option = { + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_reveler } + } + text = travel_events_bp3.105.a.reveler + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_blademaster } + } + text = travel_events_bp3.105.a.blademaster + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_hunter } + } + text = travel_events_bp3.105.a.hunter + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_mystic } + } + text = travel_events_bp3.105.a.mystic + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_physician } + } + text = travel_events_bp3.105.a.physician + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_herbalist } + } + text = travel_events_bp3.105.a.herbalist + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_gardener } + } + text = travel_events_bp3.105.a.gardener + } + + scope:lifestyle_character = { + switch = { + trigger = has_trait + lifestyle_reveler = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_reveler + SKILL = diplomacy + } + root = { + stress_impact = { + drunkard = minor_stress_impact_loss + content = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + } + } + lifestyle_blademaster = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_blademaster + SKILL = prowess + } + root = { + stress_impact = { + brave = minor_stress_impact_loss + diligent = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + } + } + } + lifestyle_hunter = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_hunter + SKILL = prowess + } + root = { + stress_impact = { + brave = minor_stress_impact_loss + greedy = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + } + } + } + lifestyle_mystic = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_mystic + SKILL = learning + } + root = { + stress_impact = { + patient = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + cynical = minor_stress_impact_loss + } + } + } + lifestyle_physician = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_physician + SKILL = learning + } + root = { + stress_impact = { + patient = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + } + } + lifestyle_herbalist = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_herbalist + SKILL = learning + } + root = { + stress_impact = { + patient = minor_stress_impact_loss + calm = minor_stress_impact_loss + content = minor_stress_impact_loss + } + } + } + lifestyle_gardener = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_gardener + SKILL = stewardship + } + root = { + stress_impact = { + patient = minor_stress_impact_loss + calm = minor_stress_impact_loss + diligent = minor_stress_impact_loss + } + } + } + } + } + + ai_chance = { + base = 100 + + modifier = { + factor = 5 + scope:lifestyle_character = { + switch = { + trigger = has_trait + lifestyle_reveler = { + root = { + OR = { + has_trait = drunkard + has_trait = content + has_trait = gregarious + } + } + } + lifestyle_blademaster = { + root = { + OR = { + has_trait = brave + has_trait = diligent + has_trait = ambitious + } + } + } + lifestyle_hunter = { + root = { + OR = { + has_trait = brave + has_trait = greedy + has_trait = ambitious + } + } + } + lifestyle_mystic = { + root = { + OR = { + has_trait = patient + has_trait = eccentric + has_trait = cynical + } + } + } + lifestyle_physician = { + root = { + OR = { + has_trait = patient + has_trait = compassionate + has_trait = humble + } + } + } + lifestyle_herbalist = { + root = { + OR = { + has_trait = patient + has_trait = calm + has_trait = content + } + } + } + lifestyle_gardener = { + root = { + OR = { + has_trait = patient + has_trait = calm + has_trait = diligent + } + } + } + } + } + } + } + } + + option = { + name = travel_events_bp3.105.b + + scope:lifestyle_character = { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 15 + } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +travel_events_bp3.110 = { # Heart-to-Heart + type = character_event + content_source = dlc_015 + title = travel_events_bp3.110.t + desc = { + desc = travel_events_bp3.110.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:negative_memory + } + desc = travel_events_bp3.110.desc.negative_memory + } + desc = travel_events_bp3.110.desc.fallback + } + desc = travel_events_bp3.110.desc.outro + } + + theme = travel + + override_background = { reference = ep3_campfire } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = stress + } + + right_portrait = { + character = scope:friend_character + animation = thinking + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.110 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + stress >= 50 + NOR = { + has_trait = paranoid + has_trait = shy + } + current_travel_plan = { + any_entourage_character = { + is_adult = yes + bp3_good_relations_trigger = yes + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + random_entourage_character = { + limit = { + is_adult = yes + bp3_good_relations_trigger = yes + } + save_scope_as = friend_character + } + } + random_memory = { + limit = { + has_memory_category = negative + } + save_scope_as = negative_memory + } + } + + option = { + name = travel_events_bp3.110.a + flavor = travel_events_bp3.110.a.flavor + + progress_towards_friend_effect = { + REASON = friend_opened_up + CHARACTER = scope:friend_character + OPINION = default_friend_opinion + } + + stress_impact = { + base = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = gregarious + has_trait = compassionate + } + } + } + } + + option = { + name = travel_events_bp3.110.b + flavor = travel_events_bp3.110.b.flavor + + stress_impact = { + base = major_stress_impact_loss + } + + ai_chance = { + base = 200 + modifier = { + factor = 5 + has_trait = arrogant + } + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +scripted_effect travel_entourage_bp3_effect = { + if = { + limit = { + exists = var:saved_character_number + } + switch = { + trigger = var:saved_character_number + 1 = { prev = { save_scope_as = character_number_1 } } + 2 = { prev = { save_scope_as = character_number_2 } } + 3 = { prev = { save_scope_as = character_number_3 } } + } + change_variable = { name = saved_character_number add = 1 } + } +} + +scripted_effect campfire_friendliness_effect = { + scope:character_number_1 ?= { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = $VALUE$ + } + } + scope:character_number_2 ?= { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = $VALUE$ + } + } + scope:character_number_3 ?= { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = $VALUE$ + } + } +} + +scripted_trigger travel_bp3_relevant_character_trigger = { + likes_character_trigger = { CHARACTER = root } + is_adult = yes + OR = { + is_knight_of = root + is_councillor_of = root + has_any_court_position = yes + is_spouse_of = root + is_close_family_of = root + has_important_relationship_with_character_trigger = { CHARACTER = root } + } +} + +travel_events_bp3.115 = { # Night by the Campfire + type = character_event + content_source = dlc_015 + title = travel_events_bp3.115.t + desc = { + desc = travel_events_bp3.115.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:character_number_3 + } + desc = travel_events_bp3.115.desc.3_characters + } + triggered_desc = { + trigger = { + exists = scope:character_number_2 + } + desc = travel_events_bp3.115.desc.2_characters + } + desc = travel_events_bp3.115.desc.1_character + } + desc = travel_events_bp3.115.desc.outro + } + + theme = travel + + override_background = { reference = ep3_campfire } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = laugh + } + + right_portrait = { + character = scope:character_number_1 + animation = storyteller + } + + lower_left_portrait = scope:character_number_2 + lower_right_portrait = scope:character_number_3 + + trigger = { + static_group_filter = { + group = travel_events_bp3.115 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + current_travel_plan = { + any_entourage_character = { + count >= 1 + travel_bp3_relevant_character_trigger = yes + } + } + } + + immediate = { + set_variable = { + name = saved_character_number + value = 1 + } + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + ordered_entourage_character = { + order_by = { + value = "opinion(root)" + if = { + limit = { + is_knight_of = root + } + subtract = 50 + } + if = { + limit = { + OR = { + is_spouse_of = root + is_close_family_of = root + } + } + add = 25 + } + } + limit = { travel_bp3_relevant_character_trigger = yes } + max = 3 + check_range_bounds = no + root = { travel_entourage_bp3_effect = yes } + } + } + } + + option = { + name = travel_events_bp3.115.a + + campfire_friendliness_effect = { VALUE = 5 } + + stress_impact = { + gregarious = minor_stress_impact_loss + honest = minor_stress_impact_loss + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = gregarious + has_trait = honest + } + } + modifier = { + factor = 0 + has_trait = shy + } + } + } + + option = { + name = travel_events_bp3.115.b + + duel = { + skills = { diplomacy intrigue } + value = 20 + 50 = { + desc = travel_events_bp3.115.b.impressed + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + send_interface_toast = { + type = event_generic_bad + title = travel_events_bp3.115.b.impressed + left_icon = root + right_icon = scope:character_number_1 + + campfire_friendliness_effect = { VALUE = 15 } + } + } + 50 = { + desc = travel_events_bp3.115.b.unimpressed + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + send_interface_toast = { + type = event_generic_bad + title = travel_events_bp3.115.b.unimpressed + left_icon = root + right_icon = scope:character_number_1 + + campfire_friendliness_effect = { VALUE = 2 } + } + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = minor_stress_gain + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = deceitful + } + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = honest + } + } + } + } + + option = { + name = travel_events_bp3.115.c + + progress_towards_friend_effect = { + REASON = friend_story_by_fire_corresponding + CHARACTER = scope:character_number_1 + OPINION = default_friend_opinion + } + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 300 + } + } + + after = { + mp_resume_travel_plan = yes + remove_variable = saved_character_number + } +} + +travel_events_bp3.120 = { # The Wrecked Boat + type = character_event + content_source = dlc_015 + title = travel_events_bp3.120.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + location = { is_coastal = yes } + } + desc = travel_events_bp3.120.desc.intro.coast + } + desc = travel_events_bp3.120.desc.intro.river + } + desc = travel_events_bp3.120.desc + } + + theme = travel + + override_background = { + trigger = { + location = { is_coastal = yes } + } + reference = bp3_coast + } + + override_background = { + reference = bp3_riverside + } + + cooldown = { years = 20 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:merchant_character + animation = severelywounded + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.120 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { is_riverside_province = yes } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + create_character = { + template = merchant_template + location = root.location + faith = root.location.faith + culture = root.location.culture + + after_creation = { + add_gold = { + integer_range = { + min = root.minor_gold_value + max = root.medium_gold_value + } + } + } + + save_scope_as = merchant_character + } + location = { + random_neighboring_province = { + limit = { + is_river_province = yes + } + save_scope_as = river_province + } + } + } + + option = { + name = travel_events_bp3.120.a + + stress_impact = { + base = minor_stress_impact_loss + compassionate = medium_stress_impact_loss + generous = minor_stress_impact_loss + } + + current_travel_plan ?= { delay_travel_plan = { days = 5 } } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = compassionate + has_trait = generous + } + } + } + } + + option = { + name = travel_events_bp3.120.b + + scope:merchant_character = { + pay_short_term_gold = { + target = root + gold = { + value = scope:merchant_character.gold + divide = 2 + } + } + } + + current_travel_plan ?= { delay_travel_plan = { days = 5 } } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = greedy + } + } + } + + option = { + name = travel_events_bp3.120.c + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + + add_dread = minor_dread_gain + add_gold = scope:merchant_character.gold + + scope:merchant_character = { + death = { + death_reason = death_murder + killer = root + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { + name = travel_events_bp3.120.d + + current_travel_plan ?= { add_destination_progress = { days = 3 } } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = diligent + has_trait = ambitious + } + } + } + } + + after = { + mp_resume_travel_plan = yes + scope:merchant_character = { silent_disappearance_ai_effect = yes } + } +} diff --git a/N3OW/events/travel_events/travel_events_james.txt b/N3OW/events/travel_events/travel_events_james.txt new file mode 100644 index 00000000..d419903a --- /dev/null +++ b/N3OW/events/travel_events/travel_events_james.txt @@ -0,0 +1,7423 @@ +#Generic travel events + +namespace = travel_events + +############################ +## Travel Flavor Events +## 4000-4999 +## by James Beaumont +############################ +# travel_events.4000 # Encounter a mystic on the road +# travel_events.4001 # Encounter an adoring fan +# travel_events.4002 # You determine that the women/men of X region are real pretty +# travel_events.4003 # You encounter vikings at sea +# travel_events.4004 # Fishermen at sea! +# travel_events.4005 # Encounter a caravan of merchants at sea +# travel_events.4006 # A local bird lands on your boat and eats some supplies +# travel_events.4007 # A storm at sea +# travel_events.4008 # Shipwreck! +# travel_events.4012 # You are being followed by a feral child +# travel_events.4015 # Asking for directions from a diff. language character +# travel_events.4016 # You experience heatstroke +# travel_events.4017 # Swords for hire! +# travel_events.4018 # A mendicant preacher! +# travel_events.4019 # You pass by a peasant street food place, demand to sample some +# travel_events.4020 # Strong believers harass your caravan and demand payment +# travel_events.4021 # You witness a human sacrifice! +# travel_events.4022 # You witness some tree worship in a Sanctity of Nature province +# travel_events.4023 # Prester John! You find a same-religion ruler in a faraway land +# travel_events.4028 # You come across a runestone! +# travel_events.4029 # You come across dimwit strung up on a post +# travel_events.4031 # You come across a knight stuck in his armour +# travel_events.4032 # You come across a noble being assaulted by a random animal +# travel_events.4033 # A witch who strangely isn't being burned +# travel_events.4035 # You are a witch and you're being harassed by locals +# travel_events.4036 # Caravaneers want to sell you some cool stuff +# travel_events.4037 # You enter a place that is syncretic with your faith +# travel_events.4038 # You enter a province which your faith is syncretic with +# travel_events.4039 # You enter a ritual hospitality province and are offered a rest +# travel_events.4040 # You meet a xenophile character who wants to learn about your culture + +##################################################################################### + +############################ +## Travel Flavor Events +## 4000-4999 +## by James Beaumont +############################ + +# Encounter a mystic on the road +travel_events.4000 = { + type = character_event + title = travel_events.4000.t + desc = { + desc = travel_events.4000.desc.intro + desc = travel_events.4000.desc.mid.long_to_go + desc = travel_events.4000.desc.outro + } + theme = travel + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:mystic_scope + animation = scheme + } + cooldown = { years = 30 } + trigger = { + static_group_filter = { + group = travel_events.4000 + match = 0.25 + } + is_available_travelling_adult = yes + is_playable_character = yes + is_travelling = yes + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = default_mystic_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = mystic_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:mystic_scope = { + random_list = { + 50 = {} + 50 = { add_trait = witch } + } + } + } + } + #Get a mystical reading + option = { + name = travel_events.4000.a + remove_short_term_gold = tiny_gold_value + random_list = { + 50 = { + send_interface_toast = { + title = travel.good_reading + left_icon = root + if = { + limit = { + NOT = { has_trait = cynical } + } + add_stress = minor_stress_loss + } + add_character_modifier = { + modifier = positive_roadside_reading_modifier + years = 5 + } + } + } + 50 = { + send_interface_toast = { + title = travel.bad_reading + left_icon = root + add_character_modifier = { + modifier = negative_roadside_reading_modifier + years = 5 + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + #They can join us + option = { + trigger = { + OR = { + root.faith = { + NOR = { + has_doctrine_parameter = witchcraft_illegal + has_doctrine_parameter = witchcraft_shunned + } + } + is_witch_trigger = yes + root.faith = { trait_is_virtue = lifestyle_mystic } + NOT = { scope:mystic_scope = { has_trait = witch } } + } + NOR = { + has_trait = zealous + has_trait = wrathful + has_trait = sadistic + has_trait = callous + } + } + name = travel_events.4000.b + add_courtier = scope:mystic_scope + root.current_travel_plan = { + add_companion = scope:mystic_scope + } + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + stress_impact = { + lifestyle_mystic = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + add = 10 + has_trait = lifestyle_mystic + } + modifier = { + add = -50 + faith = { + OR = { + has_doctrine_parameter = witchcraft_illegal + has_doctrine_parameter = witchcraft_shunned + } + OR = { + NOT = { trait_is_virtue = lifestyle_mystic } + scope:mystic_scope = { has_trait = witch } + } + } + has_trait = zealous + } + modifier = { + add = -50 + OR = { + has_trait = paranoid + has_trait = cynical + } + } + } + } + #Pass them by + option = { + name = travel_events.4000.c + stress_impact = { + paranoid = minor_stress_impact_gain + zealous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + #Have them burned as a witch! + option = { + name = travel_events.4000.d + trigger = { + root.faith = { + OR = { + has_doctrine_parameter = witchcraft_illegal + has_doctrine_parameter = witchcraft_shunned + } + } + NOT = { is_witch_trigger = yes } + OR = { + NOT = { + root.faith = { trait_is_virtue = lifestyle_mystic } + } + scope:mystic_scope = { has_trait = witch } + } + OR = { + has_trait = zealous + has_trait = wrathful + has_trait = sadistic + has_trait = callous + } + } + scope:mystic_scope = { + death = { + killer = root + death_reason = death_burned_witch + } + } + add_piety = minor_piety_gain + add_dread = minor_dread_gain + stress_impact = { + base = minor_stress_impact_gain + sadistic = medium_stress_impact_loss + zealous = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + after = { + scope:mystic_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Encounter an adoring fan +travel_events.4001 = { + type = character_event + title = travel_events.4001.t + desc = travel_events.4001.desc + theme = travel + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:loyal_fan_scope + animation = admiration + } + cooldown = { years = 50 } + trigger = { + static_group_filter = { + group = travel_events.4001 + match = 0.25 + } + NOR = { + religion = { is_in_family = rf_eastern } + religion = { is_in_family = rf_sinitic } + } + is_available_travelling = yes # Even children were viewed to have been chosen by God and all that + is_landed = yes + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_very_small } + create_character = { + template = loyal_fan_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = loyal_fan_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:loyal_fan_scope = { + add_opinion = { + modifier = loyalty_opinion + years = 50 + target = root + opinion = 100 + } + } + } + } + #Join us, friend! + option = { + name = travel_events.4001.a + add_courtier = scope:loyal_fan_scope + root.current_travel_plan = { + add_companion = scope:loyal_fan_scope + } + stress_impact = { + arrogant = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = shy + } + } + } + } + #Pay them to sod off + option = { + name = travel_events.4001.b + remove_short_term_gold = tiny_gold_value + stress_impact = { + generous = minor_stress_impact_loss + profligate = minor_stress_impact_loss + greedy = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + short_term_gold < medium_gold_value + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = gregarious + } + } + ai_value_modifier = { + ai_sociability = 1 + } + } + } + # Have them beaten up + option = { + name = travel_events.4001.c + scope:loyal_fan_scope = { + increase_wounds_no_death_effect = { REASON = fight } + } + stress_impact = { + base = minor_stress_impact_gain + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + factor = 2 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = wrathful + has_trait = paranoid + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = forgiving + } + } + } + } + + after = { + scope:loyal_fan_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You determine that the women/men of X region are real pretty +travel_events.4002 = { + type = character_event + title = travel_events.4002.t + desc = travel_events.4002.desc + theme = travel + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:local_beauty_scope + animation = love + } + cooldown = { years = 20 } + trigger = { + static_group_filter = { + group = travel_events.4002 + match = 0.5 + } + is_available_travelling_adult = yes + is_landed = yes + is_location_valid_for_travel_event_on_land = yes + NOR = { + has_trait = celibate + has_trait = chaste + has_sexuality = asexual + # Not my culture + location.county.culture = root.culture + # Not a culture local to me + location.county.culture = root.capital_county.culture + # I'm not in my own realm + is_liege_or_above_of = location.county.holder + } + } + weight_multiplier = { + base = 1 + modifier = { + involved_activity ?= { + has_activity_type = activity_pilgrimage + } + add = -0.5 + } + modifier = { + NOR = { + has_trait = lustful + has_trait = seducer + has_trait = rakish + } + add = -0.5 + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_very_small } + create_character = { + template = local_beauty_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = local_beauty_scope + after_creation = { + add_character_flag = created + } + } + } + # Take them as your lover + option = { + name = travel_events.4002.a + trigger = { + OR = { + allowed_concubines = no + allowed_more_concubines = no + AND = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:local_beauty_scope + } + } + can_set_relation_lover_trigger = { + CHARACTER = scope:local_beauty_scope + } + } + add_courtier = scope:local_beauty_scope + root.current_travel_plan = { + add_companion = scope:local_beauty_scope + } + set_relation_lover = { + reason = lover_first_sight + target = scope:local_beauty_scope + } + if = { + limit = { + might_cheat_on_every_partner_trigger = no + } + add_stress = medium_stress_gain + } + else = { + stress_impact = { + lustful = medium_stress_impact_loss + rakish = medium_stress_impact_loss + seducer = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + chaste = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + } + ai_chance = { + base = 5 + modifier = { + add = 95 + OR = { + has_trait = lustful + has_trait = rakish + has_trait = seducer + } + } + modifier = { + factor = 0 + might_cheat_on_every_partner_trigger = no + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = chaste + has_trait = shy + } + } + } + } + # Take them as your concubine + option = { + name = travel_events.4002.b + trigger = { + allowed_concubines = yes + allowed_more_concubines = yes + OR = { + AND = { + allowed_to_marry_same_sex_trigger = yes + sex_same_as = scope:local_beauty_scope + } + NOT = { sex_same_as = scope:local_beauty_scope } + } + } + add_courtier = scope:local_beauty_scope + root.current_travel_plan = { + add_companion = scope:local_beauty_scope + } + make_concubine = scope:local_beauty_scope + stress_impact = { + lustful = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + chaste = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = chaste + has_trait = shy + } + } + } + } + # Take them as your spouse + option = { + name = travel_events.4002.c + trigger = { + allowed_more_spouses = yes + OR = { + AND = { + allowed_to_marry_same_sex_trigger = yes + sex_same_as = scope:local_beauty_scope + } + NOT = { sex_same_as = scope:local_beauty_scope } + } + can_marry_character_trigger = { CHARACTER = scope:local_beauty_scope } + } + add_courtier = scope:local_beauty_scope + root.current_travel_plan = { + add_companion = scope:local_beauty_scope + } + if = { + limit = { + is_male = yes + } + marry = scope:local_beauty_scope + } + else = { marry_matrilineal = scope:local_beauty_scope } + stress_impact = { + eccentric = major_stress_impact_loss + lustful = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + chaste = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = chaste + has_trait = shy + } + } + } + } + # Admire from afar + option = { + name = travel_events.4002.d + scope:local_beauty_scope = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + stress_impact = { + lustful = medium_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = rakish + } + } + } + } + after = { + scope:local_beauty_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You encounter vikings at sea +scripted_trigger is_near_vikings_trigger = { + NOT = { + culture = { has_innovation = innovation_longboats } + } + location = { + any_neighboring_province = { + county ?= { #Not at sea, not an impassable + holder = { in_diplomatic_range = root } + is_coastal_county = yes + has_coastal_province = yes + culture = { has_innovation = innovation_longboats } + faith = { has_doctrine_parameter = faith_can_raid } + } + } + } +} +scripted_trigger is_near_berber_pirates_trigger = { + NOT = { + culture = { has_cultural_pillar = heritage_berber } + } + location = { + any_neighboring_province = { + exists = county #Not at sea, not an impassable + county = { + holder = { in_diplomatic_range = root } + is_coastal_county = yes + culture = { has_cultural_pillar = heritage_berber } + } + } + } +} + +travel_events.4003 = { + type = character_event + title = travel_events.4003.t + desc = { + desc = travel_events.4003.desc.intro + first_valid = { + triggered_desc = { + trigger = { + is_near_vikings_trigger = yes + } + desc = travel_events.4003.desc.viking + } + triggered_desc = { + trigger = { + is_near_berber_pirates_trigger = yes + } + desc = travel_events.4003.desc.berber_pirate + } + desc = travel_events.4003.desc.regular_pirate + } + } + theme = travel_danger + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:viking_scope + animation = rage + } + override_background = { reference = fp1_ocean } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + location = { + is_sea_province = yes + any_neighboring_province = { + exists = county #Is this on land and in the landed title structure. + county = { + holder = { in_diplomatic_range = root } + has_coastal_province = yes + culture = { has_innovation = innovation_longboats } + faith = { has_doctrine_parameter = faith_can_raid } + } + } + } + location = { + OR = { + travel_danger_type = { + travel_plan = root.current_travel_plan + terrain = sea + } + travel_danger_type = { + travel_plan = root.current_travel_plan + terrain = coastal_sea + } + } + } + } + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_near_vikings_trigger = yes + } + modifier = { + add = 1 + is_near_berber_pirates_trigger = yes + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + if = { + limit = { + is_near_vikings_trigger = yes + } + location = { + random_neighboring_province = { + limit = { + exists = county #Not at sea, not an impassable + county = { + holder = { in_diplomatic_range = root } + has_coastal_province = yes + culture = { has_innovation = innovation_longboats } + faith = { has_doctrine_parameter = faith_can_raid } + } + } + county = { + save_scope_as = pirate_county_scope + } + } + } + create_character = { + template = fp1_ms_warrior_character + location = root.location + culture = scope:pirate_county_scope.culture + faith = scope:pirate_county_scope.faith + #Set up the scope + save_scope_as = viking_scope + after_creation = { + add_character_flag = created + } + } + } + else_if = { + limit = { + is_near_berber_pirates_trigger = yes + } + location = { + random_neighboring_province = { + limit = { + exists = county #Not at sea, not an impassable + county = { + holder = { in_diplomatic_range = root } + has_coastal_province = yes + culture = { has_cultural_pillar = heritage_berber } + } + } + county = { + save_scope_as = pirate_county_scope + } + } + } + create_character = { + template = fp1_ms_warrior_character + location = root.location + culture = scope:pirate_county_scope.culture + faith = scope:pirate_county_scope.faith + #Set up the scope + save_scope_as = viking_scope + after_creation = { + add_character_flag = created + } + } + } + else = { + create_character = { + template = fp1_ms_warrior_character + location = root.location + culture = root.culture + faith = root.faith + #Set up the scope + save_scope_as = viking_scope + after_creation = { + add_character_flag = created + } + } + } + location = { + save_scope_as = background_terrain_scope + } + } + # Attempt to fight the vikings + option = { + name = travel_events.4003.a + duel = { + skill = prowess + target = scope:viking_scope + 45 = { # You beat up the viking captain + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel_events.4003.defeated_vikings + left_icon = scope:viking_scope + add_prestige = medium_prestige_gain + create_character_memory = { + type = won_duel + participants = { + duel_loser = scope:viking_scope + } + } + if = { + limit = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + random_list = { + 5 = { + if= { + limit = { + scope:viking_scope.culture = { + has_innovation = innovation_longboats + } + } + give_nickname = nick_northmen_slayer + } + else = { + give_nickname = nick_pirate_slayer + } + } + 95 = {} + } + } + } + } + 45 = { # You get beaten up by the viking captain + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel_events.4003.defeated_by_vikings + left_icon = scope:viking_scope + increase_wounds_effect = { REASON = fight } + remove_short_term_gold = medium_gold_value + create_character_memory = { + type = lost_duel + participants = { + duel_winner = scope:viking_scope + } + } + } + } + 10 = { # You get beaten up by the viking captain and die + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel_events.4003.defeated_by_vikings + left_icon = scope:viking_scope + death = { + killer = scope:viking_scope + death_reason = death_fight + } + } + } + } + stress_impact = { + calm = medium_stress_impact_gain + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = craven + } + } + } + } + # Attempt to bribe the vikings + option = { + name = travel_events.4003.b + remove_short_term_gold = medium_gold_value + stress_impact = { + greedy = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = wrathful + has_trait = brave + } + } + modifier = { + factor = 0 + short_term_gold < medium_gold_value + } + } + } + # Attempt to outmanuever the vikings + option = { + name = travel_events.4003.c + duel = { + skills = { martial learning } + target = scope:viking_scope + 50 = { # You outmanuever the viking captain + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + modifier = { + factor = 2 + has_trait = strategist + } + send_interface_toast = { + title = travel_events.4003.defeated_vikings + left_icon = scope:viking_scope + add_prestige = medium_prestige_gain + } + } + 50 = { # You get beaten up by the viking captain + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + + send_interface_toast = { + title = travel_events.4003.defeated_by_vikings + left_icon = scope:viking_scope + increase_wounds_effect = { REASON = fight } + remove_short_term_gold = medium_gold_value + } + create_character_memory = { + type = lost_duel + participants = { + duel_winner = scope:viking_scope + } + } + } + 5 = { # You get beaten up by the viking captain and die + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + death = { + killer = scope:viking_scope + death_reason = death_fight + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = brave + } + } + } + } + # Attempt to hire the vikings as your personal guard + option = { + name = travel_events.4003.d + duel = { + skills = { diplomacy stewardship } + target = scope:viking_scope + 50 = { # You convince them to join you + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel_events.4003.offer_accepted + left_icon = scope:viking_scope + pay_short_term_gold = { + target = scope:viking_scope + gold = minor_gold_value + } + add_courtier = scope:viking_scope + root.current_travel_plan = { + add_companion = scope:viking_scope + } + } + hidden_effect = { + scope:viking_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 5 + } + } + } + } + 50 = { # You get beaten up by the viking captain + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel_events.4003.offer_refused + left_icon = scope:viking_scope + increase_wounds_effect = { REASON = fight } + remove_short_term_gold = medium_gold_value + } + create_character_memory = { + type = lost_duel + participants = { + duel_winner = scope:viking_scope + } + } + } + 5 = { # You get beaten up by the viking captain and die + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + death = { + killer = scope:viking_scope + death_reason = death_fight + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + after = { + scope:viking_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Fishermen at sea! +scripted_trigger is_near_fishermen_trigger = { + location = { + any_neighboring_province = { + exists = county #Not at sea, not an impassable + county = { + culture = { has_cultural_tradition = tradition_fishermen } + } + } + } +} + +travel_events.4004 = { + type = character_event + title = travel_events.4004.t + desc = travel_events.4004.desc + theme = travel + left_portrait = { + character = root + animation = admiration + } + override_background = { reference = fp1_ocean } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + location = { + is_sea_province = yes + } + is_near_fishermen_trigger = yes + } + immediate = { + location = { + random_neighboring_province = { + limit = { + exists = county #Not at sea, not an impassable + county.culture = { has_cultural_tradition = tradition_fishermen } + } + county = { + save_scope_as = fishermen_county_scope + } + } + } + create_character = { + template = generic_peasant_character + location = root.location + culture = scope:fishermen_county_scope.culture + faith = scope:fishermen_county_scope.faith + #Set up the scope + save_scope_as = fisherman_scope + after_creation = { + add_character_flag = created + } + } + } + # Negotiate for some food + option = { + name = travel_events.4004.a + remove_short_term_gold = minor_gold_value + current_travel_plan = { + add_travel_plan_modifier = { + modifier = travel_well_fed_travellers + months = 2 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = arrogant + has_trait = wrathful + } + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + # Attempt to plunder them for food + option = { + name = travel_events.4004.b + duel = { + skill = prowess + target = scope:fisherman_scope + 50 = { # You beat up the fisherman + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + current_travel_plan = { + add_travel_plan_modifier = { + modifier = travel_well_fed_travellers + months = 2 + } + } + } + 50 = { # You get beaten up and mugged by a lowly fisherman + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + increase_wounds_effect = { REASON = fight } + remove_short_term_gold = minor_gold_value + create_character_memory = { + type = lost_duel + participants = { + duel_winner = scope:fisherman_scope + } + } + } + } + stress_impact = { + vengeful = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = vengeful + has_trait = arrogant + has_trait = wrathful + has_trait = sadistic + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + has_trait = generous + } + } + } + } + # Just go by without bothering the fishermen + option = { + name = travel_events.4004.c + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 50 + } + } + after = { + scope:fisherman_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Encounter a caravan of merchants at sea +scripted_trigger nearby_merchant_culture = { + culture = { + OR = { + has_cultural_tradition = tradition_maritime_mercantilism + has_cultural_tradition = tradition_diasporic + } + } +} + +travel_events.4005 = { + type = character_event + title = travel_events.4005.t + desc = travel_events.4005.desc + theme = travel + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:merchant_character_scope + animation = admiration + } + artifact = { + target = scope:merchant_artifact_scope + position = lower_left_portrait + } + override_background = { reference = fp1_ocean } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + location = { + is_sea_province = yes + any_neighboring_province = { + exists = county #Ie this is not a Sea province or an Impassable, etc + county.holder = { + any_courtier = { + nearby_merchant_culture = yes + } + } + } + } + } + immediate = { + save_scope_as = root_scope + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + hidden_effect = { + location = { + random_neighboring_province = { + limit = { + exists = county #Ie this is not a Sea province or an Impassable, etc + county.holder = { + any_courtier = { + nearby_merchant_culture = yes + } + } + } + county.holder = { + random_courtier = { + limit = { + nearby_merchant_culture = yes + } + save_scope_as = merchant_base_scope + } + } + } + } + create_character = { + template = generic_peasant_character + location = root.location + culture = scope:merchant_base_scope.culture + faith = scope:merchant_base_scope.faith + #Set up the scope + save_scope_as = merchant_character_scope + after_creation = { + add_character_flag = created + } + } + scope:merchant_character_scope = { + random_list = { + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = maritime_trading_handbook + description = maritime_trading_handbook_description + type = journal + visuals = book + modifier = character_travel_speed_1 + modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier + modifier = artifact_naval_speed_2_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = own_holy_text_mid + description = own_holy_text_mid_description + type = journal + visuals = book + template = holy_book_template + modifier = artifact_monthly_learning_lifestyle_xp_2_modifier + modifier = artifact_monthly_piety_3_modifier + modifier = artifact_learning_per_piety_level_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + scope:merchant_artifact_scope = { + set_variable = { + name = relic_religion + value = root.religion + } + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = merchants_holy_text_mid + description = merchants_holy_text_mid_description + type = journal + visuals = book + template = holy_book_template + modifier = artifact_monthly_learning_lifestyle_xp_2_modifier + modifier = artifact_monthly_piety_3_modifier + modifier = artifact_learning_per_piety_level_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + scope:merchant_artifact_scope = { + set_variable = { + name = relic_religion + value = scope:merchant_character_scope.religion + } + } + } + 5 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = merchants_sword + description = merchants_sword_description + type = sword + visuals = sword + modifier = artifact_prowess_4_modifier + modifier = artifact_monthly_prestige_3_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + } + } + } + } + } + # Buy the artifact! + option = { + name = travel_events.4005.a + if = { + limit = { + scope:merchant_artifact_scope = { + rarity = famed + } + } + remove_short_term_gold = major_gold_value + } + else = { + remove_short_term_gold = medium_gold_value + } + scope:merchant_artifact_scope = { set_owner = root } + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + # Attempt to steal the artifact + option = { + name = travel_events.4005.b + duel = { + skill = intrigue + value = very_high_skill_rating + 50 = { # You beat up the fisherman + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.stole_artifact + left_icon = root + scope:merchant_artifact_scope = { set_owner = root } + } + } + 50 = { # You get caught and exposed as a dirty thief! + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.caught_red_handed + left_icon = root + increase_wounds_no_death_effect = { REASON = fight } + add_prestige = major_prestige_loss + } + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + craven = medium_stress_impact_gain + generous = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = sadistic + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + has_trait = generous + has_trait = craven + } + } + } + } + # Just go by without buying anything + option = { + name = travel_events.4005.c + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = generous + } + } + } + after = { + hidden_effect = { + if = { + limit = { + scope:merchant_artifact_scope.artifact_owner != root + } + destroy_artifact = scope:merchant_artifact_scope + } + if = { + limit = { is_ai = yes } + scope:merchant_character_scope = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } + } +} + +# A local bird lands on your boat and eats some supplies +travel_events.4006 = { + type = character_event + title = travel_events.4006.t + desc = travel_events.4006.desc + theme = travel + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:superstituous_caravan_member + animation = fear + } + override_background = { reference = fp1_ocean } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + location = { + is_sea_province = yes + } + current_travel_plan = { + any_entourage_character = { + opinion = { + value <= low_negative_opinion + target = root + } + } + } + } + immediate = { + root.current_travel_plan = { + random_entourage_character = { + limit = { + opinion = { + value <= low_negative_opinion + target = root + } + } + weight = { + base = 1 + # Try to find someone relevant + modifier = { + is_powerful_vassal_of = root + add = 2 + } + modifier = { + is_close_family_of = root + add = 2 + } + modifier = { + this = root.current_travel_plan.travel_leader + add = 10 + } + # Try to find someone who would be upset over this + modifier = { + has_trait = compassionate + add = 1 + } + modifier = { + has_trait = zealous + add = 1 + } + modifier = { + has_trait = cynical + factor = 0.01 + } + } + save_scope_as = superstituous_caravan_member + } + } + } + # Alas, nothing to be done + option = { + name = travel_events.4006.a + current_travel_plan = { + add_travel_plan_modifier = { + modifier = bird_ate_supplies + years = 2 + } + } + change_current_weight = -10 + progress_towards_friend_effect = { + REASON = friend_listened_to_advice + CHARACTER = scope:superstituous_caravan_member + OPINION = default_friend_opinion + } + stress_impact = { + base = minor_stress_impact_gain + vengeful = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = callous + has_trait = sadistic + } + } + } + } + # Kill the bloody bird! + option = { + name = travel_events.4006.b + progress_towards_rival_effect = { + REASON = rival_belittled_beliefs + CHARACTER = scope:superstituous_caravan_member + OPINION = default_rival_opinion + } + random_list = { + 50 = { + send_interface_toast = { + title = travel.supersititions_abated + left_icon = root + add_stress = minor_stress_loss + current_travel_plan = { + add_travel_plan_modifier = { + modifier = ate_a_bird + years = 2 + } + } + } + } + 50 = { + modifier = { + factor = 0.5 + has_trait = cynical + } + send_interface_toast = { + title = travel.birds_curse + left_icon = root + add_stress = minor_stress_gain + current_travel_plan = { + add_travel_plan_modifier = { + modifier = bird_superstition + years = 2 + } + } + } + } + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = sadistic + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = zealous + } + } + } + } +} + +# A storm at sea +travel_events.4007 = { + type = character_event + title = travel_events.4007.t + desc = travel_events.4007.desc + theme = travel + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = root.current_travel_plan.travel_leader + animation = stress + } + override_background = { reference = fp1_ocean } + cooldown = { months = 1 } + trigger = { + exists = current_travel_plan.travel_leader + NOT = { current_travel_plan.travel_leader = root } + is_available_travelling = yes + is_playable_character = yes + location = { + has_sea_danger_type = { TRAVEL = root.current_travel_plan } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_high } + hidden_effect = { + while = { + count = 5 + current_travel_plan = { + random_entourage_character = { + limit = { + this != root + } + weight = { + base = 1 + # Try to find someone relevant + modifier = { + is_close_family_of = root + add = 1 + } + } + add_to_list = drowning_courtiers_list + } + } + } + } + traveler_danger_xp_effect = { + MIN = 3 + MAX = 7 + } + } + # Trust your guide leader's judgement + option = { + name = travel_events.4007.a + current_travel_plan.travel_leader = { + duel = { + skill = martial + value = high_skill_rating + 50 = { # You manage to navigate the storm + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + custom_tooltip = succesfully_navigate_the_storm_tt + hidden_effect = { + root = { + send_interface_toast = { + title = succesfully_navigate_the_storm_tt + left_icon = root + add_prestige = 10 + } + } + } + } + 40 = { # You mess up and get someone killed + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + add_prestige = medium_prestige_loss + increase_wounds_effect = { REASON = drowned } + custom_tooltip = someone_drowns_tt + hidden_effect = { + root = { + send_interface_toast = { + title = someone_drowns_tt + left_icon = root + random_in_list = { + list = drowning_courtiers_list + death = { + death_reason = death_drowned + } + } + } + } + } + } + 10 = { # They mess up a lot and drown a lot of people + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + increase_wounds_effect = { REASON = drowned } + custom_tooltip = some_people_drown_tt + hidden_effect = { + root = { + send_interface_toast = { + title = some_people_drown_tt + left_icon = root + every_in_list = { + list = drowning_courtiers_list + death = { + death_reason = death_drowned + } + } + } + } + } + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = brave + } + } + } + } + # Take the helm yourself! + option = { + name = travel_events.4007.b + stress_impact = { + arrogant = minor_stress_impact_loss + craven = medium_stress_impact_gain + } + progress_towards_rival_effect = { + REASON = rival_upstaged_at_sea + CHARACTER = root.current_travel_plan.travel_leader + OPINION = default_rival_opinion + } + duel = { + skill = martial + value = high_skill_rating + 50 = { # You manage to navigate the storm + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = succesfully_navigate_the_storm_tt + left_icon = root + add_prestige = medium_prestige_gain + } + } + 40 = { # You mess up and get someone killed + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + custom_tooltip = some_people_drown_tt + hidden_effect = { + send_interface_toast = { + title = some_people_drown_tt + left_icon = root + every_in_list = { + list = drowning_courtiers_list + death = { + death_reason = death_drowned + } + } + add_prestige = medium_prestige_loss + increase_wounds_effect = { REASON = drowned } + } + } + } + 10 = { # You really mess up and get yourself drowned + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = you_drown_tt + left_icon = root + add_prestige = medium_prestige_loss + death = { + death_reason = death_drowned + } + } + } + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = arrogant + } + modifier = { + factor = 0 + has_trait = craven + } + } + } + # Follow the experienced sailors to shore + option = { + name = travel_events.4007.c + trigger = { + location = { + any_neighboring_province = { + exists = county #Not at sea, not an impassable + county.culture = { + OR = { + has_cultural_tradition = tradition_seafaring + has_cultural_tradition = tradition_fishermen + } + } + } + } + } + add_prestige = minor_prestige_gain + stress_impact = { + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = brave + } + } + } + } +} + +# Shipwreck! +travel_events.4008 = { + type = character_event + title = travel_events.4008.t + desc = travel_events.4008.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + override_background = { reference = fp1_ocean } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + location = { is_sea_province = yes } + } + + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + mp_delay_travel_plan = { DAYS = 90 } + } + + # Investigate the wreck + option = { + name = travel_events.4008.a + current_travel_plan = { + delay_travel_plan = { + weeks = 1 + add = yes + } + } + duel = { + skill = intrigue + value = medium_skill_rating + 60 = { # You find something cool + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + add_prestige = medium_prestige_gain + custom_tooltip = find_something_cool_tt + hidden_effect = { + random_list = { + 50 = { # A cool artifact + trigger_event = travel_events.4009 + } + 50 = { # Treasure! + trigger_event = travel_events.4010 + } + 50 = { # A survivor! + trigger = { + location = { + any_neighboring_province = { + is_sea_province = no + has_holding = yes + } + } + } + trigger_event = travel_events.4011 + } + } + } + } + 40 = { # You find nothing + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + custom_tooltip = you_find_nothing_tt + send_interface_toast = { + title = you_find_nothing_tt + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = paranoid + } + } + } + } + # Ignore it + option = { + name = travel_events.4008.b + stress_impact = { + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + curious = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = brave + has_trait = curious + } + } + } + } + after = { + mp_resume_travel_plan = yes + } +} + +# Shipwreck, a trinket! +travel_events.4009 = { + type = character_event + title = travel_events.4009.t + desc = travel_events.4009.desc + theme = travel + left_portrait = { + character = root + animation = admiration + } + artifact = { + target = scope:new_trinket + position = lower_left_portrait + } + override_background = { reference = fp1_ocean } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = root + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = discovered + } + } + # Cool dude + option = { + name = travel_events.4009.a + } +} + +# Shipwreck, treasure! +travel_events.4010 = { + type = character_event + title = travel_events.4010.t + desc = travel_events.4010.desc + theme = travel + left_portrait = { + character = root + animation = admiration + } + override_background = { reference = fp1_ocean } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + } + # Cool dude + option = { + name = travel_events.4010.a + add_gold = minor_gold_value + } +} + +# Shipwreck, a survivor! +travel_events.4011 = { + type = character_event + title = travel_events.4011.t + desc = travel_events.4011.desc + theme = travel + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:castaway_scope + animation = ecstasy + } + override_background = { reference = fp1_ocean } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + root.location = { + random_neighboring_province = { + limit = { + is_sea_province = no + has_holding = yes + } + county = { save_scope_as = nearby_coast_scope } + } + } + create_character = { + template = castaway_character + location = root.location + culture = scope:nearby_coast_scope.culture + faith = scope:nearby_coast_scope.faith + #Set up the scope + save_scope_as = castaway_scope + after_creation = { + add_character_flag = created + } + } + } + # Help them to shore + option = { + name = travel_events.4011.a + add_piety = minor_piety_value + add_gold = minor_gold_value + stress_impact = { + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + } + } + # Recruit them to your court + option = { + name = travel_events.4011.b + add_courtier = scope:castaway_scope + root.current_travel_plan = { + add_companion = scope:castaway_scope + } + add_gold = minor_gold_value + stress_impact = { + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + } + # Abandon them there + option = { + name = travel_events.4011.c + stress_impact = { + callous = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + just = medium_stress_impact_gain + compassionate = massive_stress_impact_gain + } + } + + after = { + scope:castaway_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You are being followed by a feral child +travel_events.4012 = { + type = character_event + title = travel_events.4012.t + desc = travel_events.4012.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:feral_child_scope + animation = pain + triggered_outfit = { + outfit_tags = { beggar_rags } + } + } + cooldown = { years = 50 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + has_holding = no + county = { development_level <= 5 } + } + trigger_if = { + limit = { + is_ai = yes + } + highest_held_title_tier >= tier_kingdom + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + create_character = { + template = feral_child_template + location = root.location + culture = root.location.county.culture # They should look like a local + faith = root.faith + dynasty = none + #Set up the scope + save_scope_as = feral_child_scope + } + scope:feral_child_scope = { + # Save scope to limit possible animals: big/small/dangerous/harmless/prowling + select_local_animal_effect = { TYPE = prowling } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + hidden_effect = { + scope:feral_child_scope = { + # They are feral, they learned very basic language from your party + if = { + limit = { + culture != root.culture + NOT = { + culture = { + has_same_culture_language = root.culture #Even if the child is from another culture they might speak the same language + } + } + } + set_culture = root.culture + unlearn_language_of_culture = root.location.county.culture + } + else_if = { + limit = { + culture != root.culture + } + set_culture = root.culture #For consistency we will set the culture even if it already speaks the same language. + } + # Give them a cool nickname + give_nickname = nick_son_of_dangerous_animal + } + } + } + # Take them as your ward + option = { + name = travel_events.4012.a + trigger = { + num_of_relation_ward < 2 + } + add_courtier = scope:feral_child_scope + root.current_travel_plan = { + add_companion = scope:feral_child_scope + } + scope:feral_child_scope = { set_relation_guardian = root } + create_character_memory = { + type = feral_child_found_memory + participants = { + feral_child = scope:feral_child_scope + } + } + hidden_effect = { + duel = { + skill = learning + value = very_high_skill_rating + 50 = { # You manage to tame the child + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + trigger_event = { + id = travel_events.4013 + years = 1 + } + } + 50 = { # You fail to tame the child and they return to nature + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + trigger_event = { + id = travel_events.4014 + years = 1 + } + } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = callous + } + } + } + } + # Ignore them + option = { + name = travel_events.4012.b + add_character_modifier = { + modifier = stalked_by_feral_child_modifier + years = 2 + } + scope:feral_child_scope = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + #Have them chased away! + option = { + name = travel_events.4012.c + duel = { + skill = prowess + target = scope:feral_child_scope + 50 = { # You beat up the child + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.beat_feral_child + left_icon = root + add_dread = minor_dread_gain + } + } + 50 = { # You get beaten up by the child + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.beaten_by_feral_child + left_icon = root + add_prestige = medium_prestige_loss + increase_wounds_effect = { REASON = fight } + } + create_character_memory = { + type = attacked_by_feral_child_memory + participants = { + feral_child = scope:feral_child_scope + } + } + } + } + if = { #Can die from the wounds effect above + limit = { scope:feral_child_scope = { is_alive = yes } } + scope:feral_child_scope = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + stress_impact = { + base = medium_stress_impact_gain + sadistic = medium_stress_impact_loss + zealous = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } +} + +# You gain the option to adopt the child +travel_events.4013 = { + type = character_event + title = travel_events.4013.t + desc = travel_events.4013.desc + theme = travel + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:feral_child_scope + animation = personality_rational + } + trigger = { + has_relation_ward = scope:feral_child_scope + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + scope:feral_child_scope = { + if = { + limit = { + has_character_modifier = nonverbal_modifier + } + remove_character_modifier = nonverbal_modifier + } + if = { + limit = { + has_character_modifier = feral_modifier + } + remove_character_modifier = feral_modifier + } + } + create_character_memory = { + type = feral_child_socialised_memory + participants = { + feral_child = scope:feral_child_scope + } + } + } + # Adopt them as your child + option = { + name = travel_events.4013.a + if = { + limit = { + exists = dynasty + dynasty.dynast = root + } + dynasty = { add_dynasty_prestige = major_dynasty_prestige_loss } + } + else = { + add_prestige = massive_prestige_loss + } + if = { + limit = { + is_male = yes + } + scope:feral_child_scope = { set_father = root } + } + else = { + scope:feral_child_scope = { set_mother = root } + } + if = { + limit = { exists = house } + scope:feral_child_scope = { set_house = root.house } + } + set_relation_friend = { + reason = friend_adopted + target = scope:feral_child_scope + } + stress_impact = { + compassionate = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 10 # The AI should really avoid doing this + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + has_trait = callous + has_trait = sadistic + } + } + } + } + # Use this to spread word of my good deeds + option = { + name = travel_events.4013.b + add_learning_lifestyle_xp = massive_lifestyle_xp + add_piety = medium_piety_gain + stress_impact = { + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = compassionate + } + } + } + } +} + +# You fail to tame the child +travel_events.4014 = { + type = character_event + title = travel_events.4014.t + desc = travel_events.4014.desc + theme = travel + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:feral_child_scope + animation = grief + } + # Try again + option = { + name = travel_events.4014.a + trigger = { + scope:feral_child_scope = { is_alive = yes } + has_relation_ward = scope:feral_child_scope + } + duel = { + skill = learning + value = very_high_skill_rating + 50 = { # You manage to tame the child + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + trigger_event = { + id = travel_events.4013 + months = 1 + } + } + 50 = { # You fail to tame the child and they return to nature + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + custom_tooltip = child_returns_to_nature_tt + create_character_memory = { + type = feral_child_socialised_failed_memory + participants = { + feral_child = scope:feral_child_scope + } + } + scope:feral_child_scope = { + silent_disappearance_effect = yes + } + } + } + stress_impact = { + compassionate = medium_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 10 # The AI should really avoid doing this + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = wrathful + has_trait = impatient + } + } + } + } + # Accept your loss and move on + option = { + name = travel_events.4014.b + custom_tooltip = child_returns_to_nature_tt + create_character_memory = { + type = feral_child_socialised_failed_memory + participants = { + feral_child = scope:feral_child_scope + } + } + if = { + limit = { + scope:feral_child_scope = { is_alive = yes } + } + scope:feral_child_scope = { + silent_disappearance_effect = yes + } + } + stress_impact = { + patient = minor_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = patient + has_trait = humble + has_trait = compassionate + has_trait = arrogant + } + } + } + } +} + +# Asking for directions from a diff. language character +travel_events.4015 = { + type = character_event + title = travel_events.4015.t + desc = travel_events.4015.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:travel_leader_scope + animation = stress + } + cooldown = { years = 20 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + exists = current_travel_plan.travel_leader + current_travel_plan.travel_leader = { + NOT = { knows_language_of_culture = root.location.county.culture } + } + NOT = { culture = { has_same_culture_language = root.location.county.culture } } + } + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan.travel_leader = { save_scope_as = travel_leader_scope } + } + # Attempt to interpret the instructions + option = { + name = travel_events.4015.a + trigger = { + NOT = { knows_language_of_culture = location.county.culture } + } + duel = { + skills = { diplomacy learning } + value = medium_skill_rating + 60 = { # You succesfully interpret the instructions + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.interpreted_instructions + left_icon = root + add_prestige = minor_prestige_gain + current_travel_plan = { + add_destination_progress = { days = 7 } + } + } + } + 40 = { # You mess up and get lost + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.got_lost + left_icon = root + current_travel_plan = { + delay_travel_plan = { + weeks = 1 + add = yes + } + } + } + } + } + } + # You speak the language and interpret the instructions + option = { + name = travel_events.4015.b + trigger = { + knows_language_of_culture = location.county.culture + } + add_prestige = minor_prestige_gain + current_travel_plan = { + add_destination_progress = { days = 7 } + } + } + after = { + mp_resume_travel_plan = yes + } +} + +# You experience heatstroke +scripted_trigger 4016_is_hot_climate_trigger = { + NOT = { terrain = mountains } + NOT = { terrain = taiga } + OR = { + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_africa + geographical_region = world_burma + geographical_region = world_asia_southeast + AND = { + OR = { + is_desert_trigger = yes + terrain = jungle + } + NOR = { + geographical_region = world_steppe + geographical_region = world_tibet + } + } + } +} +scripted_trigger 4016_is_cold_climate_trigger = { # Explicitly looking for places that are *cold*, not merely that they're not hot + OR = { + geographical_region = world_steppe + geographical_region = world_tibet + NOT = { is_desert_trigger = yes } + NOT = { terrain = jungle } + } + OR = { + geographical_region = world_steppe + geographical_region = world_tibet + geographical_region = world_europe_west_britannia + geographical_region = world_europe_west_germania + geographical_region = world_europe_north + terrain = mountains + terrain = taiga + } + NOT = { + geographical_region = world_europe_west_iberia + geographical_region = world_europe_south + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_africa + geographical_region = world_burma + } +} + +travel_events.4016 = { + type = character_event + title = travel_events.4016.t + desc = { + desc = travel_events.4016.desc.intro + first_valid = { + triggered_desc = { + trigger = { + root.location = { + is_drylands_or_desert_trigger = yes + } + } + desc = travel_events.4016.desc.mid.dry_heat + } + desc = travel_events.4016.desc.mid.humid_heat + } + desc = travel_events.4016.desc.outro + } + theme = travel_danger + left_portrait = { + character = root + animation = stress + } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + root.location = { + 4016_is_hot_climate_trigger = yes + } + root.capital_province = { + 4016_is_cold_climate_trigger = yes + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + } + + # Grit your teeth and keep going + option = { + name = travel_events.4016.a + random_list = { + 50 = { + modifier = { + factor = 2 + OR = { + has_any_illness = yes + has_trait = weak + has_trait = physique_bad + has_trait = spindly + has_trait = wheezing + has_trait = bleeder + } + } + send_interface_toast = { + title = travel.got_heatstroke + left_icon = root + add_character_modifier = { + modifier = heatstroke_modifier + years = 2 + } + add_stress = medium_stress_gain + } + } + 50 = { + modifier = { + factor = 2 + OR = { + has_trait = strong + has_trait = physique_good + has_trait = athletic + } + } + modifier = { + factor = 2 + OR = { + has_trait = desert_warrior + has_trait = jungle_stalker + has_trait = logistician + } + } + send_interface_toast = { + title = travel.found_a_place_to_cool + left_icon = root + add_stress = minor_stress_loss + } + } + } + stress_impact = { + patient = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = patient + has_trait = humble + } + } + } + } + + # Attempt to steal water from your entourage + option = { + name = travel_events.4016.b + duel = { + skill = intrigue + value = medium_skill_rating + 50 = { # You manage to steal water without being caught + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.stole_water + left_icon = root + add_stress = minor_stress_loss + } + } + 50 = { # You get caught stealing water + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.caught_stealing_water + left_icon = root + add_prestige = medium_prestige_loss + root.current_travel_plan = { + every_entourage_character = { + custom = every_entourage_tt + add_opinion = { + modifier = angry_opinion + opinion = -10 + target = root + } + } + } + } + } + } + stress_impact = { + patient = minor_stress_impact_gain + humble = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = patient + has_trait = humble + has_trait = honest + } + } + } + } + after = { + mp_resume_travel_plan = yes + } +} + +# Swords for hire! +travel_events.4017 = { + type = character_event + title = travel_events.4017.t + desc = { + desc = travel_events.4017.desc.intro + first_valid = { + triggered_desc = { + trigger = { + root.location = { + OR = { + geographical_region = world_steppe + county = { culture = { has_cultural_pillar = heritage_turkic } } + county = { culture = { has_cultural_pillar = heritage_mongolic } } + } + county = { culture = { has_cultural_tradition = tradition_horse_lords } } + } + } + desc = travel_events.4017.desc.mid.nomad + } + desc = travel_events.4017.desc.mid.swordsman + } + desc = travel_events.4017.desc.outro + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:warrior_scope + animation = marshal + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + root.location = { + county = { + culture != root.capital_county.culture + culture = { + OR = { + has_cultural_tradition = tradition_swords_for_hire + has_cultural_tradition = tradition_ep3_audacious_cadets + } + } + } + } + } + immediate = { + create_character = { + template = swords_for_hire_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = warrior_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:warrior_scope = { + give_nickname = nick_the_own_culture + add_character_flag = single_combat_duel_armor + } + } + } + # Hire them! + option = { + name = travel_events.4017.a + pay_short_term_gold = { + target = scope:warrior_scope + gold = minor_gold_value + } + add_courtier = scope:warrior_scope + root.current_travel_plan = { + add_companion = scope:warrior_scope + } + hidden_effect = { + scope:warrior_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = greedy + } + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + # Attempt to negotiate for a lower contract + option = { + name = travel_events.4017.b + duel = { + skill = stewardship + value = medium_skill_rating + 50 = { # You manage to haggle the price down + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.haggle_succesful + left_icon = root + pay_short_term_gold = { + target = scope:warrior_scope + gold = tiny_gold_value + } + add_courtier = scope:warrior_scope + root.current_travel_plan = { + add_companion = scope:warrior_scope + } + hidden_effect = { + scope:warrior_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + } + } + } + 50 = { # You fail and they get pissed + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.haggle_failed + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + shy = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = shy + has_trait = generous + } + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + # Use them to get lower mercenary contracts + option = { + name = travel_events.4017.c + trigger = { + has_trait = avaricious + } + add_character_modifier = { + modifier = cheaper_merc_contracts + years = 5 + } + stress_impact = { + craven = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = generous + } + } + } + } + + # Move on without hiring their services + option = { + name = travel_events.4017.d + stress_impact = { + brave = minor_stress_impact_gain + generous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = generous + has_trait = arrogant + } + } + } + } + + after = { + hidden_effect = { + scope:warrior_scope = { + remove_character_flag = single_combat_duel_armor + silent_disappearance_ai_if_created_effect = yes + } + } + } +} + +# A mendicant preacher! +travel_events.4018 = { + type = character_event + title = travel_events.4018.t + desc = { + desc = travel_events.4018.desc.intro + first_valid = { + triggered_desc = { + trigger = { + root.location = { + county = { culture = { has_cultural_tradition = tradition_mendicant_mystics } } + } + } + desc = travel_events.4018.desc.mid.mystic + } + desc = travel_events.4018.desc.mid.preacher + } + desc = travel_events.4018.desc.outro + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:mystic_scope + animation = personality_zealous + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + culture != root.capital_county.culture + faith.religion != root.faith.religion + OR = { + faith = { has_doctrine_parameter = mendicant_preachers_conversion_active } + culture = { has_cultural_tradition = tradition_mendicant_mystics } + } + } + } + } + immediate = { + create_character = { + template = default_mystic_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = mystic_scope + after_creation = { + add_character_flag = created + } + } + } + + # Have them burned + option = { + name = travel_events.4018.d + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_trait = zealous + } + } + trait = sadistic + trait = callous + trait = zealous + scope:mystic_scope = { + death = { + killer = root + death_reason = death_burned_witch + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + factor = 100 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + # Debate me in the arena of facts and logic + option = { + name = travel_events.4018.a + duel = { + skill = learning + target = scope:mystic_scope + 50 = { # You win the debate + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + add_piety = medium_piety_gain + } + } + 50 = { # You lose the debate + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = root + add_prestige = miniscule_prestige_loss + add_courtier = scope:mystic_scope + root.current_travel_plan = { + add_companion = scope:mystic_scope + } + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = cynical + } + } + } + } + + # They do make some good points... + option = { + name = travel_events.4018.b + add_piety = major_piety_loss + set_character_faith = scope:mystic_scope.faith + add_courtier = scope:mystic_scope + root.current_travel_plan = { + add_companion = scope:mystic_scope + } + hidden_effect = { + scope:mystic_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + } + stress_impact = { + cynical = medium_stress_impact_loss + zealous = major_stress_impact_gain + arrogant = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { # The AI should never do this + base = 0 + } + } + + # Pass them by + option = { + name = travel_events.4018.c + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + after = { + scope:mystic_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You pass by a peasant street food place, demand to sample some +travel_events.4019 = { + type = character_event + title = travel_events.4019.t + desc = travel_events.4019.desc + theme = travel + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:pompous_courtier + animation = personality_zealous + } + override_background = { reference = market } + cooldown = { years = 20 } + trigger = { + static_group_filter = { + group = travel_events.4019 + match = 0.25 + } + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + has_holding = yes + } + NOT = { + location.culture = { + has_same_culture_heritage = root.culture + } + } + current_travel_plan = { + any_entourage_character = { + is_physically_able_ai_adult = yes + this != root + } + } + } + weight_multiplier = { + base = 1 + # Culinary art is an exceptionally rare cultrad, so I feel for visibility this should just make the event more likely rather than locking it only to culinary artists + modifier = { + add = 10 + location.culture = { + has_cultural_tradition = tradition_culinary_art + } + } + } + immediate = { + current_travel_plan = { + random_entourage_character = { + limit = { + is_physically_able_ai_adult = yes + this != root + } + weight = { + base = 1 + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 0.5 + NOT = { has_trait = humble } + } + } + save_scope_as = pompous_courtier + } + } + } + # I am the Emperor and I want pudding! + option = { + name = travel_events.4019.a + add_prestige = minor_prestige_loss + random_list = { + 60 = { + modifier = { + factor = 2 + root.location.culture = { + has_cultural_tradition = tradition_culinary_art + } + } + send_interface_toast = { + title = travel.good_food + left_icon = root + add_stress = minor_stress_loss + add_character_modifier = { + modifier = good_soup_modifier + years = 2 + } + } + } + 30 = { + send_interface_toast = { + title = travel.bad_food + left_icon = root + add_character_modifier = { + modifier = bad_soup_modifier + years = 2 + } + } + } + 10 = { + send_interface_toast = { + title = travel.food_poisoning + left_icon = root + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = no } + } + } + } + stress_impact = { + gluttonous = medium_stress_impact_loss + comfort_eater = medium_stress_impact_loss + humble = medium_stress_impact_gain + temperate = medium_stress_impact_gain + inappetetic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = temperate + has_trait = humble + has_trait = inappetetic + } + } + modifier = { + factor = 0 + prestige <= minor_prestige_value + } + } + } + + # Yes we do have better food at home... + option = { + name = travel_events.4019.b + scope:pompous_courtier = { + add_opinion = { + target = root + opinion = 5 + modifier = respect_opinion + } + } + stress_impact = { + inappetetic = minor_stress_impact_loss + temperate = minor_stress_impact_loss + gluttonous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = gluttonous + has_trait = content + } + } + } + } + + # Let's take note of the recipe + option = { + name = travel_events.4019.c + trigger = { + root.location.culture = { + has_cultural_tradition = tradition_culinary_art + } + has_trait = scholar + } + add_character_modifier = { + modifier = exotic_recipe_modifier + years = 5 + } + stress_impact = { + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + } + } + } +} + +# Strong believers harass your caravan and demand payment +travel_events.4020 = { + type = character_event + title = travel_events.4020.t + desc = travel_events.4020.desc + theme = travel_danger + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:strong_believer_scope + animation = rage + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + faith.religion != root.faith.religion + culture = { has_cultural_tradition = tradition_zealous_people } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = scholar_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = strong_believer_scope + after_creation = { + add_character_flag = created + } + } + select_local_animal_effect = { TYPE = prowling } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + # Debate me in the arena of facts and logic + option = { + name = travel_events.4020.a + duel = { + skill = learning + target = scope:strong_believer_scope + 50 = { # You manage to haggle the price down + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + add_piety = medium_piety_gain + } + } + 50 = { # You fail and they get pissed + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = root + add_piety = medium_piety_loss + remove_short_term_gold = minor_gold_value + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = humble + } + } + } + } + + # Pay the tax + option = { + name = travel_events.4020.b + remove_short_term_gold = minor_gold_value + stress_impact = { + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = greedy + has_trait = zealous + } + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + # Have them burned + option = { + name = travel_events.4020.c + trigger = { + OR = { + has_trait = sadistic + has_trait = wrathful + has_trait = impatient + has_trait = zealous + } + } + scope:strong_believer_scope = { + death = { + killer = root + death_reason = death_burned_witch + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + zealous = medium_stress_impact_loss + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = calm + } + } + } + } + + after = { + scope:strong_believer_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You witness a human sacrifice! +travel_events.4021 = { + type = character_event + title = travel_events.4021.t + desc = { + desc = travel_events.4021.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + } + } + desc = travel_events.4021.desc.mid.sadist + } + desc = travel_events.4021.desc.mid + } + first_valid = { + triggered_desc = { + trigger = { + is_cannibal_trigger = yes + } + desc = travel_events.4021.desc.outro.cannibal + } + triggered_desc = { + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + } + } + desc = travel_events.4021.desc.outro.sadist + } + desc = travel_events.4021.desc.outro + } + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = personality_callous + } + animation = disbelief + } + right_portrait = { + character = scope:sacrificed_person_scope + animation = prisondungeon + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + # Human sacrifice should be shocking to you + NOT = { root.faith = { has_doctrine_parameter = human_sacrifice_active } } + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + faith = { has_doctrine_parameter = human_sacrifice_active } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + create_character = { + template = generic_peasant_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = sacrificed_person_scope + after_creation = { + add_character_flag = created + } + } + if = { + limit = { + root.current_travel_plan = { + any_entourage_character = { + has_relation_rival = root + is_ruler = no + } + } + } + root.current_travel_plan = { + random_entourage_character = { + limit = { + has_relation_rival = root + is_ruler = no + } + save_scope_as = rival_to_sacrifice + } + } + } + scope:sacrificed_person_scope = { + add_character_flag = is_naked + } + } + + # Buy the sacrifice as your servant + option = { + name = travel_events.4021.b + remove_short_term_gold = medium_gold_value + add_courtier = scope:sacrificed_person_scope + root.current_travel_plan = { + add_companion = scope:sacrificed_person_scope + } + scope:sacrificed_person_scope = { + add_opinion = { + modifier = feast_saved_my_life_opinion + target = root + } + } + stress_impact = { + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + greedy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = greedy + has_trait = zealous + has_trait = paranoid + } + } + modifier = { + factor = 0 + short_term_gold <= medium_gold_value + } + } + } + + # Offer up your own sacrifice! + option = { + name = travel_events.4021.c + trigger = { + exists = scope:rival_to_sacrifice + } + add_piety = medium_piety_loss + scope:rival_to_sacrifice = { + death = { + killer = root + death_reason = death_sacrificed_to_foreign_gods + } + } + add_courtier = scope:sacrificed_person_scope + root.current_travel_plan = { + add_companion = scope:sacrificed_person_scope + } + scope:sacrificed_person_scope = { + add_opinion = { + modifier = feast_saved_my_life_opinion + target = root + } + } + stress_impact = { + vengeful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + calm = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = calm + has_trait = forgiving + } + } + } + } + # Just let it happen + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { has_trait = sadistic } + desc = travel_events.4021.a.sadist + } + desc = travel_events.4021.a + } + } + } + scope:sacrificed_person_scope = { + death = { + death_reason = death_sacrificed_to_gods + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = zealous + } + } + } + } + after = { + scope:sacrificed_person_scope ?= { + remove_character_flag = is_naked + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You witness some tree worship in a Sanctity of Nature province +travel_events.4022 = { + type = character_event + title = travel_events.4022.t + desc = travel_events.4022.desc + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = zealous + NOT = { faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } } + } + animation = anger + } + triggered_animation = { + trigger = { + has_trait = zealous + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + animation = admiration + } + animation = interested + } + right_portrait = { + character = location.county.holder + animation = dancing + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + faith != root.faith + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + } + # Sit back and watch the ceremony + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = zealous + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + desc = travel_events.4022.a.not_so_different + } + triggered_desc = { + trigger = { + has_trait = zealous + NOT = { faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } } + } + desc = travel_events.4022.a.ignore_heretics + } + desc = travel_events.4022.a + } + } + } + stress_impact = { + sadistic = medium_stress_impact_gain + } + if = { + limit = { + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + add_piety = minor_piety_gain + stress_impact = { + zealous = minor_stress_impact_loss + } + } + else = { + stress_impact = { + zealous = medium_stress_impact_gain + } + } + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + else = { + random = { + chance = root.learning + add_trait = lifestyle_mystic + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + AND = { + has_trait = zealous + NOT = { faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } } + } + } + } + } + } + + # Burn the tree! + option = { + name = travel_events.4022.b + trigger = { + NOT = { faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } } + } + duel = { + skill = prowess + value = medium_skill_rating + 50 = { # You manage to burn the tree without getting beaten up + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.burn_the_tree + left_icon = root + add_piety = medium_piety_gain + location.county.holder = { + if = { + limit = { + faith = root.location.county.faith + } + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + if = { + limit = { + liege ?= { + faith = root.location.county.faith + this != root.location.county.holder + } + } + liege = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + } + if = { + limit = { + top_liege ?= { + faith = root.location.county.faith + NOR = { + this = root.location.county.holder + this = root.location.county.holder.liege + } + } + } + top_liege = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + } + } + } + } + 50 = { # You are beaten up attempting to burn the tree + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.beaten_by_peasants + left_icon = root + increase_wounds_no_death_effect = { REASON = fight } + add_prestige = medium_prestige_loss + } + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = cynical + has_trait = just + has_trait = forgiving + } + } + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + # Join the ceremony + option = { + name = travel_events.4022.c + if = { + limit = { + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + add_piety = medium_piety_gain + } + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + if = { + limit = { + root.location.culture != root.culture + } + root.culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 1 + desc = cultural_acceptance_participated_in_festival + } + } + } + stress_impact = { + curious = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + shy = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + AND = { + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + has_trait = zealous + } + } + } + } + } +} + +# Prester John! You find a same-religion ruler in a faraway land +travel_events.4023 = { + type = character_event + title = travel_events.4023.t + desc = { + desc = travel_events.4023.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + scope:prester_john_scope = { is_male = yes } + } + desc = travel_events.4023.desc.mid.john + } + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + scope:prester_john_scope = { is_female = yes } + } + desc = travel_events.4023.desc.mid.joan + } + desc = travel_events.4023.desc.mid + } + desc = travel_events.4023.desc.outro + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = cynical + } + animation = personality_cynical + } + animation = admiration + } + right_portrait = { + character = scope:prester_john_scope + animation = personality_zealous + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_landed = yes + is_location_valid_for_travel_event_on_land = yes + location.county.holder.top_liege ?= { + religion = root.religion + faith != root.faith # This shouldn't happen for Icelandic Catholics visiting Catholic Jerusalem + NOT = { in_diplomatic_range = root } + # They must be "surrounded" by other religions + save_temporary_scope_as = location_top_liege + any_neighboring_top_liege_realm = { + count < 3 + holder = { + religion = scope:location_top_liege.religion + } + } + any_neighboring_top_liege_realm = { + count > 3 + holder = { + religion != scope:location_top_liege.religion + } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + root.location.county.holder.top_liege = { + save_scope_as = prester_john_scope + } + save_scope_as = foreign_visitor + } + # Fanboy out and ask to see "Prester John" + option = { + name = travel_events.4023.a + add_piety = minor_piety_gain + custom_tooltip = john_may_reward_you_tt + scope:prester_john_scope = { + trigger_event = travel_events.4024 + } + stress_impact = { + arrogant = medium_stress_impact_gain + cynical = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = cynical + has_trait = shy + } + } + } + } + # Visit "Prester John" and tell him that it is his duty to spread the faith + option = { + name = travel_events.4023.b + add_piety = medium_piety_gain + if = { + limit = { + NOT = { + has_trait = holy_warrior + } + } + add_trait = holy_warrior + } + hidden_effect = { + scope:prester_john_scope = { + trigger_event = travel_events.4025 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + cynical = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = zealous + has_trait = holy_warrior + } + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = cynical + has_trait = shy + } + } + } + } + # They may be [religion], but they are still [faith] heretics! + option = { + name = travel_events.4023.c + trigger = { + faith = { + faith_hostility_level = { + target = root.location.faith + value >= faith_hostile_level + } + } + } + add_piety = minor_piety_gain + stress_impact = { + zealous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = humble + } + } + } + } + + # That's cool I guess. Moving on + option = { + name = travel_events.4023.d + + stress_impact = { + zealous = medium_stress_impact_gain + curious = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = curious + has_trait = gregarious + } + } + } + } +} + +# Prester John is told of the visitor +travel_events.4024 = { + type = character_event + title = travel_events.4024.t + desc = { + desc = travel_events.4024.desc.intro + desc = travel_events.4024.desc.mid + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:foreign_visitor + animation = admiration + } + cooldown = { years = 10 } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain_scope } + } + + # Fanboy back! Become friends :) + option = { + name = travel_events.4024.a + add_piety = minor_piety_gain + custom_tooltip = may_become_friends_tt + scope:foreign_visitor = { + trigger_event = travel_events.4026 + } + stress_impact = { + arrogant = medium_stress_impact_gain + cynical = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = cynical + has_trait = shy + } + } + } + } + # They may be [religion], but they are still [faith] heretics! + option = { + name = travel_events.4024.b + trigger = { + # This should be true anyway, but just in case + faith != scope:foreign_visitor.faith + } + show_as_tooltip = { + duel = { + skill = learning + target = scope:foreign_visitor + 50 = { # You win the debate + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + add_piety = medium_piety_gain + } + } + 50 = { # You lose the debate + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = root + add_piety = minor_piety_loss + add_stress = minor_stress_gain + } + } + } + } + hidden_effect = { + scope:foreign_visitor = { + trigger_event = travel_events.4027 + } + } + stress_impact = { + zealous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = humble + } + } + } + } + + # Give them your chaplain as a gift + option = { + name = travel_events.4024.c + trigger = { scope:chaplain_scope = { is_landed = no } is_available_allow_travelling = yes } + scope:foreign_visitor = { + send_interface_toast = { + title = travel.gift_from_john + left_icon = scope:foreign_visitor + right_icon = scope:chaplain_scope + add_courtier = scope:chaplain_scope + root.current_travel_plan = { + add_companion = scope:chaplain_scope + } + add_opinion = { + modifier = gift_opinion + opinion = 25 + target = scope:prester_john_scope + } + } + } + stress_impact = { + zealous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = just + } + } + } + } + + # That's cool I guess. Moving on + option = { + name = travel_events.4024.d + scope:foreign_visitor = { + send_interface_toast = { + title = travel.turned_away_from_john + left_icon = scope:foreign_visitor + right_icon = scope:prester_john_scope + add_prestige = minor_prestige_loss + add_opinion = { + modifier = insulted_opinion + opinion = -20 + target = scope:prester_john_scope + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + curious = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = curious + has_trait = gregarious + } + } + } + } +} + +# Prester John encouraged to to take up the sword against heretics +travel_events.4025 = { + type = character_event + title = travel_events.4025.t + desc = { + desc = travel_events.4024.desc.intro + desc = travel_events.4025.desc.mid + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:foreign_visitor + animation = personality_bold + } + cooldown = { years = 10 } + + # Heretic bashing time + option = { + name = travel_events.4025.a + add_trait = holy_warrior + if = { + limit = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + if = { + limit = { is_male = yes } + give_nickname = nick_prester_john + } + else = { + give_nickname = nick_prester_joan + } + } + every_neighboring_and_across_water_top_liege_realm = { + custom = travel_events.4025.different_religion_neighbors_and_vassals + limit = { + holder.religion != root.religion + } + holder = { + add_opinion = { + modifier = insult_opinion + opinion = -25 + target = root + } + } + } + #Hidden because the above tooltip should inform you + hidden_effect = { + every_vassal = { + limit = { + religion != root.religion + } + add_opinion = { + modifier = insult_opinion + opinion = -25 + target = root + } + } + } + stress_impact = { + zealous = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + cynical = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = cynical + has_trait = gregarious + } + } + } + } + # No + option = { + name = travel_events.4025.b + scope:foreign_visitor = { + send_interface_toast = { + title = travel.visitor_rejected_me + left_icon = scope:foreign_visitor + right_icon = scope:prester_john_scope + add_opinion = { + modifier = disappointed_opinion + opinion = -25 + target = root + } + } + } + stress_impact = { + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 100 + has_trait = shy + } + } + } +} + +# Prester John wants to be penpals! +travel_events.4026 = { + type = character_event + title = travel_events.4026.t + desc = travel_events.4026.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:prester_john_scope + animation = admiration + } + cooldown = { years = 10 } + + # Fren time + option = { + name = travel_events.4026.a + scope:prester_john_scope = { + send_interface_toast = { + title = travel.became_friends_with_visitor + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + set_relation_friend = { + reason = friend_respected_other_religion + target = scope:foreign_visitor + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = shy + } + } + } + # No frens + option = { + name = travel_events.4026.b + scope:prester_john_scope = { + send_interface_toast = { + title = travel.visitor_rejected_friendship + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + add_opinion = { + modifier = disappointed_opinion + opinion = -25 + target = root + } + } + } + stress_impact = { + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 100 + has_trait = shy + } + } + } +} + +# Prester John wants to debate you +travel_events.4027 = { + type = character_event + title = travel_events.4027.t + desc = travel_events.4027.desc + theme = travel + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:prester_john_scope + animation = anger + } + cooldown = { years = 10 } + + # Debate me bro + option = { + name = travel_events.4027.a + duel = { + skill = learning + target = scope:prester_john_scope + 50 = { # You win the debate + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + add_piety = medium_piety_gain + } + scope:prester_john_scope = { + send_interface_toast = { + title = travel.debate_lost + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + add_piety = minor_piety_loss + add_stress = minor_stress_gain + } + } + } + 50 = { # You lose the debate + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + add_piety = minor_piety_loss + add_stress = minor_stress_gain + scope:prester_john_scope = { + send_interface_toast = { + title = travel.debate_won + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + add_piety = medium_piety_gain + } + } + } + } + } + } +} + +# You come across a runestone! +travel_events.4028 = { + type = character_event + title = travel_events.4028.t + desc = travel_events.4028.desc + theme = travel + left_portrait = { + character = root + camera = camera_event_left_away_3_4 + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = anger + } + animation = survey + } + cooldown = { years = 10 } + override_background = { reference = fp1_runestone } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + # You're not used to Runestones + NOT = { root.culture = { has_cultural_parameter = has_access_to_runestones } } + # This place do be having Runestones tho + location.county.culture = { has_cultural_parameter = has_access_to_runestones } + # You'd be unlikely to understand the written language on the stone + NOT = { knows_language_of_culture = location.county.culture } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + } + # Attempt to read the runestone + option = { + name = travel_events.4028.a + duel = { + skill = learning + value = high_skill_rating + 50 = { # You read the runestone + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.read_runestone + left_icon = root + add_learning_lifestyle_xp = major_lifestyle_xp + } + } + 50 = { # You fail + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.failed_to_read_runestone + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + scholar = medium_stress_impact_loss + dull = medium_stress_impact_gain + lazy = medium_stress_impact_gain + zealous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = dull + has_trait = lazy + has_trait = zealous + has_trait = sadistic + } + } + } + } + + # Topple the stone! + option = { + name = travel_events.4028.b + if = { + limit = { faith_is_aniconic_trigger = yes } + add_piety = medium_piety_gain + } + else = { + add_piety = minor_piety_gain + } + stress_impact = { + sadistic = minor_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + craven = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = craven + has_trait = just + has_trait = forgiving + } + } + } + } + + # Just pass by + option = { + name = travel_events.4028.c + stress_impact = { + curious = minor_stress_impact_gain + zealous = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + scholar = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = curious + has_trait = zealous + has_trait = sadistic + has_trait = scholar + } + } + } + } +} + +# You come across dimwit strung up on a post +travel_events.4029 = { + type = character_event + title = travel_events.4029.t + desc = { + desc = travel_events.4029.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = travel_events.4029.desc.mid.christian + } + desc = travel_events.4029.desc.mid + } + desc = travel_events.4029.desc.outro + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = sadistic + } + animation = admiration + } + triggered_animation = { + trigger = { + has_trait = callous + } + animation = personality_rational + } + animation = shock + } + right_portrait = { + character = scope:brainless_character + animation = pain + } + override_background = { reference = battlefield } + cooldown = { years = 30 } + trigger = { + static_group_filter = { + group = wizard_of_oz_group + match = 0.1 + } + is_available_travelling = yes + is_playable_character = yes + root.location = { terrain = farmlands } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + create_character = { + template = brainless_character_template + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = brainless_character + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:brainless_character = { + give_nickname = nick_the_thoughtless + random_list = { + 50 = { + set_to_lowborn = yes + } + 50 = { # They're someone important! + add_gold = 50 + } + } + } + } + } + # Cut them down from there + option = { + name = travel_events.4029.a + custom_tooltip = brainless_may_reward_you_tt + trigger_event = travel_events.4030 + stress_impact = { + compassionate = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = callous + has_trait = sadistic + has_trait = arbitrary + } + } + } + } + + # Cut them down.... and imprison them! + option = { + name = travel_events.4029.b + rightfully_imprison_character_effect = { + TARGET = scope:brainless_character + IMPRISONER = root + } + add_piety = minor_piety_gain + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + } + } + } + } + + # Just pass by + option = { + name = travel_events.4029.c + scope:brainless_character = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + } + } + } + } + after = { + scope:brainless_character = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +travel_events.4030 = { + type = character_event + title = travel_events.4030.t + desc = { + desc = travel_events.4030.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:brainless_character = { + is_lowborn = yes + } + } + desc = travel_events.4030.desc.mid.lowborn + } + desc = travel_events.4030.desc.mid.noble + } + desc = travel_events.4030.desc.outro + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:brainless_character + animation = personality_forgiving + } + cooldown = { years = 10 } + weight_multiplier = { + base = 1 + modifier = { + involved_activity = { + has_activity_type = activity_pilgrimage + } + factor = 0.5 + } + } + # Welcome them to your entourage + option = { + name = travel_events.4030.a + add_courtier = scope:brainless_character + root.current_travel_plan = { + add_companion = scope:brainless_character + } + scope:brainless_character = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + shy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = shy + has_trait = paranoid + has_trait = greedy + } + } + } + } + + # Take their reward + option = { + name = travel_events.4030.b + if = { + limit = { + scope:brainless_character = { is_lowborn = yes } + } + add_gold = tiny_gold_value + } + else = { + add_gold = minor_gold_value + } + add_hook = { + type = favor_hook + target = scope:brainless_character + } + if = { + limit = { + NOT = { # We currently don't have any doctrines that do this, but good to future-proof + root.faith = { trait_is_virtue = greedy } + } + } + add_piety = minor_piety_loss + } + stress_impact = { + humble = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = generous + } + } + } + } + + # Let them go without a reward + option = { + name = travel_events.4030.c + add_piety = medium_piety_gain + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + } + } + after = { + if = { + limit = { + is_ai = yes + scope:brainless_character = { + is_alive = yes + NOT = { is_courtier_of = root } + } + } + scope:brainless_character = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +# You come across a knight stuck in his armour +travel_events.4031 = { + type = character_event + title = travel_events.4031.t + desc = { + desc = travel_events.4031.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + desc = travel_events.4031.desc.mid.callous + } + desc = travel_events.4031.desc.mid + } + desc = travel_events.4031.desc.outro + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + } + } + animation = laugh + } + animation = shock + } + right_portrait = { + character = scope:heartless_knight_scope + animation = rage + } + cooldown = { years = 30 } + trigger = { + static_group_filter = { + group = wizard_of_oz_group + match = 0.1 + } + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + is_valid_for_east_asian_events_trigger = no + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = heartless_knight + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = heartless_knight_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:heartless_knight_scope = { + if = { + limit = { root = { is_ai = no } } + give_nickname = nick_the_heartless + } + add_character_flag = single_combat_duel_armor + } + } + } + # Help them unsuit, for a reward + option = { + name = travel_events.4031.a + add_gold = { + value = minor_gold_value + max = 30 + } + add_hook = { + type = favor_hook + target = scope:heartless_knight_scope + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = generous + } + } + } + } + + # Help them unsuit, for their loyalty + option = { + name = travel_events.4031.b + add_courtier = scope:heartless_knight_scope + root.current_travel_plan = { + add_companion = scope:heartless_knight_scope + } + scope:heartless_knight_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + if = { + limit = { + NOT = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = root + } + } + } + custom_tooltip = ignores_gender_army_rules_tt + add_character_modifier = ignores_gender_army_rules + } + } + if = { + limit = { + can_employ_court_position_type = champion_court_position + } + court_position_grant_effect = { + CANDIDATE = scope:heartless_knight_scope + EMPLOYER = root + POS = champion + } + } + else_if = { + limit = { + can_employ_court_position_type = bodyguard_court_position + } + court_position_grant_effect = { + CANDIDATE = scope:heartless_knight_scope + EMPLOYER = root + POS = bodyguard + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = shy + has_trait = paranoid + has_trait = greedy + } + } + } + } + + # Cackle at them and walk away + option = { + name = travel_events.4031.c + add_prestige = miniscule_prestige_gain + if = { + limit = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + else = { + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + has_trait = greedy + } + } + } + } + after = { + hidden_effect = { + scope:heartless_knight_scope = { + remove_character_flag = single_combat_duel_armor + silent_disappearance_ai_if_created_effect = yes + } + } + } +} + +# You come across a noble being assaulted by a random animal +travel_events.4032 = { + type = character_event + title = travel_events.4032.t + desc = travel_events.4032.desc + theme = travel + left_portrait = { + character = root + scripted_animation = duel_wield_weapon + } + right_portrait = { + character = scope:cowardly_knight_scope + animation = fear + } + lower_right_portrait = scope:entourage_helper + cooldown = { years = 30 } + trigger = { + static_group_filter = { + group = wizard_of_oz_group + match = 0.1 + } + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + current_travel_plan = { + any_entourage_character = { + this != root + is_ai = yes + is_adult = yes + is_healthy = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_high } + hidden_effect = { + select_local_animal_effect = { TYPE = prowling } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + create_character = { + template = cowardly_knight + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = cowardly_knight_scope + after_creation = { + add_character_flag = created + } + } + scope:cowardly_knight_scope ?= { + give_nickname = nick_the_craven + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + current_travel_plan = { + ordered_entourage_character = { + order_by = prowess + limit = { + this != root + is_ai = yes + is_adult = yes + is_healthy = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + save_scope_as = entourage_helper + } + } + } + } + + # Entourage member helps them + option = { + name = travel_events.4032.b + #Lower personal risk, a bit lower reward + scope:entourage_helper = { + duel = { + skill = prowess + value = high_skill_rating + 50 = { # Your companion defeats the lion + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + if = { + limit = { + accolade ?= { is_accolade_active = yes } + } + accolade = { add_glory = minor_glory_gain } + } + root = { + send_interface_toast = { + title = travel.beat_back_lion + left_icon = root + add_prestige = medium_prestige_gain + } + } + } + 50 = { # Your companion is mauled by a lion + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + if = { + limit = { + accolade ?= { is_accolade_active = yes } + } + accolade = { add_glory = minor_glory_gain } + } + send_interface_toast = { + title = travel.mauled_by_animal + left_icon = root + increase_wounds_effect = { REASON = wild_animal } + scope:cowardly_knight_scope = { + death = { + death_reason = death_wild_animal + } + } + } + } + } + } + if = { #Always the pious thing to do, even if you failed. + limit = { has_pious_pilgrimage_type_trigger = yes } + pious_type_option_effect = yes + + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + brave = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = sadistic + } + modifier = { + add = -25 + has_trait = brave + } + } + } + # Help them yourself + option = { + name = travel_events.4032.a + duel = { + skill = prowess + value = high_skill_rating + 50 = { # You fight back the lion + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.beat_back_lion + left_icon = root + add_prestige = medium_prestige_gain + add_courtier = scope:cowardly_knight_scope + root.current_travel_plan = { + add_companion = scope:cowardly_knight_scope + } + scope:cowardly_knight_scope = { + add_opinion = { + modifier = feast_saved_my_life_opinion + target = root + } + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + if = { + limit = { + NOT = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = root + } + } + } + custom_tooltip = ignores_gender_army_rules_tt + add_character_modifier = ignores_gender_army_rules + } + } + } + + } + 50 = { # You are mauled by a lion + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.mauled_by_animal + left_icon = root + increase_wounds_effect = { REASON = wild_animal } + scope:cowardly_knight_scope = { + death = { + death_reason = death_wild_animal + } + } + } + } + } + if = { #Always the pious thing to do, even if you failed. + limit = { has_pious_pilgrimage_type_trigger = yes } + pious_type_option_effect = yes + + } + stress_impact = { + craven = major_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 3 + has_trait = brave + } + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = craven + } + } + } + } + + # Just walk away + option = { + name = travel_events.4032.c + scope:cowardly_knight_scope = { + death = { + death_reason = death_wild_animal + } + } + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + craven = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + NOR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0.25 + OR = { + has_trait = compassionate + has_trait = just + has_trait = brave + } + } + } + } + after = { + scope:cowardly_knight_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# A witch who strangely isn't being burned +travel_events.4033 = { + type = character_event + title = travel_events.4033.t + desc = { + desc = travel_events.4033.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = travel_events.4033.desc.mid.zealous + } + desc = travel_events.4033.desc.mid + } + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = personality_callous + } + animation = personality_rational + } + right_portrait = { + character = scope:witch_scope + animation = personality_compassionate + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_witch_trigger = no + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + faith = { has_doctrine_parameter = witchcraft_accepted } + } + } + OR = { + faith = { has_doctrine_parameter = witchcraft_shunned } + faith = { has_doctrine_parameter = witchcraft_illegal } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = witchy_template + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = witch_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:witch_scope = { + add_trait = witch + } + } + } + # Debate the sinful nature of Witchcraft + option = { + name = travel_events.4033.a + duel = { + skill = learning + target = scope:witch_scope + 5 = { # Critical success: the Witch becomes convinced of their own wickedness and joins you to repent + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + right_icon = scope:witch_scope + add_piety = medium_piety_gain + scope:witch_scope = { + set_character_faith = root.faith + remove_trait = witch + } + add_courtier = scope:witch_scope + root.current_travel_plan = { + add_companion = scope:witch_scope + } + } + } + 45 = { # You convince the peasantry that witchcraft is evil + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + add_piety = medium_piety_gain + } + } + 45 = { # You fail to convince them + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = root + add_piety = minor_piety_loss + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = cynical + has_trait = arrogant + has_trait = impatient + } + } + } + } + + # Teach me to be a Witch! + option = { + name = travel_events.4033.b + trigger = { + NOT = { has_trait = zealous } + OR = { #have a witchy trait + has_trait = cynical + has_trait = deceitful + has_trait = fickle + has_trait = arbitrary + } + } + give_witch_secret_or_trait_effect = yes + add_piety = medium_piety_loss + pay_short_term_gold = { + target = scope:witch_scope + gold = minor_gold_value + } + add_courtier = scope:witch_scope + root.current_travel_plan = { + add_companion = scope:witch_scope + } + set_relation_friend = scope:witch_scope + hidden_effect = { + scope:witch_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + set_variable = { + name = discounted_faith_to_convert_to_var + value = scope:witch_scope.faith + } + } + custom_tooltip = cheaper_to_convert_to_witchy_faith_tt + stress_impact = { + base = medium_stress_impact_gain + cynical = medium_stress_impact_loss + } + ai_chance = { # The AI should never do this + base = 0 + modifier = { # Unless you're cynical/ambitious + add = 50 + has_trait = cynical + } + } + } + + # Pass them by + option = { + name = travel_events.4033.c + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + # Have them burned + option = { + name = travel_events.4033.d + trigger = { + NOT = { has_trait = cynical } + } + duel = { + skill = diplomacy + value = medium_skill_rating + 50 = { # You burn the witch + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.burned_witch + left_icon = root + add_piety = medium_piety_gain + scope:witch_scope = { + death = { + killer = root + death_reason = death_burned + } + } + } + hidden_effect = { # Get a cool witchy artifact! + random_list = { + 95 = { + + } + 5 = { + trigger_event = travel_events.4034 + } + } + } + } + 50 = { # You get beaten up by the locals + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.beaten_by_locals + left_icon = root + add_prestige = medium_prestige_loss + } + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + zealous = major_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = calm + } + } + } + } + + after = { + scope:witch_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# A witchy artifact in the ashes +travel_events.4034 = { + type = character_event + title = travel_events.4034.t + desc = { + desc = travel_events.4034.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = var:artifact_is_bones + } + desc = travel_events.4034.desc.mid.bones + } + desc = travel_events.4034.desc.mid + } + desc = travel_events.4034.desc.outro + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + artifact = { + target = scope:witchy_artifact_scope + position = lower_left_portrait + } + override_background = { reference = battlefield } + immediate = { + random_list = { + 10 = { + set_artifact_rarity_famed = yes + create_artifact = { + name = jewelled_slippers + description = jewelled_slippers_description + type = miscellaneous + visuals = small_box + template = witchy_shoes_template + modifier = artifact_monthly_prestige_2_modifier + modifier = artifact_stress_gain_4_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = witchy_artifact_scope + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = witchcraft_book + description = witchcraft_book_description + type = miscellaneous + visuals = book + template = witchy_book_template + modifier = artifact_health_gain_1_modifier + modifier = artifact_learning_per_piety_level_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = witchy_artifact_scope + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = witchy_holy_text_mid + description = witchy_holy_text_mid_description + type = miscellaneous + visuals = book + template = holy_book_template + modifier = artifact_monthly_piety_1_modifier + modifier = artifact_learning_per_piety_level_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = witchy_artifact_scope + } + scope:witchy_artifact_scope = { + set_variable = { + name = relic_religion + value = scope:witch_scope.religion + } + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = immaculate_witchy_bones + description = immaculate_witchy_bones_description + type = miscellaneous + visuals = human_skull + modifier = artifact_dread_gain_mult_2_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = witchy_artifact_scope + } + set_variable = { + name = artifact_is_bones + value = yes + days = 7 + } + } + } + } + # Cool + option = { + name = travel_events.4034.a + } +} + +# You are a witch and you're being harassed by locals +travel_events.4035 = { + type = character_event + title = travel_events.4035.t + desc = { + desc = travel_events.4035.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = travel_events.4035.desc.mid.zealous + } + desc = travel_events.4035.desc.mid + } + desc = travel_events.4035.desc.outro + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = personality_callous + } + animation = personality_rational + } + right_portrait = { + character = scope:zealous_priest_scope + animation = personality_compassionate + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_witch_trigger = yes + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + OR = { + faith = { has_doctrine_parameter = witchcraft_shunned } + faith = { has_doctrine_parameter = witchcraft_illegal } + } + } + } + faith = { has_doctrine_parameter = witchcraft_accepted } + } + immediate = { + create_character = { + template = priest_character_template + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = zealous_priest_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:zealous_priest_scope = { + add_trait = zealous + } + } + } + # Debate the sinful nature of Witchcraft + option = { + name = travel_events.4035.a + duel = { + skill = learning + target = scope:zealous_priest_scope + 5 = { # Critical success: the Witch becomes convinced of their own wickedness and joins you to repent + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + right_icon = scope:zealous_priest_scope + add_piety = medium_piety_gain + scope:zealous_priest_scope = { + set_character_faith = root.faith + add_trait = witch + } + add_courtier = scope:zealous_priest_scope + root.current_travel_plan = { + add_companion = scope:zealous_priest_scope + } + } + } + 45 = { # You convince the peasantry that witchcraft is good actually + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + add_piety = medium_piety_gain + } + } + 45 = { # You fail to convince them + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = root + add_piety = minor_piety_loss + add_stress = minor_stress_gain + increase_wounds_effect = { REASON = burned_witch } + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + cynical = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = cynical + has_trait = arrogant + has_trait = impatient + } + } + } + } + + # I repent my witchy ways! + option = { + name = travel_events.4035.b + remove_witch_secret_or_trait_effect = yes + add_piety = medium_piety_loss + pay_short_term_gold = { + target = scope:zealous_priest_scope + gold = minor_gold_value + } + add_courtier = scope:zealous_priest_scope + root.current_travel_plan = { + add_companion = scope:zealous_priest_scope + } + set_relation_friend = scope:zealous_priest_scope + hidden_effect = { + scope:zealous_priest_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + set_variable = { + name = discounted_faith_to_convert_to_var + value = scope:zealous_priest_scope.faith + } + } + custom_tooltip = cheaper_to_convert_to_priest_faith_tt + stress_impact = { + base = medium_stress_impact_gain + ambitious = minor_stress_impact_loss + cynical = medium_stress_impact_loss + content = major_stress_impact_gain + zealous = massive_stress_impact_gain + } + ai_chance = { # The AI should never do this + base = 0 + modifier = { # Unless you're cynical/ambitious + add = 50 + OR = { + has_trait = cynical + has_trait = ambitious + } + } + modifier = { # Unless you're cynical/ambitious + factor = 0 + OR = { + has_trait = content + has_trait = zealous + } + } + } + } + + # Run away! + option = { + name = travel_events.4035.c + stress_impact = { + zealous = medium_stress_impact_gain + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + # Fight em + option = { + name = travel_events.4035.d + if = { + limit = { + exists = root.current_travel_plan.travel_leader + } + root.current_travel_plan.travel_leader = { + duel = { + skill = prowess + target = scope:zealous_priest_scope + 50 = { # You beat up the witch hater + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + root = { + send_interface_toast = { + title = travel.beat_zealot + left_icon = root + add_piety = medium_piety_gain + add_prestige = minor_prestige_gain + scope:zealous_priest_scope = { + increase_wounds_effect = { + REASON = fight + } + } + } + } + } + 50 = { # You get beaten up by the locals + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + root = { + send_interface_toast = { + title = travel.beaten_by_locals + left_icon = root + prev = { + increase_wounds_effect = { REASON = fight } + } + add_prestige = medium_prestige_loss + } + } + } + } + } + } + else = { + duel = { + skill = prowess + target = scope:zealous_priest_scope + 50 = { # You beat up the witch hater + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + root = { + send_interface_toast = { + title = travel.beat_zealot + left_icon = root + add_piety = medium_piety_gain + add_prestige = minor_prestige_gain + scope:zealous_priest_scope = { + increase_wounds_effect = { + REASON = fight + } + } + } + } + } + 50 = { # You get beaten up by the locals + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + root = { + send_interface_toast = { + title = travel.beaten_by_locals + left_icon = root + prev = { + increase_wounds_effect = { REASON = fight } + } + add_prestige = medium_prestige_loss + } + } + } + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + calm = major_stress_impact_gain + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = calm + has_trait = craven + } + } + } + } + + after = { + scope:zealous_priest_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Caravaneers want to sell you some cool stuff +travel_events.4036 = { + type = character_event + title = travel_events.4036.t + desc = travel_events.4036.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:merchant_character_scope + animation = admiration + } + artifact = { + target = scope:merchant_artifact_scope + position = lower_left_portrait + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location.culture = { + has_cultural_tradition = tradition_caravaneers + } + } + immediate = { + create_character = { + template = generic_peasant_character + location = root.location + culture = root.location.culture + faith = root.location.faith + #Set up the scope + save_scope_as = merchant_character_scope + after_creation = { + add_character_flag = created + } + } + root.location.kingdom = { save_scope_as = kingdom_scope } + scope:merchant_character_scope = { + hidden_effect = { + add_trait = avaricious + random_list = { + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = mysterious_lamp + description = mysterious_lamp_description + type = goblet + visuals = riches + modifier = artifact_monthly_prestige_2_modifier + modifier = artifact_court_grandeur_baseline_add_5_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = mysterious_puzzle + description = mysterious_puzzle_description + type = miscellaneous + visuals = small_box + template = mysterious_puzzle_template + modifier = artifact_learn_language_scheme_phase_duration_add_2_modifier + modifier = artifact_learning_per_stress_level_2_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + } + 5 = { + set_artifact_rarity_famed = yes + create_artifact = { + name = lunchbox + description = lunchbox_description + type = miscellaneous + visuals = small_box + modifier = artifact_negate_health_penalty_add_2_modifier + modifier = artifact_stress_gain_4_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + } + } + } + } + } + # Buy the artifact! + option = { + name = travel_events.4036.a + if = { + limit = { + scope:merchant_artifact_scope = { + rarity = famed + } + } + remove_short_term_gold = major_gold_value + } + else = { + remove_short_term_gold = medium_gold_value + } + scope:merchant_artifact_scope = { set_owner = root } + stress_impact = { + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + # Attempt to steal the artifact + option = { + name = travel_events.4036.b + duel = { + skill = intrigue + value = very_high_skill_rating + 50 = { # You beat up the fisherman + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.stole_artifact + left_icon = root + scope:merchant_artifact_scope = { set_owner = root } + } + } + 50 = { # You get caught and exposed as a dirty thief! + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.caught_red_handed + left_icon = root + increase_wounds_no_death_effect = { REASON = fight } + add_prestige = major_prestige_loss + add_character_modifier = { + modifier = caught_thief_modifier + years = 5 + } + } + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + base = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + craven = medium_stress_impact_gain + generous = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = sadistic + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + has_trait = generous + has_trait = craven + } + } + } + } + # Haggle the price + option = { + name = travel_events.4036.d + duel = { + skill = stewardship + target = scope:merchant_character_scope + 50 = { # You pay a lower price + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.haggled_for_artifact + left_icon = root + scope:merchant_artifact_scope = { set_owner = root } + if = { + limit = { + scope:merchant_artifact_scope = { + rarity = famed + } + } + remove_short_term_gold = medium_gold_value + } + else = { + remove_short_term_gold = minor_gold_value + } + } + } + 50 = { # You pay a higher price + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.failed_to_haggle + left_icon = root + scope:merchant_artifact_scope = { set_owner = root } + if = { + limit = { + scope:merchant_artifact_scope = { + rarity = famed + } + } + remove_short_term_gold = massive_gold_value + } + else = { + remove_short_term_gold = major_gold_value + } + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = deceitful + has_trait = honest + } + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + # Just go by without buying anything + option = { + name = travel_events.4036.c + ai_chance = { + base = 50 + modifier = { + add = 100 + gold <= massive_gold_value + } + } + } + after = { + hidden_effect = { + if = { + limit = { + scope:merchant_artifact_scope.artifact_owner != root + } + destroy_artifact = scope:merchant_artifact_scope + } + scope:merchant_character_scope = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +# You enter a place that is syncretic with your faith +travel_events.4037 = { + type = character_event + title = travel_events.4037.t + desc = travel_events.4037.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fanboy_character_scope + animation = admiration + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location.faith != root.faith + OR = { + AND = { + religion = { is_in_family = rf_eastern } + location.faith = { has_doctrine_parameter = eastern_syncretic_actor_opinion_active } + } + AND = { + faith = { has_doctrine_parameter = unreformed } + location.faith = { has_doctrine_parameter = unreformed_syncretic_actor_opinion_active } + } + AND = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + location.faith = { has_doctrine_parameter = christian_syncretic_actor_opinion_active } + } + AND = { + religion = religion:islam_religion + location.faith = { has_doctrine_parameter = islamic_syncretic_actor_opinion_active } + } + AND = { + religion = religion:judaism_religion + location.faith = { has_doctrine_parameter = jewish_syncretic_actor_opinion_active } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = generic_peasant_character + location = root.location + culture = root.location.culture + faith = root.location.faith + #Set up the scope + save_scope_as = fanboy_character_scope + after_creation = { + add_character_flag = created + } + } + } + # Ah, let me teach you all about our lord and savior + option = { + name = travel_events.4037.a + duel = { + skill = learning + value = medium_skill_rating + 50 = { # You perform a good cermon + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.good_cermon + left_icon = root + add_piety = medium_piety_gain + } + } + 50 = { # You perform a mediocre cermon + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.bad_cermon + left_icon = root + add_piety = minor_piety_gain + } + } + } + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + lazy = medium_stress_impact_gain + shy = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = lazy + has_trait = shy + has_trait = callous + has_trait = sadistic + has_trait = cynical + } + } + } + } + # I'm more interested in hearing about your faith! + option = { + name = travel_events.4037.b + add_courtier = scope:fanboy_character_scope + root.current_travel_plan = { + add_companion = scope:fanboy_character_scope + } + set_relation_friend = { + reason = friend_respected_other_religion + target = scope:fanboy_character_scope + } + hidden_effect = { + scope:fanboy_character_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + set_variable = { + name = discounted_faith_to_convert_to_var + value = scope:fanboy_character_scope.faith + } + } + custom_tooltip = cheaper_to_convert_to_fanboy_faith_tt + stress_impact = { + shy = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + zealous = medium_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = callous + has_trait = sadistic + has_trait = zealous + has_trait = arrogant + } + } + } + } + # Eww go away, syncretic weirdos + option = { + name = travel_events.4037.c + stress_impact = { + base = medium_stress_impact_gain + zealous = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = compassionate + has_trait = arrogant + } + } + } + } + + after = { + scope:fanboy_character_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You enter a province which your faith is syncretic with +travel_events.4038 = { + type = character_event + title = travel_events.4038.t + desc = travel_events.4038.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:zealous_priest_scope + animation = admiration + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + # Make sure this is a church held by a theocratic or lay clergy character + has_holding = yes + has_holding_type = church_holding + barony = { has_wrong_holding_type = no } + # Make sure you don't bother player lay clergy characters + barony.holder = { is_ai = yes } + barony.holder != root + } + OR = { + AND = { + faith = { has_doctrine_parameter = eastern_syncretic_actor_opinion_active } + location.religion = { is_in_family = rf_eastern } + } + AND = { + faith = { has_doctrine_parameter = unreformed_syncretic_actor_opinion_active } + location.faith = { has_doctrine_parameter = unreformed } + } + AND = { + faith = { has_doctrine_parameter = christian_syncretic_actor_opinion_active } + OR = { location.religion = religion:eastern_orthodox_religion location.religion = religion:catholic_religion location.religion = religion:protestant_religion } + } + AND = { + faith = { has_doctrine_parameter = islamic_syncretic_actor_opinion_active } + location.religion = religion:islam_religion + } + AND = { + faith = { has_doctrine_parameter = jewish_syncretic_actor_opinion_active } + location.religion = religion:judaism_religion + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + location.barony.holder = { save_scope_as = zealous_priest_scope } + } + # Let me attend a sermon! + option = { + name = travel_events.4038.a + set_relation_friend = { + reason = friend_respected_other_religion + target = scope:zealous_priest_scope + } + hidden_effect = { + set_variable = { + name = discounted_faith_to_convert_to_var + value = scope:zealous_priest_scope.faith + } + } + custom_tooltip = cheaper_to_convert_to_priest_faith_tt + add_learning_lifestyle_xp = minor_lifestyle_xp + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + stress_impact = { + shy = medium_stress_impact_gain + lazy = medium_stress_impact_gain + cynical = medium_stress_impact_gain + zealous = medium_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = arrogant + has_trait = lazy + has_trait = cynical + has_trait = zealous + has_trait = arrogant + } + } + } + } + # Perhaps they would be interested in our perspective + option = { + name = travel_events.4038.b + duel = { + skill = learning + target = scope:zealous_priest_scope + 50 = { # You perform a good cermon + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.good_cermon + left_icon = root + add_piety = medium_piety_gain + add_learning_lifestyle_perk_points = 1 + } + } + 50 = { # You perform a mediocre cermon + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.bad_cermon + left_icon = root + add_piety = minor_piety_loss + if = { + limit = { + faith = { has_doctrine_parameter = eastern_syncretic_actor_opinion_active } + } + add_character_modifier = { + modifier = offended_eastern_modifier + years = 5 + } + } + else_if = { + limit = { + faith = { has_doctrine_parameter = unreformed_syncretic_actor_opinion_active } + } + add_character_modifier = { + modifier = offended_pagan_modifier + years = 5 + } + } + else_if = { + limit = { + faith = { has_doctrine_parameter = christian_syncretic_actor_opinion_active } + } + add_character_modifier = { + modifier = offended_christian_modifier + years = 5 + } + } + else_if = { + limit = { + faith = { has_doctrine_parameter = islamic_syncretic_actor_opinion_active } + } + add_character_modifier = { + modifier = offended_muslim_modifier + years = 5 + } + } + else_if = { + limit = { + faith = { has_doctrine_parameter = jewish_syncretic_actor_opinion_active } + } + add_character_modifier = { + modifier = offended_jewish_modifier + years = 5 + } + } + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + lazy = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = lazy + has_trait = shy + } + } + } + } + # Eww go away, weirdos + option = { + name = travel_events.4038.c + stress_impact = { + base = medium_stress_impact_gain + zealous = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = compassionate + has_trait = arrogant + } + } + } + } +} + +# You enter a ritual hospitality province and are offered a rest +travel_events.4039 = { + type = character_event + title = travel_events.4039.t + desc = travel_events.4039.desc + theme = travel + left_portrait = { + character = root + animation = stress + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + faith = { NOT = { has_doctrine_parameter = host_honored_guests_active } } + location.faith = { has_doctrine_parameter = host_honored_guests_active } + } + + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + mp_delay_travel_plan = { DAYS = 90 } + } + + # Perhaps a rest for a few days would be nice... + option = { + name = travel_events.4039.a + current_travel_plan = { + delay_travel_plan = { + weeks = 3 + add = yes + } + } + add_stress = medium_stress_loss + add_character_modifier = { + modifier = pampered_by_locals_modifier + years = 5 + } + stress_impact = { + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { # The AI should avoid unnecessary delays + factor = 0 + NOT = { has_trait = lazy } + } + } + } + # No, we *must* keep going! + option = { + name = travel_events.4039.b + stress_impact = { + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = lazy + } + } + } + after = { + mp_resume_travel_plan = yes + } +} + +# You meet a xenophile character who wants to learn about your culture +travel_events.4040 = { + type = character_event + title = travel_events.4040.t + desc = travel_events.4040.desc + theme = travel + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:fanboy_character_scope + animation = ecstasy + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + culture = { NOT = { has_cultural_tradition = tradition_xenophilic } } + location.culture = { has_cultural_tradition = tradition_xenophilic } + NOT = { knows_language_of_culture = root.location.culture } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = loyal_fan_character + location = root.location + culture = root.location.culture + faith = root.location.faith + #Set up the scope + save_scope_as = fanboy_character_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:fanboy_character_scope = { + learn_language_of_culture = root.culture + } + } + } + # My culture *is* kinda great tbh + option = { + name = travel_events.4040.a + add_prestige = minor_prestige_gain + stress_impact = { + arrogant = medium_stress_impact_loss + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + } + } + } + # Come, let's learn about each other! + option = { + name = travel_events.4040.b + trigger = { + can_start_scheme = { + type = learn_language + target_character = scope:fanboy_character_scope + } + } + start_scheme = { + type = learn_language + target_character = scope:fanboy_character_scope + } + custom_tooltip = learn_language_with_bonus_tt + hidden_effect = { + random_scheme = { + type = learn_language + limit = { + scheme_target_character = scope:fanboy_character_scope + } + add_scheme_modifier = { type = xenophile_bonus_modifier } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + shy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = shy + has_trait = arrogant + } + } + } + } + after = { + scope:fanboy_character_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} diff --git a/N3OW/events/yearly_events/bp1_yearly_james.txt b/N3OW/events/yearly_events/bp1_yearly_james.txt new file mode 100644 index 00000000..379ea4fa --- /dev/null +++ b/N3OW/events/yearly_events/bp1_yearly_james.txt @@ -0,0 +1,8355 @@ +#Events run from the bp1_yearly_pulse on_action +namespace = bp1_yearly + +# List of events in this file: +# +# 9001-9005 Someone ruins your favourite toy +# +# 9007-9015 doppelganger shenanigans +# 9016 Second-in-line wants to fight for the throne (and your attention) +# 9017 Different faith/culture child is feeling insecure +# + +##################################### +# Destroying toy # +# by James Beaumont # +# 9001 # +##################################### + +bp1_yearly.9001 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9001.t + desc = { + desc = bp1_yearly.9001.opening + #What text we display depends on the relationship to the child + first_valid = { + triggered_desc = { + trigger = { + any_relation = { + type = bully + is_available = yes + } + } + desc = bp1_yearly.9001.desc.bully + } + triggered_desc = { + trigger = { + any_relation = { + type = guardian + is_available = yes + } + } + desc = bp1_yearly.9001.desc.mentor + } + } + } + theme = family + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9001_toy_hater + animation = personality_vengeful + } + + trigger = { + has_dlc_feature = friends_and_foes + NOT = { has_character_flag = had_event_bp1_yearly_9001 } + is_adult = no # Should already be covered, but sanity checks never hurt + NOR = { # Isn't already shy or the opposite + has_trait = shy + has_trait = gregarious + } + OR = { + any_relation = { + type = bully + is_available = yes + } + any_relation = { + type = guardian + is_available = yes + } + } + } + + weight_multiplier = { + base = 1 + + } + + immediate = { + if = { + limit = { + any_relation = { + type = bully + is_available = yes + } + } + random_relation = { # Bullies are slightly rarer, try to get that version of the event if possible + type = bully + limit = { + is_available = yes + } + save_scope_as = bp1_yearly_9001_toy_hater + } + } + else = { + random_relation = { + type = guardian + limit = { + is_available = yes + } + save_scope_as = bp1_yearly_9001_toy_hater + } + } + save_scope_as = bp1_yearly_9001_shy_kid + add_character_flag = had_event_bp1_yearly_9001 + } + + option = { # Throw the toy away with minimal provocation + name = bp1_yearly.9001.a + scope:bp1_yearly_9001_toy_hater = { + progress_towards_rival_effect = { + REASON = rival_threw_away_toy + CHARACTER = scope:bp1_yearly_9001_shy_kid + OPINION = default_rival_opinion + } + } + stress_impact = { + base = minor_stress_impact_gain + pensive = minor_stress_impact_gain + bossy = minor_stress_impact_gain + } + } + + option = { + name = bp1_yearly.9001.b + scope:bp1_yearly_9001_toy_hater = { + trigger_event = { + id = bp1_yearly.9002 + days = 5 + } + } + custom_tooltip = may_lead_to_vengeful + custom_tooltip = may_lead_to_forgiving + custom_tooltip = may_lead_to_shy + } +} + +bp1_yearly.9002 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9001.t + desc = { + desc = bp1_yearly.9002.desc.opening + #What text we display depends on the relationship to the child + first_valid = { + triggered_desc = { + trigger = { + is_adult = no + } + desc = bp1_yearly.9002.desc.bully + } + triggered_desc = { + trigger = { + is_adult = yes + } + desc = bp1_yearly.9002.desc.mentor + } + } + } + theme = family + left_portrait = { + character = scope:bp1_yearly_9001_toy_hater + animation = personality_vengeful + } + right_portrait = { + character = scope:bp1_yearly_9001_shy_kid + animation = fear + } + + weight_multiplier = { + base = 1 + + } + + option = { # Trash the toy! + name = bp1_yearly.9002.a + if = { + limit = { + OR = { # Leave the trait decision to the kid if the kid is a player or they have no guardian + scope:bp1_yearly_9001_shy_kid = { is_ai = no } + NOT = { + scope:bp1_yearly_9001_shy_kid = { + any_relation = { type = guardian } + } + } + } + } + scope:bp1_yearly_9001_shy_kid = { + trigger_event = { + id = bp1_yearly.9004 # End event, kid can choose to get one of two traits + days = 5 + } + } + } + else_if = { + limit = { # Leave it to the guardian if the current scope is a bully + is_adult = no + } + scope:bp1_yearly_9001_shy_kid = { + random_relation = { + type = guardian + trigger_event = { + id = bp1_yearly.9004 # End event, kid can choose to get one of two traits + days = 5 + } + } + } + } + else = { # Current scope is the guardian + scope:bp1_yearly_9001_shy_kid = { + add_trait = vengeful + create_character_memory = { + type = destroyed_my_toy + participants = { + destroyer = scope:bp1_yearly_9001_toy_hater + } + } + } + } + progress_towards_rival_effect = { + REASON = rival_threw_away_toy + CHARACTER = scope:bp1_yearly_9001_shy_kid + OPINION = default_rival_opinion + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 30 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + option = { # Leave them alone + name = bp1_yearly.9002.b + if = { + limit = { + OR = { # Leave the trait decision to the kid if the kid is a player or they have no guardian + scope:bp1_yearly_9001_shy_kid = { is_ai = no } + NOT = { + scope:bp1_yearly_9001_shy_kid = { + any_relation = { type = guardian } + } + } + } + } + scope:bp1_yearly_9001_shy_kid = { + trigger_event = { + id = bp1_yearly.9003 # End event, kid can choose to get one of two traits + days = 5 + } + } + } + else_if = { + limit = { # Leave it to the guardian if the current scope is a bully + is_adult = no + } + scope:bp1_yearly_9001_shy_kid = { + random_relation = { + type = guardian + trigger_event = { + id = bp1_yearly.9003 # End event, kid can choose to get one of two traits + days = 5 + } + } + } + } + else = { # Current scope is the guardian + scope:bp1_yearly_9001_shy_kid = { + add_trait = shy + } + } + stress_impact = { + diligent = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + bossy = minor_stress_impact_gain + } + ai_chance = { + base = 30 + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = sadistic + has_trait = callous + has_trait = vengeful + has_trait = bossy + } + } + } + } + + option = { # Leave them alone, but teach them the importance of forgiveness + name = bp1_yearly.9002.c + trigger = { + scope:bp1_yearly_9001_shy_kid = { is_ai = yes } + is_adult = yes + } + scope:bp1_yearly_9001_shy_kid = { add_trait = forgiving } + stress_impact = { + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + bossy = minor_stress_impact_gain + } + ai_chance = { + base = 30 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = vengeful + has_trait = bossy + } + } + } + } +} + +bp1_yearly.9003 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { is_adult = no } + desc = bp1_yearly.9003.desc.child + } + triggered_desc = { + trigger = { is_adult = yes } + desc = bp1_yearly.9003.desc.mentor + } + } + } + theme = family + left_portrait = { + character = scope:bp1_yearly_9001_shy_kid + animation = grief + } + right_portrait = { + character = scope:bp1_yearly_9001_toy_hater + animation = schadenfreude + } + + option = { # I've learned that people are nice sometimes + name = { + trigger = { is_adult = no } + text = bp1_yearly.9003.a.child + } + name = { + trigger = { is_adult = yes } + text = bp1_yearly.9003.a.mentor + } + scope:bp1_yearly_9001_shy_kid = { add_trait = compassionate } + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9001_toy_hater + OPINION = 0 + REASON = friend_not_destroy_toy + } + ai_chance = { + base = 10 + } + } + + option = { # I don't need people anymore! + name = { + trigger = { is_adult = no } + text = bp1_yearly.9003.b.child + } + name = { + trigger = { is_adult = no } + text = bp1_yearly.9003.b.mentor + } + scope:bp1_yearly_9001_shy_kid = { add_trait = shy } + ai_chance = { + base = 10 + } + } +} + +bp1_yearly.9004 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9004.t + desc = bp1_yearly.9004.desc + theme = family + left_portrait = { + character = scope:bp1_yearly_9001_shy_kid + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9001_toy_hater + animation = ecstasy + } + + option = { # I will never forgive them! + name = bp1_yearly.9004.a + scope:bp1_yearly_9001_shy_kid = { + add_trait = vengeful + # Set up follow-up + create_character_memory = { + type = destroyed_my_toy + participants = { + destroyer = scope:bp1_yearly_9001_toy_hater + } + } + } + ai_chance = { + base = 10 + } + } + + option = { # I forgive them for what they did + name = bp1_yearly.9004.b + scope:bp1_yearly_9001_shy_kid = { + add_trait = forgiving + } + stress_impact = { + base = major_stress_impact_gain + bossy = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # I'll never talk to anyone again! + name = bp1_yearly.9004.c + scope:bp1_yearly_9001_shy_kid = { + add_trait = shy + } + stress_impact = { + base = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } +} + +bp1_yearly.9005 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9005.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9001_toy_hater = { + is_imprisoned_by = root + } + } + desc = bp1_yearly.9005.desc.imprisoned + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9001_toy_hater = { + is_foreign_court_or_pool_guest_of = root + } + } + desc = bp1_yearly.9005.desc.guest + } + } + desc = bp1_yearly.9005.desc.outro + } + theme = family + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:bp1_yearly_9001_toy_hater + animation = fear + } + + trigger = { + any_memory = { + memory_type = destroyed_my_toy + memory_participant:destroyer = { + is_available_ai_adult = yes + OR = { + is_imprisoned_by = root + is_foreign_court_or_pool_guest_of = root + } + } + } + NOT = { + any_memory = { + memory_type = avenged_my_toy + } + } + is_available_adult = yes + NOT = { + has_trait = forgiving + } + } + + immediate = { + random_memory = { + memory_type = destroyed_my_toy + save_scope_as = destroyed_toy_memory + memory_participant:destroyer = { save_scope_as = bp1_yearly_9001_toy_hater } + } + } + + option = { # Time for revenge! + name = bp1_yearly.9005.a + scope:bp1_yearly_9001_toy_hater = { + random_list = { + 10 = { add_trait = one_legged } + 10 = { apply_maimed_trait_and_modifier_effect = yes } + 10 = { + modifier = { # I won't go for the eyes if people think it's virtuous + factor = 0.5 + faith = { trait_is_virtue = one_eyed } + } + add_trait = one_eyed + } + } + } + if = { + limit = { + NOT = { + has_relation_rival = scope:bp1_yearly_9001_toy_hater + } + } + set_relation_rival = { + target = scope:bp1_yearly_9001_toy_hater + reason = rival_toy_destruction + } + } + else = { + set_relation_nemesis = { + target = scope:bp1_yearly_9001_toy_hater + reason = rival_toy_destruction + copy_reason = rival + } + } + create_character_memory = { + type = avenged_my_toy + participants = { + destroyer = scope:bp1_yearly_9001_toy_hater + } + } + stress_impact = { + compassionate = major_stress_impact_gain + vengeful = medium_stress_impact_loss + just = minor_stress_impact_gain + wrathful = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0.5 + OR = { + has_trait = compassionate + has_trait = just + } + } + } + } + + option = { # I will literally become a murderer for this childhood trauma + name = bp1_yearly.9005.b + trigger = { + has_relation_rival = scope:bp1_yearly_9001_toy_hater + scope:bp1_yearly_9001_toy_hater = { + is_imprisoned_by = root + } + } + scope:bp1_yearly_9001_toy_hater = { + death = { + killer = root + death_reason = death_murder + } + } + create_character_memory = { + type = avenged_my_toy + participants = { + destroyer = scope:bp1_yearly_9001_toy_hater + } + } + stress_impact = { + compassionate = major_stress_impact_gain + vengeful = medium_stress_impact_loss + just = major_stress_impact_gain + wrathful = medium_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + NOT = { has_trait = wrathful } + OR = { + has_trait = compassionate + has_trait = just + } + } + } + } + + option = { # Turn the other cheek like a beta + name = bp1_yearly.9005.c + destroy_character_memory = scope:destroyed_toy_memory + stress_impact = { + vengeful = massive_stress_impact_gain + } + ai_chance = { + base = 0 + } + } +} + +############################################ +#### Becoming friends over a common sin #### +############################################ + +scripted_trigger bp1_yearly_9006_both_have_same_sin = { + faith = { trait_is_sin = $SINFUL_TRAIT$ } + $SINFUL_COURTIER$.faith = { trait_is_sin = $SINFUL_TRAIT$ } + has_trait = $SINFUL_TRAIT$ + $SINFUL_COURTIER$ = { has_trait = $SINFUL_TRAIT$ } +} + +# You and a courtier bond over sin +bp1_yearly.9006 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9006.t + desc = { + desc = bp1_yearly.9006.desc.intro + first_valid = { + triggered_desc = { + trigger = { + # You both love sex + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = lustful + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.lustful + } + triggered_desc = { + trigger = { + # You're both closet foodies + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = gluttonous + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.gluttonous + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = vengeful + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.vengeful + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = sadistic + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.sadistic + } + triggered_desc = { + trigger = { + # You're both nerds in a religion of himbos + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = craven + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.craven + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = arbitrary + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.arbitrary + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = deceitful + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.deceitful + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = chaste + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.chaste + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = greedy + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.greedy + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = wrathful + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.wrathful + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = cynical + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.cynical + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = ambitious + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.ambitious + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = shy + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.shy + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = callous + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.callous + } + desc = bp1_yearly.9006.desc.generic + } + desc = bp1_yearly.9006.desc.outro + } + theme = crown + override_background = { reference = corridor_day } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9006_sinful_courtier + animation = admiration + } + + trigger = { + has_dlc_feature = friends_and_foes + num_sinful_traits >= 1 + is_valid_for_narrow_yearly_events_adult = yes + OR = { + liege= { + any_vassal = { + this != root + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + } + any_vassal = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + any_courtier = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + } + } + + immediate = { + if = { + limit = { + has_trait = craven + } + select_local_animal_effect = { TYPE = any } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + if = { + limit = { + liege = { + any_vassal = { + this != root + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + } + } + liege = { + random_vassal = { + limit = { + this != root + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + save_scope_as = bp1_yearly_9006_sinful_courtier + } + } + } + else_if = { + limit = { + any_vassal = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + highest_held_title_tier > 1 # Barons are barely people + has_same_sinful_trait = root + } + } + random_vassal = { + limit = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + highest_held_title_tier > 1 + has_same_sinful_trait = root + } + save_scope_as = bp1_yearly_9006_sinful_courtier + } + } + else_if = { + limit = { + any_vassal = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + } + random_vassal = { + limit = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + save_scope_as = bp1_yearly_9006_sinful_courtier + } + } + else_if = { + limit = { + any_courtier = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + } + random_courtier = { + limit = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + save_scope_as = bp1_yearly_9006_sinful_courtier + } + } + } + + option = { + name = bp1_yearly.9006.a + if = { + limit = { + opinion = { + target = scope:bp1_yearly_9006_sinful_courtier + value >= -20 + } + } + set_relation_friend = { reason = friend_bonded_over_sins target = scope:bp1_yearly_9006_sinful_courtier } + } + else = { + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9006_sinful_courtier + OPINION = default_friend_opinion + REASON = friend_bonded_over_sins + } + } + add_piety = medium_piety_loss + stress_impact = { + zealous = massive_stress_impact_gain + paranoid = massive_stress_impact_gain + } + if = { + limit = { + has_trait = shy + scope:bp1_yearly_9006_sinful_courtier = { + NOT = { + has_trait = shy + } + } + } + stress_impact = { + shy = massive_stress_impact_gain + } + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = paranoid + AND = { + has_trait = shy + scope:bp1_yearly_9006_sinful_courtier = { + NOT = { + has_trait = shy + } + } + } + } + } + } + } + + option = { + name = bp1_yearly.9006.b + add_piety = minor_piety_gain + stress_impact = { + base = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = gregarious + } + } + } + } +} + +############################## +#### doppelganger peasant #### +############################## +# You find the peasant on the street +bp1_yearly.9007 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9007.t + desc = bp1_yearly.9007.desc + theme = crown + override_background = market + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = beg + triggered_outfit = { + remove_default_outfit = no + outfit_tags = { beggar_rags } + } + } + + trigger = { + has_dlc_feature = friends_and_foes + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9007 } + #Disabling the story for landless + is_landless_adventurer = no + is_landless_administrative = no + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = eccentric + } + } + + immediate = { + create_character = { + template = bp1_doppelganger_template + dynasty = none + location = root.capital_province + save_scope_as = bp1_yearly_9007_doppelganger + } + scope:bp1_yearly_9007_doppelganger = { + add_character_flag = blocked_from_leaving + } + } + + option = { # They should join me at court! + trigger = { is_landed = yes } + name = bp1_yearly.9007.a + add_courtier = scope:bp1_yearly_9007_doppelganger + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9007_doppelganger + OPINION = default_friend_opinion + REASON = friend_curiously_similar + } + # Set up follow-up + hidden_effect = { + set_variable = { + name = my_doppelganger + value = scope:bp1_yearly_9007_doppelganger + } + } + create_story = story_doppelganger + random_owned_story = { + type = story_doppelganger + set_variable = { + name = doppelganger_character + value = scope:bp1_yearly_9007_doppelganger + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + eccentric = medium_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { + name = bp1_yearly.9007.b + trigger = { + has_trait = sadistic + } + unknown_murder_effect = { VICTIM = scope:bp1_yearly_9007_doppelganger MURDERER = root REASON = death_murder } + stress_impact = { + compassionate = massive_stress_impact_gain + lustful = medium_stress_impact_gain + calm = medium_stress_impact_gain + just = major_stress_impact_gain + arrogant = medium_stress_impact_loss + wrathful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { + name = bp1_yearly.9007.c + scope:bp1_yearly_9007_doppelganger = { + silent_disappearance_effect = yes + } + stress_impact = { + eccentric = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + after = { + add_character_flag = had_event_bp1_yearly_9007 + create_character_memory = { + type = found_my_clone + participants = { + doppelganger = scope:bp1_yearly_9007_doppelganger + } + } + } +} + +# The peasant proposes a lifestyle swap for fun +bp1_yearly.9008 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9008.t + desc = bp1_yearly.9008.desc + theme = family + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = ecstasy + } + + trigger = { + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9008 } + exists = var:my_doppelganger + var:my_doppelganger = { is_available_ai_adult = yes } + NOR = { + has_relation_nemesis = var:my_doppelganger + has_relation_rival = var:my_doppelganger + } + } + + immediate = { + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + } + + option = { # Go ahead with it + name = bp1_yearly.9008.a + set_relation_best_friend = { reason = best_friend_switch_places copy_reason = friend target = scope:bp1_yearly_9007_doppelganger } + add_character_modifier = { + modifier = bp1_living_as_peasant_modifier + years = 5 + } + stress_impact = { + arrogant = massive_stress_impact_gain + ambitious = major_stress_impact_gain + diligent = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + honest = minor_stress_impact_gain + lazy = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Refuse + name = bp1_yearly.9008.b + stress_impact = { + trusting = massive_stress_impact_gain + humble = medium_stress_impact_gain + content = medium_stress_impact_gain + temperate = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + after = { add_character_flag = had_event_bp1_yearly_9008 } +} + +# The doppelganger is found sleeping with your spouse or lover +bp1_yearly.9009 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9009.t + desc = { + desc = bp1_yearly.9009.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9009_lover = { has_trait = lustful } + } + desc = bp1_yearly.9009.desc.lustful + } + desc = bp1_yearly.9009.desc + } + } + theme = family + override_background = { reference = bedchamber } + left_portrait = { + character = scope:bp1_yearly_9009_lover + animation = shock + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = shock + } + lower_left_portrait = { + character = root + animation = shock + } + + trigger = { + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9009 } + exists = var:my_doppelganger + var:my_doppelganger = { is_available_ai_adult = yes } + OR = { + any_relation = { + type = lover + save_temporary_scope_as = lover_1_scope + is_available_ai_adult = yes + NOT = { has_trait = pregnant } + NOT = { scope:lover_1_scope = root.var:my_doppelganger } + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:lover_1_scope + CHARACTER_2 = root.var:my_doppelganger + } + } + any_spouse = { + save_temporary_scope_as = spouse_1_scope + is_available_ai_adult = yes + NOT = { has_trait = pregnant } + NOT = { scope:spouse_1_scope = root.var:my_doppelganger } + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:spouse_1_scope + CHARACTER_2 = root.var:my_doppelganger + } + } + } + } + + immediate = { + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + if = { + limit = { + any_relation = { + type = lover + save_temporary_scope_as = lover_1_scope + is_available_ai_adult = yes + NOT = { has_trait = pregnant } + scope:lover_1_scope != root.var:my_doppelganger + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:lover_1_scope + CHARACTER_2 = root.var:my_doppelganger + } + } + } + random_relation = { + type = lover + limit = { + save_temporary_scope_as = lover_1_scope + is_available_ai_adult = yes + NOT = { has_trait = pregnant } + scope:lover_1_scope != root.var:my_doppelganger + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:lover_1_scope + CHARACTER_2 = root.var:my_doppelganger + } + } + save_scope_as = bp1_yearly_9009_lover + } + } + else = { + random_spouse = { + limit = { + save_temporary_scope_as = spouse_1_scope + is_available_ai_adult = yes + NOT = { has_trait = pregnant } + scope:spouse_1_scope != root.var:my_doppelganger + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:spouse_1_scope + CHARACTER_2 = root.var:my_doppelganger + } + } + save_scope_as = bp1_yearly_9009_lover + } + } + scope:bp1_yearly_9007_doppelganger = { + set_relation_lover = { reason = lover_doppelganger_cucked target = scope:bp1_yearly_9009_lover involved_character = root } + hidden_effect = { + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9009_lover + PREGNANCY_CHANCE = 50 + } + } + } + create_character_memory = { + type = spouse_committed_adultery + participants = { + spouse = scope:bp1_yearly_9009_lover + adulterer = scope:bp1_yearly_9007_doppelganger + } + } + scope:bp1_yearly_9009_lover = { + add_character_flag = is_naked + } + scope:bp1_yearly_9007_doppelganger = { + add_character_flag = is_naked + } + } + + option = { # Break it off with both of them + name = bp1_yearly.9009.a + if = { + limit = { + has_relation_best_friend = scope:bp1_yearly_9007_doppelganger + } + remove_relation_best_friend = scope:bp1_yearly_9007_doppelganger + } + else_if = { + limit = { + has_relation_friend = scope:bp1_yearly_9007_doppelganger + } + remove_relation_friend = scope:bp1_yearly_9007_doppelganger + } + if = { + limit = { + has_relation_lover = scope:bp1_yearly_9007_doppelganger + } + remove_relation_lover = scope:bp1_yearly_9007_doppelganger + } + if = { + limit = { + has_relation_lover = scope:bp1_yearly_9009_lover + } + remove_relation_lover = scope:bp1_yearly_9009_lover + } + progress_towards_rival_effect = { + REASON = rival_slept_with_lover + CHARACTER = scope:bp1_yearly_9007_doppelganger + OPINION = default_rival_opinion + } + progress_towards_rival_effect = { + REASON = rival_slept_with_doppelganger + CHARACTER = scope:bp1_yearly_9009_lover + OPINION = default_rival_opinion + } + stress_impact = { + base = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Have the doppelganger imprisoned + name = bp1_yearly.9009.b + rightfully_imprison_character_effect = { + TARGET = scope:bp1_yearly_9007_doppelganger + IMPRISONER = root + } + stress_impact = { + humble = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Let them be + name = bp1_yearly.9009.c + if = { + limit = { accepts_adultery_without_penalty_trigger = no } + stress_impact = { + base = major_stress_impact_gain + diligent = major_stress_impact_gain + arrogant = massive_stress_impact_gain + } + } + ai_chance = { + base = 10 + } + } + + option = { # Become a polycule + name = bp1_yearly.9009.d + trigger = { + accepts_adultery_without_penalty_trigger = yes + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:bp1_yearly_9007_doppelganger + } + } + set_relation_lover = { reason = lover_my_own_clone_now_neither_of_us_will_be_virgins target = scope:bp1_yearly_9007_doppelganger } + if = { + limit = { + NOT = { + has_relation_lover = scope:bp1_yearly_9009_lover + } + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:bp1_yearly_9009_lover + } + } + set_relation_lover = { reason = lover_doppelganger_threesome target = scope:bp1_yearly_9009_lover involved_character = scope:bp1_yearly_9007_doppelganger } + } + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9007_doppelganger + PREGNANCY_CHANCE = 0 + } + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9009_lover + PREGNANCY_CHANCE = 50 + } + stress_impact = { + } + ai_chance = { + base = 10 + } + } + + after = { + add_character_flag = had_event_bp1_yearly_9009 + scope:bp1_yearly_9009_lover = { + remove_character_flag = is_naked + } + scope:bp1_yearly_9007_doppelganger = { + remove_character_flag = is_naked + } + } +} + +# The doppelganger challenges you to a fight, claiming to be the real you +bp1_yearly.9010 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9010.t + desc = { + desc = bp1_yearly.9010.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9007_doppelganger = { drinks_alcohol_trigger = yes } + } + desc = bp1_yearly.9010.desc.drunk + } + desc = bp1_yearly.9010.desc.stoner + } + desc = bp1_yearly.9010.desc.outro + } + theme = family + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = personality_vengeful + } + + trigger = { + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9010 } + exists = var:my_doppelganger + var:my_doppelganger = { is_available_ai_adult = yes } + NOR = { + has_relation_friend = var:my_doppelganger + has_relation_best_friend = var:my_doppelganger + has_relation_lover = var:my_doppelganger + has_relation_soulmate = var:my_doppelganger + } + } + + immediate = { + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + if = { + limit = { + NOT = { has_relation_nemesis = scope:bp1_yearly_9007_doppelganger } + } + set_relation_nemesis = { + target = scope:bp1_yearly_9007_doppelganger + reason = nemesis_doppelganger + } + } + } + + option = { # Fight them for the throne! + name = bp1_yearly.9010.a + custom_tooltip = bp1_yearly.9010.a_tt + # Scopes for duel fallback + scope:bp1_yearly_9007_doppelganger = { save_scope_as = recipient } + save_scope_as = actor + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = scope:bp1_yearly_9007_doppelganger + SC_DEFENDER = root + FATALITY = no + FIXED = no + LOCALE = throne_room + OUTPUT_EVENT = bp1_yearly.9011 + INVALIDATION_EVENT = fp1_tbc.0102 + } + stress_impact = { + craven = medium_stress_impact_gain + wrathful = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = craven + } + } + } + + option = { # Have the doppelganger imprisoned + name = bp1_yearly.9010.b + rightfully_imprison_character_effect = { + TARGET = scope:bp1_yearly_9007_doppelganger + IMPRISONER = root + } + add_trait = disputed_heritage + + random_owned_story = { + type = story_doppelganger + end_story = yes + } + stress_impact = { + brave = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = arrogant + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9010 } +} + +# doppelganger duel outcome +bp1_yearly.9011 = { + hidden = yes + immediate = { + # Event for victorious doppelganger + if = { + limit = { + scope:sc_victor = scope:recipient + } + scope:actor = { + trigger_event = { + id = bp1_yearly.9012 + days = 1 + } + } + } + # The real you wins + else = { + trigger_event = { + id = bp1_yearly.9013 + days = 1 + } + } + } +} + +# The doppelganger wins +bp1_yearly.9012 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9012.t + desc = bp1_yearly.9012.desc + theme = crown + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = schadenfreude + } + + trigger = { + exists = var:my_doppelganger + exists = house + } + + immediate = { + every_held_title = { + add_to_list = titles_to_pressed_claim + } + every_claim = { + pressed = yes + add_to_list = titles_to_pressed_claim + } + every_claim = { + pressed = no + add_to_list = titles_to_unpressed_claim + } + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + create_character_memory = { + type = doppelganger_claimed_my_throne + participants = { + doppelganger = scope:bp1_yearly_9007_doppelganger + } + } + } + + option = { # Show the player the outcome + name = bp1_yearly.9012.a + scope:bp1_yearly_9007_doppelganger = { + give_nickname = nick_the_real + change_first_name = { template_character = root } + house ?= { set_house_name_from_house = root.house } + } + every_in_list = { + list = titles_to_pressed_claim + limit = { tier > tier_barony } #No baronies + save_scope_as = title_to_claim + scope:bp1_yearly_9007_doppelganger = { + add_pressed_claim = scope:title_to_claim + } + } + every_in_list = { + list = titles_to_unpressed_claim + save_scope_as = title_to_claim + scope:bp1_yearly_9007_doppelganger = { + add_unpressed_claim = scope:title_to_claim + } + } + add_trait = disputed_heritage + stress_impact = { + } + ai_chance = { + base = 10 + } + } +} + +# You win +bp1_yearly.9013 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9012.t + desc = bp1_yearly.9013.desc + theme = crown + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = pain + } + + trigger = { + exists = var:my_doppelganger + exists = house + } + + immediate = { + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + create_character_memory = { + type = doppelganger_claimed_my_throne_failed + participants = { + doppelganger = scope:bp1_yearly_9007_doppelganger + } + } + } + + option = { # Good + name = bp1_yearly.9013.a + rightfully_imprison_character_effect = { + TARGET = scope:bp1_yearly_9007_doppelganger + IMPRISONER = root + } + stress_impact = { + } + ai_chance = { + base = 10 + } + } +} + +# You have a romantic encounter with your double +bp1_yearly.9014 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9014.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_relation_lover = scope:bp1_yearly_9007_doppelganger + can_set_relation_soulmate_trigger = { CHARACTER = scope:bp1_yearly_9007_doppelganger } + } + desc = bp1_yearly.9014.desc.soulmate + } + desc = bp1_yearly.9014.desc.lover + } + } + theme = marriage + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = love + } + + trigger = { + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9010 } + exists = var:my_doppelganger + var:my_doppelganger = { is_available_ai_adult = yes } + OR = { + NOT = { # Doesn't already have a relation to the doppelganger + has_any_scripted_relation = var:my_doppelganger + } + has_relation_lover = var:my_doppelganger # Become soulmates + has_relation_friend = var:my_doppelganger + } + OR = { + # You are attracted to the same-sex + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = var:my_doppelganger + } + # You love yourself so much it doesn't matter + has_trait = arrogant + } + NOT = { has_character_flag = rejected_advances_bp1_yearly_9014 } # Allows the event to repeat from Lover to Soulmate, but prevents it from repeating for people who opted out + } + + immediate = { + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + } + + option = { # Embrace these feelings + name = { + trigger = { has_trait = arrogant } + text = bp1_yearly.9014.a.arrogant + } + name = bp1_yearly.9014.a + trigger = { + NOT = { has_relation_soulmate = scope:bp1_yearly_9007_doppelganger } + } + if = { + limit = { + has_relation_lover = scope:bp1_yearly_9007_doppelganger + can_set_relation_soulmate_trigger = { CHARACTER = scope:bp1_yearly_9007_doppelganger } + } + set_relation_soulmate = { reason = soulmate_doppelganger copy_reason = lover target = scope:bp1_yearly_9007_doppelganger } + } + else = { + if = { + limit = { NOT = { has_relation_lover = scope:bp1_yearly_9007_doppelganger } } + set_relation_lover = { reason = lover_my_own_clone_now_neither_of_us_will_be_virgins target = scope:bp1_yearly_9007_doppelganger } + } + } + stress_impact = { + humble = medium_stress_impact_gain + chaste = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Suppress the feelings + name = bp1_yearly.9014.b + reverse_add_opinion = { + target = scope:bp1_yearly_9007_doppelganger + modifier = hurt_opinion + opinion = -25 + } + add_character_flag = rejected_advances_bp1_yearly_9014 + stress_impact = { + lustful = major_stress_impact_gain + arrogant = massive_stress_impact_gain + } + ai_chance = { + base = 10 + } + } +} + +# Turns out you're long-lost twins +bp1_yearly.9015 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9015.t + desc = bp1_yearly.9015.desc + theme = family + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:bp1_yearly_9015_living_parent + animation = grief + } + + trigger = { + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9015 } + exists = var:my_doppelganger + var:my_doppelganger = { is_available_ai_adult = yes } + any_parent = { + is_available_ai_adult = yes + has_trait = honest + } + } + + + weight_multiplier = { + base = 0.1 # This should be very very rare + modifier = { # Even rarer if it results in incest + factor = 0.1 + var:my_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + NOT = { faith = { has_doctrine_parameter = consanguinity_unrestricted_incest } } + } + } + + immediate = { + random_parent = { + limit = { + is_available_ai_adult = yes + has_trait = honest + } + save_scope_as = bp1_yearly_9015_living_parent + } + var:my_doppelganger = { + save_scope_as = bp1_yearly_9007_doppelganger + set_real_father = root.father + } + if = { + limit = { + scope:bp1_yearly_9007_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + } + if = { + limit = { + NOR = { + has_trait = incestuous + any_secret = { type = secret_incest } + } + is_adult = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = incestuous + GENDER_CHARACTER = scope:bp1_yearly_9007_doppelganger + FAITH = root.faith + } + } + add_secret = { + type = secret_incest + } + random_secret = { + type = secret_incest + reveal_to = root + reveal_to = scope:bp1_yearly_9015_living_parent + } + } + scope:bp1_yearly_9007_doppelganger = { + if = { + limit = { + NOR = { + has_trait = incestuous + any_secret = { type = secret_incest } + } + is_adult = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = incestuous + GENDER_CHARACTER = root + FAITH = scope:bp1_yearly_9007_doppelganger.faith + } + } + add_secret = { + type = secret_incest + } + random_secret = { + type = secret_incest + reveal_to = root + reveal_to = scope:bp1_yearly_9015_living_parent + } + } + } + } + } + + option = { # Announce the news publicly! + name = bp1_yearly.9015.a + scope:bp1_yearly_9007_doppelganger = { + if = { + limit = { exists = root.father } + set_father = root.father + } + if = { + limit = { exists = root.mother } + set_mother = root.mother + } + if = { + limit = { exists = root.house } + set_house = root.house + } + add_trait = twin + } + add_trait = twin + if = { # My clone is known to be my lover, become incestuous + limit = { + scope:bp1_yearly_9007_doppelganger = { is_consort_of = root } + } + random_secret = { + type = secret_incest + expose_secret = root + } + scope:bp1_yearly_9007_doppelganger = { + random_secret = { + type = secret_incest + expose_secret = root + } + } + } + if = { # Your religion thinks your incest is cool, give piety + limit = { + faith = { has_doctrine_parameter = divine_marriage_piety_gain_active } + OR = { + scope:bp1_yearly_9007_doppelganger = { is_consort_of = root } + NOT = { + sexual_activity_with_partner_is_criminal_in_faith_trigger = { + PARTNER = scope:bp1_yearly_9007_doppelganger + FAITH = root.faith + } + } + } + } + add_piety = major_piety_gain + } + if = { # I'm not having sexual relations with my clone, become friends + limit = { + NOT = { + has_any_scripted_relation = scope:bp1_yearly_9007_doppelganger + scope:bp1_yearly_9007_doppelganger = { is_consort_of = root } + } + } + if = { + limit = { + NOT = { has_relation_friend = scope:bp1_yearly_9007_doppelganger } + } + set_relation_friend = { reason = friend_long_lost_twin target = scope:bp1_yearly_9007_doppelganger } + } + } + else_if = { # We're enemies, move closer to not being enemies + limit = { + NOT = { scope:bp1_yearly_9007_doppelganger = { is_consort_of = root } } + OR = { + has_relation_rival = scope:bp1_yearly_9007_doppelganger + has_relation_nemesis = scope:bp1_yearly_9007_doppelganger + } + } + scope:bp1_yearly_9007_doppelganger = { + progress_towards_friend_effect = { + CHARACTER = root + OPINION = default_friend_opinion + REASON = friend_curiously_similar + } + } + } + if = { # Stress gain for incest + limit = { + scope:bp1_yearly_9007_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + chaste = medium_stress_impact_gain + } + if = { + limit = { + NOT = { faith = { has_doctrine_parameter = divine_marriage_piety_gain_active } } + } + stress_impact = { + base = major_stress_impact_gain + zealous = major_stress_impact_gain + } + } + } + else = { # Stress gain for not incest + stress_impact = { + deceitful = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + scope:bp1_yearly_9007_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + NOT = { faith = { has_doctrine_parameter = consanguinity_unrestricted_incest } } + } + } + } + + option = { # Suppress information + name = bp1_yearly.9015.b + stress_impact = { + arrogant = major_stress_impact_gain + humble = major_stress_impact_gain + content = major_stress_impact_gain + honest = massive_stress_impact_gain + trusting = massive_stress_impact_gain + } + if = { # Stress gain for incest + limit = { + scope:bp1_yearly_9007_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + faith = { has_doctrine_parameter = divine_marriage_piety_gain_active } + } + stress_impact = { + zealous = massive_stress_impact_gain + } + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + scope:bp1_yearly_9007_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + faith = { has_doctrine_parameter = consanguinity_unrestricted_incest } + } + modifier = { + factor = 0 + has_trait = honest + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9015 } +} + +##################################### +# Uppity heir wants the throne # +# by James Beaumont # +# 9016 # +##################################### +bp1_yearly.9016 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9016.t + desc = { + desc = bp1_yearly.9016.desc.intro + first_valid = { + # Different descs to challenge why they think they deserve the throne more + triggered_desc = { + trigger = { + NOT = { + root.player_heir = { + is_child_of = root + } + } + } + desc = bp1_yearly.9016.desc.not_a_child + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9016_uppity_child = { + NOR = { + has_trait = legitimized_bastard + has_trait = bastard + } + } + root.player_heir = { + OR = { + has_trait = legitimized_bastard + has_trait = bastard + } + } + } + desc = bp1_yearly.9016.desc.bastard + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9016_uppity_child = { + NOR = { + has_trait = child_of_concubine + has_trait = legitimized_bastard + has_trait = bastard + } + } + root.player_heir = { + has_trait = child_of_concubine + } + } + desc = bp1_yearly.9016.desc.child_of_concubine + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9016_uppity_child = { + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + root.player_heir = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + desc = bp1_yearly.9016.desc.rival + } + desc = bp1_yearly.9016.desc.fallback + } + desc = bp1_yearly.9016.desc.outro + } + theme = family + override_background = feast + left_portrait = { + character = scope:bp1_yearly_9016_heir + animation = shock + } + right_portrait = { + character = scope:bp1_yearly_9016_uppity_child + animation = rage + } + + trigger = { + has_dlc_feature = friends_and_foes + is_landed = yes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9016 } + exists = root.player_heir + root.player_heir = { + is_available_ai_adult = yes + # Consider if this should only be valid for your offspring or if uncles should be valid as well + } + any_child = { + is_available_ai_adult = yes + this != root.player_heir + # Any of your children dislike or are indifferent to your current heir + NOT = { + has_any_good_relationship_with_character_trigger = { + CHARACTER = root.player_heir + } + } + OR = { + has_trait = ambitious + has_any_bad_relationship_with_character_trigger = { CHARACTER = root.player_heir } + } + root.primary_title = { # They must be close to succession + place_in_line_of_succession = { + target = prev + value <= 4 + } + } + } + } + + + weight_multiplier = { + base = 1 + modifier = { # Less rare if they hate your current heir + factor = 10 + any_child = { + is_available_ai_adult = yes + has_any_bad_relationship_with_character_trigger = { + CHARACTER = root.player_heir + } + } + } + modifier = { # Less rare if they think they could take your current heir in a fight + factor = 2 + any_child = { + is_available_ai_adult = yes + prowess > root.player_heir.prowess + } + } + } + + immediate = { + random_child = { + limit = { + is_available_ai_adult = yes + this != root.player_heir + NOT = { + has_any_good_relationship_with_character_trigger = { + CHARACTER = root.player_heir + } + } + root.primary_title = { # They must be close to succession + place_in_line_of_succession = { + target = prev + value <= 4 + } + } + } + weight = { + modifier = { + factor = 10 + any_child = { + is_available_ai_adult = yes + has_any_bad_relationship_with_character_trigger = { + CHARACTER = root.player_heir + } + } + } + modifier = { + factor = 2 + any_child = { + is_available_ai_adult = yes + prowess > root.player_heir.prowess + } + } + } + progress_towards_rival_effect = { + REASON = rival_heir_wants_throne + CHARACTER = root.player_heir + OPINION = default_rival_opinion + } + save_scope_as = bp1_yearly_9016_uppity_child + } + root.player_heir = { save_scope_as = bp1_yearly_9016_heir } + } + + option = { # Let them fight! + name = bp1_yearly.9016.a + trigger = { + NOT = { + culture ?= { has_cultural_tradition = tradition_mystical_ancestors } + } + } + scope:bp1_yearly_9016_uppity_child = { + progress_towards_rival_effect = { + REASON = rival_heir_wants_throne + CHARACTER = root.player_heir + OPINION = default_rival_opinion + } + duel = { + skill = prowess + target = scope:bp1_yearly_9016_heir + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + root = { + send_interface_toast = { + title = 9016_uppity_child_wins + left_icon = root + right_icon = scope:bp1_yearly_9016_uppity_child + set_designated_heir = scope:bp1_yearly_9016_uppity_child + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + root = { + send_interface_toast = { + title = 9016_uppity_child_wins + left_icon = root + right_icon = scope:bp1_yearly_9016_heir + scope:bp1_yearly_9016_uppity_child = { + disinherit_effect = { DISINHERITOR = root } + } + } + } + } + } + } + stress_impact = { + arrogant = major_stress_impact_gain + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + craven = major_stress_impact_gain + family_first = massive_stress_impact_gain # I hate it when you guys fight! + } + ai_chance = { + base = 10 + + } + } + + option = { # Send the uppity heir to their room with no supper + name = bp1_yearly.9016.b + scope:bp1_yearly_9016_uppity_child = { + progress_towards_rival_effect = { + REASON = rival_heir_sent_to_bed + CHARACTER = root + OPINION = default_rival_opinion + } + } + stress_impact = { + arbitrary = major_stress_impact_gain + brave = major_stress_impact_gain + honest = massive_stress_impact_gain + family_first = minor_stress_impact_gain + } + } + + after = { add_character_flag = had_event_bp1_yearly_9016 } +} + +################################################# +# Uppity child is insecure about culture # +# by James Beaumont # +# 9017 # +################################################# + +scripted_trigger bp1_yearly_9017_child_is_valid_trigger = { + is_available_ai_adult = yes + OR = { # They feel like they don't belong + culture != root.culture + faith != root.faith + } + root.primary_title = { # They must be relevant at least somewhat + place_in_line_of_succession = { + target = prev + value <= 4 + } + } + OR = { # They must be in your realm + is_courtier_of = root + any_liege_or_above = { this = root } + } +} + +bp1_yearly.9017 = { + type = character_event + content_source = dlc_006 + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + culture != root.culture + } + } + desc = bp1_yearly.9017.t.culture + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + faith != root.faith + } + } + desc = bp1_yearly.9017.t.faith + } + } + } + desc = { + desc = bp1_yearly.9017.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + culture != root.culture + } + } + desc = bp1_yearly.9017.desc.culture + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + faith != root.faith + } + } + desc = bp1_yearly.9017.desc.faith + } + } + desc = bp1_yearly.9017.desc.outro + } + theme = family + left_portrait = { + character = root + animation = personality_compassionate + } + right_portrait = { + character = scope:bp1_yearly_9017_uppity_child + animation = grief + } + + trigger = { + has_dlc_feature = friends_and_foes + is_landed = yes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9017 } + any_child = { + bp1_yearly_9017_child_is_valid_trigger = yes + } + } + + + weight_multiplier = { + base = 1 + modifier = { # More likely if faith is hostile or higher + add = 5 + any_child = { + bp1_yearly_9017_child_is_valid_trigger = yes + faith = { + faith_hostility_level = { + target = root.faith + value >= 2 + } + } + } + } + modifier = { # More likely if cultures don't get along + add = 2 + any_child = { + bp1_yearly_9017_child_is_valid_trigger = yes + culture = { + cultural_acceptance = { + target = root.culture + value <= 25 + } + } + } + } + modifier = { # More likely if cultures *really* don't get along + add = 3 + any_child = { + bp1_yearly_9017_child_is_valid_trigger = yes + culture = { + cultural_acceptance = { + target = root.culture + value <= 5 + } + } + } + } + } + + immediate = { + random_child = { + limit = { + bp1_yearly_9017_child_is_valid_trigger = yes + } + weight = { + modifier = { + factor = 2 + culture != root.culture + faith != root.faith + } + } + save_scope_as = bp1_yearly_9017_uppity_child + } + } + + option = { # We should celebrate our differences! + name = bp1_yearly.9017.a + trigger = { + root.culture != scope:bp1_yearly_9017_uppity_child.culture + } + if = { + limit = { + root.culture != scope:bp1_yearly_9017_uppity_child.culture + } + root.culture = { + change_cultural_acceptance = { + target = scope:bp1_yearly_9017_uppity_child.culture + value = medium_cultural_acceptance_gain + desc = cultural_acceptance_embraced_child + } + } + } + scope:bp1_yearly_9017_uppity_child = { + progress_towards_friend_effect = { + CHARACTER = root + OPINION = default_friend_opinion + REASON = friend_encouraged_differences + } + } + stress_impact = { + arrogant = major_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:bp1_yearly_9017_uppity_child.faith + value >= 2 + } + } + } + stress_impact = { + zealous = massive_stress_impact_gain + } + } + ai_chance = { + base = 10 + + } + } + + option = { # We are different, but you're still my daughter/son + name = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + culture != root.culture + } + } + text = bp1_yearly.9017.b.culture + } + name = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + faith != root.faith + } + } + text = bp1_yearly.9017.b.faith + } + scope:bp1_yearly_9017_uppity_child = { + progress_towards_friend_effect = { + CHARACTER = root + OPINION = default_friend_opinion + REASON = friend_encouraged_differences + } + } + stress_impact = { + arrogant = major_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:bp1_yearly_9017_uppity_child.faith + value >= 2 + } + } + } + stress_impact = { + zealous = major_stress_impact_gain + } + } + } + + option = { # The differences are too great, disinherit them + name = bp1_yearly.9017.c + trigger = { + NOT = { + culture ?= { has_cultural_tradition = tradition_mystical_ancestors } + } + } + scope:bp1_yearly_9017_uppity_child = { + disinherit_effect = { DISINHERITOR = root } + } + scope:bp1_yearly_9017_uppity_child = { + progress_towards_rival_effect = { + REASON = rival_was_disinherited + CHARACTER = root + OPINION = default_rival_opinion + } + } + if = { + limit = { + root.culture != scope:bp1_yearly_9017_uppity_child.culture + } + root.culture = { + change_cultural_acceptance = { + target = scope:bp1_yearly_9017_uppity_child.culture + value = medium_cultural_acceptance_loss + desc = cultural_acceptance_rejected_child + } + } + } + stress_impact = { + just = massive_stress_impact_gain + compassionate = massive_stress_impact_gain + forgiving = major_stress_impact_gain + trusting = major_stress_impact_gain + family_first = massive_stress_impact_gain + } + } + + after = { add_character_flag = had_event_bp1_yearly_9017 } +} + +################################################# +# Illegitimate child feels excluded # +# by James Beaumont # +# 9018 # +################################################# + +bp1_yearly.9018 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9018.t + desc = { + desc = bp1_yearly.9018.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9018_illegitimate_child = { + OR = { + has_trait = bastard + has_trait = legitimized_bastard + } + } + } + desc = bp1_yearly.9018.desc.bastard + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9018_illegitimate_child = { + has_trait = child_of_concubine + } + } + desc = bp1_yearly.9018.desc.child_of_concubine + } + } + first_valid = { + triggered_desc = { + trigger = { + NOT = { + has_trait = compassionate + } + OR = { + has_trait = callous + opinion = { + target = scope:bp1_yearly_9018_illegitimate_child + value <= -20 + } + } + } + desc = bp1_yearly.9018.desc.outro.callous + } + desc = bp1_yearly.9018.desc.outro + } + } + theme = family + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9018_illegitimate_child + animation = grief + } + lower_right_portrait = { + character = scope:bp1_yearly_9018_bully + animation = schadenfreude + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9018 } + any_child = { + is_adult = no + age >= 6 + OR = { + has_trait = bastard + has_trait = legitimized_bastard + has_trait = child_of_concubine + } + save_temporary_scope_as = bastard_scope + } + any_child = { + is_adult = no + age >= 6 + age >= scope:bastard_scope.age + NOR = { + has_trait = bastard + has_trait = legitimized_bastard + has_trait = child_of_concubine + has_trait = compassionate + has_trait = trusting + } + } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + random_child = { + limit = { + is_adult = no + age >= 6 + OR = { + has_trait = bastard + has_trait = legitimized_bastard + has_trait = child_of_concubine + } + } + save_scope_as = bp1_yearly_9018_illegitimate_child + } + random_child = { + limit = { + is_adult = no + age >= 6 + NOR = { + has_trait = bastard + has_trait = legitimized_bastard + has_trait = child_of_concubine + has_trait = compassionate + has_trait = trusting + } + } + save_scope_as = bp1_yearly_9018_bully + } + } + + option = { # You two should get along! + name = bp1_yearly.9018.a + scope:bp1_yearly_9018_illegitimate_child = { + root = { save_scope_as = relationship_reason_involved_character } + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9018_bully + OPINION = default_friend_opinion + REASON = friend_motivated_by_parent + } + clear_saved_scope = relationship_reason_involved_character + progress_towards_friend_effect = { + CHARACTER = root + OPINION = default_friend_opinion + REASON = friend_good_chats + } + } + scope:bp1_yearly_9018_bully = { + progress_towards_friend_effect = { + CHARACTER = root + OPINION = default_friend_opinion + REASON = friend_good_chats + } + } + stress_impact = { + base = medium_stress_impact_gain + arrogant = major_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + vengeful = major_stress_impact_gain + family_first = major_stress_impact_loss + } + ai_chance = { + base = 10 + + } + } + + option = { # GetGirlBoys will be GetGirlBoys + name = bp1_yearly.9018.b + scope:bp1_yearly_9018_illegitimate_child = { + set_relation_victim = scope:bp1_yearly_9018_bully + add_opinion = { + target = root + modifier = betrayed_me_opinion + opinion = -25 + } + } + scope:bp1_yearly_9018_bully = { + add_opinion = { + target = root + modifier = love_opinion + opinion = 25 + } + } + stress_impact = { + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + family_first = major_stress_impact_gain + } + } + + option = { # Let them fight for your compassion + name = bp1_yearly.9018.c + trigger = { + OR = { + has_trait = arbitrary + has_trait = callous + } + NOT = { + culture ?= { has_cultural_tradition = tradition_mystical_ancestors } + } + } + scope:bp1_yearly_9018_illegitimate_child = { + + set_relation_nemesis = { + target = scope:bp1_yearly_9018_bully + involved_character = root + copy_reason = rival + reason = nemesis_fought_for_parents_compassion + } + + duel = { + skill = prowess + target = scope:bp1_yearly_9018_bully + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + root = { + send_interface_toast = { + title = 9018_uppity_child_wins + left_icon = root + right_icon = scope:bp1_yearly_9018_illegitimate_child + scope:bp1_yearly_9018_bully = { + disinherit_effect = { DISINHERITOR = root } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + root = { + send_interface_toast = { + title = 9018_bully_child_wins + left_icon = root + right_icon = scope:bp1_yearly_9018_bully + scope:bp1_yearly_9018_illegitimate_child = { + disinherit_effect = { DISINHERITOR = root } + } + } + } + } + } + } + stress_impact = { + just = massive_stress_impact_gain + compassionate = massive_stress_impact_gain + forgiving = major_stress_impact_gain + trusting = major_stress_impact_gain + family_first = massive_stress_impact_gain + } + } + + after = { add_character_flag = had_event_bp1_yearly_9018 } +} + +################################################# +# Spouse proposes a gay threesome # +# by James Beaumont # +# 9019 # +################################################# + +scripted_trigger bp1_yearly_9019_spouse_trigger = { + is_available_at_peace_ai_adult = yes + is_eunuch_trigger = no + NOR = { + has_trait = chaste + has_trait = celibate + has_trait = pregnant + } + OR = { + # Many things can motivate this, desire for children, compassion for your partner's desires, just wanting a threesom, etc. + has_trait = compassionate + has_trait = deceitful + has_trait = lustful + has_trait = ambitious + has_trait = arbitrary + AND = { + faith = { has_doctrine_parameter = homosexuality_accepted } + NOT = { + trait_is_shunned_in_faith_trigger = { + TRAIT = adulterer + FAITH = root.faith + GENDER_CHARACTER = root + } + } + } + } + # Zealous spouses generally shouldn't want to do this if their faith shuns it + NAND = { + OR = { + faith = { has_doctrine_parameter = homosexuality_illegal } + faith = { has_doctrine_parameter = homosexuality_shunned } + } + has_trait = zealous + } +} + +scripted_trigger bp1_yearly_9019_relation_trigger = { + NOR = { + is_close_family_of = root + is_consort_of = root + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + OR = { + AND = { + is_male = yes + root = { is_male = yes } + } + AND = { + is_female = yes + root = { is_female = yes } + } + } + might_cheat_on_every_partner_trigger = yes +} + +scripted_trigger bp1_yearly_9019_courtier_trigger = { + is_adult = yes + NAND = { + OR = { + faith = { has_doctrine_parameter = homosexuality_illegal } + faith = { has_doctrine_parameter = homosexuality_shunned } + } + has_trait = zealous + } + NOR = { + has_trait = chaste + is_close_family_of = root + is_consort_of = root + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + OR = { + has_sexuality = homosexual + has_sexuality = bisexual + } + OR = { + AND = { + is_male = yes + root = { is_male = yes } + } + AND = { + is_female = yes + root = { is_female = yes } + } + } + might_cheat_on_every_partner_trigger = yes +} + +bp1_yearly.9019 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9019.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_sexuality = homosexual + } + desc = bp1_yearly.9019.desc.intro.gay + } + triggered_desc = { + trigger = { + has_sexuality = bisexual + } + desc = bp1_yearly.9019.desc.intro.bi + } + } + desc = bp1_yearly.9019.desc.bridge + first_valid = { + triggered_desc = { + trigger = { + has_sexuality = homosexual + } + desc = bp1_yearly.9019.desc.bridge.gay + } + triggered_desc = { + trigger = { + has_sexuality = bisexual + } + desc = bp1_yearly.9019.desc.bridge.bi + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9019_spouse = { + has_trait = compassionate + } + } + desc = bp1_yearly.9019.desc.compassionate + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9019_spouse = { + has_trait = lustful + } + } + desc = bp1_yearly.9019.desc.lustful + } + desc = bp1_yearly.9019.desc.cynical + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_relation_lover = scope:bp1_yearly_9019_lover + has_relation_soulmate = scope:bp1_yearly_9019_lover + } + } + desc = bp1_yearly.9019.desc.lover + } + triggered_desc = { + trigger = { + has_relation_friend = scope:bp1_yearly_9019_lover + } + desc = bp1_yearly.9019.desc.friend + } + desc = bp1_yearly.9019.desc.stranger + } + desc = bp1_yearly.9019.desc.outro + } + theme = family + override_background = bedchamber + left_portrait = { + character = scope:bp1_yearly_9019_spouse + animation = personality_compassionate + } + right_portrait = { + character = scope:bp1_yearly_9019_lover + animation = flirtation_left + } + lower_left_portrait = { + character = root + animation = shock + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + OR = { + has_sexuality = homosexual + has_sexuality = bisexual + } + is_eunuch_trigger = no + NOR = { # Can have sex and isn't already pregnant + has_trait = celibate + has_trait = pregnant + } + any_spouse = { bp1_yearly_9019_spouse_trigger = yes } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + random_spouse = { + limit = { bp1_yearly_9019_spouse_trigger = yes } + save_scope_as = bp1_yearly_9019_spouse + } + # Grab an existing lover if possible + if = { + limit = { + any_relation = { + type = lover + bp1_yearly_9019_relation_trigger = yes + } + } + random_relation = { + type = lover + limit = { bp1_yearly_9019_relation_trigger = yes } + save_scope_as = bp1_yearly_9019_lover + } + } + # Otherwise grab a courtier + else_if = { + limit = { + any_courtier_or_guest = { bp1_yearly_9019_courtier_trigger = yes } + } + random_courtier_or_guest = { + limit = { bp1_yearly_9019_courtier_trigger = yes } + save_scope_as = bp1_yearly_9019_lover + } + } + # Otherwise create a beautiful bisexual + else = { + create_character = { + template = bp1_bisexual_partner_template + location = root.capital_province + save_scope_as = bp1_yearly_9019_lover + } + } + # We're gonna have some monogamous threesomes happenin'. + save_scope_as = ignore_cheating_error_check + scope:bp1_yearly_9019_lover = { + add_character_flag = is_naked + } + } + + option = { # Let's do this thing! + name = bp1_yearly.9019.a + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9019_lover + PREGNANCY_CHANCE = 20 + } + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9019_spouse + PREGNANCY_CHANCE = 80 + } + hidden_effect = { # Hidden to prevent tooltip errors, also largely implied by the event content + scope:bp1_yearly_9019_lover = { + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9019_spouse + PREGNANCY_CHANCE = 50 + } + } + } + if = { + limit = { + NOT = { + has_relation_lover = scope:bp1_yearly_9019_lover + } + } + set_relation_lover = { reason = lover_threesome_with_spouse target = scope:bp1_yearly_9019_lover involved_character = scope:bp1_yearly_9019_spouse } + } + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9019_spouse + OPINION = default_friend_opinion + REASON = friend_deviant_fun + } + create_character_memory = { + type = had_a_threesome_memory + participants = { + partner_1 = scope:bp1_yearly_9019_spouse + partner_2 = scope:bp1_yearly_9019_lover + } + } + stress_impact = { + chaste = major_stress_impact_gain + shy = major_stress_impact_gain + lustful = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = shy + } + } + } + } + + option = { # Leave me and my new boyfriend alone! + name = bp1_yearly.9019.b + trigger = { + OR = { + has_trait = callous + has_trait = arbitrary + has_trait = lustful + } + NOT = { + has_relation_lover = scope:bp1_yearly_9019_lover + } + } + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9019_lover + PREGNANCY_CHANCE = 50 + } + set_relation_lover = { reason = lover_ignored_spouse target = scope:bp1_yearly_9019_lover involved_character = scope:bp1_yearly_9019_spouse } + progress_towards_rival_effect = { + REASON = rival_rejected_marital_bed + CHARACTER = scope:bp1_yearly_9019_spouse + OPINION = default_rival_opinion + } + stress_impact = { + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + family_first = major_stress_impact_gain + lustful = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + has_trait = family_first + } + } + } + } + + option = { # Refuse the threesom + name = bp1_yearly.9019.c + if = { # Lose piety if in gay-accepting Carnal Exaltation faith + limit = { + faith = { + has_doctrine_parameter = homosexuality_accepted + trait_is_virtue = lustful + } + } + add_piety = minor_piety_loss + } + else = { + add_piety = medium_piety_gain + } + reverse_add_opinion = { + target = scope:bp1_yearly_9019_spouse + modifier = hurt_opinion + opinion = -25 + } + stress_impact = { + lustful = massive_stress_impact_gain + family_first = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = family_first + } + } + modifier = { + factor = 2 + has_trait = chaste + } + modifier = { + factor = 2 + NOT = { faith = { has_doctrine_parameter = homosexuality_accepted } } + has_trait = zealous + } + } + } + after = { + scope:bp1_yearly_9019_lover = { + remove_character_flag = is_naked + } + } +} + +################################################# +# Spouse wants to do something kinky # +# by James Beaumont # +# 9020 # +################################################# + +bp1_yearly.9020 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9020.t + desc = { + desc = bp1_yearly.9020.desc.intro + random_valid = { + desc = bp1_yearly.9020.desc.goat + desc = bp1_yearly.9020.desc.vegetable + desc = bp1_yearly.9020.desc.bondage + desc = bp1_yearly.9020.desc.feet + triggered_desc = { + trigger = { + exists = faith.religious_head + NOT = { + faith.religious_head = root + faith.religious_head = scope:bp1_yearly_9020_spouse + } + } + desc = bp1_yearly.9020.desc.hof + } + } + desc = bp1_yearly.9020.desc.outro + } + theme = family + override_background = bedchamber + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:bp1_yearly_9020_spouse + animation = flirtation + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + is_eunuch_trigger = no + NOR = { # Can have sex and isn't already pregnant + has_trait = celibate + has_trait = pregnant + } + any_spouse = { + is_available_at_peace_ai_adult = yes + is_eunuch_trigger = no + NOR = { + has_trait = chaste + has_trait = celibate + has_trait = pregnant + } + is_deviant_trigger = yes + # Zealous spouses generally shouldn't want to do this if their faith shuns it + NAND = { + OR = { + faith = { has_doctrine_parameter = deviancy_illegal } + faith = { has_doctrine_parameter = deviancy_shunned } + } + has_trait = zealous + } + } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + random_spouse = { + limit = { + is_eunuch_trigger = no + NOR = { + has_trait = chaste + has_trait = celibate + has_trait = pregnant + } + is_deviant_trigger = yes + # Zealous spouses generally shouldn't want to do this if their faith shuns it + NAND = { + OR = { + faith = { has_doctrine_parameter = deviancy_illegal } + faith = { has_doctrine_parameter = deviancy_shunned } + } + has_trait = zealous + } + } + if = { + limit = { + any_secret = { + type = secret_deviant + } + } + random_secret = { + type = secret_deviant + reveal_to = root + save_scope_as = bp1_yearly_9020_spouse_secret + } + } + save_scope_as = bp1_yearly_9020_spouse + } + scope:bp1_yearly_9020_spouse = { + add_character_flag = is_naked + } + } + + option = { # I would do anything for love + name = bp1_yearly.9020.a + give_deviant_secret_or_trait_effect = yes + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9020_spouse + PREGNANCY_CHANCE = 75 + } + progress_towards_lover_effect = { + CHARACTER = scope:bp1_yearly_9020_spouse + REASON = lover_spouse_indulged + OPINION = default_lover_opinion + } + stress_impact = { + chaste = major_stress_impact_gain + shy = major_stress_impact_gain + lustful = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = shy + } + } + } + } + + option = { # but I won't do that + name = bp1_yearly.9020.b + reverse_add_opinion = { + target = scope:bp1_yearly_9020_spouse + modifier = disappointed_opinion + opinion = -25 + } + stress_impact = { + lustful = massive_stress_impact_gain + family_first = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = family_first + } + } + modifier = { + factor = 2 + has_trait = chaste + } + } + } + + option = { # I would report you to the authorities for love + name = bp1_yearly.9020.c + trigger = { + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = deviant GENDER_CHARACTER = root } + exists = scope:bp1_yearly_9020_spouse_secret + } + scope:bp1_yearly_9020_spouse_secret = { + expose_secret = root + } + progress_towards_rival_effect = { + REASON = rival_accused_of_perversion + CHARACTER = scope:bp1_yearly_9020_spouse + OPINION = default_rival_opinion + } + stress_impact = { + lustful = massive_stress_impact_gain + family_first = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = family_first + } + } + modifier = { + factor = 2 + has_trait = chaste + } + modifier = { + factor = 2 + NOT = { faith = { has_doctrine_parameter = homosexuality_accepted } } + has_trait = zealous + } + } + } + after = { + scope:bp1_yearly_9020_spouse = { + remove_character_flag = is_naked + } + } +} + +################################################# +# Rival spouse is good in the bedroom # +# by James Beaumont # +# 9021 # +################################################# + +bp1_yearly.9021 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9021.t + desc = bp1_yearly.9021.desc + theme = family + override_background = bedchamber + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:bp1_yearly_9021_rival_spouse + animation = rage + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + is_eunuch_trigger = no + NOR = { # Can have sex and isn't already pregnant + has_trait = celibate + has_trait = pregnant + } + any_spouse = { + is_available_at_peace_ai_adult = yes + is_eunuch_trigger = no + NOR = { + has_trait = chaste + has_trait = celibate + has_trait = pregnant + } + has_relation_rival = root + NOT = { has_relation_lover = root } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_spouse = { + limit = { + is_available_at_peace_ai_adult = yes + is_eunuch_trigger = no + NOR = { + has_trait = chaste + has_trait = celibate + has_trait = pregnant + } + has_relation_rival = root + } + save_scope_as = bp1_yearly_9021_rival_spouse + } + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9021_rival_spouse + PREGNANCY_CHANCE = 50 + } + add_character_flag = is_naked + scope:bp1_yearly_9021_rival_spouse = { + add_character_flag = is_naked + } + } + + option = { # We should do that again! + name = bp1_yearly.9021.a + set_relation_lover = { reason = lover_rival_spouse target = scope:bp1_yearly_9021_rival_spouse } + stress_impact = { + base = major_stress_impact_gain + chaste = major_stress_impact_gain + shy = major_stress_impact_gain + lustful = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = shy + } + } + } + } + + option = { # Try not to think about it too hard + name = bp1_yearly.9021.b + reverse_add_opinion = { + target = scope:bp1_yearly_9021_rival_spouse + modifier = disappointed_opinion + opinion = -5 + } + stress_impact = { + lustful = massive_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = lustful + } + } + } + after = { + remove_character_flag = is_naked + scope:bp1_yearly_9021_rival_spouse = { + remove_character_flag = is_naked + } + } +} + +################################################# +# Friend holds an intervention # +# by James Beaumont # +# 9022 # +################################################# + +bp1_yearly.9022 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9022.t + desc = { + desc = bp1_yearly.9022.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_trait = hashishiyah + } + desc = bp1_yearly.9022.desc.hashishiyah + } + triggered_desc = { + trigger = { + has_trait = drunkard + } + desc = bp1_yearly.9022.desc.drunkard + } + triggered_desc = { + trigger = { + has_trait = rakish + } + desc = bp1_yearly.9022.desc.rakish + } + triggered_desc = { + trigger = { + has_trait = comfort_eater + } + desc = bp1_yearly.9022.desc.comfort_eater + } + triggered_desc = { + trigger = { + has_trait = inappetetic + } + desc = bp1_yearly.9022.desc.inappetetic + } + triggered_desc = { + trigger = { + has_trait = flagellant + } + desc = bp1_yearly.9022.desc.flagellant + } + triggered_desc = { + trigger = { + has_trait = reclusive + } + desc = bp1_yearly.9022.desc.reclusive + } + } + desc = bp1_yearly.9022.desc.outro + } + theme = family + override_background = bedchamber + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:bp1_yearly_9022_friend + animation = personality_compassionate + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9022 } + OR = { + has_trait = hashishiyah + has_trait = drunkard + has_trait = rakish + has_trait = comfort_eater + has_trait = inappetetic + has_trait = flagellant + has_trait = reclusive + } + any_relation = { + type = friend + is_available_at_peace_ai_adult = yes + OR = { + has_trait = compassionate + ai_compassion >= 50 + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_relation = { + type = friend + limit = { + is_available_at_peace_ai_adult = yes + OR = { + has_trait = compassionate + ai_compassion >= 50 + } + } + save_scope_as = bp1_yearly_9022_friend + } + } + + option = { # Attempt to give up your vice + name = bp1_yearly.9022.a + if = { + limit = { NOT = { has_relation_best_friend = scope:bp1_yearly_9022_friend } } + set_relation_best_friend = { reason = best_friend_help_overcome_vice copy_reason = friend target = scope:bp1_yearly_9022_friend } + } + duel = { + skill = diplomacy # A battle of willpower + target = scope:bp1_yearly_9022_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + stress_impact = { + base = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + if = { + limit = { has_trait = hashishiyah } + remove_trait = hashishiyah + } + else_if = { + limit = { has_trait = drunkard } + remove_trait = drunkard + } + else_if = { + limit = { has_trait = rakish } + remove_trait = rakish + } + else_if = { + limit = { has_trait = comfort_eater } + remove_trait = comfort_eater + } + else_if = { + limit = { has_trait = inappetetic } + remove_trait = inappetetic + } + else_if = { + limit = { has_trait = flagellant } + remove_trait = flagellant + } + else_if = { + limit = { has_trait = reclusive } + remove_trait = reclusive + } + create_character_memory = { + type = lost_my_addiction_memory + participants = { + interventioner = scope:bp1_yearly_9022_friend + } + } + stress_impact = { + base = major_stress_impact_gain + arrogant = major_stress_impact_gain + } + } + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = arrogant + } + } + } + + option = { # What is this? Get out! + name = bp1_yearly.9022.b + reverse_add_opinion = { + target = scope:bp1_yearly_9022_friend + modifier = disappointed_opinion + opinion = -25 + } + stress_impact = { + humble = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = humble + } + } + } + + after = { + add_character_flag = had_event_bp1_yearly_9022 + } +} + +################################################# +# You realise you don't speak the same language # +# by James Beaumont # +# 9023 # +################################################# + +bp1_yearly.9023 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9023.t + desc = bp1_yearly.9023.desc + theme = diplomacy + override_background = feast + left_portrait = { + character = root + animation = beg + } + right_portrait = { + character = scope:bp1_yearly_9023_friend + animation = rage + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9023 } + any_relation = { + type = friend + is_available_at_peace_ai_adult = yes + NOT = { knows_language_of_culture = root.culture } + NOT = { root = { knows_language_of_culture = prev.culture } } + NOT = { + any_scheme = { + type = learn_language + } + } + } + NOT = { + any_scheme = { + type = learn_language + } + } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + random_relation = { + type = friend + limit = { + is_available_at_peace_ai_adult = yes + NOT = { knows_language_of_culture = root.culture } + NOT = { root = { knows_language_of_culture = prev.culture } } + } + save_scope_as = bp1_yearly_9023_friend + } + set_variable = { + name = wrong_language_friend + value = scope:bp1_yearly_9023_friend + } + } + + option = { # Uhhhh... como te llamas? + name = bp1_yearly.9023.a + duel = { + skill = diplomacy + target = scope:bp1_yearly_9023_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + reverse_add_opinion = { + target = scope:bp1_yearly_9023_friend + modifier = flattered_opinion + opinion = 5 + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + progress_towards_rival_effect = { + REASON = rival_linguistic_mishap + CHARACTER = scope:bp1_yearly_9023_friend + OPINION = default_rival_opinion + } + } + } + stress_impact = { + diligent = major_stress_impact_gain + compassionate = major_stress_impact_gain + gregarious = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = compassionate + has_trait = gregarious + has_trait = shy + } + } + } + } + + option = { # Maybe I should learn their language + name = bp1_yearly.9023.b + start_scheme = { + type = learn_language + target_character = scope:bp1_yearly_9023_friend + } + stress_impact = { + lazy = major_stress_impact_gain + shy = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = shy + } + } + } + } + + option = { # Maybe they should learn my language! + name = bp1_yearly.9023.c + trigger = { + has_trait = lazy + } + duel = { + skill = diplomacy + target = scope:bp1_yearly_9023_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + scope:bp1_yearly_9023_friend = { + start_scheme = { + type = learn_language + target_character = root + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + progress_towards_rival_effect = { + REASON = rival_linguistic_request + CHARACTER = scope:bp1_yearly_9023_friend + OPINION = default_rival_opinion + } + } + } + stress_impact = { + diligent = major_stress_impact_gain + compassionate = major_stress_impact_gain + gregarious = major_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 2 + has_trait = lazy + } + } + } + + after = { + add_character_flag = had_event_bp1_yearly_9023 + } +} + +################################################# +# A friend visits you while you're sick # +# by James Beaumont # +# 9024 # +################################################# + +bp1_yearly.9024 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9024.t + desc = bp1_yearly.9024.desc + theme = diplomacy + override_background = feast + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:bp1_yearly_9024_friend + animation = personality_compassionate + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + has_short_disease_trigger = yes + any_relation = { + type = friend + is_available_at_peace_ai_adult = yes + OR = { + has_trait = compassionate + has_trait = diligent + has_trait = trusting + } + } + NOT = { + has_character_modifier = bp1_sickness_being_doted_on + } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + random_relation = { + type = friend + limit = { + is_available_at_peace_ai_adult = yes + OR = { + has_trait = compassionate + has_trait = diligent + has_trait = trusting + } + } + save_scope_as = bp1_yearly_9024_friend + } + } + + option = { # Relax + name = bp1_yearly.9024.a + add_character_modifier = { + modifier = bp1_sickness_being_doted_on + years = 5 + } + if = { + limit = { + NOR = { + has_trait = diligent + has_trait = paranoid + } + } + stress_impact = { + base = major_stress_impact_loss + } + } + stress_impact = { + shy = major_stress_impact_gain + diligent = major_stress_impact_gain + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = paranoid + } + } + } + } + + option = { # Tell them to leave you alone + name = bp1_yearly.9024.b + trigger = { + OR = { + has_trait = diligent + has_trait = shy + has_trait = paranoid + } + } + progress_towards_rival_effect = { + REASON = rival_told_to_go_away + CHARACTER = scope:bp1_yearly_9024_friend + OPINION = default_rival_opinion + } + stress_impact = { + trusting = major_stress_impact_gain + lazy = major_stress_impact_gain + gregarious = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = lazy + has_trait = gregarious + has_trait = compassionate + } + } + } + } +} + +################################################# +# You realise you hate your friend # +# by James Beaumont # +# 9025 # +################################################# + +bp1_yearly.9025 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9025.t + desc = bp1_yearly.9025.desc + theme = friendly + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:bp1_yearly_9025_friend + animation = happiness + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + exists = var:wrong_language_friend + has_relation_friend = var:wrong_language_friend + # You now know a common language + OR = { + knows_language_of_culture = var:wrong_language_friend.culture + var:wrong_language_friend = { knows_language_of_culture = root.culture } + } + var:wrong_language_friend = { + is_available_ai_adult = yes + } + # You have a reason to hate them + number_of_opposing_personality_traits = { + target = var:wrong_language_friend + value >= 1 + } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + var:wrong_language_friend = { + save_scope_as = bp1_yearly_9025_friend + } + } + + option = { # Wow, I hate this guy! + name = bp1_yearly.9025.a + downgrade_to_rival_effect = { + CHARACTER = scope:bp1_yearly_9025_friend + REASON = rival_better_understanding + } + stress_impact = { + gregarious = major_stress_impact_gain + trusting = major_stress_impact_gain + loyal = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = trusting + #has_trait = loyal + has_trait = compassionate + } + } + } + } + + option = { # Try to fix the relationship + name = bp1_yearly.9025.b + duel = { + skill = diplomacy + target = scope:bp1_yearly_9025_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9025_friend + OPINION = default_friend_opinion + REASON = friend_fix_relationship_success + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + progress_towards_rival_effect = { + REASON = rival_fix_relationship_fail + CHARACTER = scope:bp1_yearly_9025_friend + OPINION = default_rival_opinion + } + } + } + stress_impact = { + base = major_stress_impact_gain + shy = major_stress_impact_gain + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = lazy + has_trait = arrogant + } + } + } + } + + after = { remove_variable = wrong_language_friend } +} + +################################################# +# Totally not Marley's ghost # +# by James Beaumont # +# 9026 # +################################################# + +bp1_yearly.9026 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9026.t + desc = { + desc = bp1_yearly.9026.desc.intro + first_valid = { + triggered_desc = { + trigger = { + any_secret = { + type = secret_murder + } + exists = scope:bp1_yearly_9026_murder_victim + } + desc = bp1_yearly.9026.desc.secret_murderer + } + triggered_desc = { + trigger = { + has_trait = murderer + exists = scope:bp1_yearly_9026_murder_victim + } + desc = bp1_yearly.9026.desc.murderer + } + triggered_desc = { + trigger = { exists = scope:bp1_yearly_9026_murder_victim } + desc = bp1_yearly.9026.desc.killer + } + # Traits should be in descending order of severity. These should largely be sins that are very directly harmful to others. Greedy, wrathful, etc should be high while lustful and gluttonous should be low. + # High impact sins + triggered_desc = { + trigger = { + has_trait = greedy + faith = { trait_is_sin = greedy } + } + desc = bp1_yearly.9026.desc.greedy + } + triggered_desc = { + trigger = { + has_trait = wrathful + faith = { trait_is_sin = wrathful } + } + desc = bp1_yearly.9026.desc.wrathful + } + triggered_desc = { + trigger = { + has_trait = torturer + faith = { trait_is_sin = deceitful } # We don't make lifestyle traits sins/virtues so best to check an adjacent trait + } + desc = bp1_yearly.9026.desc.torturer + } + triggered_desc = { + trigger = { + has_trait = arbitrary + faith = { trait_is_sin = arbitrary } + } + desc = bp1_yearly.9026.desc.arbitrary + } + triggered_desc = { # Let's assume callous is basically always bad + trigger = { + has_trait = callous + NOT = { faith = { trait_is_virtue = callous } } + } + desc = bp1_yearly.9026.desc.callous + } + triggered_desc = { # Same for sadistic + trigger = { + has_trait = sadistic + NOT = { faith = { trait_is_virtue = sadistic } } + } + desc = bp1_yearly.9026.desc.sadistic + } + triggered_desc = { + trigger = { + has_trait = vengeful + faith = { trait_is_sin = vengeful } + } + desc = bp1_yearly.9026.desc.vengeful + } + # Medium impact sins + triggered_desc = { + trigger = { + has_trait = deceitful + faith = { trait_is_sin = deceitful } + } + desc = bp1_yearly.9026.desc.deceitful + } + triggered_desc = { + trigger = { + has_trait = impatient + faith = { trait_is_sin = impatient } + } + desc = bp1_yearly.9026.desc.impatient + } + triggered_desc = { + trigger = { + has_trait = arrogant + faith = { trait_is_sin = arrogant } + } + desc = bp1_yearly.9026.desc.arrogant + } + triggered_desc = { + trigger = { + has_trait = craven + faith = { trait_is_sin = craven } + } + desc = bp1_yearly.9026.desc.craven + } + triggered_desc = { + trigger = { + has_trait = ambitious + faith = { trait_is_sin = ambitious } + } + desc = bp1_yearly.9026.desc.ambitious + } + triggered_desc = { + trigger = { + has_trait = lazy + faith = { trait_is_sin = lazy } + } + desc = bp1_yearly.9026.desc.lazy + } + # Low impact sins + triggered_desc = { + trigger = { + has_trait = cynical + faith = { trait_is_sin = cynical } + } + desc = bp1_yearly.9026.desc.cynical + } + triggered_desc = { + trigger = { + has_trait = shy + faith = { trait_is_sin = shy } + } + desc = bp1_yearly.9026.desc.shy + } + triggered_desc = { + trigger = { + has_trait = gluttonous + faith = { trait_is_sin = gluttonous } + } + desc = bp1_yearly.9026.desc.gluttonous + } + triggered_desc = { + trigger = { + has_trait = lustful + faith = { trait_is_sin = lustful } + } + desc = bp1_yearly.9026.desc.lustful + } + triggered_desc = { + trigger = { + has_trait = temperate + faith = { trait_is_sin = temperate } + } + desc = bp1_yearly.9026.desc.temperate + } + triggered_desc = { + trigger = { + has_trait = chaste + faith = { trait_is_sin = chaste } + } + desc = bp1_yearly.9026.desc.chaste + } + triggered_desc = { + trigger = { + has_trait = honest + faith = { trait_is_sin = honest } + } + desc = bp1_yearly.9026.desc.honest + } + desc = bp1_yearly.9026.desc.fallback + } + desc = bp1_yearly.9026.desc.outro + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = lantern + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:bp1_yearly_9026_dead_friend + animation = laugh + animate_if_dead = yes + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9026 } + OR = { + any_killed_character = { } + num_sinful_traits >= 1 + AND = { + has_trait = sadistic + NOT = { faith = { trait_is_virtue = sadistic } } + } + AND = { + has_trait = callous + NOT = { faith = { trait_is_virtue = callous } } + } + } + any_memory = { + memory_type = friend_died + } + } + + immediate = { + if = { + limit = { + any_killed_character = { } + } + if = { + limit = { + any_secret = { + type = secret_murder + } + } + random_secret = { + type = secret_murder + secret_target = { + save_scope_as = bp1_yearly_9026_murder_victim + } + } + } + else_if = { + limit = { + has_trait = murderer + any_killed_character = { + death_reason = death_murder + } + } + random_killed_character = { + limit = { + death_reason = death_murder + } + save_scope_as = bp1_yearly_9026_murder_victim + } + } + else = { + random_killed_character = { + save_scope_as = bp1_yearly_9026_murder_victim + } + } + } + random_memory = { + memory_type = friend_died + limit = { + exists = memory_participant:dead_relation + } + save_scope_as = dead_friend_memory + memory_participant:dead_relation = { save_scope_as = bp1_yearly_9026_dead_friend } + } + create_story = story_being_visited_by_angry_ghosts + random_owned_story = { + type = story_being_visited_by_angry_ghosts + set_variable = { + name = first_ghost + value = scope:bp1_yearly_9026_dead_friend + } + set_variable = { + name = good_deeds + value = 0 + } + save_scope_as = marley_story_cycle_scope + } + create_character_memory = { + type = haunted_by_a_friend_memory + participants = { + dead_relation = scope:bp1_yearly_9026_dead_friend + } + } + } + + option = { # I repent! I repent! + name = bp1_yearly.9026.a + add_piety = medium_piety_gain + bp1_yearly_9026_determine_sin_and_virtue = yes + stress_impact = { + base = major_stress_impact_gain + arrogant = major_stress_impact_gain + cynical = major_stress_impact_gain + zealous = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = cynical + } + } + } + } + + option = { # There's more of gravy than of grave about you! + name = bp1_yearly.9026.b + duel = { + skill = learning + target = scope:bp1_yearly_9026_dead_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + stress_impact = { + cynical = major_stress_impact_loss + } + scope:marley_story_cycle_scope = { end_story = yes } + custom_tooltip = end_marley_ghost_story_tt + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + add_piety = medium_piety_loss + bp1_yearly_9026_determine_sin_and_virtue = yes + } + } + stress_impact = { + base = minor_stress_impact_gain + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + } + } + } + } + + + after = { add_character_flag = had_event_bp1_yearly_9026 } +} + +# Your act of repentance: generosity +bp1_yearly.9027 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9027.t + desc = { + desc = bp1_yearly.9027.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_trait = greedy + faith = { trait_is_sin = greedy } + } + desc = bp1_yearly.9027.desc.greedy + } + desc = bp1_yearly.9027.desc.fallback + } + desc = bp1_yearly.9027.desc.outro + } + theme = stewardship + override_background = market + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:bp1_yearly_9027_peasant_begger + animation = beg + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9026 + NOT = { has_character_flag = had_event_bp1_yearly_9027 } + } + + immediate = { + create_character = { + template = generic_peasant_character + location = root.capital_province + save_scope_as = bp1_yearly_9027_peasant_begger + } + random_owned_story = { + type = story_being_visited_by_angry_ghosts + var:first_ghost = { + save_scope_as = bp1_yearly_9027_dead_friend + } + } + } + + option = { # Stay true to your repentance + name = bp1_yearly.9027.a + remove_short_term_gold = medium_gold_value + add_piety = medium_piety_gain + root.capital_county = { + add_county_modifier = { + modifier = invested_in_province_modifier + years = 5 + } + } + # For determining final event + bp1_increase_good_deeds = yes + stress_impact = { + arrogant = medium_stress_impact_gain + greedy = major_stress_impact_gain + cynical = major_stress_impact_gain + zealous = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + short_term_gold < medium_gold_value + factor = 0 + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = greedy + has_trait = cynical + } + } + } + } + + option = { # Take advantage of their desperate situation + name = bp1_yearly.9027.b + trigger = { + OR = { + has_trait = greedy + has_trait = callous + } + } + remove_short_term_gold = minor_gold_value + add_piety = medium_piety_loss + root.capital_county = { + add_county_modifier = { + modifier = exploitative_lord_modifier + years = 5 + } + } + # For determining final event + bp1_decrease_good_deeds = yes + stress_impact = { + just = medium_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = major_stress_impact_gain + generous = massive_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + short_term_gold < minor_gold_value + factor = 0 + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + has_trait = humble + has_trait = generous + } + } + } + } + + option = { # You want HOW much?? + name = bp1_yearly.9027.c + add_piety = medium_piety_loss + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + generous = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + has_trait = humble + has_trait = generous + } + } + } + } + + after = { + add_character_flag = had_event_bp1_yearly_9027 + scope:bp1_yearly_9027_peasant_begger = { + silent_disappearance_effect = yes + } + } +} + +# Ghostly visit: rival + +bp1_yearly.9028 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9028.t + desc = { + desc = bp1_yearly.9028.desc.intro + first_valid = { + triggered_desc = { + trigger = { + any_killed_character = { + this = scope:bp1_yearly_9028_dead_rival + } + } + desc = bp1_yearly.9028.desc.murderer + } + desc = bp1_yearly.9028.desc.murderer.fallback + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = vengeful + } + } + desc = bp1_yearly.9028.desc.callous + } + desc = bp1_yearly.9028.desc.fallback + } + desc = bp1_yearly.9028.desc.outro + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = fear + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:bp1_yearly_9028_dead_rival + animation = anger + animate_if_dead = yes + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9027 + NOT = { has_character_flag = had_event_bp1_yearly_9028 } + OR = { + any_memory = { + memory_type = rival_died + memory_participant:dead_relation = { any_close_or_extended_family_member = { is_alive = yes } } + } + any_memory = { + memory_type = successful_murder + memory_participant:victim = { any_close_or_extended_family_member = { is_alive = yes } } + } + } + any_owned_story = { + type = story_being_visited_by_angry_ghosts + NOT = { exists = var:second_ghost } + } + } + + immediate = { + if = { + limit = { + any_memory = { + memory_type = rival_died + memory_participant:dead_relation = { any_close_or_extended_family_member = { is_alive = yes } } + } + } + random_memory = { + memory_type = rival_died + save_scope_as = dead_rival_memory + memory_participant:dead_relation = { save_scope_as = bp1_yearly_9028_dead_rival } + } + } + else_if = { + limit = { + any_memory = { + memory_type = successful_murder + memory_participant:victim = { any_close_or_extended_family_member = { is_alive = yes } } + } + } + random_memory = { + memory_type = successful_murder + save_scope_as = dead_rival_memory + memory_participant:victim = { save_scope_as = bp1_yearly_9028_dead_rival } + } + } + random_owned_story = { + type = story_being_visited_by_angry_ghosts + set_variable = { + name = second_ghost + value = scope:bp1_yearly_9028_dead_rival + } + } + create_character_memory = { + type = haunted_by_a_rival_memory + participants = { + dead_relation = scope:bp1_yearly_9028_dead_rival + } + } + } + + option = { # I repent! I repent! + name = bp1_yearly.9028.a + add_piety = medium_piety_gain + add_character_flag = had_event_bp1_promised_to_ammend_rivalry + bp1_increase_good_deeds = yes + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + zealous = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + has_trait = cynical + } + } + } + } + + option = { # Not a chance! + name = bp1_yearly.9028.b + bp1_decrease_good_deeds = yes + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9028 } +} + +# Ghostly visit: parent + +bp1_yearly.9029 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9029.t + desc = { + desc = bp1_yearly.9029.desc.intro + first_valid = { + triggered_desc = { + trigger = { + any_sibling = { + any_parent = { this = scope:bp1_yearly_9029_dead_parent } + has_relation_rival = root + } + } + desc = bp1_yearly.9029.desc.rival_sibling + } + triggered_desc = { + trigger = { + any_sibling = { + has_relation_rival = root + } + } + desc = bp1_yearly.9029.desc.rival_sibling_unrelated + } + triggered_desc = { + trigger = { + any_relation = { + type = rival + } + } + desc = bp1_yearly.9029.desc.rival + } + } + desc = bp1_yearly.9029.desc.outro + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = shock + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:bp1_yearly_9029_dead_parent + animation = personality_compassionate + animate_if_dead = yes + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9027 + NOT = { has_character_flag = had_event_bp1_yearly_9029 } + any_parent = { + even_if_dead = yes + is_alive = no + } + any_relation = { + type = rival + } + any_owned_story = { + type = story_being_visited_by_angry_ghosts + NOT = { exists = var:second_ghost } + } + } + + immediate = { + random_parent = { + even_if_dead = yes + limit = { + is_alive = no + } + save_scope_as = bp1_yearly_9029_dead_parent + } + if = { + limit = { + any_sibling = { + any_parent = { this = scope:bp1_yearly_9029_dead_parent } + has_relation_rival = root + } + } + random_sibling = { + limit = { + any_parent = { this = scope:bp1_yearly_9029_dead_parent } + has_relation_rival = root + } + save_scope_as = bp1_yearly_9029_rival + } + } + else_if = { + limit = { + any_sibling = { + has_relation_rival = root + } + } + random_sibling = { + limit = { + has_relation_rival = root + } + save_scope_as = bp1_yearly_9029_rival + } + } + else_if = { + limit = { + any_relation = { + type = rival + } + } + random_relation = { + type = rival + save_scope_as = bp1_yearly_9029_rival + } + } + create_character_memory = { + type = haunted_by_parent_memory + participants = { + dead_relation = scope:bp1_yearly_9029_dead_parent + } + } + } + + option = { # I'll go be nice to my rival + name = bp1_yearly.9029.a + add_piety = medium_piety_gain + random_owned_story = { + type = story_being_visited_by_angry_ghosts + set_variable = { + name = second_ghost + value = scope:bp1_yearly_9029_dead_parent + } + set_variable = { + name = rival_ammends + value = scope:bp1_yearly_9029_rival + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + zealous = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + } + } + } + } + + option = { # Not a chance! + name = bp1_yearly.9029.b + random_owned_story = { + type = story_being_visited_by_angry_ghosts + set_variable = { + name = second_ghost + value = scope:bp1_yearly_9029_dead_parent + } + } + bp1_decrease_good_deeds = yes + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9029 } +} + +# Ghostly visit: dead friend again + +bp1_yearly.9030 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9030.t + desc = { + desc = bp1_yearly.9030.desc.intro + first_valid = { + triggered_desc = { + trigger = { + #Check Pilgrimage triggers + is_available_adult = yes + is_at_war = no + is_landed = yes + faith = { + NOT = { has_doctrine_parameter = forbidden_from_pilgrimage } + any_holy_site = { exists = this } + } + #Check if all of your holy sites are on cooldown + trigger_if = { + limit = { + any_memory = { + has_variable = pilgrimage_destination + memory_age_years < 5 + } + } + faith = { + any_holy_site = { + save_temporary_scope_as = site_check + NOT = { + root = { + any_memory = { + has_variable = pilgrimage_destination + memory_age_years < 5 + var:pilgrimage_destination.barony = scope:site_check + } + } + } + add_to_temporary_list = holy_sites_not_on_cooldown + } + } + any_in_list = { + list = holy_sites_not_on_cooldown + count > 0 + } + } + trigger_else = { always = yes } + } + desc = bp1_yearly.9030.desc.pilgrimage + } + desc = bp1_yearly.9030.desc.fallback + } + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = beg + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:bp1_yearly_9026_dead_friend + animation = anger + animate_if_dead = yes + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9027 + NOT = { has_character_flag = had_event_bp1_yearly_9030 } + any_owned_story = { + type = story_being_visited_by_angry_ghosts + NOT = { exists = var:second_ghost } + } + } + + immediate = { + random_owned_story = { + type = story_being_visited_by_angry_ghosts + var:first_ghost = { save_scope_as = bp1_yearly_9026_dead_friend } + set_variable = { + name = second_ghost + value = scope:bp1_yearly_9026_dead_friend + } + } + } + + option = { # I'll go on pilgrimage/become a big charity guy + name = bp1_yearly.9030.a + if = { + limit = { + #Only one modifier for _you_ + NOR = { + has_character_modifier = ghost_pilgrimage_promised_modifier + has_character_modifier = hajj_promised_modifier + has_character_modifier = pilgrimage_promised_modifier + } + #Check Pilgrimage triggers + is_available_adult = yes + is_at_war = no + is_landed = yes + faith = { + NOT = { has_doctrine_parameter = forbidden_from_pilgrimage } + any_holy_site = { exists = this } + } + #Check if all of your holy sites are on cooldown + trigger_if = { + limit = { + any_memory = { + has_variable = pilgrimage_destination + memory_age_years < 5 + } + } + faith = { + any_holy_site = { + save_temporary_scope_as = site_check + NOT = { + root = { + any_memory = { + has_variable = pilgrimage_destination + memory_age_years < 5 + var:pilgrimage_destination.barony = scope:site_check + } + } + } + add_to_temporary_list = holy_sites_not_on_cooldown + } + } + any_in_list = { + list = holy_sites_not_on_cooldown + count > 0 + } + } + trigger_else = { always = yes } + } + custom_tooltip = { + text = bp1_yearly.9030.a.tt_pilgrimage + add_character_modifier = ghost_pilgrimage_promised_modifier + } + } + else = { + add_trait = profligate + remove_short_term_gold = medium_gold_value + add_stress = medium_stress_loss + } + bp1_increase_good_deeds = yes + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + zealous = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + } + } + } + } + + option = { # Not a chance! + name = bp1_yearly.9030.b + bp1_decrease_good_deeds = yes + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9030 } +} + +# Redemption: making ammends with rival's family + +bp1_yearly.9031 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9031.t + desc = { + desc = bp1_yearly.9031.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + OR = { + has_trait = sadistic + has_trait = torturer + has_trait = flagellant + } + } + } + desc = bp1_yearly.9031.desc.flagellant + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + OR = { + has_trait = vengeful + has_trait = just + has_trait = zealous + } + } + } + desc = bp1_yearly.9031.desc.debate + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + OR = { + has_trait = lazy + has_trait = arbitrary + } + } + } + desc = bp1_yearly.9031.desc.cleanup + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + has_trait = forgiving + } + } + desc = bp1_yearly.9031.desc.unconditional + } + desc = bp1_yearly.9031.desc.fallback + } + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = beg + } + right_portrait = { + character = scope:bp1_yearly_9031_rival_family + animation = anger + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9028 + any_owned_story = { + type = story_being_visited_by_angry_ghosts + exists = var:second_ghost + var:second_ghost = { + any_close_or_extended_family_member = { } + } + } + has_character_flag = had_event_bp1_promised_to_ammend_rivalry + } + + immediate = { + random_owned_story = { + type = story_being_visited_by_angry_ghosts + var:second_ghost = { + save_scope_as = bp1_yearly_9031_rival + random_close_or_extended_family_member = { + save_scope_as = bp1_yearly_9031_rival_family + } + } + } + } + + option = { # Grit my teeth and apologise + name = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + has_trait = forgiving + } + } + text = bp1_yearly.9031.a.forgiven + } + name = bp1_yearly.9031.a + bp1_increase_good_deeds = yes + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9031_rival_family + OPINION = default_friend_opinion + REASON = friend_forgiven_transgression + } + if = { + limit = { + scope:bp1_yearly_9031_rival_family = { + OR = { + has_trait = sadistic + has_trait = torturer + has_trait = flagellant + } + } + } + increase_wounds_effect = { REASON = whipping } + } + else_if = { + limit = { + scope:bp1_yearly_9031_rival_family = { + OR = { + has_trait = vengeful + has_trait = just + has_trait = zealous + } + } + } + duel = { + skill = learning + target = scope:bp1_yearly_9031_rival_family + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + add_piety = medium_piety_gain + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9031_rival_family + OPINION = default_friend_opinion + REASON = friend_debate_win + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + add_piety = medium_piety_loss + } + } + } + else_if = { + limit = { + scope:bp1_yearly_9031_rival_family = { + NOT = { has_trait = forgiving } + } + NOT = { has_trait = humble } + } + add_prestige = medium_prestige_loss + } + stress_impact = { + base = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + zealous = minor_stress_impact_loss + forgiving = medium_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + } + } + } + } + + option = { # I will not grovel! + name = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + has_trait = forgiving + } + } + text = bp1_yearly.9031.b.forgiven + } + name = bp1_yearly.9031.b + bp1_decrease_good_deeds = yes + progress_towards_rival_effect = { + REASON = rival_not_grovel + CHARACTER = scope:bp1_yearly_9031_rival_family + OPINION = default_rival_opinion + } + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9031 } +} + +# Redemption: making ammends with rival + +bp1_yearly.9032 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9032.t + desc = bp1_yearly.9032.desc + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = beg + } + right_portrait = { + character = scope:bp1_yearly_9032_rival + animation = anger + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9028 + any_owned_story = { + type = story_being_visited_by_angry_ghosts + exists = var:second_ghost + exists = var:rival_ammends + } + } + + immediate = { + random_owned_story = { + type = story_being_visited_by_angry_ghosts + var:rival_ammends = { + save_scope_as = bp1_yearly_9032_rival + } + } + } + + option = { # Grit my teeth and apologise + name = bp1_yearly.9032.a + bp1_increase_good_deeds = yes + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9032_rival + OPINION = default_friend_opinion + REASON = friend_apologise + } + stress_impact = { + base = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + zealous = minor_stress_impact_loss + forgiving = medium_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + } + } + } + } + + option = { # I will not grovel! + name = bp1_yearly.9032.b + bp1_decrease_good_deeds = yes + progress_towards_rival_effect = { + REASON = rival_not_grovel + CHARACTER = scope:bp1_yearly_9032_rival + OPINION = default_rival_opinion + } + scope:bp1_yearly_9032_rival = { + increase_wounds_effect = { REASON = fight } + } + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9032 } +} + +# Ending event, first ghost tells you how you did + +bp1_yearly.9033 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9033.t + desc = { + desc = bp1_yearly.9033.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:ghost_story_scope = { + var:good_deeds >= 1 + } + } + desc = bp1_yearly.9033.desc.did_well + } + triggered_desc = { + trigger = { + scope:ghost_story_scope = { + var:good_deeds <= 0 + } + } + desc = bp1_yearly.9033.desc.did_bad + } + desc = bp1_yearly.9033.desc.did_okay + } + desc = bp1_yearly.9033.desc.outro + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = beg + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:bp1_yearly_9026_dead_friend + triggered_animation = { + trigger = { + scope:ghost_story_scope = { + var:good_deeds <= 0 + } + } + animation = anger + } + triggered_animation = { + trigger = { + scope:ghost_story_scope = { + var:good_deeds > 0 + } + } + animation = personality_compassionate + } + animate_if_dead = yes + } + + trigger = { + is_available_at_peace_adult = yes + OR = { + has_character_flag = had_event_bp1_yearly_9030 + has_character_flag = had_event_bp1_yearly_9031 + has_character_flag = had_event_bp1_yearly_9032 + } + any_owned_story = { + type = story_being_visited_by_angry_ghosts + exists = var:second_ghost + } + } + + immediate = { + random_owned_story = { + type = story_being_visited_by_angry_ghosts + save_scope_as = ghost_story_scope + var:first_ghost = { save_scope_as = bp1_yearly_9026_dead_friend } + } + } + + option = { # I did it! + name = bp1_yearly.9033.a + trigger = { + scope:ghost_story_scope = { + var:good_deeds > 0 + } + } + add_piety = medium_piety_gain + + stress_impact = { + base = massive_stress_impact_loss + cynical = medium_stress_impact_gain # Offset if you're cynical; you believe it less + } + } + + option = { # I failed + name = bp1_yearly.9033.b + trigger = { + scope:ghost_story_scope = { + var:good_deeds <= 0 + } + } + add_piety = medium_piety_loss + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + } + + option = { # I will live every day like it's spooky ghost day! + name = bp1_yearly.9033.c + trigger = { + scope:ghost_story_scope = { + var:good_deeds > 1 + } + } + add_piety = major_piety_gain + if = { + limit = { + any_owned_story = { + type = story_being_visited_by_angry_ghosts + var:trait_to_gain = 1 + } + } + if = { + limit = { has_trait = greedy } + remove_trait = greedy + } + add_trait = generous + } + else_if = { + limit = { + any_owned_story = { + type = story_being_visited_by_angry_ghosts + var:trait_to_gain = 2 + } + } + if = { + limit = { has_trait = vengeful } + remove_trait = vengeful + } + add_trait = forgiving + } + else_if = { + limit = { + any_owned_story = { + type = story_being_visited_by_angry_ghosts + var:trait_to_gain = 3 + } + } + if = { + limit = { has_trait = callous } + remove_trait = callous + } + if = { + limit = { has_trait = sadistic } + remove_trait = sadistic + } + add_trait = compassionate + } + stress_impact = { + base = medium_stress_impact_gain + cynical = medium_stress_impact_gain # Offset if you're cynical; you believe it less + } + } + + after = { scope:ghost_story_scope ?= { end_story = yes } } +} + +# End of ghostly visit chain + +##################################### +# Watery bog witch # +# by James Beaumont # +# 9034 # +##################################### + +bp1_yearly.9034 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9034.t + desc = { + desc = bp1_yearly.9034.desc.intro + #What text we display depends on the relationship to the child + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9034_witch = { has_trait = giant } + } + desc = bp1_yearly.9034.desc.giant + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9034_witch = { has_trait = hunchbacked } + } + desc = bp1_yearly.9034.desc.hunchbacked + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9034_witch = { has_trait = beauty_bad } + } + desc = bp1_yearly.9034.desc.beauty_bad + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9034_witch = { has_trait = albino } + } + desc = bp1_yearly.9034.desc.albino + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9034_witch = { has_trait = scaly } + } + desc = bp1_yearly.9034.desc.scaly + } + } + desc = bp1_yearly.9034.desc.outro + } + theme = witchcraft + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = fear + } + lower_left_portrait = { + character = scope:bp1_yearly_9034_friend + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9034_witch + animation = rage + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + is_adult = no + OR = { + any_held_county = { + county_has_province_with_terrain = { terrain = wetlands } + } + location = { terrain = wetlands } + } + any_relation = { + type = friend + is_adult = no + is_available_ai = yes + } + any_relation = { + type = guardian + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + + } + + immediate = { + if = { + limit = { + any_held_county = { + county_has_province_with_terrain = { terrain = wetlands } + } + } + random_held_county = { + limit = { + county_has_province_with_terrain = { terrain = wetlands } + } + random_county_province = { + limit = { terrain = wetlands } + save_scope_as = bp1_yearly_9034_swampy_location + } + } + } + else = { + location = { save_scope_as = bp1_yearly_9034_swampy_location } + } + random_relation = { + type = friend + limit = { + is_adult = no + is_available_ai = yes + } + save_scope_as = bp1_yearly_9034_friend + } + random_relation = { + type = guardian + limit = { + is_available_ai_adult = yes + } + save_scope_as = bp1_yearly_9034_guardian + } + create_character = { + template = witchy_template + random_traits_list = { + count = 1 + giant = {} + hunchbacked = {} + beauty_bad_1 = {} + beauty_bad_2 = {} + beauty_bad_3 = {} + albino = {} + scaly = {} + } + location = scope:bp1_yearly_9034_swampy_location + save_scope_as = bp1_yearly_9034_witch + } + } + + option = { # Run from the horrifying bog witch! + name = bp1_yearly.9034.a + duel = { + skill = prowess + target = scope:bp1_yearly_9034_witch + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + send_interface_toast = { + title = 9034_escaped_witch + left_icon = root + right_icon = scope:bp1_yearly_9034_witch + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = 9034_failed_to_escape + left_icon = root + right_icon = scope:bp1_yearly_9034_witch + increase_wounds_no_death_effect = { REASON = duel } + } + } + } + create_character_memory = { + type = chased_by_bog_witch_memory + participants = { + witch = scope:bp1_yearly_9034_witch + } + } + scope:bp1_yearly_9034_witch = { + silent_disappearance_effect = yes + } + stress_impact = { + brave = medium_stress_impact_gain + rowdy = medium_stress_impact_gain + curious = minor_stress_impact_gain + } + } + + option = { # Stand your ground like you're facing down a wolf + name = bp1_yearly.9034.b + custom_tooltip = { + text = bp1_yearly_9034_witchy_goodbad_tt + random_list = { + # The good witch of the bog + 60 = { + modifier = { + factor = 0 + has_trait = wrathful + } + modifier = { + factor = 2 + OR = { + has_trait = honest + has_trait = generous + has_trait = forgiving + has_trait = calm + has_trait = patient + } + } + trigger_event = bp1_yearly.9035 + } + # The wicked witch of the bog + 40 = { + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 0.5 + OR = { + has_trait = honest + has_trait = generous + has_trait = forgiving + has_trait = calm + has_trait = patient + } + } + trigger_event = bp1_yearly.9036 + } + } + } + stress_impact = { + craven = massive_stress_impact_gain + pensive = major_stress_impact_gain + bossy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + } +} + +# Good witch event + +bp1_yearly.9035 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9035.t + desc = bp1_yearly.9035.desc + theme = witchcraft + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9034_witch + animation = personality_forgiving + } + + immediate = { + scope:bp1_yearly_9034_witch = { + add_trait = lifestyle_herbalist + } + if = { + limit = { + employs_court_position = court_physician_court_position + } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = current_physician + } + } + create_character_memory = { + type = met_a_nice_witch_memory + participants = { + witch = scope:bp1_yearly_9034_witch + } + } + } + + option = { # Employ the witch as your physician + name = bp1_yearly.9035.a + add_courtier = scope:bp1_yearly_9034_witch + court_position_grant_effect = { + POS = court_physician + CANDIDATE = scope:bp1_yearly_9034_witch + EMPLOYER = root + } + stress_impact = { + pensive = major_stress_impact_gain + bossy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 30 + modifier = { + factor = 0 + OR = { + has_trait = pensive + has_trait = bossy + has_trait = zealous + } + } + modifier = { + factor = 0 + employs_court_position = court_physician_court_position + } + } + } + + option = { # Teach me how to witch + name = bp1_yearly.9035.b + trigger = { # Only players should be able to override their guardian + is_ai = no + } + add_courtier = scope:bp1_yearly_9034_witch + give_witch_secret_or_trait_effect = yes + set_relation_guardian = scope:bp1_yearly_9034_witch + set_relation_friend = { reason = friend_deviant_fun target = scope:bp1_yearly_9034_witch } + stress_impact = { + pensive = major_stress_impact_gain + bossy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + } + + option = { # kbye + name = bp1_yearly.9035.c + scope:bp1_yearly_9034_witch = { + silent_disappearance_effect = yes + } + ai_chance = { + base = 30 + modifier = { + factor = 0 + NOT = { employs_court_position = court_physician_court_position } + } + } + } +} + +# Evil witch event + +bp1_yearly.9036 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9036.t + desc = bp1_yearly.9036.desc + theme = witchcraft + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9034_witch + animation = rage + } + + option = { # Guardian, help me! + name = bp1_yearly.9036.a + scope:bp1_yearly_9034_guardian = { + duel = { + skill = prowess + target = scope:bp1_yearly_9034_witch + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + root = { + send_interface_toast = { + title = bp1_yearly.9036.guardian_wins + scope:bp1_yearly_9034_guardian = { + if = { + limit = { + can_add_hook = { + target = root + type = favor_hook + } + } + add_hook = { + target = root + type = favor_hook + } + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + root = { + send_interface_toast = { + title = bp1_yearly.9036.guardian_loses + increase_wounds_effect = { REASON = duel } + } + } + } + } + } + create_character_memory = { + type = assaulted_by_a_witch_memory + participants = { + witch = scope:bp1_yearly_9034_witch + } + } + ai_chance = { + base = 10 + } + } +} + + +##################################### +# Bog mummy # +# by James Beaumont # +# 9037 # +##################################### + +bp1_yearly.9037 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9037.t + desc = bp1_yearly.9037.desc + theme = skull + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9037_corpse + animation = idle + } + lower_left_portrait = scope:bp1_yearly_9037_guardian + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + is_adult = no + NOT = { + has_character_flag = had_event_bp1_yearly_9037 + } + OR = { + any_held_county = { + county_has_province_with_terrain = { terrain = wetlands } + } + location = { terrain = wetlands } + } + any_relation = { + type = guardian + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + + } + + immediate = { + if = { + limit = { + any_held_county = { + county_has_province_with_terrain = { terrain = wetlands } + } + } + random_held_county = { + limit = { + county_has_province_with_terrain = { terrain = wetlands } + } + random_county_province = { + limit = { terrain = wetlands } + save_scope_as = bp1_yearly_9037_swampy_location + } + } + } + else = { + location = { save_scope_as = bp1_yearly_9037_swampy_location } + } + random_relation = { + type = guardian + limit = { + is_available_ai_adult = yes + } + save_scope_as = bp1_yearly_9037_guardian + } + if = { # If the guardian has killed anyone, use their body + limit = { + scope:bp1_yearly_9037_guardian = { + any_secret = { + type = secret_murder + } + } + } + scope:bp1_yearly_9037_guardian = { + random_secret = { + type = secret_murder + save_scope_as = bp1_yearly_9037_guardian_secret + secret_target = { save_scope_as = bp1_yearly_9037_corpse } + } + } + } + else = { # Otherwise make a new body + create_character = { + template = servant_character + location = scope:bp1_yearly_9037_swampy_location + save_scope_as = bp1_yearly_9037_corpse + } + scope:bp1_yearly_9037_corpse = { + death = { death_reason = death_drowned } + } + } + create_character_memory = { + type = found_a_bog_corpse_memory + participants = { + corpse = scope:bp1_yearly_9037_corpse + } + } + } + + option = { # Guardian, I found a body! + name = bp1_yearly.9037.a + custom_tooltip = bp1_yearly.9037.custom + hidden_effect = { + random_list = { + 50 = { + trigger = { + scope:bp1_yearly_9037_guardian = { + any_secret = { + type = secret_murder + } + } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = vengeful } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = honest } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = sadistic } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = callous } + } + trigger_event = bp1_yearly.9038 + } + 50 = { + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = forgiving } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = deceitful } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = compassionate } + } + trigger_event = bp1_yearly.9039 + } + } + } + stress_impact = { + craven = massive_stress_impact_gain + pensive = major_stress_impact_gain + bossy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Run away in terror + name = bp1_yearly.9037.b + stress_impact = { + base = 5 + brave = medium_stress_impact_gain + rowdy = medium_stress_impact_gain + curious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + after = { add_character_flag = had_event_bp1_yearly_9037 } +} + +# Guardian admits they killed someone + +bp1_yearly.9038 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9038.t + desc = { + desc = bp1_yearly.9038.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9037_guardian = { + has_character_flag = bp1_yearly_9037_killer_guardian + } + } + desc = bp1_yearly.9038.desc.killer + } + desc = bp1_yearly.9038.desc.not_killer + } + } + theme = skull + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9037_guardian + animation = rage + } + lower_left_portrait = scope:bp1_yearly_9037_corpse + + weight_multiplier = { + base = 1 + } + + immediate = { + random_list = { + 50 = { + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = vengeful } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = callous } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = sadistic } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = wrathful } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = arbitrary } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = craven } + } + scope:bp1_yearly_9037_guardian = { + add_character_flag = { + flag = bp1_yearly_9037_killer_guardian + years = 1 + } + } + } + 50 = { + modifier = { + factor = 0 + scope:bp1_yearly_9037_guardian = { has_trait = paranoid } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = compassionate } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = forgiving } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = trusting } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = just } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = content } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = calm } + } + } + } + } + + option = { # Wow, thanks for telling me that. + name = bp1_yearly.9038.a + trigger = { + NOT = { + scope:bp1_yearly_9037_guardian = { + has_character_flag = bp1_yearly_9037_killer_guardian + } + } + } + scope:bp1_yearly_9037_guardian_secret = { + reveal_to = root + } + ai_chance = { + base = 10 + } + } + + option = { # Run! + name = bp1_yearly.9038.b + trigger = { + scope:bp1_yearly_9037_guardian = { + has_character_flag = bp1_yearly_9037_killer_guardian + } + } + scope:bp1_yearly_9037_guardian_secret = { + expose_secret = root + } + add_prestige = minor_prestige_loss + stress_impact = { + brave = medium_stress_impact_gain + trusting = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + curious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Try to throw them in the bog instead + name = bp1_yearly.9038.c + trigger = { + scope:bp1_yearly_9037_guardian = { + has_character_flag = bp1_yearly_9037_killer_guardian + } + } + scope:bp1_yearly_9037_guardian_secret = { + reveal_to = root + } + duel = { + skill = prowess + target = scope:bp1_yearly_9037_guardian + 70 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + send_interface_toast = { + title = 9038_killed_guardian + left_icon = root + right_icon = scope:bp1_yearly_9037_guardian + scope:bp1_yearly_9037_guardian = { + death = { death_reason = death_drowned } + } + create_character_memory = { + type = successful_murder + participants = { + victim = scope:bp1_yearly_9037_guardian + } + } + add_prestige = major_prestige_gain + } + } + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + send_interface_toast = { + title = 9038_guardian_kills_you + left_icon = root + right_icon = scope:bp1_yearly_9037_guardian + unknown_murder_effect = { VICTIM = root MURDERER = scope:bp1_yearly_9037_guardian REASON = death_murder } + } + } + } + stress_impact = { + craven = major_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = medium_stress_impact_gain + pensive = medium_stress_impact_gain + rowdy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } +} + +bp1_yearly.9039 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9039.t + desc = bp1_yearly.9039.desc + theme = skull + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:bp1_yearly_9037_guardian + animation = disbelief + } + lower_left_portrait = scope:bp1_yearly_9037_corpse + + option = { # Throw the bones in a box! + name = bp1_yearly.9039.a + create_artifact = { + name = box_of_boggy_bones + description = box_of_boggy_bones_desc + type = miscellaneous + visuals = small_box + modifier = artifact_dread_gain_mult_2_modifier + modifier = artifact_intrigue_per_stress_level_1_modifier + } + ai_chance = { + base = 10 + } + } + + option = { # Spread ghost stories about the bog man + name = bp1_yearly.9039.b + scope:bp1_yearly_9037_swampy_location = { + county = { + add_county_modifier = { + modifier = ghost_stories_modifier + years = 10 + } + } + } + ai_chance = { + base = 10 + } + } +} + + +##################################### +# Haunted by your lover # +# by James Beaumont # +# 9040 # +##################################### + +bp1_yearly.9040 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9040.t + desc = bp1_yearly.9040.desc + theme = seduction + override_background = corridor_night + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:bp1_yearly_9040_dead_lover + animation = flirtation_left + animate_if_dead = yes + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_adult = yes + any_memory = { + OR = { + has_memory_type = lover_died + has_memory_type = soulmate_died + } + } + NOT = { + has_character_flag = had_event_bp1_yearly_9040 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_memory = { + limit = { + OR = { + has_memory_type = lover_died + has_memory_type = soulmate_died + } + } + memory_participant:dead_relation = { + save_scope_as = bp1_yearly_9040_dead_lover + } + } + } + + option = { # Shag the sexy ghost + name = bp1_yearly.9040.a + add_character_modifier = { + modifier = bp1_indulging_ghost_sex + years = 5 + } + stress_impact = { + base = major_stress_impact_loss + lustful = major_stress_impact_loss + chaste = minor_stress_impact_gain + loyal = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Withhold your desires, save yourself for your new spouse/lover + name = bp1_yearly.9040.b + add_character_modifier = { + modifier = bp1_withholding_ghost_sex + years = 5 + } + stress_impact = { + base = minor_stress_impact_gain + lustful = major_stress_impact_gain + compassionate = medium_stress_impact_gain + chaste = minor_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + after = { add_character_flag = had_event_bp1_yearly_9040 } +} + +##################################### +# Bonding over a dead parent # +# by James Beaumont # +# 9041 # +##################################### + +bp1_yearly.9041 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9041.t + desc = bp1_yearly.9041.desc + theme = family + override_background = { reference = corridor_day } + left_portrait = { + character = root + animation = personality_compassionate + } + right_portrait = { + character = scope:bp1_yearly_9041_sibling + animation = grief + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + is_adult = no + age >= 6 + NOT = { + has_character_flag = had_event_bp1_yearly_9041 + } + any_sibling = { + is_available_ai = yes + # Check that they have had a potential friendship-building event already, else this will be extremely common + has_relation_potential_friend = root + age >= 6 + any_parent = { + even_if_dead = yes + # Check that they're dead + is_alive = no + # Make sure it's a shared parent + is_parent_of = root + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_sibling = { + limit = { + is_available_ai = yes + has_relation_potential_friend = root + age >= 6 + any_parent = { + even_if_dead = yes + # Check that they're dead + is_alive = no + # Make sure it's a shared parent + is_parent_of = root + } + } + save_scope_as = bp1_yearly_9041_sibling + random_parent = { + even_if_dead = yes + limit = { + # Check that they're dead + is_alive = no + # Make sure it's a shared parent + is_parent_of = root + } + save_scope_as = bp1_yearly_9041_parent + } + } + } + + option = { # Bond and become friends + name = bp1_yearly.9041.a + scope:bp1_yearly_9041_parent = { save_scope_as = relationship_reason_involved_character } + upgrade_to_friend_effect = { + CHARACTER = scope:bp1_yearly_9041_sibling + REASON = generic_familial_bonding + } + stress_impact = { + shy = major_stress_impact_gain + pensive = major_stress_impact_gain + bossy = minor_stress_impact_gain + rowdy = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = pensive + has_trait = bossy + has_trait = rowdy + } + } + } + } + + option = { # Make fun of them for crying + name = bp1_yearly.9041.b + if = { + limit = { NOT = { scope:bp1_yearly_9041_sibling = { has_relation_bully = root } } } + scope:bp1_yearly_9041_sibling = { set_relation_bully = root } + } + stress_impact = { + gregarious = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + loyal = medium_stress_impact_gain + curious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = compassionate + has_trait = forgiving + has_trait = loyal + has_trait = curious + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9041 } +} + +##################################### +# Food that looks like Jesus # +# by James Beaumont # +# 9042 # +##################################### + +bp1_yearly.9042 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9042.t + desc = bp1_yearly.9042.desc + theme = faith + override_background = throne_room + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:bp1_yearly_9042_chaplain + animation = ecstasy + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_adult = yes + faith_is_aniconic_trigger = no + NOT = { + has_character_flag = had_event_bp1_yearly_9042 + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + OR = { + learning <= 7 + has_trait = intellect_bad + has_trait = dull + has_trait = trusting + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = bp1_yearly_9042_chaplain } + } + + option = { # Woah it *does* look like Jesus! + name = bp1_yearly.9042.a + upgrade_to_friend_effect = { + CHARACTER = scope:bp1_yearly_9042_chaplain + REASON = generic_desserts_in_shape_of_jesus + } + scope:bp1_yearly_9042_chaplain = { add_trait = loyal } + create_artifact = { + name = dessert_looks_like_god + description = dessert_looks_like_god_desc + type = miscellaneous + visuals = small_box + modifier = artifact_monthly_piety_1_modifier + modifier = artifact_clergy_opinion_penalty_2_modifier + save_scope_as = jesus_food_scope + } + scope:jesus_food_scope = { + flag_as_trash_artifact = yes + flag_as_unwanted_artifact = yes + } + add_piety = minor_piety_loss + stress_impact = { + zealous = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = zealous + + } + } + } + + option = { # Accuse them of heresy + name = bp1_yearly.9042.b + trigger = { + scope:bp1_yearly_9042_chaplain = { + can_be_fired_from_council_trigger = { COURT_OWNER = root } + } + } + downgrade_to_rival_effect = { + CHARACTER = scope:bp1_yearly_9042_chaplain + REASON = rival_accusations_of_heresy + } + duel = { + skill = learning + target = scope:bp1_yearly_9042_chaplain + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + root = { + send_interface_toast = { + title = 9042_you_win + left_icon = root + right_icon = scope:bp1_yearly_9042_chaplain + fire_councillor = scope:bp1_yearly_9042_chaplain + scope:bp1_yearly_9042_chaplain = { banish = yes } + add_piety = medium_piety_gain + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + root = { + send_interface_toast = { + title = 9042_you_lose + left_icon = root + right_icon = scope:bp1_yearly_9042_chaplain + add_piety = medium_piety_loss + } + } + } + } + stress_impact = { + gregarious = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = forgiving + } + } + } + } + + option = { # Eat it + name = bp1_yearly.9042.c + trigger = { + OR = { + has_trait = cynical + has_trait = gluttonous + has_trait = comfort_eater + has_trait = sadistic + } + } + downgrade_to_rival_effect = { + CHARACTER = scope:bp1_yearly_9042_chaplain + REASON = rival_ate_jesus + } + add_character_modifier = { + modifier = full_of_jesus_modifier + years = 5 + } + stress_impact = { + zealous = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + comfort_eater = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9042 } +} + +##################################################### +# The Baby Eating Bishop of County and Kingdom # +# by James Beaumont # +# 9043 # +##################################################### + +bp1_yearly.9043 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9043.t + desc = bp1_yearly.9043.desc + theme = secret + override_background = temple + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9043_chaplain + animation = ecstasy + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_adult = yes + NOT = { + has_character_flag = had_event_bp1_yearly_9043 + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + OR = { + AND = { + is_deviant_trigger = yes + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = deviant + GENDER_CHARACTER = cp:councillor_court_chaplain + } + } + AND = { + is_cannibal_trigger = yes + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = cannibal + GENDER_CHARACTER = cp:councillor_court_chaplain + } + } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + cp:councillor_court_chaplain = { + save_scope_as = bp1_yearly_9043_chaplain + if = { + limit = { + NOT = { + is_cannibal_trigger = yes + } + } + if = { + limit = { + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = cannibal + GENDER_CHARACTER = cp:councillor_court_chaplain + } + } + add_secret = { + type = secret_cannibal + } + } + else = { + add_trait = cannibal + } + } + if = { + limit = { + NOT = { + is_deviant_trigger = yes + } + } + if = { + limit = { + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = deviant + GENDER_CHARACTER = cp:councillor_court_chaplain + } + } + add_secret = { + type = secret_deviant + } + } + else = { + add_trait = deviant + } + } + every_secret = { + limit = { + OR = { + secret_type = secret_cannibal + secret_type = secret_deviant + } + } + reveal_to = root + } + } + } + + option = { # Show me your ways + name = bp1_yearly.9043.a + if = { + limit = { + AND = { + OR = { + is_attracted_to_gender_of = scope:bp1_yearly_9043_chaplain + has_perk = unshackled_lust_perk + } + scope:bp1_yearly_9043_chaplain = { + OR = { + is_attracted_to_gender_of = root + has_perk = unshackled_lust_perk + } + } + } + NOT = { has_relation_lover = scope:bp1_yearly_9043_chaplain } + } + set_relation_lover = { reason = lover_induled_in_forbidden_pleasures target = scope:bp1_yearly_9043_chaplain } + } + else = { + upgrade_to_friend_effect = { + CHARACTER = scope:bp1_yearly_9043_chaplain + REASON = generic_ate_a_baby_together + } + } + if = { + limit = { + NOT = { + is_cannibal_trigger = yes + } + } + if = { + limit = { + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = cannibal + GENDER_CHARACTER = root + } + } + add_secret = { + type = secret_cannibal + } + } + else = { + add_trait = cannibal + } + } + if = { + limit = { + NOT = { + is_deviant_trigger = yes + } + } + if = { + limit = { + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = deviant + GENDER_CHARACTER = root + } + } + add_secret = { + type = secret_deviant + } + } + else = { + add_trait = deviant + } + } + stress_impact = { + calm = major_stress_impact_gain + patient = major_stress_impact_gain + brave = major_stress_impact_gain + just = major_stress_impact_gain + trusting = major_stress_impact_gain + paranoid = major_stress_impact_gain + compassionate = major_stress_impact_gain + chaste = major_stress_impact_gain + zealous = major_stress_impact_gain + lustful = major_stress_impact_loss + deviant = massive_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = patient + has_trait = brave + has_trait = just + has_trait = trusting + has_trait = paranoid + has_trait = compassionate + has_trait = chaste + has_trait = zealous + } + } + } + } + + option = { # Expose them! + name = bp1_yearly.9043.b + downgrade_to_rival_effect = { + CHARACTER = scope:bp1_yearly_9043_chaplain + REASON = rival_ate_baby + } + scope:bp1_yearly_9043_chaplain = { + every_secret = { + limit = { + OR = { + secret_type = secret_cannibal + secret_type = secret_deviant + } + } + expose_secret = root + } + give_nickname = nick_baby_eating + } + stress_impact = { + lustful = medium_stress_impact_gain + deviant = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = lustful + has_trait = gregarious + has_trait = forgiving + } + } + modifier = { + add = 100 + OR = { + has_trait = just + has_trait = honest + has_trait = zealous + } + } + } + } + + option = { # Keep it to yourself + name = bp1_yearly.9043.c + stress_impact = { + honest = medium_stress_impact_gain + deviant = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = honest + has_trait = deviant + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9043 } +} + +################################# +# Executing a friend # +# by James Beaumont # +# 9044 # +################################# + +bp1_yearly.9044 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9044.t + desc = { + desc = bp1_yearly.9044.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:bp1_yearly_9044_memory_scope + } + desc = bp1_yearly.9044.desc.outro.memory + } + desc = bp1_yearly.9044.desc.outro.no_memory + } + } + theme = skull + override_background = gallows + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = disloyal + } + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + NOR = { + has_trait = callous + has_trait = sadistic + has_trait = disloyal + } + } + animation = sadness + } + } + right_portrait = { + character = scope:recipient + animation = grief + triggered_outfit = { + remove_default_outfit = no + outfit_tags = { beggar_rags } + } + animate_if_dead = yes + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_adult = yes + } + + weight_multiplier = { + base = 1 + } + + immediate = { + show_as_tooltip = { + execute_prisoner_effect = { + VICTIM = scope:recipient + EXECUTIONER = scope:actor + } + } + if = { + limit = { + any_memory = { + has_memory_category = positive + any_memory_participant = { this = scope:recipient } + NOT = { has_memory_type = became_friends } + } + } + random_memory = { + limit = { + has_memory_category = positive + any_memory_participant = { this = scope:recipient } + NOT = { has_memory_type = became_friends } + } + save_scope_as = bp1_yearly_9044_memory_scope + } + } + } + + option = { # I feel bad about this + name = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = disloyal + } + } + text = bp1_yearly.9044.a.indifferent + } + name = bp1_yearly.9044.a.guilty + } +} + +################################# +# Seeing an execution as a child# +# by James Beaumont # +# 9045 # +################################# + +bp1_yearly.9045 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9045.t + desc = { + desc = bp1_yearly.9045.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { has_strong_religious_conviction_trigger = yes } + } + desc = bp1_yearly.9045.desc.zealous + } + triggered_desc = { + trigger = { + scope:recipient = { has_trait = brave } + } + desc = bp1_yearly.9045.desc.brave + } + desc = bp1_yearly.9045.desc.fallback + } + desc = bp1_yearly.9045.desc.outro + } + theme = skull + override_background = gallows + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + animation = shock + } + } + right_portrait = { + character = scope:recipient + animation = grief + triggered_outfit = { + remove_default_outfit = no + outfit_tags = { beggar_rags } + } + animate_if_dead = yes + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + any_relation = { + is_available_ai_adult = yes + type = guardian + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + show_as_tooltip = { + execute_prisoner_effect = { + VICTIM = scope:recipient + EXECUTIONER = scope:actor + } + } + random_relation = { + type = guardian + save_scope_as = bp1_yearly_9045_guardian + } + add_character_flag = witnessed_execution_flag + + create_character_memory = { + type = was_shown_execution_memory + participants = { + guardian = scope:bp1_yearly_9045_guardian + victim = scope:recipient + } + } + } + + option = { # How do I feel about this? + name = { + trigger = { + has_trait = callous + } + text = bp1_yearly.9045.a.indifferent + } + name = { + trigger = { + has_trait = sadistic + } + text = bp1_yearly.9045.a.sadistic + } + name = bp1_yearly.9045.a.guilty + if = { + limit = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9045_guardian + OPINION = default_friend_opinion + REASON = friend_appreciated_good_entertainment + } + } + else = { + progress_towards_rival_effect = { + REASON = rival_child_saw_execution + CHARACTER = scope:bp1_yearly_9045_guardian + OPINION = default_rival_opinion + } + } + stress_impact = { + calm = major_stress_impact_gain + patient = major_stress_impact_gain + just = major_stress_impact_gain + trusting = major_stress_impact_gain + charming = major_stress_impact_gain + compassionate = major_stress_impact_gain + zealous = major_stress_impact_gain + sadistic = massive_stress_impact_loss + } + } +} + +################################# +# Child poops during baptism # +# by James Beaumont # +# 9046 # +################################# + +bp1_yearly.9046 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9046.t + desc = { + desc = bp1_yearly.9046.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = bp1_yearly.9046.desc.christian + } + desc = bp1_yearly.9046.desc.not_christian + } + desc = bp1_yearly.9046.desc.outro + } + theme = family + override_background = temple + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + animation = shock + } + } + right_portrait = { + character = scope:bp1_yearly_9046_chaplain + animation = anger + } + lower_right_portrait = { + character = scope:bp1_yearly_9046_poopy_child + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + any_child = { + age <= 2 + is_available_ai = yes + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + } + NOR = { + any_close_family_member = { + even_if_dead = yes + has_nickname = nick_the_dung_named + } + has_nickname = nick_the_dung_named + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_child = { + limit = { + age <= 2 + is_available_ai = yes + } + save_scope_as = bp1_yearly_9046_poopy_child + } + cp:councillor_court_chaplain = { save_scope_as = bp1_yearly_9046_chaplain } + } + + option = { # That's hilarious + name = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + text = bp1_yearly.9046.a.indifferent + } + name = bp1_yearly.9046.a + scope:bp1_yearly_9046_poopy_child = { + give_nickname = nick_the_dung_named + progress_towards_rival_effect = { + REASON = rival_laughed_at_child_pooping + CHARACTER = root + OPINION = default_rival_opinion + } + } + stress_impact = { + calm = minor_stress_impact_gain + patient = minor_stress_impact_gain + just = minor_stress_impact_gain + trusting = minor_stress_impact_gain + charming = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + zealous = minor_stress_impact_gain + family_first = major_stress_impact_gain + sadistic = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = calm + has_trait = patient + has_trait = just + has_trait = trusting + has_trait = charming + has_trait = zealous + } + } + modifier = { + add = 10 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { # We gotta cover this up + name = bp1_yearly.9046.b + stress_impact = { + base = minor_stress_impact_gain + honest = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = honest + } + } + } + } +} + +######################################### +# Lover wants you to wear their hair # +# by James Beaumont # +# 9047 # +######################################### + +bp1_yearly.9047 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9047.t + desc = bp1_yearly.9047.desc + theme = love + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9047_lover + animation = flirtation_left + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + any_relation = { + is_available_ai_adult = yes + type = lover + NOR = { + has_trait = loyal + has_trait = disloyal + } + } + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + NOT = { has_character_flag = had_event_bp1_yearly_9047 } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_relation = { + type = lover + limit = { + is_available_ai_adult = yes + NOR = { + has_trait = loyal + has_trait = disloyal + } + } + save_scope_as = bp1_yearly_9047_lover + } + add_character_flag = had_event_bp1_yearly_9047 + } + + option = { # Of course I will wear your hair! + name = bp1_yearly.9047.a + if = { + limit = { + is_ai = yes + } + random = { + chance = 10 + if = { + limit = { + scope:bp1_yearly_9047_lover = { is_female = yes } + } + give_nickname = nick_with_the_tress + } + else = { + give_nickname = nick_with_the_lock + } + } + } + else = { + if = { + limit = { + scope:bp1_yearly_9047_lover = { is_female = yes } + } + give_nickname = nick_with_the_tress + } + else = { + give_nickname = nick_with_the_lock + } + } + if = { + limit = { + has_trait = disloyal + } + remove_trait = disloyal + } + else = { + add_trait = loyal + } + scope:bp1_yearly_9047_lover = { + if = { + limit = { + has_trait = disloyal + } + remove_trait = disloyal + } + else = { + add_trait = loyal + } + } + stress_impact = { + humble = medium_stress_impact_gain + disloyal = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = humble + has_trait = disloyal + } + } + } + } + + option = { # What? That's gross + name = bp1_yearly.9047.b + reverse_add_opinion = { + target = scope:bp1_yearly_9047_lover + modifier = hurt_opinion + opinion = -25 + } + stress_impact = { + loyal = major_stress_impact_gain + lustful = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = loyal + has_trait = lustful + has_trait = sadistic + } + } + } + } +} + +######################################### +# Wrestling a rival # +# by James Beaumont # +# 9048 # +######################################### + +bp1_yearly.9048 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9048.t + desc = bp1_yearly.9048.desc + theme = love + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:bp1_yearly_9048_nemesis + animation = personality_irrational + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + OR = { # Is interested in war and fighting to some extent + perks_in_martial_lifestyle >= 2 + has_trait = education_martial_prowess + } + any_relation = { + type = nemesis + is_available_ai_adult = yes + OR = { + has_trait = brave + has_trait = impatient + has_trait = wrathful + has_trait = sadistic + } + } + NOT = { has_character_flag = had_event_bp1_yearly_9048 } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_relation = { + type = nemesis + limit = { + is_available_ai_adult = yes + OR = { + has_trait = brave + has_trait = impatient + has_trait = wrathful + has_trait = sadistic + } + } + save_scope_as = bp1_yearly_9048_nemesis + } + add_character_flag = had_event_bp1_yearly_9048 + } + + option = { # U wot m8 + name = bp1_yearly.9048.a + if = { + limit = { + root.faith = { trait_is_virtue = brave } + } + add_piety = medium_piety_gain + } + duel = { + skill = prowess + target = scope:bp1_yearly_9048_nemesis + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + add_prestige = medium_prestige_gain + trigger_event = bp1_yearly.9049 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + send_interface_toast = { + title = 9048_you_lose + left_icon = root + right_icon = scope:bp1_yearly_9048_nemesis + add_prestige = minor_prestige_loss + increase_wounds_no_death_effect = { REASON = duel } + } + } + } + stress_impact = { + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = patient + has_trait = calm + has_trait = craven + } + } + modifier = { + add = 10 + OR = { + has_trait = brave + has_trait = arrogant + } + } + modifier = { + add = 10 + prowess >= scope:bp1_yearly_9048_nemesis.prowess + NOT = { has_trait = craven } + } + } + } + + option = { # Don't hit me! + name = bp1_yearly.9048.b + add_prestige = minor_prestige_loss + if = { + limit = { + root.faith = { trait_is_virtue = brave } + } + add_piety = minor_piety_loss + } + stress_impact = { + brave = major_stress_impact_gain + impatient = major_stress_impact_gain + wrathful = major_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = brave + has_trait = impatient + has_trait = wrathful + has_trait = arrogant + } + } + } + } +} + +# Follow-up event, bite a chunk out of them? + +bp1_yearly.9049 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9049.t + desc = bp1_yearly.9049.desc + theme = love + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:bp1_yearly_9048_nemesis + animation = shock + } + + weight_multiplier = { + base = 1 + } + + immediate = { + scope:bp1_yearly_9048_nemesis = { + increase_wounds_no_death_effect = { REASON = duel } + } + } + + option = { # Say goodbye to your flesh + name = bp1_yearly.9049.a + give_nickname = nick_irontooth + scope:bp1_yearly_9048_nemesis = { + increase_wounds_effect = { REASON = duel } + } + stress_impact = { + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + craven = medium_stress_impact_gain + forgiving = massive_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = patient + has_trait = calm + has_trait = craven + has_trait = forgiving + } + } + } + } + + option = { # This rivalry is over + name = bp1_yearly.9049.b + remove_relation_nemesis = scope:bp1_yearly_9048_nemesis + stress_impact = { + brave = major_stress_impact_gain + impatient = major_stress_impact_gain + wrathful = major_stress_impact_gain + arrogant = major_stress_impact_gain + forgiving = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = brave + has_trait = impatient + has_trait = wrathful + has_trait = arrogant + } + } + modifier = { + add = 10 + has_trait = forgiving + } + } + } + + option = { # This rivalry is over... forever + name = bp1_yearly.9049.c + trigger = { + has_trait = vengeful + } + scope:bp1_yearly_9048_nemesis = { + death = { + killer = root + death_reason = death_duel + } + } + stress_impact = { + just = major_stress_impact_gain + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + vengeful = major_stress_impact_loss + wrathful = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = just + has_trait = patient + has_trait = calm + } + } + } + } +} + +######################################### +# Sharing war stories # +# by James Beaumont # +# 9050 # +######################################### + +bp1_yearly.9050 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9050.t + desc = bp1_yearly.9050.desc + theme = martial + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:bp1_yearly_9050_friend + animation = shock + } + + weight_multiplier = { + base = 1 + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_adult = yes + any_memory = { + has_memory_category = war + has_memory_category = positive + } + any_relation = { + type = friend + is_available_ai_adult = yes + OR = { + root = { + has_royal_court = yes + has_court_type = court_warlike + } + has_trait = education_martial_prowess + has_trait = education_martial + has_trait = brave + } + any_memory = { + has_memory_category = war + has_memory_category = positive + } + } + NOT = { has_character_flag = had_event_bp1_yearly_9050 } + } + + immediate = { + add_character_flag = had_event_bp1_yearly_9050 + random_memory = { + limit = { + has_memory_category = war + has_memory_category = positive + } + save_scope_as = bp1_yearly_9050_my_memory + } + random_relation = { + type = friend + limit = { + is_available_ai_adult = yes + OR = { + root = { + has_royal_court = yes + has_court_type = court_warlike + } + has_trait = education_martial_prowess + has_trait = education_martial + has_trait = brave + } + any_memory = { + has_memory_category = war + has_memory_category = positive + } + } + save_scope_as = bp1_yearly_9050_friend + random_memory = { + limit = { + has_memory_category = war + has_memory_category = positive + } + save_scope_as = bp1_yearly_9050_friend_memory + } + } + } + + option = { # Hahaha, what a story bp1_yearly_9050_friend + name = bp1_yearly.9050.a + reverse_add_opinion = { + target = scope:bp1_yearly_9050_friend + modifier = flattered_opinion + opinion = 25 + } + stress_impact = { + brave = major_stress_impact_gain + impatient = major_stress_impact_gain + wrathful = major_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = brave + has_trait = impatient + has_trait = wrathful + has_trait = arrogant + } + } + } + } + + option = { # MY story is clearly better + name = bp1_yearly.9050.b + reverse_add_opinion = { + target = scope:bp1_yearly_9050_friend + modifier = insult_opinion + opinion = -25 + } + duel = { + skill = martial + target = scope:bp1_yearly_9050_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + add_prestige = medium_prestige_gain + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + add_prestige = medium_prestige_loss + } + } + stress_impact = { + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + craven = medium_stress_impact_gain + forgiving = massive_stress_impact_gain + loyal = massive_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = patient + has_trait = calm + has_trait = craven + has_trait = forgiving + has_trait = loyal + } + } + } + } +} diff --git a/N3OW/events/yearly_events/court_yearly_events.txt b/N3OW/events/yearly_events/court_yearly_events.txt new file mode 100644 index 00000000..05e6e2d5 --- /dev/null +++ b/N3OW/events/yearly_events/court_yearly_events.txt @@ -0,0 +1,6399 @@ +namespace = court_yearly + +##################################### +# Growing Debauchery # +# by Sean Hughes # +# 1000-1001 # +##################################### + +scripted_trigger court_1000_valid_child = { + is_courtier_of = root + age >= 16 + OR = { + can_be_drunkard = yes + can_be_hashishiyah = yes + can_be_rakish = yes + } + NOR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = rakish + } +} + +scripted_effect court_1000_gain_debauchery_trait = { + if = { + limit = { scope:debauchery_type = flag:hashishiyah } + add_trait = hashishiyah + } + else_if = { + limit = { scope:debauchery_type = flag:drunkard } + add_trait = drunkard + } + else_if = { + limit = { scope:debauchery_type = flag:rakish } + add_trait = rakish + } +} + +scripted_trigger court_1001_valid_debaucher = { + is_courtier_of = root + age >= 16 + exists = scope:debauchery_type + OR = { + AND = { + scope:debauchery_type = flag:hashishiyah + can_be_hashishiyah = yes + } + AND = { + scope:debauchery_type = flag:drunkard + can_be_drunkard = yes + } + AND = { + scope:debauchery_type = flag:rakish + can_be_rakish = yes + } + } +} + +court_yearly.1000 = { + type = character_event + title = court.1000.t + desc = { + desc = court.1000.desc.opening + first_valid = { + triggered_desc = { + trigger = { scope:debauchery_type = flag:drunkard } + desc = court.1000.desc.drunkard + } + triggered_desc = { + trigger = { scope:debauchery_type = flag:hashishiyah } + desc = court.1000.desc.hashishiyah + } + triggered_desc = { + trigger = { scope:debauchery_type = flag:rakish } + desc = court.1000.desc.rakish + } + } + desc = court.1000.desc.ending + } + theme = court + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:child + triggered_animation = { + trigger = { + scope:debauchery_type = flag:drunkard + } + animation = drink + } + triggered_animation = { + trigger = { + scope:debauchery_type = flag:hashishiyah + } + animation = personality_irrational + } + triggered_animation = { + trigger = { + scope:debauchery_type = flag:rakish + } + animation = flirtation + } + } + override_background = { + trigger = { + OR = { + scope:debauchery_type = flag:drunkard + scope:debauchery_type = flag:rakish + } + } + reference = tavern + } + override_background = { + trigger = { + scope:debauchery_type = flag:hashishiyah + } + reference = bp1_wine_cellar + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + any_child = { + court_1000_valid_child = yes + } + NOT = { has_character_flag = court_1000_discouraged_debauchery } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + random_child = { + limit = { + court_1000_valid_child = yes + } + save_scope_as = child + random_list = { + 50 = { + trigger = { can_be_drunkard = yes } + modifier = { + factor = 0.1 + OR = { + faith = { trait_is_sin = drunkard } + religion = religion:islam_religion + } + } + save_scope_value_as = { + name = debauchery_type + value = flag:drunkard + } + } + 40 = { + trigger = { can_be_hashishiyah = yes } + modifier = { + factor = 0.1 + faith = { trait_is_sin = hashishiyah } + } + save_scope_value_as = { + name = debauchery_type + value = flag:hashishiyah + } + } + 10 = { + trigger = { can_be_rakish = yes } + modifier = { + factor = 0.1 + faith = { trait_is_virtue = lustful } + } + save_scope_value_as = { + name = debauchery_type + value = flag:rakish + } + } + } + } + } + + # Option A: Publicly reprimand/humilite your child to make them stop + option = { + name = court.1000.a + scope:child = { + add_prestige_level = -1 + add_opinion = { + modifier = angry_opinion + target = root + opinion = -50 + } + } + custom_tooltip = court.1000.a.tt + hidden_effect = { + add_character_flag = { + flag = court_1000_discouraged_debauchery + years = 30 + } + } + } + + # Option B: Give your child a title or court position to try and keep them occupied + option = { + name = court.1000.b + trigger = { + any_held_title = { + title_tier = county + is_landless_type_title = no + count >= 2 + } + } + + random_held_title = { + title_tier = county + limit = { + is_landless_type_title = no + } + save_scope_as = granted_title + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + } + scope:granted_title = { + change_title_holder = { + holder = scope:child + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:child = { + random_list = { + 50 = { + desc = court.1000.b.success + ai_value_modifier = { + ai_energy = 0.5 + ai_greed = 0.2 + ai_honor = 0.2 + } + add_stewardship_skill = 2 + } + 50 = { + desc = court.1000.b.failure + ai_value_modifier = { + ai_energy = -0.5 + ai_greed = -0.2 + ai_honor = -0.2 + } + court_1000_gain_debauchery_trait = yes + } + } + } + } + + # Option C: Let the behavior continue unpunished, maybe joning in from time to time + option = { + name = court.1000.c + scope:child = { + court_1000_gain_debauchery_trait = yes + add_stress = medium_stress_loss + } + add_stress = medium_stress_loss + custom_tooltip = court.1000.c.tt + + # Other courtiers might be tempted by the unmoderated indulgence of vices + hidden_effect = { + every_courtier = { + limit = { + this != scope:child + court_1001_valid_debaucher = yes + } + random_list = { + 80 = { + # Nothing happens + + } + 20 = { + ai_value_modifier = { + ai_energy = -0.1 + ai_honor = -0.1 + } + modifier = { + add = 140 + OR = { + AND = { + scope:debauchery_type = flag:drunkard + OR = { + has_trait = gluttonous + has_trait = lifestyle_reveler + } + } + AND = { + scope:debauchery_type = flag:hashishiyah + OR = { + has_trait = gluttonous + has_trait = lazy + } + } + AND = { + scope:debauchery_type = flag:rakish + has_trait = lustful + + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = temperate + has_trait = zealous + has_trait = chaste + } + } + + trigger_event = { + id = court_yearly.1001 + days = { 14 60 } + } + } + } + } + } + } +} + +court_yearly.1001 = { + hidden = yes + + trigger = { + # We are still in the same court as the initial debaucher. + has_royal_court = yes + has_dlc_feature = royal_court + scope:child = { + is_courtier_of = root.court_owner + } + # We are not opposed to debauchery + court_1001_valid_debaucher = yes + } + + immediate = { + court_owner = { + if = { + # If we're important to our liege in some way, gain debauchery trait with a notification send to them. + limit = { + is_of_major_interest_trigger = { CHARACTER = root } + } + root = { save_scope_as = courtier } + send_interface_message = { + type = event_generic_neutral + title = court.1001.title + + root = { + court_1000_gain_debauchery_trait = yes + } + } + } + else = { + # Otherwise we silently gain the trait, in order to avoid notification spam. + root = { + court_1000_gain_debauchery_trait = yes + } + } + } + } +} + +##################################### +# Long Arm of the Law # +# by Sean Hughes # +# 1020 # +##################################### + +scripted_trigger court_1020_suitable_guest_trigger = { + # Of suitable age. + age >= 16 + # Lacks the principle award. + save_temporary_scope_as = fugitive_check + NOT = { + root = { has_strong_hook = scope:fugitive_check } + } +} + +scripted_effect court_1020_remove_opinion_from_root_modifier = { + if = { + limit = { + has_opinion_modifier = { + modifier = $OPINION_MODIFIER$ + target = root + } + } + remove_opinion = { + modifier = $OPINION_MODIFIER$ + target = root + } + } +} + +court_yearly.1020 = { + type = letter_event + opening = court.1020.opening + desc = { + desc = court.1020.desc + first_valid = { + triggered_desc = { + trigger = {scope:compensation = flag:forgive_this} + desc = court.1020.desc.forgive_this + } + triggered_desc = { + trigger = {scope:compensation = flag:forgive_all} + desc = court.1020.desc.forgive_all + } + triggered_desc = { + trigger = {scope:compensation = flag:gold} + desc = court.1020.desc.gold + } + triggered_desc = { + trigger = {scope:compensation = flag:opinion} + desc = court.1020.desc.opinion + } + } + } + sender = scope:foreign_ruler + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + any_pool_guest = { court_1020_suitable_guest_trigger = yes } + any_neighboring_and_across_water_top_liege_realm = { + exists = holder + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_pool_guest = { + limit = { court_1020_suitable_guest_trigger = yes } + save_scope_as = fugitive + } + random_neighboring_and_across_water_top_liege_realm = { + holder = { save_scope_as = foreign_ruler } + } + scope:foreign_ruler = { + random_list = { + 33 = { + ai_value_modifier = { + ai_vengefulness = 0.15 + ai_greed = 0.1 + } + if = { + limit = { + root = { is_ai = no } + scope:foreign_ruler = { + OR = { + has_opinion_modifier = { + modifier = hate_opinion + target = root + } + has_opinion_modifier = { + modifier = refusal_opinion + target = root + } + has_opinion_modifier = { + modifier = suspicion_opinion + target = root + } + has_opinion_modifier = { + modifier = disappointed_opinion + target = root + } + has_opinion_modifier = { + modifier = insult_opinion + target = root + } + has_opinion_modifier = { + modifier = angry_opinion + target = root + } + has_opinion_modifier = { + modifier = declared_war + target = root + } + has_opinion_modifier = { + modifier = declared_war_on_son_daughter + target = root + } + } + } + } + save_scope_value_as = { + name = compensation + value = flag:forgive_all + } + } + else = { + save_scope_value_as = { + name = compensation + value = flag:forgive_this + } + } + } + 33 = { + ai_value_modifier = { + ai_greed = -0.3 + } + save_scope_value_as = { + name = compensation + value = flag:gold + } + } + 33 = { + ai_value_modifier = { + ai_compassion = 0.2 + ai_honor = 0.1 + } + if = { + limit = { + root = { is_ai = no } + scope:foreign_ruler = { + OR = { + has_opinion_modifier = { + modifier = hate_opinion + target = root + } + has_opinion_modifier = { + modifier = refusal_opinion + target = root + } + has_opinion_modifier = { + modifier = suspicion_opinion + target = root + } + has_opinion_modifier = { + modifier = disappointed_opinion + target = root + } + has_opinion_modifier = { + modifier = insult_opinion + target = root + } + has_opinion_modifier = { + modifier = angry_opinion + target = root + } + has_opinion_modifier = { + modifier = declared_war + target = root + } + has_opinion_modifier = { + modifier = declared_war_on_son_daughter + target = root + } + } + } + } + save_scope_value_as = { + name = compensation + value = flag:forgive_all + } + } + else = { + save_scope_value_as = { + name = compensation + value = flag:opinion + } + } + } + } + } + } + + # Option A: Agree to the foreign ruler's demand and hand over the fugitive + option = { + name = court.1020.a + + if = { + limit = { + scope:compensation = flag:forgive_all + } + scope:foreign_ruler = { + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = hate_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = refusal_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = suspicion_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = disappointed_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = insult_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = angry_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = declared_war } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = declared_war_on_son_daughter } + } + } + else_if = { + limit = { + scope:compensation = flag:gold + } + scope:foreign_ruler = { + pay_treasury_or_gold = { + target = root + value = minor_treasury_or_gold_value + } + } + } + else_if = { + limit = { + scope:compensation = flag:opinion + } + scope:foreign_ruler = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + + rightfully_imprison_character_effect = { + TARGET = scope:fugitive + IMPRISONER = scope:foreign_ruler + } + } + + # Option B: Offer the fugitive your protection, pissing off the foreign ruler + option = { + name = court.1020.b + if = { + limit = { + can_add_hook = { + target = scope:fugitive + type = loyalty_hook + } + } + add_hook = { + type = loyalty_hook + target = scope:fugitive + } + } + scope:foreign_ruler = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -30 + } + } + } + + # Option C: Warn the fugitive and let them escape + option = { + name = court.1020.c + scope:fugitive = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + select_and_move_to_pool_effect = yes + } + scope:foreign_ruler = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } +} + + +################################################## +# Competitive Cronying +# by Ewan Cowhig Croft +# 2001 - 2010 +################################################## + +scripted_trigger court_2001_valid_toadies_available_trigger = { + # Standard checks. + is_available_ai_adult = yes + # Lacks a personality that would actively stop them from toadying: + NOR = { + has_trait = honest + has_trait = arrogant + has_trait = shy + has_trait = content + } + # Isn't immediately related to you. + NOR = { + any_close_or_extended_family_member = { this = root } + any_spouse = { this = root } + } + # And likes you enough to want to suck up to you. + opinion = { + target = root + value >= low_negative_opinion + } +} + +court_yearly.2001 = { + type = character_event + title = court.2001.t + desc = court.2001.desc + theme = court + left_portrait = { + character = scope:crony_a + animation = disapproval + } + right_portrait = { + character = scope:crony_b + animation = dismissal + } + + cooldown = { years = 10 } + + trigger = { + # DLC check. + has_royal_court = yes + has_dlc_feature = royal_court + # Standard checks. + is_available_at_peace_adult = yes + is_landed = yes + # At least two courtiers or guests are suitable toadies. + any_courtier_or_guest = { + count >= 2 + court_2001_valid_toadies_available_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + # Grab two random toadies. + random_courtier_or_guest = { + limit = { court_2001_valid_toadies_available_trigger = yes } + weight = { + base = 1 + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + opinion_modifier = { + opinion_target = root + # Cap it a bit so we don't always have opinion gain with characters that already love you. + max = 50 + } + } + save_scope_as = crony_a + } + random_courtier_or_guest = { + limit = { + court_2001_valid_toadies_available_trigger = yes + this != scope:crony_a + } + weight = { + base = 1 + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + } + save_scope_as = crony_b + } + } + + # Honestly, you could both try harder. + option = { + name = court.2001.a + trigger = { + NOT = { has_trait = sadistic } + } + + # Gain opinion with the lackeys as they hard-core focus on sucking up to ye. + reverse_add_opinion = { + target = scope:crony_a + modifier = shamed_me_opinion + opinion = 40 + } + reverse_add_opinion = { + target = scope:crony_b + modifier = shamed_me_opinion + opinion = 40 + } + # Add a little CGV for all these obsequious toadies constantly making a big deal about you. + change_current_court_grandeur = miniscule_court_grandeur_gain + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_greed = 0.25 + ai_compassion = -0.5 + } + } + } + + # Whoever bows lowest gets a shiny coin. + option = { + name = court.2001.a.sadistic + trigger = { has_trait = sadistic } + + # Gain opinion with the lackeys as they hard-core focus on sucking up to ye. + reverse_add_opinion = { + target = scope:crony_a + modifier = shamed_me_opinion + opinion = 60 + } + reverse_add_opinion = { + target = scope:crony_b + modifier = shamed_me_opinion + opinion = 60 + } + # And toss the coin at random. + random_list = { + 50 = { + desc = court.2001.a.sadistic.crony_a_wins + send_interface_toast = { + type = event_toast_effect_neutral + title = court.2001.a.sadistic.crony_a_wins + left_icon = scope:crony_a + pay_short_term_gold = { + target = scope:crony_a + gold = 1 + } + } + } + 50 = { + desc = court.2001.a.sadistic.crony_b_wins + send_interface_toast = { + type = event_toast_effect_neutral + title = court.2001.a.sadistic.crony_b_wins + left_icon = scope:crony_b + pay_short_term_gold = { + target = scope:crony_b + gold = 1 + } + } + } + } + # Add a little CGV for all these obsequious toadies constantly making a big deal about you. + change_current_court_grandeur = minor_court_grandeur_gain + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_greed = 0.25 + ai_compassion = -0.5 + } + } + } + + # These empty platitudes are disgusting! + option = { + name = court.2001.b + + # Gain prestige for renouncing their lackeying. + add_prestige = minor_prestige_gain + # Lose opinion with both. + reverse_add_opinion = { + target = scope:crony_a + modifier = hurt_opinion + opinion = -25 + } + reverse_add_opinion = { + target = scope:crony_b + modifier = hurt_opinion + opinion = -25 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_sociability = -0.25 + ai_compassion = -0.25 + } + } + } + + # There's one obvious way you haven't tried... + option = { + name = court.2001.c + + # Both pay you cash-monies. + scope:crony_a = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + scope:crony_b = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + # Both dislike you for the direct demand. + reverse_add_opinion = { + target = scope:crony_a + modifier = respect_opinion + opinion = -35 + } + reverse_add_opinion = { + target = scope:crony_b + modifier = respect_opinion + opinion = -35 + } + + stress_impact = { + greedy = miniscule_stress_impact_loss + generous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.75 + ai_compassion = -0.25 + } + } + } + + # This is beneath me. + option = { + name = court.2001.d + + # Gain some fame for your straight-talking. + add_prestige_experience = medium_prestige_gain + + stress_impact = { + shy = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_sociability = -0.5 + } + } + } +} + +######################### +# Scrounger Life # +# by Claudia Baldassi # +# 6040-6041 # +######################### + +scripted_trigger court_6040_has_valid_scrounger_trigger = { + is_adult = yes + NOR = { + is_close_family_of = root + is_councillor_of = root + } + OR = { + has_trait = lazy + has_trait = greedy + has_trait = gluttonous + has_trait = drunkard + has_trait = comfort_eater + has_trait = profligate + has_trait = rakish + has_trait = hashishiyah + } + OR = { + learning >= 8 + diplomacy >= 8 + } +} + +# You have a useless scrounger at court, but if supported long enough, he turns out to be a great poet (might become a Great Person?) # + + +court_yearly.6040 = { + type = character_event + title = court.6040.t + desc = court.6040.desc + theme = court + left_portrait = { + character = scope:scrounger + animation = happiness + } + right_portrait = { + character = root + animation = disapproval + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + any_courtier_or_guest = { + court_6040_has_valid_scrounger_trigger = yes + } + NOT = { + has_character_flag = court_6040_cooldown + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + add_character_flag = { + flag = court_6040_cooldown + years = 20 + } + random_courtier_or_guest = { + limit = { + court_6040_has_valid_scrounger_trigger = yes + } + save_scope_as = scrounger + } + personality_check_shared_good_ruler_traits_effect = { + CHAR1 = root + CHAR2 = scope:scrounger + STRICT = no + } + set_variable = court_6040_best_looking_var + if = { + limit = { + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = court_jester_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = jester + } + } + } + + after = { + remove_variable = court_6040_best_looking_var + } + + # Option A: make them earn their living by making them court jester + option = { + name = court.6040.a + trigger = { + scope:scrounger = { can_be_employed_as = court_jester_court_position } + OR = { + can_employ_court_position_type = court_jester_court_position + exists = scope:jester + } + } + court_position_grant_effect = { POS = court_jester CANDIDATE = scope:scrounger EMPLOYER = root } + change_current_court_grandeur = minor_court_grandeur_gain + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + } + ai_chance = { + base = 100 + } + } + + # Option B: tolerate them + option = { + name = court.6040.b + remove_treasury_or_gold = tiny_treasury_or_gold_value + add_prestige = minor_prestige_gain + if = { + limit = { + NOR = { + has_relation_potential_friend = scope:scrounger + has_relation_friend = scope:scrounger + } + can_set_relation_potential_friend_trigger = { CHARACTER = scope:scrounger } + } + set_relation_potential_friend = scope:scrounger + } + else_if = { + limit = { + has_relation_potential_friend = scope:scrounger + can_set_relation_friend_trigger = { CHARACTER = scope:scrounger } + } + set_relation_friend = { reason = friend_amusing_antics target = scope:scrounger } + } + scope:scrounger = { + target_weight_modifier_effect = { + VALUE = 2 + } + } + trigger_event = { + id = court_yearly.6041 + days = 180 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_sociability = 0.5 + } + modifier = { + treasury_or_gold <= tiny_treasury_or_gold_value + add = -200 + } + } + } + + # Option C: kick them out of court + option = { + name = court.6040.c + remove_courtier_or_guest = { + character = scope:scrounger + } + if = { + limit = { + NOR = { + has_relation_potential_rival = scope:scrounger + has_relation_rival = scope:scrounger + } + can_set_relation_potential_rival_trigger = { CHARACTER = scope:scrounger } + } + set_relation_potential_rival = scope:scrounger + } + else_if = { + limit = { + has_relation_potential_rival = scope:scrounger + can_set_relation_rival_trigger = { CHARACTER = scope:scrounger } + } + set_relation_rival = { + target = scope:scrounger + reason = rival_scrounger_kicked_out_of_court + } + } + add_stress = medium_stress_loss + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = 0.25 + } + } + } +} + +court_yearly.6041 = { + type = character_event + title = court.6040.t + desc = court.6041.desc + theme = court + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:scrounger + animation = happiness + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + exists = scope:scrounger #checking that they are still alive + scope:scrounger = { is_alive = yes } + } + + immediate = { + #poet trait is required for court poet position + hidden_effect = { + scope:scrounger = { + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + } + } + if = { + limit = { + employs_court_position = court_poet_court_position + any_court_position_holder = { + type = court_poet_court_position + } + } + random_court_position_holder = { + type = court_poet_court_position + save_scope_as = c_poet + } + } + } + + # Option A: + option = { + name = court.6041.a + if = { + limit = { + exists = scope:c_poet + } + revoke_court_position = { + recipient = scope:c_poet + court_position = court_poet_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:scrounger + POSITION = court_poet + } + ai_chance = { + base = 40 + modifier = { + add = 15 + can_employ_court_position_type = court_poet_court_position + } + modifier = { + add = -25 + short_term_gold < minor_gold_value + } + } + } + + # Option B: + option = { + name = court.6041.b + remove_short_term_gold = medium_gold_value + scope:scrounger = { + duel = { + skill = diplomacy + value = average_skill_rating + 50 = { + desc = court.6041.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = court.6041.b.failure.tt + left_icon = scope:scrounger + stress_impact = { + ambitious = medium_stress_impact_gain + } + } + } + } + 10 = { + desc = court.6041.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + create_inspiration = book_inspiration + custom_tooltip = inspire_interaction_book + root = { + send_interface_toast = { + type = event_toast_effect_good + title = court.6041.b.success.tt + left_icon = scope:scrounger + } + } + } + } + } + + ai_chance = { + base = 40 + modifier = { + add = 15 + OR = { + has_trait = ambitious + has_trait = diligent + } + } + modifier = { + add = -25 + short_term_gold < medium_gold_value + } + } + } + + # Option C: No further investment + option = { + name = court.6041.c + scope:scrounger = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -20 + } + } + + ai_chance = { + base = 50 + modifier = { + add = 15 + has_trait = greedy + } + modifier = { + add = 25 + short_term_gold < medium_gold_value + } + } + } +} + +##################################### +# Lonely Days # +# by Linnéa Thimrén # +##################################### + +#Your Friend is struggling with feeling isolated/lonely due to your official duties, make time for them or find other ways to make them feel better +scripted_trigger court_5001_basic_friend_trigger = { + is_courtier_of = root + is_available_ai = yes +} + +scripted_trigger court_5001_basic_marriage_trigger = { + is_married = no + is_adult = yes + is_betrothed = no + can_marry_trigger = yes + is_concubine = no +} + +court_yearly.5001 = { + type = character_event + title = court.5001.t + desc = court.5001.desc + theme = court + left_portrait = { + character = scope:friend + animation = sadness + } + right_portrait = { + character = scope:match_for_friend + animation = flirtation_left + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + NOT = { has_character_flag = had_event_court_5001 } + any_relation = { + type = friend + court_5001_basic_friend_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_relation = { #More likely if they have no cool minor titles + type = friend + court_5001_basic_friend_trigger = yes + has_any_court_position = no + } + } + modifier = { + add = 0.25 + any_relation = { #Slightly more likely if you have a pet companion and they don't + type = friend + court_5001_basic_friend_trigger = yes + root = { + has_cat_or_dog_trigger = yes + } + has_cat_or_dog_trigger = no + } + } + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5001 + years = 10 + } + random_relation = { + type = friend + limit = { + court_5001_basic_friend_trigger = yes + } + weight = { + base = 1 + modifier = { + add = -1 + has_any_court_position = yes + } + modifier = { #More likely to pick an unmarried friend + add = 1 + court_5001_basic_marriage_trigger = yes + save_temporary_scope_as = friend_check + root = { + any_courtier = { + this != scope:friend_check + court_5001_basic_marriage_trigger = yes + can_marry_character_trigger = { CHARACTER = scope:friend_check } + scope:friend_check = { is_attracted_to_gender_of = prev } + } + } + } + } + save_scope_as = friend + } + + #Is there anyone for them to marry? + if = { + limit = { + scope:friend = { + court_5001_basic_marriage_trigger = yes + } + any_courtier = { + this != scope:friend + court_5001_basic_marriage_trigger = yes + can_marry_character_trigger = { CHARACTER = scope:friend } + scope:friend = { is_attracted_to_gender_of = prev } + } + } + random_courtier = { + limit = { + this != scope:friend + court_5001_basic_marriage_trigger = yes + can_marry_character_trigger = { CHARACTER = scope:friend } + scope:friend = { is_attracted_to_gender_of = prev } + } + weight = { + base = 1 + opinion_modifier = { + opinion_target = scope:friend + multiplier = 1 + } + modifier = { #More likely if they're openly lovers + add = 10 + has_relation_lover = scope:friend + NOT = { has_secret_relation_lover = scope:friend } + } + modifier = { #Always a plus if your partner is into you + is_attracted_to_gender_of = scope:friend + add = 5 + } + modifier = { #Let's aim for a similar age + OR = { + age < scope:friend.age_plus_10 + age > scope:friend.age_minus_10 + } + add = 2 + } + } + save_scope_as = match_for_friend + } + } + + + #Can you gift them a cat/dog? We check this here so we keep the story used in script consistent even if they have both a cat and a dog + if = { + limit = { + has_cat_or_dog_trigger = yes + scope:friend = { + has_cat_or_dog_trigger = no + } + } + random_owned_story = { + limit = { + OR = { + story_type = story_cycle_pet_dog + story_type = story_cycle_pet_cat + } + } + save_scope_as = story + } + } + + if = { + limit = { + scope:friend = { has_any_court_position = no } + character_can_be_employed_in_a_court_position_trigger = { + CHARACTER = scope:friend + } + } + mark_court_position_for_employment_effect = { + CHARACTER = scope:friend + } + } + } + + option = { #Make time for them + name = court.5001.a + + #Lose some court grandeur. + change_current_court_grandeur = minor_court_grandeur_loss + + scope:friend = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + if = { + limit = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:friend } + } + set_relation_best_friend = { reason = best_friend_make_time copy_reason = friend target = scope:friend } + } + } + + option = { #Marry them off + name = court.5001.b + trigger = { + exists = scope:match_for_friend + } + scope:friend = { + marry = scope:match_for_friend + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + + option = { #Gift them your dog/cat + name = { + trigger = { + scope:story = { story_type = story_cycle_pet_dog } + } + text = court.5001.c_dog + } + name = { + trigger = { + scope:story = { story_type = story_cycle_pet_cat } + } + text = court.5001.c_cat + } + trigger = { + exists = scope:story + } + + if = { + limit = { + scope:story = { story_type = story_cycle_pet_dog } + } + transfer_dog_story_cycle_to_effect = { + CHARACTER = scope:friend + STORY = scope:story + } + } + else = { + transfer_cat_story_cycle_to_effect = { + CHARACTER = scope:friend + STORY = scope:story + } + } + + scope:friend = { + if = { + limit = { #"What am I supposed to do with this??" + OR = { + has_personality_malicious_trigger = yes + AND = { + scope:story = { story_type = story_cycle_pet_cat } + has_character_modifier = cat_story_allergy_modifier + } + AND = { + scope:story = { story_type = story_cycle_pet_dog } + faith = { religion_tag = islam_religion } + } + } + } + add_opinion = { + target = root + modifier = dumped_animal_on_me_opinion + } + } + else = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + } + } + + option = { #Give them a minor title + name = court.5001.d + trigger = { + exists = scope:court_position_to_fill + } + employ_character_as_marked_court_position_effect = { + CHARACTER = scope:friend + POSITION = scope:court_position_to_fill + } + scope:friend = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } +} + +##################################### +# The Haunting # +# by Linnéa Thimrén # +##################################### + +# Family member died some time ago and is now rumored to haunt the place +court_yearly.5010 = { + type = character_event + title = court.5010.t + desc = court.5010.desc + theme = court + override_background = { + reference = corridor_night + } + left_portrait = { + character = scope:family_member + animation = sadness + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + is_ai = no + location = { + exists = var:possible_haunting + var:possible_haunting = { #The place belongs to the family of the deceased + OR = { + any_close_family_member = { + this = root + } + any_spouse = { + this = root + } + is_grandparent_of = root + is_great_grandparent_of = root + } + } + } + } + + weight_multiplier = { + base = 0.5 + modifier = { #More likely if the death was gruesome + add = 0.75 + location = { + var:possible_haunting = { + had_gruesome_death_trigger = yes + } + } + } + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + location = { + var:possible_haunting = { + save_scope_as = family_member + } + remove_variable = possible_haunting + } + } + + option = { #Dismiss their fears and denounce their superstition + name = court.5010.a + trigger = { + faith = { + NOR = { + has_doctrine = tenet_ancestor_worship + has_doctrine = tenet_adorcism + } + } + } + if = { + limit = { + capital_county = { + NOT = { has_county_modifier = county_dismissed_servants_fear_modifier } + } + } + capital_county = { + add_county_modifier = { + modifier = county_dismissed_servants_fear_modifier + days = 3650 + } + } + } + add_piety = minor_piety_gain + } + + option = { #Encourage them to be respectful and leave the ghost be + name = court.5010.b + trigger = { + faith = { + OR = { + has_doctrine = tenet_ancestor_worship + has_doctrine = tenet_adorcism + } + } + } + if = { + limit = { + capital_county = { + NOT = { has_county_modifier = county_dismissed_servants_fear_modifier } + } + } + capital_county = { + add_county_modifier = { + modifier = county_dismissed_servants_fear_modifier + days = 3650 + } + } + } + add_piety = minor_piety_gain + } + + option = { #Hire someone to investigate and banish the ghost + name = court.5010.c + if = { + limit = { + capital_county = { + NOT = { has_county_modifier = county_acknowledged_servants_fear_modifier } + } + } + capital_county = { + add_county_modifier = { + modifier = county_acknowledged_servants_fear_modifier + days = 3650 + } + } + } + remove_short_term_gold = minor_gold_value + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + } + } +} + +##################################### +# Pillow Talk # +# by Linnéa Thimrén # +##################################### + +# Your cat has claimed a courtier's bed +court_yearly.5020 = { + type = character_event + title = court.5020.t + desc = court.5020.desc + theme = court + left_portrait = { + character = scope:courtier + animation = anger + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + NOT = { has_character_flag = had_event_court_5020 } + any_owned_story = { + type = story_cycle_pet_cat + } + any_courtier = { + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 0.5 + modifier = { #More likely if you have a (potential)rival to irritate + add = 0.75 + any_courtier = { + OR = { + has_relation_rival = root + has_relation_potential_rival = root + } + } + } + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5020 + years = 10 + } + random_courtier = { + weight = { #More likely if you dislike each other + opinion_modifier = { + opinion_target = root + multiplier = -0.5 + } + modifier = { + add = 5 + OR = { + has_relation_rival = root + has_relation_potential_rival = root + } + } + ai_value_modifier = { + ai_boldness = 0.75 + } + } + save_scope_as = courtier + } + random_owned_story = { + type = story_cycle_pet_cat + save_scope_as = story + } + } + + option = { #It's the cat's pillow now + name = court.5020.a + if = { + limit = { + NOT = { has_relation_rival = scope:courtier } + } + progress_towards_rival_effect = { + REASON = rival_deposed_for_cat + CHARACTER = scope:courtier + OPINION = default_rival_opinion + } + } + else = { + scope:courtier = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + #Might backfire... + hidden_effect = { + scope:courtier = { + if = { + limit = { + ai_vengefulness >= medium_positive_ai_value + } + random = { + chance = 20 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -0.5 + } + root = { + trigger_event = { + id = court_yearly.5021 + days = { 50 100 } + } + } + } + } + } + } + } + + option = { #I'll handle it + name = court.5020.b + scope:courtier = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + #Might backfire... Cat runs away + hidden_effect = { + random = { + chance = 20 + add_character_flag = cat_is_dying #Just so no other cat-events trigger in the meantime + trigger_event = { + id = pet_animal.0197 + days = { 50 100 } + } + } + } + } +} + +#The courtier killed the cat +court_yearly.5021 = { + type = character_event + title = court.5020.t + desc = { + desc = court.5021.desc + triggered_desc = { #The things we do for bad jokes... + trigger = { + var:story_cycle_cat_name = flag:cat_name_mittens + } + desc = court.5021.desc_mittens + } + } + theme = court + left_portrait = { + character = scope:courtier + animation = happiness + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + exists = scope:story + scope:courtier = { + is_alive = yes + is_courtier_of = root + } + } + + immediate = { + show_as_tooltip = { + remove_cat_story_modifiers_effect = yes + } + scope:courtier = { + hidden_effect = { + add_character_modifier = { + modifier = cat_story_fur_mittens_modifier + years = 10 + } + } + } + } + + option = { + name = { + trigger = { + var:story_cycle_cat_name = flag:cat_name_mittens + } + text = court.5021.a_mittens + } + name = { + trigger = { + NOT = { var:story_cycle_cat_name = flag:cat_name_mittens } + } + text = court.5021.a + } + } + + option = { #Throw them in jail! + name = court.5021.b + imprison_character_effect = { + TARGET = scope:courtier + IMPRISONER = root + } + } + + option = { #Give them a similar fate + name = court.5021.c + execute_prisoner_effect = { + VICTIM = scope:courtier + EXECUTIONER = root + } + } + + after = { + scope:story = { + hidden_effect = { end_story = yes } + } + } +} + +##################################### +# The Ballad of the Garlic King # +# by Claudia Baldassi # +# 6030 # +##################################### + +# The adventures of a foolish ruler have become really popular among wandering minstrels. The king of the story looks too much like you for comfort. # + +scripted_trigger court_6030_valid_courtier_trigger = { + is_available_ai_adult = yes + OR = { + has_relation_rival = root + opinion = { + target = root + value < 0 + } + has_trait = intellect_bad + has_trait = dull + } +} + +court_yearly.6030 = { + type = character_event + title = court.6030.t + desc = court.6030.desc + theme = court + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:6030_courtier + animation = happiness + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + highest_held_title_tier >= tier_kingdom + is_adult = yes + NOT = { + has_character_flag = court_6030_cooldown + } + any_courtier_or_guest = { + court_6030_valid_courtier_trigger = yes + } + } + + weight_multiplier = { + base = 0.8 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + add_character_flag = court_6030_cooldown + random_courtier_or_guest = { + limit = { + court_6030_valid_courtier_trigger = yes + } + save_scope_as = 6030_courtier + } + } + + # Option F: I don't care + option = { + name = court.6030.f + if = { + limit = { + NOT = { + has_trait = reclusive + } + } + add_stress = medium_stress_gain + } + random = { + chance = 15 + if = { + limit = { + is_female = yes + } + give_nickname = nick_garlic_queen + } + else = { + give_nickname = nick_the_garlic + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = -0.5 + } + modifier = { + has_trait = reclusive + add = 25 + } + } + } + + # Option D: prohibit and arrest + option = { + name = court.6030.d + custom_tooltip = court.6030.d.tt + trigger = { + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = callous + has_trait = irritable + has_trait = arrogant + } + } + imprison = { + target = scope:6030_courtier + type = dungeon + } + add_prestige = minor_prestige_gain + add_dread = major_dread_gain + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = scared_opinion + opinion = -20 + } + } + stress_impact = { + just = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + shy = medium_stress_impact_gain + craven = medium_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_energy = 0.25 + } + modifier = { + has_trait = just + add = -25 + } + modifier = { + has_trait = gregarious + add = -25 + } + modifier = { + has_trait = shy + add = -25 + } + modifier = { + has_trait = craven + add = -25 + } + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = compassionate + add = -50 + } + } + } + + # Option A: laugh it off + option = { + name = court.6030.a + trigger = { + OR = { + has_trait = gregarious + has_trait = forgiving + has_trait = humble + } + NOR = { + has_trait = shy + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = craven + has_trait = reclusive + } + } + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + add_stress = medium_stress_loss + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + # Option B: this is so humiliating... + option = { + name = court.6030.b + trigger = { + OR = { + has_trait = shy + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = craven + has_trait = reclusive + } + NOR = { + has_trait = gregarious + has_trait = forgiving + has_trait = humble + } + } + add_prestige = medium_prestige_loss + random = { + chance = 15 + if = { + limit = { + is_female = yes + } + give_nickname = nick_garlic_queen + } + else = { + give_nickname = nick_the_garlic + } + } + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = amused_opinion + opinion = 15 + } + } + add_stress = medium_stress_gain + ai_chance = { + base = 80 + ai_value_modifier = { + ai_sociability = -1 + } + } + } + + # Option C: lash out at your court + option = { + name = court.6030.c + trigger = { + OR = { + has_trait = wrathful + has_trait = irritable + has_trait = arbitrary + has_trait = vengeful + has_trait = callous + } + } + add_dread = medium_dread_gain + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = scared_opinion + opinion = -10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.25 + ai_vengefulness = 0.5 + } + } + } + + # Option E: heads will roll... + option = { + name = court.6030.e + trigger = { + OR = { + has_trait = wrathful + has_trait = sadistic + has_trait = torturer + has_trait = vengeful + has_trait = giant + has_trait = physique_good + has_trait = berserker + } + } + custom_tooltip = court.6030.e.tt + random_list = { + 20 = { + scope:6030_courtier = { + death = { + death_reason = death_beaten + killer = root + } + } + } + 50 = { + scope:6030_courtier = { + increase_wounds_effect = { REASON = beaten } + } + } + 30 = { + progress_towards_rival_effect = { + REASON = rival_punched_for_song + CHARACTER = scope:6030_courtier + OPINION = -30 + } + reverse_add_opinion = { + target = scope:6030_courtier + modifier = scared_opinion + opinion = -50 + } + } + } + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = scared_opinion + opinion = -25 + } + } + stress_impact = { + eccentric = medium_stress_impact_loss + shy = major_stress_impact_gain + compassionate = major_stress_impact_gain + patient = major_stress_impact_gain + } + add_dread = major_dread_gain + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_rationality = -0.5 + } + } + } +} + +######################### +# Captured Beast +# by George Luff +######################### + +scripted_trigger court_7100_huntsmaster_trigger = { + has_court_position = master_of_hunt_court_position + is_available_healthy_ai_adult = yes +} + +scripted_effect court_7100_animal_bonus_effect = { + # Gains modifier based on animal + if = { + limit = { + scope:captured_animal = flag:wolf + } + add_character_modifier = { + modifier = exotic_pet_wolf + years = 10 + } + } + else_if = { + limit = { + scope:captured_animal = flag:bear + } + add_character_modifier = { + modifier = exotic_pet_bear + years = 10 + } + } + else_if = { + limit = { + scope:captured_animal = flag:lion + } + add_character_modifier = { + modifier = exotic_pet_lion + years = 10 + } + } + else_if = { + limit = { + scope:captured_animal = flag:tiger + } + add_character_modifier = { + modifier = exotic_pet_tiger + years = 10 + } + } +} + +### Exotic Animal event +court_yearly.7100 = { + type = character_event + title = court.7100.title + desc = court.7100.desc + theme = court + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:huntmaster + animation = personality_bold + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + # Has Master of the Hunt employed + any_court_position_holder = { + court_7100_huntsmaster_trigger = yes + } + + # Does not already have an exotic pet + NOR = { + has_character_modifier = exotic_pet_wolf + has_character_modifier = exotic_pet_bear + has_character_modifier = exotic_pet_lion + has_character_modifier = exotic_pet_tiger + } + } + + immediate = { + # Decide on which animal it is + random_list = { + 25 = { # Wolf + save_scope_value_as = { + name = captured_animal + value = flag:wolf + } + } + + 25 = { # Bear + # Not outside of Europe or Asian black bear territory + modifier = { + factor = 0 + location = { + NOR = { + geographical_region = world_europe + geographical_region = world_tibet + geographical_region = world_himalaya + geographical_region = world_burma + geographical_region = world_middle_east_persia + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + save_scope_value_as = { + name = captured_animal + value = flag:bear + } + } + + 25 = { # Lion + # Not outside of Africa + modifier = { + factor = 0 + location = { + NOT = { geographical_region = world_africa } + } + } + save_scope_value_as = { + name = captured_animal + value = flag:lion + } + } + + 25 = { # Tiger + # Not outside of India or Asia + modifier = { + factor = 0 + location = { + NOR = { + geographical_region = world_india + geographical_region = world_tibet + geographical_region = world_himalaya + geographical_region = world_burma + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + save_scope_value_as = { + name = captured_animal + value = flag:tiger + } + } + } + + # Save the Master of the Hunt in scope + random_court_position_holder = { + limit = { + court_7100_huntsmaster_trigger = yes + } + save_scope_as = huntmaster + } + } + + # Dispose of it immediately! + option = { + name = court.7100.a + custom_tooltip = court.7100.a.tt + + scope:huntmaster = { + add_opinion = { + modifier = rejected_gift_opinion + target = root + opinion = -20 + } + } + + stress_impact = { + brave = medium_stress_impact_gain + } + } + + # I shall keep it as a pet! + option = { + name = court.7100.b + stress_impact = { + craven = medium_stress_impact_gain + } + random = { + chance = 75 + modifier = { + add = { + value = prowess + multiply = -1 + multiply = 2.5 + min = -50 + } + } + increase_wounds_no_death_effect = { REASON = wild_animal } + } + court_7100_animal_bonus_effect = yes + } + + # You can keep it! + option = { + name = court.7100.c + + scope:huntmaster = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + random = { + chance = 75 + modifier = { + add = { + value = scope:huntmaster.prowess + multiply = -1 + multiply = 2.5 + min = -50 + } + } + increase_wounds_no_death_effect = { REASON = wild_animal } + } + court_7100_animal_bonus_effect = yes + } + } +} + +######################### +# Loud and Proud +# by George Luff +######################### + +scripted_trigger court_7200_court_musician_trigger = { + has_court_position = court_musician_court_position + is_available_healthy_ai_adult = yes +} + +## Musician won't stop making noise +court_yearly.7200 = { + type = character_event + title = court.7200.title + desc = { + desc = court.7200.intro.desc + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = court_7200_drum + } + desc = court.7200.drum.desc + } + triggered_desc = { + trigger = { + has_character_flag = court_7200_trombone + } + desc = court.7200.trombone.desc + } + triggered_desc = { + trigger = { + has_character_flag = court_7200_pipes + } + desc = court.7200.pipes.desc + } + triggered_desc = { + trigger = { + has_character_flag = court_7200_guitar + } + desc = court.7200.guitar.desc + } + } + desc = court.7200.outro.desc + } + theme = court + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:loud_musician + animation = happiness + } + + cooldown = { years = 5 } + + weight_multiplier = { + base = 1 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + # Employs a Court Musician + any_court_position_holder = { + court_7200_court_musician_trigger = yes + } + } + + immediate = { + # Select court musician + random_court_position_holder = { + limit = { + court_7200_court_musician_trigger = yes + } + save_scope_as = loud_musician + } + random_list = { + 25 = { + add_character_flag = court_7200_drum + } + 25 = { + add_character_flag = court_7200_trombone + } + 25 = { + add_character_flag = court_7200_pipes + } + 25 = { + add_character_flag = court_7200_guitar + } + } + } + + # Persuade the musician to keep to a curfew on the racket + option = { + name = court.7200.a + + stress_impact = { + sadistic = medium_stress_impact_gain + } + + every_courtier_or_guest = { + custom = all_courtiers_and_guests + limit = { + this != scope:loud_musician + } + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 10 + ai_vengefulness = -10 + } + } + } + + # Strip them of their position + option = { + name = court.7200.b + + stress_impact = { + arbitrary = medium_stress_impact_loss + } + + revoke_court_position = { + court_position = court_musician_court_position + recipient = scope:loud_musician + } + + scope:loud_musician = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + + add_character_modifier = { + modifier = fired_court_position + years = 5 + } + + every_courtier_or_guest = { + limit = { + this != scope:loud_musician + } + custom = all_courtiers_and_guests + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 25 + } + } + } + + # Just knock it off, okay? + option = { + name = court.7200.c + stress_impact = { + calm = medium_stress_impact_gain + wrathful = medium_stress_impact_loss + } + + scope:loud_musician = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + } + every_courtier_or_guest = { + limit = { + this != scope:loud_musician + } + custom = all_courtiers_and_guests + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + } +} + +# Court event 7030 - Foreign Merchants wish to establish a merchant quarter +court_yearly.7030 = { + type = character_event + title = court.7030.title + desc = court.7030.desc + theme = court + + cooldown = { years = 20 } + left_portrait = { + character = scope:foreign_merchant + animation = personality_rational + } + right_portrait = { + character = scope:steward + animation = disapproval + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + } + any_character_to_title_neighboring_and_across_water_county = { + NOT = { + culture = { this = root.culture } + } + } + } + + immediate = { + # Save foreign county as scope + random_character_to_title_neighboring_and_across_water_county = { + limit = { + NOT = { + culture = { this = root.culture } + } + } + save_scope_as = merchant_county + } + + cp:councillor_steward = { + save_scope_as = steward + } + + ## Create Merchant + create_character = { + template = foreign_merchant_template + location = root.capital_province + save_scope_as = foreign_merchant + } + } + + option = { # Establish merchant quarter, cultural acceptance + name = court.7030.a + root.culture = { + change_cultural_acceptance = { + target = scope:foreign_merchant.culture + value = major_cultural_acceptance_gain + desc = cultural_acceptance_foreign_merchants + } + } + + root.capital_county = { + add_county_modifier = { + modifier = foreign_merchant_community + years = 20 + } + } + + stress_impact = { + arrogant = minor_stress_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 0.2 + ai_greed = 0.5 + } + + } + } + + option = { # Expand the mercantile district for everyone + name = court.7030.c + trigger = { + capital_county = { + title_province = { + OR = { + AND = { + building_common_tradeport_requirement_terrain = yes + NOT = { has_building = common_tradeport_08 } + } + AND = { + has_building_or_higher = city_01 + NOT = { has_building = guild_halls_08 } + } + } + } + } + } + + remove_treasury_or_gold = medium_treasury_or_gold_value + + if = { + limit = { + root.capital_county = { + title_province = { + building_common_tradeport_requirement_terrain = yes + } + } + } + root.capital_county = { + title_province = { + upgrade_tradeport = yes + } + } + } + else_if = { + limit = { + root.capital_county = { + title_province = { + has_building_or_higher = city_01 + } + } + } + root.capital_county = { + title_province = { + upgrade_guildhall = yes + } + } + } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_greed = -0.5 + ai_rationality = 0.2 + } + } + + stress_impact = { + greedy = medium_stress_gain + } + } + + option = { # Ban the foreigners! + name = court.7030.d + custom_tooltip = court.7030.d.tt + add_treasury_or_gold = medium_treasury_or_gold_value + scope:foreign_merchant = { + show_as_tooltip = { + banish = yes + } + silent_disappearance_effect = yes + } + + root.culture = { + change_cultural_acceptance = { + target = scope:foreign_merchant.culture + value = major_cultural_acceptance_loss + desc = cultural_acceptance_foreigners_expelled + } + } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = -1 + ai_greed = 1 + ai_compassion = -0.5 + } + } + + stress_impact = { + eccentric = minor_stress_impact_loss + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + cynical = minor_stress_impact_gain + } + } +} + +### One of your courtiers has started sitting on a pillar during the day + +scripted_trigger court_7040_ascetic_religion_trigger = { + faith = { + OR = { + religion_tag = christianity_religion + religion_tag = buddhism_religion + religion_tag = jainism_religion + religion_tag = taoism_religion + religion_tag = dualism_religion + has_doctrine = tenet_asceticism + } + } +} + +court_yearly.7040 = { + type = character_event + title = court.7040.title + desc = court.7040.desc + theme = court + + cooldown = { years = 10 } + left_portrait = { + character = root + animation = throne_room_conversation_1 + } + right_portrait = { + character = scope:chaplain + animation = disapproval + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + NOT = { has_character_modifier = court_7040_ascetic_practices } + # Must follow a faith that historically practised asceticism, or possess the asceticism tenet + + root = { court_7040_ascetic_religion_trigger = yes } + # Courtier must be of the same faith as root + + any_courtier = { + ep1_spare_courtier_trigger = yes + faith = root.faith + } + + # We need the court chaplain for narrative purposes + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + # Select courtier + random_courtier = { + limit = { + ep1_spare_courtier_trigger = yes + faith = root.faith + } + add_trait = reclusive + save_scope_as = ascetic + } + + # Select the court chaplain + cp:councillor_court_chaplain = { + save_scope_as = chaplain + } + + # Select religious head for option b + if = { + limit = { + faith = { + religious_head ?= { + this != root + } + } + } + faith.religious_head = { + save_scope_as = head_of_faith + } + } + } + + option = { # Send them to the religious head, if they exist + name = court.7040.b + + trigger = { + exists = scope:head_of_faith + exists = scope:head_of_faith.capital_province + } + + remove_courtier_or_guest = { character = scope:ascetic new_location = scope:head_of_faith.capital_province } + + scope:head_of_faith = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 25 + } + } + + faith = { + change_fervor = { + value = 5 + desc = fervor_gain_ascetic_example + } + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_zeal = 0.4 + ai_compassion = -0.2 + } + } + } + + option = { # Truly a pious individual, their example inspires me! + name = court.7040.c + + add_character_modifier = { + modifier = court_7040_ascetic_practices + years = 10 + } + + stress_impact = { + lazy = minor_stress_gain + cynical = minor_stress_gain + } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 0.5 + ai_honor = 0.5 + } + } + } + + option = { # If you want to live in isolation, do so somewhere else! + name = court.7040.d + + add_piety = minor_piety_loss + + stress_impact = { + zealous = medium_stress_gain + } + + scope:ascetic = { + show_as_tooltip = { + banish = yes + } + silent_disappearance_effect = yes + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_compassion = -1 + ai_honor = -0.5 + ai_vengefulness = 1 + } + } + } + + option = { # Just ignore them, they'll get over it eventually. + name = court.7040.a + + scope:chaplain = { + add_opinion = { + target = root + modifier = ignored_concerns + } + } + + add_piety = minor_piety_loss + + stress_impact = { + zealous = minor_stress_gain + impatient = minor_stress_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = 1 + ai_compassion = 0.5 + } + } + } +} + +########## Your caravans are attacked by rampaging Christian nobles! + +court_yearly.4350 = { + type = character_event + title = court.4350.t + desc = court.4350.desc + theme = diplomacy_foreign_affairs_focus + lower_left_portrait = { + character = scope:caravan_attacker_liege + } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:concerned_marshal + animation = worry + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + NOT = { has_character_flag = has_had_caravan_islamic_event } + is_at_war = no + religion = religion:islam_religion + any_neighboring_realm_same_rank_owner = { + is_landed = yes + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + in_diplomatic_range = root + liege != root + } + exists = root.cp:councillor_marshal + } + + immediate = { + add_character_flag = { + flag = has_had_caravan_islamic_event + days = 1825 + } + cp:councillor_marshal = { save_scope_as = concerned_marshal } + random_neighboring_realm_same_rank_owner = { + limit = { + is_landed = yes + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + in_diplomatic_range = root + liege != root + } + save_scope_as = caravan_attacker_liege + } + remove_treasury_or_gold = medium_treasury_or_gold_value + } + + option = { + name = court.4350.a + every_courtier_or_guest = { + limit = { + NOT = { has_trait = temperate } + } + custom = all_courtiers_and_guests + add_opinion = { + target = root + modifier = given_luxuries_opinion + opinion = 10 + } + } + scope:caravan_attacker_liege = { + add_opinion = { + target = root + opinion = 40 + modifier = pleased_opinion + } + if = { + limit = { + NOR = { + is_allied_to = root + has_truce = root + } + } + add_truce_both_ways = { + character = root + days = 1825 + name = TRUCE_TRADE_DEAL + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.25 + ai_greed = 0.25 + } + } + } + + option = { + name = court.4350.b + add_dread = medium_dread_gain + add_character_modifier = { + modifier = leading_looting_modifier + days = 1000 + } + add_gold = minor_gold_value + scope:caravan_attacker_liege = { + add_opinion = { + target = root + opinion = -40 + modifier = disappointed_opinion + } + every_vassal = { + custom = all_vassals + add_opinion = { + target = root + opinion = -40 + modifier = disappointed_opinion + } + } + } + scope:caravan_attacker_liege = { + if = { + limit = { + OR = { + is_allied_to = root + has_truce = root + } + } + cancel_truce_both_ways = root + break_alliance = root + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.25 + ai_greed = 0.25 + ai_vengefulness = 0.5 + } + } + } + option = { + name = court.4350.c + flavor = court.4350.c.tt + add_dread = minor_dread_gain + add_piety = minor_piety_gain + scope:caravan_attacker_liege = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + this.capital_province = { + add_province_modifier = { + modifier = spurned_by_traders + years = 10 + } + } + every_vassal = { + custom = all_vassals + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.25 + } + } + } +} +### Reversed POV - one of our nobles attacked a trading caravan! +court_yearly.4355 = { + type = character_event + title = court.4355.t + desc = court.4355.desc + theme = diplomacy_foreign_affairs_focus + left_portrait = { + character = scope:reporting_marshal + animation = personality_honorable + } + right_portrait = { + character = scope:caravan_attacker + animation = rage + } + lower_left_portrait = { + character = scope:attacked_liege + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + NOT = { has_character_flag = has_had_caravan_christian_event } + is_at_war = no + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + any_neighboring_realm_same_rank_owner = { + is_landed = yes + religion = religion:islam_religion + in_diplomatic_range = root + liege != root + } + any_powerful_vassal = { + opinion = { + target = root + value <= medium_negative_opinion + } + age > 15 + } + exists = root.cp:councillor_marshal + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = has_had_caravan_christian_event + days = 1825 + } + cp:councillor_marshal = { save_scope_as = reporting_marshal } + random_vassal = { + limit = { + opinion = { + target = root + value < 20 + } + is_imprisoned = no + age > 15 + is_ai = yes + } + weight = { + base = 1 + modifier = { + has_relation_rival = root + factor = 20 + } + modifier = { + factor = 20 + is_powerful_vassal = yes + } + } + save_scope_as = caravan_attacker + } + + random_neighboring_realm_same_rank_owner = { + limit = { + is_landed = yes + religion = religion:islam_religion + in_diplomatic_range = root + } + save_scope_as = attacked_liege + } + } + + option = { + name = court.4355.a + flavor = court.4355.a.tt + every_courtier_or_guest = { + custom = all_courtiers_and_guests + add_opinion = { + target = root + opinion = 10 + modifier = given_luxuries_opinion + } + } + faith.religious_head = { + add_opinion = { + target = root + opinion = 10 + modifier = pious_opinion + } + } + scope:attacked_liege = { + add_opinion = { + target = root + opinion = -40 + modifier = disappointed_opinion + } + } + add_character_modifier = { + modifier = leading_looting_modifier + days = 1000 + } + scope:attacked_liege = { + if = { + limit = { + OR = { + is_allied_to = root + has_truce = root + } + } + cancel_truce_both_ways = root + } + } + capital_province = { + add_province_modifier = { + modifier = spurned_by_traders + years = 10 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } + + option = { + name = court.4355.b + scope:caravan_attacker = { + add_opinion = { + target = root + opinion = -40 + modifier = disappointed_opinion + } + } + scope:attacked_liege = { + add_opinion = { + target = root + opinion = 20 + modifier = respect_opinion + } + if = { + limit = { + NOR = { + is_allied_to = root + has_truce = root + } + } + add_truce_both_ways = { + character = root + days = 1825 + name = TRUCE_TRADE_DEAL + } + } + } + add_diplomacy_lifestyle_xp = major_lifestyle_xp + add_dread = medium_dread_gain + stress_impact = { + sadistic = medium_stress_loss + wrathful = medium_stress_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -0.5 + } + } + } + + option = { + name = court.4355.c + flavor = court.4355.c.tt + stress_impact = { + arbitrary = medium_stress_loss + craven = medium_stress_loss + } + if = { + limit = { + scope:caravan_attacker = { has_relation_rival = root } + } + scope:caravan_attacker = { remove_relation_rival = root } + } + scope:caravan_attacker = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + capital_province = { + add_province_modifier = { + modifier = spurned_by_traders + years = 10 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } +} + +court_yearly.4800 = { + type = character_event + title = court.4800.t + desc = court.4800.desc + cooldown = { years = 10 } + theme = court + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + OR = { + any_court_position_holder = { + type = bodyguard_court_position + is_available_ai_adult = yes + } + any_court_position_holder = { + type = akolouthos_court_position + is_available_ai_adult = yes + } + } + + OR = { + AND = { + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + is_available_ai_adult = yes + } + } + AND = { + employs_court_position = keeper_of_swans_court_position + any_court_position_holder = { + type = keeper_of_swans_court_position + is_available_ai_adult = yes + } + } + } + } + left_portrait = { + character = scope:defenestrated_character + animation = flirtation + } + right_portrait = { + character = scope:defenestrating_bodyguard + animation = rage + } + + weight_multiplier = { + base = 1 + } + + immediate = { + if = { + limit = { + employs_court_position = bodyguard_court_position + } + random_court_position_holder = { + type = akolouthos_court_position + limit = { + is_available_ai_adult = yes + } + save_scope_as = defenestrating_bodyguard + } + } + else = { + random_court_position_holder = { + type = bodyguard_court_position + limit = { + is_available_ai_adult = yes + } + save_scope_as = defenestrating_bodyguard + } + } + + if = { + limit ={ + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = defenestrated_character + } + } + else = { + random_court_position_holder = { + type = keeper_of_swans_court_position + save_scope_as = defenestrated_character + } + } + } + + option = { + name = court.4800.a + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + arbitrary = minor_stress_loss + sadistic = minor_stress_loss + } + random_list = { + 10 = { + scope:defenestrated_character = { + increase_wounds_effect = { REASON = defenestration } + apply_maimed_trait_and_modifier_effect = yes + add_opinion = { + target = root + opinion = -20 + modifier = hate_opinion + } + add_opinion = { + target = scope:defenestrating_bodyguard + opinion = -40 + modifier = hate_opinion + } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + left_icon = scope:defenestrated_character + title = court.4800.maimed_toast + show_as_tooltip = { + scope:defenestrated_character = { + increase_wounds_effect = { REASON = defenestration } + apply_maimed_trait_and_modifier_effect = yes + } + } + } + } + } + 5 = { + scope:defenestrated_character = { + death = { + death_reason = death_defenestration + killer = scope:defenestrating_bodyguard + } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + left_icon = scope:defenestrated_character + title = court.4800.death_toast + show_as_tooltip = { + scope:defenestrated_character = { + death = { + death_reason = death_defenestration + killer = scope:defenestrating_bodyguard + } + } + } + } + } + } + } + add_dread = minor_dread_gain + scope:defenestrating_bodyguard = { + add_opinion = { + target = root + opinion = 10 + modifier = respect_opinion + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + ai_boldness = 0.25 + ai_rationality = -0.5 + } + } + } + + option = { + name = court.4800.b + stress_impact = { + compassionate = minor_stress_gain + just = minor_stress_gain + sadistic = miniscule_stress_impact_loss + } + scope:defenestrated_character = { + increase_wounds_effect = { REASON = fight } + add_opinion = { + target = root + opinion = -5 + modifier = scared_opinion + } + add_opinion = { + target = scope:defenestrating_bodyguard + opinion = -25 + modifier = scared_opinion + } + } + scope:defenestrating_bodyguard = { + add_opinion = { + target = root + opinion = 10 + modifier = respect_opinion + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.25 + ai_vengefulness = 0.25 + ai_boldness = 0.25 + ai_rationality = -0.25 + } + } + } + + option = { + name = court.4800.c + if = { + limit = { + scope:defenestrating_bodyguard = { + has_court_position = bodyguard_court_position + + } + } + revoke_court_position = { + recipient = scope:defenestrating_bodyguard + court_position = bodyguard_court_position + } + } + else = { + revoke_court_position = { + recipient = scope:defenestrating_bodyguard + court_position = akolouthos_court_position + } + } + reverse_add_opinion = { + target = scope:defenestrated_character + opinion = 30 + modifier = grateful_opinion + } + reverse_add_opinion = { + target = scope:defenestrating_bodyguard + opinion = -30 + modifier = insulted_opinion + } + add_martial_lifestyle_xp = medium_lifestyle_xp + add_prestige = minor_prestige_gain + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +#Rando criminal is spawned based on what your culture considers criminal/shunned +scripted_effect event_0101_spawn_criminal_effect = { + create_character = { + location = root.capital_province + template = generic_peasant_character + faith = root.capital_province.faith #Character is meant to be a random lowborn, should be the local faith/culture rather than ruling class + culture = root.capital_province.culture + save_scope_as = lowborn_criminal + } + scope:lowborn_criminal = { + random_list = { + 10 = { + modifier = { + factor = 0 + root.faith = { has_doctrine_parameter = deviancy_accepted } + } + modifier = { + factor = 0.5 + root.faith = { has_doctrine_parameter = deviancy_shunned } + } + add_trait = deviant + save_scope_value_as = { + name = criminal_trait + value = flag:deviant_trait_flag + } + } + 10 = { + add_trait = murderer + } + 10 = { + modifier = { + factor = 0 + root.faith = { has_doctrine_parameter = witchcraft_accepted } + } + modifier = { + factor = 0.5 + root.faith = { has_doctrine_parameter = witchcraft_shunned } + } + add_trait = witch + save_scope_value_as = { + name = criminal_trait + value = flag:witch_trait_flag + } + } + 10 = { + add_trait = lazy + } + 10 = { #Dumb crimes that aren't trait-specific + + } + } + } + if = { + limit = { + scope:lowborn_criminal = { + has_trait = murderer + } + } + scope:lowborn_criminal = { + random_list = { + 10 = { + add_trait = cannibal + game_rule_create_spouse_and_children = { CHARACTER = scope:lowborn_criminal LOCATION = scope:lowborn_criminal } + every_child = { + add_trait = cannibal + } + every_spouse = { + add_trait = cannibal + } + save_scope_value_as = { + name = criminal_trait + value = flag:cannibal_trait_flag + } + } + 10 = { + add_trait = sadistic + save_scope_value_as = { + name = criminal_trait + value = flag:sadistic_trait_flag + } + } + 10 = { #Holy man murderer + modifier = { + factor = 0 + NOT = { has_allowed_gender_for_clergy = scope:lowborn_criminal } + } + replace_with_learning_trait_effect = yes + add_character_flag = { + flag = need_priest_outfit + } + } + } + } + } + if = { + limit = { + scope:lowborn_criminal = { + has_trait = deviant + } + } + scope:lowborn_criminal = { + random_list = { + 10 = { #Stableboy + add_character_flag = { + flag = stableboy_crime + } + pick_servant_romance_target_effect = yes + } + 10 = { #Kinky + add_character_flag = { + flag = kinky_crime + } + } + 10 = { #Animal lover + add_character_flag = { + flag = beastiality_crime + } + } + } + } + } + if = { + limit = { + scope:lowborn_criminal = { + has_trait = witch + } + } + scope:lowborn_criminal = { + random_list = { + 10 = { #Baby soup + add_character_flag = { + flag = baby_soup_crime + } + } + 10 = { #Evil healer + add_character_flag = { + flag = healer_crime + } + replace_with_learning_trait_effect = yes + add_trait = lifestyle_herbalist + give_nickname = nick_the_angel_of_death + } + 10 = { #Devil worshiper + add_character_flag = { + flag = devil_worship_crime + } + } + } + } + } + scope:lowborn_criminal = { + add_to_list = lowborn_criminal_list + every_child = { + add_to_list = lowborn_criminal_list + } + every_spouse = { + add_to_list = lowborn_criminal_list + } + } +} + +# Rando criminal shows up +court_yearly.0101 = { + type = character_event + title = court.0101.t + desc = { + desc = court.0101.desc.opening + first_valid = { #What the crime was + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + } + } + desc = court.0101.desc.murderer + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + } + } + desc = court.0101.desc.deviant + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + } + } + desc = court.0101.desc.witch + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = lazy + } + } + desc = court.0101.desc.lazy + } + } + random_valid = { #Traitless crimes + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + NOR = { + has_trait = murderer + has_trait = witch + has_trait = deviant + has_trait = lazy + } + } + } + desc = court.0101.desc.thief + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + NOR = { + has_trait = murderer + has_trait = witch + has_trait = deviant + has_trait = lazy + } + } + } + desc = court.0101.desc.sumptuary + } + } + first_valid = { #Details about the crime + #Murderer + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_trait = cannibal + } + } + desc = court.0101.desc.cannibal + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_trait = sadistic + } + } + desc = court.0101.desc.sadistic + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_character_flag = need_priest_outfit + } + } + desc = court.0101.desc.priest + } + #Deviant + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = stableboy_crime + } + } + desc = court.0101.desc.stableboy + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = kinky_crime + } + } + desc = court.0101.desc.kinky + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = beastiality_crime + } + } + desc = court.0101.desc.animals + } + #Witch + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + has_character_flag = baby_soup_crime + } + } + desc = court.0101.desc.baby_soup + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + has_character_flag = healer_crime + } + } + desc = court.0101.desc.suspicious_healer + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + has_character_flag = devil_worship_crime + } + } + desc = court.0101.desc.devil_worshiper + } + } + desc = court.0101.desc.outro + } + + theme = court + left_portrait = { + character = scope:executioner + animation = schadenfreude + } + right_portrait = { + character = scope:lowborn_criminal + animation = fear + } + + + # More likely to trigger if you are a sadistic person + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + has_trait = sadistic + } + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + is_available_at_peace_adult = yes + employs_court_position = executioner_court_position + } + + immediate = { + event_0101_spawn_criminal_effect = yes + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = executioner + } + } + } + + # Option A: Ironic punishment + option = { + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_trait = cannibal + } + } + text = court.0101.a.cannibal + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_trait = sadistic + } + } + text = court.0101.a.sadistic + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_character_flag = need_priest_outfit + faith = { has_doctrine_parameter = sky_burials_active } + } + } + text = court.0101.a.priest.sky + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_character_flag = need_priest_outfit + } + } + text = court.0101.a.priest + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = stableboy_crime + } + } + text = court.0101.a.stableboy + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = kinky_crime + } + } + text = court.0101.a.kinky + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = beastiality_crime + } + } + text = court.0101.a.animals + } + #Witch + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + has_character_flag = baby_soup_crime + } + } + text = court.0101.a.baby_soup + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + has_character_flag = healer_crime + } + } + text = court.0101.a.suspicious_healer + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + } + has_character_flag = devil_worship_crime + } + text = court.0101.a.devil_worshiper + } + name = { + trigger = { + } + text = court.0101.a + } + stress_impact = { + zealous = minor_stress_impact_loss #They are a criminal afterall + vengeful = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + sadistic = major_stress_impact_loss + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + scope:lowborn_criminal = { + every_child = { + limit = { + has_trait = cannibal + } + death = { + killer = root + death_reason = death_torture + } + } + every_spouse = { + limit = { + has_trait = cannibal + } + death = { + killer = root + death_reason = death_torture + } + } + death = { + killer = root + death_reason = death_torture + } + } + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_art_of_torture_punishment + } + } + + #Option C: I like this person, bring them to court! + option = { + trigger = { + OR = { + AND = { + OR = { + has_trait = sadistic + any_secret = { type = secret_murder } + } + scope:criminal_trait ?= flag:sadistic_trait_flag + } + AND = { + OR = { + has_trait = cannibal + any_secret = { type = secret_cannibal } + } + scope:criminal_trait ?= flag:cannibal_trait_flag + } + AND = { + OR = { + has_trait = deviant + any_secret = { type = secret_deviant } + } + scope:criminal_trait ?= flag:deviant_trait_flag + } + AND = { + OR = { + has_trait = witch + any_secret = { type = secret_witch } + } + scope:criminal_trait ?= flag:witch_trait_flag + } + } + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = beastiality_crime + } + } + text = court.0101.c.beastiality + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + NOT = { has_character_flag = beastiality_crime } + } + } + text = court.0101.c.deviant + } + name = { + trigger = { + scope:lowborn_criminal = { + NOT = { has_trait = deviant } + } + } + text = court.0101.c + } + stress_impact = { + zealous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain #You wanna see them hurt, even if you are both sadists + witch = minor_stress_impact_loss + deviant = minor_stress_impact_loss #Another pervert for me to have fun with + compassionate = major_stress_impact_loss + forgiving = major_stress_impact_loss + } + every_in_list = { + list = lowborn_criminal_list + root = { + add_courtier = prev + } + } + if = { + limit = { + has_trait = deviant + can_set_relation_lover_trigger = { CHARACTER = scope:lowborn_criminal } + } + set_relation_lover = { reason = lover_deviant target = scope:lowborn_criminal } + } + } + + #Option D: Keep them in the castle prison + option = { + name = court.0101.d + every_in_list = { + list = lowborn_criminal_list + root = { + add_courtier = prev + } + rightfully_imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + } + + } + + #Option B: I don't care + option = { + name = court.0101.b + scope:lowborn_criminal = { + silent_disappearance_effect = yes + every_child = { + silent_disappearance_effect = yes + } + every_spouse = { + silent_disappearance_effect = yes + } + } + } +} + +# Executioner feeling lonely +court_yearly.0102 = { + type = character_event + title = court.0102.t + desc = court.0102.desc + theme = court + left_portrait = { + character = scope:executioner + animation = sadness + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + employs_court_position = executioner_court_position + is_available_adult = yes + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + } + } + + # More likely to trigger if the executioner actually likes other humans + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = gregarious + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = compassionate + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = shy + } + } + } + + immediate = { + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = executioner + } + } + } + + # Option A: Pity the executioner + option = { + name = court.0102.a + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_took_pity + } + reverse_add_opinion = { + target = scope:executioner + modifier = grateful_opinion + opinion = 15 + } + stress_impact = { + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + shy = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } + + #Option C: Repremand the executioner for moaning about being lonely + option = { + name = court.0102.c + progress_towards_rival_effect = { + REASON = rival_reprimanded_lonely + CHARACTER = scope:executioner + OPINION = -25 + } + scope:executioner = { + add_stress = minor_stress_gain + } + stress_impact = { + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + shy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } + + #Option B: I don't care + option = { + name = court.0102.b + scope:executioner = { + add_stress = minor_stress_gain + } + stress_impact = { + vengeful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } +} + +# Executioner selling... items from the prisoners +court_yearly.0103 = { + type = character_event + title = court.0103.t + desc = { + desc = court.0103.desc.opening + random_valid = { #What did the executioner do + desc = court.0103.desc.hair_and_teeth + desc = court.0103.desc.jewelry + triggered_desc = { + trigger = { + scope:executioner = { + NOR = { + has_trait = compassionate + has_trait = content + has_trait = just + AND = { + has_trait = zealous + faith = { + NOT = { + has_doctrine = tenet_ritual_cannibalism + } + } + } + } + } + } + desc = court.0103.desc.meat + } + triggered_desc = { + trigger = { + scope:executioner = { + is_christian_trigger = yes + NOT = { + has_trait = zealous + } + } + } + desc = court.0103.desc.saint_bones + } + } + desc = court.0103.desc.outro + } + theme = court + left_portrait = { + character = scope:executioner + animation = personality_greedy + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + employs_court_position = executioner_court_position + is_available_adult = yes + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + NOT = { + has_trait = improvident + } + } + } + + weight_multiplier = { + base = 0.5 + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = greedy + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = sadistic + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = callous + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = ambitious + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = deceitful + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = honest + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = just + } + } + } + + immediate = { + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = executioner + } + } + } + + # Option A: Get in on this + option = { + name = court.0103.a + reverse_add_opinion = { + target = scope:executioner + modifier = grateful_opinion + opinion = 15 + } + add_gold = medium_gold_value + add_piety = major_piety_loss + stress_impact = { + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + greedy = major_stress_impact_loss + compassionate = major_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1.5 + } + } + } + + #Option B: Repremand the executioner + option = { + name = court.0103.b + rightfully_imprison_character_effect = { + TARGET = scope:executioner + IMPRISONER = root + } + stress_impact = { + greedy = major_stress_impact_gain + just = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = -0.5 + } + } + } + + #Option C: Don't care + option = { + name = court.0103.c + reverse_add_opinion = { + target = scope:executioner + modifier = grateful_opinion + opinion = 15 + } + stress_impact = { + greedy = major_stress_impact_gain + just = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + } + } +} + +################################################# +# The executioner events # +# by James Beaumont # +# 0104 - Child into exectution # +# 0106 - Executioner asks how far they can go # +################################################# + +# Executioner talking to a ward about their trade +court_yearly.0104 = { + type = character_event + title = court.0104.t + desc = court.0104.desc + + theme = court + left_portrait = { + character = scope:executioner + animation = happiness + } + right_portrait = { + character = scope:morbid_child + animation = admiration + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + employs_court_position = executioner_court_position + any_relation = { + type = ward + NOT = { has_trait = compassionate } + is_available = yes + age >= 5 + } + is_available_adult = yes + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + } + } + + # More likely to trigger if the executioner likes talking to children + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = gregarious + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = trusting + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = patient #You gotta have some real patience to answer some children's questions + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = family_first + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = shy + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = impatient + } + } + } + + immediate = { + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = executioner + } + } + random_relation = { + type = ward + limit = { + NOT = { has_trait = compassionate } + is_available = yes + age >= 5 + } + save_scope_as = morbid_child + } + } + + # Option A: Join in the conversation + option = { + name = court.0104.a + scope:morbid_child = { + add_trait = sadistic + } + progress_towards_friend_effect = { + CHARACTER = scope:morbid_child + OPINION = default_friend_opinion + REASON = friend_torture_stories + } + reverse_add_opinion = { + target = scope:morbid_child + modifier = grateful_opinion + opinion = 15 + } + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_torture_stories + } + reverse_add_opinion = { + target = scope:executioner + modifier = grateful_opinion + opinion = 15 + } + scope:morbid_child = { + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_torture_stories + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + shy = minor_stress_impact_gain + compassionate = major_stress_impact_gain + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + modifier = { + factor = 0.5 + scope:morbid_child = { has_trait = sadistic } + } + } + } + + #Option B: Repremand the executioner for talking to your ward + option = { + name = court.0104.b + progress_towards_rival_effect = { + REASON = rival_morbid_child + CHARACTER = scope:morbid_child + OPINION = -25 + } + scope:morbid_child = { + add_stress = minor_stress_gain + } + progress_towards_rival_effect = { + REASON = rival_reprimanded_child + CHARACTER = scope:executioner + OPINION = -25 + } + scope:executioner = { + add_stress = minor_stress_gain + } + stress_impact = { + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + shy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { #The kid is already a sadist + factor = 2 + scope:morbid_child = { has_trait = sadistic } + } + } + } + + #Option C: Pretend you didn't hear + option = { + name = court.0104.c + random_list = { + 50 = {} + 50 = { + scope:morbid_child = { + add_trait = sadistic + } + } + } + scope:morbid_child = { + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_torture_stories + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } +} + + +# Executioner asks how far they can go +court_yearly.0106 = { + type = character_event + title = court.0106.t + desc = court.0106.desc + theme = court + left_portrait = { + character = scope:executioner + animation = scheme + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + employs_court_position = executioner_court_position + is_available_adult = yes + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 0.5 + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = sadistic + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = callous + } + } + modifier = { + add = 1.0 + any_prisoner = { has_any_secrets = yes } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = just + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = compassionate + } + } + } + + immediate = { + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = executioner + } + } + } + + # Option A: Go hard on the prisoners + option = { + name = court.0106.a + if = { + limit = { + any_prisoner = { has_any_secrets = yes } + } + random_prisoner = { + random_secret = { + limit = { + NOT = { + any_secret_knower = { + this = root + } + } + } + reveal_to = root + } + } + } + if = { + limit = { + scope:executioner = { + has_trait = sadistic + } + } + scope:executioner = { add_stress = major_stress_impact_loss } + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_shared_opinions_on_punishment + } + } + else_if = { + limit = { + scope:executioner = { + has_trait = compassionate + } + } + scope:executioner = { add_stress = major_stress_impact_gain } + progress_towards_rival_effect = { + REASON = rival_go_hard_on_prisoners + CHARACTER = scope:executioner + OPINION = default_rival_opinion + } + } + stress_impact = { + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1.5 + } + } + } + + #Option B: Be a little gentle + option = { + name = court.0106.b + if = { + limit = { + scope:executioner = { + has_trait = compassionate + } + } + scope:executioner = { add_stress = major_stress_impact_loss } + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_shared_opinions_on_punishment + } + } + else_if = { + limit = { + scope:executioner = { + has_trait = sadistic + } + } + scope:executioner = { add_stress = major_stress_impact_gain } + progress_towards_rival_effect = { + REASON = rival_go_easy_on_prisoners + CHARACTER = scope:executioner + OPINION = default_rival_opinion + } + } + stress_impact = { + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + compassionate = major_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = -0.5 + } + } + } + + #Option C: Don't care + option = { + name = court.0106.c + if = { + limit = { + any_prisoner = { has_any_secrets = yes } + } + random_list = { + 50 = { + + } + 50 = { + random_prisoner = { + random_secret = { + limit = { + NOT = { + any_secret_knower = { + this = root + } + } + } + reveal_to = root + } + } + } + } + } + stress_impact = { + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + } + } +} + +# Parent sends you to horny jail +court_yearly.0110 = { + type = character_event + title = court.0110.t + desc = { + desc = court.0110.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_trait = deviant + } + desc = court.0110.desc.deviant + } + triggered_desc = { + trigger = { + has_trait = lovers_pox + } + desc = court.0110.desc.pox + } + desc = court.0110.desc.notspecial + } + desc = court.0110.desc.outro + } + + theme = court + left_portrait = { + character = scope:parent + animation = worry + } + right_portrait = { + character = cp:councillor_court_chaplain + animation = anger + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + any_parent = { + exists = yes + is_available_adult = yes + liege = root + is_landed = no + } + cp:councillor_court_chaplain ?= { is_available_adult = yes } + is_available_adult = yes + OR = { + trait_is_shunned_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = root } #Fornicator is handled by same rules + trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = root } #Fornicator is handled by same rules + } + OR = { + has_trait = deviant + has_trait = lovers_pox + any_relation = { + type = lover + NOT = { is_consort_of = root } + } + any_relation = { + type = soulmate + NOT = { is_consort_of = root } + } + } + is_eunuch_trigger = no + NOR = { + has_trait = celibate + has_trait = chaste + } + } + + # More likely to trigger if your character is lustful and your parent is chaste + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + any_parent = { + exists = yes + is_available_adult = yes + liege = root + is_landed = no + has_trait = chaste + } + } + modifier = { + add = 0.5 + cp:councillor_court_chaplain = { + has_trait = chaste + } + } + modifier = { + add = -0.5 + cp:councillor_court_chaplain = { + has_trait = lustful + } + } + modifier = { + add = 0.5 + has_trait = lustful + } + } + + immediate = { + random_parent = { + limit = { + is_alive = yes + is_available_adult = yes + liege = root + is_landed = no + } + save_scope_as = parent + } + cp:councillor_court_chaplain = { + save_scope_as = chaplain + } + } + + # Option A: Imprison your parent and chaplain + option = { + name = court.0110.a + progress_towards_rival_effect = { + REASON = rival_parent_imprisoned + CHARACTER = scope:parent + OPINION = default_rival_opinion + } + progress_towards_rival_effect = { + REASON = rival_parent_imprisoned + CHARACTER = cp:councillor_court_chaplain + OPINION = default_rival_opinion + } + imprison_character_effect = { + TARGET = scope:parent + IMPRISONER = root + } + imprison_character_effect = { + TARGET = cp:councillor_court_chaplain + IMPRISONER = root + } + stress_impact = { + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = -1 + } + } + } + + #Option B: Agree, become celibate + option = { + name = court.0110.b + add_trait = celibate + add_piety = medium_piety_gain + reverse_add_opinion = { + target = cp:councillor_court_chaplain + modifier = impressed_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:parent + modifier = relieved_opinion + opinion = 15 + } + stress_impact = { + vengeful = minor_stress_impact_gain + lustful = major_stress_impact_gain + rakish = massive_stress_impact_gain + stubborn = major_stress_impact_gain + wrathful = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_zeal = 0.5 + } + modifier = { #Character shouldn't give up sex if they haven't got any children + factor = 0 + any_child = { is_alive = yes count < 1 } + } + modifier = { #More likely to do it if they have a lot of kids + add = 5 + any_child = { is_alive = yes count > 4 } + } + } + } + + #Option C: Refuse and move on + option = { + name = court.0110.c + reverse_add_opinion = { + target = cp:councillor_court_chaplain + modifier = disappointed_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:parent + modifier = disappointed_opinion + opinion = -15 + } + stress_impact = { + } + ai_chance = { + base = 50 + } + } +} + +########################### +# Questionable Concoction # +# by Joe Parkin # +########################### + +scripted_trigger court_8100_physician_trigger = { + is_available_ai_adult = yes + NOT = { government_has_flag = government_is_theocracy } + NOT = { has_trait = devoted } + NAND = { + exists = ROOT.cp:councillor_court_chaplain + THIS = ROOT.cp:councillor_court_chaplain + } +} + +scripted_trigger court_8100_witch_trigger = { + OR = { + has_trait = lifestyle_mystic + has_trait = lifestyle_herbalist + has_trait = witch + any_secret = { type = secret_witch } + } +} + +court_yearly.8100 = { + type = character_event + title = court.8100.t + desc = court.8100.desc + theme = court + cooldown = { years = 10 } + left_portrait = { + character = scope:physician + animation = throne_room_conversation_4 + } + right_portrait = { + character = scope:food_taster + animation = throne_room_conversation_1 + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + court_8100_physician_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + any_court_position_holder = { + type = court_physician_court_position + court_8100_physician_trigger = yes + court_8100_witch_trigger = yes + } + } + } + + immediate = { + random_court_position_holder = { + type = court_physician_court_position + limit = { court_8100_physician_trigger = yes } + weight = { + modifier = { + factor = 100 + court_8100_witch_trigger = yes + } + } + save_scope_as = physician + } + if = { + limit = { + employs_court_position = food_taster_court_position + any_court_position_holder = { + type = food_taster_court_position + is_available_ai_adult = yes + THIS != scope:physician + } + } + random_court_position_holder = { + type = food_taster_court_position + limit = { + is_available_ai_adult = yes + THIS != scope:physician + } + save_scope_as = food_taster + } + } + else = { + random_courtier_or_guest = { save_scope_as = food_taster } + } + } + + option = { # Your strongest potion, you say? + name = court.8100.a + stress_impact = { + craven = major_stress_impact_gain # What if I am not strong enough? + humble = medium_stress_impact_gain # I am fine with my strength + content = medium_stress_impact_gain # "" + } + add_prestige = minor_prestige_gain + random_list = { + 1 = { + desc = court.8100.tt.handle_potion + modifier = { factor = scope:physician.learning } + modifier = { + factor = 2 + scope:physician = { has_trait = lifestyle_mystic } + } + modifier = { + factor = 2 + scope:physician = { has_trait = lifestyle_herbalist } + } + modifier = { + factor = 2 + scope:physician = { + OR = { + has_trait = witch + any_secret = { type = secret_witch } + } + } + } + add_character_modifier = { + modifier = strong_potion_modifier + years = 5 + } + } + 45 = { + desc = court.8100.tt.need_weaker + add_character_modifier = { + modifier = feeling_unwell_modifier + years = 5 + } + stress_impact = { + base = medium_stress_impact_gain + } + } + 1 = { + desc = court.8100.tt.too_strong + modifier = { + factor = 2 + scope:physician = { has_relation_rival = ROOT } + } + modifier = { + factor = 2 + scope:physician = { learning < average_skill_rating } + } + death = { + death_reason = death_strongest_potion + killer = scope:physician + } + add_internal_flag = dangerous + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = craven + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -15 + has_trait = content + } + } + } + + option = { # Try it on my taster first + name = court.8100.b + trigger = { + exists = scope:food_taster + scope:food_taster = { has_court_position = food_taster_court_position } # To check against fallback + } + add_tyranny = minor_tyranny_gain + random_list = { + 1 = { + desc = court.8100.tt.handle_potion + modifier = { factor = scope:physician.learning } + modifier = { + factor = 2 + scope:physician = { has_trait = lifestyle_mystic } + } + modifier = { + factor = 2 + scope:physician = { has_trait = lifestyle_herbalist } + } + modifier = { + factor = 2 + scope:physician = { + OR = { + has_trait = witch + any_secret = { type = secret_witch } + } + } + } + scope:food_taster = { + add_character_modifier = { + modifier = strong_potion_modifier + years = 5 + } + if = { + limit = { + NOT = { has_trait = forgiving } + } + custom_tooltip = court.8100.b.tt_forgiving + add_opinion = { + target = ROOT + modifier = angry_opinion + opinion = -15 + } + } + } + add_character_modifier = { + modifier = strong_potion_modifier + years = 5 + } + } + 45 = { + desc = court.8100.tt.need_weaker + scope:food_taster = { + add_character_modifier = { + modifier = feeling_unwell_modifier + years = 5 + } + add_opinion = { + target = ROOT + modifier = angry_opinion + opinion = -15 + } + } + } + 1 = { + desc = court.8100.tt.too_strong + modifier = { + factor = 2 + scope:physician = { has_relation_rival = ROOT } + } + modifier = { + factor = 2 + scope:physician = { learning < average_skill_rating } + } + scope:food_taster = { + death = { + death_reason = death_strongest_potion + killer = scope:physician + } + } + add_opinion = { + target = scope:physician + modifier = attempted_murder_opinion + } + } + } + stress_impact = { + brave = medium_stress_impact_gain # What if I am not strong enough? + humble = medium_stress_impact_gain # I am fine with my strength + content = medium_stress_impact_gain # "" + compassionate = major_stress_impact_gain # Food tasters are people too + greedy = medium_stress_impact_gain # It's mine, it came to me! + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -15 + has_trait = content + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Sacrilege + name = court.8100.c + add_piety = minor_piety_gain + revoke_court_position = { + court_position = court_physician_court_position + recipient = scope:physician + } + reverse_add_opinion = { + target = scope:physician + modifier = angry_opinion + opinion = -15 + } + stress_impact = { + cynical = medium_stress_impact_gain # There is no god + arrogant = medium_stress_impact_gain # I want to be swole + ambitious = medium_stress_impact_gain # "" + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = -1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = ambitious + } + } + } + + option = { # I have no need of your potions + name = court.8100.d + add_prestige = miniscule_prestige_loss + reverse_add_opinion = { + target = scope:physician + modifier = insulted_opinion + opinion = -5 + } + stress_impact = { + brave = minor_stress_impact_gain + arrogant = medium_stress_impact_gain # I want to be swole + ambitious = medium_stress_impact_gain # "" + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -2 + ai_greed = -1 + } + modifier = { #Weight down for stress. + add = -5 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = ambitious + } + } + } +} + +######################### +# Novel Perspectives # +# by Joe Parkin # +######################### + +scripted_trigger root_faith_compare_doctrine_trigger = { + OR = { + AND = { + faith = { has_doctrine = $DOCTRINE$ } + NOT = { + ROOT.faith = { has_doctrine = $DOCTRINE$ } + } + } + AND = { + ROOT.faith = { has_doctrine = $DOCTRINE$ } + NOT = { + faith = { has_doctrine = $DOCTRINE$ } + } + } + } +} + +scripted_trigger court_8120_zealous_vassal_trigger = { + faith = ROOT.faith + has_trait = zealous + NOR = { + THIS = scope:accuser + THIS = scope:refuter + } +} + +scripted_effect court_8120_convert_vassal_effect = { + if = { + limit = { + any_vassal = { + court_8120_zealous_vassal_trigger = yes + faith = $FAITH$ + NOT = { THIS = $CONVERTOR$ } + } + } + every_vassal = { + limit = { + court_8120_zealous_vassal_trigger = yes + faith = $FAITH$ + NOT = { THIS = $CONVERTOR$ } + } + add_opinion = { + target = ROOT + modifier = pious_opinion + opinion = 10 + } + } + hidden_effect = { + every_courtier_or_guest = { + limit = { + court_8120_zealous_vassal_trigger = yes + faith = $FAITH$ + NOT = { THIS = $CONVERTOR$ } + } + add_opinion = { + target = ROOT + modifier = pious_opinion + opinion = 10 + } + } + } + } + else_if = { + limit = { + any_courtier_or_guest = { + court_8120_zealous_vassal_trigger = yes + faith = $FAITH$ + NOT = { THIS = $CONVERTOR$ } + } + } + every_courtier_or_guest = { + limit = { + court_8120_zealous_vassal_trigger = yes + faith = $FAITH$ + NOT = { THIS = $CONVERTOR$ } + } + add_opinion = { + target = ROOT + modifier = pious_opinion + opinion = 10 + } + } + } +} + +scripted_trigger court_8120_debater_trigger = { + is_available_ai_adult = yes + faith != ROOT.faith + faith = { + faith_hostility_level = { + target = ROOT.faith + value <= faith_hostile_level + } + } + ROOT.faith = { + faith_hostility_level = { + target = PREV.faith + value <= faith_hostile_level + } + } + OR = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_monogamy } # Marriage + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_divorce_disallowed } # Divorce + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_adultery_women_accepted } # Adultery Female + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_adultery_men_accepted } # Adultery Male + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_witchcraft_accepted } # Witchcraft + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_gender_equal } # Equality + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_consanguinity_unrestricted } # Cosanguity + } +} + +court_yearly.8120 = { + type = character_event + title = court.8120.t + desc = { + desc = court.8120.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:accuser.religion = ROOT.religion } + desc = court.8120.desc.same_religion + } + desc = court.8120.desc.other_religion + } + first_valid = { + # Variables used to find randomly chosen doctrine difference + triggered_desc = { # Marriage + trigger = { var:court_8120_issue = 0 } + desc = court.8120.desc.marriage + } + triggered_desc = { # Divorce + trigger = { var:court_8120_issue = 1 } + desc = court.8120.desc.divorce + } + triggered_desc = { # Adultery + trigger = { var:court_8120_issue = 2 } + desc = court.8120.desc.adultery + } + triggered_desc = { # Witchcraft + trigger = { var:court_8120_issue = 3 } + desc = court.8120.desc.witchcraft + } + triggered_desc = { # Equality + trigger = { var:court_8120_issue = 4 } + desc = court.8120.desc.equality + } + triggered_desc = { # Cosanguity + trigger = { var:court_8120_issue = 5 } + desc = court.8120.desc.cosanguity + } + } + desc = court.8120.desc.outro + } + theme = court + cooldown = { years = 10 } + left_portrait = { + character = scope:accuser + animation = throne_room_conversation_2 + } + right_portrait = { + character = scope:refuter + animation = throne_room_conversation_4 + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + any_courtier_or_guest = { court_8120_debater_trigger = yes } + trigger_if = { + limit = { + NOT = { exists = cp:councillor_court_chaplain } + } + any_courtier_or_guest = { + is_available_ai_adult = yes + faith = ROOT.faith + } + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + # Save 1st debater + ordered_courtier_or_guest = { + limit = { court_8120_debater_trigger = yes } + order_by = learning + random_list = { + 4 = { # Marriage + trigger = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_monogamy } # 1/2 faiths have this + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 0 + } + } + if = { # Accuser attacks polygamy + limit = { + faith = { has_doctrine = doctrine_monogamy } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + 4 = { # Divorce + trigger = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_divorce_disallowed } # 1/2 faiths have this + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 1 + } + } + if = { # Accuser attacks divorce + limit = { + faith = { has_doctrine = doctrine_divorce_disallowed } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + 2 = { # Adultery + trigger = { + OR = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_adultery_women_accepted } # 1/2 faiths have this + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_adultery_men_accepted } # 1/2 faiths have this + } + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 2 + } + } + if = { # Accuser attacks adultery + limit = { + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + 4 = { # Witchcraft + trigger = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_witchcraft_accepted } # 1/2 faiths have this + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 3 + } + } + if = { # Accuser attacks magic + limit = { + NOT = { + faith = { has_doctrine_parameter = witchcraft_accepted } + } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + 2 = { # Equality + trigger = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_gender_equal } # 1/2 faiths have this + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 4 + } + } + if = { # Accuser attacks inequality + limit = { + faith = { has_doctrine = doctrine_gender_equal } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + 4 = { # Cosanguity + trigger = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_consanguinity_unrestricted } # 1/2 faiths have this + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 5 + } + } + if = { # Accuser attacks intermarriage + limit = { + NOT = { + faith = { has_doctrine = doctrine_consanguinity_unrestricted } + } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + } + } + # Save 2nd debater + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { + if = { + limit = { + NOT = { exists = scope:accuser } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + } + else = { + ordered_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + faith = ROOT.faith + } + order_by = learning + if = { + limit = { + NOT = { exists = scope:accuser } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + } + # Scopes for conversion effects + save_scope_as = character + if = { + limit = { scope:refuter.faith = ROOT.faith } + scope:accuser.faith = { save_scope_as = new_faith } + } + else = { + scope:refuter.faith = { save_scope_as = new_faith } + } + scope:accuser = { assign_quirk_effect = yes } + scope:refuter = { assign_quirk_effect = yes } + } + + option = { # Convert + name = { + text = court.8120.a.accuser + trigger = { scope:refuter.faith = ROOT.faith } + } + name = { + text = court.8120.a.refuter + trigger = { scope:accuser.faith = ROOT.faith } + } + add_piety = massive_piety_loss + if = { + limit = { faith = scope:refuter.faith } + reverse_add_opinion = { + target = scope:refuter + modifier = disappointed_opinion + opinion = -40 + } + reverse_add_opinion = { + target = scope:accuser + modifier = respect_opinion + opinion = 40 + } + court_8120_convert_vassal_effect = { + FAITH = scope:accuser.faith + CONVERTOR = scope:accuser + } + set_character_faith_with_conversion = scope:accuser.faith + } + else = { + reverse_add_opinion = { + target = scope:accuser + modifier = disappointed_opinion + opinion = -40 + } + reverse_add_opinion = { + target = scope:refuter + modifier = respect_opinion + opinion = 40 + } + court_8120_convert_vassal_effect = { + FAITH = scope:refuter.faith + CONVERTOR = scope:refuter + } + set_character_faith_with_conversion = scope:refuter.faith + } + stress_impact = { + zealous = massive_stress_impact_gain + stubborn = medium_stress_impact_gain + lazy = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 20 + ai_value_modifier = { + ai_zeal = -1 + ai_energy = 0.5 + ai_rationality = 0.5 + } + modifier = { # Weight down. + add = -100 + THIS = ROOT.faith.religious_head + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -15 + has_trait = stubborn + } + modifier = { # Weight down for stress. + add = -15 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Theological kumbaya + name = court.8120.c + trigger = { has_trait = theologian } + reverse_add_opinion = { + target = scope:accuser + modifier = respect_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:refuter + modifier = respect_opinion + opinion = 15 + } + stress_impact = { + base = minor_stress_impact_loss + diplomat = minor_stress_impact_loss + cynical = medium_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_rationality = 1 + } + modifier = { # Weight up. + add = 15 + has_trait = diplomat + } + modifier = { # Weight down for stress. + add = -15 + has_trait = cynical + } + } + } + + option = { # Defender of the faith + name = court.8120.d + trigger = { has_trait = zealous } + create_artifact = { + name = my_holy_book + description = my_holy_book_description + type = journal + visuals = book + modifier = artifact_monthly_piety_2_modifier + } + if = { + limit = { faith = scope:refuter.faith } + scope:accuser = { select_and_move_to_pool_effect = yes } + reverse_add_opinion = { + target = scope:accuser + modifier = insulted_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:refuter + modifier = pious_opinion + opinion = 15 + } + } + else = { + scope:refuter = { select_and_move_to_pool_effect = yes } + reverse_add_opinion = { + target = scope:refuter + modifier = insulted_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:accuser + modifier = pious_opinion + opinion = 15 + } + } + every_vassal = { + limit = { court_8120_zealous_vassal_trigger = yes } # root faith, zealous, not accuser/refuter + custom = court.8120.d.tt + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + hidden_effect = { + every_courtier_or_guest = { + limit = { court_8120_zealous_vassal_trigger = yes } # root faith, zealous, not accuser/refuter + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + } + stress_impact = { + base = minor_stress_impact_loss + lazy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = -1 + } + modifier = { # Weight up. + add = 15 + has_trait = diplomat + } + modifier = { # Weight down for stress. + add = -30 + has_trait = lazy + } + } + } + + option = { # Admonish + name = court.8120.e + if = { + limit = { faith = scope:refuter.faith } + reverse_add_opinion = { + target = scope:accuser + modifier = insulted_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:refuter + modifier = pious_opinion + opinion = 10 + } + progress_towards_rival_effect = { + REASON = rival_refuted_faith + CHARACTER = scope:accuser + OPINION = 0 + } + } + else = { + scope:refuter = { select_and_move_to_pool_effect = yes } + reverse_add_opinion = { + target = scope:refuter + modifier = insulted_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:accuser + modifier = pious_opinion + opinion = 10 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_compassion = -0.5 + } + modifier = { # Weight down for stress. + add = -15 + has_trait = cynical + } + } + } + + option = { # Dismiss + name = court.8120.f + add_piety = miniscule_piety_gain + reverse_add_opinion = { + target = scope:accuser + modifier = humbled_opinion + opinion = -5 + } + reverse_add_opinion = { + target = scope:refuter + modifier = humbled_opinion + opinion = -5 + } + ai_chance = { + base = 100 + } + } + + after = { remove_variable = court_8120_issue } +} diff --git a/N3OW/events/yearly_events/yearly_events_3.txt b/N3OW/events/yearly_events/yearly_events_3.txt new file mode 100644 index 00000000..c848b43d --- /dev/null +++ b/N3OW/events/yearly_events/yearly_events_3.txt @@ -0,0 +1,3461 @@ + +namespace = yearly + + +####################### +# Dedication to Loyalty +# 3001-3005 +# by Petter Vilberg +####################### + +#Find a vassal who isn't entirely loyal +scripted_trigger yearly_3001_vassal_trigger = { + highest_held_title_tier >= tier_county + OR = { + any_scheme = { + hostile_scheme_trigger = yes + scheme_target_character = root + } + is_a_faction_member = yes + OR = { + opinion = { + target = root + value < 10 + } + has_trait = deceitful + has_trait = fickle + has_trait = ambitious + } + } + is_imprisoned = no + NOR = { + has_trait = content + is_heir_of = root + has_character_modifier = liege_looking_away_modifier + } + is_ai = yes + + #Find either another vassal of the same rank within the same realm as you, or a foreign character of the same rank, or any independent neighbor if you are independent + save_temporary_scope_as = vassal + root = { + trigger_if = { + limit = { top_liege != this } + any_neighboring_realm_same_rank_owner = { yearly_3001_neighbor_trigger = yes } + } + trigger_else = { + any_neighboring_top_liege_realm_owner = { yearly_3001_neighbor_trigger = yes } + } + } +} + +scripted_trigger yearly_3001_possibly_lying_trigger = { + NOR = { + has_trait = honest + has_trait = just + } +} + +scripted_trigger yearly_3001_possibly_truthful_trigger = { + NOT = { has_trait = deceitful } + OR = { + has_trait = honest + opinion = { + target = root + value >= 0 + } + scope:vassal = { + OR = { + any_scheme = { + hostile_scheme_trigger = yes + scheme_target_character = root + } + is_a_faction_member = yes + } + } + } +} + +scripted_trigger yearly_3001_neighbor_trigger = { + OR = { + yearly_3001_possibly_lying_trigger = yes + yearly_3001_possibly_truthful_trigger = yes + } + NOR = { + has_relation_friend = root + has_relation_friend = scope:vassal + } + basic_is_available_ai = yes + #The neighboring ruler has to be within one tier rank of you + save_temporary_scope_value_as = { + name = max_tier + value = { value = root.highest_held_title_tier add = 1 } + } + save_temporary_scope_value_as = { + name = min_tier + value = { value = root.highest_held_title_tier subtract = 1} + } + highest_held_title_tier <= scope:max_tier + highest_held_title_tier >= scope:min_tier +} + +scripted_trigger yearly_3001_vassal_still_available_trigger = { + scope:vassal = { + basic_is_available_ai = yes + is_vassal_of = root + is_ruler = yes + } +} + +#A message from a neighbor +yearly.3001 = { + type = character_event + title = yearly.3001.t + desc = { + desc = yearly.3001.desc + triggered_desc = { + trigger = { + exists = scope:friend + always = scope:friend_guess_truth + } + desc = yearly.3001.friend_backs_neighbor + } + triggered_desc = { + trigger = { + exists = scope:friend + NOT = { always = scope:friend_guess_truth } + } + desc = yearly.3001.friend_backs_vassal + } + } + theme = intrigue + left_portrait = scope:neighbor + lower_left_portrait = scope:friend_backing_neighbor + right_portrait = scope:vassal + lower_right_portrait = scope:friend_backing_vassal + + trigger = { + NOT = { has_character_flag = had_event_yearly_3001 } + is_landed = yes # Requires map location checks + #Find a suitable vassal, also checks for neighbor + any_vassal = { + yearly_3001_vassal_trigger = yes + } + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3001 + years = 10 + } + + #To save the vassal that will be accused + random_vassal = { + limit = { + yearly_3001_vassal_trigger = yes + } + save_scope_as = vassal + } + + #To save the neighbor + if = { + limit = { + top_liege != this + } + random_neighboring_realm_same_rank_owner = { + limit = { yearly_3001_neighbor_trigger = yes } + save_scope_as = neighbor + } + } + else = { + random_neighboring_top_liege_realm_owner = { + limit = { yearly_3001_neighbor_trigger = yes } + save_scope_as = neighbor + } + } + + #Set whether the neighbor is telling the truth or not + random_list = { + 50 = { + trigger = { + scope:neighbor = { + yearly_3001_possibly_truthful_trigger = yes + } + } + save_scope_value_as = { + name = telling_truth + value = yes + } + } + 50 = { + trigger = { + scope:neighbor = { + yearly_3001_possibly_lying_trigger = yes + } + } + save_scope_value_as = { + name = telling_truth + value = no + } + } + } + + #Let a Friend recommend a course of action + if = { + limit = { + any_relation = { + type = best_friend + this != scope:vassal + } + } + random_relation = { + type = best_friend + limit = { + this != scope:vassal + } + save_scope_as = friend + random_list = { + 10 = { + #Friend backs neighbor + modifier = { + add = 50 + exists = scope:telling_truth + } + modifier = { + add = 50 + has_relation_rival = scope:vassal + } + modifier = { + add = 50 + exists = scope:telling_truth + has_trait = intellect_good + } + save_scope_value_as = { + name = friend_guess_truth + value = yes + } + save_scope_as = friend_backing_neighbor + } + 10 = { + #Friend backs vassal + modifier = { + add = 50 + exists = scope:telling_truth + } + modifier = { + add = 50 + has_relation_friend = scope:vassal + } + modifier = { + add = 50 + has_relation_rival = scope:neighbor + } + modifier = { + add = 50 + NOT = { exists = scope:telling_truth } + has_trait = intellect_good + } + save_scope_value_as = { + name = friend_guess_truth + value = no + } + save_scope_as = friend_backing_vassal + } + } + } + } + + # For attempted executions triggering wars: + save_scope_as = actor + scope:vassal = { + save_scope_as = recipient + } + } + + #Confront the vassal in private + option = { + trigger = { + can_add_hook = { + type = threat_hook + target = scope:vassal + } + } + name = yearly.3001.a + show_as_tooltip = { + random_list = { + 1 = { + desc = yearly.3001.true_tt + show_chance = no + add_hook = { + type = threat_hook + target = scope:vassal + } + } + 1 = { + desc = yearly.3001.false_tt + show_chance = no + custom_tooltip = yearly.3001.false_use_tt + } + } + } + hidden_effect = { + if = { + limit = { + always = scope:telling_truth + } + trigger_event = { + id = yearly.3002 + days = { 5 10 } + } + } + else = { + trigger_event = { + id = yearly.3003 + days = { 5 10 } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_rationality = 0.5 + ai_compassion = 0.5 + } + modifier = { + add = 200 + has_trait = shy + } + } + + stress_impact = { + paranoid = medium_stress_impact_gain + } + } + + #Immediately accuse the vassal + option = { + name = yearly.3001.b + show_as_tooltip = { + random_list = { + 1 = { + desc = yearly.3001.true_tt + show_chance = no + add_opinion = { + target = scope:vassal + modifier = plotting_against_liege_opinion + } + } + 1 = { + desc = yearly.3001.false_tt + show_chance = no + add_prestige = major_prestige_loss + } + } + } + hidden_effect = { + if = { + limit = { + always = scope:telling_truth + } + trigger_event = { + id = yearly.3004 + days = { 5 10 } + } + } + else = { + trigger_event = { + id = yearly.3005 + days = { 5 10 } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_zeal = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.5 + } + opinion_modifier = { + opinion_target = scope:vassal + multiplier = -1 + } + modifier = { + add = 100 + always = scope:telling_truth + } + } + + stress_impact = { + shy = medium_stress_impact_gain + } + } + + #Denounce the foreign neighbor + # Could give your vassal a boost if the neighbor is telling the truth + option = { + name = yearly.3001.c + add_character_modifier = { + modifier = protected_vassals_honor_modifier + years = 10 + } + scope:neighbor = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -30 + } + } + #Tooltip informs the player of possible bad outcome + show_as_tooltip = { + random_list = { + 1 = { + desc = yearly.3001.c.if_right + show_chance = no + } + 1 = { + desc = yearly.3001.c.if_wrong_tt + show_chance = no + scope:vassal = { + if = { + limit = { + is_a_faction_member = yes + } + joined_faction = { + add_faction_discontent = 20 + } + } + add_character_modifier = { + modifier = liege_looking_away_modifier + years = 5 + } + } + } + } + } + hidden_effect = { + if = { + limit = { + always = scope:telling_truth + } + send_interface_toast = { + title = yearly.3001.vassal_gains_strength + left_icon = scope:vassal + + scope:vassal = { + if = { + limit = { + is_a_faction_member = yes + } + joined_faction = { + add_faction_discontent = 20 + } + } + add_character_modifier = { + modifier = liege_looking_away_modifier + years = 5 + } + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_honor = 1 + ai_rationality = 0.5 + } + opinion_modifier = { + opinion_target = scope:vassal + } + opinion_modifier = { + opinion_target = scope:neighbor + multiplier = -0.5 + } + modifier = { + add = -100 + ai_diplomacy_stance = { + target = scope:neighbor + stance = threat + } + } + modifier = { + add = -200 + ai_diplomacy_stance = { + target = scope:neighbor + stance = friend + } + } + modifier = { + add = 200 + ai_diplomacy_stance = { + target = scope:neighbor + stance = enemy + } + } + } + } + + #Kill the vassal right away + option = { + name = yearly.3001.d + trigger = { + has_trait = paranoid + } + trait = paranoid + add_internal_flag = dangerous + duel = { + target = scope:vassal + skill = intrigue + 10 = { + compare_modifier = { + value = scope:duel_value + } + add_dread = major_dread_gain + imprison_character_effect = { + TARGET = scope:vassal + IMPRISONER = root + } + } + 10 = { + scope:vassal = { + #If target is count or higher, start war. + if = { + limit = { + is_landed = yes + primary_title.tier > tier_barony + } + if = { + limit = { + is_a_faction_member = yes + liege = scope:actor + joined_faction = { + faction_target = scope:actor + NOT = { faction_is_type = populist_faction } + } + } + joined_faction = { + save_scope_as = retaliating_faction # For loc + imprisonment_retribution_start_faction_war_if_valid = yes + } + } + else = { + war_for_imprison_effect = yes + } + } + #If target is a baron or unlanded, have them escape. + else_if = { + limit = { is_landed = yes } + depose_effect = { DEPOSER = root } + } + else = { move_to_pool = yes } + } + } + } + + stress_impact = { + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 20 + modifier = { + add = 50 + ai_diplomacy_stance = { + target = scope:vassal + stance = threat + } + } + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 1 + } + } + } +} + + +#Confront the Vassal - they admit wrongdoing +yearly.3002 = { + type = character_event + title = yearly.3002.t + desc = yearly.3002.desc + theme = vassal + left_portrait = { + character = scope:vassal + animation = shame + } + + trigger = { + yearly_3001_vassal_still_available_trigger = yes + } + + immediate = { + scope:vassal = { + if = { + limit = { root = { is_ai = no } } + assign_quirk_effect = yes + } + } + } + + #You better do as I say from now on + option = { + name = yearly.3002.a + if = { + limit = { + can_add_hook = { + target = scope:vassal + type = threat_hook + } + } + add_hook = { + target = scope:vassal + type = threat_hook + } + } + else = { + add_prestige = medium_prestige_gain + } + + stress_impact = { + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = 0.5 + } + } + } + + #Make sure everyone knows how forgiving and benevolent I am + option = { + name = yearly.3002.b + add_character_modifier = { + modifier = yearly_benevolent_forgiveness_modifier + years = 10 + } + if = { + limit = { + tyranny > 0 + } + add_tyranny = -10 + } + scope:vassal = { + add_character_modifier = { + modifier = yearly_close_watch_modifier + years = 5 + } + } + + stress_impact = { + deceitful = minor_stress_impact_gain + callous = medium_stress_impact_gain + vengeful = major_stress_impact_gain + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_honor = 1 + } + } + } +} + +#Confront the Vassal - they have done nothing +yearly.3003 = { + type = character_event + title = yearly.3003.t + desc = { + desc = yearly.3003.desc + triggered_desc = { + trigger = { + exists = scope:friend + scope:friend.diplomacy >= decent_skill_rating + } + desc = yearly.3003.friend + } + } + left_portrait = { + character = scope:vassal + animation = anger + } + right_portrait = scope:friend + theme = vassal + + trigger = { + yearly_3001_vassal_still_available_trigger = yes + } + + option = { + name = yearly.3003.a + if = { + limit = { + scope:vassal = { + vassal_contract_can_be_modified_trigger = yes + vassal_contract_obligation_level_can_be_decreased = feudal_government_taxes + } + } + scope:vassal = { vassal_contract_decrease_obligation_level = feudal_government_taxes } + } + else = { + pay_short_term_gold = { + target = scope:vassal + gold = root.major_gold_value + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_honor = 1 + } + } + } + + option = { + name = yearly.3003.b + scope:vassal = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + duel = { + target = scope:vassal + skill = diplomacy + 10 = { + desc = yearly.3003.public_expression_of_gratitude + + send_interface_toast = { + title = yearly.3003.public_expression_of_gratitude + left_icon = scope:vassal + + add_prestige = medium_prestige_loss + } + } + 5 = { + desc = yearly.3003.vassal_loss_of_faith + send_interface_toast = { + title = yearly.3003.vassal_loss_of_faith + left_icon = scope:vassal + + add_character_modifier = { + modifier = vassal_distrust_modifier + years = 10 + } + } + } + } + + stress_impact = { + arrogant = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { + name = yearly.3003.c + trigger = { + exists = scope:friend + } + custom_tooltip = yearly.3003.c.enable + reverse_add_opinion = { + target = scope:vassal + modifier = grateful_opinion + opinion = 15 + } + add_prestige = minor_prestige_gain + + ai_chance = { + base = 500 + } + } +} + +#Expose the Vassal - they admit wrongdoing +yearly.3004 = { + type = character_event + title = yearly.3004.t + desc = yearly.3004.desc + theme = vassal + left_portrait = { + character = scope:vassal + animation = shame + } + + trigger = { + yearly_3001_vassal_still_available_trigger = yes + } + + immediate = { + hidden_effect = { + add_opinion = { + target = scope:vassal + modifier = plotting_against_liege_opinion + } + } + } + + #A measure of forgiveness + option = { + name = yearly.3004.a + add_prestige = medium_prestige_gain + scope:vassal = { + if = { + limit = { + vassal_contract_obligation_level_can_be_increased = feudal_government_taxes + } + vassal_contract_increase_obligation_level = feudal_government_taxes + } + } + if = { + limit = { + can_add_hook = { + target = scope:vassal + type = loyalty_hook + } + } + add_hook = { + target = scope:vassal + type = loyalty_hook + } + } + + reverse_add_opinion = { + target = scope:vassal + modifier = grateful_opinion + opinion = 20 + } + hidden_effect = { + remove_opinion = { + target = scope:vassal + modifier = plotting_against_liege_opinion + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 1 + } + } + + stress_impact = { + vengeful = major_stress_impact_gain + paranoid = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + } + + #Imprison them + option = { + name = yearly.3004.b + imprison_character_effect = { + TARGET = scope:vassal + IMPRISONER = root + } + add_prestige = minor_prestige_gain + + stress_impact = { + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_rationality = 0.5 + } + } + } + + #Execute them + option = { + name = yearly.3004.c + execute_prisoner_effect = { + VICTIM = scope:vassal + EXECUTIONER = root + } + + stress_impact = { + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + } + modifier = { + add = 100 + has_trait = paranoid + } + } + } +} + +#Expose the Vassal - they have done nothing +yearly.3005 = { + type = character_event + title = yearly.3004.t + desc = yearly.3005.desc + theme = vassal + left_portrait = { + character = scope:vassal + animation = anger + } + + trigger = { + yearly_3001_vassal_still_available_trigger = yes + } + + #Prestige loss + option = { + name = yearly.3005.a + duel = { + skill = diplomacy + value = 10 + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + desc = yearly.3005.a.rousing_speech + send_interface_toast = { + title = yearly.3005.a.rousing_speech + left_icon = scope:vassal + + add_prestige = minor_prestige_loss + reverse_add_opinion = { + target = scope:vassal + modifier = insult_opinion + opinion = -10 + } + } + } + 5 = { + desc = yearly.3005.a.stumbling_apology + send_interface_toast = { + title = yearly.3005.a.stumbling_apology + left_icon = scope:vassal + + add_prestige = major_prestige_loss + reverse_add_opinion = { + target = scope:vassal + modifier = insult_opinion + opinion = -20 + } + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + + ai_chance = { + base = 200 + } + } + + #Imprison them anyways + option = { + name = yearly.3005.b + add_dread = medium_dread_gain + imprison_character_effect_ignore_reason = { + TARGET = scope:vassal + IMPRISONER = root + } + + stress_impact = { + forgiving = major_stress_impact_gain + just = major_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 0.5 + } + modifier = { + add = 100 + has_trait = paranoid + } + } + } +} + + + + +############################# +# An Impression Twice Made +# +# by Petter Vilberg +############################# + +scripted_trigger yearly_3011_fellow_vassal_trigger = { + is_available_ai_adult = yes + this != root + NOR = { + has_relation_rival = liege + has_relation_rival = root + has_relation_friend = liege + has_relation_friend = root + } + liege = { + opinion = { + target = prev + value < 10 + } + } +} + +scripted_trigger yearly_3011_liege_trigger = { + is_available_ai_adult = yes + opinion = { + target = root + value < 10 + } + any_vassal = { + yearly_3011_fellow_vassal_trigger = yes + } +} + +scripted_trigger yearly_3011_nemesis_trigger = { + is_available_ai_adult = yes +} + +#A fellow vassal comes with a suggestion +yearly.3011 = { + type = character_event + title = yearly.3011.t + desc = yearly.3011.desc + left_portrait = scope:vassal + right_portrait = scope:liege + theme = diplomacy + + trigger = { + NOT = { has_character_flag = had_event_yearly_3011 } + top_liege != this + liege ?= { + yearly_3011_liege_trigger = yes + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3011 + years = 10 + } + liege = { + save_scope_as = liege + random_vassal = { + limit = { + yearly_3011_fellow_vassal_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 3 + has_relation_potential_friend = root + } + modifier = { + add = 1 + has_relation_friend = root + } + } + save_scope_as = vassal + } + } + if = { + limit = { + any_relation = { + type = nemesis + yearly_3011_nemesis_trigger = yes + } + } + random_relation = { + type = nemesis + limit = { + yearly_3011_nemesis_trigger = yes + } + save_scope_as = nemesis + } + } + } + + #I will provide the gold + option = { + name = yearly.3011.a + trigger = { + gold > 0 + } + remove_short_term_gold = medium_gold_value + show_as_tooltip = { + duel = { + skill = stewardship + value = 10 + 10 = { + desc = yearly.3011.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + scope:liege = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + 10 = { + desc = yearly.3011.a.failure + scope:liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + } + } + } + hidden_effect = { + duel = { + skill = stewardship + value = 10 + 10 = { #Success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + trigger_event = { + id = yearly.3012 + days = { 5 10 } + } + } + 10 = { #Relative Failure + trigger_event = { + id = yearly.3013 + days = { 5 10 } + } + } + 7 = { #Nemesis-engineered failure + trigger = { + exists = scope:nemesis + } + trigger_event = { + id = yearly.3014 + days = { 5 10 } + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + compare_modifier = { + value = gold + offset = medium_gold_value + } + ai_value_modifier = { + ai_greed = -1 + } + } + } + + #I will find the entertainment + option = { + name = yearly.3011.b + add_prestige = medium_prestige_loss + show_as_tooltip = { + duel = { + skill = diplomacy + value = 10 + 10 = { + desc = yearly.3011.a.success + compare_modifier = { + value = scope:duel_value + } + scope:liege = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + 10 = { + desc = yearly.3011.a.failure + scope:liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + } + } + } + hidden_effect = { + duel = { + skill = diplomacy + value = 10 + 10 = { #Success + compare_modifier = { + value = scope:duel_value + } + trigger_event = { + id = yearly.3012 + days = { 5 10 } + } + } + 10 = { #Relative Failure + trigger_event = { + id = yearly.3013 + days = { 5 10 } + } + } + 7 = { #Nemesis-engineered failure + trigger = { + exists = scope:nemesis + } + trigger_event = { + id = yearly.3014 + days = { 5 10 } + } + } + } + } + + stress_impact = { + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + compare_modifier = { + value = prestige + offset = medium_prestige_value + } + } + } + + #Opt out + option = { + name = yearly.3011.c + add_character_modifier = { + modifier = yearly_improved_impressions_modifier + years = 5 + } + ai_chance = { + base = 25 + } + } + + #We don't need much + option = { + name = yearly.3011.d + trigger = { + OR = { + has_trait = gregarious + has_trait = lifestyle_reveler + } + } + trait = gregarious + trait = lifestyle_reveler + show_as_tooltip = { + duel = { + skill = stewardship + value = 10 + 12 = { + desc = yearly.3011.a.success + scope:liege = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + 8 = { + desc = yearly.3011.a.failure + scope:liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + } + } + } + hidden_effect = { + duel = { + skill = stewardship + value = 10 + 12 = { #Success + compare_modifier = { + value = stewardship + offset = average_skill_rating + } + trigger_event = { + id = yearly.3012 + days = { 5 10 } + } + } + 8 = { #Relative Failure + trigger_event = { + id = yearly.3013 + days = { 5 10 } + } + } + 5 = { #Nemesis-engineered failure + trigger = { + exists = scope:nemesis + } + trigger_event = { + id = yearly.3014 + days = { 5 10 } + } + } + } + } + add_character_modifier = { + modifier = yearly_improved_impressions_modifier + years = 3 + } + + ai_chance = { + base = 500 + } + } +} + + + +#Success +yearly.3012 = { + type = character_event + title = yearly.3011.t + desc = yearly.3012.desc + theme = diplomacy + override_background = { + reference = feast + } + left_portrait = { + character = scope:liege + animation = happiness + } + right_portrait = scope:vassal + + trigger = { + scope:liege = { + basic_is_available_ai = yes + } + scope:vassal = { + is_alive = yes + } + } + + immediate = { + hidden_effect = { + if = { + limit = { + NOT = { + has_relation_friend = scope:vassal + } + } + if = { + limit = { + has_relation_potential_friend = scope:vassal + } + random = { + chance = 50 + save_scope_value_as = { + name = gain_friendship + value = yes + } + } + } + else = { + set_relation_potential_friend = scope:vassal + random = { + #Tiny chance that it jumps straight into friendship + chance = 10 + save_scope_value_as = { + name = gain_friendship + value = yes + } + } + } + } + } + } + + option = { + name = yearly.3012.a + trigger = { + exists = scope:gain_friendship + } + exclusive = yes + scope:liege = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + add_opinion = { + target = scope:vassal + modifier = impressed_opinion + opinion = 30 + } + } + set_relation_friend = { reason = friend_feast_for_liege target = scope:vassal involved_character = scope:liege } + } + + option = { + name = yearly.3012.b + scope:liege = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + add_opinion = { + target = scope:vassal + modifier = impressed_opinion + opinion = 30 + } + } + reverse_add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 15 + } + hidden_effect = { + add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 15 + } + } + } +} + + +#Limited Success +yearly.3013 = { + type = character_event + title = yearly.3011.t + desc = yearly.3013.desc + left_portrait = scope:liege + right_portrait = scope:vassal + theme = diplomacy + + trigger = { + scope:liege = { + basic_is_available_ai = yes + } + scope:vassal = { + is_alive = yes + } + } + + immediate = { + hidden_effect = { + if = { + limit = { + NOT = { + has_relation_friend = scope:vassal + } + } + if = { + limit = { + has_relation_potential_friend = scope:vassal + } + random = { + chance = 30 + save_scope_value_as = { + name = gain_friendship + value = yes + } + } + } + else = { + set_relation_potential_friend = scope:vassal + random = { + chance = 5 + save_scope_value_as = { + name = gain_friendship + value = yes + } + } + } + } + } + } + + option = { + name = yearly.3013.a + trigger = { + exists = scope:gain_friendship + } + exclusive = yes + scope:liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + add_opinion = { + target = scope:vassal + modifier = pleased_opinion + opinion = 15 + } + } + set_relation_friend = { reason = friend_feast_for_liege target = scope:vassal involved_character = scope:liege } + } + + option = { + name = yearly.3013.b + scope:liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + add_opinion = { + target = scope:vassal + modifier = pleased_opinion + opinion = 15 + } + } + reverse_add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 10 + } + hidden_effect = { + add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 10 + } + } + } +} + + +#Failure! +yearly.3014 = { + type = character_event + title = yearly.3011.t + desc = yearly.3014.desc + left_portrait = { + character = scope:liege + animation = dismissal + } + right_portrait = scope:vassal + lower_left_portrait = scope:nemesis + theme = diplomacy + + trigger = { + scope:liege = { + basic_is_available_ai = yes + } + scope:vassal = { + is_alive = yes + } + } + + immediate = { + if = { + limit = { + NOT = { + has_relation_friend = scope:vassal + } + } + if = { + limit = { + has_relation_potential_friend = scope:vassal + } + random = { + chance = 10 + save_scope_value_as = { + name = gain_friendship + value = yes + } + } + } + else = { + hidden_effect = { + set_relation_potential_friend = scope:vassal + } + } + } + } + + option = { + name = yearly.3014.a + trigger = { + exists = scope:gain_friendship + } + exclusive = yes + scope:liege = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + add_opinion = { + target = scope:vassal + modifier = disappointed_opinion + opinion = -10 + } + } + set_relation_friend = { reason = friend_feast_for_liege target = scope:vassal involved_character = scope:liege } + } + + option = { + name = yearly.3014.b + scope:liege = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + add_opinion = { + target = scope:vassal + modifier = disappointed_opinion + opinion = -10 + } + } + reverse_add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 5 + } + hidden_effect = { + add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 5 + } + } + } +} + + + +#################### +# On Their Deathbed +# by Petter Vilberg +#################### + +scripted_trigger yearly_3021_deathbed_trigger = { + is_ai = yes + health <= death_chance_dying_health + age >= 45 + is_imprisoned = no + OR = { + has_relation_friend = root + court_owner = root + is_close_or_extended_family_of = root + } + reverse_opinion = { + target = root + value > 0 + } + opinion = { + target = root + value > 20 + } +} + + +yearly.3021 = { + type = character_event + title = yearly.3021.t + desc = yearly.3021.desc + theme = death + left_portrait = { + character = scope:deathbed_character + animation = personality_compassionate + } + + trigger = { + is_ai = no + get_characters_of_interest_trigger = { + LISTNAME = characters + } + any_in_list = { + list = characters + yearly_3021_deathbed_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_consort = { + yearly_3021_deathbed_trigger = yes + } + } + modifier = { + add = 1 + any_child = { + yearly_3021_deathbed_trigger = yes + } + } + } + + immediate = { + get_characters_of_interest_effect = { + LISTNAME = potential_characters + } + random_in_list = { + list = potential_characters + limit = { + yearly_3021_deathbed_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 2 + is_consort_of = root + } + modifier = { + add = 2 + is_child_of = root + } + } + save_scope_as = deathbed_character + } + play_music_cue = "mx_cue_death" + } + + option = { + name = yearly.3021.a + add_character_flag = { + flag = knows_of_spouse_death_flag + days = 5 + } + scope:deathbed_character = { + death = natural + } + stress_impact = { + base = medium_stress_loss + } + add_piety = medium_piety_gain + } +} + + +################### +# Getting Ahead +# by Petter Vilberg +################### + +scripted_trigger yearly_3031_vassal_trigger = { + is_ai = yes + this != root + highest_held_title_tier = root.highest_held_title_tier + NOR = { + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + } +} + +scripted_trigger yearly_3031_liege_trigger = { + is_ai = yes + any_vassal = { + yearly_3031_vassal_trigger = yes + } +} + +yearly.3031 = { + type = character_event + title = yearly.3031.t + desc = { + desc = yearly.3031.desc + triggered_desc = { + trigger = { exists = scope:best_friend } + desc = yearly.3031.friend + } + triggered_desc = { + trigger = { exists = scope:nemesis } + desc = yearly.3031.rival + } + } + left_portrait = liege + lower_left_portrait = scope:best_friend + right_portrait = scope:fellow_vassal + lower_right_portrait = scope:nemesis + theme = intrigue + + trigger = { + top_liege != this + is_adult = yes + NOT = { has_character_flag = had_event_yearly_3031 } + NOR = { + has_trait = generous + has_trait = content + } + liege = { + yearly_3031_liege_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = ambitious + } + nemesis_event_weight_modifier = yes + best_friend_event_weight_modifier = yes + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3031 + years = 10 + } + liege = { + random_vassal = { + limit = { + yearly_3031_vassal_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 3 + has_relation_potential_rival = root + } + } + save_scope_as = fellow_vassal + } + + capital_barony = { + save_scope_as = capital + } + save_scope_as = liege + } + + if = { + limit = { + has_relation_potential_rival = scope:fellow_vassal + } + save_scope_value_as = { + name = gain_rival + value = yes + } + } + else = { + hidden_effect = { + random = { + chance = 25 + opinion_modifier = { + who = scope:fellow_vassal + opinion_target = root + multiplier = -0.5 + } + + save_scope_value_as = { + name = gain_rival + value = yes + } + } + } + } + + if = { + limit = { + any_relation = { + type = friend + liege ?= root.liege + is_available_ai_adult = yes + } + } + random_relation = { + type = friend + limit = { + liege ?= root.liege + is_available_ai_adult = yes + } + save_scope_as = best_friend + } + } + if = { + limit = { + any_relation = { + type = rival + liege ?= root.liege + is_available_ai_adult = yes + } + } + random_relation = { + type = rival + limit = { + liege ?= root.liege + is_available_ai_adult = yes + } + save_scope_as = nemesis + } + } + } + + #Charm liege's pants off + option = { + name = yearly.3031.a + duel = { + target = scope:fellow_vassal + skill = diplomacy + 5 = { + desc = yearly.3031.a.best_friend_success + trigger = { + exists = scope:best_friend + } + compare_modifier = { + target = scope:best_friend + value = diplomacy + multiplier = 0.25 + } + min = 1 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_prestige = medium_prestige_gain + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.best_friend_success + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_prestige = medium_prestige_gain + + scope:fellow_vassal = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + + stress_impact = { + base = minor_stress_gain + } + } + } + } + } + 10 = { + desc = yearly.3031.a.success + compare_modifier = { + value = scope:duel_value + } + min = 2 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_prestige = medium_prestige_gain + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.success + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_prestige = medium_prestige_gain + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + 10 = { + desc = yearly.3031.a.failure + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.failure + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + + 5 = { + desc = yearly.3031.a.nemesis_failure + trigger = { + exists = scope:nemesis + } + compare_modifier = { + target = scope:nemesis + value = diplomacy + multiplier = 0.25 + } + min = 1 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -20 + } + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.nemesis_failure + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -20 + } + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + } + } + + #Show that you're more pious + option = { + name = yearly.3031.b + duel = { + target = scope:fellow_vassal + skill = learning + 5 = { + desc = yearly.3031.a.best_friend_success + trigger = { + exists = scope:best_friend + } + compare_modifier = { + target = scope:best_friend + value = learning + multiplier = 0.25 + } + min = 1 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_piety = medium_piety_gain + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.best_friend_success + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_piety = medium_piety_gain + + scope:fellow_vassal = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + + stress_impact = { + base = minor_stress_gain + } + } + } + } + } + 10 = { + desc = yearly.3031.b.success + compare_modifier = { + value = scope:duel_value + } + min = 2 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_piety = medium_piety_gain + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.b.success + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_piety = medium_piety_gain + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + 10 = { + desc = yearly.3031.b.failure + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.b.failure + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + 5 = { + desc = yearly.3031.a.nemesis_failure + trigger = { + exists = scope:nemesis + } + compare_modifier = { + target = scope:nemesis + value = learning + multiplier = 0.25 + } + min = 1 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -20 + } + + add_piety = medium_piety_loss + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.nemesis_failure + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -20 + } + + add_piety = medium_piety_loss + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + } + } + + #Literally charm liege's pants off + option = { + name = yearly.3031.c + trigger = { + might_cheat_on_every_partner_trigger = yes + scope:liege = { + is_attracted_to_gender_of = root + NOT = { has_trait = chaste } + might_cheat_on_every_partner_trigger = yes + } + attraction >= 10 + } + custom_tooltip = yearly.3031.c.unlock_tt + + show_as_tooltip = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + reverse_add_opinion = { + target = liege + modifier = friendliness_opinion + opinion = 20 + } + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -20 + } + } + } + + custom_tooltip = yearly.3031.c.consequence + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.c.success + left_icon = liege + right_icon = scope:fellow_vassal + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + reverse_add_opinion = { + target = liege + modifier = friendliness_opinion + opinion = 20 + } + + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -20 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -20 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + + #Try to set up a seduction scheme towards root + liege = { + if = { + limit = { + any_scheme = { + type = seduce + NOT = { scheme_target_character = root } + } + } + random_scheme = { + type = seduce + limit = { + NOT = { scheme_target_character = root } + } + end_scheme = yes + } + } + if = { + limit = { + can_start_scheme = { + target_character = root + type = seduce + } + } + start_scheme = { + target_character = root + type = seduce + } + } + } + } + } + + #All vassals should work together + option = { + name = yearly.3031.d + add_character_modifier = { + modifier = yearly_befriending_fellow_vassals_modifier + years = 5 + } + } +} + + + +#################### +# A Good FaithPracticioner +# by Petter Vilberg +#################### + +yearly.3040 = { + type = character_event + title = yearly.3040.t + desc = yearly.3040.desc + left_portrait = root + right_portrait = scope:religious_head + theme = faith + + trigger = { + is_landed = yes # Thematically landed + piety_level >= 2 + NOT = { has_character_flag = had_event_yearly_3040 } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3040 + years = 10 + } + if = { + limit = { + exists = faith.religious_head + faith.religious_head != root + } + faith.religious_head = { save_scope_as = religious_head } + } + play_music_cue = "mx_cue_general_crusade_event_2" + } + + #Spread word of my piety far and wide + option = { + name = yearly.3040.a + add_piety = minor_piety_loss + add_prestige = medium_prestige_gain + } + + #Maybe I have been a little too lenient on the religious authorities... + option = { + name = yearly.3040.b + add_piety = medium_piety_loss + add_treasury_or_gold = medium_treasury_or_gold_value + } + + #The FaithHead must surely appreciate my dedication + option = { + name = yearly.3040.c + trigger = { + exists = scope:religious_head + } + scope:religious_head = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 30 + } + } + } + + #My religious vassals must appreciate it + option = { + name = yearly.3040.d + trigger = { + NOT = { exists = scope:religious_head } + } + add_character_modifier = { + modifier = yearly_pious_liege_modifier + years = 10 + } + } +} + + +############################## +# Chafing Under Secular Laws +# by Petter Vilberg +############################## +scripted_trigger yearly_3041_religious_vassal = { + is_ai = yes + government_has_flag = government_is_theocracy + faith = root.faith +} + +#Theocracy vassal requests more lenient contract +yearly.3041 = { + type = letter_event + opening = { + desc = yearly.3041.opening + } + desc = yearly.3041.desc + sender = scope:vassal + + trigger = { + NOT = { has_character_flag = had_event_yearly_3041 } + any_vassal = { + yearly_3041_religious_vassal = yes + } + trigger_if = { + limit = { exists = faith.religious_head } + faith.religious_head != root + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3041 + years = 5 + } + random_vassal = { + limit = { + yearly_3041_religious_vassal = yes + } + save_scope_as = vassal + } + if = { + limit = { exists = faith.religious_head } + faith.religious_head = { save_scope_as = religious_head } + } + } + + #Reduce taxes + option = { + name = yearly.3041.a + add_piety = medium_piety_gain + add_character_modifier = { + modifier = yearly_reduced_theocracy_tax_modifier + years = 10 + } + scope:vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + #Reduce levies + option = { + name = yearly.3041.b + add_piety = major_piety_gain + add_character_modifier = { + modifier = yearly_reduced_theocracy_levies_modifier + years = 10 + } + scope:vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + option = { + name = yearly.3041.c + scope:vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + if = { + limit = { exists = scope:religious_head } + scope:religious_head = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + } + + stress_impact = { + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = 0.5 + } + } + } +} + + + + +#################### +# By Right +# by Petter Vilberg +#################### + +scripted_trigger yearly_3051_county_trigger = { + tier = tier_county + this != holder.primary_title + NOT = { + root = { + has_claim_on = prev + } + } +} + +scripted_trigger yearly_3051_vassal_trigger = { + opinion = { + target = root + value < 0 + } + OR = { + NOT = { is_close_or_extended_family_of = root } + opinion = { + target = root + value < -40 + } + } + any_held_title = { + yearly_3051_county_trigger = yes + } + NOR = { + has_relation_friend = root + has_relation_lover = root + } + is_ai = yes +} + +yearly.3051 = { + type = character_event + title = yearly.3051.t + desc = yearly.3051.desc + theme = vassal + left_portrait = { + character = scope:councillor + animation = personality_rational + } + right_portrait = { + character = scope:vassal + animation = worry + } + + trigger = { + NOT = { has_character_flag = had_event_yearly_3051 } + any_vassal = { + yearly_3051_vassal_trigger = yes + trigger_if = { + limit = { + exists = root.cp:councillor_steward + } + NOT = { + this = root.cp:councillor_steward + } + } + } + OR = { + AND = { + exists = cp:councillor_steward + cp:councillor_steward = { is_alive = yes } + } + AND = { + exists = cp:councillor_spouse + cp:councillor_spouse = { + is_performing_council_task = task_manage_domain + } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3051 + years = 10 + } + random_vassal = { + limit = { + yearly_3051_vassal_trigger = yes + NOT = { this = cp:councillor_steward } + } + random_held_title = { + limit = { + yearly_3051_county_trigger = yes + } + save_scope_as = county + } + save_scope_as = vassal + } + if = { + limit = { + exists = cp:councillor_spouse + cp:councillor_spouse = { + is_performing_council_task = task_manage_domain + } + } + cp:councillor_spouse = { + save_scope_as = councillor + } + } + else = { + cp:councillor_steward = { + save_scope_as = councillor + } + } + hidden_effect = { + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:vassal } + } + if = { + limit = { + has_relation_potential_rival = scope:vassal + } + save_scope_value_as = { + name = becoming_rivals + value = yes + } + } + else = { + random = { + chance = 20 + save_scope_value_as = { + name = becoming_rivals + value = yes + } + } + } + } + } + } + + option = { + name = yearly.3051.a + add_unpressed_claim = scope:county + reverse_add_opinion = { + target = scope:vassal + modifier = angry_opinion + opinion = -30 + } + if = { + limit = { + OR = { + exists = scope:becoming_rivals + has_relation_potential_rival = scope:vassal + } + can_set_relation_rival_trigger = { CHARACTER = scope:vassal } + } + set_relation_rival = { + target = scope:vassal + reason = rival_confiscated_title + } + } + else_if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:vassal } + } + hidden_effect = { + set_relation_potential_rival = scope:vassal + } + } + else = { + scope:vassal = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -20 + } + } + } + + stress_impact = { + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 0.5 + } + } + } + + option = { + name = yearly.3051.b + reverse_add_opinion = { + target = scope:vassal + modifier = grateful_opinion + opinion = 30 + } + + stress_impact = { + greedy = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 0.5 + } + } + } +} + + + + +################################ +# Cagots +# by Petter Vilberg +################################ +scripted_trigger yearly_3061_county_trigger = { + tier = tier_county + title_province = { + geographical_region = special_cagot_region + } + faith = root.faith +} + +yearly.3061 = { + type = character_event + title = yearly.3061.t + desc = yearly.3061.desc + theme = realm + override_background = { + reference = terrain_scope + } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = zealous } + animation = rage + } + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + } + } + animation = worry + } + triggered_animation = { + trigger = { always = yes } + animation = disapproval + } + } + + trigger = { + is_ai = no + NOT = { exists = global_var:had_cagot_event } + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + any_held_title = { + yearly_3061_county_trigger = yes + } + } + + immediate = { + set_global_variable = { + name = had_cagot_event + value = yes + } + random_held_title = { + limit = { + yearly_3061_county_trigger = yes + } + save_scope_as = county + title_province = { + save_scope_as = background_terrain_scope + } + } + } + + option = { # Levy a tax, but leave them be + name = yearly.3061.a + trigger = { NOT = { has_trait = lunatic } } + show_as_unavailable = { always = yes } + add_treasury_or_gold = medium_treasury_or_gold_value + add_piety = minor_piety_loss + scope:county = { + add_county_modifier = { + modifier = cagots_left_in_peace_modifier + years = 25 + } + } + } + + option = { # Separate them out! + name = yearly.3061.b + flavor = yearly.3061.b.flavor + trigger = { NOT = { has_trait = lunatic } } + show_as_unavailable = { always = yes } + remove_treasury_or_gold = medium_treasury_or_gold_value + add_piety = minor_piety_gain + scope:county = { + add_county_modifier = { + modifier = cagots_separated_modifier + years = 100 + } + } + } + + option = { # Perhaps we could try to live side by side with them? + name = yearly.3061.c + trigger = { has_trait = lunatic } + trait = lunatic_1 + trait = lunatic_genetic + add_prestige = minor_prestige_loss + add_character_modifier = { + modifier = lunatic_accepting_of_others_modifier + years = 10 + } + } + + option = { # Drive them out and seize their possessions! + name = yearly.3061.d + trigger = { has_trait = zealous } + trait = zealous + add_treasury_or_gold = major_treasury_or_gold_value + scope:county = { + change_development_level = -1 + change_county_control = 50 + } + } +} + +##################################### +# The Worst Nightmare of Your Life +# by Petter Vilberg +##################################### +yearly.3071 = { + type = character_event + title = yearly.3071.t + desc = yearly.3071.desc + theme = mental_health + override_background = { + reference = corridor_night + } + left_portrait = { + character = root + animation = fear + } + + trigger = { + is_adult = yes + is_ai = no + NOR = { + exists = global_var:had_yearly_3071_nightmare_event + any_secret = { + type = secret_cannibal + } + has_trait = cannibal + } + } + + immediate = { + set_global_variable = { + name = had_yearly_3071_nightmare_event + value = yes + } + play_music_cue = "mx_cue_stress" + } + + option = { # Pray the nightmares away + name = yearly.3071.a + add_piety = medium_piety_gain + } + + option = { # The flesh seemed delicious + name = yearly.3071.b + give_cannibal_secret_or_trait_effect = yes + } +}